From 614723f4972fcc71e331518daaa10053b32b7167 Mon Sep 17 00:00:00 2001 From: Francisco Serrano Date: Mon, 26 Oct 2026 15:05:41 +0200 Subject: [PATCH 1/4] feat: replace legacy PHP client with generated v4 SDK --- .gitattributes | 13 + .github/workflows/docs-validation.yml | 34 + .github/workflows/main.yml | 53 - .github/workflows/php-sdk-validation.yml | 90 + .github/workflows/publish.yml | 129 + .github/workflows/regenerate.yml | 130 + .github/workflows/release.yml | 113 + .github/workflows/update-docs.yml | 68 + .gitignore | 68 +- .php_cs | 63 - LICENSE | 6 +- README.md | 384 +- composer.json | 43 +- docs/Api/AccountApi.md | 55 - docs/Api/FirewallApi.md | 219 - docs/Api/HostsApi.md | 161 - docs/Api/IPAddressApi.md | 264 - docs/Api/NetworkApi.md | 717 - docs/Api/ObjectStorageApi.md | 261 - docs/Api/PlanApi.md | 55 - docs/Api/PricesApi.md | 55 - docs/Api/ServerApi.md | 1004 - docs/Api/StorageApi.md | 845 - docs/Api/TagApi.md | 320 - docs/Api/TimezoneApi.md | 55 - docs/Api/ZoneApi.md | 55 - docs/Gemfile | 2 + docs/Model/Account.md | 12 - docs/Model/AccountResourceLimits.md | 16 - docs/Model/AccountResponse.md | 10 - docs/Model/AddIpRequest.md | 10 - docs/Model/AssignIpResponse.md | 10 - docs/Model/AttachNetwork.md | 8 - docs/Model/AttachStorageDeviceRequest.md | 10 - docs/Model/AvailablePlanListResponse.md | 10 - docs/Model/AvailablePlanListResponsePlans.md | 10 - docs/Model/BackupRule.md | 12 - docs/Model/CloneStorageRequest.md | 10 - docs/Model/ConfigurationListResponse.md | 10 - .../ConfigurationListResponseServerSizes.md | 10 - docs/Model/CreateBackupStorageRequest.md | 10 - docs/Model/CreateNetworkInterfaceRequest.md | 10 - docs/Model/CreateNetworkRequest.md | 10 - docs/Model/CreateNewTagResponse.md | 10 - docs/Model/CreateObjectStorageRequest.md | 10 - docs/Model/CreateServerRequest.md | 10 - docs/Model/CreateServerResponse.md | 10 - docs/Model/CreateStorageRequest.md | 10 - docs/Model/CreateStorageResponse.md | 10 - docs/Model/Error.md | 10 - docs/Model/ErrorCode.md | 9 - docs/Model/ErrorError.md | 11 - docs/Model/ErrorStatus.md | 9 - docs/Model/FirewallRule.md | 24 - docs/Model/FirewallRuleCreateResponse.md | 10 - docs/Model/FirewallRuleListResponse.md | 10 - .../FirewallRuleListResponseFirewallRules.md | 10 - docs/Model/FirewallRuleRequest.md | 10 - docs/Model/Host.md | 12 - docs/Model/HostListResponse.md | 8 - docs/Model/HostResponse.md | 8 - docs/Model/Hosts.md | 8 - docs/Model/IpAddress.md | 18 - docs/Model/IpAddressListResponse.md | 10 - .../Model/IpAddressListResponseIpAddresses.md | 10 - docs/Model/IpAddresses.md | 10 - docs/Model/IpNetwork.md | 16 - docs/Model/ModifyHostRequest.md | 10 - docs/Model/ModifyIpRequest.md | 10 - docs/Model/ModifyNetworkInterfaceRequest.md | 10 - docs/Model/ModifyNetworkRequest.md | 10 - docs/Model/ModifyObjectStorageRequest.md | 10 - docs/Model/ModifyServerRequest.md | 10 - docs/Model/ModifyStorageRequest.md | 10 - docs/Model/ModifyTagRequest.md | 10 - docs/Model/Network.md | 15 - docs/Model/NetworkInterface.md | 15 - docs/Model/NetworkInterfaceList.md | 10 - docs/Model/NetworkInterfaceResponse.md | 8 - docs/Model/NetworkInterfaces.md | 10 - docs/Model/NetworkResponse.md | 8 - docs/Model/Networks.md | 8 - docs/Model/NetworksListResponse.md | 8 - docs/Model/ObjectStorage.md | 18 - docs/Model/ObjectStorageListResponse.md | 8 - docs/Model/ObjectStorageResponse.md | 8 - docs/Model/ObjectStorages.md | 8 - docs/Model/Plan.md | 15 - docs/Model/Price.md | 11 - docs/Model/PriceListResponse.md | 10 - docs/Model/PriceListResponsePrice.md | 10 - docs/Model/PriceListResponsePrices.md | 10 - docs/Model/PriceZone.md | 27 - docs/Model/RestartServer.md | 12 - docs/Model/Router.md | 11 - docs/Model/RouterRequest.md | 8 - docs/Model/RouterResponse.md | 8 - docs/Model/Routers.md | 8 - docs/Model/RoutersListResponse.md | 8 - docs/Model/Server.md | 39 - docs/Model/ServerListResponse.md | 10 - docs/Model/ServerListResponseServers.md | 10 - docs/Model/ServerLoginUser.md | 12 - docs/Model/ServerNetworksListResponse.md | 8 - docs/Model/ServerSize.md | 11 - docs/Model/ServerSshKey.md | 10 - docs/Model/ServerState.md | 9 - docs/Model/ServerStorageDevices.md | 10 - docs/Model/ServerTags.md | 10 - docs/Model/Servers.md | 10 - docs/Model/Stat.md | 10 - docs/Model/Stats.md | 8 - docs/Model/StopServer.md | 10 - docs/Model/StopServerRequest.md | 11 - docs/Model/Storage.md | 23 - docs/Model/StorageAccessType.md | 9 - docs/Model/StorageBackups.md | 10 - docs/Model/StorageDevice.md | 20 - docs/Model/StorageDeviceDetachRequest.md | 10 - docs/Model/StorageDeviceLoadRequest.md | 10 - docs/Model/StorageState.md | 9 - docs/Model/StorageTier.md | 9 - docs/Model/StorageType.md | 9 - docs/Model/SuccessStoragesResponse.md | 10 - docs/Model/SuccessStoragesResponseStorages.md | 10 - docs/Model/Tag.md | 12 - docs/Model/TagCreateRequest.md | 10 - docs/Model/TagListResponse.md | 10 - docs/Model/TagListResponseTags.md | 10 - docs/Model/TagServers.md | 10 - docs/Model/TemplitizeStorageRequest.md | 10 - docs/Model/TimezoneListResponse.md | 10 - docs/Model/TimezoneListResponseTimezones.md | 10 - docs/Model/Zone.md | 12 - docs/Model/ZoneListResponse.md | 10 - docs/Model/ZoneListResponseZones.md | 10 - docs/Model/ipNetworks.md | 10 - docs/_config.yml | 13 + docs/_layouts/sdk.html | 34 + docs/assets/docs.css | 48 + docs/index.md | 80 + docs/latest/reference.md | 13885 +++ docs/v0.0.105/reference.md | 13885 +++ docs/v0.0.11/reference.md | 2679 + docs/v0.0.65/reference.md | 10279 +++ fern/fern.config.json | 4 + fern/generators.yaml | 18 + fern/sdk/.fern/metadata.json | 8 + fern/sdk/.github/workflows/ci.yml | 48 + fern/sdk/.gitignore | 5 + fern/sdk/README.md | 151 + fern/sdk/composer.json | 43 + fern/sdk/phpstan.neon | 6 + fern/sdk/phpunit.xml | 7 + fern/sdk/reference.md | 34884 +++++++ fern/sdk/src/Account/AccountClient.php | 826 + .../Requests/CreateSubaccountRequest.php | 27 + .../GetAccountNetworkTopUsageRequest.php | 55 + .../GetAccountNetworkUsageRequest.php | 40 + .../GetAccountResourceNetworkUsageRequest.php | 62 + ...etMonthlyDetailedBillingSummaryRequest.php | 31 + .../Account/Requests/ListAccountsRequest.php | 24 + .../CreateSubaccountRequestSubAccount.php | 237 + ...teSubaccountRequestSubAccountIpFilters.php | 35 + ...CreateSubaccountRequestSubAccountRoles.php | 35 + .../src/AccountTokens/AccountTokensClient.php | 297 + .../Requests/ListTokensRequest.php | 45 + fern/sdk/src/AuditLogs/AuditLogsClient.php | 310 + .../Requests/ExportAuditLogsRequest.php | 25 + .../Requests/ListAuditLogsRequest.php | 77 + fern/sdk/src/Core/Client/BaseApiRequest.php | 22 + fern/sdk/src/Core/Client/HttpMethod.php | 12 + fern/sdk/src/Core/Client/RawClient.php | 288 + fern/sdk/src/Core/Client/RetryMiddleware.php | 266 + fern/sdk/src/Core/Json/JsonApiRequest.php | 28 + fern/sdk/src/Core/Json/JsonDecoder.php | 161 + fern/sdk/src/Core/Json/JsonDeserializer.php | 206 + fern/sdk/src/Core/Json/JsonEncoder.php | 20 + fern/sdk/src/Core/Json/JsonProperty.php | 13 + .../src/Core/Json/JsonSerializableType.php | 207 + fern/sdk/src/Core/Json/JsonSerializer.php | 197 + fern/sdk/src/Core/Json/Utils.php | 61 + .../Core/Multipart/MultipartApiRequest.php | 28 + .../src/Core/Multipart/MultipartFormData.php | 61 + .../Core/Multipart/MultipartFormDataPart.php | 76 + fern/sdk/src/Core/Types/ArrayType.php | 16 + fern/sdk/src/Core/Types/Constant.php | 12 + fern/sdk/src/Core/Types/Date.php | 16 + fern/sdk/src/Core/Types/Union.php | 62 + fern/sdk/src/Currency/CurrencyClient.php | 106 + fern/sdk/src/Database/DatabaseClient.php | 4026 + .../Requests/CloneDatabaseRequest.php | 41 + .../CreateDatabaseIntegrationRequest.php | 25 + .../Requests/CreateDatabaseLabelRequest.php | 25 + .../Requests/CreateDatabaseNetworkRequest.php | 25 + .../Requests/DatabaseConnectionPoolCreate.php | 59 + .../Requests/DatabaseConnectionPoolModify.php | 51 + .../DatabaseIntegrationEndpointCreate.php | 44 + .../DatabaseIntegrationEndpointModify.php | 27 + .../Database/Requests/DatabaseLabelModify.php | 34 + .../Requests/DatabaseServiceAclModify.php | 34 + .../Requests/DatabaseServiceCreateOpenApi.php | 179 + .../DatabaseServiceIntegrationModify.php | 27 + .../Requests/DatabaseServiceModifyOpenApi.php | 162 + .../DatabaseServiceSecurityEnable.php | 26 + .../DatabaseServiceSecurityModify.php | 34 + .../Requests/DatabaseServiceTaskCreate.php | 61 + .../Requests/DatabaseServiceTypeModify.php | 26 + .../Requests/DatabaseServiceUpgrade.php | 26 + .../Requests/DatabaseServiceUserAclModify.php | 54 + .../Requests/DatabaseServiceUserCreate.php | 78 + .../Requests/DatabaseServiceUserModify.php | 34 + .../Requests/GetDatabaseLogsRequest.php | 38 + .../GetDatabaseQueryStatisticsRequest.php | 38 + .../Requests/GetDatabaseSessionsRequest.php | 38 + .../ListDatabaseConnectionPoolsRequest.php | 24 + .../Requests/ListDatabasesRequest.php | 39 + .../Requests/LogicalDatabaseCreate.php | 42 + .../DatabaseConnectionPoolCreatePoolMode.php | 10 + .../DatabaseConnectionPoolModifyPoolMode.php | 10 + ...atabaseServiceCreateOpenApiMaintenance.php | 46 + ...atabaseServiceCreateOpenApiPlanBackups.php | 10 + ...atabaseServiceModifyOpenApiMaintenance.php | 46 + ...atabaseServiceModifyOpenApiPlanBackups.php | 10 + ...DatabaseServiceTaskCreateDatasetImport.php | 34 + ...atabaseServiceTaskCreateMigrationCheck.php | 58 + .../DatabaseServiceTaskCreateUpgradeCheck.php | 34 + ...ceUserAclModifyOpensearchAccessControl.php | 38 + ...ModifyOpensearchAccessControlRulesItem.php | 42 + ...aseServiceUserAclModifyPgAccessControl.php | 37 + ...ServiceUserAclModifyRedisAccessControl.php | 62 + ...erviceUserAclModifyValkeyAccessControl.php | 62 + ...rviceUserCreateOpensearchAccessControl.php | 38 + ...CreateOpensearchAccessControlRulesItem.php | 42 + ...tabaseServiceUserCreatePgAccessControl.php | 37 + ...aseServiceUserCreateRedisAccessControl.php | 62 + ...seServiceUserCreateValkeyAccessControl.php | 62 + fern/sdk/src/Device/DeviceClient.php | 117 + .../GetAvailablePassthroughDevicesRequest.php | 32 + ...AvailablePassthroughDevicesRequestType.php | 8 + fern/sdk/src/Environments.php | 8 + fern/sdk/src/Events/EventsClient.php | 109 + .../src/Exceptions/UpcloudApiException.php | 53 + fern/sdk/src/Exceptions/UpcloudException.php | 12 + .../sdk/src/FileStorage/FileStorageClient.php | 1583 + .../Requests/CreateFileStorageAclRequest.php | 25 + .../CreateFileStorageLabelRequest.php | 25 + .../CreateFileStorageNetworkRequest.php | 25 + .../CreateFileStorageShareRequest.php | 25 + .../Requests/FileStorageAclModify.php | 43 + .../Requests/FileStorageLabelModify.php | 34 + .../Requests/FileStorageNetworkModify.php | 51 + .../Requests/FileStorageServiceCreate.php | 87 + .../Requests/FileStorageServiceModify.php | 62 + .../Requests/FileStorageServiceReplace.php | 62 + .../Requests/FileStorageShareModify.php | 36 + .../Requests/ListFileStoragesRequest.php | 39 + .../FirewallRuleset/FirewallRulesetClient.php | 1386 + .../Requests/CreateFirewallRuleset.php | 68 + .../CreateFirewallRulesetLabelRequest.php | 25 + .../CreateFirewallRulesetRuleRequest.php | 25 + ...ewallRulesetFirewallMultipleRuleCreate.php | 28 + .../FirewallRulesetFirewallRuleModify.php | 166 + .../Requests/FirewallRulesetLabelModify.php | 34 + .../Requests/FirewallRulesetModify.php | 60 + ...irewallRulesetServerFirewallRuleCreate.php | 27 + ...lesetServerMultipleFirewallRulesCreate.php | 27 + .../ListFirewallRulesetRulesRequest.php | 38 + .../Requests/ListFirewallRulesetsRequest.php | 38 + .../ListServerFirewallRuleRequest.php | 38 + ...ltipleFirewallRulesCreateFirewallRules.php | 36 + fern/sdk/src/Gateway/GatewayClient.php | 1748 + .../CreateGatewayConnectionRequest.php | 25 + .../CreateGatewayServiceLabelRequest.php | 25 + .../Requests/CreateGatewayTunnelRequest.php | 25 + .../Requests/GatewayAddressModifyRequest.php | 26 + .../Requests/GatewayLabelModifyRequest.php | 34 + .../Requests/GatewayServiceCreateRequest.php | 105 + .../GatewayServiceLogSessionCreateRequest.php | 27 + .../Requests/GatewayServiceModifyRequest.php | 79 + .../Requests/GatewayServiceReplaceRequest.php | 69 + .../Requests/ListGatewayPlansRequest.php | 31 + .../Requests/ListGatewayServicesRequest.php | 39 + .../ModifyGatewayConnectionRequest.php | 25 + .../Requests/ModifyGatewayTunnelRequest.php | 25 + fern/sdk/src/IpAddress/IpAddressClient.php | 440 + .../Requests/AddIpAddressRequest.php | 27 + .../BulkPatchIpAddressesRequestV13.php | 28 + .../Requests/ModifyIpAddressRequestV10.php | 27 + .../Requests/PatchIpAddressRequestV13.php | 27 + .../Types/AddIpAddressRequestIpAddress.php | 101 + ...chIpAddressesRequestV13IpAddressesItem.php | 59 + .../ModifyIpAddressRequestV10IpAddress.php | 51 + .../PatchIpAddressRequestV13IpAddress.php | 51 + fern/sdk/src/Kubernetes/KubernetesClient.php | 1413 + .../CreateClusterAuthenticationRequest.php | 25 + ...reateKubernetesClusterNodeGroupRequest.php | 25 + ...KubernetesClusterOidcKubeconfigRequest.php | 24 + .../Requests/KubernetesClusterPatch.php | 44 + .../Requests/KubernetesNodeGroupPatch.php | 26 + .../SetClusterAuthenticationRequest.php | 25 + .../UpdateClusterAuthenticationRequest.php | 25 + .../UpgradeKubernetesClusterRequest.php | 25 + .../src/LoadBalancer/LoadBalancerClient.php | 4280 + .../CreateLoadBalancerBackendRequest.php | 25 + ...ateLoadBalancerBackendTlsConfigRequest.php | 25 + ...dBalancerCertificateBundleLabelRequest.php | 25 + .../CreateLoadBalancerFrontendRequest.php | 25 + ...teLoadBalancerFrontendTlsConfigRequest.php | 25 + .../CreateLoadBalancerIpAddressRequest.php | 25 + .../CreateLoadBalancerLabelRequest.php | 25 + .../CreateLoadBalancerMemberRequest.php | 32 + .../CreateLoadBalancerResolverRequest.php | 25 + .../CreateLoadBalancerRuleRequest.php | 25 + ...cerBackendCombinedMetricsSeriesRequest.php | 25 + ...oadBalancerBackendMetricsSeriesRequest.php | 25 + ...erFrontendCombinedMetricsSeriesRequest.php | 25 + ...adBalancerFrontendMetricsSeriesRequest.php | 25 + ...ncerMemberCombinedMetricsSeriesRequest.php | 25 + ...LoadBalancerMemberMetricsSeriesRequest.php | 25 + ...tLoadBalancerCertificateBundlesRequest.php | 38 + .../Requests/ListLoadBalancerPlansRequest.php | 31 + .../Requests/ListLoadBalancersRequest.php | 46 + .../Requests/LoadBalancerBackendModify.php | 70 + .../Requests/LoadBalancerFrontendModify.php | 88 + .../Requests/LoadBalancerNetworkModify.php | 26 + .../Requests/LoadBalancerResolverModify.php | 75 + .../Requests/LoadBalancerRuleModify.php | 137 + .../Requests/LoadBalancerServiceCreate.php | 131 + .../Requests/LoadBalancerServiceModify.php | 106 + .../Requests/LoadBalancerServiceReplace.php | 106 + ...ifyLoadBalancerBackendTlsConfigRequest.php | 25 + ...dBalancerCertificateBundleLabelRequest.php | 25 + ...fyLoadBalancerCertificateBundleRequest.php | 35 + ...fyLoadBalancerFrontendTlsConfigRequest.php | 25 + .../ModifyLoadBalancerLabelRequest.php | 25 + .../ModifyLoadBalancerMemberRequest.php | 32 + .../ReplaceLoadBalancerRuleRequest.php | 25 + fern/sdk/src/Network/NetworkClient.php | 560 + .../Network/Requests/CreateNetworkRequest.php | 27 + .../Network/Requests/ListNetworksRequest.php | 25 + .../Network/Requests/ModifyNetworkRequest.php | 27 + .../NetworkCreateInterfaceRequest.php | 35 + .../Types/CreateNetworkRequestNetwork.php | 76 + .../CreateNetworkRequestNetworkIpNetworks.php | 35 + ...kRequestNetworkIpNetworksIpNetworkItem.php | 101 + ...ksIpNetworkItemDhcpRoutesConfiguration.php | 34 + ...igurationEffectiveRoutesAutoPopulation.php | 60 + .../Types/ModifyNetworkRequestNetwork.php | 118 + .../ModifyNetworkRequestNetworkIpNetworks.php | 35 + ...kRequestNetworkIpNetworksIpNetworkItem.php | 92 + ...NetworkCreateInterfaceRequestInterface.php | 69 + ...ateInterfaceRequestInterfaceLabelsItem.php | 51 + .../NetworkPeering/NetworkPeeringClient.php | 360 + .../Requests/ListNetworkPeeringsRequest.php | 45 + .../Requests/NetworkPeeringCreate.php | 53 + .../Requests/NetworkPeeringModify.php | 35 + .../NetworkPeeringCreateConfiguredStatus.php | 9 + .../Types/NetworkPeeringCreateNetwork.php | 37 + .../Types/NetworkPeeringCreatePeerNetwork.php | 37 + .../NetworkPeeringModifyConfiguredStatus.php | 9 + .../ObjectStorage2/ObjectStorage2Client.php | 5354 ++ ...AttachObjectStorageCustomDomainRequest.php | 25 + ...tachObjectStorageIamGroupPolicyRequest.php | 25 + ...AttachObjectStoragePolicyToRoleRequest.php | 25 + .../AttachObjectStorageUserPolicyRequest.php | 25 + ...eObjectStorageGroupInlinePolicyRequest.php | 25 + .../CreateObjectStorageLabelRequest.php | 25 + .../CreateObjectStorageNetworkRequest.php | 25 + ...teObjectStorageRoleInlinePolicyRequest.php | 25 + ...tStorageRolePermissionsBoundaryRequest.php | 25 + ...reateObjectStorageStaticWebsiteRequest.php | 25 + ...teObjectStorageUserInlinePolicyRequest.php | 25 + ...tStorageUserPermissionsBoundaryRequest.php | 25 + .../Requests/DeleteObjectStorageRequest.php | 24 + .../ListObjectStorageBucketMetricsRequest.php | 31 + .../ListObjectStorageMetricsSeriesRequest.php | 61 + .../Requests/ListObjectStoragesRequest.php | 39 + .../ObjectStorage2AccessKeyModify.php | 27 + .../ObjectStorage2AssumeRolePolicyRequest.php | 26 + .../Requests/ObjectStorage2BucketCreate.php | 26 + .../ObjectStorage2CustomDomainModify.php | 35 + .../Requests/ObjectStorage2GroupCreate.php | 26 + .../Requests/ObjectStorage2LabelModify.php | 34 + .../Requests/ObjectStorage2PolicyCreate.php | 42 + .../ObjectStorage2PolicySetDefaultVersion.php | 26 + .../ObjectStorage2PolicyVersionCreate.php | 34 + .../Requests/ObjectStorage2RoleCreate.php | 68 + .../Requests/ObjectStorage2RoleUpdate.php | 34 + .../Requests/ObjectStorage2ServiceCreate.php | 88 + .../Requests/ObjectStorage2ServiceModify.php | 89 + .../Requests/ObjectStorage2ServiceReplace.php | 89 + ...bjectStorage2StaticWebsiteConfigModify.php | 67 + .../Requests/ObjectStorage2UserCreate.php | 26 + .../ReplaceObjectStorageRoleTagsRequest.php | 25 + .../ReplaceObjectStorageUserTagsRequest.php | 25 + .../ObjectStorage2AccessKeyModifyStatus.php | 9 + .../ObjectStorage2CustomDomainModifyType.php | 9 + fern/sdk/src/Partner/PartnerClient.php | 164 + .../Partner/Requests/PartnerCreateAccount.php | 43 + .../PartnerCreateAccountContactDetails.php | 114 + fern/sdk/src/Permission/PermissionClient.php | 387 + .../Requests/GrantPermissionRequest.php | 32 + .../RevokeAllPermissionsByTargetRequest.php | 24 + fern/sdk/src/Plan/PlanClient.php | 108 + fern/sdk/src/Price/PriceClient.php | 113 + .../src/Price/Requests/GetPriceRequest.php | 24 + .../Router/Requests/ListRoutersRequest.php | 25 + fern/sdk/src/Router/Requests/RouterCreate.php | 27 + fern/sdk/src/Router/Requests/RouterModify.php | 27 + fern/sdk/src/Router/RouterClient.php | 344 + .../src/Router/Types/RouterCreateRouter.php | 52 + .../RouterCreateRouterStaticRoutesItem.php | 56 + ...CreateRouterStaticRoutesItemNexthopOne.php | 8 + .../src/Router/Types/RouterModifyRouter.php | 52 + .../RouterModifyRouterStaticRoutesItem.php | 56 + ...ModifyRouterStaticRoutesItemNexthopOne.php | 8 + fern/sdk/src/Server/Requests/CreateServer.php | 27 + .../Server/Requests/DeleteServerRequest.php | 33 + .../Server/Requests/ListServersRequest.php | 97 + fern/sdk/src/Server/Requests/ModifyServer.php | 27 + .../src/Server/Requests/RelocateServer.php | 26 + .../sdk/src/Server/Requests/RestartServer.php | 34 + .../Server/Requests/ServerAddInterface.php | 27 + .../Server/Requests/ServerAddIpAddress.php | 35 + .../ServerAttachPrivateFirewallRuleset.php | 27 + .../Server/Requests/ServerAttachStorage.php | 27 + .../Requests/ServerCreateFirewallRule.php | 27 + .../ServerDetachPrivateFirewallRuleset.php | 27 + .../Server/Requests/ServerDetachStorage.php | 26 + .../src/Server/Requests/ServerLoadCdrom.php | 27 + .../Server/Requests/ServerModifyInterface.php | 27 + .../sdk/src/Server/Requests/ServerRebuild.php | 27 + .../Requests/ServerUpdateFirewallRules.php | 27 + fern/sdk/src/Server/Requests/StartServer.php | 27 + fern/sdk/src/Server/Requests/StopServer.php | 27 + fern/sdk/src/Server/ServerClient.php | 2422 + .../src/Server/Types/CreateServerServer.php | 261 + .../Types/DeleteServerRequestBackups.php | 10 + .../Types/GetDiskStatsByPeriodRequestType.php | 9 + .../Server/Types/GetDiskStatsRequestType.php | 9 + .../Types/ListServersRequestOrderBy.php | 9 + .../Server/Types/ListServersRequestSortBy.php | 13 + .../Server/Types/ListServersRequestState.php | 11 + .../src/Server/Types/ModifyServerServer.php | 208 + ...erFirewallPrivateDefaultIncomingAction.php | 9 + ...erFirewallPrivateDefaultOutgoingAction.php | 9 + ...verFirewallPublicDefaultIncomingAction.php | 9 + ...verFirewallPublicDefaultOutgoingAction.php | 9 + .../RestartServerRestartServerStopType.php | 34 + ...artServerRestartServerStopTypeStopType.php | 8 + .../Types/ServerAddInterfaceInterface.php | 76 + ...ServerAddInterfaceInterfaceIpAddresses.php | 38 + ...rfaceInterfaceIpAddressesIpAddressItem.php | 61 + .../Types/ServerAddIpAddressIpAddress.php | 43 + ...hPrivateFirewallRulesetFirewallRuleset.php | 37 + .../ServerAttachStorageStorageDevice.php | 61 + .../ServerAttachStorageStorageDeviceType.php | 9 + .../ServerCreateFirewallRuleFirewallRule.php | 149 + ...erCreateFirewallRuleFirewallRuleAction.php | 9 + ...reateFirewallRuleFirewallRuleDirection.php | 9 + ...erCreateFirewallRuleFirewallRuleFamily.php | 9 + ...CreateFirewallRuleFirewallRuleProtocol.php | 10 + ...hPrivateFirewallRulesetFirewallRuleset.php | 37 + .../Types/ServerLoadCdromStorageDevice.php | 37 + .../Types/ServerModifyInterfaceInterface.php | 59 + ...verModifyInterfaceInterfaceIpAddresses.php | 38 + ...rfaceInterfaceIpAddressesIpAddressItem.php | 52 + .../Types/ServerRebuildServerRebuild.php | 91 + .../ServerRebuildServerRebuildLoginUser.php | 51 + ...erRebuildServerRebuildLoginUserSshKeys.php | 35 + ...erRebuildServerRebuildPasswordDelivery.php | 10 + ...ServerUpdateFirewallRulesFirewallRules.php | 36 + .../src/Server/Types/StartServerServer.php | 58 + .../Types/StartServerServerStartType.php | 9 + .../src/Server/Types/StopServerStopServer.php | 50 + .../Types/StopServerStopServerStopType.php | 9 + .../Requests/ListServerGroupsRequest.php | 25 + .../Requests/ModifyServerGroupRequest.php | 25 + .../Requests/ServerGroupServerAdd.php | 27 + .../sdk/src/ServerGroup/ServerGroupClient.php | 497 + .../Types/ServerGroupServerAddServer.php | 34 + fern/sdk/src/ServerSize/ServerSizeClient.php | 161 + .../Storage/Requests/AttachStorageRequest.php | 27 + .../Storage/Requests/CloneStorageRequest.php | 27 + .../Requests/CreateStorageBackupRequest.php | 27 + .../Requests/CreateStorageImportRequest.php | 27 + .../Storage/Requests/CreateStorageRequest.php | 27 + .../Requests/CreateStorageTemplateRequest.php | 27 + .../Storage/Requests/DeleteStorageRequest.php | 25 + .../GetStorageListByBackupRequest.php | 61 + .../Requests/GetStorageListByCdromRequest.php | 61 + .../GetStorageListByNormalRequest.php | 61 + .../GetStorageListByPrivateAccessRequest.php | 61 + .../GetStorageListByPublicAccessRequest.php | 61 + .../GetStorageListByTemplateRequest.php | 61 + .../GetStorageListByTypeAndAccessRequest.php | 61 + .../Requests/GetStorageListRequest.php | 61 + .../Storage/Requests/ModifyStorageBody.php | 27 + fern/sdk/src/Storage/StorageClient.php | 1669 + .../AttachStorageRequestStorageDevice.php | 61 + ...achStorageRequestStorageDeviceBootDisk.php | 9 + .../AttachStorageRequestStorageDeviceType.php | 9 + .../Types/CloneStorageRequestStorage.php | 63 + .../CreateStorageBackupRequestStorage.php | 37 + ...reateStorageImportRequestStorageImport.php | 45 + ...torageImportRequestStorageImportSource.php | 9 + .../Types/CreateStorageRequestStorage.php | 103 + .../CreateStorageTemplateRequestStorage.php | 37 + .../Types/DeleteStorageRequestBackups.php | 10 + .../Types/ModifyStorageBodyStorage.php | 85 + ...difyStorageBodyStorageFilesystemResize.php | 9 + .../sdk/src/Tag/Requests/ModifyTagRequest.php | 25 + fern/sdk/src/Tag/TagClient.php | 327 + fern/sdk/src/Timezone/TimezoneClient.php | 106 + .../DatabaseServiceTaskBaseResponse.php | 85 + .../LoadBalancerAvgTimeMetricsResponse.php | 40 + .../LoadBalancerCommonMetricsResponse.php | 96 + .../Traits/LoadBalancerMatchIntResponse.php | 41 + .../LoadBalancerMatchStringResponse.php | 34 + .../LoadBalancerRequestMetricsResponse.php | 33 + .../LoadBalancerServerMetricsResponse.php | 75 + .../Traits/ServerFirewallRuleRequirements.php | 9 + fern/sdk/src/Types/Account.php | 37 + fern/sdk/src/Types/AccountBillingSummary.php | 45 + .../Types/AccountBillingSummaryResponse.php | 37 + fern/sdk/src/Types/AccountBooleanYesno.php | 9 + .../AccountCreateMsLmaSigningLinkResponse.php | 37 + ...eMsLmaSigningLinkResponseSigningStatus.php | 68 + ...aSigningLinkResponseSigningStatusState.php | 11 + .../sdk/src/Types/AccountCreditsBreakdown.php | 53 + .../AccountCreditsBreakdownAccountCredits.php | 53 + ...ountCreditsBreakdownAccountFreeCredits.php | 38 + ...eakdownAccountFreeCreditsBreakdownItem.php | 52 + .../src/Types/AccountCurrentNetworkUsage.php | 37 + .../Types/AccountCurrentNetworkUsageStats.php | 34 + ...ntNetworkUsageStatsCurrentNetworkUsage.php | 68 + fern/sdk/src/Types/AccountDetails.php | 69 + fern/sdk/src/Types/AccountError.php | 37 + fern/sdk/src/Types/AccountErrorError.php | 42 + fern/sdk/src/Types/AccountLabel.php | 45 + fern/sdk/src/Types/AccountNetworkUsage.php | 37 + .../src/Types/AccountNetworkUsageStats.php | 35 + .../AccountNetworkUsageStatsStatItem.php | 76 + .../AccountResourceBillingSummaryResponse.php | 37 + ...tResourceBillingSummaryResponseBilling.php | 59 + fern/sdk/src/Types/AccountResourceLimits.php | 277 + .../src/Types/AccountResourceNetworkUsage.php | 37 + .../AccountResourceNetworkUsageStats.php | 35 + ...countResourceNetworkUsageStatsStatItem.php | 68 + .../Types/AccountResourceNetworkUsageType.php | 18 + ...countTokensCreateTokenRequestExpiresAt.php | 34 + ...countTokensCreateTokenRequestExpiresIn.php | 34 + .../Types/AccountTokensGetTokenResponse.php | 96 + fern/sdk/src/Types/AccountTokensProblem.php | 78 + .../sdk/src/Types/AccountTokensProblem400.php | 78 + ...countTokensProblem400InvalidParamsItem.php | 42 + .../src/Types/AccountTokensProblem400Type.php | 8 + .../sdk/src/Types/AccountTokensProblem401.php | 78 + ...countTokensProblem401InvalidParamsItem.php | 42 + .../src/Types/AccountTokensProblem401Type.php | 8 + .../sdk/src/Types/AccountTokensProblem403.php | 78 + ...countTokensProblem403InvalidParamsItem.php | 42 + .../src/Types/AccountTokensProblem403Type.php | 8 + .../sdk/src/Types/AccountTokensProblem404.php | 78 + ...countTokensProblem404InvalidParamsItem.php | 42 + .../src/Types/AccountTokensProblem404Type.php | 8 + .../sdk/src/Types/AccountTokensProblem409.php | 78 + ...countTokensProblem409InvalidParamsItem.php | 42 + .../src/Types/AccountTokensProblem409Type.php | 8 + .../AccountTokensProblemInvalidParamsItem.php | 42 + fern/sdk/src/Types/AccountTokensToken.php | 96 + .../Types/AccountUsageAccumulateParameter.php | 9 + fern/sdk/src/Types/Accounts.php | 37 + fern/sdk/src/Types/AccountsAccounts.php | 35 + .../src/Types/AccountsAccountsAccountItem.php | 59 + .../AccountsAccountsAccountItemRoles.php | 35 + .../Types/AccountsAccountsAccountItemType.php | 9 + fern/sdk/src/Types/AttachStorageResponse.php | 37 + .../Types/AuditLogsActionsParameterItem.php | 25 + fern/sdk/src/Types/AuditLogsAuditLog.php | 136 + .../sdk/src/Types/AuditLogsAuditLogAction.php | 25 + .../sdk/src/Types/AuditLogsAuditLogOrigin.php | 10 + .../Types/AuditLogsAuditLogResourceType.php | 19 + fern/sdk/src/Types/AuditLogsErrorResponse.php | 78 + ...uditLogsErrorResponseInvalidParamsItem.php | 42 + .../Types/AuditLogsFilterOptionsResponse.php | 54 + ...itLogsFilterOptionsResponseActionsItem.php | 25 + ...itLogsFilterOptionsResponseOriginsItem.php | 10 + ...FilterOptionsResponseResourceTypesItem.php | 19 + .../src/Types/AuditLogsFormatParameter.php | 9 + .../Types/AuditLogsOriginsParameterItem.php | 10 + .../AuditLogsResourceTypesParameterItem.php | 19 + fern/sdk/src/Types/AuditLogsResponse.php | 38 + fern/sdk/src/Types/CreateServerResponse.php | 37 + .../src/Types/CreateStorageBackupResponse.php | 37 + fern/sdk/src/Types/CreateStorageResponse.php | 37 + .../Types/CreateStorageTemplateResponse.php | 37 + fern/sdk/src/Types/CurrencyCurrencies.php | 37 + .../Types/CurrencyCurrenciesCurrencies.php | 38 + ...rrencyCurrenciesCurrenciesCurrencyItem.php | 52 + fern/sdk/src/Types/CurrencyError.php | 37 + fern/sdk/src/Types/CurrencyErrorError.php | 42 + .../DatabaseAccessControlSettingsResponse.php | 45 + .../src/Types/DatabaseAccountCaResponse.php | 37 + fern/sdk/src/Types/DatabaseAclResponse.php | 61 + ...atabaseAvailableExtensionsResponseItem.php | 51 + ...DatabaseBackupConfigOpenSearchResponse.php | 69 + .../Types/DatabaseBackupConfigResponse.php | 53 + fern/sdk/src/Types/DatabaseBackupResponse.php | 55 + .../Types/DatabaseConnectionPoolResponse.php | 77 + .../Types/DatabaseCurrentSessionsResponse.php | 62 + .../src/Types/DatabaseDependencyResponse.php | 38 + fern/sdk/src/Types/DatabaseErrorResponse.php | 37 + .../src/Types/DatabaseErrorResponseError.php | 42 + fern/sdk/src/Types/DatabaseIndexResponse.php | 103 + .../src/Types/DatabaseIntegrationEndpoint.php | 10 + .../DatabaseIntegrationEndpointResponse.php | 62 + .../DatabaseIntegrationNodeStateResponse.php | 62 + fern/sdk/src/Types/DatabaseLabelCreate.php | 45 + .../DatabaseLabelInformationResponse.php | 45 + fern/sdk/src/Types/DatabaseLabelResponse.php | 45 + .../src/Types/DatabaseLogEntryResponse.php | 63 + .../sdk/src/Types/DatabaseLogListResponse.php | 54 + fern/sdk/src/Types/DatabaseMaintenanceDow.php | 14 + ...abaseMaintenancePendingUpdatesResponse.php | 63 + .../DatabaseMaintenanceWindowResponse.php | 54 + .../DatabaseMetricsColumnHeaderResponse.php | 45 + .../src/Types/DatabaseMetricsDataResponse.php | 46 + .../src/Types/DatabaseMetricsItemResponse.php | 45 + .../DatabaseMetricsItemResponseHints.php | 37 + ...DatabaseMigrationStatusDetailsResponse.php | 61 + .../DatabaseMysqlCurrentSessionResponse.php | 93 + fern/sdk/src/Types/DatabaseNetworkCreate.php | 61 + fern/sdk/src/Types/DatabaseNetworkFamily.php | 9 + ...abaseNetworkInformationDetailsResponse.php | 79 + ...etworkInformationDetailsResponseFamily.php | 9 + ...eNetworkInformationDetailsResponseType.php | 9 + fern/sdk/src/Types/DatabaseNetworkType.php | 8 + .../DatabaseNodeProgressUpdateResponse.php | 77 + .../src/Types/DatabaseNodeStateResponse.php | 62 + ...atabaseOpenSearchAccessControlResponse.php | 38 + ...aseOpenSearchAccessControlRuleResponse.php | 45 + ...OpenSearchSecurityPluginStatusResponse.php | 53 + .../Types/DatabasePeeringStatusResponse.php | 71 + .../Types/DatabasePgAccessControlResponse.php | 37 + ...abasePgAvailableExtensionsResponseItem.php | 43 + ...leExtensionsResponseItemExtensionsItem.php | 51 + .../DatabasePgCurrentSessionResponse.php | 199 + .../Types/DatabasePlanComponentsResponse.php | 53 + .../DatabasePlanComponentsResponseBackups.php | 61 + ...ePlanComponentsResponseBackupsFrequent.php | 45 + ...lanComponentsResponseBackupsInfrequent.php | 45 + ...abasePlanComponentsResponseBackupsName.php | 10 + .../DatabasePlanComponentsResponseCompute.php | 69 + ...asePlanComponentsResponseComputeFamily.php | 10 + .../DatabasePlanComponentsResponseStorage.php | 61 + fern/sdk/src/Types/DatabasePlansResponse.php | 38 + .../DatabasePlansResponseServiceTypesItem.php | 83 + ...esponseServiceTypesItemBackupTiersItem.php | 10 + ...ponseServiceTypesItemComputeShapesItem.php | 91 + ...eTypesItemComputeShapesItemBackupsItem.php | 10 + ...erviceTypesItemComputeShapesItemFamily.php | 10 + ...rviceTypesItemComputeShapesItemStorage.php | 62 + ...temComputeShapesItemStorageOptionsItem.php | 42 + ...abasePlansResponseServiceTypesItemType.php | 9 + .../Types/DatabaseProjectAlertResponse.php | 79 + .../Types/DatabasePropertySchemaResponse.php | 198 + fern/sdk/src/Types/DatabaseQueryParamSort.php | 11 + .../DatabaseQueryStatisticsMysqlResponse.php | 311 + .../DatabaseQueryStatisticsPgResponse.php | 205 + .../Types/DatabaseQueryStatisticsResponse.php | 46 + .../DatabaseRedisAccessControlResponse.php | 62 + ...abaseRedisValkeyCurrentSessionResponse.php | 166 + .../Types/DatabaseServiceAlertResponse.php | 63 + .../src/Types/DatabaseServiceCloneMysql.php | 168 + .../DatabaseServiceCloneMysqlMaintenance.php | 45 + .../DatabaseServiceCloneMysqlPlanBackups.php | 10 + .../Types/DatabaseServiceCloneOpensearch.php | 168 + ...abaseServiceCloneOpensearchMaintenance.php | 45 + ...abaseServiceCloneOpensearchPlanBackups.php | 10 + fern/sdk/src/Types/DatabaseServiceClonePg.php | 168 + .../DatabaseServiceClonePgMaintenance.php | 45 + .../DatabaseServiceClonePgPlanBackups.php | 10 + .../src/Types/DatabaseServiceCloneRedis.php | 160 + .../DatabaseServiceCloneRedisMaintenance.php | 45 + .../DatabaseServiceCloneRedisPlanBackups.php | 10 + .../src/Types/DatabaseServiceCloneValkey.php | 160 + .../DatabaseServiceCloneValkeyMaintenance.php | 45 + .../DatabaseServiceCloneValkeyPlanBackups.php | 10 + .../DatabaseServiceComponentResponse.php | 77 + .../DatabaseServiceInformationResponse.php | 272 + .../src/Types/DatabaseServiceIntegration.php | 10 + .../DatabaseServiceIntegrationCreate.php | 54 + .../DatabaseServiceIntegrationResponse.php | 110 + ...DatabaseServiceMigrationStatusResponse.php | 78 + .../DatabaseServiceNetworkDetailsResponse.php | 64 + .../src/Types/DatabaseServicePlanResponse.php | 133 + .../DatabaseServicePlanResponseZones.php | 35 + .../Types/DatabaseServicePropertiesMysql.php | 574 + ...ertiesMysqlInternalTmpMemStorageEngine.php | 9 + ...atabaseServicePropertiesMysqlLogOutput.php | 11 + ...atabaseServicePropertiesMysqlMigration.php | 114 + ...ervicePropertiesMysqlMigrationDumpTool.php | 9 + ...eServicePropertiesMysqlMigrationMethod.php | 9 + ...ePropertiesMysqlMysqlIncrementalBackup.php | 42 + .../DatabaseServicePropertiesMysqlVersion.php | 8 + .../DatabaseServicePropertiesOpensearch.php | 685 + ...opertiesOpensearchAuthFailureListeners.php | 34 + ...sInternalAuthenticationBackendLimiting.php | 82 + ...onBackendLimitingAuthenticationBackend.php | 8 + ...ernalAuthenticationBackendLimitingType.php | 8 + ...PropertiesOpensearchClusterRemoteStore.php | 58 + ...sOpensearchClusterSearchRequestSlowlog.php | 42 + ...searchClusterSearchRequestSlowlogLevel.php | 11 + ...chClusterSearchRequestSlowlogThreshold.php | 58 + ...ropertiesOpensearchCustomKeystoresItem.php | 59 + ...chCustomKeystoresItemSettingsAccessKey.php | 42 + ...archCustomKeystoresItemSettingsAccount.php | 50 + ...CustomKeystoresItemSettingsCredentials.php | 34 + ...oresItemSettingsCredentialsCredentials.php | 130 + ...rtiesOpensearchCustomKeystoresItemType.php | 10 + ...icePropertiesOpensearchCustomReposItem.php | 59 + ...searchCustomReposItemSettingsAccessKey.php | 122 + ...ensearchCustomReposItemSettingsAccount.php | 114 + ...archCustomReposItemSettingsCredentials.php | 90 + ...eposItemSettingsCredentialsCredentials.php | 130 + ...ropertiesOpensearchCustomReposItemType.php | 10 + ...vicePropertiesOpensearchDiskWatermarks.php | 50 + ...opertiesOpensearchElasticsearchVersion.php | 12 + ...ePropertiesOpensearchIndexPatternsItem.php | 53 + ...earchIndexPatternsItemSortingAlgorithm.php | 9 + ...ServicePropertiesOpensearchIndexRollup.php | 66 + ...rvicePropertiesOpensearchIndexTemplate.php | 50 + ...DatabaseServicePropertiesOpensearchJwt.php | 98 + ...abaseServicePropertiesOpensearchOpenid.php | 122 + ...opertiesOpensearchOpensearchDashboards.php | 74 + ...ServicePropertiesOpensearchRemoteStore.php | 58 + ...atabaseServicePropertiesOpensearchSaml.php | 82 + ...PropertiesOpensearchSearchBackpressure.php | 58 + ...ertiesOpensearchSearchBackpressureMode.php | 10 + ...OpensearchSearchBackpressureNodeDuress.php | 50 + ...earchSearchBackpressureSearchShardTask.php | 98 + ...OpensearchSearchBackpressureSearchTask.php | 98 + ...tiesOpensearchSearchInsightsTopQueries.php | 50 + ...sOpensearchSearchInsightsTopQueriesCpu.php | 50 + ...nsearchSearchInsightsTopQueriesLatency.php | 50 + ...ensearchSearchInsightsTopQueriesMemory.php | 50 + ...abaseServicePropertiesOpensearchSegrep.php | 58 + ...pertiesOpensearchShardIndexingPressure.php | 65 + ...chShardIndexingPressureOperatingFactor.php | 65 + ...hShardIndexingPressurePrimaryParameter.php | 42 + ...rdIndexingPressurePrimaryParameterNode.php | 38 + ...dIndexingPressurePrimaryParameterShard.php | 38 + ...baseServicePropertiesOpensearchVersion.php | 10 + .../src/Types/DatabaseServicePropertiesPg.php | 702 + ...icePropertiesPgDefaultToastCompression.php | 9 + .../DatabaseServicePropertiesPgIoMethod.php | 10 + ...seServicePropertiesPgLogErrorVerbosity.php | 10 + ...tabaseServicePropertiesPgLogLinePrefix.php | 11 + .../DatabaseServicePropertiesPgMigration.php | 98 + ...baseServicePropertiesPgMigrationMethod.php | 9 + ...eServicePropertiesPgPasswordEncryption.php | 9 + ...aseServicePropertiesPgPgStatPlansTrack.php | 10 + ...rvicePropertiesPgPgStatStatementsTrack.php | 10 + .../DatabaseServicePropertiesPgPgaudit.php | 160 + ...abaseServicePropertiesPgPgauditLogItem.php | 15 + ...baseServicePropertiesPgPgauditLogLevel.php | 16 + .../DatabaseServicePropertiesPgPgbouncer.php | 126 + ...icePropertiesPgPgbouncerAutodbPoolMode.php | 10 + ...PgPgbouncerIgnoreStartupParametersItem.php | 9 + .../DatabaseServicePropertiesPgPglookout.php | 37 + ...seServicePropertiesPgSynchronousCommit.php | 12 + ...vicePropertiesPgSynchronousReplication.php | 9 + ...DatabaseServicePropertiesPgTimescaledb.php | 37 + ...ervicePropertiesPgTrackCommitTimestamp.php | 9 + ...abaseServicePropertiesPgTrackFunctions.php | 10 + ...tabaseServicePropertiesPgTrackIoTiming.php | 9 + .../DatabaseServicePropertiesPgVariant.php | 9 + .../DatabaseServicePropertiesPgVersion.php | 11 + .../Types/DatabaseServicePropertiesRedis.php | 190 + ...atabaseServicePropertiesRedisMigration.php | 98 + ...eServicePropertiesRedisMigrationMethod.php | 9 + ...PropertiesRedisRedisAclChannelsDefault.php | 9 + ...icePropertiesRedisRedisMaxmemoryPolicy.php | 15 + ...ServicePropertiesRedisRedisPersistence.php | 9 + ...baseServicePropertiesRedisRedisVersion.php | 8 + .../Types/DatabaseServicePropertiesValkey.php | 230 + ...tabaseServicePropertiesValkeyMigration.php | 98 + ...ServicePropertiesValkeyMigrationMethod.php | 9 + ...opertiesValkeyValkeyAclChannelsDefault.php | 9 + ...ePropertiesValkeyValkeyMaxmemoryPolicy.php | 15 + ...rvicePropertiesValkeyValkeyPersistence.php | 9 + ...seServicePropertiesValkeyValkeyVersion.php | 9 + .../Types/DatabaseServiceStatusResponse.php | 37 + .../Types/DatabaseServiceTaskBaseResponse.php | 112 + .../DatabaseServiceTaskDetailsResponse.php | 112 + .../src/Types/DatabaseServiceTaskResponse.php | 61 + fern/sdk/src/Types/DatabaseServiceType.php | 11 + .../src/Types/DatabaseServiceTypeResponse.php | 78 + .../src/Types/DatabaseUpCloudApiResponse.php | 46 + .../DatabaseUpCloudApiResponseErrorsItem.php | 50 + fern/sdk/src/Types/DatabaseUserResponse.php | 93 + .../DatabaseValkeyAccessControlResponse.php | 62 + .../Types/DatabaseVersionsResponseItem.php | 108 + ...atabaseVersionsResponseItemServiceType.php | 11 + .../DatabaseVersionsResponseItemState.php | 9 + .../src/Types/DatabaseZoneInfoResponse.php | 37 + fern/sdk/src/Types/DetachStorageResponse.php | 37 + fern/sdk/src/Types/DeviceError.php | 37 + fern/sdk/src/Types/DeviceErrorError.php | 42 + fern/sdk/src/Types/DevicesValue.php | 38 + .../src/Types/DevicesValueGpuPlansValue.php | 34 + fern/sdk/src/Types/Events.php | 37 + fern/sdk/src/Types/EventsError.php | 37 + fern/sdk/src/Types/EventsErrorError.php | 42 + fern/sdk/src/Types/EventsEventType.php | 14 + fern/sdk/src/Types/EventsEvents.php | 35 + fern/sdk/src/Types/EventsEventsEventItem.php | 76 + fern/sdk/src/Types/FileStorageAclCreate.php | 53 + .../Types/FileStorageAclDetailResponse.php | 53 + .../src/Types/FileStorageConfiguredStatus.php | 9 + .../src/Types/FileStorageErrorResponse.php | 70 + ...eStorageErrorResponseInvalidParamsItem.php | 42 + .../Types/FileStorageErrorResponseType.php | 11 + fern/sdk/src/Types/FileStorageLabelCreate.php | 45 + .../sdk/src/Types/FileStorageLabelDetails.php | 45 + .../src/Types/FileStorageNetworkCreate.php | 61 + .../FileStorageNetworkDetailResponse.php | 61 + .../src/Types/FileStorageNetworkFamily.php | 9 + fern/sdk/src/Types/FileStoragePermission.php | 9 + .../src/Types/FileStorageQueryParamSort.php | 8 + .../FileStorageServiceDetailResponse.php | 136 + ...ServiceDetailResponseStateMessagesItem.php | 50 + fern/sdk/src/Types/FileStorageShareCreate.php | 54 + .../Types/FileStorageShareDetailResponse.php | 54 + .../FileStorageShareDetailResponseAclItem.php | 50 + .../src/Types/FirewallRulesetCreateLabel.php | 45 + .../Types/FirewallRulesetDetailResponse.php | 120 + .../FirewallRulesetErrorLegacyResponse.php | 37 + ...irewallRulesetErrorLegacyResponseError.php | 45 + .../Types/FirewallRulesetErrorResponse.php | 70 + .../FirewallRulesetFirewallRuleCreate.php | 170 + ...irewallRulesetFirewallRuleListResponse.php | 38 + .../FirewallRulesetLabelDetailResponse.php | 45 + .../Types/FirewallRulesetRelatedServers.php | 38 + ...rewallRulesetRelatedServersServersItem.php | 83 + ...emFirewallPrivateDefaultIncomingAction.php | 9 + ...emFirewallPrivateDefaultOutgoingAction.php | 9 + .../src/Types/FirewallRulesetRuleAction.php | 9 + .../FirewallRulesetRuleDetailResponse.php | 181 + .../Types/FirewallRulesetRuleDirection.php | 9 + .../src/Types/FirewallRulesetRuleFamily.php | 10 + .../src/Types/FirewallRulesetRuleProtocol.php | 14 + ...allRulesetServerFirewallDetailResponse.php | 37 + .../FirewallRulesetServerFirewallRule.php | 194 + ...irewallRulesetServerFirewallRuleDetail.php | 37 + .../FirewallRulesetServerFirewallRules.php | 38 + fern/sdk/src/Types/GatewayAddress.php | 34 + .../src/Types/GatewayAddressCreateRequest.php | 45 + .../Types/GatewayAddressDetailsResponse.php | 53 + .../GatewayAuthenticationDetailsResponse.php | 37 + .../Types/GatewayConnectionCreateRequest.php | 78 + .../GatewayConnectionDetailsResponse.php | 96 + .../Types/GatewayConnectionModifyRequest.php | 78 + .../GatewayConnectionRouteDetailsResponse.php | 53 + .../Types/GatewayConnectionRouteRequest.php | 53 + .../src/Types/GatewayConnectionRouteType.php | 8 + fern/sdk/src/Types/GatewayConnectionType.php | 8 + fern/sdk/src/Types/GatewayErrorResponse.php | 70 + .../Types/GatewayIpsecAuthenticationType.php | 8 + .../src/Types/GatewayIpsecDetailsResponse.php | 126 + ...atewayIpsecIkeSaMetricsDetailsResponse.php | 176 + ...keSaMetricsDetailsResponseChildSasItem.php | 165 + ...etricsDetailsResponseChildSasItemState.php | 20 + ...SaMetricsDetailsResponseHeuristicState.php | 95 + ...eSaMetricsDetailsResponseInternalState.php | 18 + ...MetricsDetailsResponseOperationalState.php | 12 + .../GatewayIpsecMetricsDetailsResponse.php | 38 + .../src/Types/GatewayLabelCreateRequest.php | 45 + .../src/Types/GatewayLabelDetailsResponse.php | 45 + ...GatewayLocalPeerAddressDetailsResponse.php | 37 + .../Types/GatewayMetricsDetailsResponse.php | 79 + .../src/Types/GatewayPlanDetailsResponse.php | 86 + .../Types/GatewayQueryParamSortServices.php | 10 + ...atewayRemotePeerAddressDetailsResponse.php | 37 + .../src/Types/GatewayRouterCreateRequest.php | 37 + .../Types/GatewayRouterDetailsResponse.php | 55 + .../Types/GatewayServiceConfiguredStatus.php | 9 + .../Types/GatewayServiceDetailsResponse.php | 144 + fern/sdk/src/Types/GatewayServiceFeatures.php | 9 + ...GatewayServiceLogSessionCreateResponse.php | 38 + ...atewayServiceLogSessionDetailsResponse.php | 45 + .../Types/GatewayServiceLogSessionTypes.php | 8 + .../Types/GatewayServiceMetricsResponse.php | 46 + .../Types/GatewayServiceOperationalState.php | 24 + .../GatewaySupportedIntegrityAlgorithms.php | 13 + .../GatewaySupportedProposalAlgorithms.php | 16 + .../src/Types/GatewayTunnelCreateRequest.php | 85 + .../Types/GatewayTunnelCreateRequestIpsec.php | 126 + ...TunnelCreateRequestIpsecAuthentication.php | 45 + ...GatewayTunnelCreateRequestLocalAddress.php | 37 + ...atewayTunnelCreateRequestRemoteAddress.php | 37 + .../Types/GatewayTunnelDetailsResponse.php | 127 + ...GatewayTunnelInternalIpDetailsResponse.php | 45 + .../src/Types/GatewayTunnelModifyRequest.php | 85 + .../Types/GatewayTunnelModifyRequestIpsec.php | 126 + ...TunnelModifyRequestIpsecAuthentication.php | 45 + ...GatewayTunnelModifyRequestLocalAddress.php | 37 + ...atewayTunnelModifyRequestRemoteAddress.php | 37 + .../Types/GatewayTunnelOperationalState.php | 12 + fern/sdk/src/Types/GetServerList.php | 37 + fern/sdk/src/Types/GetServerListServers.php | 35 + fern/sdk/src/Types/IpAddressBooleanYesno.php | 9 + fern/sdk/src/Types/IpAddressDetails.php | 125 + fern/sdk/src/Types/IpAddressError.php | 37 + fern/sdk/src/Types/IpAddressErrorError.php | 42 + fern/sdk/src/Types/IpAddressIpFamily.php | 9 + .../src/Types/IpAddressIpReleasePolicy.php | 9 + fern/sdk/src/Types/IpAddressNetworkType.php | 10 + fern/sdk/src/Types/IpAddressRequest.php | 38 + fern/sdk/src/Types/IpAddressResponse.php | 37 + fern/sdk/src/Types/IpAddressesResponse.php | 37 + .../Types/IpAddressesResponseIpAddresses.php | 35 + fern/sdk/src/Types/KubernetesAccepted.php | 37 + .../KubernetesAuthenticationIssuerConfig.php | 99 + ...icationIssuerConfigAudienceMatchPolicy.php | 9 + .../sdk/src/Types/KubernetesClaimMappings.php | 62 + .../src/Types/KubernetesClaimOrExpression.php | 45 + .../Types/KubernetesClaimValidationRule.php | 61 + fern/sdk/src/Types/KubernetesCluster.php | 142 + .../KubernetesClusterAvailableUpgrades.php | 35 + ...KubernetesClusterAvailableUpgradesPost.php | 42 + .../src/Types/KubernetesClusterKubeconfig.php | 37 + fern/sdk/src/Types/KubernetesClusterPlan.php | 12 + fern/sdk/src/Types/KubernetesClusterState.php | 17 + .../KubernetesClusterUpgradeStrategy.php | 37 + .../KubernetesClusterUpgradeStrategyType.php | 9 + fern/sdk/src/Types/KubernetesEffect.php | 10 + fern/sdk/src/Types/KubernetesError.php | 69 + fern/sdk/src/Types/KubernetesExtraMapping.php | 45 + fern/sdk/src/Types/KubernetesKubeletArg.php | 45 + fern/sdk/src/Types/KubernetesLabel.php | 45 + fern/sdk/src/Types/KubernetesNode.php | 61 + fern/sdk/src/Types/KubernetesNodeGroup.php | 158 + .../KubernetesNodeGroupCloudNativePlan.php | 45 + .../Types/KubernetesNodeGroupCustomPlan.php | 61 + .../src/Types/KubernetesNodeGroupDetails.php | 166 + .../src/Types/KubernetesNodeGroupGpuPlan.php | 45 + .../src/Types/KubernetesNodeGroupState.php | 14 + fern/sdk/src/Types/KubernetesNodeState.php | 12 + fern/sdk/src/Types/KubernetesNodeUpdates.php | 53 + .../KubernetesNodeUpdatesScheduleDow.php | 15 + fern/sdk/src/Types/KubernetesPlan.php | 45 + .../KubernetesPrefixedClaimOrExpression.php | 53 + .../src/Types/KubernetesStorageEncryption.php | 9 + fern/sdk/src/Types/KubernetesStorageTier.php | 10 + fern/sdk/src/Types/KubernetesTaint.php | 53 + .../Types/KubernetesUserValidationRule.php | 45 + fern/sdk/src/Types/KubernetesVersion.php | 45 + ...BalancerActionCreateActionHttpRedirect.php | 49 + ...ncerActionCreateActionHttpRedirectType.php | 8 + ...adBalancerActionCreateActionHttpReturn.php | 42 + ...lancerActionCreateActionHttpReturnType.php | 8 + ...ancerActionCreateActionHttpRewritePath.php | 42 + ...rActionCreateActionHttpRewritePathType.php | 8 + ...lancerActionCreateActionHttpRewriteUri.php | 42 + ...erActionCreateActionHttpRewriteUriType.php | 8 + ...rActionCreateActionSetForwardedHeaders.php | 43 + ...ionCreateActionSetForwardedHeadersType.php | 8 + ...ncerActionCreateActionSetRequestHeader.php | 42 + ...ActionCreateActionSetRequestHeaderType.php | 8 + ...cerActionCreateActionSetResponseHeader.php | 42 + ...ctionCreateActionSetResponseHeaderType.php | 8 + ...oadBalancerActionCreateActionTcpReject.php | 43 + ...alancerActionCreateActionTcpRejectType.php | 8 + ...adBalancerActionCreateActionUseBackend.php | 42 + ...lancerActionCreateActionUseBackendType.php | 8 + ...lancerActionHttpRedirectCreateLocation.php | 42 + ...BalancerActionHttpRedirectCreateScheme.php | 42 + ...erActionHttpRedirectCreateSchemeScheme.php | 9 + ...LoadBalancerActionHttpRedirectResponse.php | 45 + .../LoadBalancerActionHttpReturnCreate.php | 53 + .../LoadBalancerActionHttpReturnResponse.php | 53 + ...oadBalancerActionHttpRewritePathCreate.php | 45 + ...dBalancerActionHttpRewritePathResponse.php | 45 + ...LoadBalancerActionHttpRewriteUriCreate.php | 45 + ...adBalancerActionHttpRewriteUriResponse.php | 45 + .../src/Types/LoadBalancerActionResponse.php | 110 + .../Types/LoadBalancerActionResponseType.php | 16 + .../LoadBalancerActionSetHeaderCreate.php | 45 + .../LoadBalancerActionSetHeaderResponse.php | 45 + .../LoadBalancerActionUseBackendCreate.php | 37 + .../LoadBalancerActionUseBackendResponse.php | 37 + .../LoadBalancerAvgTimeMetricsResponse.php | 61 + fern/sdk/src/Types/LoadBalancerBackend.php | 88 + .../src/Types/LoadBalancerBackendCreate.php | 77 + .../LoadBalancerBackendMetricsResponse.php | 153 + .../LoadBalancerBackendMetricsSeries.php | 208 + .../LoadBalancerBackendPropertiesCreate.php | 165 + .../LoadBalancerBackendPropertiesResponse.php | 173 + .../Types/LoadBalancerCertificateBundle.php | 152 + ...lancerCertificateBundleAuthorityModify.php | 54 + ...ncerCertificateBundleCreateCertificate.php | 34 + ...CertificateBundleCreateCertificateType.php | 8 + ...oadBalancerCertificateBundleCreateType.php | 34 + ...alancerCertificateBundleCreateTypeType.php | 8 + ...oadBalancerCertificateBundleCreateZero.php | 34 + ...alancerCertificateBundleCreateZeroType.php | 8 + ...BalancerCertificateBundleDynamicModify.php | 62 + .../LoadBalancerCertificateBundleKeyType.php | 9 + ...dBalancerCertificateBundleManualModify.php | 70 + ...ancerCertificateBundleOperationalState.php | 12 + .../LoadBalancerCertificateBundleTlsType.php | 10 + .../LoadBalancerChallengeProblemResponse.php | 45 + .../src/Types/LoadBalancerChecksOnDown.php | 9 + .../LoadBalancerCommonMetricsResponse.php | 125 + .../src/Types/LoadBalancerContentTypes.php | 11 + ...LoadBalancerDnsChallengeDomainResponse.php | 37 + .../LoadBalancerEmbeddedBackendResponse.php | 46 + .../LoadBalancerEmbeddedFrontendResponse.php | 46 + .../LoadBalancerEmbeddedServiceResponse.php | 70 + .../src/Types/LoadBalancerErrorResponse.php | 37 + .../Types/LoadBalancerErrorResponseError.php | 45 + fern/sdk/src/Types/LoadBalancerFrontend.php | 112 + .../src/Types/LoadBalancerFrontendCreate.php | 94 + .../LoadBalancerFrontendMetricsResponse.php | 130 + .../LoadBalancerFrontendMetricsSeries.php | 184 + .../src/Types/LoadBalancerFrontendMode.php | 9 + .../LoadBalancerFrontendNetworkCreate.php | 37 + .../LoadBalancerFrontendNetworksItem.php | 34 + .../LoadBalancerFrontendPropertiesCreate.php | 53 + ...LoadBalancerFrontendPropertiesResponse.php | 61 + .../src/Types/LoadBalancerHealthCheckType.php | 9 + .../sdk/src/Types/LoadBalancerHttpMethods.php | 16 + fern/sdk/src/Types/LoadBalancerIpAddress.php | 63 + .../src/Types/LoadBalancerIpAddressCreate.php | 45 + .../sdk/src/Types/LoadBalancerLabelCreate.php | 45 + .../sdk/src/Types/LoadBalancerLabelModify.php | 45 + .../src/Types/LoadBalancerLabelResponse.php | 45 + .../LoadBalancerMaintenanceDayOfWeek.php | 14 + .../LoadBalancerMatchBackendResponse.php | 48 + .../Types/LoadBalancerMatchIntResponse.php | 61 + .../LoadBalancerMatchIntResponseMethod.php | 12 + .../src/Types/LoadBalancerMatchIpResponse.php | 37 + .../Types/LoadBalancerMatchStringResponse.php | 53 + .../LoadBalancerMatchStringResponseMethod.php | 12 + ...LoadBalancerMatchStringWithArgResponse.php | 46 + ...adBalancerMatcherBackendCreateRangeEnd.php | 26 + .../LoadBalancerMatcherCreateInverse.php | 50 + .../LoadBalancerMatcherCreateInverseType.php | 8 + ...LoadBalancerMatcherCreateMatchBodySize.php | 50 + ...BalancerMatcherCreateMatchBodySizeType.php | 8 + .../LoadBalancerMatcherCreateMatchCookie.php | 57 + ...adBalancerMatcherCreateMatchCookieType.php | 8 + .../LoadBalancerMatcherCreateMatchHeader.php | 57 + ...adBalancerMatcherCreateMatchHeaderType.php | 8 + .../LoadBalancerMatcherCreateMatchHost.php | 50 + ...LoadBalancerMatcherCreateMatchHostType.php | 8 + ...adBalancerMatcherCreateMatchHttpMethod.php | 50 + ...lancerMatcherCreateMatchHttpMethodType.php | 8 + ...BalancerMatcherCreateMatchNumMembersUp.php | 50 + ...ncerMatcherCreateMatchNumMembersUpType.php | 8 + .../LoadBalancerMatcherCreateMatchPath.php | 57 + ...LoadBalancerMatcherCreateMatchPathType.php | 8 + ...alancerMatcherCreateMatchRequestHeader.php | 57 + ...cerMatcherCreateMatchRequestHeaderType.php | 8 + ...lancerMatcherCreateMatchResponseHeader.php | 57 + ...erMatcherCreateMatchResponseHeaderType.php | 8 + .../LoadBalancerMatcherCreateMatchSrcIp.php | 50 + ...oadBalancerMatcherCreateMatchSrcIpType.php | 8 + .../LoadBalancerMatcherCreateMatchSrcPort.php | 50 + ...dBalancerMatcherCreateMatchSrcPortType.php | 8 + .../LoadBalancerMatcherCreateMatchUrl.php | 57 + ...LoadBalancerMatcherCreateMatchUrlParam.php | 57 + ...BalancerMatcherCreateMatchUrlParamType.php | 8 + ...LoadBalancerMatcherCreateMatchUrlQuery.php | 57 + ...BalancerMatcherCreateMatchUrlQueryType.php | 8 + .../LoadBalancerMatcherCreateMatchUrlType.php | 8 + .../Types/LoadBalancerMatcherHostCreate.php | 37 + .../LoadBalancerMatcherHttpMethodCreate.php | 37 + .../LoadBalancerMatcherIntCreateRangeEnd.php | 26 + .../src/Types/LoadBalancerMatcherIpCreate.php | 37 + .../src/Types/LoadBalancerMatcherResponse.php | 165 + .../Types/LoadBalancerMatcherResponseType.php | 22 + ...lancerMatcherStringArgCreateIgnoreCase.php | 58 + .../LoadBalancerMatcherStringArgCreateOne.php | 42 + ...dBalancerMatcherStringCreateIgnoreCase.php | 50 + .../LoadBalancerMatcherStringCreateOne.php | 34 + .../Types/LoadBalancerMatchingCondition.php | 9 + fern/sdk/src/Types/LoadBalancerMember.php | 111 + .../src/Types/LoadBalancerMemberCreateOne.php | 50 + .../Types/LoadBalancerMemberCreateOneType.php | 8 + .../Types/LoadBalancerMemberCreateZero.php | 50 + .../LoadBalancerMemberCreateZeroType.php | 8 + .../LoadBalancerMemberMetricsResponse.php | 176 + ...lancerMemberMetricsResponseCheckStatus.php | 11 + ...oadBalancerMemberMetricsResponseStatus.php | 12 + ...oadBalancerMemberMetricsSeriesResponse.php | 216 + .../src/Types/LoadBalancerMemberModifyOne.php | 50 + .../Types/LoadBalancerMemberModifyOneType.php | 8 + .../Types/LoadBalancerMemberModifyZero.php | 50 + .../LoadBalancerMemberModifyZeroType.php | 8 + fern/sdk/src/Types/LoadBalancerMemberType.php | 9 + fern/sdk/src/Types/LoadBalancerMetrics.php | 46 + .../LoadBalancerMetricsSortParameter.php | 8 + fern/sdk/src/Types/LoadBalancerNetwork.php | 87 + .../src/Types/LoadBalancerNetworkCreate.php | 61 + .../src/Types/LoadBalancerNetworkFamily.php | 9 + .../sdk/src/Types/LoadBalancerNetworkType.php | 9 + fern/sdk/src/Types/LoadBalancerPlan.php | 53 + ...oadBalancerProblemInvalidParamResponse.php | 45 + .../src/Types/LoadBalancerProblemResponse.php | 78 + ...BalancerProxyProtocolVersionOrDisabled.php | 10 + .../LoadBalancerRequestMetricsResponse.php | 53 + fern/sdk/src/Types/LoadBalancerResolver.php | 104 + .../src/Types/LoadBalancerResolverCreate.php | 86 + fern/sdk/src/Types/LoadBalancerRule.php | 88 + fern/sdk/src/Types/LoadBalancerRuleCreate.php | 123 + .../LoadBalancerRuleMatcherIntMethod.php | 13 + .../LoadBalancerRuleMatchingCondition.php | 9 + .../LoadBalancerServerMetricsResponse.php | 101 + fern/sdk/src/Types/LoadBalancerService.php | 176 + .../LoadBalancerServiceConfiguredStatus.php | 9 + .../LoadBalancerServiceMaintenanceDow.php | 14 + .../LoadBalancerServiceOperationalState.php | 12 + .../LoadBalancerSortServicesParameter.php | 10 + .../LoadBalancerStringMatcherMethods.php | 13 + ...oadBalancerStringMatcherMethodsNoValue.php | 9 + fern/sdk/src/Types/LoadBalancerTlsConfig.php | 63 + .../src/Types/LoadBalancerTlsConfigCreate.php | 45 + .../src/Types/LoadBalancerTlsConfigModify.php | 45 + .../sdk/src/Types/LogicalDatabaseResponse.php | 53 + fern/sdk/src/Types/ModifyStorageResponse.php | 45 + fern/sdk/src/Types/Network.php | 37 + fern/sdk/src/Types/NetworkBooleanYesno.php | 9 + fern/sdk/src/Types/NetworkDetails.php | 134 + .../src/Types/NetworkDetailsIpNetworks.php | 35 + .../NetworkDetailsIpNetworksIpNetworkItem.php | 91 + fern/sdk/src/Types/NetworkDetailsPeerings.php | 38 + .../NetworkDetailsPeeringsPeeringItem.php | 50 + fern/sdk/src/Types/NetworkDetailsServers.php | 35 + .../Types/NetworkDetailsServersServerItem.php | 42 + fern/sdk/src/Types/NetworkDetailsServices.php | 38 + .../NetworkDetailsServicesServiceItem.php | 43 + fern/sdk/src/Types/NetworkError.php | 37 + fern/sdk/src/Types/NetworkErrorError.php | 42 + fern/sdk/src/Types/NetworkFeatures.php | 11 + fern/sdk/src/Types/NetworkInterface.php | 94 + fern/sdk/src/Types/NetworkInterfaces.php | 37 + .../src/Types/NetworkInterfacesInterfaces.php | 34 + fern/sdk/src/Types/NetworkIpFamily.php | 9 + fern/sdk/src/Types/NetworkLabel.php | 45 + fern/sdk/src/Types/NetworkLabels.php | 38 + fern/sdk/src/Types/NetworkPeering.php | 95 + .../Types/NetworkPeeringConfiguredStatus.php | 9 + fern/sdk/src/Types/NetworkPeeringError.php | 37 + .../src/Types/NetworkPeeringErrorError.php | 42 + fern/sdk/src/Types/NetworkPeeringIpFamily.php | 9 + fern/sdk/src/Types/NetworkPeeringNetwork.php | 45 + .../Types/NetworkPeeringNetworkIpNetworks.php | 35 + ...kPeeringNetworkIpNetworksIpNetworkItem.php | 42 + .../src/Types/NetworkPeeringPeerNetwork.php | 45 + .../NetworkPeeringPeerNetworkIpNetworks.php | 38 + ...ringPeerNetworkIpNetworksIpNetworkItem.php | 42 + fern/sdk/src/Types/NetworkPeeringState.php | 17 + fern/sdk/src/Types/NetworkPeerings.php | 37 + .../Types/NetworkPeeringsNetworkPeerings.php | 35 + fern/sdk/src/Types/NetworkServers.php | 38 + fern/sdk/src/Types/NetworkTags.php | 37 + fern/sdk/src/Types/NetworkTagsTags.php | 35 + fern/sdk/src/Types/NetworkTagsTagsTagItem.php | 50 + fern/sdk/src/Types/NetworkType.php | 10 + fern/sdk/src/Types/Networks.php | 37 + fern/sdk/src/Types/NetworksNetworks.php | 38 + .../ObjectStorage2AccessKeyDetailResponse.php | 71 + ...tStorage2AccessKeyDetailResponseStatus.php | 9 + ...ObjectStorage2AssumeRolePolicyResponse.php | 37 + .../ObjectStorage2BucketDetailResponse.php | 61 + .../ObjectStorage2CreateAccessKeyResponse.php | 71 + ...tStorage2CreateAccessKeyResponseStatus.php | 9 + .../ObjectStorage2CustomDomainCreate.php | 53 + .../ObjectStorage2CustomDomainCreateMode.php | 9 + .../ObjectStorage2CustomDomainCreateType.php | 9 + ...jectStorage2CustomDomainDetailResponse.php | 53 + ...Storage2CustomDomainDetailResponseMode.php | 9 + .../Types/ObjectStorage2EndpointResponse.php | 69 + .../ObjectStorage2EndpointResponseMode.php | 9 + .../ObjectStorage2EndpointResponseType.php | 9 + .../src/Types/ObjectStorage2ErrorResponse.php | 70 + ...Storage2ErrorResponseInvalidParamsItem.php | 42 + .../Types/ObjectStorage2ErrorResponseType.php | 11 + .../src/Types/ObjectStorage2GroupResponse.php | 55 + .../ObjectStorage2InlinePolicyCreate.php | 45 + .../ObjectStorage2InlinePolicyResponse.php | 45 + .../src/Types/ObjectStorage2LabelCreate.php | 45 + .../ObjectStorage2LabelDetailResponse.php | 45 + ...tStorage2MetricsSeriesListResponseItem.php | 108 + .../ObjectStorage2MetricsUsageResponse.php | 45 + .../src/Types/ObjectStorage2NetworkCreate.php | 61 + .../ObjectStorage2NetworkDetailResponse.php | 61 + .../src/Types/ObjectStorage2NetworkFamily.php | 9 + .../src/Types/ObjectStorage2NetworkType.php | 9 + ...bjectStorage2PermissionsBoundaryCreate.php | 37 + .../ObjectStorage2PolicyAttachmentCreate.php | 37 + ...ObjectStorage2PolicyAttachmentResponse.php | 45 + .../ObjectStorage2PolicyDetailResponse.php | 103 + .../ObjectStorage2PolicyVersionResponse.php | 63 + .../Types/ObjectStorage2PropertiesCreate.php | 37 + ...ObjectStorage2PropertyConfiguredStatus.php | 9 + .../Types/ObjectStorage2QueryParamSort.php | 11 + .../ObjectStorage2RegionDetailResponse.php | 54 + ...tStorage2RegionDetailResponseZonesItem.php | 34 + .../src/Types/ObjectStorage2RoleResponse.php | 112 + ...Storage2RoleResponseInlinePoliciesItem.php | 34 + fern/sdk/src/Types/ObjectStorage2RoleTag.php | 45 + .../ObjectStorage2ServiceDetailResponse.php | 160 + ...2ServiceDetailResponseConfiguredStatus.php | 9 + ...2ServiceDetailResponseOperationalState.php | 28 + ...ServiceDetailResponseStateMessagesItem.php | 68 + ...iceDetailResponseStateMessagesItemCode.php | 12 + ...jectStorage2ServiceDetailResponseUsage.php | 42 + .../Types/ObjectStorage2ServiceDomains.php | 38 + ...bjectStorage2ServiceDomainsDomainsItem.php | 58 + ...tStorage2ServiceDomainsDomainsItemType.php | 10 + .../ObjectStorage2StaticWebsiteConfig.php | 104 + ...bjectStorage2StaticWebsiteConfigCreate.php | 86 + .../ObjectStorage2TagListRequestItem.php | 42 + .../ObjectStorage2TagListResponseItem.php | 42 + .../src/Types/ObjectStorage2TagResponse.php | 45 + .../ObjectStorage2UserDetailResponse.php | 88 + fern/sdk/src/Types/PartnerAccount.php | 125 + fern/sdk/src/Types/PartnerError.php | 37 + fern/sdk/src/Types/PartnerError400.php | 37 + .../Types/PartnerError400AddressInvalid.php | 37 + .../src/Types/PartnerError400CityInvalid.php | 37 + .../Types/PartnerError400CompanyInvalid.php | 37 + .../Types/PartnerError400CountryInvalid.php | 37 + .../Types/PartnerError400CountryMissing.php | 37 + .../src/Types/PartnerError400EmailInvalid.php | 37 + .../src/Types/PartnerError400EmailMissing.php | 37 + fern/sdk/src/Types/PartnerError400Error.php | 884 + .../Types/PartnerError400FirstNameInvalid.php | 37 + .../Types/PartnerError400FirstNameMissing.php | 37 + .../Types/PartnerError400LastNameInvalid.php | 37 + .../Types/PartnerError400LastNameMissing.php | 37 + .../Types/PartnerError400PasswordInvalid.php | 37 + .../Types/PartnerError400PasswordMissing.php | 37 + .../src/Types/PartnerError400PhoneInvalid.php | 37 + .../src/Types/PartnerError400PhoneMissing.php | 37 + .../PartnerError400PostalCodeInvalid.php | 37 + .../PartnerError400PostalCodeMissing.php | 37 + fern/sdk/src/Types/PartnerError403.php | 37 + fern/sdk/src/Types/PartnerError403Error.php | 42 + .../Types/PartnerError403ErrorErrorCode.php | 8 + fern/sdk/src/Types/PartnerError409.php | 37 + fern/sdk/src/Types/PartnerError409Error.php | 42 + .../Types/PartnerError409ErrorErrorCode.php | 8 + fern/sdk/src/Types/PartnerErrorError.php | 42 + fern/sdk/src/Types/Permission.php | 37 + fern/sdk/src/Types/PermissionDocument.php | 62 + fern/sdk/src/Types/PermissionError.php | 37 + fern/sdk/src/Types/PermissionErrorError.php | 42 + fern/sdk/src/Types/PermissionTargetType.php | 22 + fern/sdk/src/Types/Permissions.php | 37 + fern/sdk/src/Types/PermissionsPermissions.php | 35 + fern/sdk/src/Types/Plan.php | 37 + fern/sdk/src/Types/PlanBooleanYesno.php | 9 + fern/sdk/src/Types/PlanError.php | 37 + fern/sdk/src/Types/PlanErrorError.php | 42 + fern/sdk/src/Types/PlanFamily.php | 13 + fern/sdk/src/Types/PlanPlans.php | 35 + fern/sdk/src/Types/PlanPlansPlanItem.php | 106 + fern/sdk/src/Types/PriceError.php | 37 + fern/sdk/src/Types/PriceError400.php | 37 + fern/sdk/src/Types/PriceError400Error.php | 42 + fern/sdk/src/Types/PriceError400ErrorCode.php | 8 + fern/sdk/src/Types/PriceErrorError.php | 42 + fern/sdk/src/Types/Prices.php | 37 + fern/sdk/src/Types/PricesPrices.php | 43 + fern/sdk/src/Types/ResizeStorageResponse.php | 37 + fern/sdk/src/Types/Router.php | 37 + fern/sdk/src/Types/RouterDetails.php | 86 + ...uterDetailsAttachedNetworkGatewaysItem.php | 34 + .../Types/RouterDetailsAttachedNetworks.php | 38 + ...uterDetailsAttachedNetworksNetworkItem.php | 34 + fern/sdk/src/Types/RouterError.php | 37 + fern/sdk/src/Types/RouterErrorError.php | 42 + fern/sdk/src/Types/RouterLabel.php | 45 + fern/sdk/src/Types/RouterRouteNexthop.php | 67 + .../Types/RouterRouteNexthopNexthopOne.php | 8 + fern/sdk/src/Types/RouterStaticRouteType.php | 9 + fern/sdk/src/Types/RouterType.php | 9 + fern/sdk/src/Types/Routers.php | 37 + fern/sdk/src/Types/RoutersRouters.php | 35 + fern/sdk/src/Types/Server.php | 37 + fern/sdk/src/Types/ServerBooleanOnoff.php | 9 + fern/sdk/src/Types/ServerBooleanYesno.php | 9 + fern/sdk/src/Types/ServerCpuStats.php | 37 + fern/sdk/src/Types/ServerCpuStatsStats.php | 58 + .../src/Types/ServerCpuStatsStatsDaily.php | 34 + .../src/Types/ServerCpuStatsStatsMonthly.php | 34 + .../src/Types/ServerCpuStatsStatsWeekly.php | 34 + .../src/Types/ServerCpuStatsStatsYearly.php | 34 + fern/sdk/src/Types/ServerCpuStatsSummary.php | 38 + .../ServerCpuStatsSummaryVariableItem.php | 66 + ...ServerCpuStatsSummaryVariableItemTitle.php | 8 + fern/sdk/src/Types/ServerCreateDevices.php | 38 + .../Types/ServerCreateDevicesDeviceItem.php | 42 + fern/sdk/src/Types/ServerCreateNetworking.php | 37 + .../ServerCreateNetworkingInterfaces.php | 35 + ...reateNetworkingInterfacesInterfaceItem.php | 74 + ...kingInterfacesInterfaceItemIpAddresses.php | 35 + ...sInterfaceItemIpAddressesIpAddressItem.php | 50 + fern/sdk/src/Types/ServerDetails.php | 356 + fern/sdk/src/Types/ServerDetailsDevices.php | 35 + ...lsFirewallPrivateDefaultIncomingAction.php | 9 + ...lsFirewallPrivateDefaultOutgoingAction.php | 9 + ...ilsFirewallPublicDefaultIncomingAction.php | 9 + ...ilsFirewallPublicDefaultOutgoingAction.php | 9 + fern/sdk/src/Types/ServerDevice.php | 61 + fern/sdk/src/Types/ServerDeviceMetadata.php | 50 + fern/sdk/src/Types/ServerDiskStats.php | 37 + fern/sdk/src/Types/ServerDiskStatsStats.php | 58 + .../src/Types/ServerDiskStatsStatsDaily.php | 34 + .../src/Types/ServerDiskStatsStatsMonthly.php | 34 + .../src/Types/ServerDiskStatsStatsWeekly.php | 34 + .../src/Types/ServerDiskStatsStatsYearly.php | 34 + fern/sdk/src/Types/ServerDiskStatsSummary.php | 38 + .../ServerDiskStatsSummaryVariableItem.php | 66 + ...erverDiskStatsSummaryVariableItemTitle.php | 9 + fern/sdk/src/Types/ServerError.php | 37 + fern/sdk/src/Types/ServerError400.php | 37 + fern/sdk/src/Types/ServerError400Error.php | 42 + fern/sdk/src/Types/ServerError403.php | 37 + fern/sdk/src/Types/ServerError403Error.php | 42 + fern/sdk/src/Types/ServerError404.php | 37 + fern/sdk/src/Types/ServerError404Error.php | 42 + fern/sdk/src/Types/ServerError409.php | 37 + fern/sdk/src/Types/ServerError409Error.php | 42 + fern/sdk/src/Types/ServerError511.php | 37 + fern/sdk/src/Types/ServerError511Error.php | 42 + fern/sdk/src/Types/ServerErrorError.php | 42 + fern/sdk/src/Types/ServerFirewallRule.php | 37 + fern/sdk/src/Types/ServerFirewallRuleItem.php | 144 + .../Types/ServerFirewallRuleItemAction.php | 9 + .../Types/ServerFirewallRuleItemDirection.php | 9 + .../Types/ServerFirewallRuleItemFamily.php | 9 + .../Types/ServerFirewallRuleItemProtocol.php | 10 + .../Types/ServerFirewallRuleRequirements.php | 26 + .../Types/ServerFirewallRuleResponseItem.php | 149 + .../ServerFirewallRuleResponseItemAction.php | 9 + ...erverFirewallRuleResponseItemDirection.php | 9 + .../ServerFirewallRuleResponseItemFamily.php | 10 + ...ServerFirewallRuleResponseItemProtocol.php | 11 + fern/sdk/src/Types/ServerFirewallRules.php | 37 + .../ServerFirewallRulesFirewallRules.php | 35 + .../ServerFirewallRulesetRelationship.php | 53 + ...rverFirewallRulesetRelationshipDetails.php | 95 + ...FirewallRulesetRelationshipDetailsType.php | 8 + ...verFirewallRulesetRelationshipInternal.php | 93 + ...irewallRulesetRelationshipInternalType.php | 9 + .../ServerFirewallRulesetRelationshipType.php | 9 + .../ServerFirewallRulesetRelationships.php | 37 + ...ationshipsFirewallRulesetRelationships.php | 35 + fern/sdk/src/Types/ServerGpus.php | 38 + fern/sdk/src/Types/ServerGpusGpusItem.php | 74 + fern/sdk/src/Types/ServerGroup.php | 37 + .../sdk/src/Types/ServerGroupAntiAffinity.php | 10 + .../Types/ServerGroupAntiAffinityStatus.php | 45 + .../ServerGroupAntiAffinityStatusStatus.php | 9 + fern/sdk/src/Types/ServerGroupDetails.php | 78 + .../src/Types/ServerGroupDetailsLabels.php | 38 + .../src/Types/ServerGroupDetailsServers.php | 38 + fern/sdk/src/Types/ServerGroupError.php | 37 + fern/sdk/src/Types/ServerGroupErrorError.php | 42 + fern/sdk/src/Types/ServerGroupLabel.php | 45 + fern/sdk/src/Types/ServerGroupModify.php | 37 + .../Types/ServerGroupModifyServerGroup.php | 58 + .../ServerGroupModifyServerGroupLabels.php | 38 + fern/sdk/src/Types/ServerGroupServers.php | 38 + fern/sdk/src/Types/ServerGroups.php | 37 + .../src/Types/ServerGroupsServerGroups.php | 35 + fern/sdk/src/Types/ServerInGetServerList.php | 180 + .../src/Types/ServerInGetServerListLabels.php | 38 + fern/sdk/src/Types/ServerInterface.php | 85 + .../src/Types/ServerInterfaceIpAddress.php | 69 + .../src/Types/ServerInterfaceIpAddresses.php | 38 + .../sdk/src/Types/ServerInterfaceResponse.php | 37 + .../ServerIpAddressInterfaceResponse.php | 37 + fern/sdk/src/Types/ServerIpAddresses.php | 38 + .../Types/ServerIpAddressesIpAddressItem.php | 58 + fern/sdk/src/Types/ServerIpFamily.php | 9 + fern/sdk/src/Types/ServerIpReleasePolicy.php | 9 + fern/sdk/src/Types/ServerLabel.php | 45 + fern/sdk/src/Types/ServerLabels.php | 38 + fern/sdk/src/Types/ServerLegacyBoolean.php | 17 + fern/sdk/src/Types/ServerLoginUser.php | 53 + fern/sdk/src/Types/ServerLoginUserSshKeys.php | 35 + fern/sdk/src/Types/ServerNetworkStats.php | 37 + .../sdk/src/Types/ServerNetworkStatsStats.php | 58 + .../Types/ServerNetworkStatsStatsDaily.php | 34 + .../Types/ServerNetworkStatsStatsMonthly.php | 34 + .../Types/ServerNetworkStatsStatsWeekly.php | 34 + .../Types/ServerNetworkStatsStatsYearly.php | 34 + .../src/Types/ServerNetworkStatsSummary.php | 38 + .../ServerNetworkStatsSummaryVariableItem.php | 66 + ...erNetworkStatsSummaryVariableItemTitle.php | 9 + fern/sdk/src/Types/ServerNetworkType.php | 10 + fern/sdk/src/Types/ServerNetworking.php | 37 + .../src/Types/ServerNetworkingInterfaces.php | 38 + .../src/Types/ServerNetworkingResponse.php | 37 + fern/sdk/src/Types/ServerNicModel.php | 10 + .../src/Types/ServerRemoteAccessDetails.php | 37 + .../Types/ServerRemoteAccessDetailsServer.php | 89 + .../src/Types/ServerRemoteAccessEnabled.php | 9 + fern/sdk/src/Types/ServerRemoteAccessType.php | 8 + fern/sdk/src/Types/ServerSizeError.php | 37 + fern/sdk/src/Types/ServerSizeErrorError.php | 42 + fern/sdk/src/Types/ServerSizeLimits.php | 37 + .../ServerSizeLimitsServerSizeLimits.php | 66 + fern/sdk/src/Types/ServerSizes.php | 37 + fern/sdk/src/Types/ServerSizesServerSizes.php | 35 + .../ServerSizesServerSizesServerSizeItem.php | 42 + fern/sdk/src/Types/ServerState.php | 12 + fern/sdk/src/Types/ServerStatsNetworkType.php | 9 + fern/sdk/src/Types/ServerStatsPeriod.php | 11 + fern/sdk/src/Types/ServerStorageDevices.php | 38 + .../Types/ServerStorageDevicesResponse.php | 38 + ...torageDevicesResponseStorageDeviceItem.php | 107 + ...vicesResponseStorageDeviceItemBootDisk.php | 9 + ...geDevicesResponseStorageDeviceItemType.php | 9 + .../ServerStorageDevicesStorageDeviceItem.php | 114 + ...rStorageDevicesStorageDeviceItemAction.php | 10 + ...rageDevicesStorageDeviceItemBackupRule.php | 50 + fern/sdk/src/Types/ServerTagsTag.php | 35 + fern/sdk/src/Types/ServerVncPortOne.php | 8 + fern/sdk/src/Types/Storage.php | 37 + fern/sdk/src/Types/StorageAccess.php | 10 + fern/sdk/src/Types/StorageAccessFilter.php | 9 + fern/sdk/src/Types/StorageBackupRule.php | 53 + .../src/Types/StorageBackupRuleInterval.php | 15 + fern/sdk/src/Types/StorageDetails.php | 191 + fern/sdk/src/Types/StorageDetailsBackups.php | 38 + .../src/Types/StorageDetailsPartOfPlan.php | 8 + fern/sdk/src/Types/StorageDetailsServers.php | 38 + fern/sdk/src/Types/StorageEncrypted.php | 9 + fern/sdk/src/Types/StorageError.php | 37 + fern/sdk/src/Types/StorageErrorError.php | 42 + fern/sdk/src/Types/StorageImport.php | 158 + .../src/Types/StorageImportCompletedZero.php | 8 + fern/sdk/src/Types/StorageImportErrorCode.php | 11 + fern/sdk/src/Types/StorageImportResponse.php | 37 + fern/sdk/src/Types/StorageImportSource.php | 9 + fern/sdk/src/Types/StorageImportState.php | 14 + fern/sdk/src/Types/StorageLabel.php | 45 + fern/sdk/src/Types/StorageListItem.php | 160 + .../src/Types/StorageListItemPartOfPlan.php | 8 + fern/sdk/src/Types/StorageOrderBy.php | 9 + fern/sdk/src/Types/StorageSortBy.php | 13 + fern/sdk/src/Types/StorageState.php | 17 + fern/sdk/src/Types/StorageTemplateType.php | 9 + fern/sdk/src/Types/StorageTier.php | 10 + fern/sdk/src/Types/StorageType.php | 11 + fern/sdk/src/Types/Storages.php | 37 + fern/sdk/src/Types/StoragesStorages.php | 35 + fern/sdk/src/Types/Tag.php | 37 + fern/sdk/src/Types/TagError.php | 37 + fern/sdk/src/Types/TagError400.php | 37 + fern/sdk/src/Types/TagError400Error.php | 42 + .../src/Types/TagError400ErrorErrorCode.php | 8 + fern/sdk/src/Types/TagError403.php | 37 + fern/sdk/src/Types/TagError403Error.php | 42 + .../src/Types/TagError403ErrorErrorCode.php | 8 + fern/sdk/src/Types/TagError404.php | 37 + fern/sdk/src/Types/TagError404Error.php | 42 + .../src/Types/TagError404ErrorErrorCode.php | 8 + fern/sdk/src/Types/TagError409.php | 37 + fern/sdk/src/Types/TagError409Error.php | 42 + .../src/Types/TagError409ErrorErrorCode.php | 8 + fern/sdk/src/Types/TagErrorError.php | 42 + fern/sdk/src/Types/TagServers.php | 38 + fern/sdk/src/Types/TagTag.php | 50 + fern/sdk/src/Types/Tags.php | 37 + fern/sdk/src/Types/TagsTags.php | 35 + fern/sdk/src/Types/TagsTagsTagItem.php | 50 + fern/sdk/src/Types/TimezoneError.php | 37 + fern/sdk/src/Types/TimezoneErrorError.php | 42 + fern/sdk/src/Types/Timezones.php | 37 + fern/sdk/src/Types/TimezonesTimezones.php | 35 + fern/sdk/src/Types/VncKeymapError.php | 37 + fern/sdk/src/Types/VncKeymapErrorError.php | 42 + fern/sdk/src/Types/VncKeymapKeymaps.php | 37 + .../sdk/src/Types/VncKeymapKeymapsKeymaps.php | 35 + fern/sdk/src/Types/ZoneBooleanYesno.php | 9 + fern/sdk/src/Types/ZoneError.php | 37 + fern/sdk/src/Types/ZoneErrorError.php | 42 + fern/sdk/src/Types/ZonePrices.php | 38 + fern/sdk/src/Types/ZonePricesItemsValue.php | 42 + fern/sdk/src/Types/ZoneVlans.php | 37 + fern/sdk/src/Types/ZoneVlansZoneVlans.php | 35 + .../src/Types/ZoneVlansZoneVlansVlanItem.php | 58 + fern/sdk/src/Types/Zones.php | 37 + fern/sdk/src/Types/ZonesZones.php | 35 + fern/sdk/src/Types/ZonesZonesZoneItem.php | 50 + fern/sdk/src/UpcloudClient.php | 261 + fern/sdk/src/Utils/File.php | 125 + fern/sdk/src/VncKeymap/VncKeymapClient.php | 106 + fern/sdk/src/Zone/ZoneClient.php | 162 + fern/sdk/tests/Core/Client/RawClientTest.php | 671 + .../Core/Json/AdditionalPropertiesTest.php | 76 + fern/sdk/tests/Core/Json/DateArrayTest.php | 54 + fern/sdk/tests/Core/Json/EmptyArrayTest.php | 71 + fern/sdk/tests/Core/Json/EnumTest.php | 76 + fern/sdk/tests/Core/Json/ExhaustiveTest.php | 197 + fern/sdk/tests/Core/Json/InvalidTest.php | 42 + .../tests/Core/Json/NestedUnionArrayTest.php | 89 + fern/sdk/tests/Core/Json/NullPropertyTest.php | 53 + .../sdk/tests/Core/Json/NullableArrayTest.php | 49 + fern/sdk/tests/Core/Json/ScalarTest.php | 116 + fern/sdk/tests/Core/Json/TraitTest.php | 60 + fern/sdk/tests/Core/Json/UnionArrayTest.php | 57 + .../sdk/tests/Core/Json/UnionPropertyTest.php | 115 + fern/sdk/tests/Wire/AccountTokensWireTest.php | 115 + fern/sdk/tests/Wire/AccountWireTest.php | 363 + fern/sdk/tests/Wire/AuditLogsWireTest.php | 118 + fern/sdk/tests/Wire/CurrencyWireTest.php | 46 + fern/sdk/tests/Wire/DatabaseWireTest.php | 1786 + fern/sdk/tests/Wire/DeviceWireTest.php | 48 + fern/sdk/tests/Wire/EventsWireTest.php | 49 + fern/sdk/tests/Wire/FileStorageWireTest.php | 775 + .../tests/Wire/FirewallRulesetWireTest.php | 660 + fern/sdk/tests/Wire/GatewayWireTest.php | 989 + fern/sdk/tests/Wire/IpAddressWireTest.php | 204 + fern/sdk/tests/Wire/KubernetesWireTest.php | 726 + fern/sdk/tests/Wire/LoadBalancerWireTest.php | 1886 + .../sdk/tests/Wire/NetworkPeeringWireTest.php | 155 + fern/sdk/tests/Wire/NetworkWireTest.php | 305 + .../sdk/tests/Wire/ObjectStorage2WireTest.php | 2349 + fern/sdk/tests/Wire/PartnerWireTest.php | 71 + fern/sdk/tests/Wire/PermissionWireTest.php | 158 + fern/sdk/tests/Wire/PlanWireTest.php | 46 + fern/sdk/tests/Wire/PriceWireTest.php | 48 + fern/sdk/tests/Wire/RouterWireTest.php | 168 + fern/sdk/tests/Wire/ServerGroupWireTest.php | 249 + fern/sdk/tests/Wire/ServerSizeWireTest.php | 66 + fern/sdk/tests/Wire/ServerWireTest.php | 1180 + fern/sdk/tests/Wire/StorageWireTest.php | 701 + fern/sdk/tests/Wire/TagWireTest.php | 157 + fern/sdk/tests/Wire/TimezoneWireTest.php | 46 + fern/sdk/tests/Wire/VncKeymapWireTest.php | 46 + fern/sdk/tests/Wire/WireMockTestCase.php | 106 + fern/sdk/tests/Wire/ZoneWireTest.php | 67 + fern/sdk/wiremock/docker-compose.test.yml | 14 + fern/sdk/wiremock/wiremock-mappings.json | 15445 ++++ generator/README-docs.md | 37 + generator/config/placeholder.txt | 1 + generator/openapi/placeholder.txt | 1 + generator/openapi/spec.json | 76147 ++++++++++++++++ generator/scripts/generate.sh | 58 + generator/scripts/patch_generated_php.py | 84 + generator/scripts/patch_openapi.py | 122 + generator/scripts/prepare-release.sh | 21 + generator/scripts/prepare_docs.py | 105 + generator/scripts/publish.sh | 91 + generator/tests/check_docs_site.py | 90 + generator/tests/check_endpoint_coverage.py | 108 + generator/tests/generated_model_fixtures.php | 50 + .../tests/generated_request_behavior.php | 102 + generator/tests/generated_sdk_smoke.php | 98 + generator/tests/release.test.mjs | 230 + generator/tests/test_check_docs_site.py | 50 + generator/tests/test_endpoint_coverage.py | 68 + generator/tests/test_patch_generated_php.py | 78 + generator/tests/test_patch_openapi.py | 176 + generator/tests/test_prepare_docs.py | 63 + lib/ApiException.php | 95 - lib/Configuration.php | 368 - lib/HttpClient/UpcloudApiRequest.php | 26 - lib/HttpClient/UpcloudApiResponse.php | 125 - lib/HttpClient/UpcloudHttpClient.php | 143 - lib/Model/Account.php | 99 - lib/Model/AccountResourceLimits.php | 213 - lib/Model/AccountResponse.php | 41 - lib/Model/AddIpRequest.php | 50 - lib/Model/AssignIpResponse.php | 48 - lib/Model/AttachNetwork.php | 41 - lib/Model/AttachStorageDeviceRequest.php | 21 - lib/Model/AvailablePlanListResponse.php | 48 - lib/Model/AvailablePlanListResponsePlans.php | 49 - lib/Model/BackupRule.php | 118 - lib/Model/CloneStorageRequest.php | 23 - lib/Model/ConfigurationListResponse.php | 47 - .../ConfigurationListResponseServerSizes.php | 49 - lib/Model/CreateBackupStorageRequest.php | 23 - lib/Model/CreateNetworkInterfaceRequest.php | 19 - lib/Model/CreateNetworkRequest.php | 19 - lib/Model/CreateNewTagResponse.php | 47 - lib/Model/CreateObjectStorageRequest.php | 19 - lib/Model/CreateServerRequest.php | 20 - lib/Model/CreateServerResponse.php | 45 - lib/Model/CreateStorageRequest.php | 21 - lib/Model/CreateStorageResponse.php | 47 - lib/Model/Error.php | 47 - lib/Model/ErrorCode.php | 138 - lib/Model/ErrorError.php | 79 - lib/Model/ErrorStatus.php | 40 - lib/Model/FirewallRule.php | 393 - lib/Model/FirewallRuleCreateResponse.php | 45 - lib/Model/FirewallRuleListResponse.php | 47 - .../FirewallRuleListResponseFirewallRules.php | 51 - lib/Model/FirewallRuleRequest.php | 51 - lib/Model/FirewallRulesRequest.php | 46 - lib/Model/Host.php | 159 - lib/Model/HostListResponse.php | 45 - lib/Model/HostResponse.php | 46 - lib/Model/Hosts.php | 50 - lib/Model/IpAddress.php | 296 - lib/Model/IpAddressListResponse.php | 48 - lib/Model/IpAddresses.php | 54 - lib/Model/IpNetwork.php | 222 - lib/Model/IpNetworks.php | 49 - lib/Model/ModifyHostRequest.php | 58 - lib/Model/ModifyIpRequest.php | 51 - lib/Model/ModifyNetworkInterfaceRequest.php | 19 - lib/Model/ModifyNetworkRequest.php | 19 - lib/Model/ModifyObjectStorageRequest.php | 19 - lib/Model/ModifyServerRequest.php | 23 - lib/Model/ModifyStorageRequest.php | 20 - lib/Model/ModifyTagRequest.php | 49 - lib/Model/Network.php | 219 - lib/Model/NetworkInterface.php | 234 - lib/Model/NetworkInterfaceList.php | 45 - lib/Model/NetworkInterfaceRequest.php | 48 - lib/Model/NetworkInterfaceResponse.php | 47 - lib/Model/NetworkInterfaces.php | 47 - lib/Model/NetworkRequest.php | 48 - lib/Model/NetworkResponse.php | 48 - lib/Model/Networks.php | 49 - lib/Model/NetworksListResponse.php | 48 - lib/Model/ObjectStorage.php | 317 - lib/Model/ObjectStorageListResponse.php | 45 - lib/Model/ObjectStorageRequest.php | 48 - lib/Model/ObjectStorageResponse.php | 46 - lib/Model/ObjectStorages.php | 47 - lib/Model/Plan.php | 168 - lib/Model/Price.php | 68 - lib/Model/PriceListResponse.php | 47 - lib/Model/PriceListResponsePrices.php | 51 - lib/Model/PriceZone.php | 769 - lib/Model/RestartServer.php | 51 - lib/Model/RestartServerRequest.php | 112 - lib/Model/Router.php | 129 - lib/Model/RouterRequest.php | 58 - lib/Model/RouterResponse.php | 48 - lib/Model/Routers.php | 49 - lib/Model/RoutersListResponse.php | 47 - lib/Model/Server.php | 880 - lib/Model/ServerListResponse.php | 49 - lib/Model/ServerListResponseServers.php | 49 - lib/Model/ServerLoginUser.php | 107 - lib/Model/ServerNetworksListResponse.php | 47 - lib/Model/ServerRequest.php | 48 - lib/Model/ServerSize.php | 69 - lib/Model/ServerSshKey.php | 48 - lib/Model/ServerState.php | 32 - lib/Model/ServerStorageDevices.php | 50 - lib/Model/ServerTags.php | 49 - lib/Model/Servers.php | 49 - lib/Model/Stat.php | 92 - lib/Model/Stats.php | 48 - lib/Model/StopServer.php | 48 - lib/Model/StopServerRequest.php | 83 - lib/Model/Storage.php | 405 - lib/Model/StorageAccessType.php | 26 - lib/Model/StorageBackups.php | 49 - lib/Model/StorageDevice.php | 325 - lib/Model/StorageDeviceDetachRequest.php | 20 - lib/Model/StorageDeviceLoadRequest.php | 21 - lib/Model/StorageDeviceRequest.php | 48 - lib/Model/StorageRequest.php | 48 - lib/Model/StorageState.php | 34 - lib/Model/StorageTier.php | 28 - lib/Model/StorageType.php | 34 - lib/Model/SuccessStoragesResponse.php | 47 - lib/Model/SuccessStoragesResponseStorages.php | 49 - lib/Model/Tag.php | 97 - lib/Model/TagCreateRequest.php | 49 - lib/Model/TagListResponse.php | 47 - lib/Model/TagListResponseTags.php | 49 - lib/Model/TagServers.php | 50 - lib/Model/TemplitizeStorageRequest.php | 22 - lib/Model/TimezoneListResponse.php | 47 - lib/Model/TimezoneListResponseTimezones.php | 49 - lib/Model/Zone.php | 106 - lib/Model/ZoneListResponse.php | 48 - lib/Model/ZoneListResponseZones.php | 49 - lib/Serializer.php | 40 - lib/SerializerInterface.php | 33 - lib/Support/Traits/Arrayable.php | 62 - lib/Upcloud/AccountApi.php | 88 - lib/Upcloud/BaseApi.php | 66 - lib/Upcloud/FirewallApi.php | 438 - lib/Upcloud/HostsApi.php | 239 - lib/Upcloud/IPAddressApi.php | 377 - lib/Upcloud/NetworkApi.php | 1086 - lib/Upcloud/ObjectStorageApi.php | 381 - lib/Upcloud/PlanApi.php | 86 - lib/Upcloud/PricesApi.php | 88 - lib/Upcloud/ServerApi.php | 1435 - lib/Upcloud/StorageApi.php | 1323 - lib/Upcloud/TagApi.php | 455 - lib/Upcloud/TimezoneApi.php | 87 - lib/Upcloud/ZoneApi.php | 86 - phpconfig.ini | 1 - phpunit.xml.dist | 27 - releasing.md | 65 + sdk-repo-creation-guide.md | 311 + test/Api/AccountApi/AccountApiTest.php | 162 - test/Api/BaseApiTest.php | 94 - test/Api/FirewallApi/FirewallApiAsyncTest.php | 166 - test/Api/FirewallApi/FirewallApiTest.php | 189 - test/Api/Fixtures/BaseFixture.php | 20 - test/Api/Fixtures/FirewallApiFixture.php | 203 - test/Api/Fixtures/HostsApiFixture.php | 129 - test/Api/Fixtures/IPAddressApiFixture.php | 177 - test/Api/Fixtures/NetworkApiFixture.php | 379 - test/Api/Fixtures/ObjectStorageApiFixture.php | 126 - test/Api/Fixtures/PlanApiFixture.php | 55 - test/Api/Fixtures/PricesApiFixture.php | 110 - test/Api/Fixtures/ServerApiFixture.php | 347 - test/Api/Fixtures/StorageApiFixture.php | 318 - test/Api/Fixtures/TagApiFixture.php | 173 - test/Api/Fixtures/TimezoneApiFixture.php | 46 - test/Api/Fixtures/ZoneApiFixture.php | 79 - test/Api/Hosts/HostsApiTest.php | 241 - test/Api/HttpClient/HttpClientTest.php | 142 - .../IPAddressApi/IPAddressApiAsyncTest.php | 200 - test/Api/IPAddressApi/IPAddressApiTest.php | 187 - test/Api/NetworkApi/NetworkApiAsyncTest.php | 620 - test/Api/NetworkApi/NetworkApiTest.php | 594 - .../ObjectStorage/ObjectStorageAsyncTest.php | 225 - test/Api/ObjectStorage/ObjectStorageTest.php | 214 - test/Api/PlanApi/PlanApiTest.php | 81 - test/Api/PricesApi/PricesApiTest.php | 80 - test/Api/ServerApi/ServerApiAsyncTest.php | 810 - test/Api/ServerApi/ServerApiTest.php | 800 - test/Api/StorageApi/StorageApiAsyncTest.php | 601 - test/Api/StorageApi/StorageApiTest.php | 573 - test/Api/TagApi/TagApiAsyncTest.php | 241 - test/Api/TagApi/TagApiTest.php | 230 - test/Api/TimezoneApi/TimezoneApiTest.php | 80 - test/Api/ZoneApi/ZoneApiTest.php | 80 - test/test-install-with-laravel.sh | 13 - 1754 files changed, 279087 insertions(+), 31341 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/workflows/docs-validation.yml delete mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/php-sdk-validation.yml create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/regenerate.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/update-docs.yml delete mode 100644 .php_cs delete mode 100644 docs/Api/AccountApi.md delete mode 100644 docs/Api/FirewallApi.md delete mode 100644 docs/Api/HostsApi.md delete mode 100644 docs/Api/IPAddressApi.md delete mode 100644 docs/Api/NetworkApi.md delete mode 100644 docs/Api/ObjectStorageApi.md delete mode 100644 docs/Api/PlanApi.md delete mode 100644 docs/Api/PricesApi.md delete mode 100644 docs/Api/ServerApi.md delete mode 100644 docs/Api/StorageApi.md delete mode 100644 docs/Api/TagApi.md delete mode 100644 docs/Api/TimezoneApi.md delete mode 100644 docs/Api/ZoneApi.md create mode 100644 docs/Gemfile delete mode 100644 docs/Model/Account.md delete mode 100644 docs/Model/AccountResourceLimits.md delete mode 100644 docs/Model/AccountResponse.md delete mode 100644 docs/Model/AddIpRequest.md delete mode 100644 docs/Model/AssignIpResponse.md delete mode 100644 docs/Model/AttachNetwork.md delete mode 100644 docs/Model/AttachStorageDeviceRequest.md delete mode 100644 docs/Model/AvailablePlanListResponse.md delete mode 100644 docs/Model/AvailablePlanListResponsePlans.md delete mode 100644 docs/Model/BackupRule.md delete mode 100644 docs/Model/CloneStorageRequest.md delete mode 100644 docs/Model/ConfigurationListResponse.md delete mode 100644 docs/Model/ConfigurationListResponseServerSizes.md delete mode 100644 docs/Model/CreateBackupStorageRequest.md delete mode 100644 docs/Model/CreateNetworkInterfaceRequest.md delete mode 100644 docs/Model/CreateNetworkRequest.md delete mode 100644 docs/Model/CreateNewTagResponse.md delete mode 100644 docs/Model/CreateObjectStorageRequest.md delete mode 100644 docs/Model/CreateServerRequest.md delete mode 100644 docs/Model/CreateServerResponse.md delete mode 100644 docs/Model/CreateStorageRequest.md delete mode 100644 docs/Model/CreateStorageResponse.md delete mode 100644 docs/Model/Error.md delete mode 100644 docs/Model/ErrorCode.md delete mode 100644 docs/Model/ErrorError.md delete mode 100644 docs/Model/ErrorStatus.md delete mode 100644 docs/Model/FirewallRule.md delete mode 100644 docs/Model/FirewallRuleCreateResponse.md delete mode 100644 docs/Model/FirewallRuleListResponse.md delete mode 100644 docs/Model/FirewallRuleListResponseFirewallRules.md delete mode 100644 docs/Model/FirewallRuleRequest.md delete mode 100644 docs/Model/Host.md delete mode 100644 docs/Model/HostListResponse.md delete mode 100644 docs/Model/HostResponse.md delete mode 100644 docs/Model/Hosts.md delete mode 100644 docs/Model/IpAddress.md delete mode 100644 docs/Model/IpAddressListResponse.md delete mode 100644 docs/Model/IpAddressListResponseIpAddresses.md delete mode 100644 docs/Model/IpAddresses.md delete mode 100644 docs/Model/IpNetwork.md delete mode 100644 docs/Model/ModifyHostRequest.md delete mode 100644 docs/Model/ModifyIpRequest.md delete mode 100644 docs/Model/ModifyNetworkInterfaceRequest.md delete mode 100644 docs/Model/ModifyNetworkRequest.md delete mode 100644 docs/Model/ModifyObjectStorageRequest.md delete mode 100644 docs/Model/ModifyServerRequest.md delete mode 100644 docs/Model/ModifyStorageRequest.md delete mode 100644 docs/Model/ModifyTagRequest.md delete mode 100644 docs/Model/Network.md delete mode 100644 docs/Model/NetworkInterface.md delete mode 100644 docs/Model/NetworkInterfaceList.md delete mode 100644 docs/Model/NetworkInterfaceResponse.md delete mode 100644 docs/Model/NetworkInterfaces.md delete mode 100644 docs/Model/NetworkResponse.md delete mode 100644 docs/Model/Networks.md delete mode 100644 docs/Model/NetworksListResponse.md delete mode 100644 docs/Model/ObjectStorage.md delete mode 100644 docs/Model/ObjectStorageListResponse.md delete mode 100644 docs/Model/ObjectStorageResponse.md delete mode 100644 docs/Model/ObjectStorages.md delete mode 100644 docs/Model/Plan.md delete mode 100644 docs/Model/Price.md delete mode 100644 docs/Model/PriceListResponse.md delete mode 100644 docs/Model/PriceListResponsePrice.md delete mode 100644 docs/Model/PriceListResponsePrices.md delete mode 100644 docs/Model/PriceZone.md delete mode 100644 docs/Model/RestartServer.md delete mode 100644 docs/Model/Router.md delete mode 100644 docs/Model/RouterRequest.md delete mode 100644 docs/Model/RouterResponse.md delete mode 100644 docs/Model/Routers.md delete mode 100644 docs/Model/RoutersListResponse.md delete mode 100644 docs/Model/Server.md delete mode 100644 docs/Model/ServerListResponse.md delete mode 100644 docs/Model/ServerListResponseServers.md delete mode 100644 docs/Model/ServerLoginUser.md delete mode 100644 docs/Model/ServerNetworksListResponse.md delete mode 100644 docs/Model/ServerSize.md delete mode 100644 docs/Model/ServerSshKey.md delete mode 100644 docs/Model/ServerState.md delete mode 100644 docs/Model/ServerStorageDevices.md delete mode 100644 docs/Model/ServerTags.md delete mode 100644 docs/Model/Servers.md delete mode 100644 docs/Model/Stat.md delete mode 100644 docs/Model/Stats.md delete mode 100644 docs/Model/StopServer.md delete mode 100644 docs/Model/StopServerRequest.md delete mode 100644 docs/Model/Storage.md delete mode 100644 docs/Model/StorageAccessType.md delete mode 100644 docs/Model/StorageBackups.md delete mode 100644 docs/Model/StorageDevice.md delete mode 100644 docs/Model/StorageDeviceDetachRequest.md delete mode 100644 docs/Model/StorageDeviceLoadRequest.md delete mode 100644 docs/Model/StorageState.md delete mode 100644 docs/Model/StorageTier.md delete mode 100644 docs/Model/StorageType.md delete mode 100644 docs/Model/SuccessStoragesResponse.md delete mode 100644 docs/Model/SuccessStoragesResponseStorages.md delete mode 100644 docs/Model/Tag.md delete mode 100644 docs/Model/TagCreateRequest.md delete mode 100644 docs/Model/TagListResponse.md delete mode 100644 docs/Model/TagListResponseTags.md delete mode 100644 docs/Model/TagServers.md delete mode 100644 docs/Model/TemplitizeStorageRequest.md delete mode 100644 docs/Model/TimezoneListResponse.md delete mode 100644 docs/Model/TimezoneListResponseTimezones.md delete mode 100644 docs/Model/Zone.md delete mode 100644 docs/Model/ZoneListResponse.md delete mode 100644 docs/Model/ZoneListResponseZones.md delete mode 100644 docs/Model/ipNetworks.md create mode 100644 docs/_config.yml create mode 100644 docs/_layouts/sdk.html create mode 100644 docs/assets/docs.css create mode 100644 docs/index.md create mode 100644 docs/latest/reference.md create mode 100644 docs/v0.0.105/reference.md create mode 100644 docs/v0.0.11/reference.md create mode 100644 docs/v0.0.65/reference.md create mode 100644 fern/fern.config.json create mode 100644 fern/generators.yaml create mode 100644 fern/sdk/.fern/metadata.json create mode 100644 fern/sdk/.github/workflows/ci.yml create mode 100644 fern/sdk/.gitignore create mode 100644 fern/sdk/README.md create mode 100644 fern/sdk/composer.json create mode 100644 fern/sdk/phpstan.neon create mode 100644 fern/sdk/phpunit.xml create mode 100644 fern/sdk/reference.md create mode 100644 fern/sdk/src/Account/AccountClient.php create mode 100644 fern/sdk/src/Account/Requests/CreateSubaccountRequest.php create mode 100644 fern/sdk/src/Account/Requests/GetAccountNetworkTopUsageRequest.php create mode 100644 fern/sdk/src/Account/Requests/GetAccountNetworkUsageRequest.php create mode 100644 fern/sdk/src/Account/Requests/GetAccountResourceNetworkUsageRequest.php create mode 100644 fern/sdk/src/Account/Requests/GetMonthlyDetailedBillingSummaryRequest.php create mode 100644 fern/sdk/src/Account/Requests/ListAccountsRequest.php create mode 100644 fern/sdk/src/Account/Types/CreateSubaccountRequestSubAccount.php create mode 100644 fern/sdk/src/Account/Types/CreateSubaccountRequestSubAccountIpFilters.php create mode 100644 fern/sdk/src/Account/Types/CreateSubaccountRequestSubAccountRoles.php create mode 100644 fern/sdk/src/AccountTokens/AccountTokensClient.php create mode 100644 fern/sdk/src/AccountTokens/Requests/ListTokensRequest.php create mode 100644 fern/sdk/src/AuditLogs/AuditLogsClient.php create mode 100644 fern/sdk/src/AuditLogs/Requests/ExportAuditLogsRequest.php create mode 100644 fern/sdk/src/AuditLogs/Requests/ListAuditLogsRequest.php create mode 100644 fern/sdk/src/Core/Client/BaseApiRequest.php create mode 100644 fern/sdk/src/Core/Client/HttpMethod.php create mode 100644 fern/sdk/src/Core/Client/RawClient.php create mode 100644 fern/sdk/src/Core/Client/RetryMiddleware.php create mode 100644 fern/sdk/src/Core/Json/JsonApiRequest.php create mode 100644 fern/sdk/src/Core/Json/JsonDecoder.php create mode 100644 fern/sdk/src/Core/Json/JsonDeserializer.php create mode 100644 fern/sdk/src/Core/Json/JsonEncoder.php create mode 100644 fern/sdk/src/Core/Json/JsonProperty.php create mode 100644 fern/sdk/src/Core/Json/JsonSerializableType.php create mode 100644 fern/sdk/src/Core/Json/JsonSerializer.php create mode 100644 fern/sdk/src/Core/Json/Utils.php create mode 100644 fern/sdk/src/Core/Multipart/MultipartApiRequest.php create mode 100644 fern/sdk/src/Core/Multipart/MultipartFormData.php create mode 100644 fern/sdk/src/Core/Multipart/MultipartFormDataPart.php create mode 100644 fern/sdk/src/Core/Types/ArrayType.php create mode 100644 fern/sdk/src/Core/Types/Constant.php create mode 100644 fern/sdk/src/Core/Types/Date.php create mode 100644 fern/sdk/src/Core/Types/Union.php create mode 100644 fern/sdk/src/Currency/CurrencyClient.php create mode 100644 fern/sdk/src/Database/DatabaseClient.php create mode 100644 fern/sdk/src/Database/Requests/CloneDatabaseRequest.php create mode 100644 fern/sdk/src/Database/Requests/CreateDatabaseIntegrationRequest.php create mode 100644 fern/sdk/src/Database/Requests/CreateDatabaseLabelRequest.php create mode 100644 fern/sdk/src/Database/Requests/CreateDatabaseNetworkRequest.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseConnectionPoolCreate.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseConnectionPoolModify.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseIntegrationEndpointCreate.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseIntegrationEndpointModify.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseLabelModify.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseServiceAclModify.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseServiceCreateOpenApi.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseServiceIntegrationModify.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseServiceModifyOpenApi.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseServiceSecurityEnable.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseServiceSecurityModify.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseServiceTaskCreate.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseServiceTypeModify.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseServiceUpgrade.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseServiceUserAclModify.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseServiceUserCreate.php create mode 100644 fern/sdk/src/Database/Requests/DatabaseServiceUserModify.php create mode 100644 fern/sdk/src/Database/Requests/GetDatabaseLogsRequest.php create mode 100644 fern/sdk/src/Database/Requests/GetDatabaseQueryStatisticsRequest.php create mode 100644 fern/sdk/src/Database/Requests/GetDatabaseSessionsRequest.php create mode 100644 fern/sdk/src/Database/Requests/ListDatabaseConnectionPoolsRequest.php create mode 100644 fern/sdk/src/Database/Requests/ListDatabasesRequest.php create mode 100644 fern/sdk/src/Database/Requests/LogicalDatabaseCreate.php create mode 100644 fern/sdk/src/Database/Types/DatabaseConnectionPoolCreatePoolMode.php create mode 100644 fern/sdk/src/Database/Types/DatabaseConnectionPoolModifyPoolMode.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceCreateOpenApiMaintenance.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceCreateOpenApiPlanBackups.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceModifyOpenApiMaintenance.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceModifyOpenApiPlanBackups.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceTaskCreateDatasetImport.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceTaskCreateMigrationCheck.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceTaskCreateUpgradeCheck.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyOpensearchAccessControl.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyOpensearchAccessControlRulesItem.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyPgAccessControl.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyRedisAccessControl.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyValkeyAccessControl.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceUserCreateOpensearchAccessControl.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceUserCreateOpensearchAccessControlRulesItem.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceUserCreatePgAccessControl.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceUserCreateRedisAccessControl.php create mode 100644 fern/sdk/src/Database/Types/DatabaseServiceUserCreateValkeyAccessControl.php create mode 100644 fern/sdk/src/Device/DeviceClient.php create mode 100644 fern/sdk/src/Device/Requests/GetAvailablePassthroughDevicesRequest.php create mode 100644 fern/sdk/src/Device/Types/GetAvailablePassthroughDevicesRequestType.php create mode 100644 fern/sdk/src/Environments.php create mode 100644 fern/sdk/src/Events/EventsClient.php create mode 100644 fern/sdk/src/Exceptions/UpcloudApiException.php create mode 100644 fern/sdk/src/Exceptions/UpcloudException.php create mode 100644 fern/sdk/src/FileStorage/FileStorageClient.php create mode 100644 fern/sdk/src/FileStorage/Requests/CreateFileStorageAclRequest.php create mode 100644 fern/sdk/src/FileStorage/Requests/CreateFileStorageLabelRequest.php create mode 100644 fern/sdk/src/FileStorage/Requests/CreateFileStorageNetworkRequest.php create mode 100644 fern/sdk/src/FileStorage/Requests/CreateFileStorageShareRequest.php create mode 100644 fern/sdk/src/FileStorage/Requests/FileStorageAclModify.php create mode 100644 fern/sdk/src/FileStorage/Requests/FileStorageLabelModify.php create mode 100644 fern/sdk/src/FileStorage/Requests/FileStorageNetworkModify.php create mode 100644 fern/sdk/src/FileStorage/Requests/FileStorageServiceCreate.php create mode 100644 fern/sdk/src/FileStorage/Requests/FileStorageServiceModify.php create mode 100644 fern/sdk/src/FileStorage/Requests/FileStorageServiceReplace.php create mode 100644 fern/sdk/src/FileStorage/Requests/FileStorageShareModify.php create mode 100644 fern/sdk/src/FileStorage/Requests/ListFileStoragesRequest.php create mode 100644 fern/sdk/src/FirewallRuleset/FirewallRulesetClient.php create mode 100644 fern/sdk/src/FirewallRuleset/Requests/CreateFirewallRuleset.php create mode 100644 fern/sdk/src/FirewallRuleset/Requests/CreateFirewallRulesetLabelRequest.php create mode 100644 fern/sdk/src/FirewallRuleset/Requests/CreateFirewallRulesetRuleRequest.php create mode 100644 fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetFirewallMultipleRuleCreate.php create mode 100644 fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetFirewallRuleModify.php create mode 100644 fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetLabelModify.php create mode 100644 fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetModify.php create mode 100644 fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetServerFirewallRuleCreate.php create mode 100644 fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetServerMultipleFirewallRulesCreate.php create mode 100644 fern/sdk/src/FirewallRuleset/Requests/ListFirewallRulesetRulesRequest.php create mode 100644 fern/sdk/src/FirewallRuleset/Requests/ListFirewallRulesetsRequest.php create mode 100644 fern/sdk/src/FirewallRuleset/Requests/ListServerFirewallRuleRequest.php create mode 100644 fern/sdk/src/FirewallRuleset/Types/FirewallRulesetServerMultipleFirewallRulesCreateFirewallRules.php create mode 100644 fern/sdk/src/Gateway/GatewayClient.php create mode 100644 fern/sdk/src/Gateway/Requests/CreateGatewayConnectionRequest.php create mode 100644 fern/sdk/src/Gateway/Requests/CreateGatewayServiceLabelRequest.php create mode 100644 fern/sdk/src/Gateway/Requests/CreateGatewayTunnelRequest.php create mode 100644 fern/sdk/src/Gateway/Requests/GatewayAddressModifyRequest.php create mode 100644 fern/sdk/src/Gateway/Requests/GatewayLabelModifyRequest.php create mode 100644 fern/sdk/src/Gateway/Requests/GatewayServiceCreateRequest.php create mode 100644 fern/sdk/src/Gateway/Requests/GatewayServiceLogSessionCreateRequest.php create mode 100644 fern/sdk/src/Gateway/Requests/GatewayServiceModifyRequest.php create mode 100644 fern/sdk/src/Gateway/Requests/GatewayServiceReplaceRequest.php create mode 100644 fern/sdk/src/Gateway/Requests/ListGatewayPlansRequest.php create mode 100644 fern/sdk/src/Gateway/Requests/ListGatewayServicesRequest.php create mode 100644 fern/sdk/src/Gateway/Requests/ModifyGatewayConnectionRequest.php create mode 100644 fern/sdk/src/Gateway/Requests/ModifyGatewayTunnelRequest.php create mode 100644 fern/sdk/src/IpAddress/IpAddressClient.php create mode 100644 fern/sdk/src/IpAddress/Requests/AddIpAddressRequest.php create mode 100644 fern/sdk/src/IpAddress/Requests/BulkPatchIpAddressesRequestV13.php create mode 100644 fern/sdk/src/IpAddress/Requests/ModifyIpAddressRequestV10.php create mode 100644 fern/sdk/src/IpAddress/Requests/PatchIpAddressRequestV13.php create mode 100644 fern/sdk/src/IpAddress/Types/AddIpAddressRequestIpAddress.php create mode 100644 fern/sdk/src/IpAddress/Types/BulkPatchIpAddressesRequestV13IpAddressesItem.php create mode 100644 fern/sdk/src/IpAddress/Types/ModifyIpAddressRequestV10IpAddress.php create mode 100644 fern/sdk/src/IpAddress/Types/PatchIpAddressRequestV13IpAddress.php create mode 100644 fern/sdk/src/Kubernetes/KubernetesClient.php create mode 100644 fern/sdk/src/Kubernetes/Requests/CreateClusterAuthenticationRequest.php create mode 100644 fern/sdk/src/Kubernetes/Requests/CreateKubernetesClusterNodeGroupRequest.php create mode 100644 fern/sdk/src/Kubernetes/Requests/GetKubernetesClusterOidcKubeconfigRequest.php create mode 100644 fern/sdk/src/Kubernetes/Requests/KubernetesClusterPatch.php create mode 100644 fern/sdk/src/Kubernetes/Requests/KubernetesNodeGroupPatch.php create mode 100644 fern/sdk/src/Kubernetes/Requests/SetClusterAuthenticationRequest.php create mode 100644 fern/sdk/src/Kubernetes/Requests/UpdateClusterAuthenticationRequest.php create mode 100644 fern/sdk/src/Kubernetes/Requests/UpgradeKubernetesClusterRequest.php create mode 100644 fern/sdk/src/LoadBalancer/LoadBalancerClient.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerBackendRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerBackendTlsConfigRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerCertificateBundleLabelRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerFrontendRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerFrontendTlsConfigRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerIpAddressRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerLabelRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerMemberRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerResolverRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerRuleRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerBackendCombinedMetricsSeriesRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerBackendMetricsSeriesRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerFrontendCombinedMetricsSeriesRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerFrontendMetricsSeriesRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerMemberCombinedMetricsSeriesRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerMemberMetricsSeriesRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/ListLoadBalancerCertificateBundlesRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/ListLoadBalancerPlansRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/ListLoadBalancersRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/LoadBalancerBackendModify.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/LoadBalancerFrontendModify.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/LoadBalancerNetworkModify.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/LoadBalancerResolverModify.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/LoadBalancerRuleModify.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/LoadBalancerServiceCreate.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/LoadBalancerServiceModify.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/LoadBalancerServiceReplace.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerBackendTlsConfigRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerCertificateBundleLabelRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerCertificateBundleRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerFrontendTlsConfigRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerLabelRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerMemberRequest.php create mode 100644 fern/sdk/src/LoadBalancer/Requests/ReplaceLoadBalancerRuleRequest.php create mode 100644 fern/sdk/src/Network/NetworkClient.php create mode 100644 fern/sdk/src/Network/Requests/CreateNetworkRequest.php create mode 100644 fern/sdk/src/Network/Requests/ListNetworksRequest.php create mode 100644 fern/sdk/src/Network/Requests/ModifyNetworkRequest.php create mode 100644 fern/sdk/src/Network/Requests/NetworkCreateInterfaceRequest.php create mode 100644 fern/sdk/src/Network/Types/CreateNetworkRequestNetwork.php create mode 100644 fern/sdk/src/Network/Types/CreateNetworkRequestNetworkIpNetworks.php create mode 100644 fern/sdk/src/Network/Types/CreateNetworkRequestNetworkIpNetworksIpNetworkItem.php create mode 100644 fern/sdk/src/Network/Types/CreateNetworkRequestNetworkIpNetworksIpNetworkItemDhcpRoutesConfiguration.php create mode 100644 fern/sdk/src/Network/Types/CreateNetworkRequestNetworkIpNetworksIpNetworkItemDhcpRoutesConfigurationEffectiveRoutesAutoPopulation.php create mode 100644 fern/sdk/src/Network/Types/ModifyNetworkRequestNetwork.php create mode 100644 fern/sdk/src/Network/Types/ModifyNetworkRequestNetworkIpNetworks.php create mode 100644 fern/sdk/src/Network/Types/ModifyNetworkRequestNetworkIpNetworksIpNetworkItem.php create mode 100644 fern/sdk/src/Network/Types/NetworkCreateInterfaceRequestInterface.php create mode 100644 fern/sdk/src/Network/Types/NetworkCreateInterfaceRequestInterfaceLabelsItem.php create mode 100644 fern/sdk/src/NetworkPeering/NetworkPeeringClient.php create mode 100644 fern/sdk/src/NetworkPeering/Requests/ListNetworkPeeringsRequest.php create mode 100644 fern/sdk/src/NetworkPeering/Requests/NetworkPeeringCreate.php create mode 100644 fern/sdk/src/NetworkPeering/Requests/NetworkPeeringModify.php create mode 100644 fern/sdk/src/NetworkPeering/Types/NetworkPeeringCreateConfiguredStatus.php create mode 100644 fern/sdk/src/NetworkPeering/Types/NetworkPeeringCreateNetwork.php create mode 100644 fern/sdk/src/NetworkPeering/Types/NetworkPeeringCreatePeerNetwork.php create mode 100644 fern/sdk/src/NetworkPeering/Types/NetworkPeeringModifyConfiguredStatus.php create mode 100644 fern/sdk/src/ObjectStorage2/ObjectStorage2Client.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/AttachObjectStorageCustomDomainRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/AttachObjectStorageIamGroupPolicyRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/AttachObjectStoragePolicyToRoleRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/AttachObjectStorageUserPolicyRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageGroupInlinePolicyRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageLabelRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageNetworkRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageRoleInlinePolicyRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageRolePermissionsBoundaryRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageStaticWebsiteRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageUserInlinePolicyRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageUserPermissionsBoundaryRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/DeleteObjectStorageRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ListObjectStorageBucketMetricsRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ListObjectStorageMetricsSeriesRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ListObjectStoragesRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2AccessKeyModify.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2AssumeRolePolicyRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2BucketCreate.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2CustomDomainModify.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2GroupCreate.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2LabelModify.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2PolicyCreate.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2PolicySetDefaultVersion.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2PolicyVersionCreate.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2RoleCreate.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2RoleUpdate.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2ServiceCreate.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2ServiceModify.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2ServiceReplace.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2StaticWebsiteConfigModify.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2UserCreate.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ReplaceObjectStorageRoleTagsRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Requests/ReplaceObjectStorageUserTagsRequest.php create mode 100644 fern/sdk/src/ObjectStorage2/Types/ObjectStorage2AccessKeyModifyStatus.php create mode 100644 fern/sdk/src/ObjectStorage2/Types/ObjectStorage2CustomDomainModifyType.php create mode 100644 fern/sdk/src/Partner/PartnerClient.php create mode 100644 fern/sdk/src/Partner/Requests/PartnerCreateAccount.php create mode 100644 fern/sdk/src/Partner/Types/PartnerCreateAccountContactDetails.php create mode 100644 fern/sdk/src/Permission/PermissionClient.php create mode 100644 fern/sdk/src/Permission/Requests/GrantPermissionRequest.php create mode 100644 fern/sdk/src/Permission/Requests/RevokeAllPermissionsByTargetRequest.php create mode 100644 fern/sdk/src/Plan/PlanClient.php create mode 100644 fern/sdk/src/Price/PriceClient.php create mode 100644 fern/sdk/src/Price/Requests/GetPriceRequest.php create mode 100644 fern/sdk/src/Router/Requests/ListRoutersRequest.php create mode 100644 fern/sdk/src/Router/Requests/RouterCreate.php create mode 100644 fern/sdk/src/Router/Requests/RouterModify.php create mode 100644 fern/sdk/src/Router/RouterClient.php create mode 100644 fern/sdk/src/Router/Types/RouterCreateRouter.php create mode 100644 fern/sdk/src/Router/Types/RouterCreateRouterStaticRoutesItem.php create mode 100644 fern/sdk/src/Router/Types/RouterCreateRouterStaticRoutesItemNexthopOne.php create mode 100644 fern/sdk/src/Router/Types/RouterModifyRouter.php create mode 100644 fern/sdk/src/Router/Types/RouterModifyRouterStaticRoutesItem.php create mode 100644 fern/sdk/src/Router/Types/RouterModifyRouterStaticRoutesItemNexthopOne.php create mode 100644 fern/sdk/src/Server/Requests/CreateServer.php create mode 100644 fern/sdk/src/Server/Requests/DeleteServerRequest.php create mode 100644 fern/sdk/src/Server/Requests/ListServersRequest.php create mode 100644 fern/sdk/src/Server/Requests/ModifyServer.php create mode 100644 fern/sdk/src/Server/Requests/RelocateServer.php create mode 100644 fern/sdk/src/Server/Requests/RestartServer.php create mode 100644 fern/sdk/src/Server/Requests/ServerAddInterface.php create mode 100644 fern/sdk/src/Server/Requests/ServerAddIpAddress.php create mode 100644 fern/sdk/src/Server/Requests/ServerAttachPrivateFirewallRuleset.php create mode 100644 fern/sdk/src/Server/Requests/ServerAttachStorage.php create mode 100644 fern/sdk/src/Server/Requests/ServerCreateFirewallRule.php create mode 100644 fern/sdk/src/Server/Requests/ServerDetachPrivateFirewallRuleset.php create mode 100644 fern/sdk/src/Server/Requests/ServerDetachStorage.php create mode 100644 fern/sdk/src/Server/Requests/ServerLoadCdrom.php create mode 100644 fern/sdk/src/Server/Requests/ServerModifyInterface.php create mode 100644 fern/sdk/src/Server/Requests/ServerRebuild.php create mode 100644 fern/sdk/src/Server/Requests/ServerUpdateFirewallRules.php create mode 100644 fern/sdk/src/Server/Requests/StartServer.php create mode 100644 fern/sdk/src/Server/Requests/StopServer.php create mode 100644 fern/sdk/src/Server/ServerClient.php create mode 100644 fern/sdk/src/Server/Types/CreateServerServer.php create mode 100644 fern/sdk/src/Server/Types/DeleteServerRequestBackups.php create mode 100644 fern/sdk/src/Server/Types/GetDiskStatsByPeriodRequestType.php create mode 100644 fern/sdk/src/Server/Types/GetDiskStatsRequestType.php create mode 100644 fern/sdk/src/Server/Types/ListServersRequestOrderBy.php create mode 100644 fern/sdk/src/Server/Types/ListServersRequestSortBy.php create mode 100644 fern/sdk/src/Server/Types/ListServersRequestState.php create mode 100644 fern/sdk/src/Server/Types/ModifyServerServer.php create mode 100644 fern/sdk/src/Server/Types/ModifyServerServerFirewallPrivateDefaultIncomingAction.php create mode 100644 fern/sdk/src/Server/Types/ModifyServerServerFirewallPrivateDefaultOutgoingAction.php create mode 100644 fern/sdk/src/Server/Types/ModifyServerServerFirewallPublicDefaultIncomingAction.php create mode 100644 fern/sdk/src/Server/Types/ModifyServerServerFirewallPublicDefaultOutgoingAction.php create mode 100644 fern/sdk/src/Server/Types/RestartServerRestartServerStopType.php create mode 100644 fern/sdk/src/Server/Types/RestartServerRestartServerStopTypeStopType.php create mode 100644 fern/sdk/src/Server/Types/ServerAddInterfaceInterface.php create mode 100644 fern/sdk/src/Server/Types/ServerAddInterfaceInterfaceIpAddresses.php create mode 100644 fern/sdk/src/Server/Types/ServerAddInterfaceInterfaceIpAddressesIpAddressItem.php create mode 100644 fern/sdk/src/Server/Types/ServerAddIpAddressIpAddress.php create mode 100644 fern/sdk/src/Server/Types/ServerAttachPrivateFirewallRulesetFirewallRuleset.php create mode 100644 fern/sdk/src/Server/Types/ServerAttachStorageStorageDevice.php create mode 100644 fern/sdk/src/Server/Types/ServerAttachStorageStorageDeviceType.php create mode 100644 fern/sdk/src/Server/Types/ServerCreateFirewallRuleFirewallRule.php create mode 100644 fern/sdk/src/Server/Types/ServerCreateFirewallRuleFirewallRuleAction.php create mode 100644 fern/sdk/src/Server/Types/ServerCreateFirewallRuleFirewallRuleDirection.php create mode 100644 fern/sdk/src/Server/Types/ServerCreateFirewallRuleFirewallRuleFamily.php create mode 100644 fern/sdk/src/Server/Types/ServerCreateFirewallRuleFirewallRuleProtocol.php create mode 100644 fern/sdk/src/Server/Types/ServerDetachPrivateFirewallRulesetFirewallRuleset.php create mode 100644 fern/sdk/src/Server/Types/ServerLoadCdromStorageDevice.php create mode 100644 fern/sdk/src/Server/Types/ServerModifyInterfaceInterface.php create mode 100644 fern/sdk/src/Server/Types/ServerModifyInterfaceInterfaceIpAddresses.php create mode 100644 fern/sdk/src/Server/Types/ServerModifyInterfaceInterfaceIpAddressesIpAddressItem.php create mode 100644 fern/sdk/src/Server/Types/ServerRebuildServerRebuild.php create mode 100644 fern/sdk/src/Server/Types/ServerRebuildServerRebuildLoginUser.php create mode 100644 fern/sdk/src/Server/Types/ServerRebuildServerRebuildLoginUserSshKeys.php create mode 100644 fern/sdk/src/Server/Types/ServerRebuildServerRebuildPasswordDelivery.php create mode 100644 fern/sdk/src/Server/Types/ServerUpdateFirewallRulesFirewallRules.php create mode 100644 fern/sdk/src/Server/Types/StartServerServer.php create mode 100644 fern/sdk/src/Server/Types/StartServerServerStartType.php create mode 100644 fern/sdk/src/Server/Types/StopServerStopServer.php create mode 100644 fern/sdk/src/Server/Types/StopServerStopServerStopType.php create mode 100644 fern/sdk/src/ServerGroup/Requests/ListServerGroupsRequest.php create mode 100644 fern/sdk/src/ServerGroup/Requests/ModifyServerGroupRequest.php create mode 100644 fern/sdk/src/ServerGroup/Requests/ServerGroupServerAdd.php create mode 100644 fern/sdk/src/ServerGroup/ServerGroupClient.php create mode 100644 fern/sdk/src/ServerGroup/Types/ServerGroupServerAddServer.php create mode 100644 fern/sdk/src/ServerSize/ServerSizeClient.php create mode 100644 fern/sdk/src/Storage/Requests/AttachStorageRequest.php create mode 100644 fern/sdk/src/Storage/Requests/CloneStorageRequest.php create mode 100644 fern/sdk/src/Storage/Requests/CreateStorageBackupRequest.php create mode 100644 fern/sdk/src/Storage/Requests/CreateStorageImportRequest.php create mode 100644 fern/sdk/src/Storage/Requests/CreateStorageRequest.php create mode 100644 fern/sdk/src/Storage/Requests/CreateStorageTemplateRequest.php create mode 100644 fern/sdk/src/Storage/Requests/DeleteStorageRequest.php create mode 100644 fern/sdk/src/Storage/Requests/GetStorageListByBackupRequest.php create mode 100644 fern/sdk/src/Storage/Requests/GetStorageListByCdromRequest.php create mode 100644 fern/sdk/src/Storage/Requests/GetStorageListByNormalRequest.php create mode 100644 fern/sdk/src/Storage/Requests/GetStorageListByPrivateAccessRequest.php create mode 100644 fern/sdk/src/Storage/Requests/GetStorageListByPublicAccessRequest.php create mode 100644 fern/sdk/src/Storage/Requests/GetStorageListByTemplateRequest.php create mode 100644 fern/sdk/src/Storage/Requests/GetStorageListByTypeAndAccessRequest.php create mode 100644 fern/sdk/src/Storage/Requests/GetStorageListRequest.php create mode 100644 fern/sdk/src/Storage/Requests/ModifyStorageBody.php create mode 100644 fern/sdk/src/Storage/StorageClient.php create mode 100644 fern/sdk/src/Storage/Types/AttachStorageRequestStorageDevice.php create mode 100644 fern/sdk/src/Storage/Types/AttachStorageRequestStorageDeviceBootDisk.php create mode 100644 fern/sdk/src/Storage/Types/AttachStorageRequestStorageDeviceType.php create mode 100644 fern/sdk/src/Storage/Types/CloneStorageRequestStorage.php create mode 100644 fern/sdk/src/Storage/Types/CreateStorageBackupRequestStorage.php create mode 100644 fern/sdk/src/Storage/Types/CreateStorageImportRequestStorageImport.php create mode 100644 fern/sdk/src/Storage/Types/CreateStorageImportRequestStorageImportSource.php create mode 100644 fern/sdk/src/Storage/Types/CreateStorageRequestStorage.php create mode 100644 fern/sdk/src/Storage/Types/CreateStorageTemplateRequestStorage.php create mode 100644 fern/sdk/src/Storage/Types/DeleteStorageRequestBackups.php create mode 100644 fern/sdk/src/Storage/Types/ModifyStorageBodyStorage.php create mode 100644 fern/sdk/src/Storage/Types/ModifyStorageBodyStorageFilesystemResize.php create mode 100644 fern/sdk/src/Tag/Requests/ModifyTagRequest.php create mode 100644 fern/sdk/src/Tag/TagClient.php create mode 100644 fern/sdk/src/Timezone/TimezoneClient.php create mode 100644 fern/sdk/src/Traits/DatabaseServiceTaskBaseResponse.php create mode 100644 fern/sdk/src/Traits/LoadBalancerAvgTimeMetricsResponse.php create mode 100644 fern/sdk/src/Traits/LoadBalancerCommonMetricsResponse.php create mode 100644 fern/sdk/src/Traits/LoadBalancerMatchIntResponse.php create mode 100644 fern/sdk/src/Traits/LoadBalancerMatchStringResponse.php create mode 100644 fern/sdk/src/Traits/LoadBalancerRequestMetricsResponse.php create mode 100644 fern/sdk/src/Traits/LoadBalancerServerMetricsResponse.php create mode 100644 fern/sdk/src/Traits/ServerFirewallRuleRequirements.php create mode 100644 fern/sdk/src/Types/Account.php create mode 100644 fern/sdk/src/Types/AccountBillingSummary.php create mode 100644 fern/sdk/src/Types/AccountBillingSummaryResponse.php create mode 100644 fern/sdk/src/Types/AccountBooleanYesno.php create mode 100644 fern/sdk/src/Types/AccountCreateMsLmaSigningLinkResponse.php create mode 100644 fern/sdk/src/Types/AccountCreateMsLmaSigningLinkResponseSigningStatus.php create mode 100644 fern/sdk/src/Types/AccountCreateMsLmaSigningLinkResponseSigningStatusState.php create mode 100644 fern/sdk/src/Types/AccountCreditsBreakdown.php create mode 100644 fern/sdk/src/Types/AccountCreditsBreakdownAccountCredits.php create mode 100644 fern/sdk/src/Types/AccountCreditsBreakdownAccountFreeCredits.php create mode 100644 fern/sdk/src/Types/AccountCreditsBreakdownAccountFreeCreditsBreakdownItem.php create mode 100644 fern/sdk/src/Types/AccountCurrentNetworkUsage.php create mode 100644 fern/sdk/src/Types/AccountCurrentNetworkUsageStats.php create mode 100644 fern/sdk/src/Types/AccountCurrentNetworkUsageStatsCurrentNetworkUsage.php create mode 100644 fern/sdk/src/Types/AccountDetails.php create mode 100644 fern/sdk/src/Types/AccountError.php create mode 100644 fern/sdk/src/Types/AccountErrorError.php create mode 100644 fern/sdk/src/Types/AccountLabel.php create mode 100644 fern/sdk/src/Types/AccountNetworkUsage.php create mode 100644 fern/sdk/src/Types/AccountNetworkUsageStats.php create mode 100644 fern/sdk/src/Types/AccountNetworkUsageStatsStatItem.php create mode 100644 fern/sdk/src/Types/AccountResourceBillingSummaryResponse.php create mode 100644 fern/sdk/src/Types/AccountResourceBillingSummaryResponseBilling.php create mode 100644 fern/sdk/src/Types/AccountResourceLimits.php create mode 100644 fern/sdk/src/Types/AccountResourceNetworkUsage.php create mode 100644 fern/sdk/src/Types/AccountResourceNetworkUsageStats.php create mode 100644 fern/sdk/src/Types/AccountResourceNetworkUsageStatsStatItem.php create mode 100644 fern/sdk/src/Types/AccountResourceNetworkUsageType.php create mode 100644 fern/sdk/src/Types/AccountTokensCreateTokenRequestExpiresAt.php create mode 100644 fern/sdk/src/Types/AccountTokensCreateTokenRequestExpiresIn.php create mode 100644 fern/sdk/src/Types/AccountTokensGetTokenResponse.php create mode 100644 fern/sdk/src/Types/AccountTokensProblem.php create mode 100644 fern/sdk/src/Types/AccountTokensProblem400.php create mode 100644 fern/sdk/src/Types/AccountTokensProblem400InvalidParamsItem.php create mode 100644 fern/sdk/src/Types/AccountTokensProblem400Type.php create mode 100644 fern/sdk/src/Types/AccountTokensProblem401.php create mode 100644 fern/sdk/src/Types/AccountTokensProblem401InvalidParamsItem.php create mode 100644 fern/sdk/src/Types/AccountTokensProblem401Type.php create mode 100644 fern/sdk/src/Types/AccountTokensProblem403.php create mode 100644 fern/sdk/src/Types/AccountTokensProblem403InvalidParamsItem.php create mode 100644 fern/sdk/src/Types/AccountTokensProblem403Type.php create mode 100644 fern/sdk/src/Types/AccountTokensProblem404.php create mode 100644 fern/sdk/src/Types/AccountTokensProblem404InvalidParamsItem.php create mode 100644 fern/sdk/src/Types/AccountTokensProblem404Type.php create mode 100644 fern/sdk/src/Types/AccountTokensProblem409.php create mode 100644 fern/sdk/src/Types/AccountTokensProblem409InvalidParamsItem.php create mode 100644 fern/sdk/src/Types/AccountTokensProblem409Type.php create mode 100644 fern/sdk/src/Types/AccountTokensProblemInvalidParamsItem.php create mode 100644 fern/sdk/src/Types/AccountTokensToken.php create mode 100644 fern/sdk/src/Types/AccountUsageAccumulateParameter.php create mode 100644 fern/sdk/src/Types/Accounts.php create mode 100644 fern/sdk/src/Types/AccountsAccounts.php create mode 100644 fern/sdk/src/Types/AccountsAccountsAccountItem.php create mode 100644 fern/sdk/src/Types/AccountsAccountsAccountItemRoles.php create mode 100644 fern/sdk/src/Types/AccountsAccountsAccountItemType.php create mode 100644 fern/sdk/src/Types/AttachStorageResponse.php create mode 100644 fern/sdk/src/Types/AuditLogsActionsParameterItem.php create mode 100644 fern/sdk/src/Types/AuditLogsAuditLog.php create mode 100644 fern/sdk/src/Types/AuditLogsAuditLogAction.php create mode 100644 fern/sdk/src/Types/AuditLogsAuditLogOrigin.php create mode 100644 fern/sdk/src/Types/AuditLogsAuditLogResourceType.php create mode 100644 fern/sdk/src/Types/AuditLogsErrorResponse.php create mode 100644 fern/sdk/src/Types/AuditLogsErrorResponseInvalidParamsItem.php create mode 100644 fern/sdk/src/Types/AuditLogsFilterOptionsResponse.php create mode 100644 fern/sdk/src/Types/AuditLogsFilterOptionsResponseActionsItem.php create mode 100644 fern/sdk/src/Types/AuditLogsFilterOptionsResponseOriginsItem.php create mode 100644 fern/sdk/src/Types/AuditLogsFilterOptionsResponseResourceTypesItem.php create mode 100644 fern/sdk/src/Types/AuditLogsFormatParameter.php create mode 100644 fern/sdk/src/Types/AuditLogsOriginsParameterItem.php create mode 100644 fern/sdk/src/Types/AuditLogsResourceTypesParameterItem.php create mode 100644 fern/sdk/src/Types/AuditLogsResponse.php create mode 100644 fern/sdk/src/Types/CreateServerResponse.php create mode 100644 fern/sdk/src/Types/CreateStorageBackupResponse.php create mode 100644 fern/sdk/src/Types/CreateStorageResponse.php create mode 100644 fern/sdk/src/Types/CreateStorageTemplateResponse.php create mode 100644 fern/sdk/src/Types/CurrencyCurrencies.php create mode 100644 fern/sdk/src/Types/CurrencyCurrenciesCurrencies.php create mode 100644 fern/sdk/src/Types/CurrencyCurrenciesCurrenciesCurrencyItem.php create mode 100644 fern/sdk/src/Types/CurrencyError.php create mode 100644 fern/sdk/src/Types/CurrencyErrorError.php create mode 100644 fern/sdk/src/Types/DatabaseAccessControlSettingsResponse.php create mode 100644 fern/sdk/src/Types/DatabaseAccountCaResponse.php create mode 100644 fern/sdk/src/Types/DatabaseAclResponse.php create mode 100644 fern/sdk/src/Types/DatabaseAvailableExtensionsResponseItem.php create mode 100644 fern/sdk/src/Types/DatabaseBackupConfigOpenSearchResponse.php create mode 100644 fern/sdk/src/Types/DatabaseBackupConfigResponse.php create mode 100644 fern/sdk/src/Types/DatabaseBackupResponse.php create mode 100644 fern/sdk/src/Types/DatabaseConnectionPoolResponse.php create mode 100644 fern/sdk/src/Types/DatabaseCurrentSessionsResponse.php create mode 100644 fern/sdk/src/Types/DatabaseDependencyResponse.php create mode 100644 fern/sdk/src/Types/DatabaseErrorResponse.php create mode 100644 fern/sdk/src/Types/DatabaseErrorResponseError.php create mode 100644 fern/sdk/src/Types/DatabaseIndexResponse.php create mode 100644 fern/sdk/src/Types/DatabaseIntegrationEndpoint.php create mode 100644 fern/sdk/src/Types/DatabaseIntegrationEndpointResponse.php create mode 100644 fern/sdk/src/Types/DatabaseIntegrationNodeStateResponse.php create mode 100644 fern/sdk/src/Types/DatabaseLabelCreate.php create mode 100644 fern/sdk/src/Types/DatabaseLabelInformationResponse.php create mode 100644 fern/sdk/src/Types/DatabaseLabelResponse.php create mode 100644 fern/sdk/src/Types/DatabaseLogEntryResponse.php create mode 100644 fern/sdk/src/Types/DatabaseLogListResponse.php create mode 100644 fern/sdk/src/Types/DatabaseMaintenanceDow.php create mode 100644 fern/sdk/src/Types/DatabaseMaintenancePendingUpdatesResponse.php create mode 100644 fern/sdk/src/Types/DatabaseMaintenanceWindowResponse.php create mode 100644 fern/sdk/src/Types/DatabaseMetricsColumnHeaderResponse.php create mode 100644 fern/sdk/src/Types/DatabaseMetricsDataResponse.php create mode 100644 fern/sdk/src/Types/DatabaseMetricsItemResponse.php create mode 100644 fern/sdk/src/Types/DatabaseMetricsItemResponseHints.php create mode 100644 fern/sdk/src/Types/DatabaseMigrationStatusDetailsResponse.php create mode 100644 fern/sdk/src/Types/DatabaseMysqlCurrentSessionResponse.php create mode 100644 fern/sdk/src/Types/DatabaseNetworkCreate.php create mode 100644 fern/sdk/src/Types/DatabaseNetworkFamily.php create mode 100644 fern/sdk/src/Types/DatabaseNetworkInformationDetailsResponse.php create mode 100644 fern/sdk/src/Types/DatabaseNetworkInformationDetailsResponseFamily.php create mode 100644 fern/sdk/src/Types/DatabaseNetworkInformationDetailsResponseType.php create mode 100644 fern/sdk/src/Types/DatabaseNetworkType.php create mode 100644 fern/sdk/src/Types/DatabaseNodeProgressUpdateResponse.php create mode 100644 fern/sdk/src/Types/DatabaseNodeStateResponse.php create mode 100644 fern/sdk/src/Types/DatabaseOpenSearchAccessControlResponse.php create mode 100644 fern/sdk/src/Types/DatabaseOpenSearchAccessControlRuleResponse.php create mode 100644 fern/sdk/src/Types/DatabaseOpenSearchSecurityPluginStatusResponse.php create mode 100644 fern/sdk/src/Types/DatabasePeeringStatusResponse.php create mode 100644 fern/sdk/src/Types/DatabasePgAccessControlResponse.php create mode 100644 fern/sdk/src/Types/DatabasePgAvailableExtensionsResponseItem.php create mode 100644 fern/sdk/src/Types/DatabasePgAvailableExtensionsResponseItemExtensionsItem.php create mode 100644 fern/sdk/src/Types/DatabasePgCurrentSessionResponse.php create mode 100644 fern/sdk/src/Types/DatabasePlanComponentsResponse.php create mode 100644 fern/sdk/src/Types/DatabasePlanComponentsResponseBackups.php create mode 100644 fern/sdk/src/Types/DatabasePlanComponentsResponseBackupsFrequent.php create mode 100644 fern/sdk/src/Types/DatabasePlanComponentsResponseBackupsInfrequent.php create mode 100644 fern/sdk/src/Types/DatabasePlanComponentsResponseBackupsName.php create mode 100644 fern/sdk/src/Types/DatabasePlanComponentsResponseCompute.php create mode 100644 fern/sdk/src/Types/DatabasePlanComponentsResponseComputeFamily.php create mode 100644 fern/sdk/src/Types/DatabasePlanComponentsResponseStorage.php create mode 100644 fern/sdk/src/Types/DatabasePlansResponse.php create mode 100644 fern/sdk/src/Types/DatabasePlansResponseServiceTypesItem.php create mode 100644 fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemBackupTiersItem.php create mode 100644 fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemComputeShapesItem.php create mode 100644 fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemComputeShapesItemBackupsItem.php create mode 100644 fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemComputeShapesItemFamily.php create mode 100644 fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemComputeShapesItemStorage.php create mode 100644 fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemComputeShapesItemStorageOptionsItem.php create mode 100644 fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemType.php create mode 100644 fern/sdk/src/Types/DatabaseProjectAlertResponse.php create mode 100644 fern/sdk/src/Types/DatabasePropertySchemaResponse.php create mode 100644 fern/sdk/src/Types/DatabaseQueryParamSort.php create mode 100644 fern/sdk/src/Types/DatabaseQueryStatisticsMysqlResponse.php create mode 100644 fern/sdk/src/Types/DatabaseQueryStatisticsPgResponse.php create mode 100644 fern/sdk/src/Types/DatabaseQueryStatisticsResponse.php create mode 100644 fern/sdk/src/Types/DatabaseRedisAccessControlResponse.php create mode 100644 fern/sdk/src/Types/DatabaseRedisValkeyCurrentSessionResponse.php create mode 100644 fern/sdk/src/Types/DatabaseServiceAlertResponse.php create mode 100644 fern/sdk/src/Types/DatabaseServiceCloneMysql.php create mode 100644 fern/sdk/src/Types/DatabaseServiceCloneMysqlMaintenance.php create mode 100644 fern/sdk/src/Types/DatabaseServiceCloneMysqlPlanBackups.php create mode 100644 fern/sdk/src/Types/DatabaseServiceCloneOpensearch.php create mode 100644 fern/sdk/src/Types/DatabaseServiceCloneOpensearchMaintenance.php create mode 100644 fern/sdk/src/Types/DatabaseServiceCloneOpensearchPlanBackups.php create mode 100644 fern/sdk/src/Types/DatabaseServiceClonePg.php create mode 100644 fern/sdk/src/Types/DatabaseServiceClonePgMaintenance.php create mode 100644 fern/sdk/src/Types/DatabaseServiceClonePgPlanBackups.php create mode 100644 fern/sdk/src/Types/DatabaseServiceCloneRedis.php create mode 100644 fern/sdk/src/Types/DatabaseServiceCloneRedisMaintenance.php create mode 100644 fern/sdk/src/Types/DatabaseServiceCloneRedisPlanBackups.php create mode 100644 fern/sdk/src/Types/DatabaseServiceCloneValkey.php create mode 100644 fern/sdk/src/Types/DatabaseServiceCloneValkeyMaintenance.php create mode 100644 fern/sdk/src/Types/DatabaseServiceCloneValkeyPlanBackups.php create mode 100644 fern/sdk/src/Types/DatabaseServiceComponentResponse.php create mode 100644 fern/sdk/src/Types/DatabaseServiceInformationResponse.php create mode 100644 fern/sdk/src/Types/DatabaseServiceIntegration.php create mode 100644 fern/sdk/src/Types/DatabaseServiceIntegrationCreate.php create mode 100644 fern/sdk/src/Types/DatabaseServiceIntegrationResponse.php create mode 100644 fern/sdk/src/Types/DatabaseServiceMigrationStatusResponse.php create mode 100644 fern/sdk/src/Types/DatabaseServiceNetworkDetailsResponse.php create mode 100644 fern/sdk/src/Types/DatabaseServicePlanResponse.php create mode 100644 fern/sdk/src/Types/DatabaseServicePlanResponseZones.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesMysql.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesMysqlInternalTmpMemStorageEngine.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesMysqlLogOutput.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesMysqlMigration.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesMysqlMigrationDumpTool.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesMysqlMigrationMethod.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesMysqlMysqlIncrementalBackup.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesMysqlVersion.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearch.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchAuthFailureListeners.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchAuthFailureListenersInternalAuthenticationBackendLimiting.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchAuthFailureListenersInternalAuthenticationBackendLimitingAuthenticationBackend.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchAuthFailureListenersInternalAuthenticationBackendLimitingType.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchClusterRemoteStore.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchClusterSearchRequestSlowlog.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchClusterSearchRequestSlowlogLevel.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchClusterSearchRequestSlowlogThreshold.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItem.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsAccessKey.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsAccount.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsCredentials.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsCredentialsCredentials.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemType.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItem.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemSettingsAccessKey.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemSettingsAccount.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemSettingsCredentials.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemSettingsCredentialsCredentials.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemType.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchDiskWatermarks.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchElasticsearchVersion.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchIndexPatternsItem.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchIndexPatternsItemSortingAlgorithm.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchIndexRollup.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchIndexTemplate.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchJwt.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchOpenid.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchOpensearchDashboards.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchRemoteStore.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSaml.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressure.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressureMode.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressureNodeDuress.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressureSearchShardTask.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressureSearchTask.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchInsightsTopQueries.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchInsightsTopQueriesCpu.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchInsightsTopQueriesLatency.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchInsightsTopQueriesMemory.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSegrep.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressure.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressureOperatingFactor.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressurePrimaryParameter.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressurePrimaryParameterNode.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressurePrimaryParameterShard.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesOpensearchVersion.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPg.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgDefaultToastCompression.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgIoMethod.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgLogErrorVerbosity.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgLogLinePrefix.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgMigration.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgMigrationMethod.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgPasswordEncryption.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgPgStatPlansTrack.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgPgStatStatementsTrack.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgPgaudit.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgPgauditLogItem.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgPgauditLogLevel.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgPgbouncer.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgPgbouncerAutodbPoolMode.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgPgbouncerIgnoreStartupParametersItem.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgPglookout.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgSynchronousCommit.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgSynchronousReplication.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgTimescaledb.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgTrackCommitTimestamp.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgTrackFunctions.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgTrackIoTiming.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgVariant.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesPgVersion.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesRedis.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesRedisMigration.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesRedisMigrationMethod.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesRedisRedisAclChannelsDefault.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesRedisRedisMaxmemoryPolicy.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesRedisRedisPersistence.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesRedisRedisVersion.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesValkey.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesValkeyMigration.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesValkeyMigrationMethod.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesValkeyValkeyAclChannelsDefault.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesValkeyValkeyMaxmemoryPolicy.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesValkeyValkeyPersistence.php create mode 100644 fern/sdk/src/Types/DatabaseServicePropertiesValkeyValkeyVersion.php create mode 100644 fern/sdk/src/Types/DatabaseServiceStatusResponse.php create mode 100644 fern/sdk/src/Types/DatabaseServiceTaskBaseResponse.php create mode 100644 fern/sdk/src/Types/DatabaseServiceTaskDetailsResponse.php create mode 100644 fern/sdk/src/Types/DatabaseServiceTaskResponse.php create mode 100644 fern/sdk/src/Types/DatabaseServiceType.php create mode 100644 fern/sdk/src/Types/DatabaseServiceTypeResponse.php create mode 100644 fern/sdk/src/Types/DatabaseUpCloudApiResponse.php create mode 100644 fern/sdk/src/Types/DatabaseUpCloudApiResponseErrorsItem.php create mode 100644 fern/sdk/src/Types/DatabaseUserResponse.php create mode 100644 fern/sdk/src/Types/DatabaseValkeyAccessControlResponse.php create mode 100644 fern/sdk/src/Types/DatabaseVersionsResponseItem.php create mode 100644 fern/sdk/src/Types/DatabaseVersionsResponseItemServiceType.php create mode 100644 fern/sdk/src/Types/DatabaseVersionsResponseItemState.php create mode 100644 fern/sdk/src/Types/DatabaseZoneInfoResponse.php create mode 100644 fern/sdk/src/Types/DetachStorageResponse.php create mode 100644 fern/sdk/src/Types/DeviceError.php create mode 100644 fern/sdk/src/Types/DeviceErrorError.php create mode 100644 fern/sdk/src/Types/DevicesValue.php create mode 100644 fern/sdk/src/Types/DevicesValueGpuPlansValue.php create mode 100644 fern/sdk/src/Types/Events.php create mode 100644 fern/sdk/src/Types/EventsError.php create mode 100644 fern/sdk/src/Types/EventsErrorError.php create mode 100644 fern/sdk/src/Types/EventsEventType.php create mode 100644 fern/sdk/src/Types/EventsEvents.php create mode 100644 fern/sdk/src/Types/EventsEventsEventItem.php create mode 100644 fern/sdk/src/Types/FileStorageAclCreate.php create mode 100644 fern/sdk/src/Types/FileStorageAclDetailResponse.php create mode 100644 fern/sdk/src/Types/FileStorageConfiguredStatus.php create mode 100644 fern/sdk/src/Types/FileStorageErrorResponse.php create mode 100644 fern/sdk/src/Types/FileStorageErrorResponseInvalidParamsItem.php create mode 100644 fern/sdk/src/Types/FileStorageErrorResponseType.php create mode 100644 fern/sdk/src/Types/FileStorageLabelCreate.php create mode 100644 fern/sdk/src/Types/FileStorageLabelDetails.php create mode 100644 fern/sdk/src/Types/FileStorageNetworkCreate.php create mode 100644 fern/sdk/src/Types/FileStorageNetworkDetailResponse.php create mode 100644 fern/sdk/src/Types/FileStorageNetworkFamily.php create mode 100644 fern/sdk/src/Types/FileStoragePermission.php create mode 100644 fern/sdk/src/Types/FileStorageQueryParamSort.php create mode 100644 fern/sdk/src/Types/FileStorageServiceDetailResponse.php create mode 100644 fern/sdk/src/Types/FileStorageServiceDetailResponseStateMessagesItem.php create mode 100644 fern/sdk/src/Types/FileStorageShareCreate.php create mode 100644 fern/sdk/src/Types/FileStorageShareDetailResponse.php create mode 100644 fern/sdk/src/Types/FileStorageShareDetailResponseAclItem.php create mode 100644 fern/sdk/src/Types/FirewallRulesetCreateLabel.php create mode 100644 fern/sdk/src/Types/FirewallRulesetDetailResponse.php create mode 100644 fern/sdk/src/Types/FirewallRulesetErrorLegacyResponse.php create mode 100644 fern/sdk/src/Types/FirewallRulesetErrorLegacyResponseError.php create mode 100644 fern/sdk/src/Types/FirewallRulesetErrorResponse.php create mode 100644 fern/sdk/src/Types/FirewallRulesetFirewallRuleCreate.php create mode 100644 fern/sdk/src/Types/FirewallRulesetFirewallRuleListResponse.php create mode 100644 fern/sdk/src/Types/FirewallRulesetLabelDetailResponse.php create mode 100644 fern/sdk/src/Types/FirewallRulesetRelatedServers.php create mode 100644 fern/sdk/src/Types/FirewallRulesetRelatedServersServersItem.php create mode 100644 fern/sdk/src/Types/FirewallRulesetRelatedServersServersItemFirewallPrivateDefaultIncomingAction.php create mode 100644 fern/sdk/src/Types/FirewallRulesetRelatedServersServersItemFirewallPrivateDefaultOutgoingAction.php create mode 100644 fern/sdk/src/Types/FirewallRulesetRuleAction.php create mode 100644 fern/sdk/src/Types/FirewallRulesetRuleDetailResponse.php create mode 100644 fern/sdk/src/Types/FirewallRulesetRuleDirection.php create mode 100644 fern/sdk/src/Types/FirewallRulesetRuleFamily.php create mode 100644 fern/sdk/src/Types/FirewallRulesetRuleProtocol.php create mode 100644 fern/sdk/src/Types/FirewallRulesetServerFirewallDetailResponse.php create mode 100644 fern/sdk/src/Types/FirewallRulesetServerFirewallRule.php create mode 100644 fern/sdk/src/Types/FirewallRulesetServerFirewallRuleDetail.php create mode 100644 fern/sdk/src/Types/FirewallRulesetServerFirewallRules.php create mode 100644 fern/sdk/src/Types/GatewayAddress.php create mode 100644 fern/sdk/src/Types/GatewayAddressCreateRequest.php create mode 100644 fern/sdk/src/Types/GatewayAddressDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayAuthenticationDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayConnectionCreateRequest.php create mode 100644 fern/sdk/src/Types/GatewayConnectionDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayConnectionModifyRequest.php create mode 100644 fern/sdk/src/Types/GatewayConnectionRouteDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayConnectionRouteRequest.php create mode 100644 fern/sdk/src/Types/GatewayConnectionRouteType.php create mode 100644 fern/sdk/src/Types/GatewayConnectionType.php create mode 100644 fern/sdk/src/Types/GatewayErrorResponse.php create mode 100644 fern/sdk/src/Types/GatewayIpsecAuthenticationType.php create mode 100644 fern/sdk/src/Types/GatewayIpsecDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponseChildSasItem.php create mode 100644 fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponseChildSasItemState.php create mode 100644 fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponseHeuristicState.php create mode 100644 fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponseInternalState.php create mode 100644 fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponseOperationalState.php create mode 100644 fern/sdk/src/Types/GatewayIpsecMetricsDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayLabelCreateRequest.php create mode 100644 fern/sdk/src/Types/GatewayLabelDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayLocalPeerAddressDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayMetricsDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayPlanDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayQueryParamSortServices.php create mode 100644 fern/sdk/src/Types/GatewayRemotePeerAddressDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayRouterCreateRequest.php create mode 100644 fern/sdk/src/Types/GatewayRouterDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayServiceConfiguredStatus.php create mode 100644 fern/sdk/src/Types/GatewayServiceDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayServiceFeatures.php create mode 100644 fern/sdk/src/Types/GatewayServiceLogSessionCreateResponse.php create mode 100644 fern/sdk/src/Types/GatewayServiceLogSessionDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayServiceLogSessionTypes.php create mode 100644 fern/sdk/src/Types/GatewayServiceMetricsResponse.php create mode 100644 fern/sdk/src/Types/GatewayServiceOperationalState.php create mode 100644 fern/sdk/src/Types/GatewaySupportedIntegrityAlgorithms.php create mode 100644 fern/sdk/src/Types/GatewaySupportedProposalAlgorithms.php create mode 100644 fern/sdk/src/Types/GatewayTunnelCreateRequest.php create mode 100644 fern/sdk/src/Types/GatewayTunnelCreateRequestIpsec.php create mode 100644 fern/sdk/src/Types/GatewayTunnelCreateRequestIpsecAuthentication.php create mode 100644 fern/sdk/src/Types/GatewayTunnelCreateRequestLocalAddress.php create mode 100644 fern/sdk/src/Types/GatewayTunnelCreateRequestRemoteAddress.php create mode 100644 fern/sdk/src/Types/GatewayTunnelDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayTunnelInternalIpDetailsResponse.php create mode 100644 fern/sdk/src/Types/GatewayTunnelModifyRequest.php create mode 100644 fern/sdk/src/Types/GatewayTunnelModifyRequestIpsec.php create mode 100644 fern/sdk/src/Types/GatewayTunnelModifyRequestIpsecAuthentication.php create mode 100644 fern/sdk/src/Types/GatewayTunnelModifyRequestLocalAddress.php create mode 100644 fern/sdk/src/Types/GatewayTunnelModifyRequestRemoteAddress.php create mode 100644 fern/sdk/src/Types/GatewayTunnelOperationalState.php create mode 100644 fern/sdk/src/Types/GetServerList.php create mode 100644 fern/sdk/src/Types/GetServerListServers.php create mode 100644 fern/sdk/src/Types/IpAddressBooleanYesno.php create mode 100644 fern/sdk/src/Types/IpAddressDetails.php create mode 100644 fern/sdk/src/Types/IpAddressError.php create mode 100644 fern/sdk/src/Types/IpAddressErrorError.php create mode 100644 fern/sdk/src/Types/IpAddressIpFamily.php create mode 100644 fern/sdk/src/Types/IpAddressIpReleasePolicy.php create mode 100644 fern/sdk/src/Types/IpAddressNetworkType.php create mode 100644 fern/sdk/src/Types/IpAddressRequest.php create mode 100644 fern/sdk/src/Types/IpAddressResponse.php create mode 100644 fern/sdk/src/Types/IpAddressesResponse.php create mode 100644 fern/sdk/src/Types/IpAddressesResponseIpAddresses.php create mode 100644 fern/sdk/src/Types/KubernetesAccepted.php create mode 100644 fern/sdk/src/Types/KubernetesAuthenticationIssuerConfig.php create mode 100644 fern/sdk/src/Types/KubernetesAuthenticationIssuerConfigAudienceMatchPolicy.php create mode 100644 fern/sdk/src/Types/KubernetesClaimMappings.php create mode 100644 fern/sdk/src/Types/KubernetesClaimOrExpression.php create mode 100644 fern/sdk/src/Types/KubernetesClaimValidationRule.php create mode 100644 fern/sdk/src/Types/KubernetesCluster.php create mode 100644 fern/sdk/src/Types/KubernetesClusterAvailableUpgrades.php create mode 100644 fern/sdk/src/Types/KubernetesClusterAvailableUpgradesPost.php create mode 100644 fern/sdk/src/Types/KubernetesClusterKubeconfig.php create mode 100644 fern/sdk/src/Types/KubernetesClusterPlan.php create mode 100644 fern/sdk/src/Types/KubernetesClusterState.php create mode 100644 fern/sdk/src/Types/KubernetesClusterUpgradeStrategy.php create mode 100644 fern/sdk/src/Types/KubernetesClusterUpgradeStrategyType.php create mode 100644 fern/sdk/src/Types/KubernetesEffect.php create mode 100644 fern/sdk/src/Types/KubernetesError.php create mode 100644 fern/sdk/src/Types/KubernetesExtraMapping.php create mode 100644 fern/sdk/src/Types/KubernetesKubeletArg.php create mode 100644 fern/sdk/src/Types/KubernetesLabel.php create mode 100644 fern/sdk/src/Types/KubernetesNode.php create mode 100644 fern/sdk/src/Types/KubernetesNodeGroup.php create mode 100644 fern/sdk/src/Types/KubernetesNodeGroupCloudNativePlan.php create mode 100644 fern/sdk/src/Types/KubernetesNodeGroupCustomPlan.php create mode 100644 fern/sdk/src/Types/KubernetesNodeGroupDetails.php create mode 100644 fern/sdk/src/Types/KubernetesNodeGroupGpuPlan.php create mode 100644 fern/sdk/src/Types/KubernetesNodeGroupState.php create mode 100644 fern/sdk/src/Types/KubernetesNodeState.php create mode 100644 fern/sdk/src/Types/KubernetesNodeUpdates.php create mode 100644 fern/sdk/src/Types/KubernetesNodeUpdatesScheduleDow.php create mode 100644 fern/sdk/src/Types/KubernetesPlan.php create mode 100644 fern/sdk/src/Types/KubernetesPrefixedClaimOrExpression.php create mode 100644 fern/sdk/src/Types/KubernetesStorageEncryption.php create mode 100644 fern/sdk/src/Types/KubernetesStorageTier.php create mode 100644 fern/sdk/src/Types/KubernetesTaint.php create mode 100644 fern/sdk/src/Types/KubernetesUserValidationRule.php create mode 100644 fern/sdk/src/Types/KubernetesVersion.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRedirect.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRedirectType.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionHttpReturn.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionHttpReturnType.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRewritePath.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRewritePathType.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRewriteUri.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRewriteUriType.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionSetForwardedHeaders.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionSetForwardedHeadersType.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionSetRequestHeader.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionSetRequestHeaderType.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionSetResponseHeader.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionSetResponseHeaderType.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionTcpReject.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionTcpRejectType.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionUseBackend.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionCreateActionUseBackendType.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionHttpRedirectCreateLocation.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionHttpRedirectCreateScheme.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionHttpRedirectCreateSchemeScheme.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionHttpRedirectResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionHttpReturnCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionHttpReturnResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionHttpRewritePathCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionHttpRewritePathResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionHttpRewriteUriCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionHttpRewriteUriResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionResponseType.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionSetHeaderCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionSetHeaderResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionUseBackendCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerActionUseBackendResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerAvgTimeMetricsResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerBackend.php create mode 100644 fern/sdk/src/Types/LoadBalancerBackendCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerBackendMetricsResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerBackendMetricsSeries.php create mode 100644 fern/sdk/src/Types/LoadBalancerBackendPropertiesCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerBackendPropertiesResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerCertificateBundle.php create mode 100644 fern/sdk/src/Types/LoadBalancerCertificateBundleAuthorityModify.php create mode 100644 fern/sdk/src/Types/LoadBalancerCertificateBundleCreateCertificate.php create mode 100644 fern/sdk/src/Types/LoadBalancerCertificateBundleCreateCertificateType.php create mode 100644 fern/sdk/src/Types/LoadBalancerCertificateBundleCreateType.php create mode 100644 fern/sdk/src/Types/LoadBalancerCertificateBundleCreateTypeType.php create mode 100644 fern/sdk/src/Types/LoadBalancerCertificateBundleCreateZero.php create mode 100644 fern/sdk/src/Types/LoadBalancerCertificateBundleCreateZeroType.php create mode 100644 fern/sdk/src/Types/LoadBalancerCertificateBundleDynamicModify.php create mode 100644 fern/sdk/src/Types/LoadBalancerCertificateBundleKeyType.php create mode 100644 fern/sdk/src/Types/LoadBalancerCertificateBundleManualModify.php create mode 100644 fern/sdk/src/Types/LoadBalancerCertificateBundleOperationalState.php create mode 100644 fern/sdk/src/Types/LoadBalancerCertificateBundleTlsType.php create mode 100644 fern/sdk/src/Types/LoadBalancerChallengeProblemResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerChecksOnDown.php create mode 100644 fern/sdk/src/Types/LoadBalancerCommonMetricsResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerContentTypes.php create mode 100644 fern/sdk/src/Types/LoadBalancerDnsChallengeDomainResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerEmbeddedBackendResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerEmbeddedFrontendResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerEmbeddedServiceResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerErrorResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerErrorResponseError.php create mode 100644 fern/sdk/src/Types/LoadBalancerFrontend.php create mode 100644 fern/sdk/src/Types/LoadBalancerFrontendCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerFrontendMetricsResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerFrontendMetricsSeries.php create mode 100644 fern/sdk/src/Types/LoadBalancerFrontendMode.php create mode 100644 fern/sdk/src/Types/LoadBalancerFrontendNetworkCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerFrontendNetworksItem.php create mode 100644 fern/sdk/src/Types/LoadBalancerFrontendPropertiesCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerFrontendPropertiesResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerHealthCheckType.php create mode 100644 fern/sdk/src/Types/LoadBalancerHttpMethods.php create mode 100644 fern/sdk/src/Types/LoadBalancerIpAddress.php create mode 100644 fern/sdk/src/Types/LoadBalancerIpAddressCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerLabelCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerLabelModify.php create mode 100644 fern/sdk/src/Types/LoadBalancerLabelResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerMaintenanceDayOfWeek.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatchBackendResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatchIntResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatchIntResponseMethod.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatchIpResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatchStringResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatchStringResponseMethod.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatchStringWithArgResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherBackendCreateRangeEnd.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateInverse.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateInverseType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchBodySize.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchBodySizeType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchCookie.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchCookieType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchHeader.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchHeaderType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchHost.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchHostType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchHttpMethod.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchHttpMethodType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchNumMembersUp.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchNumMembersUpType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchPath.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchPathType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchRequestHeader.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchRequestHeaderType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchResponseHeader.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchResponseHeaderType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchSrcIp.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchSrcIpType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchSrcPort.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchSrcPortType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchUrl.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchUrlParam.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchUrlParamType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchUrlQuery.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchUrlQueryType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherCreateMatchUrlType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherHostCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherHttpMethodCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherIntCreateRangeEnd.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherIpCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherResponseType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherStringArgCreateIgnoreCase.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherStringArgCreateOne.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherStringCreateIgnoreCase.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatcherStringCreateOne.php create mode 100644 fern/sdk/src/Types/LoadBalancerMatchingCondition.php create mode 100644 fern/sdk/src/Types/LoadBalancerMember.php create mode 100644 fern/sdk/src/Types/LoadBalancerMemberCreateOne.php create mode 100644 fern/sdk/src/Types/LoadBalancerMemberCreateOneType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMemberCreateZero.php create mode 100644 fern/sdk/src/Types/LoadBalancerMemberCreateZeroType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMemberMetricsResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerMemberMetricsResponseCheckStatus.php create mode 100644 fern/sdk/src/Types/LoadBalancerMemberMetricsResponseStatus.php create mode 100644 fern/sdk/src/Types/LoadBalancerMemberMetricsSeriesResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerMemberModifyOne.php create mode 100644 fern/sdk/src/Types/LoadBalancerMemberModifyOneType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMemberModifyZero.php create mode 100644 fern/sdk/src/Types/LoadBalancerMemberModifyZeroType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMemberType.php create mode 100644 fern/sdk/src/Types/LoadBalancerMetrics.php create mode 100644 fern/sdk/src/Types/LoadBalancerMetricsSortParameter.php create mode 100644 fern/sdk/src/Types/LoadBalancerNetwork.php create mode 100644 fern/sdk/src/Types/LoadBalancerNetworkCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerNetworkFamily.php create mode 100644 fern/sdk/src/Types/LoadBalancerNetworkType.php create mode 100644 fern/sdk/src/Types/LoadBalancerPlan.php create mode 100644 fern/sdk/src/Types/LoadBalancerProblemInvalidParamResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerProblemResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerProxyProtocolVersionOrDisabled.php create mode 100644 fern/sdk/src/Types/LoadBalancerRequestMetricsResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerResolver.php create mode 100644 fern/sdk/src/Types/LoadBalancerResolverCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerRule.php create mode 100644 fern/sdk/src/Types/LoadBalancerRuleCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerRuleMatcherIntMethod.php create mode 100644 fern/sdk/src/Types/LoadBalancerRuleMatchingCondition.php create mode 100644 fern/sdk/src/Types/LoadBalancerServerMetricsResponse.php create mode 100644 fern/sdk/src/Types/LoadBalancerService.php create mode 100644 fern/sdk/src/Types/LoadBalancerServiceConfiguredStatus.php create mode 100644 fern/sdk/src/Types/LoadBalancerServiceMaintenanceDow.php create mode 100644 fern/sdk/src/Types/LoadBalancerServiceOperationalState.php create mode 100644 fern/sdk/src/Types/LoadBalancerSortServicesParameter.php create mode 100644 fern/sdk/src/Types/LoadBalancerStringMatcherMethods.php create mode 100644 fern/sdk/src/Types/LoadBalancerStringMatcherMethodsNoValue.php create mode 100644 fern/sdk/src/Types/LoadBalancerTlsConfig.php create mode 100644 fern/sdk/src/Types/LoadBalancerTlsConfigCreate.php create mode 100644 fern/sdk/src/Types/LoadBalancerTlsConfigModify.php create mode 100644 fern/sdk/src/Types/LogicalDatabaseResponse.php create mode 100644 fern/sdk/src/Types/ModifyStorageResponse.php create mode 100644 fern/sdk/src/Types/Network.php create mode 100644 fern/sdk/src/Types/NetworkBooleanYesno.php create mode 100644 fern/sdk/src/Types/NetworkDetails.php create mode 100644 fern/sdk/src/Types/NetworkDetailsIpNetworks.php create mode 100644 fern/sdk/src/Types/NetworkDetailsIpNetworksIpNetworkItem.php create mode 100644 fern/sdk/src/Types/NetworkDetailsPeerings.php create mode 100644 fern/sdk/src/Types/NetworkDetailsPeeringsPeeringItem.php create mode 100644 fern/sdk/src/Types/NetworkDetailsServers.php create mode 100644 fern/sdk/src/Types/NetworkDetailsServersServerItem.php create mode 100644 fern/sdk/src/Types/NetworkDetailsServices.php create mode 100644 fern/sdk/src/Types/NetworkDetailsServicesServiceItem.php create mode 100644 fern/sdk/src/Types/NetworkError.php create mode 100644 fern/sdk/src/Types/NetworkErrorError.php create mode 100644 fern/sdk/src/Types/NetworkFeatures.php create mode 100644 fern/sdk/src/Types/NetworkInterface.php create mode 100644 fern/sdk/src/Types/NetworkInterfaces.php create mode 100644 fern/sdk/src/Types/NetworkInterfacesInterfaces.php create mode 100644 fern/sdk/src/Types/NetworkIpFamily.php create mode 100644 fern/sdk/src/Types/NetworkLabel.php create mode 100644 fern/sdk/src/Types/NetworkLabels.php create mode 100644 fern/sdk/src/Types/NetworkPeering.php create mode 100644 fern/sdk/src/Types/NetworkPeeringConfiguredStatus.php create mode 100644 fern/sdk/src/Types/NetworkPeeringError.php create mode 100644 fern/sdk/src/Types/NetworkPeeringErrorError.php create mode 100644 fern/sdk/src/Types/NetworkPeeringIpFamily.php create mode 100644 fern/sdk/src/Types/NetworkPeeringNetwork.php create mode 100644 fern/sdk/src/Types/NetworkPeeringNetworkIpNetworks.php create mode 100644 fern/sdk/src/Types/NetworkPeeringNetworkIpNetworksIpNetworkItem.php create mode 100644 fern/sdk/src/Types/NetworkPeeringPeerNetwork.php create mode 100644 fern/sdk/src/Types/NetworkPeeringPeerNetworkIpNetworks.php create mode 100644 fern/sdk/src/Types/NetworkPeeringPeerNetworkIpNetworksIpNetworkItem.php create mode 100644 fern/sdk/src/Types/NetworkPeeringState.php create mode 100644 fern/sdk/src/Types/NetworkPeerings.php create mode 100644 fern/sdk/src/Types/NetworkPeeringsNetworkPeerings.php create mode 100644 fern/sdk/src/Types/NetworkServers.php create mode 100644 fern/sdk/src/Types/NetworkTags.php create mode 100644 fern/sdk/src/Types/NetworkTagsTags.php create mode 100644 fern/sdk/src/Types/NetworkTagsTagsTagItem.php create mode 100644 fern/sdk/src/Types/NetworkType.php create mode 100644 fern/sdk/src/Types/Networks.php create mode 100644 fern/sdk/src/Types/NetworksNetworks.php create mode 100644 fern/sdk/src/Types/ObjectStorage2AccessKeyDetailResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2AccessKeyDetailResponseStatus.php create mode 100644 fern/sdk/src/Types/ObjectStorage2AssumeRolePolicyResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2BucketDetailResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2CreateAccessKeyResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2CreateAccessKeyResponseStatus.php create mode 100644 fern/sdk/src/Types/ObjectStorage2CustomDomainCreate.php create mode 100644 fern/sdk/src/Types/ObjectStorage2CustomDomainCreateMode.php create mode 100644 fern/sdk/src/Types/ObjectStorage2CustomDomainCreateType.php create mode 100644 fern/sdk/src/Types/ObjectStorage2CustomDomainDetailResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2CustomDomainDetailResponseMode.php create mode 100644 fern/sdk/src/Types/ObjectStorage2EndpointResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2EndpointResponseMode.php create mode 100644 fern/sdk/src/Types/ObjectStorage2EndpointResponseType.php create mode 100644 fern/sdk/src/Types/ObjectStorage2ErrorResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2ErrorResponseInvalidParamsItem.php create mode 100644 fern/sdk/src/Types/ObjectStorage2ErrorResponseType.php create mode 100644 fern/sdk/src/Types/ObjectStorage2GroupResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2InlinePolicyCreate.php create mode 100644 fern/sdk/src/Types/ObjectStorage2InlinePolicyResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2LabelCreate.php create mode 100644 fern/sdk/src/Types/ObjectStorage2LabelDetailResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2MetricsSeriesListResponseItem.php create mode 100644 fern/sdk/src/Types/ObjectStorage2MetricsUsageResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2NetworkCreate.php create mode 100644 fern/sdk/src/Types/ObjectStorage2NetworkDetailResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2NetworkFamily.php create mode 100644 fern/sdk/src/Types/ObjectStorage2NetworkType.php create mode 100644 fern/sdk/src/Types/ObjectStorage2PermissionsBoundaryCreate.php create mode 100644 fern/sdk/src/Types/ObjectStorage2PolicyAttachmentCreate.php create mode 100644 fern/sdk/src/Types/ObjectStorage2PolicyAttachmentResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2PolicyDetailResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2PolicyVersionResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2PropertiesCreate.php create mode 100644 fern/sdk/src/Types/ObjectStorage2PropertyConfiguredStatus.php create mode 100644 fern/sdk/src/Types/ObjectStorage2QueryParamSort.php create mode 100644 fern/sdk/src/Types/ObjectStorage2RegionDetailResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2RegionDetailResponseZonesItem.php create mode 100644 fern/sdk/src/Types/ObjectStorage2RoleResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2RoleResponseInlinePoliciesItem.php create mode 100644 fern/sdk/src/Types/ObjectStorage2RoleTag.php create mode 100644 fern/sdk/src/Types/ObjectStorage2ServiceDetailResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2ServiceDetailResponseConfiguredStatus.php create mode 100644 fern/sdk/src/Types/ObjectStorage2ServiceDetailResponseOperationalState.php create mode 100644 fern/sdk/src/Types/ObjectStorage2ServiceDetailResponseStateMessagesItem.php create mode 100644 fern/sdk/src/Types/ObjectStorage2ServiceDetailResponseStateMessagesItemCode.php create mode 100644 fern/sdk/src/Types/ObjectStorage2ServiceDetailResponseUsage.php create mode 100644 fern/sdk/src/Types/ObjectStorage2ServiceDomains.php create mode 100644 fern/sdk/src/Types/ObjectStorage2ServiceDomainsDomainsItem.php create mode 100644 fern/sdk/src/Types/ObjectStorage2ServiceDomainsDomainsItemType.php create mode 100644 fern/sdk/src/Types/ObjectStorage2StaticWebsiteConfig.php create mode 100644 fern/sdk/src/Types/ObjectStorage2StaticWebsiteConfigCreate.php create mode 100644 fern/sdk/src/Types/ObjectStorage2TagListRequestItem.php create mode 100644 fern/sdk/src/Types/ObjectStorage2TagListResponseItem.php create mode 100644 fern/sdk/src/Types/ObjectStorage2TagResponse.php create mode 100644 fern/sdk/src/Types/ObjectStorage2UserDetailResponse.php create mode 100644 fern/sdk/src/Types/PartnerAccount.php create mode 100644 fern/sdk/src/Types/PartnerError.php create mode 100644 fern/sdk/src/Types/PartnerError400.php create mode 100644 fern/sdk/src/Types/PartnerError400AddressInvalid.php create mode 100644 fern/sdk/src/Types/PartnerError400CityInvalid.php create mode 100644 fern/sdk/src/Types/PartnerError400CompanyInvalid.php create mode 100644 fern/sdk/src/Types/PartnerError400CountryInvalid.php create mode 100644 fern/sdk/src/Types/PartnerError400CountryMissing.php create mode 100644 fern/sdk/src/Types/PartnerError400EmailInvalid.php create mode 100644 fern/sdk/src/Types/PartnerError400EmailMissing.php create mode 100644 fern/sdk/src/Types/PartnerError400Error.php create mode 100644 fern/sdk/src/Types/PartnerError400FirstNameInvalid.php create mode 100644 fern/sdk/src/Types/PartnerError400FirstNameMissing.php create mode 100644 fern/sdk/src/Types/PartnerError400LastNameInvalid.php create mode 100644 fern/sdk/src/Types/PartnerError400LastNameMissing.php create mode 100644 fern/sdk/src/Types/PartnerError400PasswordInvalid.php create mode 100644 fern/sdk/src/Types/PartnerError400PasswordMissing.php create mode 100644 fern/sdk/src/Types/PartnerError400PhoneInvalid.php create mode 100644 fern/sdk/src/Types/PartnerError400PhoneMissing.php create mode 100644 fern/sdk/src/Types/PartnerError400PostalCodeInvalid.php create mode 100644 fern/sdk/src/Types/PartnerError400PostalCodeMissing.php create mode 100644 fern/sdk/src/Types/PartnerError403.php create mode 100644 fern/sdk/src/Types/PartnerError403Error.php create mode 100644 fern/sdk/src/Types/PartnerError403ErrorErrorCode.php create mode 100644 fern/sdk/src/Types/PartnerError409.php create mode 100644 fern/sdk/src/Types/PartnerError409Error.php create mode 100644 fern/sdk/src/Types/PartnerError409ErrorErrorCode.php create mode 100644 fern/sdk/src/Types/PartnerErrorError.php create mode 100644 fern/sdk/src/Types/Permission.php create mode 100644 fern/sdk/src/Types/PermissionDocument.php create mode 100644 fern/sdk/src/Types/PermissionError.php create mode 100644 fern/sdk/src/Types/PermissionErrorError.php create mode 100644 fern/sdk/src/Types/PermissionTargetType.php create mode 100644 fern/sdk/src/Types/Permissions.php create mode 100644 fern/sdk/src/Types/PermissionsPermissions.php create mode 100644 fern/sdk/src/Types/Plan.php create mode 100644 fern/sdk/src/Types/PlanBooleanYesno.php create mode 100644 fern/sdk/src/Types/PlanError.php create mode 100644 fern/sdk/src/Types/PlanErrorError.php create mode 100644 fern/sdk/src/Types/PlanFamily.php create mode 100644 fern/sdk/src/Types/PlanPlans.php create mode 100644 fern/sdk/src/Types/PlanPlansPlanItem.php create mode 100644 fern/sdk/src/Types/PriceError.php create mode 100644 fern/sdk/src/Types/PriceError400.php create mode 100644 fern/sdk/src/Types/PriceError400Error.php create mode 100644 fern/sdk/src/Types/PriceError400ErrorCode.php create mode 100644 fern/sdk/src/Types/PriceErrorError.php create mode 100644 fern/sdk/src/Types/Prices.php create mode 100644 fern/sdk/src/Types/PricesPrices.php create mode 100644 fern/sdk/src/Types/ResizeStorageResponse.php create mode 100644 fern/sdk/src/Types/Router.php create mode 100644 fern/sdk/src/Types/RouterDetails.php create mode 100644 fern/sdk/src/Types/RouterDetailsAttachedNetworkGatewaysItem.php create mode 100644 fern/sdk/src/Types/RouterDetailsAttachedNetworks.php create mode 100644 fern/sdk/src/Types/RouterDetailsAttachedNetworksNetworkItem.php create mode 100644 fern/sdk/src/Types/RouterError.php create mode 100644 fern/sdk/src/Types/RouterErrorError.php create mode 100644 fern/sdk/src/Types/RouterLabel.php create mode 100644 fern/sdk/src/Types/RouterRouteNexthop.php create mode 100644 fern/sdk/src/Types/RouterRouteNexthopNexthopOne.php create mode 100644 fern/sdk/src/Types/RouterStaticRouteType.php create mode 100644 fern/sdk/src/Types/RouterType.php create mode 100644 fern/sdk/src/Types/Routers.php create mode 100644 fern/sdk/src/Types/RoutersRouters.php create mode 100644 fern/sdk/src/Types/Server.php create mode 100644 fern/sdk/src/Types/ServerBooleanOnoff.php create mode 100644 fern/sdk/src/Types/ServerBooleanYesno.php create mode 100644 fern/sdk/src/Types/ServerCpuStats.php create mode 100644 fern/sdk/src/Types/ServerCpuStatsStats.php create mode 100644 fern/sdk/src/Types/ServerCpuStatsStatsDaily.php create mode 100644 fern/sdk/src/Types/ServerCpuStatsStatsMonthly.php create mode 100644 fern/sdk/src/Types/ServerCpuStatsStatsWeekly.php create mode 100644 fern/sdk/src/Types/ServerCpuStatsStatsYearly.php create mode 100644 fern/sdk/src/Types/ServerCpuStatsSummary.php create mode 100644 fern/sdk/src/Types/ServerCpuStatsSummaryVariableItem.php create mode 100644 fern/sdk/src/Types/ServerCpuStatsSummaryVariableItemTitle.php create mode 100644 fern/sdk/src/Types/ServerCreateDevices.php create mode 100644 fern/sdk/src/Types/ServerCreateDevicesDeviceItem.php create mode 100644 fern/sdk/src/Types/ServerCreateNetworking.php create mode 100644 fern/sdk/src/Types/ServerCreateNetworkingInterfaces.php create mode 100644 fern/sdk/src/Types/ServerCreateNetworkingInterfacesInterfaceItem.php create mode 100644 fern/sdk/src/Types/ServerCreateNetworkingInterfacesInterfaceItemIpAddresses.php create mode 100644 fern/sdk/src/Types/ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem.php create mode 100644 fern/sdk/src/Types/ServerDetails.php create mode 100644 fern/sdk/src/Types/ServerDetailsDevices.php create mode 100644 fern/sdk/src/Types/ServerDetailsFirewallPrivateDefaultIncomingAction.php create mode 100644 fern/sdk/src/Types/ServerDetailsFirewallPrivateDefaultOutgoingAction.php create mode 100644 fern/sdk/src/Types/ServerDetailsFirewallPublicDefaultIncomingAction.php create mode 100644 fern/sdk/src/Types/ServerDetailsFirewallPublicDefaultOutgoingAction.php create mode 100644 fern/sdk/src/Types/ServerDevice.php create mode 100644 fern/sdk/src/Types/ServerDeviceMetadata.php create mode 100644 fern/sdk/src/Types/ServerDiskStats.php create mode 100644 fern/sdk/src/Types/ServerDiskStatsStats.php create mode 100644 fern/sdk/src/Types/ServerDiskStatsStatsDaily.php create mode 100644 fern/sdk/src/Types/ServerDiskStatsStatsMonthly.php create mode 100644 fern/sdk/src/Types/ServerDiskStatsStatsWeekly.php create mode 100644 fern/sdk/src/Types/ServerDiskStatsStatsYearly.php create mode 100644 fern/sdk/src/Types/ServerDiskStatsSummary.php create mode 100644 fern/sdk/src/Types/ServerDiskStatsSummaryVariableItem.php create mode 100644 fern/sdk/src/Types/ServerDiskStatsSummaryVariableItemTitle.php create mode 100644 fern/sdk/src/Types/ServerError.php create mode 100644 fern/sdk/src/Types/ServerError400.php create mode 100644 fern/sdk/src/Types/ServerError400Error.php create mode 100644 fern/sdk/src/Types/ServerError403.php create mode 100644 fern/sdk/src/Types/ServerError403Error.php create mode 100644 fern/sdk/src/Types/ServerError404.php create mode 100644 fern/sdk/src/Types/ServerError404Error.php create mode 100644 fern/sdk/src/Types/ServerError409.php create mode 100644 fern/sdk/src/Types/ServerError409Error.php create mode 100644 fern/sdk/src/Types/ServerError511.php create mode 100644 fern/sdk/src/Types/ServerError511Error.php create mode 100644 fern/sdk/src/Types/ServerErrorError.php create mode 100644 fern/sdk/src/Types/ServerFirewallRule.php create mode 100644 fern/sdk/src/Types/ServerFirewallRuleItem.php create mode 100644 fern/sdk/src/Types/ServerFirewallRuleItemAction.php create mode 100644 fern/sdk/src/Types/ServerFirewallRuleItemDirection.php create mode 100644 fern/sdk/src/Types/ServerFirewallRuleItemFamily.php create mode 100644 fern/sdk/src/Types/ServerFirewallRuleItemProtocol.php create mode 100644 fern/sdk/src/Types/ServerFirewallRuleRequirements.php create mode 100644 fern/sdk/src/Types/ServerFirewallRuleResponseItem.php create mode 100644 fern/sdk/src/Types/ServerFirewallRuleResponseItemAction.php create mode 100644 fern/sdk/src/Types/ServerFirewallRuleResponseItemDirection.php create mode 100644 fern/sdk/src/Types/ServerFirewallRuleResponseItemFamily.php create mode 100644 fern/sdk/src/Types/ServerFirewallRuleResponseItemProtocol.php create mode 100644 fern/sdk/src/Types/ServerFirewallRules.php create mode 100644 fern/sdk/src/Types/ServerFirewallRulesFirewallRules.php create mode 100644 fern/sdk/src/Types/ServerFirewallRulesetRelationship.php create mode 100644 fern/sdk/src/Types/ServerFirewallRulesetRelationshipDetails.php create mode 100644 fern/sdk/src/Types/ServerFirewallRulesetRelationshipDetailsType.php create mode 100644 fern/sdk/src/Types/ServerFirewallRulesetRelationshipInternal.php create mode 100644 fern/sdk/src/Types/ServerFirewallRulesetRelationshipInternalType.php create mode 100644 fern/sdk/src/Types/ServerFirewallRulesetRelationshipType.php create mode 100644 fern/sdk/src/Types/ServerFirewallRulesetRelationships.php create mode 100644 fern/sdk/src/Types/ServerFirewallRulesetRelationshipsFirewallRulesetRelationships.php create mode 100644 fern/sdk/src/Types/ServerGpus.php create mode 100644 fern/sdk/src/Types/ServerGpusGpusItem.php create mode 100644 fern/sdk/src/Types/ServerGroup.php create mode 100644 fern/sdk/src/Types/ServerGroupAntiAffinity.php create mode 100644 fern/sdk/src/Types/ServerGroupAntiAffinityStatus.php create mode 100644 fern/sdk/src/Types/ServerGroupAntiAffinityStatusStatus.php create mode 100644 fern/sdk/src/Types/ServerGroupDetails.php create mode 100644 fern/sdk/src/Types/ServerGroupDetailsLabels.php create mode 100644 fern/sdk/src/Types/ServerGroupDetailsServers.php create mode 100644 fern/sdk/src/Types/ServerGroupError.php create mode 100644 fern/sdk/src/Types/ServerGroupErrorError.php create mode 100644 fern/sdk/src/Types/ServerGroupLabel.php create mode 100644 fern/sdk/src/Types/ServerGroupModify.php create mode 100644 fern/sdk/src/Types/ServerGroupModifyServerGroup.php create mode 100644 fern/sdk/src/Types/ServerGroupModifyServerGroupLabels.php create mode 100644 fern/sdk/src/Types/ServerGroupServers.php create mode 100644 fern/sdk/src/Types/ServerGroups.php create mode 100644 fern/sdk/src/Types/ServerGroupsServerGroups.php create mode 100644 fern/sdk/src/Types/ServerInGetServerList.php create mode 100644 fern/sdk/src/Types/ServerInGetServerListLabels.php create mode 100644 fern/sdk/src/Types/ServerInterface.php create mode 100644 fern/sdk/src/Types/ServerInterfaceIpAddress.php create mode 100644 fern/sdk/src/Types/ServerInterfaceIpAddresses.php create mode 100644 fern/sdk/src/Types/ServerInterfaceResponse.php create mode 100644 fern/sdk/src/Types/ServerIpAddressInterfaceResponse.php create mode 100644 fern/sdk/src/Types/ServerIpAddresses.php create mode 100644 fern/sdk/src/Types/ServerIpAddressesIpAddressItem.php create mode 100644 fern/sdk/src/Types/ServerIpFamily.php create mode 100644 fern/sdk/src/Types/ServerIpReleasePolicy.php create mode 100644 fern/sdk/src/Types/ServerLabel.php create mode 100644 fern/sdk/src/Types/ServerLabels.php create mode 100644 fern/sdk/src/Types/ServerLegacyBoolean.php create mode 100644 fern/sdk/src/Types/ServerLoginUser.php create mode 100644 fern/sdk/src/Types/ServerLoginUserSshKeys.php create mode 100644 fern/sdk/src/Types/ServerNetworkStats.php create mode 100644 fern/sdk/src/Types/ServerNetworkStatsStats.php create mode 100644 fern/sdk/src/Types/ServerNetworkStatsStatsDaily.php create mode 100644 fern/sdk/src/Types/ServerNetworkStatsStatsMonthly.php create mode 100644 fern/sdk/src/Types/ServerNetworkStatsStatsWeekly.php create mode 100644 fern/sdk/src/Types/ServerNetworkStatsStatsYearly.php create mode 100644 fern/sdk/src/Types/ServerNetworkStatsSummary.php create mode 100644 fern/sdk/src/Types/ServerNetworkStatsSummaryVariableItem.php create mode 100644 fern/sdk/src/Types/ServerNetworkStatsSummaryVariableItemTitle.php create mode 100644 fern/sdk/src/Types/ServerNetworkType.php create mode 100644 fern/sdk/src/Types/ServerNetworking.php create mode 100644 fern/sdk/src/Types/ServerNetworkingInterfaces.php create mode 100644 fern/sdk/src/Types/ServerNetworkingResponse.php create mode 100644 fern/sdk/src/Types/ServerNicModel.php create mode 100644 fern/sdk/src/Types/ServerRemoteAccessDetails.php create mode 100644 fern/sdk/src/Types/ServerRemoteAccessDetailsServer.php create mode 100644 fern/sdk/src/Types/ServerRemoteAccessEnabled.php create mode 100644 fern/sdk/src/Types/ServerRemoteAccessType.php create mode 100644 fern/sdk/src/Types/ServerSizeError.php create mode 100644 fern/sdk/src/Types/ServerSizeErrorError.php create mode 100644 fern/sdk/src/Types/ServerSizeLimits.php create mode 100644 fern/sdk/src/Types/ServerSizeLimitsServerSizeLimits.php create mode 100644 fern/sdk/src/Types/ServerSizes.php create mode 100644 fern/sdk/src/Types/ServerSizesServerSizes.php create mode 100644 fern/sdk/src/Types/ServerSizesServerSizesServerSizeItem.php create mode 100644 fern/sdk/src/Types/ServerState.php create mode 100644 fern/sdk/src/Types/ServerStatsNetworkType.php create mode 100644 fern/sdk/src/Types/ServerStatsPeriod.php create mode 100644 fern/sdk/src/Types/ServerStorageDevices.php create mode 100644 fern/sdk/src/Types/ServerStorageDevicesResponse.php create mode 100644 fern/sdk/src/Types/ServerStorageDevicesResponseStorageDeviceItem.php create mode 100644 fern/sdk/src/Types/ServerStorageDevicesResponseStorageDeviceItemBootDisk.php create mode 100644 fern/sdk/src/Types/ServerStorageDevicesResponseStorageDeviceItemType.php create mode 100644 fern/sdk/src/Types/ServerStorageDevicesStorageDeviceItem.php create mode 100644 fern/sdk/src/Types/ServerStorageDevicesStorageDeviceItemAction.php create mode 100644 fern/sdk/src/Types/ServerStorageDevicesStorageDeviceItemBackupRule.php create mode 100644 fern/sdk/src/Types/ServerTagsTag.php create mode 100644 fern/sdk/src/Types/ServerVncPortOne.php create mode 100644 fern/sdk/src/Types/Storage.php create mode 100644 fern/sdk/src/Types/StorageAccess.php create mode 100644 fern/sdk/src/Types/StorageAccessFilter.php create mode 100644 fern/sdk/src/Types/StorageBackupRule.php create mode 100644 fern/sdk/src/Types/StorageBackupRuleInterval.php create mode 100644 fern/sdk/src/Types/StorageDetails.php create mode 100644 fern/sdk/src/Types/StorageDetailsBackups.php create mode 100644 fern/sdk/src/Types/StorageDetailsPartOfPlan.php create mode 100644 fern/sdk/src/Types/StorageDetailsServers.php create mode 100644 fern/sdk/src/Types/StorageEncrypted.php create mode 100644 fern/sdk/src/Types/StorageError.php create mode 100644 fern/sdk/src/Types/StorageErrorError.php create mode 100644 fern/sdk/src/Types/StorageImport.php create mode 100644 fern/sdk/src/Types/StorageImportCompletedZero.php create mode 100644 fern/sdk/src/Types/StorageImportErrorCode.php create mode 100644 fern/sdk/src/Types/StorageImportResponse.php create mode 100644 fern/sdk/src/Types/StorageImportSource.php create mode 100644 fern/sdk/src/Types/StorageImportState.php create mode 100644 fern/sdk/src/Types/StorageLabel.php create mode 100644 fern/sdk/src/Types/StorageListItem.php create mode 100644 fern/sdk/src/Types/StorageListItemPartOfPlan.php create mode 100644 fern/sdk/src/Types/StorageOrderBy.php create mode 100644 fern/sdk/src/Types/StorageSortBy.php create mode 100644 fern/sdk/src/Types/StorageState.php create mode 100644 fern/sdk/src/Types/StorageTemplateType.php create mode 100644 fern/sdk/src/Types/StorageTier.php create mode 100644 fern/sdk/src/Types/StorageType.php create mode 100644 fern/sdk/src/Types/Storages.php create mode 100644 fern/sdk/src/Types/StoragesStorages.php create mode 100644 fern/sdk/src/Types/Tag.php create mode 100644 fern/sdk/src/Types/TagError.php create mode 100644 fern/sdk/src/Types/TagError400.php create mode 100644 fern/sdk/src/Types/TagError400Error.php create mode 100644 fern/sdk/src/Types/TagError400ErrorErrorCode.php create mode 100644 fern/sdk/src/Types/TagError403.php create mode 100644 fern/sdk/src/Types/TagError403Error.php create mode 100644 fern/sdk/src/Types/TagError403ErrorErrorCode.php create mode 100644 fern/sdk/src/Types/TagError404.php create mode 100644 fern/sdk/src/Types/TagError404Error.php create mode 100644 fern/sdk/src/Types/TagError404ErrorErrorCode.php create mode 100644 fern/sdk/src/Types/TagError409.php create mode 100644 fern/sdk/src/Types/TagError409Error.php create mode 100644 fern/sdk/src/Types/TagError409ErrorErrorCode.php create mode 100644 fern/sdk/src/Types/TagErrorError.php create mode 100644 fern/sdk/src/Types/TagServers.php create mode 100644 fern/sdk/src/Types/TagTag.php create mode 100644 fern/sdk/src/Types/Tags.php create mode 100644 fern/sdk/src/Types/TagsTags.php create mode 100644 fern/sdk/src/Types/TagsTagsTagItem.php create mode 100644 fern/sdk/src/Types/TimezoneError.php create mode 100644 fern/sdk/src/Types/TimezoneErrorError.php create mode 100644 fern/sdk/src/Types/Timezones.php create mode 100644 fern/sdk/src/Types/TimezonesTimezones.php create mode 100644 fern/sdk/src/Types/VncKeymapError.php create mode 100644 fern/sdk/src/Types/VncKeymapErrorError.php create mode 100644 fern/sdk/src/Types/VncKeymapKeymaps.php create mode 100644 fern/sdk/src/Types/VncKeymapKeymapsKeymaps.php create mode 100644 fern/sdk/src/Types/ZoneBooleanYesno.php create mode 100644 fern/sdk/src/Types/ZoneError.php create mode 100644 fern/sdk/src/Types/ZoneErrorError.php create mode 100644 fern/sdk/src/Types/ZonePrices.php create mode 100644 fern/sdk/src/Types/ZonePricesItemsValue.php create mode 100644 fern/sdk/src/Types/ZoneVlans.php create mode 100644 fern/sdk/src/Types/ZoneVlansZoneVlans.php create mode 100644 fern/sdk/src/Types/ZoneVlansZoneVlansVlanItem.php create mode 100644 fern/sdk/src/Types/Zones.php create mode 100644 fern/sdk/src/Types/ZonesZones.php create mode 100644 fern/sdk/src/Types/ZonesZonesZoneItem.php create mode 100644 fern/sdk/src/UpcloudClient.php create mode 100644 fern/sdk/src/Utils/File.php create mode 100644 fern/sdk/src/VncKeymap/VncKeymapClient.php create mode 100644 fern/sdk/src/Zone/ZoneClient.php create mode 100644 fern/sdk/tests/Core/Client/RawClientTest.php create mode 100644 fern/sdk/tests/Core/Json/AdditionalPropertiesTest.php create mode 100644 fern/sdk/tests/Core/Json/DateArrayTest.php create mode 100644 fern/sdk/tests/Core/Json/EmptyArrayTest.php create mode 100644 fern/sdk/tests/Core/Json/EnumTest.php create mode 100644 fern/sdk/tests/Core/Json/ExhaustiveTest.php create mode 100644 fern/sdk/tests/Core/Json/InvalidTest.php create mode 100644 fern/sdk/tests/Core/Json/NestedUnionArrayTest.php create mode 100644 fern/sdk/tests/Core/Json/NullPropertyTest.php create mode 100644 fern/sdk/tests/Core/Json/NullableArrayTest.php create mode 100644 fern/sdk/tests/Core/Json/ScalarTest.php create mode 100644 fern/sdk/tests/Core/Json/TraitTest.php create mode 100644 fern/sdk/tests/Core/Json/UnionArrayTest.php create mode 100644 fern/sdk/tests/Core/Json/UnionPropertyTest.php create mode 100644 fern/sdk/tests/Wire/AccountTokensWireTest.php create mode 100644 fern/sdk/tests/Wire/AccountWireTest.php create mode 100644 fern/sdk/tests/Wire/AuditLogsWireTest.php create mode 100644 fern/sdk/tests/Wire/CurrencyWireTest.php create mode 100644 fern/sdk/tests/Wire/DatabaseWireTest.php create mode 100644 fern/sdk/tests/Wire/DeviceWireTest.php create mode 100644 fern/sdk/tests/Wire/EventsWireTest.php create mode 100644 fern/sdk/tests/Wire/FileStorageWireTest.php create mode 100644 fern/sdk/tests/Wire/FirewallRulesetWireTest.php create mode 100644 fern/sdk/tests/Wire/GatewayWireTest.php create mode 100644 fern/sdk/tests/Wire/IpAddressWireTest.php create mode 100644 fern/sdk/tests/Wire/KubernetesWireTest.php create mode 100644 fern/sdk/tests/Wire/LoadBalancerWireTest.php create mode 100644 fern/sdk/tests/Wire/NetworkPeeringWireTest.php create mode 100644 fern/sdk/tests/Wire/NetworkWireTest.php create mode 100644 fern/sdk/tests/Wire/ObjectStorage2WireTest.php create mode 100644 fern/sdk/tests/Wire/PartnerWireTest.php create mode 100644 fern/sdk/tests/Wire/PermissionWireTest.php create mode 100644 fern/sdk/tests/Wire/PlanWireTest.php create mode 100644 fern/sdk/tests/Wire/PriceWireTest.php create mode 100644 fern/sdk/tests/Wire/RouterWireTest.php create mode 100644 fern/sdk/tests/Wire/ServerGroupWireTest.php create mode 100644 fern/sdk/tests/Wire/ServerSizeWireTest.php create mode 100644 fern/sdk/tests/Wire/ServerWireTest.php create mode 100644 fern/sdk/tests/Wire/StorageWireTest.php create mode 100644 fern/sdk/tests/Wire/TagWireTest.php create mode 100644 fern/sdk/tests/Wire/TimezoneWireTest.php create mode 100644 fern/sdk/tests/Wire/VncKeymapWireTest.php create mode 100644 fern/sdk/tests/Wire/WireMockTestCase.php create mode 100644 fern/sdk/tests/Wire/ZoneWireTest.php create mode 100644 fern/sdk/wiremock/docker-compose.test.yml create mode 100644 fern/sdk/wiremock/wiremock-mappings.json create mode 100644 generator/README-docs.md create mode 100644 generator/config/placeholder.txt create mode 100644 generator/openapi/placeholder.txt create mode 100644 generator/openapi/spec.json create mode 100755 generator/scripts/generate.sh create mode 100644 generator/scripts/patch_generated_php.py create mode 100644 generator/scripts/patch_openapi.py create mode 100644 generator/scripts/prepare-release.sh create mode 100644 generator/scripts/prepare_docs.py create mode 100644 generator/scripts/publish.sh create mode 100644 generator/tests/check_docs_site.py create mode 100644 generator/tests/check_endpoint_coverage.py create mode 100644 generator/tests/generated_model_fixtures.php create mode 100644 generator/tests/generated_request_behavior.php create mode 100644 generator/tests/generated_sdk_smoke.php create mode 100644 generator/tests/release.test.mjs create mode 100644 generator/tests/test_check_docs_site.py create mode 100644 generator/tests/test_endpoint_coverage.py create mode 100644 generator/tests/test_patch_generated_php.py create mode 100644 generator/tests/test_patch_openapi.py create mode 100644 generator/tests/test_prepare_docs.py delete mode 100644 lib/ApiException.php delete mode 100644 lib/Configuration.php delete mode 100644 lib/HttpClient/UpcloudApiRequest.php delete mode 100644 lib/HttpClient/UpcloudApiResponse.php delete mode 100644 lib/HttpClient/UpcloudHttpClient.php delete mode 100644 lib/Model/Account.php delete mode 100644 lib/Model/AccountResourceLimits.php delete mode 100644 lib/Model/AccountResponse.php delete mode 100644 lib/Model/AddIpRequest.php delete mode 100644 lib/Model/AssignIpResponse.php delete mode 100644 lib/Model/AttachNetwork.php delete mode 100644 lib/Model/AttachStorageDeviceRequest.php delete mode 100644 lib/Model/AvailablePlanListResponse.php delete mode 100644 lib/Model/AvailablePlanListResponsePlans.php delete mode 100644 lib/Model/BackupRule.php delete mode 100644 lib/Model/CloneStorageRequest.php delete mode 100644 lib/Model/ConfigurationListResponse.php delete mode 100644 lib/Model/ConfigurationListResponseServerSizes.php delete mode 100644 lib/Model/CreateBackupStorageRequest.php delete mode 100644 lib/Model/CreateNetworkInterfaceRequest.php delete mode 100644 lib/Model/CreateNetworkRequest.php delete mode 100644 lib/Model/CreateNewTagResponse.php delete mode 100644 lib/Model/CreateObjectStorageRequest.php delete mode 100644 lib/Model/CreateServerRequest.php delete mode 100644 lib/Model/CreateServerResponse.php delete mode 100644 lib/Model/CreateStorageRequest.php delete mode 100644 lib/Model/CreateStorageResponse.php delete mode 100644 lib/Model/Error.php delete mode 100644 lib/Model/ErrorCode.php delete mode 100644 lib/Model/ErrorError.php delete mode 100644 lib/Model/ErrorStatus.php delete mode 100644 lib/Model/FirewallRule.php delete mode 100644 lib/Model/FirewallRuleCreateResponse.php delete mode 100644 lib/Model/FirewallRuleListResponse.php delete mode 100644 lib/Model/FirewallRuleListResponseFirewallRules.php delete mode 100644 lib/Model/FirewallRuleRequest.php delete mode 100644 lib/Model/FirewallRulesRequest.php delete mode 100644 lib/Model/Host.php delete mode 100644 lib/Model/HostListResponse.php delete mode 100644 lib/Model/HostResponse.php delete mode 100644 lib/Model/Hosts.php delete mode 100644 lib/Model/IpAddress.php delete mode 100644 lib/Model/IpAddressListResponse.php delete mode 100644 lib/Model/IpAddresses.php delete mode 100644 lib/Model/IpNetwork.php delete mode 100644 lib/Model/IpNetworks.php delete mode 100644 lib/Model/ModifyHostRequest.php delete mode 100644 lib/Model/ModifyIpRequest.php delete mode 100644 lib/Model/ModifyNetworkInterfaceRequest.php delete mode 100644 lib/Model/ModifyNetworkRequest.php delete mode 100644 lib/Model/ModifyObjectStorageRequest.php delete mode 100644 lib/Model/ModifyServerRequest.php delete mode 100644 lib/Model/ModifyStorageRequest.php delete mode 100644 lib/Model/ModifyTagRequest.php delete mode 100644 lib/Model/Network.php delete mode 100644 lib/Model/NetworkInterface.php delete mode 100644 lib/Model/NetworkInterfaceList.php delete mode 100644 lib/Model/NetworkInterfaceRequest.php delete mode 100644 lib/Model/NetworkInterfaceResponse.php delete mode 100644 lib/Model/NetworkInterfaces.php delete mode 100644 lib/Model/NetworkRequest.php delete mode 100644 lib/Model/NetworkResponse.php delete mode 100644 lib/Model/Networks.php delete mode 100644 lib/Model/NetworksListResponse.php delete mode 100644 lib/Model/ObjectStorage.php delete mode 100644 lib/Model/ObjectStorageListResponse.php delete mode 100644 lib/Model/ObjectStorageRequest.php delete mode 100644 lib/Model/ObjectStorageResponse.php delete mode 100644 lib/Model/ObjectStorages.php delete mode 100644 lib/Model/Plan.php delete mode 100644 lib/Model/Price.php delete mode 100644 lib/Model/PriceListResponse.php delete mode 100644 lib/Model/PriceListResponsePrices.php delete mode 100644 lib/Model/PriceZone.php delete mode 100644 lib/Model/RestartServer.php delete mode 100644 lib/Model/RestartServerRequest.php delete mode 100644 lib/Model/Router.php delete mode 100644 lib/Model/RouterRequest.php delete mode 100644 lib/Model/RouterResponse.php delete mode 100644 lib/Model/Routers.php delete mode 100644 lib/Model/RoutersListResponse.php delete mode 100644 lib/Model/Server.php delete mode 100644 lib/Model/ServerListResponse.php delete mode 100644 lib/Model/ServerListResponseServers.php delete mode 100644 lib/Model/ServerLoginUser.php delete mode 100644 lib/Model/ServerNetworksListResponse.php delete mode 100644 lib/Model/ServerRequest.php delete mode 100644 lib/Model/ServerSize.php delete mode 100644 lib/Model/ServerSshKey.php delete mode 100644 lib/Model/ServerState.php delete mode 100644 lib/Model/ServerStorageDevices.php delete mode 100644 lib/Model/ServerTags.php delete mode 100644 lib/Model/Servers.php delete mode 100644 lib/Model/Stat.php delete mode 100644 lib/Model/Stats.php delete mode 100644 lib/Model/StopServer.php delete mode 100644 lib/Model/StopServerRequest.php delete mode 100644 lib/Model/Storage.php delete mode 100644 lib/Model/StorageAccessType.php delete mode 100644 lib/Model/StorageBackups.php delete mode 100644 lib/Model/StorageDevice.php delete mode 100644 lib/Model/StorageDeviceDetachRequest.php delete mode 100644 lib/Model/StorageDeviceLoadRequest.php delete mode 100644 lib/Model/StorageDeviceRequest.php delete mode 100644 lib/Model/StorageRequest.php delete mode 100644 lib/Model/StorageState.php delete mode 100644 lib/Model/StorageTier.php delete mode 100644 lib/Model/StorageType.php delete mode 100644 lib/Model/SuccessStoragesResponse.php delete mode 100644 lib/Model/SuccessStoragesResponseStorages.php delete mode 100644 lib/Model/Tag.php delete mode 100644 lib/Model/TagCreateRequest.php delete mode 100644 lib/Model/TagListResponse.php delete mode 100644 lib/Model/TagListResponseTags.php delete mode 100644 lib/Model/TagServers.php delete mode 100644 lib/Model/TemplitizeStorageRequest.php delete mode 100644 lib/Model/TimezoneListResponse.php delete mode 100644 lib/Model/TimezoneListResponseTimezones.php delete mode 100644 lib/Model/Zone.php delete mode 100644 lib/Model/ZoneListResponse.php delete mode 100644 lib/Model/ZoneListResponseZones.php delete mode 100644 lib/Serializer.php delete mode 100644 lib/SerializerInterface.php delete mode 100644 lib/Support/Traits/Arrayable.php delete mode 100644 lib/Upcloud/AccountApi.php delete mode 100644 lib/Upcloud/BaseApi.php delete mode 100644 lib/Upcloud/FirewallApi.php delete mode 100644 lib/Upcloud/HostsApi.php delete mode 100644 lib/Upcloud/IPAddressApi.php delete mode 100644 lib/Upcloud/NetworkApi.php delete mode 100644 lib/Upcloud/ObjectStorageApi.php delete mode 100644 lib/Upcloud/PlanApi.php delete mode 100644 lib/Upcloud/PricesApi.php delete mode 100644 lib/Upcloud/ServerApi.php delete mode 100644 lib/Upcloud/StorageApi.php delete mode 100644 lib/Upcloud/TagApi.php delete mode 100644 lib/Upcloud/TimezoneApi.php delete mode 100644 lib/Upcloud/ZoneApi.php delete mode 100644 phpconfig.ini delete mode 100644 phpunit.xml.dist create mode 100644 releasing.md create mode 100644 sdk-repo-creation-guide.md delete mode 100644 test/Api/AccountApi/AccountApiTest.php delete mode 100644 test/Api/BaseApiTest.php delete mode 100644 test/Api/FirewallApi/FirewallApiAsyncTest.php delete mode 100644 test/Api/FirewallApi/FirewallApiTest.php delete mode 100644 test/Api/Fixtures/BaseFixture.php delete mode 100644 test/Api/Fixtures/FirewallApiFixture.php delete mode 100644 test/Api/Fixtures/HostsApiFixture.php delete mode 100644 test/Api/Fixtures/IPAddressApiFixture.php delete mode 100644 test/Api/Fixtures/NetworkApiFixture.php delete mode 100644 test/Api/Fixtures/ObjectStorageApiFixture.php delete mode 100644 test/Api/Fixtures/PlanApiFixture.php delete mode 100644 test/Api/Fixtures/PricesApiFixture.php delete mode 100644 test/Api/Fixtures/ServerApiFixture.php delete mode 100644 test/Api/Fixtures/StorageApiFixture.php delete mode 100644 test/Api/Fixtures/TagApiFixture.php delete mode 100644 test/Api/Fixtures/TimezoneApiFixture.php delete mode 100644 test/Api/Fixtures/ZoneApiFixture.php delete mode 100644 test/Api/Hosts/HostsApiTest.php delete mode 100644 test/Api/HttpClient/HttpClientTest.php delete mode 100644 test/Api/IPAddressApi/IPAddressApiAsyncTest.php delete mode 100644 test/Api/IPAddressApi/IPAddressApiTest.php delete mode 100644 test/Api/NetworkApi/NetworkApiAsyncTest.php delete mode 100644 test/Api/NetworkApi/NetworkApiTest.php delete mode 100644 test/Api/ObjectStorage/ObjectStorageAsyncTest.php delete mode 100644 test/Api/ObjectStorage/ObjectStorageTest.php delete mode 100644 test/Api/PlanApi/PlanApiTest.php delete mode 100644 test/Api/PricesApi/PricesApiTest.php delete mode 100644 test/Api/ServerApi/ServerApiAsyncTest.php delete mode 100644 test/Api/ServerApi/ServerApiTest.php delete mode 100644 test/Api/StorageApi/StorageApiAsyncTest.php delete mode 100644 test/Api/StorageApi/StorageApiTest.php delete mode 100644 test/Api/TagApi/TagApiAsyncTest.php delete mode 100644 test/Api/TagApi/TagApiTest.php delete mode 100644 test/Api/TimezoneApi/TimezoneApiTest.php delete mode 100644 test/Api/ZoneApi/ZoneApiTest.php delete mode 100755 test/test-install-with-laravel.sh diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..ae50176d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,13 @@ +/.github/** export-ignore +/docs/** export-ignore +/generator/** export-ignore +/fern/fern.config.json export-ignore +/fern/generators.yaml export-ignore +/fern/sdk/.fern/** export-ignore +/fern/sdk/.github/** export-ignore +/fern/sdk/composer.lock export-ignore +/fern/sdk/phpstan.neon export-ignore +/fern/sdk/phpunit.xml export-ignore +/fern/sdk/tests/** export-ignore +/fern/sdk/vendor/** export-ignore +/fern/sdk/wiremock/** export-ignore \ No newline at end of file diff --git a/.github/workflows/docs-validation.yml b/.github/workflows/docs-validation.yml new file mode 100644 index 00000000..5bb551bd --- /dev/null +++ b/.github/workflows/docs-validation.yml @@ -0,0 +1,34 @@ +name: Validate documentation + +on: + pull_request: + paths: + - 'docs/**' + - 'generator/scripts/prepare_docs.py' + - 'generator/tests/*docs*' + - '.github/workflows/*docs*' + workflow_dispatch: + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + bundler-cache: true + working-directory: docs + - name: Check conversion and reproducibility + run: | + python3 -m unittest discover -s generator/tests -p 'test_*docs*.py' + python3 generator/scripts/prepare_docs.py + git diff --exit-code -- docs + - name: Build with GitHub Pages dependencies + working-directory: docs + run: bundle exec jekyll build --destination ../_site + - name: Check rendered links and method disclosures + run: python3 generator/tests/check_docs_site.py _site diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index d3ee98da..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: UpCloud php api test -on: - push: - branches: - - main - pull_request: -jobs: - Test: - strategy: - matrix: - os-php-versions: [ - { os: ubuntu-latest, php: 8.0 }, - { os: ubuntu-latest, php: 8.1 }, - { os: ubuntu-latest, php: 8.2 }, - ] - runs-on: ${{ matrix.os-php-versions.os }} - steps: - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.os-php-versions.php }} - - uses: actions/checkout@v2 - - name: Validate composer.json and composer.lock - run: composer validate - - - name: Install dependencies - if: steps.composer-cache.outputs.cache-hit != 'true' - run: composer install --prefer-dist --no-progress --no-suggest - - - name: run unit tests - run: vendor/bin/phpunit - env: - xdebug.max_nesting_level: 512 - UPCLOUD_API_TEST_USER: ${{ secrets.UPCLOUD_API_TEST_USER }} - UPCLOUD_API_TEST_PASSWORD: ${{ secrets.UPCLOUD_API_TEST_PASSWORD }} - - test-with-laravel: - name: Test install with laravel - strategy: - matrix: - laravel-version: - - 9 - - 10 - runs-on: ubuntu-latest - steps: - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - - uses: actions/checkout@v2 - - name: Test package can be required into laravel project - run: | - ./test/test-install-with-laravel.sh ${{ matrix.laravel-version }} diff --git a/.github/workflows/php-sdk-validation.yml b/.github/workflows/php-sdk-validation.yml new file mode 100644 index 00000000..8c46997a --- /dev/null +++ b/.github/workflows/php-sdk-validation.yml @@ -0,0 +1,90 @@ +name: Validate PHP SDK + +on: + push: + branches: [main] + pull_request: + paths: + - ".gitattributes" + - "composer.json" + - "fern/sdk/**" + - "generator/**" + - "fern/generators.yaml" + - "README.md" + - "docs/**" + - ".github/workflows/**" + workflow_dispatch: + inputs: + ref: + description: "Branch or commit to validate" + required: true + type: string + pr_number: + description: "Generated pull request number" + required: false + type: string + +permissions: + contents: read + +jobs: + validate: + runs-on: ubuntu-latest + strategy: + matrix: + php-version: ["8.1", "8.2"] + env: + TARGET_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || inputs.ref || github.sha }} + TARGET_REPOSITORY: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.repository }} + steps: + - name: Check out target + uses: actions/checkout@v4 + with: + repository: ${{ env.TARGET_REPOSITORY }} + ref: ${{ env.TARGET_REF }} + + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + tools: composer + + - uses: actions/setup-node@v4 + with: + node-version: "24" + + - name: Test release trust and registry verification offline + run: node --test generator/tests/release.test.mjs + + - name: Validate the Packagist package and autoload + run: | + composer validate --no-check-publish + composer install --no-dev --no-interaction --prefer-dist --no-progress + php -r 'require "vendor/autoload.php"; if (!class_exists("Upcloud\\UpcloudClient")) { exit(1); }' + + - name: Install dependencies + run: composer install --no-interaction --prefer-dist --working-dir fern/sdk + + - name: Test OpenAPI preprocessing + run: python3 -m unittest discover -s generator/tests -p 'test_*.py' + + - name: Build PHP SDK + run: composer build --working-dir fern/sdk + + - name: Smoke test generated SDK + run: php generator/tests/generated_sdk_smoke.php + + - name: Check endpoint coverage + run: python3 generator/tests/check_endpoint_coverage.py generator/openapi/spec.json fern/sdk/src + + - name: Test generated request behavior + run: php generator/tests/generated_request_behavior.php + + - name: Test generated model fixtures + run: php generator/tests/generated_model_fixtures.php + + - name: Run PHPUnit and generated WireMock tests + run: composer test --working-dir fern/sdk + + - name: Run PHPStan + run: composer analyze --working-dir fern/sdk diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..0058acc5 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,129 @@ +name: Publish PHP SDK + +on: + workflow_run: + workflows: ["Build PHP SDK Release"] + types: [completed] + +permissions: + contents: read + actions: read + +jobs: + publish: + if: >- + github.event.workflow_run.conclusion == 'success' && + github.event.workflow_run.event == 'push' && + github.event.workflow_run.head_repository.full_name == github.repository + runs-on: ubuntu-latest + concurrency: + group: sdk-packagist-publication + cancel-in-progress: false + + steps: + - name: Require explicit Packagist publishing enablement + env: + PACKAGIST_PUBLISH_ENABLED: ${{ vars.PACKAGIST_PUBLISH_ENABLED }} + run: | + if [[ "$PACKAGIST_PUBLISH_ENABLED" != true ]]; then + echo "::error::Configure the existing Packagist package to use this repository, then set PACKAGIST_PUBLISH_ENABLED=true." + exit 1 + fi + + - uses: shivammathur/setup-php@v2 + with: + php-version: "8.2" + tools: composer + + - name: Download identity from the successful release run + uses: actions/download-artifact@v4 + with: + name: sdk-release-identity + path: release-identity + github-token: ${{ github.token }} + run-id: ${{ github.event.workflow_run.id }} + + - name: Validate explicit release identity + id: get_tag + env: + RELEASE_COMMIT: ${{ github.event.workflow_run.head_sha }} + RELEASE_RUN_ID: ${{ github.event.workflow_run.id }} + run: | + set -euo pipefail + RELEASE_TAG="$(php -r ' + $identity = json_decode(file_get_contents("release-identity/release.json"), true, 512, JSON_THROW_ON_ERROR); + if (($identity["commit"] ?? null) !== getenv("RELEASE_COMMIT") + || ($identity["repository"] ?? null) !== getenv("GITHUB_REPOSITORY") + || ($identity["run_id"] ?? null) !== getenv("RELEASE_RUN_ID") + || !is_string($identity["tag"] ?? null)) { + fwrite(STDERR, "Release identity does not match the successful workflow run\n"); + exit(1); + } + echo $identity["tag"]; + ')" + if [[ ! "$RELEASE_TAG" =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-(alpha|beta|rc)(\.(0|[1-9][0-9]*))?)?$ ]]; then + echo "::error::Expected vX.Y.Z or an alpha, beta, or rc tag, received '$RELEASE_TAG'." + exit 1 + fi + echo "tag=$RELEASE_TAG" >> "$GITHUB_OUTPUT" + echo "Publishing PHP SDK for tag: $RELEASE_TAG" + + - name: Check out the exact release commit + uses: actions/checkout@v4 + with: + ref: ${{ github.event.workflow_run.head_sha }} + fetch-depth: 0 + persist-credentials: false + + - name: Verify release tag and commit are on the default branch + env: + DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} + RELEASE_TAG: ${{ steps.get_tag.outputs.tag }} + RELEASE_COMMIT: ${{ github.event.workflow_run.head_sha }} + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + if [[ ! "$RELEASE_TAG" =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-(alpha|beta|rc)(\.(0|[1-9][0-9]*))?)?$ ]]; then + echo "::error::Expected vX.Y.Z or an alpha, beta, or rc tag, received '$RELEASE_TAG'." + exit 1 + fi + + AUTH_HEADER="$(printf 'x-access-token:%s' "$GH_TOKEN" | base64 | tr -d '\n')" + git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${AUTH_HEADER}" \ + fetch --no-tags origin "+refs/heads/${DEFAULT_BRANCH}:refs/release-verification/main" \ + "+refs/tags/${RELEASE_TAG}:refs/release-verification/tag" + unset AUTH_HEADER + TAG_COMMIT="$(git rev-parse "refs/release-verification/tag^{commit}")" + if [[ "$TAG_COMMIT" != "$RELEASE_COMMIT" || "$(git rev-parse HEAD)" != "$RELEASE_COMMIT" ]]; then + echo "::error::Tag $RELEASE_TAG no longer points to the release workflow commit." + exit 1 + fi + if ! git merge-base --is-ancestor "$RELEASE_COMMIT" refs/release-verification/main; then + echo "::error::Release commit is not on the history of $DEFAULT_BRANCH." + exit 1 + fi + echo "Verified $RELEASE_TAG ($RELEASE_COMMIT) is on $DEFAULT_BRANCH." + + - name: Publish to Packagist + env: + PACKAGIST_USERNAME: ${{ secrets.PACKAGIST_USERNAME }} + PACKAGIST_TOKEN: ${{ secrets.PACKAGIST_TOKEN }} + RELEASE_COMMIT: ${{ github.event.workflow_run.head_sha }} + RELEASE_TAG: ${{ steps.get_tag.outputs.tag }} + run: | + set -euo pipefail + chmod +x generator/scripts/publish.sh + bash generator/scripts/publish.sh "$RELEASE_TAG" + + - name: Record Packagist publication proof + run: | + echo "## Packagist publication verified" >> "$GITHUB_STEP_SUMMARY" + echo '```json' >> "$GITHUB_STEP_SUMMARY" + cat publication-receipt.json >> "$GITHUB_STEP_SUMMARY" + echo '```' >> "$GITHUB_STEP_SUMMARY" + + - uses: actions/upload-artifact@v4 + with: + name: packagist-publication-proof + path: publication-receipt.json + if-no-files-found: error diff --git a/.github/workflows/regenerate.yml b/.github/workflows/regenerate.yml new file mode 100644 index 00000000..b85c605a --- /dev/null +++ b/.github/workflows/regenerate.yml @@ -0,0 +1,130 @@ +name: Regenerate SDK + +on: + workflow_dispatch: + inputs: + version: + description: "Spec version (e.g. v0.0.40)" + required: true + asset_url: + description: "GitHub API asset URL for the spec tarball" + required: true + spec_file: + description: "Spec file name inside the tarball" + required: true + +jobs: + regenerate: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + actions: write + env: + SPEC_VERSION: ${{ github.event.inputs.version }} + ASSET_URL: ${{ github.event.inputs.asset_url }} + SPEC_FILE: ${{ github.event.inputs.spec_file || 'upcloud-public-openapi.json' }} + + steps: + - uses: actions/checkout@v4 + + - uses: shivammathur/setup-php@v2 + with: + php-version: "8.2" + tools: composer + + - name: Validate trusted spec asset URL + run: | + php -r ' + $parts = parse_url(getenv("ASSET_URL")); + if (!is_array($parts) + || ($parts["scheme"] ?? null) !== "https" + || ($parts["host"] ?? null) !== "api.github.com" + || isset($parts["user"]) || isset($parts["pass"]) + || isset($parts["port"]) || isset($parts["query"]) || isset($parts["fragment"]) + || !preg_match("{^/repos/UpCloudLtd/upcloud-openapi-spec/releases/assets/[1-9][0-9]*$}D", $parts["path"] ?? "")) { + fwrite(STDERR, "Expected an HTTPS release-asset API URL in UpCloudLtd/upcloud-openapi-spec\n"); + exit(1); + } + ' + + - name: Download OpenAPI Spec + env: + SPECS_ACCESS_PAT: ${{ secrets.SPECS_ACCESS_PAT }} + run: | + set -euo pipefail + + if [ -z "$SPEC_VERSION" ]; then + echo "ERROR: Missing workflow_dispatch input: version" + exit 1 + fi + + if [ -z "$ASSET_URL" ]; then + echo "ERROR: Missing asset_url" + exit 1 + fi + + if [ -z "$SPEC_FILE" ]; then + echo "ERROR: Missing spec_file" + exit 1 + fi + + echo "Spec version: $SPEC_VERSION" + echo "Spec file: $SPEC_FILE" + echo "Downloading from ASSET_URL='$ASSET_URL'" + + mkdir -p generator/openapi + + curl --fail --location --proto '=https' --proto-redir '=https' --max-redirs 5 \ + -H "Authorization: token $SPECS_ACCESS_PAT" \ + -H "Accept: application/octet-stream" \ + "$ASSET_URL" \ + -o spec.tar.gz + + echo "Extracting spec" + rm -rf /tmp/spec-extract + mkdir -p /tmp/spec-extract generator/openapi + + if ! tar -tzf spec.tar.gz | grep -Fx "$SPEC_FILE" >/dev/null; then + echo "ERROR: $SPEC_FILE not found in downloaded tarball" + tar -tzf spec.tar.gz + exit 1 + fi + + tar -xzf spec.tar.gz -C /tmp/spec-extract "$SPEC_FILE" + mv "/tmp/spec-extract/$SPEC_FILE" generator/openapi/spec.json + + if [ ! -f generator/openapi/spec.json ]; then + echo "ERROR: spec.json not found after extraction" + find generator/openapi -maxdepth 2 -type f + exit 1 + fi + + - name: Run SDK-specific generator script + run: | + chmod +x generator/scripts/generate.sh + generator/scripts/generate.sh + + - name: Create PR + id: create-pr + uses: peter-evans/create-pull-request@v7 + with: + commit-message: "chore: regenerate SDK from spec ${{ env.SPEC_VERSION }}" + branch: "regen/${{ env.SPEC_VERSION }}" + title: "Regenerate SDK (${{ env.SPEC_VERSION }})" + body: > + Automated regeneration for spec version + `${{ env.SPEC_VERSION }}`. + + - name: Dispatch validation workflow for generated PR + if: steps.create-pr.outputs.pull-request-number != '' + env: + GH_TOKEN: ${{ github.token }} + PR_BRANCH: ${{ steps.create-pr.outputs.pull-request-branch }} + PR_NUMBER: ${{ steps.create-pr.outputs.pull-request-number }} + run: | + set -euo pipefail + gh workflow run php-sdk-validation.yml \ + --ref "$PR_BRANCH" \ + -f "ref=$PR_BRANCH" \ + -f "pr_number=$PR_NUMBER" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..20f20092 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,113 @@ +name: Build PHP SDK Release + +on: + push: + tags: + - "v*.*.*" + +permissions: + contents: write + +jobs: + build-release: + runs-on: ubuntu-latest + + outputs: + version: ${{ steps.version.outputs.tag }} + commit: ${{ github.sha }} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Verify tag is on the default branch + env: + DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} + RELEASE_TAG: ${{ github.ref_name }} + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + if [[ ! "$RELEASE_TAG" =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-(alpha|beta|rc)(\.(0|[1-9][0-9]*))?)?$ ]]; then + echo "::error::Expected vX.Y.Z or an alpha, beta, or rc tag, received '$RELEASE_TAG'." + exit 1 + fi + + AUTH_HEADER="$(printf 'x-access-token:%s' "$GH_TOKEN" | base64 | tr -d '\n')" + git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${AUTH_HEADER}" \ + fetch --no-tags origin "refs/heads/${DEFAULT_BRANCH}" + unset AUTH_HEADER + TAG_COMMIT="$(git rev-parse "${GITHUB_REF}^{commit}")" + if [[ "$TAG_COMMIT" != "$GITHUB_SHA" ]]; then + echo "::error::Tag $RELEASE_TAG does not resolve to the event commit." + exit 1 + fi + if ! git merge-base --is-ancestor "$TAG_COMMIT" FETCH_HEAD; then + echo "::error::Tag $RELEASE_TAG is not on the history of $DEFAULT_BRANCH." + exit 1 + fi + echo "Verified $RELEASE_TAG is on $DEFAULT_BRANCH." + + - uses: shivammathur/setup-php@v2 + with: + php-version: "8.2" + tools: composer + + - name: Extract Version + id: version + run: | + TAG="${GITHUB_REF#refs/tags/}" + echo "tag=$TAG" >> $GITHUB_OUTPUT + echo "Releasing PHP SDK version: $TAG" + + - uses: actions/setup-node@v4 + with: + node-version: "24" + + - name: Test release guards offline + run: node --test generator/tests/release.test.mjs + + - name: Record release identity + env: + RELEASE_TAG: ${{ steps.version.outputs.tag }} + run: | + mkdir -p release-identity + php -r '$identity = ["tag" => getenv("RELEASE_TAG"), "commit" => getenv("GITHUB_SHA"), "repository" => getenv("GITHUB_REPOSITORY"), "run_id" => getenv("GITHUB_RUN_ID")]; file_put_contents("release-identity/release.json", json_encode($identity, JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT) . PHP_EOL);' + + - uses: actions/upload-artifact@v4 + with: + name: sdk-release-identity + path: release-identity/release.json + if-no-files-found: error + + - name: Build Release Artifacts + run: | + chmod +x generator/scripts/prepare-release.sh + generator/scripts/prepare-release.sh "${{ steps.version.outputs.tag }}" + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ steps.version.outputs.tag }} + name: "PHP SDK Release ${{ steps.version.outputs.tag }}" + prerelease: ${{ contains(steps.version.outputs.tag, '-') }} + make_latest: ${{ contains(steps.version.outputs.tag, '-') && 'false' || 'true' }} + files: | + generator/release-artifacts/* + + docs: + needs: build-release + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: Trigger docs workflow + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.repository }} + event-type: docs-update + client-payload: | + { + "version": "${{ needs.build-release.outputs.version }}" + } \ No newline at end of file diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml new file mode 100644 index 00000000..66273570 --- /dev/null +++ b/.github/workflows/update-docs.yml @@ -0,0 +1,68 @@ +name: Update Versioned Documentation + +on: + repository_dispatch: + types: [docs-update] + +permissions: + contents: write + pull-requests: write + +jobs: + update-docs: + runs-on: ubuntu-latest + + env: + VERSION: ${{ github.event.client_payload.version }} + REFERENCE_FILE: "fern/sdk/reference.md" + REFERENCE_SOURCE_DIR: "fern/sdk" + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + ref: ${{ env.VERSION }} + persist-credentials: false + + - name: Validate reference.md exists + run: | + set -euo pipefail + if [ ! -f "$REFERENCE_FILE" ]; then + echo "ERROR: Reference file not found: $REFERENCE_FILE" + exit 1 + fi + echo "Found reference: $REFERENCE_FILE" + + - name: Prepare versioned GitHub Pages documentation + run: python3 generator/scripts/prepare_docs.py --version "$VERSION" --source "$REFERENCE_FILE" + + - name: Commit docs changes + run: | + set -euo pipefail + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + git add docs + if git diff --cached --quiet; then + echo "No new docs to commit" + exit 0 + fi + + - name: Create PR for docs update + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.GITHUB_TOKEN }} + base: ${{ github.event.repository.default_branch }} + commit-message: "docs: update docs for ${VERSION}" + branch: "docs/update-${{ env.VERSION }}" + title: "docs: update docs for ${{ env.VERSION }}" + body: | + Automated documentation update for release **${{ env.VERSION }}**. + + - Updated `docs/latest/reference.md` + - Added/updated `docs/${{ env.VERSION }}/reference.md` + - Regenerated `docs/index.md` with all versioned docs + + labels: | + docs + automated diff --git a/.gitignore b/.gitignore index d12a93dd..b0a8871c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,64 @@ -vendor +# OS files .DS_Store -git_push.sh -.vscode -/phpunit.xml -/composer.lock -.phpunit.result.cache +Thumbs.db + +# Editor folders +.idea/ +.vscode/ + +# Dependency folders (various languages) +node_modules/ +vendor/ +target/ +dist/ +build/ +out/ + +# Python +__pycache__/ +*.pyc + +# Go +bin/ +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# PHP Composer +composer.lock + +# Logs +*.log + +# Coverage & reports +coverage/ +.coverage +coverage.xml +clover.xml +lcov.info + +# Temp tmp/ +temp/ +*.tmp +*.swp + +# SDK generation cache +generated/ +output/ +generator/openapi/spec.patched.json + +# Artefacts +*.tar.gz +*.zip + +# Local GitHub Pages builds +_site/ +.sass-cache/ +.jekyll-cache/ +docs/.bundle/ + +# Local migration planning +/MIGRATION-RUNBOOK.local.md diff --git a/.php_cs b/.php_cs deleted file mode 100644 index f402769a..00000000 --- a/.php_cs +++ /dev/null @@ -1,63 +0,0 @@ -in(['lib', 'test']); - -return PhpCsFixer\Config::create() - ->setUsingCache(true) - ->setRiskyAllowed(true) - ->setRules([ - '@Symfony' => true, - 'align_multiline_comment' => true, - 'array_indentation' => true, - 'array_syntax' => ['syntax' => 'short'], - 'combine_consecutive_issets' => true, - 'date_time_immutable' => true, - 'declare_strict_types' => true, - 'function_to_constant' => true, - 'header_comment' => ['header' => ''], - 'mb_str_functions' => true, - 'method_chaining_indentation' => true, - 'multiline_whitespace_before_semicolons' => true, - 'native_constant_invocation' => true, - 'native_function_invocation' => true, - 'no_alternative_syntax' => true, - 'no_homoglyph_names' => true, - 'no_null_property_initialization' => true, - 'no_superfluous_elseif' => true, - 'no_superfluous_phpdoc_tags' => [ - 'allow_mixed' => true, - ], - 'no_useless_else' => true, - 'nullable_type_declaration_for_default_null_value' => [ - 'use_nullable_type_declaration' => true, - ], - 'ordered_imports' => true, - 'ordered_interfaces' => true, - 'phpdoc_line_span' => [ - 'const' => 'single', - 'property' => 'single', - ], - 'phpdoc_no_empty_return' => true, - 'php_unit_expectation' => true, - 'php_unit_internal_class' => true, - 'php_unit_mock' => true, - 'php_unit_mock_short_will_return' => true, - 'php_unit_namespaced' => true, - 'php_unit_no_expectation_annotation' => true, - 'php_unit_set_up_tear_down_visibility' => true, - 'php_unit_test_case_static_method_calls' => [ - 'call_type' => 'this', - ], - 'phpdoc_align' => false, - 'phpdoc_order' => true, - 'phpdoc_trim_consecutive_blank_line_separation' => true, - 'simple_to_complex_string_variable' => true, - 'single_line_throw' => false, - 'static_lambda' => true, - 'void_return' => true, - 'yoda_style' => false, - ]) - ->setFinder($finder); diff --git a/LICENSE b/LICENSE index 8837dac5..bd046546 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ -The MIT License (MIT) +MIT License -Copyright (c) 2017 UpCloud +Copyright (c) 2025 UpCloud Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index ca2b5a39..39c9ecc6 100644 --- a/README.md +++ b/README.md @@ -1,319 +1,151 @@ -# UpCloud PHP API client library +# UpCloud PHP SDK -![UpCloud php api test](https://github.com/UpCloudLtd/upcloud-php-api/workflows/UpCloud%20php%20api%20test/badge.svg) -[![Latest Stable Version](https://poser.pugx.org/upcloudltd/upcloud-php-api/v/stable)](https://packagist.org/packages/upcloudltd/upcloud-php-api) -[![License](https://poser.pugx.org/upcloudltd/upcloud-php-api/license)](https://packagist.org/packages/upcloudltd/upcloud-php-api) -[![Total Downloads](https://poser.pugx.org/upcloudltd/upcloud-php-api/downloads)](https://packagist.org/packages/upcloudltd/upcloud-php-api) +The **UpCloud PHP SDK** provides a convenient, strongly-typed way to interact with the **UpCloud API** from PHP applications. -This PHP API client library provides integration with the UpCloud API allowing operations used to manage resources on UpCloud. The client is a web service interface that uses HTTPS to connect to the API. The API follows the principles of a RESTful web service wherever possible. +It is automatically generated from UpCloud’s official OpenAPI specification and kept up to date through an automated release process, ensuring alignment with the latest publicly released API versions. -The base URL for all API operations is https://api.upcloud.com/ and require basic authentication using UpCloud username and password. We recommend [creating a subaccount](https://www.upcloud.com/support/server-tags-and-group-accounts/) dedicated for the API communication for security purposes. This allows you to restrict API access by servers, storages, and tags ensuring you will never accidentally affect critical systems. +--- -NOTE: Please test all of your use cases thoroughly before actual production use. Using a separate UpCloud account for testing / developing the client is recommended. +## ✨ Features -## Table of content -* [Installation](#installation) -* [Usage](#usage) -* [Documentation](#documentation) -* [Issues](#issues) -* [License](#license) +- Official UpCloud SDK for PHP +- Generated from the public OpenAPI specification +- Fully typed API client +- Automatically updated as the API evolves +- Versioned releases matching API changes +- Open-source and MIT licensed -## Requirements +--- -Using this library requires the PHP version 8.0 and later. +## πŸ“¦ Installation -## Installation -### Composer +# UpCloud PHP SDK -To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`: +The UpCloud PHP SDK is a typed PHP client for the UpCloud API. Its clients and +API reference are generated from UpCloud's public OpenAPI specification. -``` -{ - "require": { - "upcloudltd/upcloud-php-api": "v2.0.0" - } -} -``` - -Then run `composer install` +## Requirements -The upcloudltd/upcloud-php-api can be found from packagist.org, https://packagist.org/packages/upcloudltd/upcloud-php-api +- PHP `^8.1` +- Composer -### Manual installation +Composer installs the SDK's HTTP and JSON dependencies automatically. -Download the files and include `autoload.php`: +## Installation -```php - require_once('/path/to//vendor/autoload.php'); +```sh +composer require upcloudltd/upcloud-php-api ``` -## Tests +## Authentication -To run the unit tests: +Create an API token for your UpCloud account and provide it to the client. Keep +the token outside source control; the example reads it from an environment +variable. -``` -composer install +## Quick Start -./vendor/bin/phpunit -``` +```php +getConfig(); -$config->setUsername('YOUR UPCLOUD USERNAME'); -$config->setPassword('YOUR UPCLOUD PASSWORD'); +$client = new UpcloudClient(token: $token); try { - $result = $api_instance->getAccount(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AccountApi->getAccount: ', $e->getMessage(), PHP_EOL; + $response = $client->server->listServers( + new ListServersRequest([ + 'limit' => 25, + 'offset' => 0, + ]), + ); + + foreach ($response->servers->server ?? [] as $server) { + printf("%s\n", $server->uuid); + } +} catch (UpcloudApiException $exception) { + fprintf(STDERR, "UpCloud API returned HTTP %d\n", $exception->getCode()); + var_dump($exception->getBody()); +} catch (UpcloudException $exception) { + fprintf(STDERR, "UpCloud SDK request failed: %s\n", $exception->getMessage()); } - -?> ``` -To create a server: +Service clients are properties of `UpcloudClient`, such as `$client->server` +and `$client->database`. Request objects accept associative arrays of typed +fields, and successful operations return typed response objects. The API +reference lists each operation's parameters and return type. -```php -getConfig(); -$config->setUsername('YOUR UPCLOUD USERNAME'); -$config->setPassword('YOUR UPCLOUD PASSWORD'); +`UpcloudApiException` represents a non-success API response. `getCode()` returns +the HTTP status code, and `getBody()` returns the response payload. +`UpcloudException` represents other SDK failures, including transport and +response-deserialization errors. -try { - $result = $api_instance->getAccount(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AccountApi->getAccount: ', $e->getMessage(), PHP_EOL; -} +## Client Options -$server = new Upcloud\ApiClient\Model\Server(); -$server->setTitle('php-test-machine'); -$server->setZone('fi-hel1'); -$server->setHostname('phptest'); -$server->setPlan('1xCPU-1GB'); +Pass options to the client to set defaults, or to an operation to override them. +Supported options include `baseUrl`, `timeout` in seconds, `maxRetries`, +additional `headers`, and a custom Guzzle-compatible `client`. The retry limit +defaults to two retries after the initial request. -$storage = new Upcloud\ApiClient\Model\StorageDevice(); -$storage->setStorage('01000000-0000-4000-8000-000030060200'); -$storage->setSize(50.0); -$storage->setAction('clone'); -$storage->setTitle('php-test-storage'); +```php +$client = new UpcloudClient( + token: $token, + options: [ + 'timeout' => 10.0, + 'maxRetries' => 2, + ], +); + +$response = $client->server->listServers( + options: ['timeout' => 5.0], +); +``` -$storage_devices = new Upcloud\ApiClient\Model\ServerStorageDevices(); -$storage_devices->setStorageDevice([$storage]); +## API Reference -$server->setStorageDevices($storage_devices); +Browse the [versioned SDK API reference](https://upcloudltd.github.io/upcloud-php-api/) +for operation descriptions, parameters, response types, and examples. -$server_request = new Upcloud\ApiClient\Model\CreateServerRequest(); -$server_request->setServer($server); -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -try { - $result = $api_instance->createServer($server_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->createServer: ', $e->getMessage(), PHP_EOL; -} +## Upgrading from v3 -?> +Version 4 is a breaking replacement of the legacy client, published under the same +Composer package name. Existing v1-v3 tags remain unchanged. Applications staying +on v3 should keep their Composer constraint within `^3.0`. + +The generated v4 client uses `Upcloud\UpcloudClient` and service/request classes +instead of the legacy `Upcloud\ApiClient\` API. Review authentication, request +objects, response models, and exception handling against the examples above; this +is not a drop-in upgrade. Test an alpha explicitly with: + +```sh +composer require 'upcloudltd/upcloud-php-api:4.0.0-alpha.1@alpha' ``` -## Documentation - -All URIs are relative to *https://api.upcloud.com/1.3* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AccountApi* | [**getAccount**](docs/Api/AccountApi.md#getaccount) | **GET** /account | Account information -*FirewallApi* | [**createFirewallRule**](docs/Api/FirewallApi.md#createfirewallrule) | **POST** /server/{serverId}/firewall_rule | Create firewall rule -*FirewallApi* | [**deleteFirewallRule**](docs/Api/FirewallApi.md#deletefirewallrule) | **DELETE** /server/{serverId}/firewall_rule/{firewallRuleNumber} | Remove firewall rule -*FirewallApi* | [**getFirewallRule**](docs/Api/FirewallApi.md#getfirewallrule) | **GET** /server/{serverId}/firewall_rule/{firewallRuleNumber} | Get firewall rule details -*FirewallApi* | [**serverServerIdFirewallRuleGet**](docs/Api/FirewallApi.md#serverserveridfirewallruleget) | **GET** /server/{serverId}/firewall_rule | List firewall rules -*IPAddressApi* | [**addIp**](docs/Api/IPAddressApi.md#addip) | **POST** /ip_address | Assign IP address -*IPAddressApi* | [**deleteIp**](docs/Api/IPAddressApi.md#deleteip) | **DELETE** /ip_address/{ip} | Release IP address -*IPAddressApi* | [**getDetails**](docs/Api/IPAddressApi.md#getdetails) | **GET** /ip_address/{ip} | Get IP address details -*IPAddressApi* | [**listIps**](docs/Api/IPAddressApi.md#listips) | **GET** /ip_address | List IP addresses -*IPAddressApi* | [**modifyIp**](docs/Api/IPAddressApi.md#modifyip) | **PUT** /ip_address/{ip} | Modify IP address -*NetworkApi* | [**getListNetworks**](docs/Api/NetworkApi.md#getlistnetworks) | **GET** /network | List all Networks | -*NetworkApi* | [**getNetworkDetails**](docs/Api/NetworkApi.md#getnetworkdetails) | **GET** /network/{uuid} | Get Network details | -*NetworkApi* | [**createNetwork**](docs/Api/NetworkApi.md#createnetwork) | **POST** /network | Create a new SDN private network | -*NetworkApi* | [**modifyNetwork**](docs/Api/NetworkApi.md#modifynetwork) | **PUT** /network/{id} | Modify a specific SDN private network | -*NetworkApi* | [**deleteNetwork**](docs/Api/NetworkApi.md#deletenetwork) | **DELETE** /network/{id} | Delete a SDN private network | -*NetworkApi* | [**getListServerNetworks**](docs/Api/NetworkApi.md#getlistservernetworks) | **GET** server/{server_id}/networking | List all Networks | -*NetworkApi* | [**createNetworkInterface**](docs/Api/NetworkApi.md#createnetworkinterface) | **POST** server/{server}/networking/interface | Create a new network interface | -*NetworkApi* | [**modifyNetworkInterface**](docs/Api/NetworkApi.md#modifynetworkinterface) | **PUT** /network/{id} | Modify network interface | -*NetworkApi* | [**deleteNetworkInterface**](docs/Api/NetworkApi.md#deletenetworkinterface) | **DELETE** /network/{id} | Delete network interface | -*NetworkApi* | [**getListRouters**](docs/Api/NetworkApi.md#getlistrouters) | **GET** /router | List of all available routers | -*NetworkApi* | [**getRouterDetails**](docs/Api/NetworkApi.md#getrouterdetails) | **GET** /router/{uuid} | Get router details | -*NetworkApi* | [**createRouter**](docs/Api/NetworkApi.md#createrouter) | **POST** /router | Create a new router | -*NetworkApi* | [**modifyRouter**](docs/Api/NetworkApi.md#modifyrouter) | **PUT** /router/{id} | Modify an existing router | -*NetworkApi* | [**deleteRouter**](docs/Api/NetworkApi.md#deleterouter) | **DELETE** /router/{id} | Delete an existing router | -*ObjectStorageApi* | [**getListObjectStorage**](docs/Api/ObjectStorageApi.md#getlistobjectstorage) | **GET** /object-storage | List all Object Storage -*ObjectStorageApi* | [**getObjectStorageDetails**](docs/Api/ObjectStorageApi.md#getobjectstoragedetails) | **GET** /object-storage/{uuid} | Get Object Storage details -*ObjectStorageApi* | [**createObjectStorage**](docs/Api/ObjectStorageApi.md#createobjectstorage) | **POST** /object-storage | Create a new Object Storage -*ObjectStorageApi* | [**modifyObjectStorage**](docs/Api/ObjectStorageApi.md#modifyobjectstorage) | **PATCH** /object-storage/{id} | Modify Object Storage -*ObjectStorageApi* | [**deleteObjectStorage**](docs/Api/ObjectStorageApi.md#deleteobjectstorage) | **DELETE** /object-storage/{id} | Release Object Storage -*HostsApi* | [**getListHosts**](docs/Api/HostsApi.md#getlisthosts) | **GET** /host | List of available hosts -*HostsApi* | [**getHostDetails**](docs/Api/HostsApi.md#gethostdetails) | **GET** /host/{id} | Get detailed information about a specific host -*HostsApi* | [**modifyHost**](docs/Api/HostsApi.md#modifyhost) | **PATCH** /host/{id} | Modify specific host -*PlanApi* | [**listPlans**](docs/Api/PlanApi.md#listplans) | **GET** /plan | List available plans -*PricesApi* | [**listPrices**](docs/Api/PricesApi.md#listprices) | **GET** /price | List prices -*ServerApi* | [**assignTag**](docs/Api/ServerApi.md#assigntag) | **POST** /server/{serverId}/tag/{tagList} | Assign tag to a server -*ServerApi* | [**attachStorage**](docs/Api/ServerApi.md#attachstorage) | **POST** /server/{serverId}/storage/attach | Attach storage -*ServerApi* | [**createFirewallRule**](docs/Api/ServerApi.md#createfirewallrule) | **POST** /server/{serverId}/firewall_rule | Create firewall rule -*ServerApi* | [**createServer**](docs/Api/ServerApi.md#createserver) | **POST** /server | Create server -*ServerApi* | [**deleteFirewallRule**](docs/Api/ServerApi.md#deletefirewallrule) | **DELETE** /server/{serverId}/firewall_rule/{firewallRuleNumber} | Remove firewall rule -*ServerApi* | [**deleteServer**](docs/Api/ServerApi.md#deleteserver) | **DELETE** /server/{serverId} | Delete server -*ServerApi* | [**detachStorage**](docs/Api/ServerApi.md#detachstorage) | **POST** /server/{serverId}/storage/detach | Detach storage -*ServerApi* | [**ejectCdrom**](docs/Api/ServerApi.md#ejectcdrom) | **POST** /server/{serverId}/cdrom/eject | Eject CD-ROM -*ServerApi* | [**getFirewallRule**](docs/Api/ServerApi.md#getfirewallrule) | **GET** /server/{serverId}/firewall_rule/{firewallRuleNumber} | Get firewall rule details -*ServerApi* | [**listServerConfigurations**](docs/Api/ServerApi.md#listserverconfigurations) | **GET** /server_size | List server configurations -*ServerApi* | [**listServers**](docs/Api/ServerApi.md#listservers) | **GET** /server | List of servers -*ServerApi* | [**loadCdrom**](docs/Api/ServerApi.md#loadcdrom) | **POST** /server/{serverId}/storage/cdrom/load | Load CD-ROM -*ServerApi* | [**modifyServer**](docs/Api/ServerApi.md#modifyserver) | **PUT** /server/{serverId} | Modify server -*ServerApi* | [**restartServer**](docs/Api/ServerApi.md#restartserver) | **POST** /server/{serverId}/restart | Restart server -*ServerApi* | [**serverDetails**](docs/Api/ServerApi.md#serverdetails) | **GET** /server/{serverId} | Get server details -*ServerApi* | [**serverServerIdFirewallRuleGet**](docs/Api/ServerApi.md#serverserveridfirewallruleget) | **GET** /server/{serverId}/firewall_rule | List firewall rules -*ServerApi* | [**startServer**](docs/Api/ServerApi.md#startserver) | **POST** /server/{serverId}/start | Start server -*ServerApi* | [**stopServer**](docs/Api/ServerApi.md#stopserver) | **POST** /server/{serverId}/stop | Stop server -*ServerApi* | [**untag**](docs/Api/ServerApi.md#untag) | **POST** /server/{serverId}/untag/{tagName} | Remove tag from server -*StorageApi* | [**attachStorage**](docs/Api/StorageApi.md#attachstorage) | **POST** /server/{serverId}/storage/attach | Attach storage -*StorageApi* | [**backupStorage**](docs/Api/StorageApi.md#backupstorage) | **POST** /storage/{storageId}/backup | Create backup -*StorageApi* | [**cancelOperation**](docs/Api/StorageApi.md#canceloperation) | **POST** /storage/{storageId}/cancel | Cancel storage operation -*StorageApi* | [**cloneStorage**](docs/Api/StorageApi.md#clonestorage) | **POST** /storage/{storageId}/clone | Clone storage -*StorageApi* | [**createStorage**](docs/Api/StorageApi.md#createstorage) | **POST** /storage | Create storage -*StorageApi* | [**deleteStorage**](docs/Api/StorageApi.md#deletestorage) | **DELETE** /storage/{storageId} | Delete storage -*StorageApi* | [**detachStorage**](docs/Api/StorageApi.md#detachstorage) | **POST** /server/{serverId}/storage/detach | Detach storage -*StorageApi* | [**ejectCdrom**](docs/Api/StorageApi.md#ejectcdrom) | **POST** /server/{serverId}/cdrom/eject | Eject CD-ROM -*StorageApi* | [**favoriteStorage**](docs/Api/StorageApi.md#favoritestorage) | **POST** /storage/{storageId}/favorite | Add storage to favorites -*StorageApi* | [**getStorageDetails**](docs/Api/StorageApi.md#getstoragedetails) | **GET** /storage/{storageId} | Get storage details -*StorageApi* | [**listStorageTypes**](docs/Api/StorageApi.md#liststoragetypes) | **GET** /storage/{type}/ | List of storages by type -*StorageApi* | [**listStorages**](docs/Api/StorageApi.md#liststorages) | **GET** /storage | List of storages -*StorageApi* | [**loadCdrom**](docs/Api/StorageApi.md#loadcdrom) | **POST** /server/{serverId}/storage/cdrom/load | Load CD-ROM -*StorageApi* | [**modifyStorage**](docs/Api/StorageApi.md#modifystorage) | **PUT** /storage/{storageId} | Modify storage -*StorageApi* | [**restoreStorage**](docs/Api/StorageApi.md#restorestorage) | **POST** /storage/{storageId}/restore | Restore backup -*StorageApi* | [**templatizeStorage**](docs/Api/StorageApi.md#templatizestorage) | **POST** /storage/{storageId}/templatize | Templatize storage -*StorageApi* | [**unfavoriteStorage**](docs/Api/StorageApi.md#unfavoritestorage) | **DELETE** /storage/{storageId}/favorite | Remove storage from favorites -*TagApi* | [**assignTag**](docs/Api/TagApi.md#assigntag) | **POST** /server/{serverId}/tag/{tagList} | Assign tag to a server -*TagApi* | [**createTag**](docs/Api/TagApi.md#createtag) | **POST** /tag | Create a new tag -*TagApi* | [**deleteTag**](docs/Api/TagApi.md#deletetag) | **DELETE** /tag/{tagName} | Delete tag -*TagApi* | [**listTags**](docs/Api/TagApi.md#listtags) | **GET** /tag | List existing tags -*TagApi* | [**modifyTag**](docs/Api/TagApi.md#modifytag) | **PUT** /tag/{tagName} | Modify existing tag -*TagApi* | [**untag**](docs/Api/TagApi.md#untag) | **POST** /server/{serverId}/untag/{tagName} | Remove tag from server -*TimezoneApi* | [**listTimezones**](docs/Api/TimezoneApi.md#listtimezones) | **GET** /timezone | List timezones -*ZoneApi* | [**listZones**](docs/Api/ZoneApi.md#listzones) | **GET** /zone | List available zones - - -## Documentation of the models - - - [Account](docs/Model/Account.md) - - [AccountResourceLimits](docs/Model/AccountResourceLimits.md) - - [AccountResponse](docs/Model/AccountResponse.md) - - [AddIpRequest](docs/Model/AddIpRequest.md) - - [AssignIpResponse](docs/Model/AssignIpResponse.md) - - [AttachNetwork](docs/Model/AttachNetwork.md) - - [AttachStorageDeviceRequest](docs/Model/AttachStorageDeviceRequest.md) - - [AvailablePlanListResponse](docs/Model/AvailablePlanListResponse.md) - - [AvailablePlanListResponsePlans](docs/Model/AvailablePlanListResponsePlans.md) - - [BackupRule](docs/Model/BackupRule.md) - - [CloneStorageRequest](docs/Model/CloneStorageRequest.md) - - [ConfigurationListResponse](docs/Model/ConfigurationListResponse.md) - - [ConfigurationListResponseServerSizes](docs/Model/ConfigurationListResponseServerSizes.md) - - [CreateBackupStorageRequest](docs/Model/CreateBackupStorageRequest.md) - - [CreateNewTagResponse](docs/Model/CreateNewTagResponse.md) - - [CreateServerRequest](docs/Model/CreateServerRequest.md) - - [CreateServerResponse](docs/Model/CreateServerResponse.md) - - [CreateStorageRequest](docs/Model/CreateStorageRequest.md) - - [CreateStorageResponse](docs/Model/CreateStorageResponse.md) - - [Error](docs/Model/Error.md) - - [ErrorCode](docs/Model/ErrorCode.md) - - [ErrorError](docs/Model/ErrorError.md) - - [ErrorStatus](docs/Model/ErrorStatus.md) - - [FirewallRule](docs/Model/FirewallRule.md) - - [FirewallRuleCreateResponse](docs/Model/FirewallRuleCreateResponse.md) - - [FirewallRuleListResponse](docs/Model/FirewallRuleListResponse.md) - - [FirewallRuleListResponseFirewallRules](docs/Model/FirewallRuleListResponseFirewallRules.md) - - [FirewallRuleRequest](docs/Model/FirewallRuleRequest.md) - - [Host](docs/Model/Host.md) - - [IpAddress](docs/Model/IpAddress.md) - - [IpAddressListResponse](docs/Model/IpAddressListResponse.md) - - [IpAddresses](docs/Model/IpAddresses.md) - - [IpNetwork](docs/Model/IpNetwork.md) - - [ModifyIpRequest](docs/Model/ModifyIpRequest.md) - - [ModifyServerRequest](docs/Model/ModifyServerRequest.md) - - [ModifyStorageRequest](docs/Model/ModifyStorageRequest.md) - - [ModifyTagRequest](docs/Model/ModifyTagRequest.md) - - [Network](docs/Model/Network.md) - - [NetworkInterface](docs/Model/NetworkInterface.md) - - [ObjectStorage](docs/Model/ObjectStorage.md) - - [Plan](docs/Model/Plan.md) - - [Price](docs/Model/Price.md) - - [PriceListResponse](docs/Model/PriceListResponse.md) - - [PriceListResponsePrices](docs/Model/PriceListResponsePrices.md) - - [PriceZone](docs/Model/PriceZone.md) - - [RestartServer](docs/Model/RestartServer.md) - - [Router](docs/Model/Router.md) - - [Server](docs/Model/Server.md) - - [ServerListResponse](docs/Model/ServerListResponse.md) - - [ServerListResponseServers](docs/Model/ServerListResponseServers.md) - - [ServerLoginUser](docs/Model/ServerLoginUser.md) - - [ServerSize](docs/Model/ServerSize.md) - - [ServerState](docs/Model/ServerState.md) - - [ServerStorageDevices](docs/Model/ServerStorageDevices.md) - - [ServerTags](docs/Model/ServerTags.md) - - [Stat](docs/Model/Stat.md) - - [StopServer](docs/Model/StopServer.md) - - [StopServerRequest](docs/Model/StopServerRequest.md) - - [Storage](docs/Model/Storage.md) - - [StorageAccessType](docs/Model/StorageAccessType.md) - - [StorageBackups](docs/Model/StorageBackups.md) - - [StorageDevice](docs/Model/StorageDevice.md) - - [StorageDeviceDetachRequest](docs/Model/StorageDeviceDetachRequest.md) - - [StorageDeviceLoadRequest](docs/Model/StorageDeviceLoadRequest.md) - - [Servers](docs/Model/Servers.md) - - [StorageState](docs/Model/StorageState.md) - - [StorageTier](docs/Model/StorageTier.md) - - [StorageType](docs/Model/StorageType.md) - - [SuccessStoragesResponse](docs/Model/SuccessStoragesResponse.md) - - [SuccessStoragesResponseStorages](docs/Model/SuccessStoragesResponseStorages.md) - - [Tag](docs/Model/Tag.md) - - [TagCreateRequest](docs/Model/TagCreateRequest.md) - - [TagListResponse](docs/Model/TagListResponse.md) - - [TagListResponseTags](docs/Model/TagListResponseTags.md) - - [TagServers](docs/Model/TagServers.md) - - [TemplitizeStorageRequest](docs/Model/TemplitizeStorageRequest.md) - - [TimezoneListResponse](docs/Model/TimezoneListResponse.md) - - [TimezoneListResponseTimezones](docs/Model/TimezoneListResponseTimezones.md) - - [Zone](docs/Model/Zone.md) - - [ZoneListResponse](docs/Model/ZoneListResponse.md) - - [ZoneListResponseZones](docs/Model/ZoneListResponseZones.md) - - -## Documentation for authorization - -It's recommended to store the username and password in a separate configuration file while developing API applications to avoid accidentally publishing your account credentials. - -### baseAuth - -- **Type**: HTTP basic authentication -- **Username**: Your UpCloud API username -- **Password**: Your UpCloud API user's password - -## Issues - -Found a bug, have a problem using the client, or anything else about the library you would want to mention? [Open a new issue here](https://github.com/UpCloudLtd/upcloud-php-api/issues/new) to get in contact. +The [v3 source and documentation](https://github.com/UpCloudLtd/upcloud-php-api/tree/v3.0.0) +remain available at the original tag. The `v0.0.x` reference snapshots in Pages +belong to pre-migration SDK development, not to the legacy Packagist releases. + +## Releases and Contributions +SDK releases follow semantic versioning and correspond to reviewed API +specification releases. The SDK source is generated; make generator changes in +the `generator/` sources rather than editing generated files directly. Issues, +bug reports, and documentation contributions are welcome. ## License -This project is distributed under the [MIT License](https://opensource.org/licenses/MIT), see LICENSE.txt for more information. +This project is licensed under the MIT License. See the +[LICENSE file](https://github.com/UpCloudLtd/upcloud-php-api/blob/main/LICENSE). \ No newline at end of file diff --git a/composer.json b/composer.json index 53a0bbfc..af4d1fa1 100644 --- a/composer.json +++ b/composer.json @@ -1,45 +1,26 @@ { "name": "upcloudltd/upcloud-php-api", - "description": "UpCloud PHP API", + "type": "library", + "description": "Official UpCloud PHP SDK for the UpCloud API", "keywords": [ - "php", - "sdk", + "upcloud", "api", - "upcloud" + "sdk" ], "homepage": "https://github.com/UpCloudLtd/upcloud-php-api", + "support": { + "issues": "https://github.com/UpCloudLtd/upcloud-php-api/issues", + "source": "https://github.com/UpCloudLtd/upcloud-php-api" + }, "license": "MIT", - "authors": [ - { - "name": "UpCloud", - "homepage": "https://www.upcloud.com" - } - ], "require": { - "php": "^8.0", - "ext-curl": "*", + "php": "^8.1", "ext-json": "*", - "ext-mbstring": "*", - "guzzlehttp/guzzle": "^7.1", - "symfony/serializer": "^6.0", - "symfony/property-access": "^6.0", - "webmozart/assert": "^1.9" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.8", - "squizlabs/php_codesniffer": "~3.5", - "mockery/mockery": "^1.3.3", - "symfony/var-dumper": "^6.0" + "guzzlehttp/guzzle": "^7.4" }, "autoload": { "psr-4": { - "Upcloud\\ApiClient\\": "lib/" + "Upcloud\\": "fern/sdk/src/" } - }, - "autoload-dev": { - "psr-4": { - "Upcloud\\Tests\\": "test/" - } - }, - "minimum-stability": "stable" + } } \ No newline at end of file diff --git a/docs/Api/AccountApi.md b/docs/Api/AccountApi.md deleted file mode 100644 index 4e14708e..00000000 --- a/docs/Api/AccountApi.md +++ /dev/null @@ -1,55 +0,0 @@ -# Upcloud\ApiClient\AccountApi - -All URIs are relative to _https://api.upcloud.com/1.3_ - -| Method | HTTP request | Description | -| ------------------------------------------ | ---------------- | ------------------- | -| [**getAccount**](AccountApi.md#getAccount) | **GET** /account | Account information | - -# **getAccount** - -> \Upcloud\ApiClient\Model\AccountResponse getAccount() - -Account information - -Returns information on the user's account. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\AccountApi(); - -try { - $result = $api_instance->getAccount(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AccountApi->getAccount: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Upcloud\ApiClient\Model\AccountResponse**](../Model/AccountResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) diff --git a/docs/Api/FirewallApi.md b/docs/Api/FirewallApi.md deleted file mode 100644 index 878f05c0..00000000 --- a/docs/Api/FirewallApi.md +++ /dev/null @@ -1,219 +0,0 @@ -# Upcloud\ApiClient\FirewallApi - -All URIs are relative to _https://api.upcloud.com/1.3_ - -| Method | HTTP request | Description | -| --------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------- | -| [**createFirewallRule**](FirewallApi.md#createFirewallRule) | **POST** /server/{serverId}/firewall_rule | Create firewall rule | -| [**deleteFirewallRule**](FirewallApi.md#deleteFirewallRule) | **DELETE** /server/{serverId}/firewall_rule/{firewallRuleNumber} | Remove firewall rule | -| [**getFirewallRule**](FirewallApi.md#getFirewallRule) | **GET** /server/{serverId}/firewall_rule/{firewallRuleNumber} | Get firewall rule details | -| [**serverServerIdFirewallRuleGet**](FirewallApi.md#serverServerIdFirewallRuleGet) | **GET** /server/{serverId}/firewall_rule | List firewall rules | - -# **createFirewallRule** - -> \Upcloud\ApiClient\Model\FirewallRuleCreateResponse createFirewallRule($server_id, $firewall_rule) - -Create firewall rule - -Creates a new firewall rule - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\FirewallApi(); -$server_id = "server_id_example"; // string | Server id -$firewall_rule = new \Upcloud\ApiClient\Model\FirewallRuleRequest(); // \Upcloud\ApiClient\Model\FirewallRuleRequest | - -try { - $result = $api_instance->createFirewallRule($server_id, $firewall_rule); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling FirewallApi->createFirewallRule: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ----------------- | ----------------------------------------------------------------------------------- | ----------- | ----- | -| **server_id** | **string** | Server id | -| **firewall_rule** | [**\Upcloud\ApiClient\Model\FirewallRuleRequest**](../Model/FirewallRuleRequest.md) | | - -### Return type - -[**\Upcloud\ApiClient\Model\FirewallRuleCreateResponse**](../Model/FirewallRuleCreateResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **deleteFirewallRule** - -> deleteFirewallRule($server_id, $firewall_rule_number) - -Remove firewall rule - -Removes a firewall rule from a server. Firewall rules must be removed individually. The positions of remaining firewall rules will be adjusted after a rule is removed. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\FirewallApi(); -$server_id = "server_id_example"; // string | Server id -$firewall_rule_number = 3.4; // float | Denotes the index of the firewall rule in the server's firewall rule list - -try { - $api_instance->deleteFirewallRule($server_id, $firewall_rule_number); -} catch (Exception $e) { - echo 'Exception when calling FirewallApi->deleteFirewallRule: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------------------ | ---------- | ----------------------------------------------------------------------------- | ----- | -| **server_id** | **string** | Server id | -| **firewall_rule_number** | **float** | Denotes the index of the firewall rule in the server's firewall rule list | - -### Return type - -void (empty response body) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **getFirewallRule** - -> \Upcloud\ApiClient\Model\FirewallRuleCreateResponse getFirewallRule($server_id, $firewall_rule_number) - -Get firewall rule details - -Returns detailed information about a specific firewall rule - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\FirewallApi(); -$server_id = "server_id_example"; // string | Server id -$firewall_rule_number = 3.4; // float | Denotes the index of the firewall rule in the server's firewall rule list - -try { - $result = $api_instance->getFirewallRule($server_id, $firewall_rule_number); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling FirewallApi->getFirewallRule: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------------------ | ---------- | ----------------------------------------------------------------------------- | ----- | -| **server_id** | **string** | Server id | -| **firewall_rule_number** | **float** | Denotes the index of the firewall rule in the server's firewall rule list | - -### Return type - -[**\Upcloud\ApiClient\Model\FirewallRuleCreateResponse**](../Model/FirewallRuleCreateResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **serverServerIdFirewallRuleGet** - -> \Upcloud\ApiClient\Model\FirewallRuleListResponse serverServerIdFirewallRuleGet($server_id) - -List firewall rules - -Returns a list of firewall rules for a specific server. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\FirewallApi(); -$server_id = "server_id_example"; // string | Server id - -try { - $result = $api_instance->serverServerIdFirewallRuleGet($server_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling FirewallApi->serverServerIdFirewallRuleGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ---------- | ----------- | ----- | -| **server_id** | **string** | Server id | - -### Return type - -[**\Upcloud\ApiClient\Model\FirewallRuleListResponse**](../Model/FirewallRuleListResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) diff --git a/docs/Api/HostsApi.md b/docs/Api/HostsApi.md deleted file mode 100644 index a3073882..00000000 --- a/docs/Api/HostsApi.md +++ /dev/null @@ -1,161 +0,0 @@ -# Upcloud\ApiClient\HostsApi - -All URIs are relative to _https://api.upcloud.com/1.3_ - -| Method | HTTP request | Description | -| -------------------------------------------- | --------------------------- | ---------------------- | -| [**getListHosts**](HostsApi.md#getlisthosts) | **GET** /host | List of available hosts | -| [**getHostDetails**](HostsApi.md#gethostdetails) | **GET** /host/{id} | Get detailed information about a specific host | -| [**modifyHost**](HostsApi.md#modifyhost) | **PATCH** /host/{id} | Modify specific host | - -# **getListHosts** - -> \Upcloud\ApiClient\Model\HostListResponse getListHosts() - -List of available hosts - -Returns a list of available hosts, along with basic statistics of them when available. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\HostsApi(); - -try { - $result = $api_instance->getListHosts(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling HostsApi->getListHosts: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Upcloud\ApiClient\Model\HostListResponse**](../Model/HostListResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **getHostDetails** - -> \Upcloud\ApiClient\Model\HostResponse getHostDetails($id) - -Get Host details - -Returns detailed information about a specific host. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\HostsApi(); -$id = "id_example"; // string | Host id - -try { - $result = $api_instance->getHostDetails($id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling HostsApi->getHostDetails: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------ | ---------- | ----------- | ----- | -| **id** | **string** | Host Id | - -### Return type - -[**\Upcloud\ApiClient\Model\HostResponse**](../Model/HostResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **modifyHost** - -> \Upcloud\ApiClient\Model\HostResponse modifyHost($id, $host) - -Modify host - -Modifies description of a specific host. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\HostsApi(); -$id = "id_example"; // string | Host Id -$host = new \Upcloud\ApiClient\Model\ModifyHostRequest(); // \Upcloud\ApiClient\Model\ModifyHostRequest | - -try { - $result = $api_instance->modifyHost($id, $host); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling HostsApi->modifyHost: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | --------------------------------------------------------------------------- | ----------- | ---------- | -| **id** | **string** | Host Id | -| **host** | [**\Upcloud\ApiClient\Model\ModifyHostRequest**](../Model/ModifyHostRequest.md) | | | - -### Return type - -[**\Upcloud\ApiClient\Model\HostResponse**](../Model/HostResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) diff --git a/docs/Api/IPAddressApi.md b/docs/Api/IPAddressApi.md deleted file mode 100644 index 1a726098..00000000 --- a/docs/Api/IPAddressApi.md +++ /dev/null @@ -1,264 +0,0 @@ -# Upcloud\ApiClient\IPAddressApi - -All URIs are relative to _https://api.upcloud.com/1.3_ - -| Method | HTTP request | Description | -| -------------------------------------------- | --------------------------- | ---------------------- | -| [**addIp**](IPAddressApi.md#addIp) | **POST** /ip_address | Assign IP address | -| [**deleteIp**](IPAddressApi.md#deleteIp) | **DELETE** /ip_address/{ip} | Release IP address | -| [**getDetails**](IPAddressApi.md#getDetails) | **GET** /ip_address/{ip} | Get IP address details | -| [**listIps**](IPAddressApi.md#listIps) | **GET** /ip_address | List IP addresses | -| [**modifyIp**](IPAddressApi.md#modifyIp) | **PUT** /ip_address/{ip} | Modify IP address | - -# **addIp** - -> \Upcloud\ApiClient\Model\AssignIpResponse addIp($ip_address) - -Assign IP address - -Assigns a new IP address to a server. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\IPAddressApi(); -$ip_address = new \Upcloud\ApiClient\Model\AddIpRequest(); // \Upcloud\ApiClient\Model\AddIpRequest | - -try { - $result = $api_instance->addIp($ip_address); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling IPAddressApi->addIp: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | --------------------------------------------------------------------- | ----------- | ---------- | -| **ip_address** | [**\Upcloud\ApiClient\Model\AddIpRequest**](../Model/AddIpRequest.md) | | [optional] | - -### Return type - -[**\Upcloud\ApiClient\Model\AssignIpResponse**](../Model/AssignIpResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **deleteIp** - -> deleteIp($ip) - -Release IP address - -Removes an IP address from a server. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\IPAddressApi(); -$ip = "ip_example"; // string | Ip address - -try { - $api_instance->deleteIp($ip); -} catch (Exception $e) { - echo 'Exception when calling IPAddressApi->deleteIp: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------ | ---------- | ----------- | ----- | -| **ip** | **string** | Ip address | - -### Return type - -void (empty response body) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **getDetails** - -> \Upcloud\ApiClient\Model\AssignIpResponse getDetails($ip) - -Get IP address details - -Returns detailed information about a specific IP address. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\IPAddressApi(); -$ip = "ip_example"; // string | Ip address - -try { - $result = $api_instance->getDetails($ip); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling IPAddressApi->getDetails: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------ | ---------- | ----------- | ----- | -| **ip** | **string** | Ip address | - -### Return type - -[**\Upcloud\ApiClient\Model\AssignIpResponse**](../Model/AssignIpResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **listIps** - -> \Upcloud\ApiClient\Model\IpAddressListResponse listIps() - -List IP addresses - -Returns a list of all IP addresses assigned to servers on the current user account. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\IPAddressApi(); - -try { - $result = $api_instance->listIps(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling IPAddressApi->listIps: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Upcloud\ApiClient\Model\IpAddressListResponse**](../Model/IpAddressListResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **modifyIp** - -> \Upcloud\ApiClient\Model\AssignIpResponse modifyIp($ip, $ip_address) - -Modify IP address - -Modifies the reverse DNS PTR record corresponding to an IP address. The PTR record can only be set to public IP address. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\IPAddressApi(); -$ip = "ip_example"; // string | Ip address -$ip_address = new \Upcloud\ApiClient\Model\ModifyIpRequest(); // \Upcloud\ApiClient\Model\ModifyIpRequest | - -try { - $result = $api_instance->modifyIp($ip, $ip_address); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling IPAddressApi->modifyIp: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | --------------------------------------------------------------------------- | ----------- | ---------- | -| **ip** | **string** | Ip address | -| **ip_address** | [**\Upcloud\ApiClient\Model\ModifyIpRequest**](../Model/ModifyIpRequest.md) | | [optional] | - -### Return type - -[**\Upcloud\ApiClient\Model\AssignIpResponse**](../Model/AssignIpResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) diff --git a/docs/Api/NetworkApi.md b/docs/Api/NetworkApi.md deleted file mode 100644 index 75f0c21d..00000000 --- a/docs/Api/NetworkApi.md +++ /dev/null @@ -1,717 +0,0 @@ -# Upcloud\ApiClient\NetworkApi - -All URIs are relative to _https://api.upcloud.com/1.3_ - -| Method | HTTP request | Description | -| -------------------------------------------- | --------------------------- | ---------------------- | -| [**getListNetworks**](NetworkApi.md#getlistnetworks) | **GET** /network | List all Networks | -| [**getNetworkDetails**](NetworkApi.md#getnetworkdetails) | **GET** /network/{uuid} | Get Network details | -| [**createNetwork**](NetworkApi.md#createnetwork) | **POST** /network | Create a new SDN private network | -| [**modifyNetwork**](NetworkApi.md#modifynetwork) | **PUT** /network/{id} | Modify a specific SDN private network | -| [**deleteNetwork**](NetworkApi.md#deletenetwork) | **DELETE** /network/{id} | Delete a SDN private network | -| [**getListServerNetworks**](NetworkApi.md#getlistservernetworks) | **GET** server/{server_id}/networking | List all Networks | -| [**createNetworkInterface**](NetworkApi.md#createnetworkinterface) | **POST** server/{server}/networking/interface | Create a new network interface | -| [**modifyNetworkInterface**](NetworkApi.md#modifynetworkinterface) | **PUT** /network/{id} | Modify network interface | -| [**deleteNetworkInterface**](NetworkApi.md#deletenetworkinterface) | **DELETE** /network/{id} | Delete network interface | -| [**getListRouters**](NetworkApi.md#getlistrouters) | **GET** /router | List of all available routers | -| [**getRouterDetails**](NetworkApi.md#getrouterdetails) | **GET** /router/{uuid} | Get router details | -| [**createRouter**](NetworkApi.md#createrouter) | **POST** /router | Create a new router | -| [**modifyRouter**](NetworkApi.md#modifyrouter) | **PUT** /router/{id} | Modify an existing router | -| [**deleteRouter**](NetworkApi.md#deleterouter) | **DELETE** /router/{id} | Delete an existing router | -# **getListNetworks** - -> \Upcloud\ApiClient\Model\NetworksListResponse getListNetworks(string $zone = null) - -List Networks - - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\NetworkApi(); - -try { - $result = $api_instance->getListNetworks(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling NetworkApi->getListNetworks: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Upcloud\ApiClient\Model\NetworksListResponse**](../Model/NetworksListResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **getNetworkDetails** - -> \Upcloud\ApiClient\Model\NetworkResponse getNetworkDetails($uuid) - -Get Network details - -Returns detailed information about a specific network. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\NetworkApi(); -$uuid = "uuid_example"; // string | Network uuid - -try { - $result = $api_instance->getNetworkDetails($uuid); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling NetworkApi->getNetworkDetails: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------ | ---------- | ----------- | ----- | -| **uuid** | **string** | Network uuid | - -### Return type - -[**\Upcloud\ApiClient\Model\NetworkResponse**](../Model/NetworkResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **createNetwork** - -> \Upcloud\ApiClient\Model\NetworkResponse createNetwork($network) - -Create a new Network - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\NetworkApi(); -$network = new \Upcloud\ApiClient\Model\CreateNetworkRequest(); // \Upcloud\ApiClient\Model\CreateNetworkRequest | - -try { - $result = $api_instance->createNetwork($network); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling NetworkApi->createNetwork: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | --------------------------------------------------------------------------- | ----------- | ---------- | -| **network** | [**\Upcloud\ApiClient\Model\CreateNetworkRequest**](../Model/CreateNetworkRequest.md) | | | - -### Return type - -[**\Upcloud\ApiClient\Model\NetworkResponse**](../Model/NetworkResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **modifyNetwork** - -> \Upcloud\ApiClient\Model\NetworkResponse modifyNetwork($uuid, $network) - -Modify Network - -Modifies description of a specific Network. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\NetworkApi(); -$uuid = "uuid_example"; // string | Network uuid -$network = new \Upcloud\ApiClient\Model\ModifyNetworkRequest(); // \Upcloud\ApiClient\Model\ModifyNetworkRequest | - -try { - $result = $api_instance->modifyNetwork($uuid, $network); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling NetworkApi->modifyNetwork: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | --------------------------------------------------------------------------- | ----------- | ---------- | -| **uuid** | **string** | Network uuid | -| **network** | [**\Upcloud\ApiClient\Model\ModifyNetworkRequest**](../Model/ModifyNetworkRequest.md) | | | - -### Return type - -[**\Upcloud\ApiClient\Model\NetworkResponse**](../Model/NetworkResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **deleteNetwork** - -> deleteNetwork($uuid) - -Delete Network - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\NetworkApi(); -$uuid = "uuid_example"; // string | Network uuid - -try { - $api_instance->deleteNetwork($uuid); -} catch (Exception $e) { - echo 'Exception when calling NetworkApi->deleteNetwork: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------ | ---------- | ----------- | ----- | -| **uuid** | **string** | Network uuid | - -### Return type - -void (empty response body) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **getListServerNetworks** - -> \Upcloud\ApiClient\Model\ServerNetworksListResponse getListServerNetworks() - -List all networks the specific cloud server is connected to - - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\NetworkApi(); -$server_id = "server_id_example"; // string | Server id - -try { - $result = $api_instance->getListServerNetworks($server_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling NetworkApi->getListServerNetworks: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------ | ---------- | ----------- | ----- | -| **server_id** | **string** | Server uuid | - -### Return type - -[**\Upcloud\ApiClient\Model\ServerNetworksListResponse**](../Model/ServerNetworksListResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **createNetworkInterface** - -> \Upcloud\ApiClient\Model\NetworkInterfaceResponse createNetworkInterface($server_id, $network) - -Create a new network interface - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\NetworkApi(); -$network = new \Upcloud\ApiClient\Model\CreateNetworkInterfaceRequest(); // \Upcloud\ApiClient\Model\CreateNetworkInterfaceRequest | -$server_id = "server_id_example"; // string | Server id -try { - $result = $api_instance->createNetworkInterface($server_id, $network); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling NetworkApi->createNetworkInterface: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | --------------------------------------------------------------------------- | ----------- | ---------- | -| **server_id** | **string** | Server uuid | -| **network** | [**\Upcloud\ApiClient\Model\CreateNetworkInterfaceRequest**](../Model/CreateNetworkInterfaceRequest.md) | | | - -### Return type - -[**\Upcloud\ApiClient\Model\NetworkInterfaceResponse**](../Model/NetworkInterfaceResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **modifyNetworkInterface** - -> \Upcloud\ApiClient\Model\NetworkInterfaceResponse modifyNetworkInterface($server_id, $index, $network) - -Modify network interface - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\NetworkApi(); -$server_id = "server_id_example"; // string | Server id -$index = "index_example"; // integer | Index of the interface to modify -$network = new \Upcloud\ApiClient\Model\ModifyNetworkInterfaceRequest(); // \Upcloud\ApiClient\Model\ModifyNetworkInterfaceRequest | - -try { - $result = $api_instance->modifyNetworkInterface($server_id, $index, $network); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling NetworkApi->modifyNetworkInterface: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | --------------------------------------------------------------------------- | ----------- | ---------- | -| **server_id** | **string** | Server uuid | -| **index** | **integer** | Index of the interface to modify | -| **network** | [**\Upcloud\ApiClient\Model\ModifyNetworkInterfaceRequest**](../Model/ModifyNetworkInterfaceRequest.md) | | | - -### Return type - -[**\Upcloud\ApiClient\Model\NetworkInterfaceResponse**](../Model/NetworkInterfaceResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **deleteNetworkInterface** - -> deleteNetworkInterface($server_id, $index) - -Delete Network Interface - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\NetworkApi(); -$server_id = "server_id_example"; // string | Server id -$index = "index_example"; // integer | Index of the interface to delete - -try { - $api_instance->deleteNetworkInterface($server_id, $index); -} catch (Exception $e) { - echo 'Exception when calling NetworkApi->deleteNetworkInterface: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------ | ---------- | ----------- | ----- | -| **server_id** | **string** | Server uuid | -| **index** | **integer** | Index of the interface to delete | - -### Return type - -void (empty response body) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **getListRouters** - -> \Upcloud\ApiClient\Model\RoutersListResponse getListRouters() - -List of all available routers - -Returns a list of all available routers associated with the current account. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\NetworkApi(); - -try { - $result = $api_instance->getListRouters(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling NetworkApi->getListRouters: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Upcloud\ApiClient\Model\RoutersListResponse**](../Model/RoutersListResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **getRouterDetails** - -> \Upcloud\ApiClient\Model\RouterResponse getRouterDetails($uuid) - -Get router details - -Returns detailed information about a specific router. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\NetworkApi(); -$uuid = "uuid_example"; // string | Router uuid - -try { - $result = $api_instance->getRouterDetails($uuid); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling NetworkApi->getRouterDetails: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------ | ---------- | ----------- | ----- | -| **uuid** | **string** | Router uuid | - -### Return type - -[**\Upcloud\ApiClient\Model\RouterResponse**](../Model/RouterResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **createRouter** - -> \Upcloud\ApiClient\Model\RouterResponse createRouter($router) - -Creates a new router. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\NetworkApi(); -$router = new \Upcloud\ApiClient\Model\RouterRequest(); // \Upcloud\ApiClient\Model\RouterRequest | - -try { - $result = $api_instance->createRouter($router); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling NetworkApi->createRouter: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | --------------------------------------------------------------------------- | ----------- | ---------- | -| **router** | [**\Upcloud\ApiClient\Model\RouterRequest**](../Model/RouterRequest.md) | | | - -### Return type - -[**\Upcloud\ApiClient\Model\RouterResponse**](../Model/RouterResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **modifyRouter** - -> \Upcloud\ApiClient\Model\RouterResponse modifyRouter($uuid, $router) - -Modify an existing router. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\NetworkApi(); -$uuid = "router_id_example"; // string | Router uuid -$router = new \Upcloud\ApiClient\Model\RouterRequest(); // \Upcloud\ApiClient\Model\RouterRequest | - -try { - $result = $api_instance->modifyRouter($uuid, $router); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling NetworkApi->modifyRouter: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | --------------------------------------------------------------------------- | ----------- | ---------- | -| **uuid** | **string** | Router uuid | -| **router** | [**\Upcloud\ApiClient\Model\RouterRequest**](../Model/RouterRequest.md) | | | - -### Return type - -[**\Upcloud\ApiClient\Model\RouterResponse**](../Model/RouterResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **deleteRouter** - -> deleteRouter($uuid) - -Delete an existing router. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\NetworkApi(); -$uuid = "router_id_example"; // string | Router uuid - -try { - $api_instance->deleteRouter($uuid); -} catch (Exception $e) { - echo 'Exception when calling NetworkApi->deleteRouter: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------ | ---------- | ----------- | ----- | -| **uuid** | **string** | Router uuid | - -### Return type - -void (empty response body) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) diff --git a/docs/Api/ObjectStorageApi.md b/docs/Api/ObjectStorageApi.md deleted file mode 100644 index 3809ad05..00000000 --- a/docs/Api/ObjectStorageApi.md +++ /dev/null @@ -1,261 +0,0 @@ -# Upcloud\ApiClient\ObjectStorageApi - -All URIs are relative to _https://api.upcloud.com/1.3_ - -| Method | HTTP request | Description | -| -------------------------------------------- | --------------------------- | ---------------------- | -| [**getListObjectStorage**](ObjectStorageApi.md#getlistobjectstorage) | **GET** /object-storage | List all Object Storage | -| [**getObjectStorageDetails**](ObjectStorageApi.md#getobjectstoragedetails) | **GET** /object-storage/{uuid} | Get Object Storage details | -| [**createObjectStorage**](ObjectStorageApi.md#createobjectstorage) | **POST** /object-storage | Create a new Object Storage | -| [**modifyObjectStorage**](ObjectStorageApi.md#modifyobjectstorage) | **PATCH** /object-storage/{id} | Modify Object Storage | -| [**deleteObjectStorage**](ObjectStorageApi.md#deleteobjectstorage) | **DELETE** /object-storage/{id} | Release Object Storage | - -# **getListObjectStorage** - -> \Upcloud\ApiClient\Model\ObjectStorageListResponse getListObjectStorage() - -List Object Storage - - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ObjectStorageApi(); - -try { - $result = $api_instance->getListObjectStorage(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ObjectStorageApi->getListObjectStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Upcloud\ApiClient\Model\ObjectStorageListResponse**](../Model/ObjectStorageListResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **getObjectStorageDetails** - -> \Upcloud\ApiClient\Model\ObjectStorageResponse getObjectStorageDetails($uuid) - -Get Object Storage details - -Returns detailed information about a specific object storage. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ObjectStorageApi(); -$uuid = "uuid_example"; // string | ObjectStorage uuid - -try { - $result = $api_instance->getObjectStorageDetails($uuid); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ObjectStorageApi->getObjectStorageDetails: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------ | ---------- | ----------- | ----- | -| **uuid** | **string** | ObjectStorage uuid | - -### Return type - -[**\Upcloud\ApiClient\Model\ObjectStorageResponse**](../Model/ObjectStorageResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **createObjectStorage** - -> \Upcloud\ApiClient\Model\ObjectStorageResponse createObjectStorage($storage) - -Create a new Object Storage - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ObjectStorageApi(); -$storage = new \Upcloud\ApiClient\Model\CreateObjectStorageRequest(); // \Upcloud\ApiClient\Model\CreateObjectStorageRequest | - -try { - $result = $api_instance->createObjectStorage($storage); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ObjectStorageApi->createObjectStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | --------------------------------------------------------------------------- | ----------- | ---------- | -| **storage** | [**\Upcloud\ApiClient\Model\CreateObjectStorageRequest**](../Model/CreateObjectStorageRequest.md) | | | - -### Return type - -[**\Upcloud\ApiClient\Model\ObjectStorageResponse**](../Model/ObjectStorageResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **modifyObjectStorage** - -> \Upcloud\ApiClient\Model\ObjectStorageResponse modifyObjectStorage($uuid, $storage) - -Modify Object Storage - -Modifies description of a specific Object Storage. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ObjectStorageApi(); -$uuid = "uuid_example"; // string | ObjectStorage uuid -$storage = new \Upcloud\ApiClient\Model\ModifyObjectStorageRequest(); // \Upcloud\ApiClient\Model\ModifyObjectStorageRequest | - -try { - $result = $api_instance->modifyObjectStorage($uuid, $storage); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ObjectStorageApi->modifyObjectStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | --------------------------------------------------------------------------- | ----------- | ---------- | -| **uuid** | **string** | ObjectStorage uuid | -| **storage** | [**\Upcloud\ApiClient\Model\ModifyObjectStorageRequest**](../Model/ModifyObjectStorageRequest.md) | | | - -### Return type - -[**\Upcloud\ApiClient\Model\ObjectStorageResponse**](../Model/ObjectStorageResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseauth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **deleteObjectStorage** - -> deleteObjectStorage($uuid) - -Delete Object Storage - -Note that deleting the storage will permanently delete any data on the device and which cannot be reverted. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ObjectStorageApi(); -$uuid = "uuid_example"; // string | ObjectStorage uuid - -try { - $api_instance->deleteObjectStorage($uuid); -} catch (Exception $e) { - echo 'Exception when calling ObjectStorageApi->deleteObjectStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------ | ---------- | ----------- | ----- | -| **uuid** | **string** | ObjectStorage uuid | - -### Return type - -void (empty response body) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) diff --git a/docs/Api/PlanApi.md b/docs/Api/PlanApi.md deleted file mode 100644 index c16486d0..00000000 --- a/docs/Api/PlanApi.md +++ /dev/null @@ -1,55 +0,0 @@ -# Upcloud\ApiClient\PlanApi - -All URIs are relative to _https://api.upcloud.com/1.3_ - -| Method | HTTP request | Description | -| ------------------------------------- | ------------- | -------------------- | -| [**listPlans**](PlanApi.md#listPlans) | **GET** /plan | List available plans | - -# **listPlans** - -> \Upcloud\ApiClient\Model\AvailablePlanListResponse listPlans() - -List available plans - -Returns a list of available plans. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\PlanApi(); - -try { - $result = $api_instance->listPlans(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling PlanApi->listPlans: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Upcloud\ApiClient\Model\AvailablePlanListResponse**](../Model/AvailablePlanListResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) diff --git a/docs/Api/PricesApi.md b/docs/Api/PricesApi.md deleted file mode 100644 index b567ad99..00000000 --- a/docs/Api/PricesApi.md +++ /dev/null @@ -1,55 +0,0 @@ -# Upcloud\ApiClient\PricesApi - -All URIs are relative to _https://api.upcloud.com/1.3_ - -| Method | HTTP request | Description | -| ----------------------------------------- | -------------- | ----------- | -| [**listPrices**](PricesApi.md#listPrices) | **GET** /price | List prices | - -# **listPrices** - -> \Upcloud\ApiClient\Model\PriceListResponse listPrices() - -List prices - -Returns a list resource prices. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\PricesApi(); - -try { - $result = $api_instance->listPrices(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling PricesApi->listPrices: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Upcloud\ApiClient\Model\PriceListResponse**](../Model/PriceListResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) diff --git a/docs/Api/ServerApi.md b/docs/Api/ServerApi.md deleted file mode 100644 index 1c0e703d..00000000 --- a/docs/Api/ServerApi.md +++ /dev/null @@ -1,1004 +0,0 @@ -# Upcloud\ApiClient\ServerApi - -All URIs are relative to _https://api.upcloud.com/1.3_ - -| Method | HTTP request | Description | -| ------------------------------------------------------------------------------- | ---------------------------------------------------------------- | -------------------------- | -| [**assignTag**](ServerApi.md#assignTag) | **POST** /server/{serverId}/tag/{tagList} | Assign tag to a server | -| [**attachStorage**](ServerApi.md#attachStorage) | **POST** /server/{serverId}/storage/attach | Attach storage | -| [**createFirewallRule**](ServerApi.md#createFirewallRule) | **POST** /server/{serverId}/firewall_rule | Create firewall rule | -| [**createServer**](ServerApi.md#createServer) | **POST** /server | Create server | -| [**deleteFirewallRule**](ServerApi.md#deleteFirewallRule) | **DELETE** /server/{serverId}/firewall_rule/{firewallRuleNumber} | Remove firewall rule | -| [**deleteServer**](ServerApi.md#deleteServer) | **DELETE** /server/{serverId} | Delete server | -| [**detachStorage**](ServerApi.md#detachStorage) | **POST** /server/{serverId}/storage/detach | Detach storage | -| [**ejectCdrom**](ServerApi.md#ejectCdrom) | **POST** /server/{serverId}/cdrom/eject | Eject CD-ROM | -| [**getFirewallRule**](ServerApi.md#getFirewallRule) | **GET** /server/{serverId}/firewall_rule/{firewallRuleNumber} | Get firewall rule details | -| [**listServerConfigurations**](ServerApi.md#listServerConfigurations) | **GET** /server_size | List server configurations | -| [**listServers**](ServerApi.md#listServers) | **GET** /server | List of servers | -| [**loadCdrom**](ServerApi.md#loadCdrom) | **POST** /server/{serverId}/storage/cdrom/load | Load CD-ROM | -| [**modifyServer**](ServerApi.md#modifyServer) | **PUT** /server/{serverId} | Modify server | -| [**restartServer**](ServerApi.md#restartServer) | **POST** /server/{serverId}/restart | Restart server | -| [**serverDetails**](ServerApi.md#serverDetails) | **GET** /server/{serverId} | Get server details | -| [**serverServerIdFirewallRuleGet**](ServerApi.md#serverServerIdFirewallRuleGet) | **GET** /server/{serverId}/firewall_rule | List firewall rules | -| [**startServer**](ServerApi.md#startServer) | **POST** /server/{serverId}/start | Start server | -| [**stopServer**](ServerApi.md#stopServer) | **POST** /server/{serverId}/stop | Stop server | -| [**untag**](ServerApi.md#untag) | **POST** /server/{serverId}/untag/{tagName} | Remove tag from server | - -# **assignTag** - -> \Upcloud\ApiClient\Model\CreateServerResponse assignTag($server_id, $tag_list) - -Assign tag to a server - -Servers can be tagged with one or more tags. The tags used must exist - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server_id = "server_id_example"; // string | Server id -$tag_list = "tag_list_example"; // string | List of tags - -try { - $result = $api_instance->assignTag($server_id, $tag_list); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->assignTag: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ---------- | ------------ | ----- | -| **server_id** | **string** | Server id | -| **tag_list** | **string** | List of tags | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateServerResponse**](../Model/CreateServerResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **attachStorage** - -> \Upcloud\ApiClient\Model\CreateServerResponse attachStorage($server_id, $storage_device) - -Attach storage - -Attaches a storage as a device to a server. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server_id = "server_id_example"; // string | Server id -$storage_device = new \Upcloud\ApiClient\Model\AttachStorageDeviceRequest(); // \Upcloud\ApiClient\Model\AttachStorageDeviceRequest | - -try { - $result = $api_instance->attachStorage($server_id, $storage_device); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->attachStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------------ | ------------------------------------------------------------------------------------------------- | ----------- | ----- | -| **server_id** | **string** | Server id | -| **storage_device** | [**\Upcloud\ApiClient\Model\AttachStorageDeviceRequest**](../Model/AttachStorageDeviceRequest.md) | | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateServerResponse**](../Model/CreateServerResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **createFirewallRule** - -> \Upcloud\ApiClient\Model\FirewallRuleCreateResponse createFirewallRule($server_id, $firewall_rule) - -Create firewall rule - -Creates a new firewall rule - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server_id = "server_id_example"; // string | Server id -$firewall_rule = new \Upcloud\ApiClient\Model\FirewallRuleRequest(); // \Upcloud\ApiClient\Model\FirewallRuleRequest | - -try { - $result = $api_instance->createFirewallRule($server_id, $firewall_rule); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->createFirewallRule: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ----------------- | ----------------------------------------------------------------------------------- | ----------- | ----- | -| **server_id** | **string** | Server id | -| **firewall_rule** | [**\Upcloud\ApiClient\Model\FirewallRuleRequest**](../Model/FirewallRuleRequest.md) | | - -### Return type - -[**\Upcloud\ApiClient\Model\FirewallRuleCreateResponse**](../Model/FirewallRuleCreateResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **createServer** - -> \Upcloud\ApiClient\Model\CreateServerResponse createServer($server) - -Create server - -Creates a new server instance. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server = new \Upcloud\ApiClient\Model\CreateServerRequest(); // \Upcloud\ApiClient\Model\CreateServerRequest | - -try { - $result = $api_instance->createServer($server); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->createServer: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---------- | ----------------------------------------------------------------------------------- | ----------- | ---------- | -| **server** | [**\Upcloud\ApiClient\Model\CreateServerRequest**](../Model/CreateServerRequest.md) | | [optional] | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateServerResponse**](../Model/CreateServerResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **deleteFirewallRule** - -> deleteFirewallRule($server_id, $firewall_rule_number) - -Remove firewall rule - -Removes a firewall rule from a server. Firewall rules must be removed individually. The positions of remaining firewall rules will be adjusted after a rule is removed. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server_id = "server_id_example"; // string | Server id -$firewall_rule_number = 3.4; // float | Denotes the index of the firewall rule in the server's firewall rule list - -try { - $api_instance->deleteFirewallRule($server_id, $firewall_rule_number); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->deleteFirewallRule: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------------------ | ---------- | ----------------------------------------------------------------------------- | ----- | -| **server_id** | **string** | Server id | -| **firewall_rule_number** | **float** | Denotes the index of the firewall rule in the server's firewall rule list | - -### Return type - -void (empty response body) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **deleteServer** - -> deleteServer($server_id, $deleteAttachedStorageDevices) - -Delete server - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server_id = "server_id_example"; // string | Id of server to delete - -try { - $api_instance->deleteServer($server_id, $deleteAttachedStorageDevices); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->deleteServer: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ---------- | ---------------------- | ----- | -| **server_id** | **string** | Id of server to delete | ----- | -| **deleteAttachedStorageDevices** | **boolean** | Delete attached storage devices at the same time with the server | Defaults to false | - -### Return type - -void (empty response body) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **detachStorage** - -> \Upcloud\ApiClient\Model\CreateServerResponse detachStorage($server_id, $storage_device) - -Detach storage - -Detaches a storage resource from a server. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server_id = "server_id_example"; // string | Server id -$storage_device = new \Upcloud\ApiClient\Model\StorageDeviceDetachRequest(); // \Upcloud\ApiClient\Model\StorageDeviceDetachRequest | - -try { - $result = $api_instance->detachStorage($server_id, $storage_device); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->detachStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------------ | ------------------------------------------------------------------------------------------------- | ----------- | ----- | -| **server_id** | **string** | Server id | -| **storage_device** | [**\Upcloud\ApiClient\Model\StorageDeviceDetachRequest**](../Model/StorageDeviceDetachRequest.md) | | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateServerResponse**](../Model/CreateServerResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **ejectCdrom** - -> ejectCdrom($server_id) - -Eject CD-ROM - -Ejects the storage from the CD-ROM device of a server. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server_id = "server_id_example"; // string | Server id - -try { - $api_instance->ejectCdrom($server_id); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->ejectCdrom: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ---------- | ----------- | ----- | -| **server_id** | **string** | Server id | - -### Return type - -void (empty response body) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **getFirewallRule** - -> \Upcloud\ApiClient\Model\FirewallRuleCreateResponse getFirewallRule($server_id, $firewall_rule_number) - -Get firewall rule details - -Returns detailed information about a specific firewall rule - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server_id = "server_id_example"; // string | Server id -$firewall_rule_number = 3.4; // float | Denotes the index of the firewall rule in the server's firewall rule list - -try { - $result = $api_instance->getFirewallRule($server_id, $firewall_rule_number); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->getFirewallRule: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------------------ | ---------- | ----------------------------------------------------------------------------- | ----- | -| **server_id** | **string** | Server id | -| **firewall_rule_number** | **float** | Denotes the index of the firewall rule in the server's firewall rule list | - -### Return type - -[**\Upcloud\ApiClient\Model\FirewallRuleCreateResponse**](../Model/FirewallRuleCreateResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **listServerConfigurations** - -> \Upcloud\ApiClient\Model\ConfigurationListResponse listServerConfigurations() - -List server configurations - -Returns a list of available server configurations. A server configuration consists of a combination of CPU core count and main memory amount. All servers are created using these configurations. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); - -try { - $result = $api_instance->listServerConfigurations(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->listServerConfigurations: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Upcloud\ApiClient\Model\ConfigurationListResponse**](../Model/ConfigurationListResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **listServers** - -> \Upcloud\ApiClient\Model\ServerListResponse listServers() - -List of servers - -Returns a list of all servers associated with the current account. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); - -try { - $result = $api_instance->listServers(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->listServers: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Upcloud\ApiClient\Model\ServerListResponse**](../Model/ServerListResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **loadCdrom** - -> \Upcloud\ApiClient\Model\CreateServerResponse loadCdrom($server_id, $storage_device) - -Load CD-ROM - -Loads a storage as a CD-ROM in the CD-ROM device of a server. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server_id = "server_id_example"; // string | Server id -$storage_device = new \Upcloud\ApiClient\Model\StorageDeviceLoadRequest(); // \Upcloud\ApiClient\Model\StorageDeviceLoadRequest | - -try { - $result = $api_instance->loadCdrom($server_id, $storage_device); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->loadCdrom: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------------ | --------------------------------------------------------------------------------------------- | ----------- | ---------- | -| **server_id** | **string** | Server id | -| **storage_device** | [**\Upcloud\ApiClient\Model\StorageDeviceLoadRequest**](../Model/StorageDeviceLoadRequest.md) | | [optional] | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateServerResponse**](../Model/CreateServerResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **modifyServer** - -> \Upcloud\ApiClient\Model\CreateServerResponse modifyServer($server_id, $server) - -Modify server - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server_id = "server_id_example"; // string | Id of server to modify -$server = new \Upcloud\ApiClient\Model\ModifyServerRequest(); // \Upcloud\ApiClient\Model\ModifyServerRequest | - -try { - $result = $api_instance->modifyServer($server_id, $server); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->modifyServer: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | --------------------------------------------------------- | ---------------------- | ---------- | -| **server_id** | **string** | Id of server to modify | -| **server** | [**\Upcloud\ApiClient\Model\ModifyServerRequest**](../Model/ModifyServerRequest.md) | | [optional] | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateServerResponse**](../Model/CreateServerResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **restartServer** - -> \Upcloud\ApiClient\Model\CreateServerResponse restartServer($server_id, $restart_server) - -Restart server - -Stops and starts a server. The server state must be `started`. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server_id = "server_id_example"; // string | Id of server to restart -$restart_server = new \Upcloud\ApiClient\Model\RestartServer(); // \Upcloud\ApiClient\Model\RestartServer | - -try { - $result = $api_instance->restartServer($server_id, $restart_server); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->restartServer: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------------ | ----------------------------------------------------------------------- | ----------------------- | ----- | -| **server_id** | **string** | Id of server to restart | -| **restart_server** | [**\Upcloud\ApiClient\Model\RestartServer**](../Model/RestartServer.md) | | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateServerResponse**](../Model/CreateServerResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **serverDetails** - -> \Upcloud\ApiClient\Model\CreateServerResponse serverDetails($server_id) - -Get server details - -Returns detailed information about a specific server. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server_id = "server_id_example"; // string | Id of server to return - -try { - $result = $api_instance->serverDetails($server_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->serverDetails: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ---------- | ---------------------- | ----- | -| **server_id** | **string** | Id of server to return | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateServerResponse**](../Model/CreateServerResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **serverServerIdFirewallRuleGet** - -> \Upcloud\ApiClient\Model\FirewallRuleListResponse serverServerIdFirewallRuleGet($server_id) - -List firewall rules - -Returns a list of firewall rules for a specific server. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server_id = "server_id_example"; // string | Server id - -try { - $result = $api_instance->serverServerIdFirewallRuleGet($server_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->serverServerIdFirewallRuleGet: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ---------- | ----------- | ----- | -| **server_id** | **string** | Server id | - -### Return type - -[**\Upcloud\ApiClient\Model\FirewallRuleListResponse**](../Model/FirewallRuleListResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **startServer** - -> \Upcloud\ApiClient\Model\CreateServerResponse startServer($server_id) - -Start server - -Starts a stopped server. The server state must be `stopped`. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server_id = "server_id_example"; // string | Id of server to start - -try { - $result = $api_instance->startServer($server_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->startServer: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ---------- | --------------------- | ----- | -| **server_id** | **string** | Id of server to start | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateServerResponse**](../Model/CreateServerResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **stopServer** - -> \Upcloud\ApiClient\Model\CreateServerResponse stopServer($server_id, $stop_server_request) - -Stop server - -Stops a started server. The server state must be `started`. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server_id = "server_id_example"; // string | Id of server to stop -$stop_server_request = new \Upcloud\ApiClient\Model\StopServer(); // \Upcloud\ApiClient\Model\StopServer | - -try { - $result = $api_instance->stopServer($server_id, $stop_server_request); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->stopServer: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ----------------------- | ----------------------------------------------------------------- | -------------------- | ----- | -| **server_id** | **string** | Id of server to stop | -| **stop_server_request** | [**\Upcloud\ApiClient\Model\StopServer**](../Model/StopServer.md) | | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateServerResponse**](../Model/CreateServerResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **untag** - -> \Upcloud\ApiClient\Model\CreateServerResponse untag($server_id, $tag_name) - -Remove tag from server - -Untags tags from given server. The tag(s) must exist - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ServerApi(); -$server_id = "server_id_example"; // string | Server id -$tag_name = "tag_name_example"; // string | Tag name - -try { - $result = $api_instance->untag($server_id, $tag_name); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ServerApi->untag: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ---------- | ----------- | ----- | -| **server_id** | **string** | Server id | -| **tag_name** | **string** | Tag name | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateServerResponse**](../Model/CreateServerResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) diff --git a/docs/Api/StorageApi.md b/docs/Api/StorageApi.md deleted file mode 100644 index 507e7d56..00000000 --- a/docs/Api/StorageApi.md +++ /dev/null @@ -1,845 +0,0 @@ -# Upcloud\ApiClient\StorageApi - -All URIs are relative to _https://api.upcloud.com/1.3_ - -| Method | HTTP request | Description | -| -------------------------------------------------------- | ---------------------------------------------- | ----------------------------- | -| [**attachStorage**](StorageApi.md#attachStorage) | **POST** /server/{serverId}/storage/attach | Attach storage | -| [**backupStorage**](StorageApi.md#backupStorage) | **POST** /storage/{storageId}/backup | Create backup | -| [**cancelOperation**](StorageApi.md#cancelOperation) | **POST** /storage/{storageId}/cancel | Cancel storage operation | -| [**cloneStorage**](StorageApi.md#cloneStorage) | **POST** /storage/{storageId}/clone | Clone storage | -| [**createStorage**](StorageApi.md#createStorage) | **POST** /storage | Create storage | -| [**deleteStorage**](StorageApi.md#deleteStorage) | **DELETE** /storage/{storageId} | Delete storage | -| [**detachStorage**](StorageApi.md#detachStorage) | **POST** /server/{serverId}/storage/detach | Detach storage | -| [**ejectCdrom**](StorageApi.md#ejectCdrom) | **POST** /server/{serverId}/cdrom/eject | Eject CD-ROM | -| [**favoriteStorage**](StorageApi.md#favoriteStorage) | **POST** /storage/{storageId}/favorite | Add storage to favorites | -| [**getStorageDetails**](StorageApi.md#getStorageDetails) | **GET** /storage/{storageId} | Get storage details | -| [**listStorages**](StorageApi.md#listStorages) | **GET** /storage/{type}/ | List of storages by type | -| [**listStorages**](StorageApi.md#listStorages) | **GET** /storage | List of storages | -| [**loadCdrom**](StorageApi.md#loadCdrom) | **POST** /server/{serverId}/storage/cdrom/load | Load CD-ROM | -| [**modifyStorage**](StorageApi.md#modifyStorage) | **PUT** /storage/{storageId} | Modify storage | -| [**restoreStorage**](StorageApi.md#restoreStorage) | **POST** /storage/{storageId}/restore | Restore backup | -| [**templatizeStorage**](StorageApi.md#templatizeStorage) | **POST** /storage/{storageId}/templatize | Templatize storage | -| [**unfavoriteStorage**](StorageApi.md#unfavoriteStorage) | **DELETE** /storage/{storageId}/favorite | Remove storage from favorites | - -# **attachStorage** - -> \Upcloud\ApiClient\Model\CreateServerResponse attachStorage($server_id, $storage_device) - -Attach storage - -Attaches a storage as a device to a server. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\StorageApi(); -$server_id = "server_id_example"; // string | Server id -$storage_device = new \Upcloud\ApiClient\Model\AttachStorageDeviceRequest(); // \Upcloud\ApiClient\Model\AttachStorageDeviceRequest | - -try { - $result = $api_instance->attachStorage($server_id, $storage_device); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling StorageApi->attachStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------------ | ------------------------------------------------------------------------------------------------- | ----------- | ----- | -| **server_id** | **string** | Server id | -| **storage_device** | [**\Upcloud\ApiClient\Model\AttachStorageDeviceRequest**](../Model/AttachStorageDeviceRequest.md) | | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateServerResponse**](../Model/CreateServerResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **backupStorage** - -> \Upcloud\ApiClient\Model\CreateStorageResponse backupStorage($storage_id, $storage) - -Create backup - -Creates a point-in-time backup of a storage resource. For automatic, scheduled backups, see `backup_rule` in Create storage or Modify storage. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\StorageApi(); -$storage_id = "storage_id_example"; // string | Storage id -$storage = new \Upcloud\ApiClient\Model\CreateBackupStorageRequest(); // \Upcloud\ApiClient\Model\CreateBackupStorageRequest | - -try { - $result = $api_instance->backupStorage($storage_id, $storage); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling StorageApi->backupStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | ------------------------------------------------------------------------------------------------- | ----------- | ----- | -| **storage_id** | **string** | Storage id | -| **storage** | [**\Upcloud\ApiClient\Model\CreateBackupStorageRequest**](../Model/CreateBackupStorageRequest.md) | | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateStorageResponse**](../Model/CreateStorageResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **cancelOperation** - -> cancelOperation($storage_id) - -Cancel storage operation - -Cancels a running cloning operation and deletes the incomplete copy. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\StorageApi(); -$storage_id = "storage_id_example"; // string | Strage id - -try { - $api_instance->cancelOperation($storage_id); -} catch (Exception $e) { - echo 'Exception when calling StorageApi->cancelOperation: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | ---------- | ----------- | ----- | -| **storage_id** | **string** | Strage id | - -### Return type - -void (empty response body) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **cloneStorage** - -> \Upcloud\ApiClient\Model\CreateStorageResponse cloneStorage($storage_id, $storage) - -Clone storage - -Creates an exact copy of an existing storage resource. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\StorageApi(); -$storage_id = "storage_id_example"; // string | Storage id -$storage = new \Upcloud\ApiClient\Model\CloneStorageRequest(); // \Upcloud\ApiClient\Model\CloneStorageRequest | - -try { - $result = $api_instance->cloneStorage($storage_id, $storage); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling StorageApi->cloneStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | ----------------------------------------------------------------------------------- | ----------- | ----- | -| **storage_id** | **string** | Storage id | -| **storage** | [**\Upcloud\ApiClient\Model\CloneStorageRequest**](../Model/CloneStorageRequest.md) | | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateStorageResponse**](../Model/CreateStorageResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **createStorage** - -> \Upcloud\ApiClient\Model\CreateStorageResponse createStorage($storage) - -Create storage - -Creates a new storage resource. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\StorageApi(); -$storage = new \Upcloud\ApiClient\Model\CreateStorageRequest(); // \Upcloud\ApiClient\Model\CreateStorageRequest | - -try { - $result = $api_instance->createStorage($storage); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling StorageApi->createStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ----------- | ------------------------------------------------------------------------------------- | ----------- | ----- | -| **storage** | [**\Upcloud\ApiClient\Model\CreateStorageRequest**](../Model/CreateStorageRequest.md) | | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateStorageResponse**](../Model/CreateStorageResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **deleteStorage** - -> deleteStorage($storage_id) - -Delete storage - -Deleted an existing storage resource. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\StorageApi(); -$storage_id = "storage_id_example"; // string | - -try { - $api_instance->deleteStorage($storage_id); -} catch (Exception $e) { - echo 'Exception when calling StorageApi->deleteStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | ---------- | ----------- | ----- | -| **storage_id** | **string** | | - -### Return type - -void (empty response body) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **detachStorage** - -> \Upcloud\ApiClient\Model\CreateServerResponse detachStorage($server_id, $storage_device) - -Detach storage - -Detaches a storage resource from a server. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\StorageApi(); -$server_id = "server_id_example"; // string | Server id -$storage_device = new \Upcloud\ApiClient\Model\StorageDeviceDetachRequest(); // \Upcloud\ApiClient\Model\StorageDeviceDetachRequest | - -try { - $result = $api_instance->detachStorage($server_id, $storage_device); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling StorageApi->detachStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------------ | ------------------------------------------------------------------------------------------------- | ----------- | ----- | -| **server_id** | **string** | Server id | -| **storage_device** | [**\Upcloud\ApiClient\Model\StorageDeviceDetachRequest**](../Model/StorageDeviceDetachRequest.md) | | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateServerResponse**](../Model/CreateServerResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **ejectCdrom** - -> ejectCdrom($server_id) - -Eject CD-ROM - -Ejects the storage from the CD-ROM device of a server. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\StorageApi(); -$server_id = "server_id_example"; // string | Server id - -try { - $api_instance->ejectCdrom($server_id); -} catch (Exception $e) { - echo 'Exception when calling StorageApi->ejectCdrom: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ---------- | ----------- | ----- | -| **server_id** | **string** | Server id | - -### Return type - -void (empty response body) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **favoriteStorage** - -> favoriteStorage($storage_id) - -Add storage to favorites - -Adds a storage to the list of favorite storages. To list favorite storages, see List storages. This operations succeeds even if the storage is already on the list of favorites. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\StorageApi(); -$storage_id = "storage_id_example"; // string | Storage id - -try { - $api_instance->favoriteStorage($storage_id); -} catch (Exception $e) { - echo 'Exception when calling StorageApi->favoriteStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | ---------- | ----------- | ----- | -| **storage_id** | **string** | Storage id | - -### Return type - -void (empty response body) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **getStorageDetails** - -> \Upcloud\ApiClient\Model\CreateStorageResponse getStorageDetails($storage_id) - -Get storage details - -Returns detailed information about a specific storage resource. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\StorageApi(); -$storage_id = "storage_id_example"; // string | - -try { - $result = $api_instance->getStorageDetails($storage_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling StorageApi->getStorageDetails: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | ---------- | ----------- | ----- | -| **storage_id** | **string** | | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateStorageResponse**](../Model/CreateStorageResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **listStorages** - -> \Upcloud\ApiClient\Model\SuccessStoragesResponse listStorages($type = null) - -List of storages - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\StorageApi(); - -try { - $result = $api_instance->listStorages(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling StorageApi->listStorages: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | -| **type** | **string** | Storage's access type (`public` or `private`) or storage type (`normal`, `backup`, `cdrom` or `template`) or `favorite` status | - - -### Return type - -[**\Upcloud\ApiClient\Model\SuccessStoragesResponse**](../Model/SuccessStoragesResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **loadCdrom** - -> \Upcloud\ApiClient\Model\CreateServerResponse loadCdrom($server_id, $storage_device) - -Load CD-ROM - -Loads a storage as a CD-ROM in the CD-ROM device of a server. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\StorageApi(); -$server_id = "server_id_example"; // string | Server id -$storage_device = new \Upcloud\ApiClient\Model\StorageDeviceLoadRequest(); // \Upcloud\ApiClient\Model\StorageDeviceLoadRequest | - -try { - $result = $api_instance->loadCdrom($server_id, $storage_device); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling StorageApi->loadCdrom: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------------ | --------------------------------------------------------------------------------------------- | ----------- | ---------- | -| **server_id** | **string** | Server id | -| **storage_device** | [**\Upcloud\ApiClient\Model\StorageDeviceLoadRequest**](../Model/StorageDeviceLoadRequest.md) | | [optional] | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateServerResponse**](../Model/CreateServerResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **modifyStorage** - -> \Upcloud\ApiClient\Model\CreateStorageResponse modifyStorage($storage_id, $storage) - -Modify storage - -Modifies an existing storage resource. This operation is used to rename or resize the storage. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\StorageApi(); -$storage_id = "storage_id_example"; // string | -$storage = new \Upcloud\ApiClient\Model\ModifyStorageRequest(); // \Upcloud\ApiClient\Model\ModifyStorageRequest | - -try { - $result = $api_instance->modifyStorage($storage_id, $storage); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling StorageApi->modifyStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | ------------------------------------------------------------------------------------- | ----------- | ----- | -| **storage_id** | **string** | | -| **storage** | [**\Upcloud\ApiClient\Model\ModifyStorageRequest**](../Model/ModifyStorageRequest.md) | | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateStorageResponse**](../Model/CreateStorageResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **restoreStorage** - -> restoreStorage($storage_id) - -Restore backup - -Restores the origin storage with data from the specified backup storage. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\StorageApi(); -$storage_id = "storage_id_example"; // string | Storage id - -try { - $api_instance->restoreStorage($storage_id); -} catch (Exception $e) { - echo 'Exception when calling StorageApi->restoreStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | ---------- | ----------- | ----- | -| **storage_id** | **string** | Storage id | - -### Return type - -void (empty response body) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **templatizeStorage** - -> \Upcloud\ApiClient\Model\CreateStorageResponse templatizeStorage($storage_id, $storage) - -Templatize storage - -Creates an exact copy of an existing storage resource which can be used as a template for creating new servers. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\StorageApi(); -$storage_id = "storage_id_example"; // string | Storage id -$storage = new \Upcloud\ApiClient\Model\TemplitizeStorageRequest(); // \Upcloud\ApiClient\Model\TemplitizeStorageRequest | - -try { - $result = $api_instance->templatizeStorage($storage_id, $storage); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling StorageApi->templatizeStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | --------------------------------------------------------------------------------------------- | ----------- | ---------- | -| **storage_id** | **string** | Storage id | -| **storage** | [**\Upcloud\ApiClient\Model\TemplitizeStorageRequest**](../Model/TemplitizeStorageRequest.md) | | [optional] | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateStorageResponse**](../Model/CreateStorageResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **unfavoriteStorage** - -> unfavoriteStorage($storage_id) - -Remove storage from favorites - -Delete a storage from the list of favorite storages. To list favorite storages, see List storages. This operations succeeds even if the storage is already on the list of favorites. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\StorageApi(); -$storage_id = "storage_id_example"; // string | Storage id - -try { - $api_instance->unfavoriteStorage($storage_id); -} catch (Exception $e) { - echo 'Exception when calling StorageApi->unfavoriteStorage: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------- | ---------- | ----------- | ----- | -| **storage_id** | **string** | Storage id | - -### Return type - -void (empty response body) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) diff --git a/docs/Api/TagApi.md b/docs/Api/TagApi.md deleted file mode 100644 index 60651e3b..00000000 --- a/docs/Api/TagApi.md +++ /dev/null @@ -1,320 +0,0 @@ -# Upcloud\ApiClient\TagApi - -All URIs are relative to _https://api.upcloud.com/1.3_ - -| Method | HTTP request | Description | -| ------------------------------------ | ------------------------------------------- | ---------------------- | -| [**assignTag**](TagApi.md#assignTag) | **POST** /server/{serverId}/tag/{tagList} | Assign tag to a server | -| [**createTag**](TagApi.md#createTag) | **POST** /tag | Create a new tag | -| [**deleteTag**](TagApi.md#deleteTag) | **DELETE** /tag/{tagName} | Delete tag | -| [**listTags**](TagApi.md#listTags) | **GET** /tag | List existing tags | -| [**modifyTag**](TagApi.md#modifyTag) | **PUT** /tag/{tagName} | Modify existing tag | -| [**untag**](TagApi.md#untag) | **POST** /server/{serverId}/untag/{tagName} | Remove tag from server | - -# **assignTag** - -> \Upcloud\ApiClient\Model\CreateServerResponse assignTag($server_id, $tag_list) - -Assign tag to a server - -Servers can be tagged with one or more tags. The tags used must exist - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\TagApi(); -$server_id = "server_id_example"; // string | Server id -$tag_list = "tag_list_example"; // string | List of tags - -try { - $result = $api_instance->assignTag($server_id, $tag_list); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling TagApi->assignTag: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ---------- | ------------ | ----- | -| **server_id** | **string** | Server id | -| **tag_list** | **string** | List of tags | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateServerResponse**](../Model/CreateServerResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **createTag** - -> \Upcloud\ApiClient\Model\CreateNewTagResponse createTag($tag) - -Create a new tag - -Creates a new tag. Existing servers can be tagged in same request - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\TagApi(); -$tag = new \Upcloud\ApiClient\Model\TagCreateRequest(); // \Upcloud\ApiClient\Model\TagCreateRequest | - -try { - $result = $api_instance->createTag($tag); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling TagApi->createTag: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------- | ----------------------------------------------------------------------------- | ----------- | ----- | -| **tag** | [**\Upcloud\ApiClient\Model\TagCreateRequest**](../Model/TagCreateRequest.md) | | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateNewTagResponse**](../Model/CreateNewTagResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **deleteTag** - -> deleteTag($tag_name) - -Delete tag - -Deleting existing tag untags all servers from specified tag and deletes tag definition - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\TagApi(); -$tag_name = "tag_name_example"; // string | Tag name - -try { - $api_instance->deleteTag($tag_name); -} catch (Exception $e) { - echo 'Exception when calling TagApi->deleteTag: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------ | ---------- | ----------- | ----- | -| **tag_name** | **string** | Tag name | - -### Return type - -void (empty response body) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **listTags** - -> \Upcloud\ApiClient\Model\TagListResponse listTags() - -List existing tags - -Returns all existing tags with their properties and servers tagged - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\TagApi(); - -try { - $result = $api_instance->listTags(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling TagApi->listTags: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Upcloud\ApiClient\Model\TagListResponse**](../Model/TagListResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **modifyTag** - -> \Upcloud\ApiClient\Model\CreateNewTagResponse modifyTag($tag_name, $tag) - -Modify existing tag - -Changes attributes of an existing tag - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\TagApi(); -$tag_name = "tag_name_example"; // string | Tag name -$tag = new \Upcloud\ApiClient\Model\ModifyTagRequest(); // \Upcloud\ApiClient\Model\ModifyTagRequest | - -try { - $result = $api_instance->modifyTag($tag_name, $tag); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling TagApi->modifyTag: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------ | ----------------------------------------------------------------------------- | ----------- | ----- | -| **tag_name** | **string** | Tag name | -| **tag** | [**\Upcloud\ApiClient\Model\ModifyTagRequest**](../Model/ModifyTagRequest.md) | | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateNewTagResponse**](../Model/CreateNewTagResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) - -# **untag** - -> \Upcloud\ApiClient\Model\CreateServerResponse untag($server_id, $tag_name) - -Remove tag from server - -Untags tags from given server. The tag(s) must exist - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\TagApi(); -$server_id = "server_id_example"; // string | Server id -$tag_name = "tag_name_example"; // string | Tag name - -try { - $result = $api_instance->untag($server_id, $tag_name); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling TagApi->untag: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ---------- | ----------- | ----- | -| **server_id** | **string** | Server id | -| **tag_name** | **string** | Tag name | - -### Return type - -[**\Upcloud\ApiClient\Model\CreateServerResponse**](../Model/CreateServerResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) diff --git a/docs/Api/TimezoneApi.md b/docs/Api/TimezoneApi.md deleted file mode 100644 index 9b737f95..00000000 --- a/docs/Api/TimezoneApi.md +++ /dev/null @@ -1,55 +0,0 @@ -# Upcloud\ApiClient\TimezoneApi - -All URIs are relative to _https://api.upcloud.com/1.3_ - -| Method | HTTP request | Description | -| ------------------------------------------------- | ----------------- | -------------- | -| [**listTimezones**](TimezoneApi.md#listTimezones) | **GET** /timezone | List timezones | - -# **listTimezones** - -> \Upcloud\ApiClient\Model\TimezoneListResponse listTimezones() - -List timezones - -Returns a list of available timezones. Timezones are used to set the hardware clock for servers. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\TimezoneApi(); - -try { - $result = $api_instance->listTimezones(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling TimezoneApi->listTimezones: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Upcloud\ApiClient\Model\TimezoneListResponse**](../Model/TimezoneListResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) diff --git a/docs/Api/ZoneApi.md b/docs/Api/ZoneApi.md deleted file mode 100644 index e2a96ac0..00000000 --- a/docs/Api/ZoneApi.md +++ /dev/null @@ -1,55 +0,0 @@ -# Upcloud\ApiClient\ZoneApi - -All URIs are relative to _https://api.upcloud.com/1.3_ - -| Method | HTTP request | Description | -| ------------------------------------- | ------------- | -------------------- | -| [**listZones**](ZoneApi.md#listZones) | **GET** /zone | List available zones | - -# **listZones** - -> \Upcloud\ApiClient\Model\ZoneListResponse listZones() - -List available zones - -Returns a list of available zones. - -### Example - -```php -setUsername('YOUR_USERNAME'); -Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); - -$api_instance = new Upcloud\ApiClient\Upcloud\ZoneApi(); - -try { - $result = $api_instance->listZones(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling ZoneApi->listZones: ', $e->getMessage(), PHP_EOL; -} -?> -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Upcloud\ApiClient\Model\ZoneListResponse**](../Model/ZoneListResponse.md) - -### Authorization - -[baseAuth](../../README.md#baseAuth) - -### HTTP request headers - -* **Content-Type**: application/json -* **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 00000000..1d07621c --- /dev/null +++ b/docs/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'github-pages', '= 232', group: :jekyll_plugins diff --git a/docs/Model/Account.md b/docs/Model/Account.md deleted file mode 100644 index cd99cf3e..00000000 --- a/docs/Model/Account.md +++ /dev/null @@ -1,12 +0,0 @@ -# Account - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**credits** | **float** | Credits are used to pay for cloud resources such as servers, storages, network traffic and IP addresses. Credits are automatically deducted for used resources on an hourly basis. Should the user run out of credits, active resources will be disabled and reactivated after the credit balance returns to positive. Credits can be purchased from the UpCloud website. | [optional] -**username** | **string** | | [optional] -**resource_limits** | [**\Upcloud\ApiClient\Model\AccountResourceLimits**](AccountResourceLimits.md) | Resource limit variables | [varies] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/AccountResourceLimits.md b/docs/Model/AccountResourceLimits.md deleted file mode 100644 index a60f04b4..00000000 --- a/docs/Model/AccountResourceLimits.md +++ /dev/null @@ -1,16 +0,0 @@ -# AccountResourceLimits - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cores** | |Maximum number of CPU cores | -**detached_floating_ips** | | Maximum number of detached floating IP addresses | -**memory** | | Maximum amount of memory in MiB | -**networks** | | Maximum number of networks | -**public_ipv4** | | Maximum number of IPv4 addresses | -**public_ipv6** | | Maximum number of IPv6 addresses | -**storage_hdd** | | Maximum amount of HDD storage space in MiB | -**storage_ssd** | | Maximum amount of SSD storage space in MiB | - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - diff --git a/docs/Model/AccountResponse.md b/docs/Model/AccountResponse.md deleted file mode 100644 index 3374645b..00000000 --- a/docs/Model/AccountResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# AccountResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account** | [**\Upcloud\ApiClient\Model\Account**](Account.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/AddIpRequest.md b/docs/Model/AddIpRequest.md deleted file mode 100644 index 5cff5a07..00000000 --- a/docs/Model/AddIpRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# AddIpRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ip_address** | [**\Upcloud\ApiClient\Model\IpAddress**](IpAddress.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/AssignIpResponse.md b/docs/Model/AssignIpResponse.md deleted file mode 100644 index bc2fbc6a..00000000 --- a/docs/Model/AssignIpResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# AssignIpResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ip_address** | [**\Upcloud\ApiClient\Model\IpAddress**](IpAddress.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/AttachNetwork.md b/docs/Model/AttachNetwork.md deleted file mode 100644 index 4fd1eff6..00000000 --- a/docs/Model/AttachNetwork.md +++ /dev/null @@ -1,8 +0,0 @@ -# AttachNetwork - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**network** | **string[]** | | - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/AttachStorageDeviceRequest.md b/docs/Model/AttachStorageDeviceRequest.md deleted file mode 100644 index f30f2c83..00000000 --- a/docs/Model/AttachStorageDeviceRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# AttachStorageDeviceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**storage_device** | [**\Upcloud\ApiClient\Model\StorageDevice**](StorageDevice.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/AvailablePlanListResponse.md b/docs/Model/AvailablePlanListResponse.md deleted file mode 100644 index 6e9e495f..00000000 --- a/docs/Model/AvailablePlanListResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# AvailablePlanListResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**plans** | [**\Upcloud\ApiClient\Model\AvailablePlanListResponsePlans**](AvailablePlanListResponsePlans.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/AvailablePlanListResponsePlans.md b/docs/Model/AvailablePlanListResponsePlans.md deleted file mode 100644 index ae50d6a8..00000000 --- a/docs/Model/AvailablePlanListResponsePlans.md +++ /dev/null @@ -1,10 +0,0 @@ -# AvailablePlanListResponsePlans - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**plan** | [**\Upcloud\ApiClient\Model\Plan[]**](Plan.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/BackupRule.md b/docs/Model/BackupRule.md deleted file mode 100644 index bdf31d60..00000000 --- a/docs/Model/BackupRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# BackupRule - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | **string** | | [optional] -**time** | **string** | | [optional] -**retention** | **float** | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/CloneStorageRequest.md b/docs/Model/CloneStorageRequest.md deleted file mode 100644 index 776a24a6..00000000 --- a/docs/Model/CloneStorageRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# CloneStorageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**storage** | [**\Upcloud\ApiClient\Model\Storage**](Storage.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ConfigurationListResponse.md b/docs/Model/ConfigurationListResponse.md deleted file mode 100644 index bdbf6713..00000000 --- a/docs/Model/ConfigurationListResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# ConfigurationListResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**server_sizes** | [**\Upcloud\ApiClient\Model\ConfigurationListResponseServerSizes**](ConfigurationListResponseServerSizes.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ConfigurationListResponseServerSizes.md b/docs/Model/ConfigurationListResponseServerSizes.md deleted file mode 100644 index 66afcd7d..00000000 --- a/docs/Model/ConfigurationListResponseServerSizes.md +++ /dev/null @@ -1,10 +0,0 @@ -# ConfigurationListResponseServerSizes - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**server_size** | [**\Upcloud\ApiClient\Model\ServerSize[]**](ServerSize.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/CreateBackupStorageRequest.md b/docs/Model/CreateBackupStorageRequest.md deleted file mode 100644 index 338f2db0..00000000 --- a/docs/Model/CreateBackupStorageRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreateBackupStorageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**storage** | [**\Upcloud\ApiClient\Model\Storage**](Storage.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/CreateNetworkInterfaceRequest.md b/docs/Model/CreateNetworkInterfaceRequest.md deleted file mode 100644 index 327296e3..00000000 --- a/docs/Model/CreateNetworkInterfaceRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreateNetworkInterfaceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interface** | [**\Upcloud\ApiClient\Model\NetworkInterface**](NetworkInterface.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/CreateNetworkRequest.md b/docs/Model/CreateNetworkRequest.md deleted file mode 100644 index b6c6ea98..00000000 --- a/docs/Model/CreateNetworkRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreateNetworkRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**network** | [**\Upcloud\ApiClient\Model\Network**](Network.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/CreateNewTagResponse.md b/docs/Model/CreateNewTagResponse.md deleted file mode 100644 index 5ca15f49..00000000 --- a/docs/Model/CreateNewTagResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreateNewTagResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tag** | [**\Upcloud\ApiClient\Model\Tag**](Tag.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/CreateObjectStorageRequest.md b/docs/Model/CreateObjectStorageRequest.md deleted file mode 100644 index 09e74352..00000000 --- a/docs/Model/CreateObjectStorageRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreateObjectStorageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object_storage** | [**\Upcloud\ApiClient\Model\ObjectStorage**](ObjectStorage.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/CreateServerRequest.md b/docs/Model/CreateServerRequest.md deleted file mode 100644 index 28f3bf3e..00000000 --- a/docs/Model/CreateServerRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreateServerRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**server** | [**\Upcloud\ApiClient\Model\Server**](Server.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/CreateServerResponse.md b/docs/Model/CreateServerResponse.md deleted file mode 100644 index a989a069..00000000 --- a/docs/Model/CreateServerResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreateServerResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**server** | [**\Upcloud\ApiClient\Model\Server**](Server.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/CreateStorageRequest.md b/docs/Model/CreateStorageRequest.md deleted file mode 100644 index c622bf67..00000000 --- a/docs/Model/CreateStorageRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreateStorageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**storage** | [**\Upcloud\ApiClient\Model\Storage**](Storage.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/CreateStorageResponse.md b/docs/Model/CreateStorageResponse.md deleted file mode 100644 index 431bfff9..00000000 --- a/docs/Model/CreateStorageResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreateStorageResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**storage** | [**\Upcloud\ApiClient\Model\Storage**](Storage.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/Error.md b/docs/Model/Error.md deleted file mode 100644 index a5793862..00000000 --- a/docs/Model/Error.md +++ /dev/null @@ -1,10 +0,0 @@ -# Error - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | [**\Upcloud\ApiClient\Model\ErrorError**](ErrorError.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ErrorCode.md b/docs/Model/ErrorCode.md deleted file mode 100644 index 1ea910e5..00000000 --- a/docs/Model/ErrorCode.md +++ /dev/null @@ -1,9 +0,0 @@ -# ErrorCode - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ErrorError.md b/docs/Model/ErrorError.md deleted file mode 100644 index 41bcfd32..00000000 --- a/docs/Model/ErrorError.md +++ /dev/null @@ -1,11 +0,0 @@ -# ErrorError - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | [**\Upcloud\ApiClient\Model\ErrorCode**](ErrorCode.md) | | [optional] -**error_status** | [**\Upcloud\ApiClient\Model\ErrorStatus**](ErrorStatus.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ErrorStatus.md b/docs/Model/ErrorStatus.md deleted file mode 100644 index dda960c0..00000000 --- a/docs/Model/ErrorStatus.md +++ /dev/null @@ -1,9 +0,0 @@ -# ErrorStatus - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/FirewallRule.md b/docs/Model/FirewallRule.md deleted file mode 100644 index 433b9490..00000000 --- a/docs/Model/FirewallRule.md +++ /dev/null @@ -1,24 +0,0 @@ -# FirewallRule - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**direction** | **string** | The direction of network traffic this rule will be applied to. | -**action** | **string** | Action to take if the rule conditions are met. | -**position** | **float** | Add the firewall rule to this position in the server's firewall list. | [optional] -**family** | **string** | if protocol is set The address family of new firewall rule | -**protocol** | **string** | The protocol this rule will be applied to. | [optional] -**icmp_type** | **string** | The ICMP type. | [optional] -**destination_address_start** | **string** | The destination address range starts from this address. | [optional] -**destination_address_end** | **string** | The destination address range ends to this address. | [optional] -**destination_port_start** | **float** | The destination port range starts from this port number. | [optional] -**destination_port_end** | **float** | The destination port range ends to this port number. | [optional] -**source_address_start** | **string** | The source address range starts from this address. | [optional] -**source_address_end** | **string** | The source address range ends to this address. | [optional] -**source_port_start** | **float** | The source port range starts from this port number. | [optional] -**source_port_end** | **float** | The source port range ends to this port number. | [optional] -**comment** | **string** | Freeform comment string for the rule. | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/FirewallRuleCreateResponse.md b/docs/Model/FirewallRuleCreateResponse.md deleted file mode 100644 index 7a09aff1..00000000 --- a/docs/Model/FirewallRuleCreateResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# FirewallRuleCreateResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**firewall_rule** | [**\Upcloud\ApiClient\Model\FirewallRule**](FirewallRule.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/FirewallRuleListResponse.md b/docs/Model/FirewallRuleListResponse.md deleted file mode 100644 index 14c204a6..00000000 --- a/docs/Model/FirewallRuleListResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# FirewallRuleListResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**firewall_rules** | [**\Upcloud\ApiClient\Model\FirewallRuleListResponseFirewallRules**](FirewallRuleListResponseFirewallRules.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/FirewallRuleListResponseFirewallRules.md b/docs/Model/FirewallRuleListResponseFirewallRules.md deleted file mode 100644 index 47e061f5..00000000 --- a/docs/Model/FirewallRuleListResponseFirewallRules.md +++ /dev/null @@ -1,10 +0,0 @@ -# FirewallRuleListResponseFirewallRules - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**firewall_rule** | [**\Upcloud\ApiClient\Model\FirewallRule[]**](FirewallRule.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/FirewallRuleRequest.md b/docs/Model/FirewallRuleRequest.md deleted file mode 100644 index 22d53340..00000000 --- a/docs/Model/FirewallRuleRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# FirewallRuleRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**firewall_rule** | [**\Upcloud\ApiClient\Model\FirewallRule**](FirewallRule.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/Host.md b/docs/Model/Host.md deleted file mode 100644 index f7da20e2..00000000 --- a/docs/Model/Host.md +++ /dev/null @@ -1,12 +0,0 @@ -# Host - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**description** | **string** | | -**zone** | **string** | | -**windows_enabled** | **string** | | -**stats** | [**\Upcloud\ApiClient\Model\Stats**](Stats.md) | | - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/HostListResponse.md b/docs/Model/HostListResponse.md deleted file mode 100644 index 22dae0da..00000000 --- a/docs/Model/HostListResponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# HostListResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hosts** | [**\Upcloud\ApiClient\Model\Hosts**](Hosts.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/HostResponse.md b/docs/Model/HostResponse.md deleted file mode 100644 index 7f1ad7eb..00000000 --- a/docs/Model/HostResponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# HostResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**host** | [**\Upcloud\ApiClient\Model\Host**](Host.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/Hosts.md b/docs/Model/Hosts.md deleted file mode 100644 index 8865729d..00000000 --- a/docs/Model/Hosts.md +++ /dev/null @@ -1,8 +0,0 @@ -# Hosts - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**host** | [**\Upcloud\ApiClient\Model\Host[]**](Host.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/IpAddress.md b/docs/Model/IpAddress.md deleted file mode 100644 index 479847be..00000000 --- a/docs/Model/IpAddress.md +++ /dev/null @@ -1,18 +0,0 @@ -# IpAddress - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**access** | **string** | Is address for private or public network. | [optional] -**address** | **string** | | [optional] -**family** | **string** | The address family of new IP address. | [optional] -**ptr_record** | **string** | | [optional] -**server** | **string** | | [optional] -**part_of_plan** | **string** | | [optional] -**mac** | **string** | MAC address of server interface to assign address to. Required for non-floating addresses. | [varies] -**floating** | **string** | Whether the address to be assigned is a floating one. | [optional] -**zone** | **string** | Zone of address, required when assigning a detached floating IP address. | [varies] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/IpAddressListResponse.md b/docs/Model/IpAddressListResponse.md deleted file mode 100644 index 02bcfee7..00000000 --- a/docs/Model/IpAddressListResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# IpAddressListResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ip_addresses** | [**\Upcloud\ApiClient\Model\IpAddresses**](IpAddresses.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/IpAddressListResponseIpAddresses.md b/docs/Model/IpAddressListResponseIpAddresses.md deleted file mode 100644 index 9a4632ea..00000000 --- a/docs/Model/IpAddressListResponseIpAddresses.md +++ /dev/null @@ -1,10 +0,0 @@ -# IpAddressListResponseIpAddresses - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ip_address** | [**\Upcloud\ApiClient\Model\IpAddress[]**](IpAddress.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/IpAddresses.md b/docs/Model/IpAddresses.md deleted file mode 100644 index 5b38e8a7..00000000 --- a/docs/Model/IpAddresses.md +++ /dev/null @@ -1,10 +0,0 @@ -# IpAddresses - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ip_address** | [**\Upcloud\ApiClient\Model\IpAddress[]**](IpAddress.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/IpNetwork.md b/docs/Model/IpNetwork.md deleted file mode 100644 index a95afa9f..00000000 --- a/docs/Model/IpNetwork.md +++ /dev/null @@ -1,16 +0,0 @@ -# IpNetwork - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**family** | **string** | The address family of new IP address. | [optional] -**address** | **string** | | [optional] -**dhcp** | **string** | | [optional] -**dhcp_default_route** | **string** | | [optional] -**dhcp_dns** | **string[]** | | [optional] -**gateway** | **string** | | [optional] -**dhcp_bootfile_url** | **string** | | [varies] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ModifyHostRequest.md b/docs/Model/ModifyHostRequest.md deleted file mode 100644 index 6f283f73..00000000 --- a/docs/Model/ModifyHostRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# ModifyHostRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**host** | [**\Upcloud\ApiClient\Model\Host**](Host.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ModifyIpRequest.md b/docs/Model/ModifyIpRequest.md deleted file mode 100644 index 78fcf44e..00000000 --- a/docs/Model/ModifyIpRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# ModifyIpRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ip_address** | [**\Upcloud\ApiClient\Model\IpAddress**](IpAddress.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ModifyNetworkInterfaceRequest.md b/docs/Model/ModifyNetworkInterfaceRequest.md deleted file mode 100644 index 6065d30b..00000000 --- a/docs/Model/ModifyNetworkInterfaceRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# ModifyNetworkInterfaceRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interface** | [**\Upcloud\ApiClient\Model\NetworkInterface**](NetworkInterface.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ModifyNetworkRequest.md b/docs/Model/ModifyNetworkRequest.md deleted file mode 100644 index 681443ed..00000000 --- a/docs/Model/ModifyNetworkRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# ModifyNetworkRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**network** | [**\Upcloud\ApiClient\Model\Network**](Network.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ModifyObjectStorageRequest.md b/docs/Model/ModifyObjectStorageRequest.md deleted file mode 100644 index fc1731b2..00000000 --- a/docs/Model/ModifyObjectStorageRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# ModifyObjectStorageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object_storage** | [**\Upcloud\ApiClient\Model\ObjectStorage**](ObjectStorage.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ModifyServerRequest.md b/docs/Model/ModifyServerRequest.md deleted file mode 100644 index 6a91bc9d..00000000 --- a/docs/Model/ModifyServerRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# ModifyServerRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**server** | [**\Upcloud\ApiClient\Model\Server**](Server.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ModifyStorageRequest.md b/docs/Model/ModifyStorageRequest.md deleted file mode 100644 index 10805ae0..00000000 --- a/docs/Model/ModifyStorageRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# ModifyStorageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**storage** | [**\Upcloud\ApiClient\Model\Storage**](Storage.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ModifyTagRequest.md b/docs/Model/ModifyTagRequest.md deleted file mode 100644 index 8e714128..00000000 --- a/docs/Model/ModifyTagRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# ModifyTagRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tag** | [**\Upcloud\ApiClient\Model\Tag**](Tag.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/Network.md b/docs/Model/Network.md deleted file mode 100644 index d94f1d6a..00000000 --- a/docs/Model/Network.md +++ /dev/null @@ -1,15 +0,0 @@ -# Network - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | | -**type** | **string** | | -**uuid** | **string**| | -**zone** | **string** | | -**router** | **string** | | -**used_space** | **int** | | -**ip_networks** | [**\Upcloud\ApiClient\Model\ipNetworks**](ipNetworks.md) | | -**servers** | [**\Upcloud\ApiClient\Model\Servers**](Servers.md) | | - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/NetworkInterface.md b/docs/Model/NetworkInterface.md deleted file mode 100644 index 356214b1..00000000 --- a/docs/Model/NetworkInterface.md +++ /dev/null @@ -1,15 +0,0 @@ -# NetworkInterface - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**network** | **string** | Virtual network ID to join | [required] -**type** | **string** | Set the type of the network | [required] -**index** | **integer** | Interface index | [optional] [default to Next available] -**ip_addresses** | [**\Upcloud\ApiClient\Model\IpAddresses**](IpAddresses.md) | Array of IP addresses under ip_address | [required] -**source_ip_filtering** | **string** | Whether source IP filtering is enabled on the interface. Disabling it is allowed only for SDN private interfaces. | [optional] [default to 'yes'] -**bootable** | **string** |Whether to try booting through the interface. | [optional] [default to 'no'] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/NetworkInterfaceList.md b/docs/Model/NetworkInterfaceList.md deleted file mode 100644 index 58819d43..00000000 --- a/docs/Model/NetworkInterfaceList.md +++ /dev/null @@ -1,10 +0,0 @@ -# NetworkInterfaceList - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interfaces** | [**\Upcloud\ApiClient\Model\NetworkInterfaces**](NetworkInterfaces.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/NetworkInterfaceResponse.md b/docs/Model/NetworkInterfaceResponse.md deleted file mode 100644 index 426e943c..00000000 --- a/docs/Model/NetworkInterfaceResponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# NetworkInterfaceResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interface** | [**\Upcloud\ApiClient\Model\NetworkInterface**](NetworkInterface.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/NetworkInterfaces.md b/docs/Model/NetworkInterfaces.md deleted file mode 100644 index 4ead55d8..00000000 --- a/docs/Model/NetworkInterfaces.md +++ /dev/null @@ -1,10 +0,0 @@ -# NetworkInterfaces - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interface** | [**\Upcloud\ApiClient\Model\NetworkInterface[]**](NetworkInterface.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/NetworkResponse.md b/docs/Model/NetworkResponse.md deleted file mode 100644 index b99ff12b..00000000 --- a/docs/Model/NetworkResponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# NetworkResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**network** | [**\Upcloud\ApiClient\Model\Network**](Network.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/Networks.md b/docs/Model/Networks.md deleted file mode 100644 index e208565e..00000000 --- a/docs/Model/Networks.md +++ /dev/null @@ -1,8 +0,0 @@ -# Networks - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**network** | [**\Upcloud\ApiClient\Model\Network[]**](Network.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/NetworksListResponse.md b/docs/Model/NetworksListResponse.md deleted file mode 100644 index 06860ca6..00000000 --- a/docs/Model/NetworksListResponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# NetworksListResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**networks** | [**\Upcloud\ApiClient\Model\Networks**](Networks.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/ObjectStorage.md b/docs/Model/ObjectStorage.md deleted file mode 100644 index 43c45150..00000000 --- a/docs/Model/ObjectStorage.md +++ /dev/null @@ -1,18 +0,0 @@ -# ObjectStorage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **string**| | -**name** | **string** | | -**description** | **string** | | -**zone** | **string** | | -**size** | **int** | | -**used_space** | **int** | | -**state** | **string** | | -**url** | **string** | | -**created** | **string** | | -**access_key** | **string** | | -**secret_key** | **string** | | - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/ObjectStorageListResponse.md b/docs/Model/ObjectStorageListResponse.md deleted file mode 100644 index 40093699..00000000 --- a/docs/Model/ObjectStorageListResponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# ObjectStorageListResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object_storages** | [**\Upcloud\ApiClient\Model\ObjectStorages**](ObjectStorages.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/ObjectStorageResponse.md b/docs/Model/ObjectStorageResponse.md deleted file mode 100644 index 9fb8329a..00000000 --- a/docs/Model/ObjectStorageResponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# ObjectStorageResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object_storage** | [**\Upcloud\ApiClient\Model\ObjectStorage**](ObjectStorage.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/ObjectStorages.md b/docs/Model/ObjectStorages.md deleted file mode 100644 index be342d65..00000000 --- a/docs/Model/ObjectStorages.md +++ /dev/null @@ -1,8 +0,0 @@ -# ObjectStorages - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object_storage** | [**\Upcloud\ApiClient\Model\ObjectStorage[]**](ObjectStorage.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/Plan.md b/docs/Model/Plan.md deleted file mode 100644 index 0468b57d..00000000 --- a/docs/Model/Plan.md +++ /dev/null @@ -1,15 +0,0 @@ -# Plan - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**core_number** | **float** | | [optional] -**memory_amount** | **float** | | [optional] -**name** | **string** | | [optional] -**public_traffic_out** | **float** | | [optional] -**storage_size** | **float** | | [optional] -**storage_tier** | **string** | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/Price.md b/docs/Model/Price.md deleted file mode 100644 index 0f0e79bb..00000000 --- a/docs/Model/Price.md +++ /dev/null @@ -1,11 +0,0 @@ -# Price - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount** | **float** | | [optional] -**price** | **float** | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/PriceListResponse.md b/docs/Model/PriceListResponse.md deleted file mode 100644 index 36d73135..00000000 --- a/docs/Model/PriceListResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# PriceListResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**prices** | [**\Upcloud\ApiClient\Model\PriceListResponsePrices**](PriceListResponsePrices.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/PriceListResponsePrice.md b/docs/Model/PriceListResponsePrice.md deleted file mode 100644 index 3a6a3845..00000000 --- a/docs/Model/PriceListResponsePrice.md +++ /dev/null @@ -1,10 +0,0 @@ -# PriceListResponsePrice - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**zone** | [**\Upcloud\ApiClient\Model\PriceZone[]**](PriceZone.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/PriceListResponsePrices.md b/docs/Model/PriceListResponsePrices.md deleted file mode 100644 index a8d03c0a..00000000 --- a/docs/Model/PriceListResponsePrices.md +++ /dev/null @@ -1,10 +0,0 @@ -# PriceListResponsePrices - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**zone** | [**\Upcloud\ApiClient\Model\PriceZone[]**](PriceZone.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/PriceZone.md b/docs/Model/PriceZone.md deleted file mode 100644 index 93a9b950..00000000 --- a/docs/Model/PriceZone.md +++ /dev/null @@ -1,27 +0,0 @@ -# PriceZone - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | | [optional] -**firewall** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] -**io_request_backup** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] -**io_request_hdd** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] -**io_request_maxiops** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] -**ipv4_address** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] -**ipv6_address** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] -**public_ipv4_bandwidth_in** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] -**public_ipv4_bandwidth_out** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] -**public_ipv6_bandwidth_in** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] -**public_ipv6_bandwidth_out** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] -**server_core** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] -**server_memory** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] -**storage_backup** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] -**storage_hdd** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] -**storage_maxiops** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] -**server_plan_1x_cpu_1_gb** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] -**server_plan_2x_cpu_2_gb** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/RestartServer.md b/docs/Model/RestartServer.md deleted file mode 100644 index 5b3d5e2c..00000000 --- a/docs/Model/RestartServer.md +++ /dev/null @@ -1,12 +0,0 @@ -# RestartServer - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stop_type** | **string** | Restart type | [optional] [default to 'soft'] -**timeout** | **float** | Stop timeout in seconds | [optional] -**timeout_action** | **string** | Action to take if timeout limit is exceeded. | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/Router.md b/docs/Model/Router.md deleted file mode 100644 index 39bd8241..00000000 --- a/docs/Model/Router.md +++ /dev/null @@ -1,11 +0,0 @@ -# Router - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | | -**type** | **string** | | -**uuid** | **string**| | -**attached_networks** | [**\Upcloud\ApiClient\Model\AttachNetwork**](AttachNetwork.md) | | - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/RouterRequest.md b/docs/Model/RouterRequest.md deleted file mode 100644 index 0a4732d9..00000000 --- a/docs/Model/RouterRequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# Routers - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**router** | [**\Upcloud\ApiClient\Model\Router**](Router.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/RouterResponse.md b/docs/Model/RouterResponse.md deleted file mode 100644 index 0a4732d9..00000000 --- a/docs/Model/RouterResponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# Routers - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**router** | [**\Upcloud\ApiClient\Model\Router**](Router.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/Routers.md b/docs/Model/Routers.md deleted file mode 100644 index 45146bbd..00000000 --- a/docs/Model/Routers.md +++ /dev/null @@ -1,8 +0,0 @@ -# Routers - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**router** | [**\Upcloud\ApiClient\Model\Router[]**](Router.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/RoutersListResponse.md b/docs/Model/RoutersListResponse.md deleted file mode 100644 index edf63e9e..00000000 --- a/docs/Model/RoutersListResponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# RoutersListResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**routers** | [**\Upcloud\ApiClient\Model\Routers**](Routers.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/Server.md b/docs/Model/Server.md deleted file mode 100644 index d123f4ab..00000000 --- a/docs/Model/Server.md +++ /dev/null @@ -1,39 +0,0 @@ -# Server - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**avoid_host** | **float** | Use this to make sure VMs do not reside on specific host. Refers to value from host -attribute. Useful when building HA-environments. | [optional] -**boot_order** | **string** | The storage device boot order. | [optional] -**core_number** | **float** | The number of CPU cores dedicated to the server. See List server configurations. | [optional] -**firewall** | **string** | The state of the server firewall rules. | [optional] [default to 'on'] -**host** | **float** | | [optional] -**hostname** | **string** | A valid hostname, e.g. host.example.com. The maximum length is 128 characters. | [optional] -**networking** | [**\Upcloud\ApiClient\Model\NetworkInterfaceList**](NetworkInterfaceList.md) | | [optional] -**login_user** | [**\Upcloud\ApiClient\Model\ServerLoginUser**](ServerLoginUser.md) | Define login account and SSH keys | [optional] -**ip_addresses** | [**\Upcloud\ApiClient\Model\IpAddresses**](IpAddresses.md) | | [optional] -**license** | **float** | | [optional] -**memory_amount** | **float** | The amount of main memory in megabytes. See List server configurations. | [optional] -**metadata** | **string** | HTTP-accessible metadata service for the server. See our tutorial for more information. | [optional] [default to 'no'] -**nic_model** | **string** | The model of the server's network interfaces. | [optional] [default to 'virtio'] -**password_delivery** | **string** | The delivery method for the server’s root password. | [optional] [default to 'email'] -**plan** | **string** | The pricing plan used. If a plan is selected, the core_number and memory_amount must match the plan if they are present. | [optional] [default to 'custom'] -**plan_ipv4_bytes** | **float** | | [optional] -**plan_ipv6_bytes** | **float** | | [optional] -**state** | [**\Upcloud\ApiClient\Model\ServerState**](ServerState.md) | | [optional] -**storage_devices** | [**\Upcloud\ApiClient\Model\ServerStorageDevices**](ServerStorageDevices.md) | | [optional] -**tags** | [**\Upcloud\ApiClient\Model\ServerTags**](ServerTags.md) | | [optional] -**timezone** | **string** | A timezone identifier, e.g. Europe/Helsinki. See Timezones. | [optional] -**title** | **string** | A short description. | [optional] -**uuid** | **string** | | [optional] -**user_data** | **string** | Defines URL for a server setup script, or the script body itself | [optional] -**video_model** | **string** | The model of the server's video interface. | [optional] [default to 'vga'] -**remote_access_type** | **string** | The remote access type. | [optional] [default to 'vnc'] -**remote_access_enabled** | **string** | Is the remote access enabled. | [optional] [default to 'no'] -**remote_access_password** | **string** | Remote access password. | [optional] -**simple_backup** | **string** | Simple backup time in UTC, followed by dailies, weeklies, or monthlies option separated by comma, or no when disabled. | [optional] -**zone** | **string** | The zone in which the server will be hosted, e.g. fi-hel1. See Zones. | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ServerListResponse.md b/docs/Model/ServerListResponse.md deleted file mode 100644 index 7f21f0ef..00000000 --- a/docs/Model/ServerListResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# ServerListResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**servers** | [**\Upcloud\ApiClient\Model\ServerListResponseServers**](ServerListResponseServers.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ServerListResponseServers.md b/docs/Model/ServerListResponseServers.md deleted file mode 100644 index e1907111..00000000 --- a/docs/Model/ServerListResponseServers.md +++ /dev/null @@ -1,10 +0,0 @@ -# ServerListResponseServers - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**server** | [**\Upcloud\ApiClient\Model\Server[]**](Server.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ServerLoginUser.md b/docs/Model/ServerLoginUser.md deleted file mode 100644 index 19960f98..00000000 --- a/docs/Model/ServerLoginUser.md +++ /dev/null @@ -1,12 +0,0 @@ -# ServerLoginUser - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**create_password** | **string** | If set to "no", user can login only with SSH key | [optional] [default to 'yes'] -**username** | **string** | | [optional] -**ssh_keys** | [**\Upcloud\ApiClient\Model\ServerSshKey**](ServerSshKey.md) | 1-32 ssh_key attributes | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ServerNetworksListResponse.md b/docs/Model/ServerNetworksListResponse.md deleted file mode 100644 index 5acb1286..00000000 --- a/docs/Model/ServerNetworksListResponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# ServerNetworksListResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**networking** | [**\Upcloud\ApiClient\Model\NetworkInterfaceList**](NetworkInterfaceList.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/ServerSize.md b/docs/Model/ServerSize.md deleted file mode 100644 index 13d91c0b..00000000 --- a/docs/Model/ServerSize.md +++ /dev/null @@ -1,11 +0,0 @@ -# ServerSize - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**core_number** | **float** | | [optional] -**memory_amount** | **float** | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ServerSshKey.md b/docs/Model/ServerSshKey.md deleted file mode 100644 index 0c787d49..00000000 --- a/docs/Model/ServerSshKey.md +++ /dev/null @@ -1,10 +0,0 @@ -# ServerSshKey - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ssh_key** | **string[]** | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ServerState.md b/docs/Model/ServerState.md deleted file mode 100644 index 01ff8800..00000000 --- a/docs/Model/ServerState.md +++ /dev/null @@ -1,9 +0,0 @@ -# ServerState - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ServerStorageDevices.md b/docs/Model/ServerStorageDevices.md deleted file mode 100644 index ac3d241b..00000000 --- a/docs/Model/ServerStorageDevices.md +++ /dev/null @@ -1,10 +0,0 @@ -# ServerStorageDevices - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**storage_device** | [**\Upcloud\ApiClient\Model\StorageDevice[]**](StorageDevice.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ServerTags.md b/docs/Model/ServerTags.md deleted file mode 100644 index e8c3ff82..00000000 --- a/docs/Model/ServerTags.md +++ /dev/null @@ -1,10 +0,0 @@ -# ServerTags - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tag** | **string[]** | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/Servers.md b/docs/Model/Servers.md deleted file mode 100644 index 6cd51ee6..00000000 --- a/docs/Model/Servers.md +++ /dev/null @@ -1,10 +0,0 @@ -# Servers - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**server** | **string[]** | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/Stat.md b/docs/Model/Stat.md deleted file mode 100644 index a325a1a2..00000000 --- a/docs/Model/Stat.md +++ /dev/null @@ -1,10 +0,0 @@ -# Stat - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | | -**timestamp** | **string** | | -**value** | **float** | | - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/Stats.md b/docs/Model/Stats.md deleted file mode 100644 index 64a2203e..00000000 --- a/docs/Model/Stats.md +++ /dev/null @@ -1,8 +0,0 @@ -# Stats - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stat** | [**\Upcloud\ApiClient\Model\Stat[]**](Stat.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) diff --git a/docs/Model/StopServer.md b/docs/Model/StopServer.md deleted file mode 100644 index 3e294bd3..00000000 --- a/docs/Model/StopServer.md +++ /dev/null @@ -1,10 +0,0 @@ -# StopServer - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stop_server** | [**\Upcloud\ApiClient\Model\StopServerRequest**](StopServerRequest.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/StopServerRequest.md b/docs/Model/StopServerRequest.md deleted file mode 100644 index 2eed6bc6..00000000 --- a/docs/Model/StopServerRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# StopServerRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stop_type** | **string** | Type of stop operation performed on the server. | [optional] [default to 'soft'] -**timeout** | **float** | The stop timeout in seconds. | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/Storage.md b/docs/Model/Storage.md deleted file mode 100644 index a7b255a7..00000000 --- a/docs/Model/Storage.md +++ /dev/null @@ -1,23 +0,0 @@ -# Storage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**access** | [**\Upcloud\ApiClient\Model\StorageAccessType**](StorageAccessType.md) | | [optional] -**backup_rule** | [**\Upcloud\ApiClient\Model\BackupRule**](BackupRule.md) | | [optional] -**backups** | [**\Upcloud\ApiClient\Model\StorageBackups**](StorageBackups.md) | | [optional] -**license** | **float** | | [optional] -**servers** | [**\Upcloud\ApiClient\Model\Servers**](Servers.md) | | [optional] -**size** | **float** | | [optional] -**state** | [**\Upcloud\ApiClient\Model\StorageState**](StorageState.md) | | [optional] -**tier** | [**\Upcloud\ApiClient\Model\StorageTier**](StorageTier.md) | | [optional] -**title** | **string** | | [optional] -**type** | [**\Upcloud\ApiClient\Model\StorageType**](StorageType.md) | | [optional] -**uuid** | **string** | | [optional] -**zone** | **string** | | [optional] -**origin** | **string** | | [optional] -**created** | **string** | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/StorageAccessType.md b/docs/Model/StorageAccessType.md deleted file mode 100644 index 7e0883dd..00000000 --- a/docs/Model/StorageAccessType.md +++ /dev/null @@ -1,9 +0,0 @@ -# StorageAccessType - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/StorageBackups.md b/docs/Model/StorageBackups.md deleted file mode 100644 index 2cdf7484..00000000 --- a/docs/Model/StorageBackups.md +++ /dev/null @@ -1,10 +0,0 @@ -# StorageBackups - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**backup** | **string[]** | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/StorageDevice.md b/docs/Model/StorageDevice.md deleted file mode 100644 index 739677d6..00000000 --- a/docs/Model/StorageDevice.md +++ /dev/null @@ -1,20 +0,0 @@ -# StorageDevice - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **string** | | [optional] -**size** | **float** | | [optional] -**tier** | **string** | | [optional] -**action** | **string** | | [optional] -**address** | **string** | | [optional] -**part_of_plan** | **string** | | [optional] -**storage** | **string** | | [optional] -**storage_size** | **float** | | [optional] -**storage_title** | **string** | | [optional] -**type** | **string** | | [optional] -**boot_disk** | **string** | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - - diff --git a/docs/Model/StorageDeviceDetachRequest.md b/docs/Model/StorageDeviceDetachRequest.md deleted file mode 100644 index 4ec3ea4b..00000000 --- a/docs/Model/StorageDeviceDetachRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# StorageDeviceDetachRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**storage_device** | [**\Upcloud\ApiClient\Model\StorageDevice**](StorageDevice.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/StorageDeviceLoadRequest.md b/docs/Model/StorageDeviceLoadRequest.md deleted file mode 100644 index 8d3824e1..00000000 --- a/docs/Model/StorageDeviceLoadRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# StorageDeviceLoadRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**storage_device** | [**\Upcloud\ApiClient\Model\StorageDevice**](StorageDevice.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/StorageState.md b/docs/Model/StorageState.md deleted file mode 100644 index 6b2ba310..00000000 --- a/docs/Model/StorageState.md +++ /dev/null @@ -1,9 +0,0 @@ -# StorageState - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/StorageTier.md b/docs/Model/StorageTier.md deleted file mode 100644 index 0fed23ab..00000000 --- a/docs/Model/StorageTier.md +++ /dev/null @@ -1,9 +0,0 @@ -# StorageTier - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/StorageType.md b/docs/Model/StorageType.md deleted file mode 100644 index 9cc8500c..00000000 --- a/docs/Model/StorageType.md +++ /dev/null @@ -1,9 +0,0 @@ -# StorageType - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/SuccessStoragesResponse.md b/docs/Model/SuccessStoragesResponse.md deleted file mode 100644 index bb3eb937..00000000 --- a/docs/Model/SuccessStoragesResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# SuccessStoragesResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**storages** | [**\Upcloud\ApiClient\Model\SuccessStoragesResponseStorages**](SuccessStoragesResponseStorages.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/SuccessStoragesResponseStorages.md b/docs/Model/SuccessStoragesResponseStorages.md deleted file mode 100644 index 037b2a61..00000000 --- a/docs/Model/SuccessStoragesResponseStorages.md +++ /dev/null @@ -1,10 +0,0 @@ -# SuccessStoragesResponseStorages - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**storage** | [**\Upcloud\ApiClient\Model\Storage[]**](Storage.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/Tag.md b/docs/Model/Tag.md deleted file mode 100644 index fd33e733..00000000 --- a/docs/Model/Tag.md +++ /dev/null @@ -1,12 +0,0 @@ -# Tag - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | The new tag | -**description** | **string** | Description of the tag | [optional] -**servers** | [**\Upcloud\ApiClient\Model\TagServers**](TagServers.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/TagCreateRequest.md b/docs/Model/TagCreateRequest.md deleted file mode 100644 index 88270865..00000000 --- a/docs/Model/TagCreateRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# TagCreateRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tag** | [**\Upcloud\ApiClient\Model\Tag**](Tag.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/TagListResponse.md b/docs/Model/TagListResponse.md deleted file mode 100644 index 67734a59..00000000 --- a/docs/Model/TagListResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# TagListResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tags** | [**\Upcloud\ApiClient\Model\TagListResponseTags**](TagListResponseTags.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/TagListResponseTags.md b/docs/Model/TagListResponseTags.md deleted file mode 100644 index af6aa20f..00000000 --- a/docs/Model/TagListResponseTags.md +++ /dev/null @@ -1,10 +0,0 @@ -# TagListResponseTags - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tag** | [**\Upcloud\ApiClient\Model\Tag[]**](Tag.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/TagServers.md b/docs/Model/TagServers.md deleted file mode 100644 index b1a634f2..00000000 --- a/docs/Model/TagServers.md +++ /dev/null @@ -1,10 +0,0 @@ -# TagServers - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**server** | **string[]** | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - - diff --git a/docs/Model/TemplitizeStorageRequest.md b/docs/Model/TemplitizeStorageRequest.md deleted file mode 100644 index 825a332f..00000000 --- a/docs/Model/TemplitizeStorageRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# TemplitizeStorageRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**storage** | [**\Upcloud\ApiClient\Model\Storage**](Storage.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/TimezoneListResponse.md b/docs/Model/TimezoneListResponse.md deleted file mode 100644 index fbb767c8..00000000 --- a/docs/Model/TimezoneListResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# TimezoneListResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timezones** | [**\Upcloud\ApiClient\Model\TimezoneListResponseTimezones**](TimezoneListResponseTimezones.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/TimezoneListResponseTimezones.md b/docs/Model/TimezoneListResponseTimezones.md deleted file mode 100644 index 6cd810ec..00000000 --- a/docs/Model/TimezoneListResponseTimezones.md +++ /dev/null @@ -1,10 +0,0 @@ -# TimezoneListResponseTimezones - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timezone** | **string[]** | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/Zone.md b/docs/Model/Zone.md deleted file mode 100644 index 40f23f0e..00000000 --- a/docs/Model/Zone.md +++ /dev/null @@ -1,12 +0,0 @@ -# Zone - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Unique zone identifier | [optional] -**description** | **string** | Description of the zone | [optional] -**public** | **string** | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ZoneListResponse.md b/docs/Model/ZoneListResponse.md deleted file mode 100644 index 1bbbc8d0..00000000 --- a/docs/Model/ZoneListResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# ZoneListResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**zones** | [**\Upcloud\ApiClient\Model\ZoneListResponseZones**](ZoneListResponseZones.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ZoneListResponseZones.md b/docs/Model/ZoneListResponseZones.md deleted file mode 100644 index 1d9ca480..00000000 --- a/docs/Model/ZoneListResponseZones.md +++ /dev/null @@ -1,10 +0,0 @@ -# ZoneListResponseZones - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**zone** | [**\Upcloud\ApiClient\Model\Zone[]**](Zone.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/Model/ipNetworks.md b/docs/Model/ipNetworks.md deleted file mode 100644 index b9e1059c..00000000 --- a/docs/Model/ipNetworks.md +++ /dev/null @@ -1,10 +0,0 @@ -# ipNetworks - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ip_network** | [**\Upcloud\ApiClient\Model\IpNetwork[]**](IpNetwork.md) | | [optional] - -[[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) - - diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 00000000..7d5cc53c --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,13 @@ +title: UpCloud PHP SDK +url: https://upcloudltd.github.io +baseurl: /upcloud-php-api +markdown: kramdown +highlighter: rouge +kramdown: + input: GFM + parse_block_html: false +exclude: + - Gemfile + - Gemfile.lock + # ruby/setup-ruby installs cached dependencies here in CI. + - vendor diff --git a/docs/_layouts/sdk.html b/docs/_layouts/sdk.html new file mode 100644 index 00000000..9103a5be --- /dev/null +++ b/docs/_layouts/sdk.html @@ -0,0 +1,34 @@ + + + + + + {{ page.title | escape }} | UpCloud + + + + +
+ UpCloud PHP SDK + +
+
+ {% if page.services %} + + {% endif %} +
{{ content }}
+
+ + + diff --git a/docs/assets/docs.css b/docs/assets/docs.css new file mode 100644 index 00000000..272094e4 --- /dev/null +++ b/docs/assets/docs.css @@ -0,0 +1,48 @@ +:root { color-scheme: light; --ink: #202331; --muted: #606575; --accent: #6038b5; --line: #e2e4ed; } +* { box-sizing: border-box; } +body { margin: 0; color: var(--ink); background: #fff; font: 16px/1.65 system-ui, sans-serif; } +a { color: var(--accent); text-underline-offset: 3px; } +a:hover { text-decoration: underline; } +header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.2rem 4%; border-bottom: 1px solid var(--line); } +header a { text-decoration: none; } +.brand { color: var(--ink); font-size: 1.3rem; font-weight: 750; } +.brand span { color: var(--muted); font-weight: 450; margin-left: .6rem; } +header nav { display: flex; gap: 1.5rem; } +.shell { max-width: 1440px; margin: auto; padding: 2rem 4%; } +.with-sidebar { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 3rem; } +main { min-width: 0; max-width: 1000px; } +.shell:not(.with-sidebar) main { margin: auto; } +aside { position: sticky; top: 1rem; align-self: start; max-height: calc(100vh - 2rem); overflow: auto; font-size: .9rem; } +aside nav { display: grid; margin-bottom: 1rem; } +aside nav a { padding: .25rem .5rem; text-decoration: none; border-radius: 4px; } +aside nav a:hover { background: #f4f0fa; } +.version { font-weight: 650; color: var(--muted); } +h1 { font-size: 2.3rem; line-height: 1.2; margin-top: 0; } +h2 { margin-top: 2.5rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); scroll-margin-top: 1rem; } +h4 { font-size: 1rem; margin-bottom: .5rem; } +code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; overflow-wrap: anywhere; } +p code, li code { background: #f4f2f8; padding: .15rem .3rem; border-radius: 3px; } +pre { padding: 1rem; background: #f6f7fb; border: 1px solid var(--line); border-radius: 6px; overflow: auto; line-height: 1.55; } +pre code { overflow-wrap: normal; } +details { margin: .8rem 0; border: 1px solid var(--line); border-radius: 6px; padding: 0 1rem; } +summary { cursor: pointer; padding: 1rem 0; } +summary::marker { color: var(--accent); } +details[open] { padding-bottom: 1rem; } +details[open] summary { border-bottom: 1px solid var(--line); } +.service-grid ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .6rem; list-style: none; padding: 0; } +.service-grid a { display: block; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; } +.service-grid a:hover { background: #f4f0fa; } +footer { border-top: 1px solid var(--line); padding: 1.5rem 4%; color: var(--muted); font-size: .85rem; } +.skip-link { position: absolute; left: 1rem; top: -5rem; background: white; padding: .5rem; } +.skip-link:focus { top: .5rem; } +:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; } +.highlight .k, .highlight .kd, .highlight .kn { color: #6535a5; font-weight: 600; } +.highlight .s, .highlight .s1, .highlight .s2 { color: #216341; } +.highlight .c, .highlight .c1 { color: #646979; } +@media (max-width: 760px) { + header { align-items: flex-start; flex-direction: column; } + .with-sidebar { grid-template-columns: 1fr; gap: 1rem; } + aside { position: static; max-height: 220px; border-bottom: 1px solid var(--line); } + aside nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } + h1 { font-size: 1.8rem; } +} diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..3de63980 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,80 @@ +--- +layout: sdk +title: UpCloud PHP SDK +--- +# UpCloud PHP SDK + +A typed PHP client for the UpCloud API. Browse service methods, request parameters, and PHP usage examples. + +## Getting started + +Requires PHP **8.1 or later** and Composer. + +```sh +composer require upcloudltd/upcloud-php-api +``` + +```php +account->details(); +``` + +Set `UPCLOUD_TOKEN` to your API token before running the example. + +[Installation, authentication, and error handling](https://github.com/UpCloudLtd/upcloud-php-api#requirements) + +Latest follows the generated SDK on main, including prerelease development. Stable Composer installs do not opt into alpha versions. + +[Legacy v3 source and documentation](https://github.com/UpCloudLtd/upcloud-php-api/tree/v3.0.0) + +## API reference + +[Browse the latest reference](latest/reference.html). Choose a service below to jump to its methods. Expand a method to see its description, usage, and parameters. + +### Services + +
+ +- [Account](latest/reference.html#accountAnchor) +- [Kubernetes](latest/reference.html#kubernetesAnchor) +- [Currency](latest/reference.html#currencyAnchor) +- [Device](latest/reference.html#deviceAnchor) +- [Events](latest/reference.html#eventsAnchor) +- [Ip Address](latest/reference.html#ip_addressAnchor) +- [Network Peering](latest/reference.html#network-peeringAnchor) +- [Network](latest/reference.html#networkAnchor) +- [Audit Logs](latest/reference.html#audit-logsAnchor) +- [Partner](latest/reference.html#partnerAnchor) +- [Permission](latest/reference.html#permissionAnchor) +- [Plan](latest/reference.html#planAnchor) +- [Price](latest/reference.html#priceAnchor) +- [Router](latest/reference.html#routerAnchor) +- [Server Group](latest/reference.html#server-groupAnchor) +- [Server](latest/reference.html#serverAnchor) +- [Server Size](latest/reference.html#server_sizeAnchor) +- [Storage](latest/reference.html#storageAnchor) +- [Tag](latest/reference.html#tagAnchor) +- [Timezone](latest/reference.html#timezoneAnchor) +- [Account Tokens](latest/reference.html#account-tokensAnchor) +- [Object Storage 2](latest/reference.html#object-storage-2Anchor) +- [File Storage](latest/reference.html#file-storageAnchor) +- [Database](latest/reference.html#databaseAnchor) +- [Gateway](latest/reference.html#gatewayAnchor) +- [Load Balancer](latest/reference.html#load-balancerAnchor) +- [Firewall Ruleset](latest/reference.html#firewall-rulesetAnchor) +- [Vnc Keymap](latest/reference.html#vnc_keymapAnchor) +- [Zone](latest/reference.html#zoneAnchor) + +
+ +## Tagged releases + +Versioned SDK reference snapshots. The v0.0.x snapshots predate migration and are not legacy Packagist v1-v3 releases. + +- [v0.0.105](v0.0.105/reference.html) +- [v0.0.65](v0.0.65/reference.html) +- [v0.0.11](v0.0.11/reference.html) diff --git a/docs/latest/reference.md b/docs/latest/reference.md new file mode 100644 index 00000000..c10689ce --- /dev/null +++ b/docs/latest/reference.md @@ -0,0 +1,13885 @@ +--- +layout: sdk +title: "API reference Β· latest" +version: "latest" +services: + - account + - kubernetes + - currency + - device + - events + - ip_address + - network-peering + - network + - audit-logs + - partner + - permission + - plan + - price + - router + - server-group + - server + - server_size + - storage + - tag + - timezone + - account-tokens + - object-storage-2 + - file-storage + - database + - gateway + - load-balancer + - firewall-ruleset + - vnc_keymap + - zone +--- +# API reference +## account +{:#accountAnchor} + +
+$client->account->details() -> Account + +#### Description + +Returns account details for the authenticated user + +#### Usage + +```php +$client->account->details(); +``` + +
+ +
+$client->account->getMonthlyDetailedBillingSummary($year, $month, $request) -> AccountBillingSummary + +#### Description + +Returns a billing summary grouped by resource, including billing detail changes during the specified month. The API user must have permission to read billing details. + +#### Usage + +```php +$client->account->getMonthlyDetailedBillingSummary( + 'year', + 'month', + new GetMonthlyDetailedBillingSummaryRequest([]), +); +``` + +#### Parameters + +**$year:** `string` β€” Billing year. + +**$month:** `string` β€” Billing month. + +**$username:** `?string` β€” Return the billing summary for this account instead of the calling account. Requires Partner API access and an existing association with the account. + +**$resourceId:** `?string` β€” Return details only for this resource UUID or IP address. + +
+ +
+$client->account->getMonthlyBillingSummary($year, $month) -> AccountBillingSummaryResponse + +#### Description + +Returns a billing summary for the specified month. The API user must have permission to read billing details. This endpoint is deprecated; use the monthly billing summary with resource details instead. + +#### Usage + +```php +$client->account->getMonthlyBillingSummary( + 'year', + 'month', +); +``` + +#### Parameters + +**$year:** `string` β€” Billing year. + +**$month:** `string` β€” Billing month. + +
+ +
+$client->account->getCurrentNetworkUsage() -> AccountCurrentNetworkUsage + +#### Description + +Returns the latest Network Transfer Pool usage report for the account. + +#### Usage + +```php +$client->account->getCurrentNetworkUsage(); +``` + +
+ +
+$client->account->listAccounts($request) -> Accounts + +#### Description + +Returns the main account and its subaccounts. Account listing is available only to the main account. + +#### Usage + +```php +$client->account->listAccounts( + new ListAccountsRequest([]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require all labels. Label keys are matched case-insensitively. + +
+ +
+$client->account->createMslmaSigningLink() -> AccountCreateMsLmaSigningLinkResponse + +#### Description + +Create a new Microsoft LMA signing link + +#### Usage + +```php +$client->account->createMslmaSigningLink(); +``` + +
+ +
+$client->account->getAccountNetworkTopUsage($request) -> AccountResourceNetworkUsage + +#### Description + +Returns the resources with the highest network usage. + +#### Usage + +```php +$client->account->getAccountNetworkTopUsage( + new GetAccountNetworkTopUsageRequest([ + 'from' => new DateTime('2026-07-01T00:00:00Z'), + 'to' => new DateTime('2026-07-01T00:00:00Z'), + 'zone' => 'fi-hel1', + ]), +); +``` + +#### Parameters + +**$from:** `DateTime` β€” Start of the usage period. + +**$to:** `DateTime` β€” End of the usage period. + +**$service:** `?string` β€” Filter by service type. Repeat the parameter to include multiple service types. + +**$zone:** `?string` β€” Filter by zone. Repeat the parameter to include multiple zones. + +**$accumulate:** `?string` β€” Accumulation period for the usage statistics. + +
+ +
+$client->account->getAccountNetworkUsage($request) -> AccountNetworkUsage + +#### Description + +Returns network transfer statistics. JSON responses support a maximum time window of 31 days; CSV responses have no time-window limit. Select the output format with the Accept header using application/json or text/csv. + +#### Usage + +```php +$client->account->getAccountNetworkUsage( + new GetAccountNetworkUsageRequest([ + 'from' => new DateTime('2026-07-01T00:00:00Z'), + 'to' => new DateTime('2026-07-01T00:00:00Z'), + ]), +); +``` + +#### Parameters + +**$from:** `DateTime` β€” First measurement timestamp in RFC 3339 format. + +**$to:** `DateTime` β€” Last measurement timestamp in RFC 3339 format. + +**$accumulate:** `?string` β€” Accumulate the transfer statistics by hour or day. + +
+ +
+$client->account->getAccountResourceUsage() -> array + +#### Description + +Returns current resource usage counts for the account. + +#### Usage + +```php +$client->account->getAccountResourceUsage(); +``` + +
+ +
+$client->account->getMonthlyResourceBillingSummary($resourceId, $year, $month) -> AccountResourceBillingSummaryResponse + +#### Description + +Returns a billing summary for one resource during the specified month. The API user must have permission to read billing details. + +#### Usage + +```php +$client->account->getMonthlyResourceBillingSummary( + 'resource_id', + 'year', + 'month', +); +``` + +#### Parameters + +**$resourceId:** `string` β€” Server UUID, storage UUID, or IP address. + +**$year:** `string` β€” Billing year. + +**$month:** `string` β€” Billing month. + +
+ +
+$client->account->getAccountResourceNetworkUsage($request) -> AccountResourceNetworkUsage + +#### Description + +Returns network transfer statistics grouped by resource, service, and zone. JSON responses support a maximum time window of 31 days; CSV responses have no time-window limit. Select the output format with the Accept header using application/json or text/csv. + +#### Usage + +```php +$client->account->getAccountResourceNetworkUsage( + new GetAccountResourceNetworkUsageRequest([ + 'from' => new DateTime('2026-07-01T00:00:00Z'), + 'to' => new DateTime('2026-07-01T00:00:00Z'), + 'resourceId' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'zone' => 'fi-hel1', + ]), +); +``` + +#### Parameters + +**$from:** `DateTime` β€” Data start timestamp in RFC 3339 format. + +**$to:** `DateTime` β€” Data end timestamp in RFC 3339 format. + +**$service:** `?string` β€” Limit results to a service type. Repeat the parameter to include multiple service types. + +**$resourceId:** `?string` β€” Limit results to this resource UUID. + +**$zone:** `?string` β€” Limit results to a zone. Repeat the parameter to include multiple zones. + +**$accumulate:** `?string` β€” Accumulate the transfer statistics by hour or day. + +
+ +
+$client->account->createSubaccount($request) + +#### Description + +Creates a subaccount for the authenticated main account. + +#### Usage + +```php +$client->account->createSubaccount( + new CreateSubaccountRequest([ + 'subAccount' => new CreateSubaccountRequestSubAccount([ + 'username' => 'myusername', + 'password' => 'mysecr3tPassword', + 'firstName' => 'first', + 'lastName' => 'last', + 'company' => 'my company name', + 'vatNumber' => 'my vat number', + 'address' => 'my address', + 'postalCode' => '00130', + 'city' => 'Helsinki', + 'state' => '', + 'country' => 'FIN', + 'email' => 'user@example.com', + 'phone' => '+358.31245434', + 'language' => 'en', + 'currency' => 'EUR', + 'timezone' => 'Europe/Helsinki', + 'allowApi' => AccountBooleanYesno::Yes->value, + 'allowGui' => AccountBooleanYesno::No->value, + 'roles' => new CreateSubaccountRequestSubAccountRoles([ + 'role' => [ + 'technical', + 'billing', + 'aux_billing', + ], + ]), + 'labels' => [ + new AccountLabel([ + 'key' => 'department', + 'value' => 'it', + ]), + ], + 'ipFilters' => new CreateSubaccountRequestSubAccountIpFilters([ + 'ipFilter' => [ + 'ip_filter', + ], + ]), + ]), + ]), +); +``` + +#### Parameters + +**$subAccount:** `CreateSubaccountRequestSubAccount` + +
+ +
+$client->account->deleteSubaccount($username) + +#### Description + +Deletes a subaccount from the authenticated main account. + +#### Usage + +```php +$client->account->deleteSubaccount( + 'username', +); +``` + +#### Parameters + +**$username:** `string` β€” Subaccount username. + +
+ +## kubernetes +{:#kubernetesAnchor} + +
+$client->kubernetes->listKubernetesClusters() -> array + +#### Description + +Returns a list of Kubernetes clusters. + +#### Usage + +```php +$client->kubernetes->listKubernetesClusters(); +``` + +
+ +
+$client->kubernetes->createKubernetesCluster($request) -> KubernetesCluster + +#### Description + +Creates a new Kubernetes cluster. + +#### Usage + +```php +$client->kubernetes->createKubernetesCluster( + new KubernetesCluster([ + 'controlPlaneIpFilter' => [ + '1.2.3.0/24', + '1.1.1.1', + ], + 'name' => 'example-cluster', + 'network' => '33333333-3333-3333-333333333333', + 'networkCidr' => '172.16.0.0/24', + 'nodeGroups' => [ + new KubernetesNodeGroup([ + 'count' => 4, + 'kubeletArgs' => [ + new KubernetesKubeletArg([ + 'key' => 'log-flush-frequency', + 'value' => '5s', + ]), + ], + 'labels' => [ + new KubernetesLabel([ + 'key' => 'managedBy', + 'value' => 'exampleDevelopmentTeam', + ]), + new KubernetesLabel([ + 'key' => 'environment', + 'value' => 'development', + ]), + ], + 'name' => 'small', + 'plan' => 'K8S-2xCPU-4GB', + 'sshKeys' => [ + 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV', + ], + 'storage' => '01000000-0000-4000-8000-000160010100', + 'taints' => [ + new KubernetesTaint([ + 'effect' => KubernetesEffect::NoSchedule->value, + 'key' => 'environment', + 'value' => 'development', + ]), + ], + ]), + new KubernetesNodeGroup([ + 'count' => 8, + 'kubeletArgs' => [ + new KubernetesKubeletArg([ + 'key' => 'log-flush-frequency', + 'value' => '15s', + ]), + ], + 'labels' => [ + new KubernetesLabel([ + 'key' => 'managedBy', + 'value' => 'exampleStagingTeam', + ]), + new KubernetesLabel([ + 'key' => 'environment', + 'value' => 'staging', + ]), + ], + 'name' => 'medium', + 'plan' => 'K8S-4xCPU-8GB', + 'sshKeys' => [ + 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV', + ], + 'storage' => '01000000-0000-4000-8000-000160010100', + 'taints' => [ + new KubernetesTaint([ + 'effect' => KubernetesEffect::NoSchedule->value, + 'key' => 'environment', + 'value' => 'staging', + ]), + ], + ]), + ], + 'zone' => 'de-fra1', + 'version' => 'version', + 'labels' => [ + [ + 'key' => "env", + 'value' => "prod", + ], + [ + 'key' => "app", + 'value' => "cats-dating-app", + ], + ], + ]), +); +``` + +#### Parameters + +**$request:** `KubernetesCluster` + +
+ +
+$client->kubernetes->getKubernetesCluster($uuid) -> KubernetesCluster + +#### Description + +Returns Kubernetes cluster details by given `uuid`. + +#### Usage + +```php +$client->kubernetes->getKubernetesCluster( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->deleteKubernetesCluster($uuid) -> KubernetesAccepted + +#### Description + +Deletes an existing Kubernetes cluster by given `uuid`. + +#### Usage + +```php +$client->kubernetes->deleteKubernetesCluster( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->modifyKubernetesCluster($uuid, $request) -> KubernetesCluster + +#### Description + +Modifies an existing Kubernetes cluster by given `{uuid}`. + +#### Usage + +```php +$client->kubernetes->modifyKubernetesCluster( + 'uuid', + new KubernetesClusterPatch([ + 'controlPlaneIpFilter' => [ + '1.2.3.0/24', + '1.1.1.1', + ], + 'labels' => [ + [ + 'key' => "env", + 'value' => "prod", + ], + [ + 'key' => "app", + 'value' => "cats-dating-app", + ], + ], + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$controlPlaneIpFilter:** `?array` + +**$labels:** `mixed` + +**$plan:** `?string` + +
+ +
+$client->kubernetes->getKubernetesClusterKubeconfig($uuid) -> KubernetesClusterKubeconfig + +#### Description + +Returns kubeconfig for Kubernetes cluster by given `{uuid}`. + +#### Usage + +```php +$client->kubernetes->getKubernetesClusterKubeconfig( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->getKubernetesClusterAvailableUpgrades($uuid) -> KubernetesClusterAvailableUpgrades + +#### Description + +Returns a list of available versions that can be used to upgrade the cluster. + +#### Usage + +```php +$client->kubernetes->getKubernetesClusterAvailableUpgrades( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->upgradeKubernetesCluster($uuid, $request) -> KubernetesClusterAvailableUpgradesPost + +#### Description + +Upgrades an existing Kubernetes cluster to specific version. + +#### Usage + +```php +$client->kubernetes->upgradeKubernetesCluster( + 'uuid', + new UpgradeKubernetesClusterRequest([ + 'body' => new KubernetesClusterAvailableUpgradesPost([ + 'version' => '1.31', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$request:** `KubernetesClusterAvailableUpgradesPost` + +
+ +
+$client->kubernetes->listKubernetesClusterNodeGroups($uuid) -> array + +#### Description + +Returns a list of available node groups of an existing Kubernetes cluster. Cluster is identified by given `{uuid}`. + +A node group is a uniform set of worker nodes attached to a cluster. + +#### Usage + +```php +$client->kubernetes->listKubernetesClusterNodeGroups( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->createKubernetesClusterNodeGroup($uuid, $request) -> KubernetesNodeGroup + +#### Description + +Creates a new node group to an existing Kubernetes cluster. Cluster is identified by given `{uuid}`. + +#### Usage + +```php +$client->kubernetes->createKubernetesClusterNodeGroup( + 'uuid', + new CreateKubernetesClusterNodeGroupRequest([ + 'body' => new KubernetesNodeGroup([ + 'count' => 4, + 'kubeletArgs' => [ + new KubernetesKubeletArg([ + 'key' => 'log-flush-frequency', + 'value' => '5s', + ]), + ], + 'labels' => [ + new KubernetesLabel([ + 'key' => 'managedBy', + 'value' => 'exampleDevelopmentTeam', + ]), + new KubernetesLabel([ + 'key' => 'environment', + 'value' => 'development', + ]), + ], + 'name' => 'small', + 'plan' => 'K8S-2xCPU-4GB', + 'sshKeys' => [ + 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV', + ], + 'storage' => '01000000-0000-4000-8000-000160010100', + 'taints' => [ + new KubernetesTaint([ + 'effect' => KubernetesEffect::NoSchedule->value, + 'key' => 'environment', + 'value' => 'development', + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$request:** `KubernetesNodeGroup` + +
+ +
+$client->kubernetes->getKubernetesClusterNodeGroup($uuid, $name) -> KubernetesNodeGroupDetails + +#### Description + +Returns node group details by given `{node_group_name}`. Cluster is identified by given `{uuid}`. + +#### Usage + +```php +$client->kubernetes->getKubernetesClusterNodeGroup( + 'uuid', + 'name', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +
+ +
+$client->kubernetes->deleteKubernetesClusterNodeGroup($uuid, $name) -> KubernetesAccepted + +#### Description + +Deletes an existing node group by given Kubernetes cluster `{uuid}` and `{node_group_name}`. + +#### Usage + +```php +$client->kubernetes->deleteKubernetesClusterNodeGroup( + 'uuid', + 'name', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +
+ +
+$client->kubernetes->modifyKubernetesClusterNodeGroup($uuid, $name, $request) -> KubernetesNodeGroup + +#### Description + +Modifies an existing node group of a cluster. Cluster is identified by given `{uuid}` and node group by `{node_group_name}`. + +#### Usage + +```php +$client->kubernetes->modifyKubernetesClusterNodeGroup( + 'uuid', + 'name', + new KubernetesNodeGroupPatch([ + 'count' => 16, + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +**$count:** `int` + +
+ +
+$client->kubernetes->deleteKubernetesClusterNodeGroupNode($uuid, $name, $nodeName) -> KubernetesAccepted + +#### Description + +Deletes a node group node from a cluster (experimental). Cluster is identified by given `{uuid}`, node group by `{name}`, and node by `{node-name}`. + +#### Usage + +```php +$client->kubernetes->deleteKubernetesClusterNodeGroupNode( + 'uuid', + 'name', + 'node-name', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +**$nodeName:** `string` β€” Node name + +
+ +
+$client->kubernetes->listKubernetesPlans() -> array + +#### Description + +Returns a list of available Kubernetes cluster plans. + +#### Usage + +```php +$client->kubernetes->listKubernetesPlans(); +``` + +
+ +
+$client->kubernetes->listKubernetesVersions() -> array + +#### Description + +Returns a list of available Kubernetes cluster versions. + +#### Usage + +```php +$client->kubernetes->listKubernetesVersions(); +``` + +
+ +
+$client->kubernetes->listClusterAuthentication($uuid) -> array + +#### Description + +Returns all OIDC authentication issuer configurations for a cluster. + +#### Usage + +```php +$client->kubernetes->listClusterAuthentication( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->createClusterAuthentication($uuid, $request) -> KubernetesAuthenticationIssuerConfig + +#### Description + +Creates a new OIDC authentication issuer configuration. The new entry is validated together with the cluster's existing entries before being applied. Fails if an entry with the same name already exists. + +#### Usage + +```php +$client->kubernetes->createClusterAuthentication( + 'uuid', + new CreateClusterAuthenticationRequest([ + 'body' => new KubernetesAuthenticationIssuerConfig([ + 'name' => 'name', + 'issuerUrl' => 'https://accounts.myoidcprovider.com', + 'audiences' => [ + 'client-id-123', + ], + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$request:** `KubernetesAuthenticationIssuerConfig` + +
+ +
+$client->kubernetes->setClusterAuthentication($uuid, $request) -> array + +#### Description + +Replaces the entire set of OIDC authentication issuer configurations for a cluster with the supplied JSON list of issuers. The full set is validated before being applied. An empty list clears all issuers. + +#### Usage + +```php +$client->kubernetes->setClusterAuthentication( + 'uuid', + new SetClusterAuthenticationRequest([ + 'body' => [ + new KubernetesAuthenticationIssuerConfig([ + 'name' => 'name', + 'issuerUrl' => 'https://accounts.myoidcprovider.com', + 'audiences' => [ + 'client-id-123', + ], + ]), + ], + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$request:** `array` + +
+ +
+$client->kubernetes->importClusterAuthentication($uuid) -> array + +#### Description + +Replaces the entire set of OIDC authentication issuer configurations for a cluster with the supplied native kube-apiserver v1 AuthenticationConfiguration YAML document. Issuers are named deterministically from their issuer URL host. The top-level `anonymous` field is not supported and any configuration that would drop data is rejected. + +#### Usage + +```php +$client->kubernetes->importClusterAuthentication( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->getClusterAuthentication($uuid, $name) -> KubernetesAuthenticationIssuerConfig + +#### Usage + +```php +$client->kubernetes->getClusterAuthentication( + 'uuid', + 'name', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +
+ +
+$client->kubernetes->updateClusterAuthentication($uuid, $name, $request) -> KubernetesAuthenticationIssuerConfig + +#### Description + +Updates an existing OIDC authentication issuer configuration. The name in the path is authoritative. The updated entry is validated together with the cluster's other entries before being applied. + +#### Usage + +```php +$client->kubernetes->updateClusterAuthentication( + 'uuid', + 'name', + new UpdateClusterAuthenticationRequest([ + 'body' => new KubernetesAuthenticationIssuerConfig([ + 'name' => 'name', + 'issuerUrl' => 'https://accounts.myoidcprovider.com', + 'audiences' => [ + 'client-id-123', + ], + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +**$request:** `KubernetesAuthenticationIssuerConfig` + +
+ +
+$client->kubernetes->deleteClusterAuthentication($uuid, $name) + +#### Description + +Removes an OIDC authentication issuer configuration by name. + +#### Usage + +```php +$client->kubernetes->deleteClusterAuthentication( + 'uuid', + 'name', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +
+ +
+$client->kubernetes->getKubernetesClusterOidcKubeconfig($uuid, $name, $request) -> KubernetesClusterKubeconfig + +#### Description + +Returns a kubeconfig for the cluster whose user authenticates via the kubelogin (`kubectl oidc-login`) exec credential plugin, using the cluster's configured OIDC issuer identified by the `name` path parameter. The plugin (kubelogin) must be installed on the client. No long-lived credential is embedded. The OIDC client secret and any provider-specific kubelogin flags are not injected by the server; the returned kubeconfig includes comments describing how to add them. + +#### Usage + +```php +$client->kubernetes->getKubernetesClusterOidcKubeconfig( + 'uuid', + 'name', + new GetKubernetesClusterOidcKubeconfigRequest([]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +**$audience:** `?string` β€” Which of the issuer's configured audiences to use as the OIDC client id in the generated kubeconfig. When omitted, the issuer's first audience is used. Must match one of the issuer's audiences. + +
+ +## currency +{:#currencyAnchor} + +
+$client->currency->listCurrencies() -> CurrencyCurrencies + +#### Description + +Retrieves a list of supported currencies and their exchange rates relative to the account credit currency. + +#### Usage + +```php +$client->currency->listCurrencies(); +``` + +
+ +## device +{:#deviceAnchor} + +
+$client->device->getAvailablePassthroughDevices($request) -> array + +#### Description + +Returns a list of available passthrough devices. + +#### Usage + +```php +$client->device->getAvailablePassthroughDevices( + new GetAvailablePassthroughDevicesRequest([]), +); +``` + +#### Parameters + +**$zone:** `?string` β€” Filter results to a specific zone. + +**$type:** `?string` β€” Filter results to a specific device type. The only valid type is "gpu" for now. + +
+ +## events +{:#eventsAnchor} + +
+$client->events->listEvents($serverUuid, $offset, $count) -> Events + +#### Description + +Retrieves a list of events. + +#### Usage + +```php +$client->events->listEvents( + 'server_uuid', + 1, + 1, +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Filter results to a specific server. + +**$offset:** `int` β€” The number of items to skip before starting to collect the result set. Default is 0. + +**$count:** `int` β€” The numbers of items to return. + +
+ +## ip_address +{:#ip_addressAnchor} + +
+$client->ipAddress->listIpAddresses() -> IpAddressesResponse + +#### Description + +Retrieves a list of IP addresses. + +#### Usage + +```php +$client->ipAddress->listIpAddresses(); +``` + +
+ +
+$client->ipAddress->addIpAddress($request) -> IpAddressRequest + +#### Description + +Adds a new IP address. + +#### Usage + +```php +$client->ipAddress->addIpAddress( + new AddIpAddressRequest([ + 'ipAddress' => new AddIpAddressRequestIpAddress([ + 'access' => 'access', + 'family' => IpAddressIpFamily::IPv4->value, + ]), + ]), +); +``` + +#### Parameters + +**$ipAddress:** `AddIpAddressRequestIpAddress` + +
+ +
+$client->ipAddress->bulkModifyIpAddresses($request) + +#### Description + +Modifies attributes of multiple IP addresses in a single request. + +#### Usage + +```php +$client->ipAddress->bulkModifyIpAddresses( + new BulkPatchIpAddressesRequestV13([ + 'ipAddresses' => [ + new BulkPatchIpAddressesRequestV13IpAddressesItem([ + 'address' => 'address', + 'mainAccountId' => 1000000, + 'delegatedToAccountId' => 1000000, + 'releasePolicy' => IpAddressIpReleasePolicy::Release->value, + ]), + ], + ]), +); +``` + +#### Parameters + +**$ipAddresses:** `array` + +
+ +
+$client->ipAddress->getIpAddressDetails($address) -> IpAddressResponse + +#### Description + +Retrieves details of a specific IP address. + +#### Usage + +```php +$client->ipAddress->getIpAddressDetails( + 'address', +); +``` + +#### Parameters + +**$address:** `string` β€” The IP address to retrieve details for. + +
+ +
+$client->ipAddress->modifyIpAddress($address, $request) -> IpAddressRequest + +#### Description + +Modifies attributes of a specific IP address. + +#### Usage + +```php +$client->ipAddress->modifyIpAddress( + 'address', + new ModifyIpAddressRequestV10([ + 'ipAddress' => new ModifyIpAddressRequestV10IpAddress([ + 'ptrRecord' => 'host.example.com', + ]), + ]), +); +``` + +#### Parameters + +**$address:** `string` β€” The IP address to modify. + +**$ipAddress:** `ModifyIpAddressRequestV10IpAddress` + +
+ +
+$client->ipAddress->deleteIpAddress($address) + +#### Description + +Deletes a specific IP address. + +#### Usage + +```php +$client->ipAddress->deleteIpAddress( + 'address', +); +``` + +#### Parameters + +**$address:** `string` β€” The IP address to delete. + +
+ +
+$client->ipAddress->patchModifyIpAddress($address, $request) -> IpAddressRequest + +#### Description + +Modifies attributes of a specific IP address. + +#### Usage + +```php +$client->ipAddress->patchModifyIpAddress( + 'address', + new PatchIpAddressRequestV13([ + 'ipAddress' => new PatchIpAddressRequestV13IpAddress([]), + ]), +); +``` + +#### Parameters + +**$address:** `string` β€” The IP address to modify. + +**$ipAddress:** `PatchIpAddressRequestV13IpAddress` + +
+ +## network-peering +{:#network-peeringAnchor} + +
+$client->networkPeering->listNetworkPeerings($request) -> NetworkPeerings + +#### Description + +Get a list of all peerings within the current account. Only peerings that refer to a network that the current +account has access are returned. + +It is also possible to filter network peering with label URL parameters, e.g. +`?label=env` or `?label=env%3Dprod`. The URL parameter can be given multiple +times to add more filters (e.g. `?label=env%3Dprod&label=v2`), where +only network peering that match all labels are returned. +Label keys are matched case insensitively. + +#### Usage + +```php +$client->networkPeering->listNetworkPeerings( + new ListNetworkPeeringsRequest([ + 'uuid' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'networkUuidLocal' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'networkUuidPeer' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ]), +); +``` + +#### Parameters + +**$uuid:** `?string` β€” Filter by network peering UUID. + +**$networkUuidLocal:** `?string` β€” Filter by local network uuid. + +**$networkUuidPeer:** `?string` β€” Filter by peer network uuid. + +**$label:** `?string` β€” Label filter in the form key=value. Can be specified multiple times to filter by multiple labels. + +
+ +
+$client->networkPeering->createNetworkPeering($request) -> NetworkPeering + +#### Description + +Network peerings are used to enable traffic between two networks that can be on different main accounts. +The peering must be established both ways before it's considered as active. Peering is only supported between networks +of type `private`. + +**Note**: you should only create peering between accounts and networks you trust. There is no limits on what traffic +can flow. The server firewall **has no effect** for `private` type networks. + +It is required that both networks have a *Router* attached to the network. + +#### Usage + +```php +$client->networkPeering->createNetworkPeering( + new NetworkPeeringCreate([ + 'configuredStatus' => NetworkPeeringCreateConfiguredStatus::Active->value, + 'name' => 'Peering A->B', + 'network' => new NetworkPeeringCreateNetwork([ + 'uuid' => '03126dc1-a69f-4bc2-8b24-e31c22d64712', + ]), + 'peerNetwork' => new NetworkPeeringCreatePeerNetwork([ + 'uuid' => '03585987-bf7d-4544-8e9b-5a1b4d74a333', + ]), + ]), +); +``` + +#### Parameters + +**$configuredStatus:** `?string` + +**$name:** `string` + +**$network:** `NetworkPeeringCreateNetwork` β€” Describes the local side of the peering + +**$peerNetwork:** `NetworkPeeringCreatePeerNetwork` β€” Describes the peer side of the peering + +
+ +
+$client->networkPeering->getNetworkPeering($peeringUuid) -> NetworkPeering + +#### Description + +Returns the state of an existing network peering. + +Note that the `peer_network` field only contains the network details if the peering has been defined by both accounts. + +#### Usage + +```php +$client->networkPeering->getNetworkPeering( + 'peering_uuid', +); +``` + +#### Parameters + +**$peeringUuid:** `string` β€” The network peering identifier. + +
+ +
+$client->networkPeering->deleteNetworkPeering($peeringUuid) + +#### Description + +Deletes a network peering. It is required that the peering is in `disabled` state before delete is possible. + +#### Usage + +```php +$client->networkPeering->deleteNetworkPeering( + 'peering_uuid', +); +``` + +#### Parameters + +**$peeringUuid:** `string` β€” The network peering identifier. + +
+ +
+$client->networkPeering->modifyNetworkPeering($peeringUuid, $request) -> NetworkPeering + +#### Description + +Modifies attributes of an existing network peering. + +#### Usage + +```php +$client->networkPeering->modifyNetworkPeering( + 'peering_uuid', + new NetworkPeeringModify([ + 'configuredStatus' => NetworkPeeringModifyConfiguredStatus::Disabled->value, + 'name' => 'Peering A->B modified', + ]), +); +``` + +#### Parameters + +**$peeringUuid:** `string` β€” The network peering identifier. + +**$configuredStatus:** `?string` + +**$name:** `?string` + +
+ +## network +{:#networkAnchor} + +
+$client->network->listNetworks($request) -> Networks + +#### Description + +Get a list of all networks. + +It is also possible to filter networks with label URL parameters, e.g. +`?label=env` or `?label=env%3Dprod`. URL parameter can be given multiple +times to add more filters (e.g. `?label=env%3Dprod&label=v2`), where +only networks that match all labels are returned. +Label keys are matched case insensitively. + +#### Usage + +```php +$client->network->listNetworks( + new ListNetworksRequest([]), +); +``` + +#### Parameters + +**$label:** `?NetworkLabel` β€” Filter networks by labels. + +
+ +
+$client->network->createNetwork($request) -> Network + +#### Description + +Creates a new SDN private network that cloud servers from the same zone can be attached to. + +#### Usage + +```php +$client->network->createNetwork( + new CreateNetworkRequest([ + 'network' => new CreateNetworkRequestNetwork([ + 'type' => NetworkType::Private_->value, + 'name' => 'backend-net', + 'zone' => 'fi-hel2', + 'ipNetworks' => new CreateNetworkRequestNetworkIpNetworks([ + 'ipNetwork' => [ + new CreateNetworkRequestNetworkIpNetworksIpNetworkItem([ + 'family' => NetworkIpFamily::IPv4->value, + 'address' => '10.0.0.0/24', + 'dhcp' => NetworkBooleanYesno::Yes->value, + ]), + ], + ]), + ]), + ]), +); +``` + +#### Parameters + +**$network:** `CreateNetworkRequestNetwork` + +
+ +
+$client->network->listNetworkInterfaces() -> NetworkInterfaces + +#### Description + +Retrieves a list of network interfaces. + +#### Usage + +```php +$client->network->listNetworkInterfaces(); +``` + +
+ +
+$client->network->createNetworkInterface($request) -> NetworkInterface + +#### Description + +Creates a new network interface. + +#### Usage + +```php +$client->network->createNetworkInterface( + new NetworkCreateInterfaceRequest([ + 'mainAccountId' => 123456, + 'interface' => new NetworkCreateInterfaceRequestInterface([ + 'bootable' => NetworkBooleanYesno::No->value, + 'network' => '8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a001', + 'sourceIpFiltering' => NetworkBooleanYesno::Yes->value, + 'type' => NetworkType::Private_->value, + ]), + ]), +); +``` + +#### Parameters + +**$mainAccountId:** `?int` + +**$interface_:** `?NetworkCreateInterfaceRequestInterface` + +
+ +
+$client->network->getNetworkInterfaceDetails($uuid) -> Network + +#### Description + +Retrieves details of a specific network interface. + +#### Usage + +```php +$client->network->getNetworkInterfaceDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID of the network interface. + +
+ +
+$client->network->deleteNetworkInterface($uuid) + +#### Description + +Deletes a specific network interface. + +#### Usage + +```php +$client->network->deleteNetworkInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID of the network. + +
+ +
+$client->network->getNetworkDetails($uuid) -> Network + +#### Description + +Retrieves details of a specific network. + +#### Usage + +```php +$client->network->getNetworkDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID of the network. + +
+ +
+$client->network->modifyNetwork($uuid, $request) -> Network + +#### Description + +Modifies the details of a specific SDN private network. The Utility and public networks cannot be modified. + +#### Usage + +```php +$client->network->modifyNetwork( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyNetworkRequest([ + 'network' => new ModifyNetworkRequestNetwork([ + 'type' => NetworkType::Public_->value, + 'name' => 'name', + 'zone' => 'fi-hel1', + 'tags' => new NetworkTags([ + 'tags' => new NetworkTagsTags([ + 'tag' => [ + new NetworkTagsTagsTagItem([ + 'description' => 'Production servers', + 'name' => 'PROD', + 'servers' => new NetworkServers([ + 'server' => [ + '0077fa3d-32db-4b09-9f5f-30d9e9afb565', + ], + ]), + ]), + ], + ]), + ]), + 'labels' => new NetworkLabels([ + 'label' => [ + new NetworkLabel([ + 'key' => 'env', + 'value' => 'prod', + ]), + new NetworkLabel([ + 'key' => 'team', + 'value' => 'network', + ]), + ], + ]), + 'router' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'grtExport' => 1000000, + 'parentNetwork' => 'parent_network', + 'ipNetworks' => new ModifyNetworkRequestNetworkIpNetworks([ + 'ipNetwork' => [ + new ModifyNetworkRequestNetworkIpNetworksIpNetworkItem([ + 'family' => NetworkIpFamily::IPv4->value, + 'address' => 'address', + ]), + ], + ]), + 'networkFeatures' => NetworkFeatures::AllowLinklocalAddress->value, + 'mainAccountId' => 1000000, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID of the network. + +**$network:** `ModifyNetworkRequestNetwork` + +
+ +
+$client->network->deleteNetwork($uuid) + +#### Description + +Deletes an SDN private network. All attached cloud servers must first be detached before SDN private networks can be deleted. Utility and public networks can only be detached from servers by [Releasing the corresponding IP addresses](https://upcloudltd.github.io/upcloud-openapi-spec/api/ip-address#delete-ip-address). + +#### Usage + +```php +$client->network->deleteNetwork( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID of the network. + +
+ +## audit-logs +{:#audit-logsAnchor} + +
+$client->auditLogs->listAuditLogs($request) -> AuditLogsResponse + +#### Description + +Returns a list of audit log rows according to the query parameters. Note that this endpoint is paginated by default and the list is limited in results. + +Pagination +Upcloud-Total-Count header is included in the response to indicate the total number of audit logs available with the current query parameters (excluding limit and offset). The total count can be used for a number of pagination strategies. limit and offset query parameters can be used to finally paginate the results. + +#### Usage + +```php +$client->auditLogs->listAuditLogs( + new ListAuditLogsRequest([ + 'q' => 'my_account', + 'limit' => 50, + 'offset' => 0, + 'createdAfter' => new DateTime('2024-01-01T00:00:00Z'), + 'createdBefore' => new DateTime('2024-12-31T23:59:59Z'), + ]), +); +``` + +#### Parameters + +**$q:** `?string` β€” Filter audit logs using a keyword such as account username, resource ID or IP address. + +**$limit:** `?int` β€” Number of results to return (max 100, default 50) + +**$offset:** `?int` β€” Offset for retrieved results. (default 0) + +**$actions:** `?string` β€” List of actions to filter by + +**$origins:** `?string` β€” List of origins to filter by + +**$resourceTypes:** `?string` β€” List of resource types to filter by + +**$createdAfter:** `?DateTime` β€” List audit logs created after the given timestamp (including the time of timestamp). Format: ISO timestamp eg. 2024-01-01T23:45:56Z + +**$createdBefore:** `?DateTime` β€” List audit logs created before the given timestamp (including the time of timestamp). Format: ISO timestamp eg. 2024-01-01T23:45:56Z + +
+ +
+$client->auditLogs->exportAuditLogs($request) -> AuditLogsResponse + +#### Description + +Export all audit logs for the authenticated account as CSV or JSON (up to 180 day limit). Note: Use the format parameter to specify output format; only JSON schema is documented here. + +#### Usage + +```php +$client->auditLogs->exportAuditLogs( + new ExportAuditLogsRequest([]), +); +``` + +#### Parameters + +**$format:** `?string` β€” Export format: 'csv' or 'json' (default: csv) + +
+ +
+$client->auditLogs->getAuditLog($cloudEventId) -> AuditLogsAuditLog + +#### Description + +Returns details of a single audit log event by its cloud event ID. + +#### Usage + +```php +$client->auditLogs->getAuditLog( + '01HQXYZ123456789ABCDEFGHJK', +); +``` + +#### Parameters + +**$cloudEventId:** `string` β€” Cloud event ID (ULID format) + +
+ +
+$client->auditLogs->getFilterOptions() -> AuditLogsFilterOptionsResponse + +#### Description + +Returns lists of available resource types, actions, and origins for filtering. + +#### Usage + +```php +$client->auditLogs->getFilterOptions(); +``` + +
+ +## partner +{:#partnerAnchor} + +
+$client->partner->listPartnerAccounts() -> array + +#### Description + +Returns list of accounts associated with the partner. + +#### Usage + +```php +$client->partner->listPartnerAccounts(); +``` + +
+ +
+$client->partner->createPartnerAccount($request) -> PartnerAccount + +#### Description + +Creates new UpCloud account that will be linked to partner's existing invoicing. + +#### Usage + +```php +$client->partner->createPartnerAccount( + new PartnerCreateAccount([ + 'username' => 'newuser', + 'password' => 'superSecret123', + ]), +); +``` + +#### Parameters + +**$username:** `string` + +**$password:** `string` + +**$contactDetails:** `?PartnerCreateAccountContactDetails` + +
+ +## permission +{:#permissionAnchor} + +
+$client->permission->listPermissions() -> Permissions + +#### Description + +Retrieves a list of permissions for sub-accounts to access resources owned by the main account. + +#### Usage + +```php +$client->permission->listPermissions(); +``` + +
+ +
+$client->permission->replacePermissions($request) -> Permissions + +#### Description + +Replaces the entire set of permissions for sub-accounts to access resources owned by the main account. + +#### Usage + +```php +$client->permission->replacePermissions( + new Permission([]), +); +``` + +#### Parameters + +**$request:** `Permission` + +
+ +
+$client->permission->grantPermission($request) -> Permission + +#### Description + +Grants a permission for a sub-account to access a resource owned by the main account. + +#### Usage + +```php +$client->permission->grantPermission( + new GrantPermissionRequest([ + 'body' => new Permission([]), + ]), +); +``` + +#### Parameters + +**$skipTargetCheck:** `?bool` β€” If true, skips the check whether the target resource exists. Default is false. + +**$request:** `Permission` + +
+ +
+$client->permission->revokePermission($request) + +#### Description + +Revokes a permission for a sub-account to access a resource owned by the main account. + +#### Usage + +```php +$client->permission->revokePermission( + new Permission([]), +); +``` + +#### Parameters + +**$request:** `Permission` + +
+ +
+$client->permission->revokeAllPermissionsByTarget($targetType, $targetIdentifier, $request) + +#### Description + +Revokes all permissions for sub-accounts to access a specific resource owned by the main account. + +#### Usage + +```php +$client->permission->revokeAllPermissionsByTarget( + 'target_type', + 'target_identifier', + new RevokeAllPermissionsByTargetRequest([]), +); +``` + +#### Parameters + +**$targetType:** `string` β€” The type of the target resource (e.g., "server", "storage"). + +**$targetIdentifier:** `string` β€” The identifier of the target resource. + +**$mainAccountId:** `?int` β€” If specified, revokes permissions for resources owned by the specified main account ID. Default is the current main account. + +
+ +
+$client->permission->revokeAllPermissionsByUser($user) + +#### Description + +Revokes all permissions for a specific sub-account to access any resources owned by the main account. + +#### Usage + +```php +$client->permission->revokeAllPermissionsByUser( + 'user', +); +``` + +#### Parameters + +**$user:** `string` β€” The username of the sub-account. + +
+ +## plan +{:#planAnchor} + +
+$client->plan->listPlans() -> Plan + +#### Description + +Returns a list of available plans. All plans are available in all zones but pricing may differ. See _List prices_ for how to obtain current price list. + +In addition to listed plans, server can be freely configured with "custom" plan which allows freely scalable CPU cores, memory amount and storage resources. __Note!__ Custom plans are available for new customers through contact with sales. + +#### Usage + +```php +$client->plan->listPlans(); +``` + +
+ +## price +{:#priceAnchor} + +
+$client->price->getPrice($request) -> Prices + +#### Description + +Returns a price list. + +#### Usage + +```php +$client->price->getPrice( + new GetPriceRequest([]), +); +``` + +#### Parameters + +**$zone:** `?string` β€” Filter results to a specific zone. Can be specified multiple times. + +
+ +## router +{:#routerAnchor} + +
+$client->router->listRouters($request) -> Routers + +#### Description + +Returns a list of all available routers associated with the current account. + +It is also possible to filter routers with label URL parameters, e.g. +`?label=env` or `?label=env%3Dprod`. URL parameter can be given multiple +times to add more filters (e.g. `?label=env%3Dprod&label=v2`), where +only routers that match all labels are returned. +Label keys are matched case insensitively. + +#### Usage + +```php +$client->router->listRouters( + new ListRoutersRequest([]), +); +``` + +#### Parameters + +**$label:** `?RouterLabel` β€” A label filter. Can be specified multiple times to create an AND condition. Format: label=key:value + +
+ +
+$client->router->createRouter($request) -> Router + +#### Description + +Creates a new router. +Routers can be used to connect multiple Private Networks. Cloud Servers on any attached network can communicate +directly with each other. + +#### Usage + +```php +$client->router->createRouter( + new RouterCreate([ + 'router' => new RouterCreateRouter([ + 'name' => 'Example router', + 'staticRoutes' => [ + new RouterCreateRouterStaticRoutesItem([ + 'name' => 'static-route-0', + 'nexthop' => '192.168.1.1', + 'route' => '0.0.0.0/0', + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$router:** `RouterCreateRouter` + +
+ +
+$client->router->getRouter($router) -> Router + +#### Description + +Retrieves details of a specific router. + +#### Usage + +```php +$client->router->getRouter( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$router:** `string` β€” The router identifier. + +
+ +
+$client->router->deleteRouter($router) + +#### Description + +Deletes a specific router. + +#### Usage + +```php +$client->router->deleteRouter( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$router:** `string` β€” The router identifier. + +
+ +
+$client->router->modifyRouter($router, $request) -> Router + +#### Description + +Modifies attributes of a specific router. +Modifications to static routes of type `service` will be ignored. + +#### Usage + +```php +$client->router->modifyRouter( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new RouterModify([ + 'routerModifyRouter' => new RouterModifyRouter([ + 'name' => 'Example router', + 'staticRoutes' => [ + new RouterModifyRouterStaticRoutesItem([ + 'name' => 'static-route-0', + 'nexthop' => '192.168.1.1', + 'route' => '0.0.0.0/0', + ]), + ], + 'labels' => [ + new RouterLabel([ + 'key' => 'service', + 'value' => 'postgres cluster connectivity', + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$router:** `string` β€” The router identifier. + +**$routerModifyRouter:** `RouterModifyRouter` + +
+ +## server-group +{:#server-groupAnchor} + +
+$client->serverGroup->listServerGroups($request) -> ServerGroups + +#### Description + +Retrieves a list of server groups. + +#### Usage + +```php +$client->serverGroup->listServerGroups( + new ListServerGroupsRequest([]), +); +``` + +#### Parameters + +**$label:** `?ServerGroupLabel` β€” A label filter to apply. Format: key:value. Multiple labels can be specified by repeating the parameter. + +
+ +
+$client->serverGroup->createServerGroup($request) -> ServerGroup + +#### Description + +Creates a new server group. + +#### Usage + +```php +$client->serverGroup->createServerGroup( + new ServerGroupModify([ + 'serverGroup' => new ServerGroupModifyServerGroup([ + 'title' => 'edge-cluster-a', + 'servers' => new ServerGroupServers([ + 'servers' => [ + '00fce2f9-f9f4-46ff-86af-9e60f131f5cb', + ], + ]), + 'labels' => new ServerGroupModifyServerGroupLabels([ + 'label' => [ + new ServerGroupLabel([ + 'key' => 'env', + 'value' => 'prod', + ]), + ], + ]), + 'antiAffinity' => ServerGroupAntiAffinity::Yes->value, + ]), + ]), +); +``` + +#### Parameters + +**$request:** `ServerGroupModify` + +
+ +
+$client->serverGroup->getServerGroup($uuid) -> ServerGroup + +#### Description + +Retrieves details of a specific server group. + +#### Usage + +```php +$client->serverGroup->getServerGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group to retrieve. + +
+ +
+$client->serverGroup->deleteServerGroup($uuid) + +#### Description + +Deletes a specific server group. + +#### Usage + +```php +$client->serverGroup->deleteServerGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group to delete. + +
+ +
+$client->serverGroup->modifyServerGroup($uuid, $request) -> ServerGroup + +#### Description + +Modifies an existing server group. + +#### Usage + +```php +$client->serverGroup->modifyServerGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyServerGroupRequest([ + 'body' => new ServerGroupModify([ + 'serverGroup' => new ServerGroupModifyServerGroup([ + 'title' => 'edge-cluster-a', + 'servers' => new ServerGroupServers([ + 'servers' => [ + '00fce2f9-f9f4-46ff-86af-9e60f131f5cb', + ], + ]), + 'labels' => new ServerGroupModifyServerGroupLabels([ + 'label' => [ + new ServerGroupLabel([ + 'key' => 'env', + 'value' => 'prod', + ]), + ], + ]), + 'antiAffinity' => ServerGroupAntiAffinity::Yes->value, + ]), + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group to modify. + +**$request:** `ServerGroupModify` + +
+ +
+$client->serverGroup->listServerGroupMembers($uuid) -> ServerGroupServers + +#### Description + +Retrieves a list of servers that are members of a specific server group. + +#### Usage + +```php +$client->serverGroup->listServerGroupMembers( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group whose members are to be listed. + +
+ +
+$client->serverGroup->addServerToGroup($uuid, $request) + +#### Description + +Adds a server to a specific server group. + +#### Usage + +```php +$client->serverGroup->addServerToGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerGroupServerAdd([ + 'server' => new ServerGroupServerAddServer([ + 'uuid' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group to which the server will be added. + +**$server:** `ServerGroupServerAddServer` + +
+ +
+$client->serverGroup->removeServerFromGroup($uuid, $serverUuid) + +#### Description + +Removes a server from a specific server group. + +#### Usage + +```php +$client->serverGroup->removeServerFromGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group from which the server will be removed. + +**$serverUuid:** `string` β€” The UUID of the server to remove from the group. + +
+ +## server +{:#serverAnchor} + +
+$client->server->listServers($request) -> GetServerList + +#### Description + +Returns the most relevant information for Cloud Servers associated with the current account. + +#### Usage + +```php +$client->server->listServers( + new ListServersRequest([ + 'uuid' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'host' => 7653311107, + 'tag' => 'prod,web', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair using "key" or "key=value". Repeat the parameter to require all labels. + +**$uuid:** `?string` β€” Filter by Cloud Server UUID. Repeat the parameter to match any of up to five UUIDs. + +**$host:** `?int` β€” Filter by Private Cloud host ID. Repeat the parameter to match any of up to five hosts. + +**$device:** `?string` β€” Filter by attached device using "type=gpu" or "type!=gpu". Repeat the parameter for up to five filters. + +**$state:** `?string` β€” Filter by the current Cloud Server state. + +**$tag:** `?string` β€” Filter by tag name. Separate names with commas to match any tag or colons to require all tags. + +**$search:** `?string` β€” Search UUIDs, titles, hostnames, zones, zone descriptions, IP addresses, tags, and template names. + +**$sortBy:** `?string` β€” Field to sort by. + +**$orderBy:** `?string` β€” Sort direction. Only applied when sort_by is specified. + +**$limit:** `?int` β€” Maximum number of Cloud Servers to return. + +**$offset:** `?int` β€” Number of Cloud Servers to skip. + +
+ +
+$client->server->createServer($request) -> CreateServerResponse + +#### Description + +Creates a new Cloud Server + +#### Usage + +```php +$client->server->createServer( + new CreateServer([ + 'server' => new CreateServerServer([ + 'hostname' => 'my-server.example.com', + 'loginUser' => new ServerLoginUser([ + 'sshKeys' => new ServerLoginUserSshKeys([ + 'sshKey' => [ + 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO3t5AQcuv4+KxJ5rC75N8bW/e7eOq0k5Y2L7V1oH3Z5 user@example.com', + ], + ]), + 'username' => 'upclouduser', + ]), + 'networking' => new ServerCreateNetworking([ + 'interfaces' => new ServerCreateNetworkingInterfaces([ + 'interface' => [ + new ServerCreateNetworkingInterfacesInterfaceItem([ + 'ipAddresses' => new ServerCreateNetworkingInterfacesInterfaceItemIpAddresses([ + 'ipAddress' => [ + new ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem([ + 'family' => ServerIpFamily::IPv4->value, + ]), + ], + ]), + 'type' => ServerNetworkType::Public_->value, + ]), + new ServerCreateNetworkingInterfacesInterfaceItem([ + 'ipAddresses' => new ServerCreateNetworkingInterfacesInterfaceItemIpAddresses([ + 'ipAddress' => [ + new ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem([ + 'family' => ServerIpFamily::IPv4->value, + ]), + ], + ]), + 'type' => ServerNetworkType::Utility->value, + ]), + new ServerCreateNetworkingInterfacesInterfaceItem([ + 'ipAddresses' => new ServerCreateNetworkingInterfacesInterfaceItemIpAddresses([ + 'ipAddress' => [ + new ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem([ + 'family' => ServerIpFamily::IPv4->value, + ]), + ], + ]), + 'network' => '03000000-0000-4000-8000-000000000000', + 'type' => ServerNetworkType::Private_->value, + ]), + ], + ]), + ]), + 'plan' => '1xCPU-1GB', + 'metadata' => ServerBooleanYesno::Yes->value, + 'storageDevices' => new ServerStorageDevices([ + 'storageDevice' => [ + new ServerStorageDevicesStorageDeviceItem([ + 'action' => ServerStorageDevicesStorageDeviceItemAction::Clone_->value, + 'size' => 30, + 'storage' => '01000000-0000-4000-8000-000020080100', + 'tier' => 'maxiops', + 'title' => 'Debian Trixie', + ]), + ], + ]), + 'title' => 'My Server', + 'zone' => 'fi-hel1', + ]), + ]), +); +``` + +#### Parameters + +**$server:** `CreateServerServer` + +
+ +
+$client->server->listFirewallRulesetRelationships($rulesetUuid) -> FirewallRulesetRelatedServers + +#### Description + +Return Cloud Servers visible to the authenticated account that are related to a private firewall ruleset, including each Cloud Server's private ruleset relationships. + +#### Usage + +```php +$client->server->listFirewallRulesetRelationships( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+ +
+$client->server->getLabels() -> array + +#### Description + +Returns the unique label key-value pairs used by Cloud Servers accessible to the current account. + +#### Usage + +```php +$client->server->getLabels(); +``` + +
+ +
+$client->server->getServer($uuid) -> Server + +#### Description + +Returns detailed information about a Cloud Server. + +#### Usage + +```php +$client->server->getServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->modifyServer($uuid, $request) -> Server + +#### Description + +Modifies an existing Cloud Server configuration. + +#### Usage + +```php +$client->server->modifyServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyServer([ + 'server' => new ModifyServerServer([ + 'coreNumber' => 8, + 'memoryAmount' => 16384, + 'plan' => 'custom', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$server:** `ModifyServerServer` + +
+ +
+$client->server->deleteServer($uuid, $request) + +#### Description + +Deletes a stopped Cloud Server and releases its IP addresses. Deleting backups requires deleting the associated storage devices. + +#### Usage + +```php +$client->server->deleteServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new DeleteServerRequest([]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$storages:** `?string` β€” Whether to delete attached storage devices. + +**$backups:** `?string` β€” How to handle backups when deleting storage devices. The delete value is valid only when storages is set to a truthy value. + +
+ +
+$client->server->attachPrivateFirewallRuleset($uuid, $request) -> ServerFirewallRulesetRelationship + +#### Description + +Attach a private, stateful firewall ruleset to a Cloud Server. The latest ruleset version is selected and applied to private network interfaces. + +#### Usage + +```php +$client->server->attachPrivateFirewallRuleset( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerAttachPrivateFirewallRuleset([ + 'firewallRuleset' => new ServerAttachPrivateFirewallRulesetFirewallRuleset([ + 'firewallRulesetUuid' => '190f56d8-4b3f-4a89-9e5f-320fbc3d17c8', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$firewallRuleset:** `ServerAttachPrivateFirewallRulesetFirewallRuleset` β€” Private firewall ruleset to attach. + +
+ +
+$client->server->cancelServerOperation($uuid) + +#### Description + +Cancels an operation while the Cloud Server is in maintenance state. + +#### Usage + +```php +$client->server->cancelServerOperation( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->ejectCdrom($uuid) -> Server + +#### Description + +Eject the storage from the Cloud Server's attached CD-ROM device. + +#### Usage + +```php +$client->server->ejectCdrom( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->loadCdrom($uuid, $request) -> Server + +#### Description + +Load a storage of type normal or cdrom into the Cloud Server's attached CD-ROM device. If media is already loaded, it is ejected first. + +#### Usage + +```php +$client->server->loadCdrom( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerLoadCdrom([ + 'storageDevice' => new ServerLoadCdromStorageDevice([ + 'storage' => '01000000-0000-4000-8000-000060010101', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$storageDevice:** `ServerLoadCdromStorageDevice` β€” Storage to load into the attached CD-ROM device. + +
+ +
+$client->server->detachPrivateFirewallRuleset($uuid, $request) -> ServerFirewallRulesetRelationship + +#### Description + +Detach a private firewall ruleset from a Cloud Server and reapply private-interface firewall rules. + +#### Usage + +```php +$client->server->detachPrivateFirewallRuleset( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerDetachPrivateFirewallRuleset([ + 'firewallRuleset' => new ServerDetachPrivateFirewallRulesetFirewallRuleset([ + 'firewallRulesetUuid' => '190f56d8-4b3f-4a89-9e5f-320fbc3d17c8', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$firewallRuleset:** `ServerDetachPrivateFirewallRulesetFirewallRuleset` β€” Private firewall ruleset to detach. + +
+ +
+$client->server->listFirewallRules($uuid) -> ServerFirewallRules + +#### Description + +Return the Cloud Server firewall rules in evaluation order. Changes to firewall rules can take 1-2 minutes to take effect. + +#### Usage + +```php +$client->server->listFirewallRules( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->createFirewallRule($uuid, $request) -> ServerFirewallRule + +#### Description + +Create a firewall rule. Rules are evaluated in position order; if position is omitted, the rule is appended. Changes can take 1-2 minutes to take effect. + +#### Usage + +```php +$client->server->createFirewallRule( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerCreateFirewallRule([ + 'firewallRule' => new ServerCreateFirewallRuleFirewallRule([ + 'action' => ServerCreateFirewallRuleFirewallRuleAction::Accept->value, + 'comment' => 'Allow SSH from the office network', + 'destinationPortEnd' => '22', + 'destinationPortStart' => '22', + 'direction' => ServerCreateFirewallRuleFirewallRuleDirection::In->value, + 'family' => ServerCreateFirewallRuleFirewallRuleFamily::IPv4->value, + 'position' => '1', + 'protocol' => ServerCreateFirewallRuleFirewallRuleProtocol::Tcp->value, + 'sourceAddressEnd' => '192.0.2.255', + 'sourceAddressStart' => '192.0.2.1', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$firewallRule:** `ServerCreateFirewallRuleFirewallRule` + +
+ +
+$client->server->updateFirewallRules($uuid, $request) + +#### Description + +Replace the Cloud Server's complete firewall rule chain. Array order determines rule positions. Changes can take 1-2 minutes to take effect. + +#### Usage + +```php +$client->server->updateFirewallRules( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerUpdateFirewallRules([ + 'firewallRules' => new ServerUpdateFirewallRulesFirewallRules([ + 'firewallRule' => [ + new ServerFirewallRuleItem([ + 'action' => ServerFirewallRuleItemAction::Accept->value, + 'comment' => 'Allow SSH', + 'destinationPortEnd' => '22', + 'destinationPortStart' => '22', + 'direction' => ServerFirewallRuleItemDirection::In->value, + 'family' => ServerFirewallRuleItemFamily::IPv4->value, + 'protocol' => ServerFirewallRuleItemProtocol::Tcp->value, + ]), + new ServerFirewallRuleItem([ + 'action' => ServerFirewallRuleItemAction::Drop->value, + 'direction' => ServerFirewallRuleItemDirection::In->value, + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$firewallRules:** `ServerUpdateFirewallRulesFirewallRules` + +
+ +
+$client->server->getFirewallRule($uuid, $position) -> ServerFirewallRule + +#### Description + +Return the firewall rule at the specified one-based position in the Cloud Server rule chain. + +#### Usage + +```php +$client->server->getFirewallRule( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$position:** `int` β€” Firewall rule position + +
+ +
+$client->server->deleteFirewallRule($uuid, $position) + +#### Description + +Delete the firewall rule at the specified one-based position. Remaining rules are renumbered. Changes can take 1-2 minutes to take effect. + +#### Usage + +```php +$client->server->deleteFirewallRule( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$position:** `int` β€” Firewall rule position + +
+ +
+$client->server->listPrivateFirewallRulesetRelationships($uuid) -> ServerFirewallRulesetRelationships + +#### Description + +Return all private firewall ruleset relationships configured for a Cloud Server. + +#### Usage + +```php +$client->server->listPrivateFirewallRulesetRelationships( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->listServerGpUs($uuid) -> ServerGpus + +#### Description + +Returns GPUs attached to a Cloud Server. + +#### Usage + +```php +$client->server->listServerGpUs( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->getServerNetworking($uuid) -> ServerNetworkingResponse + +#### Description + +Return all network interfaces and IP addresses configured for a Cloud Server. + +#### Usage + +```php +$client->server->getServerNetworking( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->addServerInterface($uuid, $request) -> ServerInterfaceResponse + +#### Description + +Add a network interface to a stopped Cloud Server. A private interface must identify the SDN network to attach. The combined limit of network interfaces and storage devices is 24. + +#### Usage + +```php +$client->server->addServerInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerAddInterface([ + 'interface' => new ServerAddInterfaceInterface([ + 'ipAddresses' => new ServerAddInterfaceInterfaceIpAddresses([ + 'ipAddress' => [ + new ServerAddInterfaceInterfaceIpAddressesIpAddressItem([ + 'address' => '10.0.0.20', + 'dhcpProvided' => ServerBooleanYesno::Yes->value, + 'family' => ServerIpFamily::IPv4->value, + ]), + ], + ]), + 'network' => '0374ce47-4303-4490-987d-32dc96cfd79b', + 'sourceIpFiltering' => ServerBooleanYesno::Yes->value, + 'type' => ServerNetworkType::Private_->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$interface_:** `ServerAddInterfaceInterface` + +
+ +
+$client->server->modifyServerInterface($uuid, $index, $request) -> ServerInterfaceResponse + +#### Description + +Modify the IP addresses, source IP filtering, boot setting, or index of a network interface on a stopped Cloud Server. Changing the interface network or type is not supported. + +#### Usage + +```php +$client->server->modifyServerInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, + new ServerModifyInterface([ + 'interface' => new ServerModifyInterfaceInterface([ + 'bootable' => ServerBooleanYesno::Yes->value, + 'index' => 5, + 'sourceIpFiltering' => ServerBooleanYesno::No->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$index:** `int` β€” Network interface index + +**$interface_:** `ServerModifyInterfaceInterface` + +
+ +
+$client->server->deleteServerInterface($uuid, $index) + +#### Description + +Delete a network interface from a stopped Cloud Server. IP addresses attached to the interface are released according to their release policies. + +#### Usage + +```php +$client->server->deleteServerInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$index:** `int` β€” Network interface index + +
+ +
+$client->server->addServerInterfaceIpAddress($uuid, $index, $request) -> ServerIpAddressInterfaceResponse + +#### Description + +Add an IPv4 or IPv6 address to a private network interface. The interface cannot contain addresses from both families and can have at most five addresses. + +#### Usage + +```php +$client->server->addServerInterfaceIpAddress( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, + new ServerAddIpAddress([ + 'ipAddress' => new ServerAddIpAddressIpAddress([ + 'address' => '10.0.0.30', + 'family' => ServerIpFamily::IPv4->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$index:** `int` β€” Network interface index + +**$force:** `?string` β€” Move the address from another interface when that interface can retain its required minimum number of addresses + +**$ipAddress:** `ServerAddIpAddressIpAddress` + +
+ +
+$client->server->deleteServerInterfaceIpAddress($uuid, $index, $ip) + +#### Description + +Delete an IP address from a private network interface. At least one IP address must remain attached to the interface. + +#### Usage + +```php +$client->server->deleteServerInterfaceIpAddress( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, + 'ip', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$index:** `int` β€” Network interface index + +**$ip:** `string` β€” IP address to delete + +
+ +
+$client->server->rebuildServer($uuid, $request) -> Server + +#### Description + +Reinstalls a stopped Cloud Server from a public template. + +#### Usage + +```php +$client->server->rebuildServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerRebuild([ + 'serverRebuild' => new ServerRebuildServerRebuild([ + 'cloneSource' => '01000000-0000-4000-8000-000020050100', + 'deleteDetachedDisk' => ServerLegacyBoolean::Yes->value, + 'detachDisk' => '0169b4f8-051c-4a86-9484-f5b798249949', + 'encrypted' => ServerLegacyBoolean::Yes->value, + 'loginUser' => new ServerRebuildServerRebuildLoginUser([ + 'createPassword' => ServerLegacyBoolean::No->value, + 'sshKeys' => new ServerRebuildServerRebuildLoginUserSshKeys([ + 'sshKey' => [ + 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEexamplekey user@example', + ], + ]), + 'username' => 'debian', + ]), + 'passwordDelivery' => ServerRebuildServerRebuildPasswordDelivery::None->value, + 'storageTitle' => 'Rebuilt system disk', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$serverRebuild:** `ServerRebuildServerRebuild` + +
+ +
+$client->server->relocateServer($uuid, $request) -> Server + +#### Description + +Relocates a stopped Cloud Server to another zone in the same physical location (datacenter). + +#### Usage + +```php +$client->server->relocateServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new RelocateServer([ + 'zone' => 'fi-hel2', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$zone:** `string` + +
+ +
+$client->server->getRemoteAccessDetails($uuid) -> ServerRemoteAccessDetails + +#### Description + +Returns remote access settings and VNC connection details for a Cloud Server. + +#### Usage + +```php +$client->server->getRemoteAccessDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->restartServer($uuid, $request) -> Server + +#### Description + +Stops and starts a Cloud Server in started state. + +#### Usage + +```php +$client->server->restartServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new RestartServer([ + 'restartServer' => new RestartServerRestartServerStopType([ + 'stopType' => RestartServerRestartServerStopTypeStopType::Hard->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$restartServer:** `mixed` + +
+ +
+$client->server->startServer($uuid, $request) -> Server + +#### Description + +Starts a Cloud Server in stopped state. + +#### Usage + +```php +$client->server->startServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new StartServer([ + 'server' => new StartServerServer([ + 'host' => 8055964291, + 'startType' => StartServerServerStartType::Sync->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$server:** `StartServerServer` + +
+ +
+$client->server->getCpuStats($uuid) -> ServerCpuStats + +#### Description + +Returns CPU usage statistics for all supported periods. + +#### Usage + +```php +$client->server->getCpuStats( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->getCpuStatsByPeriod($uuid, $period) -> ServerCpuStats + +#### Description + +Returns CPU usage statistics for the selected period. + +#### Usage + +```php +$client->server->getCpuStatsByPeriod( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ServerStatsPeriod::Daily->value, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$period:** `string` β€” Statistics period. + +
+ +
+$client->server->getDiskStats($uuid, $type) -> ServerDiskStats + +#### Description + +Returns aggregate disk read and write statistics for all supported periods. + +#### Usage + +```php +$client->server->getDiskStats( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + GetDiskStatsRequestType::Bytes->value, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$type:** `string` β€” Measure disk activity as transferred bytes or I/O requests. + +
+ +
+$client->server->getDiskStatsByPeriod($uuid, $type, $period) -> ServerDiskStats + +#### Description + +Returns aggregate disk read and write statistics for the selected period. + +#### Usage + +```php +$client->server->getDiskStatsByPeriod( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + GetDiskStatsByPeriodRequestType::Bytes->value, + ServerStatsPeriod::Daily->value, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$type:** `string` β€” Measure disk activity as transferred bytes or I/O requests. + +**$period:** `string` β€” Statistics period. + +
+ +
+$client->server->getNetworkStats($uuid, $type) -> ServerNetworkStats + +#### Description + +Returns aggregate inbound and outbound network statistics for all interfaces and periods. + +#### Usage + +```php +$client->server->getNetworkStats( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ServerStatsNetworkType::Bytes->value, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$type:** `string` β€” Measure network activity as transferred bytes or packets. + +
+ +
+$client->server->getNetworkStatsByNetwork($uuid, $type, $network) -> ServerNetworkStats + +#### Description + +Returns inbound and outbound network statistics for the selected network type and all periods. + +#### Usage + +```php +$client->server->getNetworkStatsByNetwork( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ServerStatsNetworkType::Bytes->value, + ServerNetworkType::Public_->value, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$type:** `string` β€” Measure network activity as transferred bytes or packets. + +**$network:** `string` β€” Network access type to aggregate. + +
+ +
+$client->server->getNetworkStatsByNetworkAndPeriod($uuid, $type, $network, $period) -> ServerNetworkStats + +#### Description + +Returns inbound and outbound network statistics for the selected network type and period. + +#### Usage + +```php +$client->server->getNetworkStatsByNetworkAndPeriod( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ServerStatsNetworkType::Bytes->value, + ServerNetworkType::Public_->value, + ServerStatsPeriod::Daily->value, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$type:** `string` β€” Measure network activity as transferred bytes or packets. + +**$network:** `string` β€” Network access type to aggregate. + +**$period:** `string` β€” Statistics period. + +
+ +
+$client->server->stopServer($uuid, $request) -> Server + +#### Description + +Stops a Cloud Server in started state. + +#### Usage + +```php +$client->server->stopServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new StopServer([ + 'stopServer' => new StopServerStopServer([ + 'stopType' => StopServerStopServerStopType::Soft->value, + 'timeout' => '60', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$stopServer:** `StopServerStopServer` + +
+ +
+$client->server->attachStorageDevice($uuid, $request) -> Server + +#### Description + +Attach a storage resource as a disk or CD-ROM device to a Cloud Server. SCSI and virtio disks can be attached while the Cloud Server is started; IDE and CD-ROM devices require a stopped Cloud Server. An empty CD-ROM device can be attached without specifying a storage resource. + +#### Usage + +```php +$client->server->attachStorageDevice( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerAttachStorage([ + 'storageDevice' => new ServerAttachStorageStorageDevice([ + 'address' => 'virtio:0', + 'bootDisk' => 1, + 'storage' => '012580a1-32a1-466e-a323-689ca16f2d43', + 'type' => ServerAttachStorageStorageDeviceType::Disk->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$storageDevice:** `ServerAttachStorageStorageDevice` β€” Storage device to attach. + +
+ +
+$client->server->detachStorageDevice($uuid, $request) -> Server + +#### Description + +Detach a storage device identified by its device address or storage resource UUID. IDE and CD-ROM devices cannot be detached while the Cloud Server is started. + +#### Usage + +```php +$client->server->detachStorageDevice( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerDetachStorage([ + 'storageDevice' => [ + 'address' => "virtio:0", + ], + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$storageDevice:** `mixed` + +
+ +
+$client->server->getVncDetails($uuid) -> ServerRemoteAccessDetails + +#### Description + +Returns VNC connection details and remote access settings for a Cloud Server. + +#### Usage + +```php +$client->server->getVncDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +## server_size +{:#server_sizeAnchor} + +
+$client->serverSize->listServerSizes() -> ServerSizes + +#### Description + +Retrieves a list of available server sizes (combinations of memory and CPU cores). + +#### Usage + +```php +$client->serverSize->listServerSizes(); +``` + +
+ +
+$client->serverSize->getServerSizeLimits() -> ServerSizeLimits + +#### Description + +Retrieves the minimum and maximum limits for server sizes, including any zone-specific limits for private zones. + +#### Usage + +```php +$client->serverSize->getServerSizeLimits(); +``` + +
+ +## storage +{:#storageAnchor} + +
+$client->storage->getStorageList($request) -> Storages + +#### Description + +Returns all storage resources accessible to the account. The results can be filtered by labels or a title and UUID search, sorted, and paginated. + +#### Usage + +```php +$client->storage->getStorageList( + new GetStorageListRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +**$sortBy:** `?string` β€” Field by which to sort the results. + +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +**$limit:** `?int` β€” Maximum number of storage resources to return. + +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+ +
+$client->storage->createStorage($request) -> CreateStorageResponse + +#### Description + +Creates a block storage resource in a specific zone. The new block storage is not attached to a Cloud Server. + +#### Usage + +```php +$client->storage->createStorage( + new CreateStorageRequest([ + 'storage' => new CreateStorageRequestStorage([ + 'backupRule' => new StorageBackupRule([ + 'interval' => StorageBackupRuleInterval::Daily->value, + 'time' => '0400', + 'retention' => '7', + ]), + 'encrypted' => StorageEncrypted::Yes->value, + 'labels' => [ + new StorageLabel([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + 'size' => 50, + 'tier' => StorageTier::Maxiops->value, + 'title' => 'Block Storage 1', + 'zone' => 'fi-hel1', + ]), + ]), +); +``` + +#### Parameters + +**$storage:** `CreateStorageRequestStorage` β€” Block storage creation parameters. + +
+ +
+$client->storage->getStorageListByBackup($request) -> Storages + +#### Description + +Returns accessible storage resources whose type is `backup`. + +#### Usage + +```php +$client->storage->getStorageListByBackup( + new GetStorageListByBackupRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +**$sortBy:** `?string` β€” Field by which to sort the results. + +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +**$limit:** `?int` β€” Maximum number of storage resources to return. + +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+ +
+$client->storage->getStorageListByCdrom($request) -> Storages + +#### Description + +Returns accessible storage resources whose type is `cdrom`. + +#### Usage + +```php +$client->storage->getStorageListByCdrom( + new GetStorageListByCdromRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +**$sortBy:** `?string` β€” Field by which to sort the results. + +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +**$limit:** `?int` β€” Maximum number of storage resources to return. + +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+ +
+$client->storage->getFavoriteStorageList() -> Storages + +#### Description + +Returns the public templates and CD-ROM images that the account has marked as favorites. + +#### Usage + +```php +$client->storage->getFavoriteStorageList(); +``` + +
+ +
+$client->storage->getStorageListByNormal($request) -> Storages + +#### Description + +Returns accessible Block Storage resources whose type is `normal`. + +#### Usage + +```php +$client->storage->getStorageListByNormal( + new GetStorageListByNormalRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +**$sortBy:** `?string` β€” Field by which to sort the results. + +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +**$limit:** `?int` β€” Maximum number of storage resources to return. + +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+ +
+$client->storage->getStorageListByPrivateAccess($request) -> Storages + +#### Description + +Returns accessible storage resources whose access type is `private`. + +#### Usage + +```php +$client->storage->getStorageListByPrivateAccess( + new GetStorageListByPrivateAccessRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +**$sortBy:** `?string` β€” Field by which to sort the results. + +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +**$limit:** `?int` β€” Maximum number of storage resources to return. + +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+ +
+$client->storage->getStorageListByPublicAccess($request) -> Storages + +#### Description + +Returns accessible storage resources whose access type is `public`. + +#### Usage + +```php +$client->storage->getStorageListByPublicAccess( + new GetStorageListByPublicAccessRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +**$sortBy:** `?string` β€” Field by which to sort the results. + +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +**$limit:** `?int` β€” Maximum number of storage resources to return. + +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+ +
+$client->storage->getStorageListByTemplate($request) -> Storages + +#### Description + +Returns accessible storage resources whose type is `template`. + +#### Usage + +```php +$client->storage->getStorageListByTemplate( + new GetStorageListByTemplateRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +**$sortBy:** `?string` β€” Field by which to sort the results. + +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +**$limit:** `?int` β€” Maximum number of storage resources to return. + +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+ +
+$client->storage->getStorageListByTypeAndAccess($type, $access, $request) -> Storages + +#### Description + +Returns accessible storage resources matching both the requested storage type and access type. + +#### Usage + +```php +$client->storage->getStorageListByTypeAndAccess( + StorageType::Normal->value, + StorageAccessFilter::Public_->value, + new GetStorageListByTypeAndAccessRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$type:** `string` β€” Storage resource type to return. + +**$access:** `string` β€” Storage resource access type to return. + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +**$sortBy:** `?string` β€” Field by which to sort the results. + +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +**$limit:** `?int` β€” Maximum number of storage resources to return. + +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+ +
+$client->storage->getStorageInfo($uuid) -> Storage + +#### Description + +Returns detailed information about a storage resource, including its current state, attachments, labels, and backup configuration when applicable. + +#### Usage + +```php +$client->storage->getStorageInfo( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +
+ +
+$client->storage->modifyStorage($uuid, $request) -> ModifyStorageResponse + +#### Description + +Modifies a block storage title, labels, automatic backup rule, or size. A new size must be greater than the current size. Set `filesystem_resize` to `yes` to also resize the last partition and its supported filesystem after increasing the block storage size. + +#### Usage + +```php +$client->storage->modifyStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyStorageBody([ + 'storage' => new ModifyStorageBodyStorage([ + 'size' => 100, + 'title' => 'Production data expanded', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Block storage UUID + +**$storage:** `ModifyStorageBodyStorage` β€” Block storage properties to modify. + +
+ +
+$client->storage->deleteStorage($uuid, $request) + +#### Description + +Schedules an unattached private storage resource for deletion. Associated backups are kept by default unless another backup policy is selected. + +#### Usage + +```php +$client->storage->deleteStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new DeleteStorageRequest([]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +**$backups:** `?string` β€” Policy for handling backups when deleting a storage resource. Defaults to `keep`. Allowed values: keep, delete, keep_latest + +
+ +
+$client->storage->attachStorageToServer($uuid, $request) -> AttachStorageResponse + +#### Description + +Attaches the storage resource to a Cloud Server in the same zone. The device defaults to a disk at the next available address. IDE and CD-ROM devices can be attached only while the Cloud Server is stopped; SCSI and VirtIO disks can also be attached while it is running. + +#### Usage + +```php +$client->storage->attachStorageToServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new AttachStorageRequest([ + 'storageDevice' => new AttachStorageRequestStorageDevice([ + 'server' => '00798b85-efdc-41ca-8021-f6ef457b8531', + 'type' => AttachStorageRequestStorageDeviceType::Disk->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +**$storageDevice:** `AttachStorageRequestStorageDevice` β€” Parameters for attaching this storage resource to a Cloud Server in the same zone. + +
+ +
+$client->storage->createOnDemandBackup($uuid, $request) -> CreateStorageBackupResponse + +#### Description + +Creates a point-in-time backup of private normal block storage. The operation is asynchronous: the source block storage is `backuping` while the backup is created, and the returned backup remains in `maintenance` until it is ready. + +#### Usage + +```php +$client->storage->createOnDemandBackup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CreateStorageBackupRequest([ + 'storage' => new CreateStorageBackupRequestStorage([ + 'title' => 'Manually created backup', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Block storage UUID + +**$storage:** `CreateStorageBackupRequestStorage` β€” Parameters for the point-in-time backup. + +
+ +
+$client->storage->cancelStorageOperation($uuid) + +#### Description + +Requests cancellation of an interruptible operation on block storage in the `maintenance` state. For a running clone, cancellation removes the incomplete copy and returns the source block storage to the `online` state. + +#### Usage + +```php +$client->storage->cancelStorageOperation( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Block storage UUID + +
+ +
+$client->storage->cloneStorage($uuid, $request) -> CreateStorageResponse + +#### Description + +Creates a Block Storage copy of a storage resource. Cloning is asynchronous: the returned block storage remains in the `maintenance` state until the operation completes and can be monitored with the storage resource details endpoint. + +#### Usage + +```php +$client->storage->cloneStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CloneStorageRequest([ + 'storage' => new CloneStorageRequestStorage([ + 'encrypted' => StorageEncrypted::Yes->value, + 'tier' => StorageTier::Maxiops->value, + 'title' => 'Cloned Block Storage', + 'zone' => 'fi-hel1', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +**$storage:** `CloneStorageRequestStorage` β€” Parameters for the cloned block storage. + +
+ +
+$client->storage->detachStorageFromServer($uuid) -> DetachStorageResponse + +#### Description + +Detaches the storage resource from its attached Cloud Server. IDE and CD-ROM devices can be detached only while the Cloud Server is stopped; SCSI and VirtIO disks can also be detached while it is running. If the storage resource is already detached, it is returned unchanged. + +#### Usage + +```php +$client->storage->detachStorageFromServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +
+ +
+$client->storage->addStorageToFavorites($uuid) + +#### Description + +Adds an accessible storage resource to the account's favorites. The operation succeeds if the storage resource is already a favorite. + +#### Usage + +```php +$client->storage->addStorageToFavorites( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +
+ +
+$client->storage->removeStorageFromFavorites($uuid) + +#### Description + +Removes an accessible storage resource from the account's favorites. The operation succeeds if the storage resource is not a favorite. + +#### Usage + +```php +$client->storage->removeStorageFromFavorites( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +
+ +
+$client->storage->getStorageImportDetails($uuid) -> StorageImportResponse + +#### Description + +Returns details of the latest import task for a storage resource, including its state, transferred byte counts, checksums, and any error information. + +#### Usage + +```php +$client->storage->getStorageImportDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +
+ +
+$client->storage->createStorageImport($uuid, $request) -> StorageImportResponse + +#### Description + +Creates an asynchronous task that imports a raw disk image into existing Block Storage from an HTTP URL or a temporary direct-upload URL. Attached Cloud Servers must be stopped. + +#### Usage + +```php +$client->storage->createStorageImport( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CreateStorageImportRequest([ + 'storageImport' => new CreateStorageImportRequestStorageImport([ + 'source' => CreateStorageImportRequestStorageImportSource::HttpImport->value, + 'sourceLocation' => 'https://example.com/disk.raw', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +**$storageImport:** `CreateStorageImportRequestStorageImport` β€” Storage import parameters. + +
+ +
+$client->storage->cancelStorageImport($uuid) -> StorageImportResponse + +#### Description + +Requests cancellation of an ongoing storage import. The task enters the `cancelling` state while imported data is rolled back when necessary. + +#### Usage + +```php +$client->storage->cancelStorageImport( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +
+ +
+$client->storage->resizeStorage($uuid) -> ResizeStorageResponse + +#### Description + +Resizes the last partition and its supported filesystem to use the block storage capacity already available. A backup is created before the operation and returned on success. Increase the block storage capacity first with the modify block storage endpoint. + +#### Usage + +```php +$client->storage->resizeStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Block storage UUID + +
+ +
+$client->storage->restoreStorageFromBackup($uuid) + +#### Description + +Starts restoring the backup identified by `uuid` to its origin block storage. If the origin block storage is attached to a Cloud Server, the Cloud Server must be stopped. + +#### Usage + +```php +$client->storage->restoreStorageFromBackup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Backup UUID + +
+ +
+$client->storage->createTemplateFromStorage($uuid, $request) -> CreateStorageTemplateResponse + +#### Description + +Creates a private template from private normal block storage. The operation is asynchronous: the returned template remains in `maintenance` until it is ready. Deployments from the template use the source block storage tier. + +#### Usage + +```php +$client->storage->createTemplateFromStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CreateStorageTemplateRequest([ + 'storage' => new CreateStorageTemplateRequestStorage([ + 'title' => 'My server template', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Block storage UUID + +**$storage:** `CreateStorageTemplateRequestStorage` β€” Parameters for creating a template from the block storage. + +
+ +## tag +{:#tagAnchor} + +
+$client->tag->listTags() -> Tags + +#### Description + +Returns all existing tags with their properties and servers tagged. + +#### Usage + +```php +$client->tag->listTags(); +``` + +
+ +
+$client->tag->createTag($request) -> Tag + +#### Description + +Creates a new tag. Existing servers can be tagged in same request. + +#### Usage + +```php +$client->tag->createTag( + new Tag([ + 'tag' => new TagTag([ + 'description' => 'Production servers', + 'name' => 'PROD', + 'servers' => new TagServers([ + 'server' => [ + '0077fa3d-32db-4b09-9f5f-30d9e9afb565', + ], + ]), + ]), + ]), +); +``` + +#### Parameters + +**$request:** `Tag` + +
+ +
+$client->tag->getTag($name) -> Tag + +#### Description + +Returns details for a specific tag. + +#### Usage + +```php +$client->tag->getTag( + 'DEV', +); +``` + +#### Parameters + +**$name:** `string` β€” Tag name + +
+ +
+$client->tag->modifyTag($name, $request) -> Tag + +#### Description + +Changes attributes of an existing tag + +#### Usage + +```php +$client->tag->modifyTag( + 'DEV', + new ModifyTagRequest([ + 'body' => new Tag([ + 'tag' => new TagTag([ + 'description' => 'Production servers', + 'name' => 'PROD', + 'servers' => new TagServers([ + 'server' => [ + '0077fa3d-32db-4b09-9f5f-30d9e9afb565', + ], + ]), + ]), + ]), + ]), +); +``` + +#### Parameters + +**$name:** `string` β€” Tag name + +**$request:** `Tag` + +
+ +
+$client->tag->deleteTag($name) + +#### Description + +Deletes a specific tag. + +#### Usage + +```php +$client->tag->deleteTag( + 'DEV', +); +``` + +#### Parameters + +**$name:** `string` β€” Tag name + +
+ +## timezone +{:#timezoneAnchor} + +
+$client->timezone->listTimezones() -> Timezones + +#### Description + +Retrieves a list of supported timezones. + +#### Usage + +```php +$client->timezone->listTimezones(); +``` + +
+ +## account-tokens +{:#account-tokensAnchor} + +
+$client->accountTokens->listTokens($request) -> array + +#### Description + +List all tokens for the currently authorized account. +The tokens are returned in a paged format, with the default page size being 20. +The maximum page size is 100. + +#### Usage + +```php +$client->accountTokens->listTokens( + new ListTokensRequest([ + 'gui' => true, + 'sort' => '+name,-created_at', + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” How many tokens to return at per page + +**$offset:** `?int` β€” Offset to start listing the tokens from + +**$gui:** `?bool` β€” Filter tokens based on GUI flag (true or false). Default is no value, i.e. no filtering and all tokens are returned. + +**$sort:** `?string` β€” Comma-separated list of fields to sort by. Prefix with '+' for ascending or '-' for descending order. Supported fields: created_at, expires_at, last_used_at, name. Example: sort=+name,-created_at. If no prefix is given, descending is assumed. Follows OpenAPI collectionFormat 'csv'. + +
+ +
+$client->accountTokens->createToken($request) -> AccountTokensToken + +#### Description + +Create a new API token. Maximum token validity is 24*365h=8760h (~1 year). +Attribute allowed_ip_prefixes allows defining a list of CIDR/IP addresses from where the token is accepted. +Empty list denies access from everywhere. If unset, the default list will be the IP filters of the account. If no IP filters are defined for the account either, the default will be ["0.0.0.0/0", "::0/0"], i.e. allow from any address. + +#### Usage + +```php +$client->accountTokens->createToken( + new AccountTokensCreateTokenRequestExpiresIn([]), +); +``` + +#### Parameters + +**$request:** `AccountTokensCreateTokenRequestExpiresIn|AccountTokensCreateTokenRequestExpiresAt` + +
+ +
+$client->accountTokens->getToken($tokenUuid) -> AccountTokensGetTokenResponse + +#### Description + +Get the details of a specific API token. + +#### Usage + +```php +$client->accountTokens->getToken( + 'token-uuid', +); +``` + +#### Parameters + +**$tokenUuid:** `string` β€” The uuid of the token to get + +
+ +
+$client->accountTokens->revokeToken($tokenUuid) + +#### Description + +Revoke a specific API token. + +#### Usage + +```php +$client->accountTokens->revokeToken( + 'token-uuid', +); +``` + +#### Parameters + +**$tokenUuid:** `string` β€” The uuid of the token to delete + +
+ +## object-storage-2 +{:#object-storage-2Anchor} + +
+$client->objectStorage2->listObjectStorages($request) -> array + +#### Description + +Returns a list of object storage services. + +#### Usage + +```php +$client->objectStorage2->listObjectStorages( + new ListObjectStoragesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->objectStorage2->createObjectStorage($request) -> ObjectStorage2ServiceDetailResponse + +#### Description + +Creates a new object storage service. + +#### Usage + +```php +$client->objectStorage2->createObjectStorage( + new ObjectStorage2ServiceCreate([ + 'name' => 'example-service', + 'region' => 'example', + 'configuredStatus' => ObjectStorage2PropertyConfiguredStatus::Started->value, + 'networks' => [ + new ObjectStorage2NetworkCreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2NetworkType::Public_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + new ObjectStorage2NetworkCreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2NetworkType::Private_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ], + ]), +); +``` + +#### Parameters + +**$name:** `string` + +**$region:** `string` + +**$configuredStatus:** `string` + +**$networks:** `?array` β€” Networks to attach to the service. Private networks must reside in the same region as the object storage. + +**$customDomains:** `?array` β€” Custom domains to attach to the service. + +**$labels:** `?array` β€” Labels for classifying the service. + +**$properties:** `?ObjectStorage2PropertiesCreate` + +**$terminationProtection:** `?bool` β€” Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first. + +
+ +
+$client->objectStorage2->getObjectStorage($serviceUuid) -> ObjectStorage2ServiceDetailResponse + +#### Description + +Returns object storage service details by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->replaceObjectStorage($serviceUuid, $request) -> ObjectStorage2ServiceDetailResponse + +#### Description + +Replaces existing object storage service by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->replaceObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2ServiceReplace([ + 'name' => 'example-service', + 'configuredStatus' => ObjectStorage2PropertyConfiguredStatus::Started->value, + 'networks' => [ + new ObjectStorage2NetworkCreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2NetworkType::Public_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + new ObjectStorage2NetworkCreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2NetworkType::Private_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ], + 'labels' => [ + new ObjectStorage2LabelCreate([ + 'key' => 'example-label-key', + 'value' => 'example-label-value', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” The name of the service. + +**$configuredStatus:** `string` + +**$terminationProtection:** `?bool` β€” Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first. + +**$networks:** `?array` + +**$customDomains:** `?array` + +**$staticWebsites:** `?array` β€” Static website configurations for this service. Array replaces all existing configurations. + +**$labels:** `?array` + +**$properties:** `?ObjectStorage2PropertiesCreate` + +
+ +
+$client->objectStorage2->deleteObjectStorage($serviceUuid, $request) + +#### Description + +Deletes existing object storage service by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', + new DeleteObjectStorageRequest([ + 'force' => true, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$force:** `?bool` β€” If the parameter is provided, the deletion process starts even if the service is not empty. + +
+ +
+$client->objectStorage2->modifyObjectStorage($serviceUuid, $request) -> ObjectStorage2ServiceDetailResponse + +#### Description + +Modifies existing object storage service by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->modifyObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2ServiceModify([ + 'name' => 'example-service', + 'configuredStatus' => ObjectStorage2PropertyConfiguredStatus::Started->value, + 'networks' => [ + new ObjectStorage2NetworkCreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2NetworkType::Private_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `?string` + +**$configuredStatus:** `?string` + +**$networks:** `?array` + +**$customDomains:** `?array` + +**$staticWebsites:** `?array` β€” Static website configurations for this service. Array replaces all existing configurations. + +**$labels:** `?array` + +**$properties:** `?ObjectStorage2PropertiesCreate` + +**$terminationProtection:** `?bool` β€” Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first. + +
+ +
+$client->objectStorage2->listObjectStorageNetworks($serviceUuid) -> array + +#### Description + +Returns a list of available service networks by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageNetworks( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageNetwork($serviceUuid, $request) -> ObjectStorage2NetworkDetailResponse + +#### Description + +Creates a new service network by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateObjectStorageNetworkRequest([ + 'body' => new ObjectStorage2NetworkCreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2NetworkType::Public_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `ObjectStorage2NetworkCreate` + +
+ +
+$client->objectStorage2->getObjectStorageNetwork($serviceUuid, $networkName) -> ObjectStorage2NetworkDetailResponse + +#### Description + +Returns service network details by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +
+ +
+$client->objectStorage2->deleteObjectStorageNetwork($serviceUuid, $networkName) + +#### Description + +Deletes existing network by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +
+ +
+$client->objectStorage2->listObjectStorageCustomDomains($serviceUuid) -> array + +#### Description + +Returns a list of custom domains attached to a service by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageCustomDomains( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->attachObjectStorageCustomDomain($serviceUuid, $request) -> ObjectStorage2CustomDomainDetailResponse + +#### Description + +Attaches a new custom domain to the service identified by {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->attachObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + new AttachObjectStorageCustomDomainRequest([ + 'body' => new ObjectStorage2CustomDomainCreate([ + 'type' => ObjectStorage2CustomDomainCreateType::Public_->value, + 'domainName' => 'example.com', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `ObjectStorage2CustomDomainCreate` + +
+ +
+$client->objectStorage2->getObjectStorageCustomDomain($serviceUuid, $customDomainName) -> ObjectStorage2CustomDomainDetailResponse + +#### Description + +Returns custom domain details by given {service_uuid} and {domain_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +
+ +
+$client->objectStorage2->deleteObjectStorageCustomDomain($serviceUuid, $customDomainName) + +#### Description + +Deletes existing custom domain by given {service_uuid} and {domain_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +
+ +
+$client->objectStorage2->modifyObjectStorageCustomDomain($serviceUuid, $customDomainName, $request) -> ObjectStorage2CustomDomainDetailResponse + +#### Description + +Modifies existing custom domain by given {service_uuid} and {domain_name}. + +#### Usage + +```php +$client->objectStorage2->modifyObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', + new ObjectStorage2CustomDomainModify([ + 'type' => ObjectStorage2CustomDomainModifyType::Public_->value, + 'domainName' => 'example.com', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +**$type:** `?string` β€” Type of the custom domain. + +**$domainName:** `?string` β€” New modified custom domain. Supports both apex domains (example.com) and subdomains (objects.example.com). + +
+ +
+$client->objectStorage2->listObjectStorageRegions() -> array + +#### Description + +Returns a list of available managed object storage regions. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageRegions(); +``` + +
+ +
+$client->objectStorage2->getObjectStorageRegion($regionName) -> ObjectStorage2RegionDetailResponse + +#### Description + +Returns object storage region details by given {name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageRegion( + 'my-object-storage', +); +``` + +#### Parameters + +**$regionName:** `string` β€” The name of the region. + +
+ +
+$client->objectStorage2->getObjectStorageMetrics($serviceUuid) -> ObjectStorage2MetricsUsageResponse + +#### Description + +Returns object storage metrics by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageMetrics( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->listObjectStorageBucketMetrics($serviceUuid, $request) -> array + +#### Description + +Returns metrics for buckets within a service. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageBucketMetrics( + '01234567-89ab-cdef-0123-456789abcdef', + new ListObjectStorageBucketMetricsRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +
+ +
+$client->objectStorage2->createObjectStorageBucket($serviceUuid, $request) -> ObjectStorage2BucketDetailResponse + +#### Description + +Creates a new service bucket by the given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageBucket( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2BucketCreate([ + 'name' => 'my-bucket-1', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” Must be unique within the service, and should contain only alphanumeric, .,- and _. + +
+ +
+$client->objectStorage2->deleteObjectStorageBucket($serviceUuid, $bucketName) + +#### Description + +Deletes an existing bucket by given {service_uuid} and {bucket_name}. This API call will remove all objects from the bucket permanently and cannot be reversed. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageBucket( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$bucketName:** `string` β€” The name of the bucket. + +
+ +
+$client->objectStorage2->listObjectStorageMetricsSeries($serviceUuid, $request) -> array + +#### Description + +Returns Object Storage instance metrics series by a given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + new ListObjectStorageMetricsSeriesRequest([ + 'from' => new DateTime('2024-01-01T00:00:00Z'), + 'to' => new DateTime('2024-01-01T00:00:00Z'), + 'interval' => '1h', + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$from:** `?DateTime` β€” Beginning of the time range for which to return metrics. + +**$to:** `?DateTime` β€” End of the time range for which to return metrics. + +**$interval:** `?string` β€” Metrics aggregation interval. + +**$sort:** `?string` β€” Order of returned results. + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +
+ +
+$client->objectStorage2->listObjectStorageLabels($serviceUuid) -> array + +#### Description + +Returns a list of available service labels by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageLabel($serviceUuid, $request) -> ObjectStorage2LabelDetailResponse + +#### Description + +Creates a new label by given {service_uuid}. Labels are used for service filtering. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateObjectStorageLabelRequest([ + 'body' => new ObjectStorage2LabelCreate([ + 'key' => 'foo', + 'value' => 'bar', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `ObjectStorage2LabelCreate` + +
+ +
+$client->objectStorage2->getObjectStorageLabel($serviceUuid, $labelKey) -> ObjectStorage2LabelDetailResponse + +#### Description + +Returns label details by given {service_uuid} and {key}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->objectStorage2->deleteObjectStorageLabel($serviceUuid, $labelKey) + +#### Description + +Deletes existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->objectStorage2->modifyObjectStorageLabel($serviceUuid, $labelKey, $request) -> ObjectStorage2LabelDetailResponse + +#### Description + +Modifies existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->objectStorage2->modifyObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + new ObjectStorage2LabelModify([ + 'key' => 'foo', + 'value' => 'bar', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +**$key:** `?string` + +**$value:** `?string` + +
+ +
+$client->objectStorage2->listObjectStorageStaticWebsites($serviceUuid) + +#### Description + +Returns all static website configurations for a service along with available domains. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageStaticWebsites( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageStaticWebsite($serviceUuid, $request) -> ObjectStorage2StaticWebsiteConfig + +#### Description + +Creates a new static website hosting configuration for a domain. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateObjectStorageStaticWebsiteRequest([ + 'body' => new ObjectStorage2StaticWebsiteConfigCreate([ + 'bucketName' => 'my-website', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `ObjectStorage2StaticWebsiteConfigCreate` + +
+ +
+$client->objectStorage2->getObjectStorageStaticWebsite($serviceUuid, $customDomainName) -> ObjectStorage2StaticWebsiteConfig + +#### Description + +Returns a static website configuration for a specific domain. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +
+ +
+$client->objectStorage2->deleteObjectStorageStaticWebsite($serviceUuid, $customDomainName) + +#### Description + +Deletes a static website configuration. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +
+ +
+$client->objectStorage2->modifyObjectStorageStaticWebsite($serviceUuid, $customDomainName, $request) -> ObjectStorage2StaticWebsiteConfig + +#### Description + +Updates an existing static website configuration. + +#### Usage + +```php +$client->objectStorage2->modifyObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', + new ObjectStorage2StaticWebsiteConfigModify([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +**$bucketName:** `?string` β€” Name of the S3/ECS bucket containing the website content. Only alphanumerics, dots, hyphens, and underscores are allowed. + +**$bucketPrefix:** `?string` β€” Optional prefix/subfolder within the bucket. Only alphanumerics, slashes, dots, hyphens, and underscores are allowed. + +**$indexDocument:** `?string` β€” Default document for directories. Only alphanumerics, slashes, dots, hyphens, and underscores are allowed. + +**$spaMode:** `?bool` β€” Enable Single Page Application (SPA) mode. When enabled, all non-file routes serve the index document, allowing client-side routing to handle the URL. Essential for React, Vue, Next.js, and similar frameworks. + +**$enabled:** `?bool` β€” Whether the static website configuration should be active + +**$errorPages:** `?array` β€” Custom error page configurations for specific HTTP status codes or ranges. Replaces the entire set when provided. + +
+ +
+$client->objectStorage2->listObjectStorageDomains($serviceUuid) -> ObjectStorage2ServiceDomains + +#### Description + +Returns all domains associated with this service (public endpoint, private endpoint, custom domains) along with their static website hosting status. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageDomains( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->listObjectStorageUsers($serviceUuid) -> array + +#### Description + +Returns a list of available service users by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageUsers( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageUser($serviceUuid, $request) -> ObjectStorage2UserDetailResponse + +#### Description + +Creates a new service user by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageUser( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2UserCreate([ + 'username' => 'example_user', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user to create. + +
+ +
+$client->objectStorage2->getObjectStorageUser($serviceUuid, $username) -> ObjectStorage2UserDetailResponse + +#### Description + +Returns service user details by given {service_uuid} and {username}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->deleteObjectStorageUser($serviceUuid, $username) + +#### Description + +Deletes existing user by given {service_uuid} and {username}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->listObjectStorageAccessKeys($serviceUuid, $username) -> array + +#### Description + +Returns a list of available access keys for a user. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageAccessKeys( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->createObjectStorageAccessKey($serviceUuid, $username) -> ObjectStorage2CreateAccessKeyResponse + +#### Description + +Creates a new access key by given {service_uuid} and {username}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageAccessKey( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->getObjectStorageAccessKeyDetails($serviceUuid, $username, $accessKeyId) -> ObjectStorage2AccessKeyDetailResponse + +#### Description + +Returns access key details by given {service_uuid}, {username}, and {access-key-id}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageAccessKeyDetails( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$accessKeyId:** `string` β€” The ID of the access key. + +
+ +
+$client->objectStorage2->deleteObjectStorageAccessKey($serviceUuid, $username, $accessKeyId) + +#### Description + +Deletes existing access key by given {service_uuid}, {username}, and {access-key-id}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageAccessKey( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$accessKeyId:** `string` β€” The ID of the access key. + +
+ +
+$client->objectStorage2->modifyObjectStorageAccessKeyDetails($serviceUuid, $username, $accessKeyId, $request) -> ObjectStorage2AccessKeyDetailResponse + +#### Description + +Modifies access key details. + +#### Usage + +```php +$client->objectStorage2->modifyObjectStorageAccessKeyDetails( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', + new ObjectStorage2AccessKeyModify([ + 'status' => ObjectStorage2AccessKeyModifyStatus::Inactive->value, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$accessKeyId:** `string` β€” The ID of the access key. + +**$status:** `?string` β€” Indicates if the key is active or inactive. + +
+ +
+$client->objectStorage2->listObjectStorageAttachedUserPolicies($serviceUuid, $username) -> array + +#### Description + +Returns a list of attached user policies for a user. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageAttachedUserPolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->attachObjectStorageUserPolicy($serviceUuid, $username, $request) + +#### Description + +Attach a policy to a user. + +#### Usage + +```php +$client->objectStorage2->attachObjectStorageUserPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachObjectStorageUserPolicyRequest([ + 'body' => new ObjectStorage2PolicyAttachmentCreate([ + 'name' => 'test-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$request:** `ObjectStorage2PolicyAttachmentCreate` + +
+ +
+$client->objectStorage2->detachObjectStorageUserPolicy($serviceUuid, $username, $nestedName) + +#### Description + +Detach a policy from a user. + +#### Usage + +```php +$client->objectStorage2->detachObjectStorageUserPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$nestedName:** `string` β€” The name of the policy to detach. + +
+ +
+$client->objectStorage2->getObjectStorageUserInlinePolicy($serviceUuid, $username, $userPolicyName) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Get the user inline policy by the given {service_uuid}, {username} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$userPolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->deleteObjectStorageUserInlinePolicy($serviceUuid, $username, $userPolicyName) + +#### Description + +Deletes the user inline policy by the given {service_uuid}, {username}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$userPolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->listObjectStorageUserInlinePolicies($serviceUuid, $username) -> array + +#### Description + +Lists the user inline policies by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageUserInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->createObjectStorageUserInlinePolicy($serviceUuid, $username, $request) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Creates a user inline policy by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageUserInlinePolicyRequest([ + 'body' => new ObjectStorage2InlinePolicyCreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$request:** `ObjectStorage2InlinePolicyCreate` + +
+ +
+$client->objectStorage2->getObjectStorageUserTags($serviceUuid, $username) -> array + +#### Description + +Returns a user's tags by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageUserTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->replaceObjectStorageUserTags($serviceUuid, $username, $request) -> array + +#### Description + +Replaces a user's tags by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->replaceObjectStorageUserTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ReplaceObjectStorageUserTagsRequest([ + 'body' => [ + new ObjectStorage2TagListRequestItem([ + 'key' => 'environment', + 'value' => 'production', + ]), + new ObjectStorage2TagListRequestItem([ + 'key' => 'team', + 'value' => 'backend', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$request:** `array` + +
+ +
+$client->objectStorage2->deleteObjectStorageUserTag($serviceUuid, $username, $userTagKey) + +#### Description + +Deletes a user's tag by the given {service_uuid}, {username}, and {tag_key}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageUserTag( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$userTagKey:** `string` β€” The key of the user tag. + +
+ +
+$client->objectStorage2->createObjectStorageUserPermissionsBoundary($serviceUuid, $username, $request) -> string + +#### Description + +Creates a user's permissions boundary by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageUserPermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageUserPermissionsBoundaryRequest([ + 'body' => new ObjectStorage2PermissionsBoundaryCreate([ + 'policyName' => 'sample-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$request:** `ObjectStorage2PermissionsBoundaryCreate` + +
+ +
+$client->objectStorage2->deleteObjectStorageUserPermissionsBoundary($serviceUuid, $username) + +#### Description + +Deletes a user's permissions boundary by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageUserPermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->listObjectStoragePolicyVersions($serviceUuid, $policyName) -> array + +#### Description + +Lists policy versions given by {service_uuid}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->listObjectStoragePolicyVersions( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +
+ +
+$client->objectStorage2->createObjectStoragePolicyVersion($serviceUuid, $policyName, $request) -> ObjectStorage2PolicyVersionResponse + +#### Description + +Creates a policy version by the given {service_uuid}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->createObjectStoragePolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2PolicyVersionCreate([ + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":["*"],"Effect":"Deny","Resource":"*"}]}', + 'isDefault' => true, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +**$document:** `string` β€” A valid, URL-encoded policy document. + +**$isDefault:** `bool` β€” Set this version as the default. + +
+ +
+$client->objectStorage2->getObjectStoragePolicyVersion($serviceUuid, $policyName, $policyVersion) -> ObjectStorage2PolicyVersionResponse + +#### Description + +Get a single policy version by the given {service_uuid}, {policy_name}, and {policy_version}. + +#### Usage + +```php +$client->objectStorage2->getObjectStoragePolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'v1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +**$policyVersion:** `string` β€” The version identifier of the policy. + +
+ +
+$client->objectStorage2->deleteObjectStoragePolicyVersion($serviceUuid, $policyName, $policyVersion) + +#### Description + +Deletes a policy version by the given {service_uuid}, {policy_name}, and {policy_version}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStoragePolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'v1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +**$policyVersion:** `string` β€” The version identifier of the policy. + +
+ +
+$client->objectStorage2->getObjectStoragePolicy($serviceUuid, $policyName) -> ObjectStorage2PolicyDetailResponse + +#### Description + +Returns service policy details by given {service_uuid} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStoragePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +
+ +
+$client->objectStorage2->deleteObjectStoragePolicy($serviceUuid, $policyName) + +#### Description + +Deletes existing policy by given {service_uuid} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStoragePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +
+ +
+$client->objectStorage2->setObjectStorageDefaultPolicyVersion($serviceUuid, $policyName, $request) -> ObjectStorage2PolicyDetailResponse + +#### Description + +Sets the default version for a policy. Note: This is mapped from ModifyPolicyVersion handler. + +#### Usage + +```php +$client->objectStorage2->setObjectStorageDefaultPolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2PolicySetDefaultVersion([ + 'versionId' => 'v2', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +**$versionId:** `string` β€” The policy version ID to set as default. + +
+ +
+$client->objectStorage2->listObjectStoragePolicies($serviceUuid) -> array + +#### Description + +Returns a list of available service policies by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStoragePolicies( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStoragePolicy($serviceUuid, $request) -> ObjectStorage2PolicyDetailResponse + +#### Description + +Creates a new service policy by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->createObjectStoragePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2PolicyCreate([ + 'name' => 'example-policy', + 'description' => 'example-description', + 'document' => '%7B%22Version%22%3A%20%222012-10-17%22%2C%20%20%22Statement%22%3A%20%5B%7B%22Action%22%3A%20%5B%22iam%3AGetUser%22%5D%2C%20%22Resource%22%3A%20%22%2A%22%2C%20%22Effect%22%3A%20%22Allow%22%2C%20%22Sid%22%3A%20%22editor%22%7D%5D%7D', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” Unique name of the policy. + +**$description:** `?string` β€” The policy description. + +**$document:** `string` β€” A valid, URL-encoded policy document. + +
+ +
+$client->objectStorage2->listObjectStorageIamGroupPolicies($serviceUuid, $groupName) -> array + +#### Description + +Lists IAM policies attached to a group. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageIamGroupPolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +
+ +
+$client->objectStorage2->attachObjectStorageIamGroupPolicy($serviceUuid, $groupName, $request) + +#### Description + +Attaches a policy to a group. + +#### Usage + +```php +$client->objectStorage2->attachObjectStorageIamGroupPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachObjectStorageIamGroupPolicyRequest([ + 'body' => new ObjectStorage2PolicyAttachmentCreate([ + 'name' => 'test-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$request:** `ObjectStorage2PolicyAttachmentCreate` + +
+ +
+$client->objectStorage2->detachObjectStorageIamGroupPolicy($serviceUuid, $groupName, $policyName) + +#### Description + +Detaches a policy from a group. + +#### Usage + +```php +$client->objectStorage2->detachObjectStorageIamGroupPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$policyName:** `string` β€” The name of the policy. + +
+ +
+$client->objectStorage2->listObjectStorageGroups($serviceUuid) -> array + +#### Description + +Returns a list of available service groups by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageGroups( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageGroup($serviceUuid, $request) -> ObjectStorage2GroupResponse + +#### Description + +Creates an iam group. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageGroup( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2GroupCreate([ + 'name' => 'new-group', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” A valid string to represent the name of the IAM group. + +
+ +
+$client->objectStorage2->getObjectStorageGroup($serviceUuid, $groupName) -> ObjectStorage2GroupResponse + +#### Description + +Get a single group identified by {service_uuid}, and {group_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +
+ +
+$client->objectStorage2->deleteObjectStorageGroup($serviceUuid, $groupName) + +#### Description + +Deletes a group identified by {group_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +
+ +
+$client->objectStorage2->attachObjectStorageUserToGroup($serviceUuid, $groupName, $username) + +#### Description + +Attaches an iam user to a group identified by {group_name}, and {username}. + +#### Usage + +```php +$client->objectStorage2->attachObjectStorageUserToGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->removeObjectStorageUserFromGroup($serviceUuid, $groupName, $username) + +#### Description + +Removes an iam user from the group identified by {group_name}, and {username}. + +#### Usage + +```php +$client->objectStorage2->removeObjectStorageUserFromGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->listObjectStorageGroupInlinePolicies($serviceUuid, $groupName) -> array + +#### Description + +Lists the group inline policies by the given {service_uuid}, and {group_name}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageGroupInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +
+ +
+$client->objectStorage2->createObjectStorageGroupInlinePolicy($serviceUuid, $groupName, $request) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Creates a group inline policy by the given {service_uuid}, and {group_name}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageGroupInlinePolicyRequest([ + 'body' => new ObjectStorage2InlinePolicyCreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$request:** `ObjectStorage2InlinePolicyCreate` + +
+ +
+$client->objectStorage2->getObjectStorageGroupInlinePolicy($serviceUuid, $groupName, $groupPolicyName) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Get the group inline policy by the given {service_uuid}, {group_name} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$groupPolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->deleteObjectStorageGroupInlinePolicy($serviceUuid, $groupName, $groupPolicyName) + +#### Description + +Deletes the group inline policy by the given {service_uuid}, {group_name}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$groupPolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->listObjectStorageRoles($serviceUuid) -> array + +#### Description + +Lists the roles. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageRoles( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageRole($serviceUuid, $request) -> ObjectStorage2RoleResponse + +#### Description + +Creates a service IAM role. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2RoleCreate([ + 'name' => 'test-role', + 'assumeRolePolicyDocument' => '{"Version": "2012-10-17","Statement": [{"Action": "sts:AssumeRole","Principal": {"AWS": ["urn:ecs:iam::ns1:user/Demby"]},"Effect": "Allow","Resource": "*"}]}', + 'description' => 'A test role.', + 'maxSessionDuration' => 3600, + 'permissionsBoundary' => 'test-policy', + 'tags' => [ + new ObjectStorage2RoleTag([ + 'key' => 'department', + 'value' => 'Finance', + ]), + new ObjectStorage2RoleTag([ + 'key' => 'school', + 'value' => 'University of Helsinki', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` + +**$assumeRolePolicyDocument:** `string` β€” The policy document that grants an entity permission to assume the role. + +**$description:** `?string` β€” Description of the role. + +**$maxSessionDuration:** `?int` β€” Maximum session duration in seconds. + +**$permissionsBoundary:** `?string` β€” Policy name to set as the permissions boundary. + +**$tags:** `?array` β€” Tags to attach to the role (max 50). + +
+ +
+$client->objectStorage2->getObjectStorageRole($serviceUuid, $roleName) -> ObjectStorage2RoleResponse + +#### Description + +Get a single role identified by {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->deleteObjectStorageRole($serviceUuid, $roleName) + +#### Description + +Deletes a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->updateObjectStorageRole($serviceUuid, $roleName, $request) -> ObjectStorage2RoleResponse + +#### Description + +Updates a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->updateObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2RoleUpdate([ + 'description' => 'New description', + 'maxSessionDuration' => 3900, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$description:** `?string` β€” New description for the role. + +**$maxSessionDuration:** `?int` β€” New maximum session duration in seconds. + +
+ +
+$client->objectStorage2->listObjectStorageRoleInlinePolicies($serviceUuid, $roleName) -> array + +#### Description + +Returns a list of role inline policies by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageRoleInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->createObjectStorageRoleInlinePolicy($serviceUuid, $roleName, $request) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Creates a role inline policy by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageRoleInlinePolicyRequest([ + 'body' => new ObjectStorage2InlinePolicyCreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$request:** `ObjectStorage2InlinePolicyCreate` + +
+ +
+$client->objectStorage2->getObjectStorageRoleInlinePolicy($serviceUuid, $roleName, $rolePolicyName) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Returns a role's inline policy by the given {service_uuid}, {role_name}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$rolePolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->deleteObjectStorageRoleInlinePolicy($serviceUuid, $roleName, $rolePolicyName) + +#### Description + +Delete a role inline policy by the given {service_uuid}, {role_name} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$rolePolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->createObjectStorageRolePermissionsBoundary($serviceUuid, $roleName, $request) -> string + +#### Description + +Creates a role policy's permissions boundary by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageRolePermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageRolePermissionsBoundaryRequest([ + 'body' => new ObjectStorage2PermissionsBoundaryCreate([ + 'policyName' => 'sample-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$request:** `ObjectStorage2PermissionsBoundaryCreate` + +
+ +
+$client->objectStorage2->deleteObjectStorageRolePermissionsBoundary($serviceUuid, $roleName) + +#### Description + +Deletes a role permissions boundary by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageRolePermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->assumeObjectStorageRolePolicy($serviceUuid, $roleName, $request) -> ObjectStorage2AssumeRolePolicyResponse + +#### Description + +Assume a role policy by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->assumeObjectStorageRolePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2AssumeRolePolicyRequest([ + 'document' => '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":"backup.upcloud.com"},"Action":"sts:AssumeRole"}]}', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$document:** `string` β€” The assume role policy document that grants an entity permission to assume the role. + +
+ +
+$client->objectStorage2->listObjectStorageAttachedRolePolicies($serviceUuid, $roleName) -> array + +#### Description + +Lists all policies attached to a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageAttachedRolePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->attachObjectStoragePolicyToRole($serviceUuid, $roleName, $request) + +#### Description + +Attaches a policy to a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->attachObjectStoragePolicyToRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachObjectStoragePolicyToRoleRequest([ + 'body' => new ObjectStorage2PolicyAttachmentCreate([ + 'name' => 'test-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$request:** `ObjectStorage2PolicyAttachmentCreate` + +
+ +
+$client->objectStorage2->detachObjectStoragePolicyFromRole($serviceUuid, $roleName, $rolePolicyName) + +#### Description + +Detaches a policy from a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->detachObjectStoragePolicyFromRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$rolePolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->getObjectStorageRoleTags($serviceUuid, $roleName) -> array + +#### Description + +Returns a role's tags by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageRoleTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->replaceObjectStorageRoleTags($serviceUuid, $roleName, $request) -> array + +#### Description + +Replaces a role's tags by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->replaceObjectStorageRoleTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ReplaceObjectStorageRoleTagsRequest([ + 'body' => [ + new ObjectStorage2TagListRequestItem([ + 'key' => 'environment', + 'value' => 'production', + ]), + new ObjectStorage2TagListRequestItem([ + 'key' => 'team', + 'value' => 'backend', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$request:** `array` + +
+ +
+$client->objectStorage2->deleteObjectStorageRoleTag($serviceUuid, $roleName, $roleTagKey) + +#### Description + +Deletes a role's tag by the given {service_uuid}, {role_name}, and {tag_key}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageRoleTag( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$roleTagKey:** `string` β€” The key of the role tag. + +
+ +## file-storage +{:#file-storageAnchor} + +
+$client->fileStorage->listFileStorages($request) -> array + +#### Description + +Returns a list of File Storage services. + +#### Usage + +```php +$client->fileStorage->listFileStorages( + new ListFileStoragesRequest([]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->fileStorage->createFileStorage($request) -> FileStorageServiceDetailResponse + +#### Description + +Creates a new File Storage service. + +#### Usage + +```php +$client->fileStorage->createFileStorage( + new FileStorageServiceCreate([ + 'name' => 'test-name', + 'zone' => 'fi-hel2', + 'configuredStatus' => FileStorageConfiguredStatus::Started->value, + 'sizeGib' => 250, + 'encrypted' => false, + 'networks' => [ + new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'net', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '192.168.147.120', + ]), + ], + 'shares' => [ + new FileStorageShareCreate([ + 'name' => 'read', + 'path' => '/public', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '*', + 'permission' => FileStoragePermission::Ro->value, + ]), + ], + ]), + new FileStorageShareCreate([ + 'name' => 'write', + 'path' => '/project/data', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.147.0/24', + 'permission' => FileStoragePermission::Rw->value, + ]), + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => 'local.domain', + 'permission' => FileStoragePermission::Rw->value, + ]), + ], + ]), + ], + 'labels' => [ + new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + ]), +); +``` + +#### Parameters + +**$name:** `string` + +**$zone:** `string` β€” Indicates the zone where the service will be created. + +**$configuredStatus:** `string` + +**$sizeGib:** `int` + +**$encrypted:** `?bool` β€” Indicates whether encryption at rest is enabled for the service. + +**$networks:** `?array` + +**$shares:** `?array` + +**$labels:** `?array` β€” Labels + +
+ +
+$client->fileStorage->getFileStorage($serviceUuid) -> FileStorageServiceDetailResponse + +#### Description + +Returns managed File Storage details by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->getFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->fileStorage->replaceFileStorage($serviceUuid, $request) -> FileStorageServiceDetailResponse + +#### Description + +Replaces existing File Storage service by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->replaceFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new FileStorageServiceReplace([ + 'name' => 'test-name', + 'configuredStatus' => FileStorageConfiguredStatus::Started->value, + 'sizeGib' => 250, + 'networks' => [ + new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'net', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '192.168.147.120', + ]), + ], + 'labels' => [ + new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` + +**$configuredStatus:** `string` + +**$sizeGib:** `int` + +**$networks:** `?array` + +**$labels:** `?array` β€” Labels + +
+ +
+$client->fileStorage->deleteFileStorage($serviceUuid) + +#### Description + +Deletes existing File Storage service by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->deleteFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->fileStorage->modifyFileStorage($serviceUuid, $request) -> FileStorageServiceDetailResponse + +#### Description + +Modifies existing File Storage service by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->modifyFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new FileStorageServiceModify([ + 'name' => 'test-name', + 'configuredStatus' => FileStorageConfiguredStatus::Started->value, + 'sizeGib' => 250, + 'networks' => [ + new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'net', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '192.168.147.120', + ]), + ], + 'labels' => [ + new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `?string` + +**$configuredStatus:** `?string` + +**$sizeGib:** `?int` + +**$networks:** `?array` + +**$labels:** `?array` + +
+ +
+$client->fileStorage->listFileStorageNetworks($serviceUuid) -> array + +#### Description + +Returns a list of available service networks by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->listFileStorageNetworks( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->fileStorage->createFileStorageNetwork($serviceUuid, $request) -> FileStorageNetworkDetailResponse + +#### Description + +Creates a new service network by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->createFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new CreateFileStorageNetworkRequest([ + 'body' => new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'test-name', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '10.20.30.40', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `FileStorageNetworkCreate` + +
+ +
+$client->fileStorage->getFileStorageNetwork($serviceUuid, $networkName) -> FileStorageNetworkDetailResponse + +#### Description + +Returns service network details by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->fileStorage->getFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +
+ +
+$client->fileStorage->deleteFileStorageNetwork($serviceUuid, $networkName) + +#### Description + +Deletes existing network by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->fileStorage->deleteFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +
+ +
+$client->fileStorage->modifyFileStorageNetwork($serviceUuid, $networkName, $request) -> FileStorageNetworkDetailResponse + +#### Description + +Modifies existing service network by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->fileStorage->modifyFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + new FileStorageNetworkModify([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'test-name', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '10.20.30.40', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +**$uuid:** `?string` + +**$name:** `?string` + +**$family:** `?string` + +**$ipAddress:** `?string` + +
+ +
+$client->fileStorage->listFileStorageShares($serviceUuid) -> array + +#### Description + +Returns a list of available service shares by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->listFileStorageShares( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->fileStorage->createFileStorageShare($serviceUuid, $request) -> FileStorageShareDetailResponse + +#### Description + +Creates a new service share by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->createFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new CreateFileStorageShareRequest([ + 'body' => new FileStorageShareCreate([ + 'name' => 'read', + 'path' => '/public', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.147.0/24', + 'permission' => FileStoragePermission::Ro->value, + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `FileStorageShareCreate` + +
+ +
+$client->fileStorage->getFileStorageShare($serviceUuid, $shareName) -> FileStorageShareDetailResponse + +#### Description + +Returns service share details by given {service_uuid} and {share_name}. + +#### Usage + +```php +$client->fileStorage->getFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +
+ +
+$client->fileStorage->deleteFileStorageShare($serviceUuid, $shareName) + +#### Description + +Deletes existing share by given {service_uuid} and {share_name}. + +#### Usage + +```php +$client->fileStorage->deleteFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +
+ +
+$client->fileStorage->modifyFileStorageShare($serviceUuid, $shareName, $request) -> FileStorageShareDetailResponse + +#### Description + +Modifies existing service share by given {service_uuid} and {share_name}. + +#### Usage + +```php +$client->fileStorage->modifyFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + new FileStorageShareModify([ + 'name' => 'test-name', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.25.0/24', + 'permission' => FileStoragePermission::Ro->value, + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +**$name:** `?string` β€” A resource name. + +**$acl:** `?array` + +
+ +
+$client->fileStorage->listFileStorageAcls($serviceUuid, $shareName) -> array + +#### Description + +Returns a list of available ACLs by given {service_uuid} and {share_name}. + +#### Usage + +```php +$client->fileStorage->listFileStorageAcls( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +
+ +
+$client->fileStorage->createFileStorageAcl($serviceUuid, $shareName, $request) -> FileStorageAclDetailResponse + +#### Description + +Creates a new share ACL by given {service_uuid} and {share_name}. + +#### Usage + +```php +$client->fileStorage->createFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + new CreateFileStorageAclRequest([ + 'body' => new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.25.147', + 'permission' => FileStoragePermission::Ro->value, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +**$request:** `FileStorageAclCreate` + +
+ +
+$client->fileStorage->getFileStorageAcl($serviceUuid, $shareName, $aclName) -> FileStorageAclDetailResponse + +#### Description + +Returns ACL details by given {service_uuid}, {share_name} and {acl_name}. + +#### Usage + +```php +$client->fileStorage->getFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +**$aclName:** `string` β€” The name of the ACL. + +
+ +
+$client->fileStorage->deleteFileStorageAcl($serviceUuid, $shareName, $aclName) + +#### Description + +Deletes existing ACL by given {service_uuid}, {share_name} and {acl_name}. + +#### Usage + +```php +$client->fileStorage->deleteFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +**$aclName:** `string` β€” The name of the ACL. + +
+ +
+$client->fileStorage->modifyFileStorageAcl($serviceUuid, $shareName, $aclName, $request) -> FileStorageAclDetailResponse + +#### Description + +Modifies existing ACL by given {service_uuid}, {share_name} and {acl_name}. + +#### Usage + +```php +$client->fileStorage->modifyFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + 'test-name', + new FileStorageAclModify([ + 'name' => 'test-name', + 'target' => '192.168.25.0/24', + 'permission' => FileStoragePermission::Rw->value, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +**$aclName:** `string` β€” The name of the ACL. + +**$name:** `?string` + +**$target:** `?string` β€” The target of the ACL entry. It can be an IP Address, Network Prefix or a wildcard. + +**$permission:** `?string` + +
+ +
+$client->fileStorage->listFileStorageLabels($serviceUuid) -> array + +#### Description + +Returns a list of available service labels by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->listFileStorageLabels( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->fileStorage->createFileStorageLabel($serviceUuid, $request) -> FileStorageLabelDetails + +#### Description + +Creates a new label by given {service_uuid}. Labels are used for service filtering. + +#### Usage + +```php +$client->fileStorage->createFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new CreateFileStorageLabelRequest([ + 'body' => new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `FileStorageLabelCreate` + +
+ +
+$client->fileStorage->getFileStorageLabel($serviceUuid, $labelKey) -> FileStorageLabelDetails + +#### Description + +Returns label details by given {service_uuid} and {key}. + +#### Usage + +```php +$client->fileStorage->getFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->fileStorage->deleteFileStorageLabel($serviceUuid, $labelKey) + +#### Description + +Deletes existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->fileStorage->deleteFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->fileStorage->modifyFileStorageLabel($serviceUuid, $labelKey, $request) -> FileStorageLabelDetails + +#### Description + +Modifies existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->fileStorage->modifyFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'environment', + new FileStorageLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +**$key:** `?string` + +**$value:** `?string` + +
+ +
+$client->fileStorage->getFileStorageCurrentState($serviceUuid) -> FileStorageServiceDetailResponse + +#### Description + +Returns the current state of the File Storage service by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->getFileStorageCurrentState( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +## database +{:#databaseAnchor} + +
+$client->database->listDatabaseTypes() -> array + +#### Description + +Returns a list of available database types. Contains available legacy plans, zones, database versions supported and the configuration properties for each database. PostgreSQL and MySQL componentised (rdb.*) plans are selected with the plan_* request fields instead of a listed plan name. + +#### Usage + +```php +$client->database->listDatabaseTypes(); +``` + +
+ +
+$client->database->listDatabasePlans() -> DatabasePlansResponse + +#### Description + +Lists available componentised database plans + +#### Usage + +```php +$client->database->listDatabasePlans(); +``` + +
+ +
+$client->database->getDatabaseType($serviceTypeName) -> DatabaseServiceTypeResponse + +#### Description + +Returns database type details by given {database_type}. Contains available legacy plans, zones, database versions supported and configuration properties. PostgreSQL and MySQL componentised (rdb.*) plans are selected with the plan_* request fields instead of a listed plan name. + +#### Usage + +```php +$client->database->getDatabaseType( + DatabaseServiceType::Mysql->value, +); +``` + +#### Parameters + +**$serviceTypeName:** `string` β€” Service type parameter + +
+ +
+$client->database->listDatabases($request) -> array + +#### Description + +Returns a list of all available Managed Database services. Depending on their database type, Managed Databases services will have different details. + +#### Usage + +```php +$client->database->listDatabases( + new ListDatabasesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Sort results by the specified field. Prefix with '-' for descending order. Supported fields: `created_at`, `name` (service hostname), `operational_state` (service status), `zone` (location). + +
+ +
+$client->database->createDatabase($request) -> DatabaseServiceInformationResponse + +#### Description + +Creates a new Managed Database instance. New databases are started by default. An initial backup is created automatically on startup and the API will be fully functional only after this backup has been created. The creation might take a while. Note that different databases have different properties that can be passed on creation. For PostgreSQL and MySQL, select the plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines. + +#### Usage + +```php +$client->database->createDatabase( + new DatabaseServiceCreateOpenApi([ + 'hostnamePrefix' => 'doc-api-unique-prefix', + 'title' => 'my-managed-database', + 'type' => DatabaseServiceType::Mysql->value, + 'zone' => 'de-fra1', + 'terminationProtection' => false, + 'maintenance' => new DatabaseServiceCreateOpenApiMaintenance([ + 'dow' => DatabaseMaintenanceDow::Sunday->value, + 'time' => '05:00:00', + ]), + 'networks' => [ + new DatabaseNetworkCreate([ + 'uuid' => '03631160-d57a-4926-ad48-a2f828229dcb', + 'name' => 'example-network-1', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + new DatabaseNetworkCreate([ + 'uuid' => '03631160-d57a-4926-ad48-a2f828229dcb', + 'name' => 'example-network-2', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + ], + 'labels' => [ + new DatabaseLabelCreate([ + 'key' => 'env', + 'value' => 'staging', + ]), + new DatabaseLabelCreate([ + 'key' => 'foo', + 'value' => 'bar', + ]), + ], + 'properties' => new DatabaseServicePropertiesMysql([ + 'automaticUtilityNetworkIpFilter' => true, + 'ipFilter' => [ + 'ip_filter', + ], + ]), + ]), +); +``` + +#### Parameters + +**$hostnamePrefix:** `string` β€” Hostname prefix for the service nodes. + +**$title:** `string` β€” Human-readable title for the service. + +**$type:** `string` + +**$zone:** `string` β€” Zone where the service is created. + +**$setServiceUuid:** `?string` β€” Optional UUID to assign to the created service. + +**$plan:** `?string` β€” Deprecated: prefer the plan_* selection fields (plan_compute, plan_node_count, plan_storage_gib, plan_backups) for PostgreSQL and MySQL. The plan name remains supported, and required for engines without componentised plans. For componentised (rdb.*) plans the storage segment is the desired TOTAL storage per node: any total reachable from a catalog plan's included storage in the plan's storage steps (within its cap) is a valid plan name, e.g. rdb.standard.2x-2CPU-8GB-120GB-regular selects the 80GB catalog plan with a 40GB dynamic top-up. + +**$planCompute:** `?string` β€” Plan selection: compute shape combining family, CPU and memory as one token, as listed in the plan catalog components. PostgreSQL and MySQL only. + +**$planNodeCount:** `?int` β€” Plan selection: number of nodes. + +**$planStorageGib:** `?int` β€” Plan selection: desired TOTAL storage per node in GiB. Resolution picks the plan whose included storage matches, or tops the closest plan up with dynamic additional storage within the allowed limits. Mutually exclusive with additional_disk_space_gib. + +**$planBackups:** `?string` β€” Plan selection: backup tier. PostgreSQL and MySQL tiered plans only. + +**$additionalDiskSpaceGib:** `?int` β€” Additional disk space in GiB. Legacy plans only: componentised (rdb.*) plans set storage as a total via plan_storage_gib or the plan name. + +**$terminationProtection:** `?bool` β€” When enabled, the service cannot be deleted until termination protection is disabled. + +**$maintenance:** `?DatabaseServiceCreateOpenApiMaintenance` β€” Weekly maintenance window. + +**$networks:** `?array` β€” SDN networks to attach to the service. + +**$labels:** `?array` β€” Labels used for service filtering. + +**$serviceIntegrations:** `?array` β€” Service integrations to configure on creation. + +**$properties:** `DatabaseServicePropertiesMysql|DatabaseServicePropertiesPg|DatabaseServicePropertiesRedis|DatabaseServicePropertiesOpensearch|DatabaseServicePropertiesValkey|null` β€” Engine-specific configuration properties. The allowed keys depend on the selected service type; provide the property set matching the chosen type. + +
+ +
+$client->database->getDatabase($uuid) -> DatabaseServiceInformationResponse + +#### Description + +Returns details of a Managed Database service by its {uuid}. + +#### Usage + +```php +$client->database->getDatabase( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->deleteDatabase($uuid) + +#### Description + +Deletes a specified Managed Database. All data will be erased and lost, including backups. If the service is not powered off, it will be powered off before deletion. The state of the service can be anything. + +#### Usage + +```php +$client->database->deleteDatabase( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->modifyDatabase($uuid, $request) -> DatabaseServiceInformationResponse + +#### Description + +Modifies Managed Database service details by its {uuid} including upgrading plans, migration to other zones and database type-specific configurations. For PostgreSQL and MySQL, change the plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines. + +#### Usage + +```php +$client->database->modifyDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceModifyOpenApi([ + 'title' => 'my-managed-database', + 'powered' => true, + 'zone' => 'de-fra1', + 'terminationProtection' => false, + 'maintenance' => new DatabaseServiceModifyOpenApiMaintenance([ + 'dow' => DatabaseMaintenanceDow::Sunday->value, + 'time' => '12:00:00', + ]), + 'networks' => [ + new DatabaseNetworkCreate([ + 'uuid' => '03631160-d57a-4926-ad48-a2f828229dcb', + 'name' => 'example-network-1', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + ], + 'properties' => new DatabaseServicePropertiesMysql([ + 'automaticUtilityNetworkIpFilter' => true, + 'ipFilter' => [ + 'ip_filter', + ], + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$title:** `?string` β€” Human-readable title for the service. + +**$type:** `?string` + +**$powered:** `?bool` β€” Desired power state of the service. + +**$zone:** `?string` β€” Zone to migrate the service to. + +**$plan:** `?string` β€” Deprecated: prefer the plan_* selection fields (plan_compute, plan_node_count, plan_storage_gib, plan_backups) for PostgreSQL and MySQL. The plan name remains supported, and required for engines without componentised plans. For componentised (rdb.*) plans the storage segment is the desired TOTAL storage per node: any total reachable from a catalog plan's included storage in the plan's storage steps (within its cap) is a valid plan name, e.g. rdb.standard.2x-2CPU-8GB-120GB-regular selects the 80GB catalog plan with a 40GB dynamic top-up. + +**$planCompute:** `?string` β€” Plan selection: compute shape combining family, CPU and memory as one token, as listed in the plan catalog components. PostgreSQL and MySQL only. + +**$planNodeCount:** `?int` β€” Plan selection: number of nodes. + +**$planStorageGib:** `?int` β€” Plan selection: desired TOTAL storage per node in GiB. Resolution picks the plan whose included storage matches, or tops the closest plan up with dynamic additional storage within the allowed limits. Mutually exclusive with additional_disk_space_gib. + +**$planBackups:** `?string` β€” Plan selection: backup tier. PostgreSQL and MySQL tiered plans only. + +**$additionalDiskSpaceGib:** `?int` β€” Additional disk space in GiB. Legacy plans only: componentised (rdb.*) plans set storage as a total via plan_storage_gib or the plan name. + +**$terminationProtection:** `?bool` β€” When enabled, the service cannot be deleted until termination protection is disabled. + +**$maintenance:** `?DatabaseServiceModifyOpenApiMaintenance` β€” Weekly maintenance window. + +**$networks:** `?array` β€” SDN networks attached to the service. + +**$labels:** `?array` β€” Labels used for service filtering. + +**$properties:** `DatabaseServicePropertiesMysql|DatabaseServicePropertiesPg|DatabaseServicePropertiesRedis|DatabaseServicePropertiesOpensearch|DatabaseServicePropertiesValkey|null` β€” Engine-specific configuration properties. The allowed keys depend on the service type; provide the property set matching the service's type. + +
+ +
+$client->database->modifyDatabaseType($uuid, $request) -> DatabaseServiceInformationResponse + +#### Description + +Update a service's type by the given {service-uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseType( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceTypeModify([ + 'targetType' => 'primary', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$targetType:** `string` β€” Service type + +
+ +
+$client->database->cloneDatabase($uuid, $request) -> DatabaseServiceInformationResponse + +#### Description + +Creates a clone of a Managed Database service based on its {uuid}. It is possible to change location, plans and use the point in time feature to clone your service at a specific time using your backups. For PostgreSQL and MySQL, select the clone's plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines. + +#### Usage + +```php +$client->database->cloneDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new CloneDatabaseRequest([ + 'body' => new DatabaseServiceCloneMysql([ + 'hostnamePrefix' => 'dev', + 'cloneTime' => new DateTime('2024-01-30T15:04:05Z'), + 'backupName' => 'daily-backup-2024-01-30', + 'zone' => 'fi-hel1', + 'terminationProtection' => false, + 'maintenance' => new DatabaseServiceCloneMysqlMaintenance([ + 'dow' => DatabaseMaintenanceDow::Monday->value, + 'time' => '03:00:00', + ]), + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$request:** `DatabaseServiceCloneMysql|DatabaseServiceClonePg|DatabaseServiceCloneRedis|DatabaseServiceCloneOpensearch|DatabaseServiceCloneValkey` + +
+ +
+$client->database->listDatabaseNetworks($uuid) -> array + +#### Description + +Returns a list of attached SDN networks to a Managed Database service by its {uuid}. + +#### Usage + +```php +$client->database->listDatabaseNetworks( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->createDatabaseNetwork($uuid, $request) -> DatabaseNetworkInformationDetailsResponse + +#### Description + +Attaches an SDN network to a Managed Database service by its {uuid}. + +#### Usage + +```php +$client->database->createDatabaseNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateDatabaseNetworkRequest([ + 'body' => new DatabaseNetworkCreate([ + 'name' => 'my-network', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$request:** `DatabaseNetworkCreate` + +
+ +
+$client->database->getDatabaseNetwork($uuid, $networkName) -> DatabaseNetworkInformationDetailsResponse + +#### Description + +Returns the attached SDN network details to service by its {uuid} and {network_name}. + +#### Usage + +```php +$client->database->getDatabaseNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” Network UUID + +
+ +
+$client->database->deleteDatabaseNetwork($uuid, $networkName) + +#### Description + +Detaches an existing SDN network from a Managed Database service by its {uuid} and {network_name}. + +#### Usage + +```php +$client->database->deleteDatabaseNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” Network UUID + +
+ +
+$client->database->upgradeDatabase($uuid, $request) -> DatabaseServiceInformationResponse + +#### Description + +Upgrades your PostgreSQL Managed Database service database to a newer major version. Downgrades are not permitted. + +#### Usage + +```php +$client->database->upgradeDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceUpgrade([ + 'targetVersion' => '12', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$targetVersion:** `string` β€” Version to upgrade the service + +
+ +
+$client->database->listDatabaseLabels($uuid) -> array + +#### Description + +Returns a list of available service labels by given {service_uuid}. + +#### Usage + +```php +$client->database->listDatabaseLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->createDatabaseLabel($uuid, $request) -> DatabaseLabelResponse + +#### Description + +Creates a new label by given {service_uuid}. Labels used for service filtering. + +#### Usage + +```php +$client->database->createDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateDatabaseLabelRequest([ + 'body' => new DatabaseLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$request:** `DatabaseLabelCreate` + +
+ +
+$client->database->getDatabaseLabel($uuid, $labelKey) -> DatabaseLabelResponse + +#### Description + +Returns label details by given {service_uuid} and {key}. + +#### Usage + +```php +$client->database->getDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'foo', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” Label ID + +
+ +
+$client->database->deleteDatabaseLabel($uuid, $labelKey) + +#### Description + +Deletes existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->database->deleteDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'foo', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” Label ID + +
+ +
+$client->database->modifyDatabaseLabel($uuid, $labelKey, $request) -> DatabaseLabelResponse + +#### Description + +Modifies existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->database->modifyDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'foo', + new DatabaseLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” Label ID + +**$key:** `?string` + +**$value:** `?string` + +
+ +
+$client->database->getDatabaseAvailableExtensions($uuid) -> array + +#### Description + +Returns a list of available PostgreSQL extensions for the Managed Database service by its {service-uuid}. Only supported for PostgreSQL services. + +#### Usage + +```php +$client->database->getDatabaseAvailableExtensions( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getPgAvailableExtensions() -> array + +#### Description + +Returns a list of available PostgreSQL extensions grouped by PostgreSQL version. + +#### Usage + +```php +$client->database->getPgAvailableExtensions(); +``` + +
+ +
+$client->database->getDatabaseTypeVersions() -> array + +#### Description + +Returns a list of supported Managed Database service versions. + +#### Usage + +```php +$client->database->getDatabaseTypeVersions(); +``` + +
+ +
+$client->database->getDatabaseAccessControl($uuid) -> DatabaseAccessControlSettingsResponse + +#### Description + +Return access controls settings for the OpenSearch Managed Database service {uuid}. + +#### Usage + +```php +$client->database->getDatabaseAccessControl( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->modifyDatabaseAccessControl($uuid, $request) -> DatabaseAccessControlSettingsResponse + +#### Description + +Modifies the user {username} access control for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseAccessControl( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceAclModify([ + 'accessControl' => true, + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$accessControl:** `?bool` β€” Enables OpenSearch access control + +**$extendedAccessControl:** `?bool` β€” Enables OpenSearch extended access control + +
+ +
+$client->database->getDatabaseSecurity($uuid) -> DatabaseOpenSearchSecurityPluginStatusResponse + +#### Description + +Returns Security management status for the OpenSearch Managed Database service {uuid}. + +#### Usage + +```php +$client->database->getDatabaseSecurity( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->enableDatabaseSecurityAdmin($uuid, $request) -> DatabaseOpenSearchSecurityPluginStatusResponse + +#### Description + +Enables Security management admin for the OpenSearch Managed Database service {uuid}. + +#### Usage + +```php +$client->database->enableDatabaseSecurityAdmin( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceSecurityEnable([ + 'adminPassword' => 'Str0ngP@ssw0rd!', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$adminPassword:** `string` β€” Security admin password + +
+ +
+$client->database->modifyDatabaseSecurityAdmin($uuid, $request) -> DatabaseOpenSearchSecurityPluginStatusResponse + +#### Description + +Modifies Security management admin password for the OpenSearch Managed Database service {uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseSecurityAdmin( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceSecurityModify([ + 'adminPassword' => 'Curr3nt@Passw0rd!', + 'newPassword' => 'N3w@Str0ngPassw0rd!', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$adminPassword:** `string` β€” Current admin password + +**$newPassword:** `string` β€” New admin password + +
+ +
+$client->database->listDatabaseIntegrationEndpoints() -> array + +#### Description + +Returns a list of available integration endpoints. + +#### Usage + +```php +$client->database->listDatabaseIntegrationEndpoints(); +``` + +
+ +
+$client->database->createDatabaseIntegrationEndpoint($request) -> DatabaseIntegrationEndpointResponse + +#### Description + +Creates a new integration endpoint. + +#### Usage + +```php +$client->database->createDatabaseIntegrationEndpoint( + new DatabaseIntegrationEndpointCreate([ + 'type' => DatabaseIntegrationEndpoint::Logs->value, + 'name' => 'webhook-endpoint', + ]), +); +``` + +#### Parameters + +**$type:** `string` + +**$name:** `string` β€” The name of the integration endpoint. + +**$properties:** `?array` β€” A key-value map of properties specific to the integration endpoint type. + +
+ +
+$client->database->getDatabaseIntegrationEndpoint($integrationUuid) -> DatabaseIntegrationEndpointResponse + +#### Description + +Returns integration endpoint details by given {integration-uuid}. + +#### Usage + +```php +$client->database->getDatabaseIntegrationEndpoint( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$integrationUuid:** `string` β€” Integration UUID + +
+ +
+$client->database->deleteDatabaseIntegrationEndpoint($integrationUuid) + +#### Description + +Deletes existing integration endpoint by given {integration-uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseIntegrationEndpoint( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$integrationUuid:** `string` β€” Integration UUID + +
+ +
+$client->database->modifyDatabaseIntegrationEndpoint($integrationUuid, $request) -> DatabaseIntegrationEndpointResponse + +#### Description + +Modifies existing integration endpoint by given {integration-uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseIntegrationEndpoint( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseIntegrationEndpointModify([]), +); +``` + +#### Parameters + +**$integrationUuid:** `string` β€” Integration UUID + +**$properties:** `?array` + +
+ +
+$client->database->getDatabaseAccountCa() -> DatabaseAccountCaResponse + +#### Description + +Returns the CA certificate. Every customer main account has a private Certificate Authority (CA) that signs certificates for internal use. Managed Database service types, such as PostgreSQL, use it for external connections. To access these services, you must download and configure the certificate on your browser or client. + +#### Usage + +```php +$client->database->getDatabaseAccountCa(); +``` + +
+ +
+$client->database->listDatabaseAlerts() -> array + +#### Description + +Returns all the alerts associated with your Managed Database services. + +#### Usage + +```php +$client->database->listDatabaseAlerts(); +``` + +
+ +
+$client->database->getDatabaseStatus($uuid) -> DatabaseServiceStatusResponse + +#### Description + +Get a service's status by the given {service-uuid}. + +#### Usage + +```php +$client->database->getDatabaseStatus( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseVersions($uuid) -> array + +#### Description + +Returns available versions of the Managed Database service by its {uuid}. + +#### Usage + +```php +$client->database->getDatabaseVersions( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->startDatabaseManualMaintenance($uuid) -> DatabaseUpCloudApiResponse + +#### Description + +Start maintenance updates for your Managed Database service if any updates are pending. + +#### Usage + +```php +$client->database->startDatabaseManualMaintenance( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->enableDatabaseTemporaryWrites($uuid) -> DatabaseUpCloudApiResponse + +#### Description + +Enable temporary writes by the given {service-uuid}. + +#### Usage + +```php +$client->database->enableDatabaseTemporaryWrites( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseMigrationStatus($uuid) -> DatabaseServiceMigrationStatusResponse + +#### Description + +Returns details about the migration progress over time of a Managed database service by its {uuid}. + +#### Usage + +```php +$client->database->getDatabaseMigrationStatus( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseAlerts($uuid) -> array + +#### Description + +Returns alerts for Managed Database service identified by `{uuid}`. + +#### Usage + +```php +$client->database->getDatabaseAlerts( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseMetrics($uuid) -> array + +#### Description + +Returns metrics related to a Managed Database service by its {uuid} and query parameter {period}. + +#### Usage + +```php +$client->database->getDatabaseMetrics( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseQueryStatistics($uuid, $request) -> DatabaseQueryStatisticsResponse + +#### Description + +Returns a list of query statistics for the Managed Database service by its {uuid} and optional query parameters {limit}, {offset} and {order}. Query statistics will differ depending on the database type. + +#### Usage + +```php +$client->database->getDatabaseQueryStatistics( + '01234567-89ab-cdef-0123-456789abcdef', + new GetDatabaseQueryStatisticsRequest([ + 'limit' => 10, + 'offset' => 0, + 'order' => 'asc', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$order:** `?string` β€” Sort order + +
+ +
+$client->database->getDatabaseLogs($uuid, $request) -> DatabaseLogListResponse + +#### Description + +Returns Managed Database service system-level logs by its {uuid} and optional query parameters {limit}, {offset} and {order}. + +#### Usage + +```php +$client->database->getDatabaseLogs( + '01234567-89ab-cdef-0123-456789abcdef', + new GetDatabaseLogsRequest([ + 'limit' => 10, + 'offset' => 0, + 'order' => 'asc', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$order:** `?string` β€” Sort order + +
+ +
+$client->database->listDatabaseConnectionPools($uuid, $request) -> array + +#### Description + +Returns a list of available connection pools for a Managed Database service. Connection pools are available only for PostgreSQL database services. + +#### Usage + +```php +$client->database->listDatabaseConnectionPools( + '01234567-89ab-cdef-0123-456789abcdef', + new ListDatabaseConnectionPoolsRequest([ + 'sort' => 'asc', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->database->createDatabaseConnectionPool($uuid, $request) -> DatabaseConnectionPoolResponse + +#### Description + +Creates a connection pool for the Managed Database service {uuid}. Connection pool endpoints are for PostgreSQL Managed Databases only. + +#### Usage + +```php +$client->database->createDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseConnectionPoolCreate([ + 'database' => 'defaultdb', + 'poolMode' => DatabaseConnectionPoolCreatePoolMode::Statement->value, + 'poolName' => 'readonly-pool', + 'poolSize' => 10, + 'username' => 'readonly', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$database:** `string` β€” Database + +**$poolMode:** `string` β€” Connection Pool mode + +**$poolName:** `string` β€” Connection Pool name + +**$poolSize:** `int` β€” Connection Pool size + +**$username:** `?string` β€” Connection Pool username + +
+ +
+$client->database->getDatabaseConnectionPool($uuid, $poolName) -> DatabaseConnectionPoolResponse + +#### Description + +Returns the connection pool {pool-name} details for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->getDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$poolName:** `string` β€” Connection Pool Name + +
+ +
+$client->database->deleteDatabaseConnectionPool($uuid, $poolName) + +#### Description + +Deletes the connection pool {pool-name} for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$poolName:** `string` β€” Connection Pool Name + +
+ +
+$client->database->modifyDatabaseConnectionPool($uuid, $poolName, $request) -> DatabaseConnectionPoolResponse + +#### Description + +Modifies the connection pool {pool-name} for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + new DatabaseConnectionPoolModify([ + 'database' => 'defaultdb', + 'poolMode' => DatabaseConnectionPoolModifyPoolMode::Session->value, + 'poolSize' => 20, + 'username' => 'app-user', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$poolName:** `string` β€” Connection Pool Name + +**$database:** `?string` β€” Database + +**$poolMode:** `?string` β€” Connection Pool mode + +**$poolSize:** `?int` β€” Connection Pool size + +**$username:** `?string` β€” Connection Pool username + +
+ +
+$client->database->listDatabaseIndices($uuid) -> array + +#### Description + +Returns a list of available indices for a Managed Database service {uuid}. + +#### Usage + +```php +$client->database->listDatabaseIndices( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->deleteDatabaseIndex($uuid, $indexName) + +#### Description + +Deletes the index {index_name} for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseIndex( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$indexName:** `string` β€” OpenSearch Index Name + +
+ +
+$client->database->listDatabaseIntegrations($uuid) -> array + +#### Description + +Returns a list of available service integrations by given {service-uuid}. + +#### Usage + +```php +$client->database->listDatabaseIntegrations( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->createDatabaseIntegration($uuid, $request) -> DatabaseServiceIntegrationResponse + +#### Description + +Creates a new integration by given {service-uuid}. + +#### Usage + +```php +$client->database->createDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateDatabaseIntegrationRequest([ + 'body' => new DatabaseServiceIntegrationCreate([ + 'type' => DatabaseServiceIntegration::Logs->value, + 'destinationUuid' => '09e86f48-2dcd-4a43-843d-3532ab112c1d', + 'properties' => [ + 'opensearch_index_days_max' => 30, + 'opensearch_index_prefix' => "mysql_logs", + ], + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$request:** `DatabaseServiceIntegrationCreate` + +
+ +
+$client->database->getDatabaseIntegration($uuid, $integrationUuid) -> DatabaseServiceIntegrationResponse + +#### Description + +Returns integration details by given {service-uuid} and {integration-uuid}. + +#### Usage + +```php +$client->database->getDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$integrationUuid:** `string` β€” Integration UUID + +
+ +
+$client->database->deleteDatabaseIntegration($uuid, $integrationUuid) + +#### Description + +Deletes existing integration by given {service-uuid} and {integration-uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$integrationUuid:** `string` β€” Integration UUID + +
+ +
+$client->database->modifyDatabaseIntegration($uuid, $integrationUuid, $request) -> DatabaseServiceIntegrationResponse + +#### Description + +Modifies existing integration by given {service-uuid} and {integration-uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceIntegrationModify([ + 'properties' => [ + 'key1' => "value1", + ], + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$integrationUuid:** `string` β€” Integration UUID + +**$properties:** `?array` + +
+ +
+$client->database->listDatabaseLogicalDatabases($uuid) -> array + +#### Description + +Returns a list of logical databases for a Managed Database service identified by {uuid}. + +#### Usage + +```php +$client->database->listDatabaseLogicalDatabases( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->createDatabaseLogicalDatabase($uuid, $request) -> LogicalDatabaseResponse + +#### Description + +Creates a new logical database for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->createDatabaseLogicalDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new LogicalDatabaseCreate([ + 'name' => 'my_database', + 'lcCollate' => 'en_US.UTF-8', + 'lcCtype' => 'en_US.UTF-8', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$name:** `string` β€” logical database name + +**$lcCollate:** `?string` β€” Collation order + +**$lcCtype:** `?string` β€” Category of a locale definition source file + +
+ +
+$client->database->deleteDatabaseLogicalDatabase($uuid, $databaseName) + +#### Description + +Deletes the logical database {database_name} from the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseLogicalDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$databaseName:** `string` β€” Database name + +
+ +
+$client->database->getDatabasePeeringsStatus($uuid) -> DatabaseServiceNetworkDetailsResponse + +#### Description + +Returns networks peering status for a service by its {uuid}. Only available for services using SDN private networks. + +#### Usage + +```php +$client->database->getDatabasePeeringsStatus( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseSessions($uuid, $request) -> DatabaseCurrentSessionsResponse + +#### Description + +Returns a list of current sessions details for your Managed Database service by its {uuid} and optional query parameters {limit}, {offset} and {order}. + +#### Usage + +```php +$client->database->getDatabaseSessions( + '01234567-89ab-cdef-0123-456789abcdef', + new GetDatabaseSessionsRequest([ + 'limit' => 10, + 'offset' => 0, + 'order' => 'asc', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$order:** `?string` β€” Sort order + +
+ +
+$client->database->terminateDatabaseSession($uuid, $pid) + +#### Description + +Terminates a sessions or kills a running query for a Managed Database service by its {uuid}, session {pid} and optional query parameter {terminate}. + +#### Usage + +```php +$client->database->terminateDatabaseSession( + '01234567-89ab-cdef-0123-456789abcdef', + 1001, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$pid:** `int` β€” Session PID + +
+ +
+$client->database->createDatabaseTask($uuid, $request) -> DatabaseServiceTaskResponse + +#### Description + +Creates a task that checks for potential errors before starting a migration or upgrade for a Managed Database service by its {uuid}. + +#### Usage + +```php +$client->database->createDatabaseTask( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceTaskCreate([ + 'datasetImport' => new DatabaseServiceTaskCreateDatasetImport([ + 'datasetName' => 'customer-events', + ]), + 'operation' => 'dataset_import', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$datasetImport:** `?DatabaseServiceTaskCreateDatasetImport` + +**$migrationCheck:** `?DatabaseServiceTaskCreateMigrationCheck` + +**$upgradeCheck:** `?DatabaseServiceTaskCreateUpgradeCheck` + +**$targetVersion:** `?string` β€” The target version for upgrade operations. + +**$operation:** `string` β€” The operation to be performed. + +
+ +
+$client->database->getDatabaseTask($uuid, $taskId) -> DatabaseServiceTaskDetailsResponse + +#### Description + +Returns task details of a Managed Database service by its {uuid} and the task {id} obtained from Create Managed Database task. + +#### Usage + +```php +$client->database->getDatabaseTask( + '01234567-89ab-cdef-0123-456789abcdef', + 1001, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$taskId:** `int` β€” Task ID + +
+ +
+$client->database->listDatabaseUsers($uuid) -> array + +#### Description + +Returns a list of database users associated with the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->listDatabaseUsers( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->createDatabaseUser($uuid, $request) -> DatabaseUserResponse + +#### Description + +Creates a new user for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->createDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceUserCreate([ + 'username' => 'api-doc-user', + 'password' => 'new-password', + 'authentication' => 'caching_sha2_password', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$username:** `string` β€” The username of the service user + +**$password:** `?string` β€” The password of the service user + +**$authentication:** `?string` β€” The authentication method for the service user + +**$redisAccessControl:** `?DatabaseServiceUserCreateRedisAccessControl` β€” Redis access control settings + +**$pgAccessControl:** `?DatabaseServiceUserCreatePgAccessControl` β€” PostgreSQL access control settings + +**$opensearchAccessControl:** `?DatabaseServiceUserCreateOpensearchAccessControl` β€” OpenSearch access control settings + +**$valkeyAccessControl:** `?DatabaseServiceUserCreateValkeyAccessControl` β€” Valkey access control settings + +
+ +
+$client->database->getDatabaseUser($uuid, $username) -> DatabaseUserResponse + +#### Description + +Returns the user {username} details for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->getDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$username:** `string` β€” Username identifier + +
+ +
+$client->database->deleteDatabaseUser($uuid, $username) + +#### Description + +Deletes the user {username} from the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$username:** `string` β€” Username identifier + +
+ +
+$client->database->modifyDatabaseUser($uuid, $username, $request) -> DatabaseUserResponse + +#### Description + +Modifies the user {username} details for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + new DatabaseServiceUserModify([ + 'password' => 'new_secure_password_123!', + 'authentication' => 'caching_sha2_password', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$username:** `string` β€” Username identifier + +**$password:** `?string` β€” New password for the service user + +**$authentication:** `?string` β€” Authentication method for the service user + +
+ +
+$client->database->modifyDatabaseUserAccessControl($uuid, $username, $request) -> DatabaseUserResponse + +#### Description + +Return access controls settings for the OpenSearch Managed Database service {uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseUserAccessControl( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + new DatabaseServiceUserAclModify([ + 'redisAccessControl' => new DatabaseServiceUserAclModifyRedisAccessControl([ + 'categories' => [ + '@admin', + '@read', + ], + 'channels' => [ + 'news', + 'alerts', + ], + 'commands' => [ + 'GET', + 'SET', + ], + 'keys' => [ + 'user:*', + 'session:*', + ], + ]), + 'pgAccessControl' => new DatabaseServiceUserAclModifyPgAccessControl([ + 'allowReplication' => true, + ]), + 'opensearchAccessControl' => new DatabaseServiceUserAclModifyOpensearchAccessControl([ + 'rules' => [ + new DatabaseServiceUserAclModifyOpensearchAccessControlRulesItem([ + 'index' => 'logs-*', + 'permission' => 'read', + ]), + ], + ]), + 'valkeyAccessControl' => new DatabaseServiceUserAclModifyValkeyAccessControl([ + 'categories' => [ + '@write', + ], + 'channels' => [ + 'updates', + ], + 'commands' => [ + 'DEL', + ], + 'keys' => [ + 'cache:*', + ], + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$username:** `string` β€” Username identifier + +**$redisAccessControl:** `?DatabaseServiceUserAclModifyRedisAccessControl` β€” Redis ACL modification schema + +**$pgAccessControl:** `?DatabaseServiceUserAclModifyPgAccessControl` β€” PostgreSQL replication permission modification schema + +**$opensearchAccessControl:** `?DatabaseServiceUserAclModifyOpensearchAccessControl` β€” OpenSearch index permission modification schema + +**$valkeyAccessControl:** `?DatabaseServiceUserAclModifyValkeyAccessControl` β€” Valkey ACL modification schema + +
+ +## gateway +{:#gatewayAnchor} + +
+$client->gateway->listGatewayPlans($request) -> array + +#### Description + +List available plans. + +#### Usage + +```php +$client->gateway->listGatewayPlans( + new ListGatewayPlansRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +
+ +
+$client->gateway->getGatewayPlan($planName) -> GatewayPlanDetailsResponse + +#### Description + +Get plan details. + +#### Usage + +```php +$client->gateway->getGatewayPlan( + 'advanced', +); +``` + +#### Parameters + +**$planName:** `string` β€” Plan identifier + +
+ +
+$client->gateway->listGatewayServices($request) -> array + +#### Description + +List available services. + +#### Usage + +```php +$client->gateway->listGatewayServices( + new ListGatewayServicesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Sort resources by field. Prefix with '-' for descending order. + +
+ +
+$client->gateway->createGatewayService($request) -> GatewayServiceDetailsResponse + +#### Description + +Create a new service. + +#### Usage + +```php +$client->gateway->createGatewayService( + new GatewayServiceCreateRequest([ + 'name' => 'gateway-service', + 'plan' => 'development-gwaas-1c2g', + 'zone' => 'fi-hel1', + 'features' => [ + GatewayServiceFeatures::Nat->value, + ], + 'routers' => [ + new GatewayRouterCreateRequest([ + 'uuid' => 'fedcba98-7654-3210-fedc-ba9876543210', + ]), + ], + 'addresses' => [ + new GatewayAddressCreateRequest([ + 'name' => 'gateway-service', + ]), + ], + 'connections' => [ + new GatewayConnectionCreateRequest([ + 'name' => 'gateway-service', + 'type' => GatewayConnectionType::Ipsec->value, + 'localRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'upcloud-example-route', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.0.0/24', + ]), + ], + 'remoteRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'remote-example-route', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.1.0/24', + ]), + ], + 'tunnels' => [ + new GatewayTunnelCreateRequest([ + 'name' => 'example-tunnel-1', + 'localAddress' => new GatewayTunnelCreateRequestLocalAddress([ + 'name' => 'public-ip-1', + ]), + 'remoteAddress' => new GatewayTunnelCreateRequestRemoteAddress([ + 'address' => '100.10.0.111', + ]), + 'ipsec' => new GatewayTunnelCreateRequestIpsec([ + 'authentication' => new GatewayTunnelCreateRequestIpsecAuthentication([ + 'authentication' => GatewayIpsecAuthenticationType::Psk->value, + 'psk' => '{your PSK}', + ]), + ]), + 'tunnelInternalIp' => '169.254.17.1', + 'internalPeerPingInterval' => 0, + ]), + ], + ]), + ], + 'labels' => [ + new GatewayLabelCreateRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + 'configuredStatus' => GatewayServiceConfiguredStatus::Started->value, + 'automaticTunnelInternalIpAllocation' => true, + ]), +); +``` + +#### Parameters + +**$name:** `string` β€” Name of the service + +**$plan:** `string` β€” Plan + +**$zone:** `string` β€” Zone + +**$features:** `array` β€” Active features + +**$routers:** `array` β€” Service routers + +**$addresses:** `?array` β€” Service addresses + +**$connections:** `?array` β€” Service connections + +**$labels:** `?array` β€” Labels + +**$configuredStatus:** `string` + +**$automaticTunnelInternalIpAllocation:** `?bool` β€” Allocate and use tunnel internal IPs automatically + +
+ +
+$client->gateway->getGatewayService($serviceUuid) -> GatewayServiceDetailsResponse + +#### Description + +Get service details. + +#### Usage + +```php +$client->gateway->getGatewayService( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->gateway->replaceGatewayService($serviceUuid, $request) -> GatewayServiceDetailsResponse + +#### Description + +Replace service configuration. + +#### Usage + +```php +$client->gateway->replaceGatewayService( + '01234567-89ab-cdef-0123-456789abcdef', + new GatewayServiceReplaceRequest([ + 'name' => 'gateway-service', + 'plan' => 'development-gwaas-1c2g', + 'configuredStatus' => GatewayServiceConfiguredStatus::Started->value, + 'labels' => [ + new GatewayLabelCreateRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + 'automaticTunnelInternalIpAllocation' => true, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” Name of the service + +**$plan:** `?string` β€” Plan + +**$configuredStatus:** `string` + +**$connections:** `mixed` β€” Service connections + +**$labels:** `?array` β€” Labels + +**$automaticTunnelInternalIpAllocation:** `?bool` β€” Allocate and use tunnel internal IPs automatically + +
+ +
+$client->gateway->deleteGatewayService($serviceUuid) + +#### Description + +Deletes existing service by given {service-identifier}. + +#### Usage + +```php +$client->gateway->deleteGatewayService( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->gateway->modifyGatewayService($serviceUuid, $request) -> GatewayServiceDetailsResponse + +#### Description + +Modify service configuration. + +#### Usage + +```php +$client->gateway->modifyGatewayService( + '01234567-89ab-cdef-0123-456789abcdef', + new GatewayServiceModifyRequest([ + 'name' => 'gateway-service', + 'features' => [ + GatewayServiceFeatures::Nat->value, + ], + 'plan' => 'development-gwaas-1c2g', + 'configuredStatus' => GatewayServiceConfiguredStatus::Started->value, + 'connections' => [ + new GatewayConnectionModifyRequest([ + 'uuid' => '01234567-89ab-cdef-0123-456789abcdef', + 'name' => 'gateway-service', + 'type' => GatewayConnectionType::Ipsec->value, + 'localRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'modified-routes', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.22.0/24', + ]), + ], + ]), + ], + 'labels' => [ + new GatewayLabelCreateRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + 'automaticTunnelInternalIpAllocation' => true, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `?string` β€” Name of the service + +**$features:** `?array` β€” Active features + +**$plan:** `?string` β€” Plan + +**$configuredStatus:** `?string` + +**$connections:** `?array` β€” Service connections + +**$labels:** `?array` β€” Labels + +**$automaticTunnelInternalIpAllocation:** `?bool` β€” Allocate and use tunnel internal IPs automatically + +
+ +
+$client->gateway->flushGatewayNat($serviceUuid) + +#### Description + +Flush NAT rules. + +#### Usage + +```php +$client->gateway->flushGatewayNat( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->gateway->listGatewayConnections($serviceUuid) -> array + +#### Description + +List available connections for service. + +#### Usage + +```php +$client->gateway->listGatewayConnections( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->gateway->createGatewayConnection($serviceUuid, $request) -> GatewayConnectionDetailsResponse + +#### Description + +Create a new connection. + +#### Usage + +```php +$client->gateway->createGatewayConnection( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateGatewayConnectionRequest([ + 'body' => new GatewayConnectionCreateRequest([ + 'name' => 'gateway-service', + 'type' => GatewayConnectionType::Ipsec->value, + 'localRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'upcloud-example-route', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.0.0/24', + ]), + ], + 'remoteRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'remote-example-route', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.1.0/24', + ]), + ], + 'tunnels' => [ + new GatewayTunnelCreateRequest([ + 'name' => 'example-tunnel-1', + 'localAddress' => new GatewayTunnelCreateRequestLocalAddress([ + 'name' => 'public-ip-1', + ]), + 'remoteAddress' => new GatewayTunnelCreateRequestRemoteAddress([ + 'address' => '100.10.0.111', + ]), + 'ipsec' => new GatewayTunnelCreateRequestIpsec([ + 'authentication' => new GatewayTunnelCreateRequestIpsecAuthentication([ + 'authentication' => GatewayIpsecAuthenticationType::Psk->value, + 'psk' => '{your PSK}', + ]), + ]), + 'tunnelInternalIp' => '169.254.17.1', + 'internalPeerPingInterval' => 0, + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `GatewayConnectionCreateRequest` + +
+ +
+$client->gateway->getGatewayConnection($serviceUuid, $connectionUuid) -> GatewayConnectionDetailsResponse + +#### Description + +Get connection details. + +#### Usage + +```php +$client->gateway->getGatewayConnection( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$connectionUuid:** `string` β€” Connection UUID + +
+ +
+$client->gateway->deleteGatewayConnection($serviceUuid, $connectionUuid) + +#### Description + +Deletes existing connection by given {connection-identifier}. + +#### Usage + +```php +$client->gateway->deleteGatewayConnection( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$connectionUuid:** `string` β€” Connection UUID + +
+ +
+$client->gateway->modifyGatewayConnection($serviceUuid, $connectionUuid, $request) -> GatewayConnectionDetailsResponse + +#### Description + +Modify connection configuration. + +#### Usage + +```php +$client->gateway->modifyGatewayConnection( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new ModifyGatewayConnectionRequest([ + 'body' => new GatewayConnectionModifyRequest([ + 'uuid' => '01234567-89ab-cdef-0123-456789abcdef', + 'name' => 'gateway-service', + 'type' => GatewayConnectionType::Ipsec->value, + 'localRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'modified-routes', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.22.0/24', + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$connectionUuid:** `string` β€” Connection UUID + +**$request:** `GatewayConnectionModifyRequest` + +
+ +
+$client->gateway->listGatewayTunnels($serviceUuid, $connectionUuid) -> array + +#### Description + +List available tunnels for service. + +#### Usage + +```php +$client->gateway->listGatewayTunnels( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$connectionUuid:** `string` β€” Connection UUID + +
+ +
+$client->gateway->createGatewayTunnel($serviceUuid, $connectionUuid, $request) -> GatewayTunnelDetailsResponse + +#### Description + +Create a new tunnel. + +#### Usage + +```php +$client->gateway->createGatewayTunnel( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new CreateGatewayTunnelRequest([ + 'body' => new GatewayTunnelCreateRequest([ + 'name' => 'gateway-service', + 'localAddress' => new GatewayTunnelCreateRequestLocalAddress([ + 'name' => 'gateway-service', + ]), + 'remoteAddress' => new GatewayTunnelCreateRequestRemoteAddress([ + 'address' => '203.0.113.10', + ]), + 'ipsec' => new GatewayTunnelCreateRequestIpsec([ + 'authentication' => new GatewayTunnelCreateRequestIpsecAuthentication([ + 'authentication' => GatewayIpsecAuthenticationType::Psk->value, + 'psk' => 'MySecretPsk123', + ]), + 'phase1Algorithms' => [ + GatewaySupportedProposalAlgorithms::Aes128->value, + GatewaySupportedProposalAlgorithms::Aes256->value, + GatewaySupportedProposalAlgorithms::Aes128Gcm128->value, + GatewaySupportedProposalAlgorithms::Aes256Gcm128->value, + ], + 'phase2Algorithms' => [ + GatewaySupportedProposalAlgorithms::Aes128->value, + GatewaySupportedProposalAlgorithms::Aes256->value, + GatewaySupportedProposalAlgorithms::Aes128Gcm128->value, + GatewaySupportedProposalAlgorithms::Aes256Gcm128->value, + ], + 'phase1IntegrityAlgorithms' => [ + GatewaySupportedIntegrityAlgorithms::Sha256->value, + GatewaySupportedIntegrityAlgorithms::Sha384->value, + GatewaySupportedIntegrityAlgorithms::Sha512->value, + ], + 'phase2IntegrityAlgorithms' => [ + GatewaySupportedIntegrityAlgorithms::Sha256->value, + GatewaySupportedIntegrityAlgorithms::Sha384->value, + GatewaySupportedIntegrityAlgorithms::Sha512->value, + ], + 'phase1DhGroupNumbers' => [ + 16, + 18, + 19, + ], + 'phase2DhGroupNumbers' => [ + 14, + 16, + 18, + 19, + ], + ]), + 'tunnelInternalIp' => '10.0.0.1', + 'internalPeerPingInterval' => 0, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$connectionUuid:** `string` β€” Connection UUID + +**$request:** `GatewayTunnelCreateRequest` + +
+ +
+$client->gateway->getGatewayTunnel($serviceUuid, $connectionUuid, $tunnelUuid) -> GatewayTunnelDetailsResponse + +#### Description + +Get tunnel details. + +#### Usage + +```php +$client->gateway->getGatewayTunnel( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$connectionUuid:** `string` β€” Connection UUID + +**$tunnelUuid:** `string` β€” Tunnel UUID + +
+ +
+$client->gateway->deleteGatewayTunnel($serviceUuid, $connectionUuid, $tunnelUuid) + +#### Description + +Deletes existing tunnel by given {tunnel-identifier}. + +#### Usage + +```php +$client->gateway->deleteGatewayTunnel( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$connectionUuid:** `string` β€” Connection UUID + +**$tunnelUuid:** `string` β€” Tunnel UUID + +
+ +
+$client->gateway->modifyGatewayTunnel($serviceUuid, $connectionUuid, $tunnelUuid, $request) -> GatewayTunnelDetailsResponse + +#### Description + +Modify tunnel configuration. + +#### Usage + +```php +$client->gateway->modifyGatewayTunnel( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new ModifyGatewayTunnelRequest([ + 'body' => new GatewayTunnelModifyRequest([ + 'uuid' => '01234567-89ab-cdef-0123-456789abcdef', + 'name' => 'gateway-service', + 'localAddress' => new GatewayTunnelModifyRequestLocalAddress([ + 'name' => 'gateway-service', + ]), + 'remoteAddress' => new GatewayTunnelModifyRequestRemoteAddress([ + 'address' => '203.0.113.10', + ]), + 'ipsec' => new GatewayTunnelModifyRequestIpsec([ + 'authentication' => new GatewayTunnelModifyRequestIpsecAuthentication([ + 'authentication' => GatewayIpsecAuthenticationType::Psk->value, + 'psk' => 'MySecretPsk123', + ]), + 'phase1Algorithms' => [ + GatewaySupportedProposalAlgorithms::Aes128Gcm16->value, + ], + 'phase2Algorithms' => [ + GatewaySupportedProposalAlgorithms::Aes128Gcm16->value, + ], + 'phase1IntegrityAlgorithms' => [ + GatewaySupportedIntegrityAlgorithms::Sha256->value, + GatewaySupportedIntegrityAlgorithms::Sha384->value, + GatewaySupportedIntegrityAlgorithms::Sha512->value, + ], + 'phase2IntegrityAlgorithms' => [ + GatewaySupportedIntegrityAlgorithms::Sha256->value, + GatewaySupportedIntegrityAlgorithms::Sha384->value, + GatewaySupportedIntegrityAlgorithms::Sha512->value, + ], + 'phase1DhGroupNumbers' => [ + 16, + 18, + 19, + ], + 'phase2DhGroupNumbers' => [ + 14, + 16, + 18, + 19, + ], + ]), + 'tunnelInternalIp' => '10.0.0.1', + 'internalPeerPingInterval' => 0, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$connectionUuid:** `string` β€” Connection UUID + +**$tunnelUuid:** `string` β€” Tunnel UUID + +**$request:** `GatewayTunnelModifyRequest` + +
+ +
+$client->gateway->listGatewayServiceLabels($serviceUuid) -> array + +#### Description + +List available service labels for service. + +#### Usage + +```php +$client->gateway->listGatewayServiceLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->gateway->createGatewayServiceLabel($serviceUuid, $request) + +#### Description + +Create a new service label. + +#### Usage + +```php +$client->gateway->createGatewayServiceLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateGatewayServiceLabelRequest([ + 'body' => new GatewayLabelCreateRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `GatewayLabelCreateRequest` + +
+ +
+$client->gateway->getGatewayServiceLabel($serviceUuid, $labelKey) -> GatewayLabelDetailsResponse + +#### Description + +Get service label details. + +#### Usage + +```php +$client->gateway->getGatewayServiceLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” Label identifier + +
+ +
+$client->gateway->deleteGatewayServiceLabel($serviceUuid, $labelKey) + +#### Description + +Deletes existing service label by given {service-label-identifier}. + +#### Usage + +```php +$client->gateway->deleteGatewayServiceLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” Label identifier + +
+ +
+$client->gateway->modifyGatewayServiceLabel($serviceUuid, $labelKey, $request) + +#### Description + +Modify service label configuration. + +#### Usage + +```php +$client->gateway->modifyGatewayServiceLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + new GatewayLabelModifyRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” Label identifier + +**$key:** `?string` + +**$value:** `?string` + +
+ +
+$client->gateway->listGatewayAddresses($serviceUuid) -> array + +#### Description + +List available service addresses for service. + +#### Usage + +```php +$client->gateway->listGatewayAddresses( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->gateway->getGatewayAddress($serviceUuid, $addressName) -> GatewayAddressDetailsResponse + +#### Description + +Get service address details. + +#### Usage + +```php +$client->gateway->getGatewayAddress( + '01234567-89ab-cdef-0123-456789abcdef', + 'advanced', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$addressName:** `string` β€” Address identifier + +
+ +
+$client->gateway->modifyGatewayAddress($serviceUuid, $addressName, $request) -> GatewayAddressDetailsResponse + +#### Description + +Modify existing service address by given {service-address-identifier}. + +#### Usage + +```php +$client->gateway->modifyGatewayAddress( + '01234567-89ab-cdef-0123-456789abcdef', + 'advanced', + new GatewayAddressModifyRequest([ + 'address' => '203.0.113.10', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$addressName:** `string` β€” Address identifier + +**$address:** `string` β€” Floating IP address to assign to the service address. + +
+ +
+$client->gateway->releaseGatewayFloatingIp($serviceUuid, $addressName) + +#### Description + +Release the user-provisioned Floating IP of an existing service address by given {service-address-identifier}, reverting it to a service-provisioned address while keeping the same name. + +#### Usage + +```php +$client->gateway->releaseGatewayFloatingIp( + '01234567-89ab-cdef-0123-456789abcdef', + 'advanced', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$addressName:** `string` β€” Address identifier + +
+ +
+$client->gateway->getGatewayMetrics($serviceUuid) -> GatewayServiceMetricsResponse + +#### Description + +List available service metrics for service. + +#### Usage + +```php +$client->gateway->getGatewayMetrics( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->gateway->createGatewayServiceLogSession($serviceUuid, $request) -> GatewayServiceLogSessionCreateResponse + +#### Description + +Create a new service log session. + +#### Usage + +```php +$client->gateway->createGatewayServiceLogSession( + '01234567-89ab-cdef-0123-456789abcdef', + new GatewayServiceLogSessionCreateRequest([ + 'sessionType' => GatewayServiceLogSessionTypes::Vpn->value, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$sessionType:** `string` + +
+ +## load-balancer +{:#load-balancerAnchor} + +
+$client->loadBalancer->listLoadBalancers($request) -> array + +#### Description + +Returns a list of available load balancer services. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancers( + new ListLoadBalancersRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Sort resources by field. Prefix with '-' for descending order. + +**$label:** `?string` β€” Filter resources by label. Can be provided multiple times for multiple labels. Format: 'key=value' for exact match or 'key' for existence check. + +
+ +
+$client->loadBalancer->createLoadBalancer($request) -> LoadBalancerService + +#### Description + +Creates a new load balancer service. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancer( + new LoadBalancerServiceCreate([ + 'name' => 'my-loadbalancer', + 'zone' => 'fi-hel1', + 'plan' => 'production-small', + 'configuredStatus' => LoadBalancerServiceConfiguredStatus::Started->value, + 'frontends' => [ + new LoadBalancerFrontendCreate([ + 'name' => 'my-frontend', + 'port' => 80, + 'mode' => LoadBalancerFrontendMode::Http->value, + 'defaultBackend' => 'my-backend', + ]), + ], + ]), +); +``` + +#### Parameters + +**$name:** `string` β€” Name of the service + +**$zone:** `string` β€” Zone + +**$plan:** `string` β€” Plan + +**$configuredStatus:** `string` + +**$frontends:** `array` β€” Service frontends + +**$backends:** `?array` β€” Service backends + +**$resolvers:** `?array` β€” Service resolvers + +**$networkUuid:** `?string` β€” Private Network UUID + +**$networks:** `?array` β€” Service networks + +**$labels:** `?array` β€” Labels + +**$maintenanceDow:** `?string` + +**$maintenanceTime:** `?string` + +**$ipAddresses:** `?array` β€” List of IP addresses for the network + +
+ +
+$client->loadBalancer->getLoadBalancer($serviceUuid) -> LoadBalancerService + +#### Description + +Returns load balancer service details by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->replaceLoadBalancer($serviceUuid, $request) -> LoadBalancerService + +#### Description + +Replaces existing load balancer service by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->replaceLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', + new LoadBalancerServiceReplace([ + 'name' => 'my-loadbalancer', + 'plan' => 'production', + 'configuredStatus' => LoadBalancerServiceConfiguredStatus::Started->value, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$name:** `string` β€” Name of the service + +**$plan:** `string` β€” Plan + +**$configuredStatus:** `string` + +**$frontends:** `?array` β€” Service frontends + +**$backends:** `?array` β€” Service backends + +**$resolvers:** `?array` β€” Service resolvers + +**$labels:** `?array` β€” Labels + +**$maintenanceDow:** `?string` + +**$maintenanceTime:** `?string` + +**$ipAddresses:** `?array` β€” List of IP addresses for the network + +
+ +
+$client->loadBalancer->deleteLoadBalancer($serviceUuid) + +#### Description + +Deletes existing load balancer service by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->modifyLoadBalancer($serviceUuid, $request) -> LoadBalancerService + +#### Description + +Modifies existing load balancer service by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', + new LoadBalancerServiceModify([ + 'name' => 'updated-loadbalancer', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$name:** `?string` β€” Name of the service + +**$plan:** `?string` β€” Plan + +**$configuredStatus:** `?string` + +**$frontends:** `?array` β€” Service frontends + +**$backends:** `?array` β€” Service backends + +**$resolvers:** `?array` β€” Service resolvers + +**$labels:** `?array` β€” Labels + +**$maintenanceDow:** `?string` + +**$maintenanceTime:** `?string` + +**$ipAddresses:** `?array` β€” List of IP addresses for the network + +
+ +
+$client->loadBalancer->listLoadBalancerFrontends($serviceUuid) -> array + +#### Description + +Returns a list of available service frontends by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerFrontends( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->createLoadBalancerFrontend($serviceUuid, $request) -> LoadBalancerFrontend + +#### Description + +Creates a new service frontend by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerFrontendRequest([ + 'body' => new LoadBalancerFrontendCreate([ + 'name' => 'my-frontend', + 'port' => 80, + 'mode' => LoadBalancerFrontendMode::Http->value, + 'defaultBackend' => 'my-backend', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$request:** `LoadBalancerFrontendCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerFrontend($serviceUuid, $frontendName) -> LoadBalancerFrontend + +#### Description + +Returns service frontend details by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+ +
+$client->loadBalancer->deleteLoadBalancerFrontend($serviceUuid, $frontendName) + +#### Description + +Deletes existing frontend by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+ +
+$client->loadBalancer->modifyLoadBalancerFrontend($serviceUuid, $frontendName, $request) -> LoadBalancerFrontend + +#### Description + +Modifies existing service frontend by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new LoadBalancerFrontendModify([ + 'name' => 'updated-frontend', + 'port' => 443, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$name:** `?string` β€” Name of the frontend + +**$port:** `?int` β€” Port to listen + +**$mode:** `?string` + +**$defaultBackend:** `?string` β€” Default backend + +**$properties:** `?LoadBalancerFrontendPropertiesCreate` + +**$networks:** `?array` β€” Network names + +**$tlsConfigs:** `?array` β€” TLS Configs + +**$rules:** `?array` β€” Rules + +
+ +
+$client->loadBalancer->listLoadBalancerFrontendTlsConfigs($serviceUuid, $frontendName) -> array + +#### Description + +Returns a list of available frontend TLS configs by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerFrontendTlsConfigs( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+ +
+$client->loadBalancer->createLoadBalancerFrontendTlsConfig($serviceUuid, $frontendName, $request) -> LoadBalancerTlsConfig + +#### Description + +Creates a new TLS config by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new CreateLoadBalancerFrontendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigCreate([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$request:** `LoadBalancerTlsConfigCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerFrontendTlsConfig($serviceUuid, $frontendName, $tlsConfigName) -> LoadBalancerTlsConfig + +#### Description + +Returns frontend TLS config details by given {service-uuid}, {frontend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-tls-config-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+ +
+$client->loadBalancer->deleteLoadBalancerFrontendTlsConfig($serviceUuid, $frontendName, $tlsConfigName) + +#### Description + +Deletes existing TLS config by given {service-uuid}, {frontend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-tls-config-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+ +
+$client->loadBalancer->modifyLoadBalancerFrontendTlsConfig($serviceUuid, $frontendName, $tlsConfigName, $request) -> LoadBalancerTlsConfig + +#### Description + +Modifies existing TLS config by given {service-uuid}, {frontend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-tls-config-1', + new ModifyLoadBalancerFrontendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigModify([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +**$request:** `LoadBalancerTlsConfigModify` + +
+ +
+$client->loadBalancer->listLoadBalancerRules($serviceUuid, $frontendName) -> array + +#### Description + +Returns a list of available frontend rules by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerRules( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+ +
+$client->loadBalancer->createLoadBalancerRule($serviceUuid, $frontendName, $request) -> LoadBalancerRule + +#### Description + +Creates a new rule by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new CreateLoadBalancerRuleRequest([ + 'body' => new LoadBalancerRuleCreate([ + 'name' => 'my-rule', + 'priority' => 10, + 'matchingCondition' => LoadBalancerMatchingCondition::And_->value, + 'matchers' => [ + new LoadBalancerMatcherCreateMatchSrcIp([ + 'type' => LoadBalancerMatcherCreateMatchSrcIpType::SrcIp->value, + 'matchSrcIp' => new LoadBalancerMatcherIpCreate([ + 'value' => '192.168.1.1', + ]), + ]), + ], + 'actions' => [ + new LoadBalancerActionCreateActionUseBackend([ + 'type' => LoadBalancerActionCreateActionUseBackendType::UseBackend->value, + 'actionUseBackend' => new LoadBalancerActionUseBackendCreate([ + 'backend' => 'backend-1', + ]), + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$request:** `LoadBalancerRuleCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerRule($serviceUuid, $frontendName, $ruleName) -> LoadBalancerRule + +#### Description + +Returns frontend rule details by given {service-uuid}, {frontend-name}, and {rule-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$ruleName:** `string` β€” The unique identifier for the rule. + +
+ +
+$client->loadBalancer->replaceLoadBalancerRule($serviceUuid, $frontendName, $ruleName, $request) -> LoadBalancerRule + +#### Description + +Replaces existing rule by given {service-uuid}, {frontend-name}, and {rule-name}. + +#### Usage + +```php +$client->loadBalancer->replaceLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', + new ReplaceLoadBalancerRuleRequest([ + 'body' => new LoadBalancerRuleCreate([ + 'name' => 'my-rule', + 'priority' => 10, + 'matchingCondition' => LoadBalancerMatchingCondition::And_->value, + 'matchers' => [ + new LoadBalancerMatcherCreateMatchSrcIp([ + 'type' => LoadBalancerMatcherCreateMatchSrcIpType::SrcIp->value, + 'matchSrcIp' => new LoadBalancerMatcherIpCreate([ + 'value' => '192.168.1.1', + ]), + ]), + ], + 'actions' => [ + new LoadBalancerActionCreateActionUseBackend([ + 'type' => LoadBalancerActionCreateActionUseBackendType::UseBackend->value, + 'actionUseBackend' => new LoadBalancerActionUseBackendCreate([ + 'backend' => 'backend-1', + ]), + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$ruleName:** `string` β€” The unique identifier for the rule. + +**$request:** `LoadBalancerRuleCreate` + +
+ +
+$client->loadBalancer->deleteLoadBalancerRule($serviceUuid, $frontendName, $ruleName) + +#### Description + +Deletes existing rule by given {service-uuid}, {frontend-name}, and {rule-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$ruleName:** `string` β€” The unique identifier for the rule. + +
+ +
+$client->loadBalancer->modifyLoadBalancerRule($serviceUuid, $frontendName, $ruleName, $request) -> LoadBalancerRule + +#### Description + +Modifies existing rule by given {service-uuid}, {frontend-name}, and {rule-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', + new LoadBalancerRuleModify([ + 'name' => 'updated-rule', + 'priority' => 10, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$ruleName:** `string` β€” The unique identifier for the rule. + +**$name:** `?string` β€” Name of the rule + +**$priority:** `?int` β€” Priority + +**$matchingCondition:** `?string` + +**$matchers:** `?array` β€” Rule matchers + +**$actions:** `?array` β€” Rule actions + +
+ +
+$client->loadBalancer->listLoadBalancerBackends($serviceUuid) -> array + +#### Description + +Returns a list of available service backends by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerBackends( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->createLoadBalancerBackend($serviceUuid, $request) -> LoadBalancerBackend + +#### Description + +Creates a new backend by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerBackendRequest([ + 'body' => new LoadBalancerBackendCreate([ + 'name' => 'my-backend', + 'members' => [ + new LoadBalancerMemberCreateZero([ + 'type' => LoadBalancerMemberCreateZeroType::Static_->value, + 'ip' => 'ip', + 'port' => 1, + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$request:** `LoadBalancerBackendCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerBackend($serviceUuid, $backendName) -> LoadBalancerBackend + +#### Description + +Returns service backend details by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +
+ +
+$client->loadBalancer->deleteLoadBalancerBackend($serviceUuid, $backendName) + +#### Description + +Deletes existing backend by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +
+ +
+$client->loadBalancer->modifyLoadBalancerBackend($serviceUuid, $backendName, $request) -> LoadBalancerBackend + +#### Description + +Modifies existing backend by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new LoadBalancerBackendModify([ + 'name' => 'updated-backend', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$name:** `?string` β€” Name of the backend + +**$members:** `?array` β€” Backend members + +**$tlsConfigs:** `?array` β€” TLS Configs + +**$resolver:** `?string` β€” Resolver reference + +**$properties:** `?LoadBalancerBackendPropertiesCreate` + +
+ +
+$client->loadBalancer->listLoadBalancerMembers($serviceUuid, $backendName) -> array + +#### Description + +Returns a list of available backend members by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerMembers( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +
+ +
+$client->loadBalancer->createLoadBalancerMember($serviceUuid, $backendName, $request) -> LoadBalancerMember + +#### Description + +Creates a new member by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new CreateLoadBalancerMemberRequest([ + 'body' => new LoadBalancerMemberCreateZero([ + 'type' => LoadBalancerMemberCreateZeroType::Static_->value, + 'ip' => 'ip', + 'port' => 1, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$request:** `LoadBalancerMemberCreateZero|LoadBalancerMemberCreateOne` + +
+ +
+$client->loadBalancer->getLoadBalancerMember($serviceUuid, $backendName, $memberName) -> LoadBalancerMember + +#### Description + +Returns backend member details by given {service-uuid}, {backend-name} and {member-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$memberName:** `string` β€” The unique identifier for the member. + +
+ +
+$client->loadBalancer->deleteLoadBalancerMember($serviceUuid, $backendName, $memberName) + +#### Description + +Deletes existing member by given {service-uuid}, {backend-name} and {member-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$memberName:** `string` β€” The unique identifier for the member. + +
+ +
+$client->loadBalancer->modifyLoadBalancerMember($serviceUuid, $backendName, $memberName, $request) -> LoadBalancerMember + +#### Description + +Modifies existing member by given {service-uuid}, {backend-name} and {member-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', + new ModifyLoadBalancerMemberRequest([ + 'body' => new LoadBalancerMemberModifyZero([]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$memberName:** `string` β€” The unique identifier for the member. + +**$request:** `LoadBalancerMemberModifyZero|LoadBalancerMemberModifyOne` + +
+ +
+$client->loadBalancer->listLoadBalancerBackendTlsConfigs($serviceUuid, $backendName) -> array + +#### Description + +Returns a list of available backend TLS configs by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerBackendTlsConfigs( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +
+ +
+$client->loadBalancer->createLoadBalancerBackendTlsConfig($serviceUuid, $backendName, $request) -> LoadBalancerTlsConfig + +#### Description + +Creates a new TLS config by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new CreateLoadBalancerBackendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigCreate([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$request:** `LoadBalancerTlsConfigCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerBackendTlsConfig($serviceUuid, $backendName, $tlsConfigName) -> LoadBalancerTlsConfig + +#### Description + +Returns backend TLS config details by given {service-uuid}, {backend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'example-tls-config-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+ +
+$client->loadBalancer->deleteLoadBalancerBackendTlsConfig($serviceUuid, $backendName, $tlsConfigName) + +#### Description + +Deletes existing TLS config by given {service-uuid}, {backend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'example-tls-config-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+ +
+$client->loadBalancer->modifyLoadBalancerBackendTlsConfig($serviceUuid, $backendName, $tlsConfigName, $request) -> LoadBalancerTlsConfig + +#### Description + +Modifies existing TLS config by given {service-uuid}, {backend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'example-tls-config-1', + new ModifyLoadBalancerBackendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigModify([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +**$request:** `LoadBalancerTlsConfigModify` + +
+ +
+$client->loadBalancer->modifyLoadBalancerNetwork($serviceUuid, $networkName, $request) -> LoadBalancerNetwork + +#### Description + +Modifies existing service network by given {service-uuid} and {network-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-network-1', + new LoadBalancerNetworkModify([ + 'name' => 'updated-network', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$networkName:** `string` β€” The unique identifier for the network. + +**$name:** `?string` β€” Name of the network + +
+ +
+$client->loadBalancer->listLoadBalancerIpAddresses($serviceUuid) -> array + +#### Description + +Returns a list of available IP addresses by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerIpAddresses( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->createLoadBalancerIpAddress($serviceUuid, $request) -> LoadBalancerIpAddress + +#### Description + +Attach a floating public IPv4 address to the service using the specified {service-uuid}. The number of attachable floating IPv4 addresses is limited to the number of nodes in the plan, and all addresses must be in the same zone as the service and detached. + +Note: Floating public IPv4 addresses have configurable release policies. When the service is deleted or an IP address is detached, addresses with the keep policy will be converted to detached floating IPs that remain available in your account. Addresses with the release policy will be automatically deleted. For more details, see IP Addresses. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerIpAddress( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerIpAddressRequest([ + 'body' => new LoadBalancerIpAddressCreate([ + 'address' => '192.168.1.10', + 'networkName' => 'private-net-1', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$request:** `LoadBalancerIpAddressCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerIpAddress($serviceUuid, $ipAddress) -> array + +#### Description + +Returns IP address details by given {service-uuid} and {ip-address}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerIpAddress( + '01234567-89ab-cdef-0123-456789abcdef', + '192.168.1.1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$ipAddress:** `string` β€” The unique identifier for the IP address. + +
+ +
+$client->loadBalancer->deleteLoadBalancerIpAddress($serviceUuid, $ipAddress) + +#### Description + +Detach a floating public IPv4 address from the service by given {service-uuid} and {address}. + Depending on the release policy, the customer retains the floating IP if the policy is set to keep. + If the policy is set to release, the floating IP will be deleted. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerIpAddress( + '01234567-89ab-cdef-0123-456789abcdef', + '192.168.1.1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$ipAddress:** `string` β€” The unique identifier for the IP address. + +
+ +
+$client->loadBalancer->listLoadBalancerResolvers($serviceUuid) -> array + +#### Description + +Returns a list of available service domain name resolvers by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerResolvers( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->createLoadBalancerResolver($serviceUuid, $request) -> LoadBalancerResolver + +#### Description + +Creates a new resolver by given {service-uuid}. + +Resolver is a DNS server usually residing in a user's private network. It's used to resolve IPs for backend members of type dynamic. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerResolverRequest([ + 'body' => new LoadBalancerResolverCreate([ + 'name' => 'default-resolver', + 'nameservers' => [ + '1.1.1.1:53', + '8.8.8.8:53', + ], + 'retries' => 3, + 'timeout' => 5, + 'timeoutRetry' => 3, + 'cacheValid' => 300, + 'cacheInvalid' => 60, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$request:** `LoadBalancerResolverCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerResolver($serviceUuid, $resolverName) -> LoadBalancerResolver + +#### Description + +Returns backend resolver details by given {service-uuid} and {resolver-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-resolver-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$resolverName:** `string` β€” The unique identifier for the resolver. + +
+ +
+$client->loadBalancer->deleteLoadBalancerResolver($serviceUuid, $resolverName) + +#### Description + +Deletes existing resolver by given {service-uuid} and {resolver-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-resolver-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$resolverName:** `string` β€” The unique identifier for the resolver. + +
+ +
+$client->loadBalancer->modifyLoadBalancerResolver($serviceUuid, $resolverName, $request) -> LoadBalancerResolver + +#### Description + +Modifies existing resolver by given {service-uuid} and {resolver-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-resolver-1', + new LoadBalancerResolverModify([ + 'name' => 'default-resolver', + 'nameservers' => [ + '1.1.1.1:53', + '8.8.8.8:53', + ], + 'retries' => 3, + 'timeout' => 5, + 'timeoutRetry' => 3, + 'cacheValid' => 300, + 'cacheInvalid' => 60, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$resolverName:** `string` β€” The unique identifier for the resolver. + +**$name:** `?string` β€” Name of the resolver + +**$nameservers:** `?array` β€” Nameservers + +**$retries:** `?int` β€” Number of retries on failure + +**$timeout:** `?int` β€” Timeout for the query in seconds + +**$timeoutRetry:** `?int` β€” Timeout for the query retries in seconds + +**$cacheValid:** `?int` β€” Time in seconds to cache valid results + +**$cacheInvalid:** `?int` β€” Time in seconds to cache invalid results + +
+ +
+$client->loadBalancer->listLoadBalancerLabels($serviceUuid) -> array + +#### Description + +Returns a list of available service labels by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->createLoadBalancerLabel($serviceUuid, $request) -> LoadBalancerLabelResponse + +#### Description + +Creates a new label by given {service-uuid}. + +Labels used for service filtering. + +Service labels usage examples +Below are some examples of what certain GET requests might look like. + +exact match: GET /1.3/load-balancer?label=env%3Dstaging +existence: GET /1.3/load-balancer?label=env +multiple: GET /1.3/load-balancer?label=env&label=foo%3Dbar + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerLabelRequest([ + 'body' => new LoadBalancerLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$request:** `LoadBalancerLabelCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerLabel($serviceUuid, $labelKey) -> LoadBalancerLabelResponse + +#### Description + +Returns label details by given {service-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$labelKey:** `string` β€” The unique identifier for the label. + +
+ +
+$client->loadBalancer->deleteLoadBalancerLabel($serviceUuid, $labelKey) + +#### Description + +Deletes existing label by given {service-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$labelKey:** `string` β€” The unique identifier for the label. + +
+ +
+$client->loadBalancer->modifyLoadBalancerLabel($serviceUuid, $labelKey, $request) -> LoadBalancerLabelResponse + +#### Description + +Modifies existing label by given {service-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', + new ModifyLoadBalancerLabelRequest([ + 'body' => new LoadBalancerLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$labelKey:** `string` β€” The unique identifier for the label. + +**$request:** `LoadBalancerLabelModify` + +
+ +
+$client->loadBalancer->getLoadBalancerMetrics($serviceUuid) -> LoadBalancerMetrics + +#### Description + +Returns service metrics by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerMetrics( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->getLoadBalancerMetricsSeries($serviceUuid) -> array + +#### Description + +Returns service metric series by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->getLoadBalancerFrontendCombinedMetricsSeries($serviceUuid, $request) -> array + +#### Description + +Returns combined frontend metric series by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerFrontendCombinedMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + new GetLoadBalancerFrontendCombinedMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->getLoadBalancerFrontendMetricsSeries($serviceUuid, $frontendName, $request) -> array + +#### Description + +Returns frontend metric series by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerFrontendMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new GetLoadBalancerFrontendMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->getLoadBalancerBackendCombinedMetricsSeries($serviceUuid, $request) -> array + +#### Description + +Returns combined backend metric series by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerBackendCombinedMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + new GetLoadBalancerBackendCombinedMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->getLoadBalancerBackendMetricsSeries($serviceUuid, $backendName, $request) -> array + +#### Description + +Returns backend metric series by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerBackendMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new GetLoadBalancerBackendMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->getLoadBalancerMemberCombinedMetricsSeries($serviceUuid, $backendName, $request) -> LoadBalancerMemberMetricsSeriesResponse + +#### Description + +Returns combined backend members metric series by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerMemberCombinedMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new GetLoadBalancerMemberCombinedMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->getLoadBalancerMemberMetricsSeries($serviceUuid, $backendName, $memberName, $request) -> LoadBalancerMemberMetricsSeriesResponse + +#### Description + +Returns backend member metric series by given {service-uuid}, {backend-name}, and {member-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerMemberMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', + new GetLoadBalancerMemberMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$memberName:** `string` β€” The unique identifier for the member. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->listLoadBalancerCertificateBundles($request) -> array + +#### Description + +Returns a list of available certificate bundles. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerCertificateBundles( + new ListLoadBalancerCertificateBundlesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$label:** `?string` β€” Filter resources by label. Can be provided multiple times for multiple labels. Format: 'key=value' for exact match or 'key' for existence check. + +
+ +
+$client->loadBalancer->createLoadBalancerCertificateBundle($request) -> LoadBalancerCertificateBundle + +#### Description + +Creates a new certificate bundle. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerCertificateBundle( + new LoadBalancerCertificateBundleCreateZero([ + 'type' => LoadBalancerCertificateBundleCreateZeroType::Manual->value, + ]), +); +``` + +#### Parameters + +**$request:** `LoadBalancerCertificateBundleCreateZero|LoadBalancerCertificateBundleCreateCertificate|LoadBalancerCertificateBundleCreateType` + +
+ +
+$client->loadBalancer->getLoadBalancerCertificateBundle($bundleUuid) -> LoadBalancerCertificateBundle + +#### Description + +Returns certificate bundle details by given {bundle-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerCertificateBundle( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+ +
+$client->loadBalancer->deleteLoadBalancerCertificateBundle($bundleUuid) + +#### Description + +Deletes existing certificate bundle by given {bundle-uuid}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerCertificateBundle( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+ +
+$client->loadBalancer->modifyLoadBalancerCertificateBundle($bundleUuid, $request) -> LoadBalancerCertificateBundle + +#### Description + +Modifies existing a manual, dynamic or authority certificate bundle by given {bundle-uuid}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerCertificateBundle( + '01234567-89ab-cdef-0123-456789abcdef', + new ModifyLoadBalancerCertificateBundleRequest([ + 'body' => new LoadBalancerCertificateBundleManualModify([ + 'name' => 'updated-manual-cert', + ]), + ]), +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +**$request:** `LoadBalancerCertificateBundleManualModify|LoadBalancerCertificateBundleDynamicModify|LoadBalancerCertificateBundleAuthorityModify` + +
+ +
+$client->loadBalancer->listLoadBalancerCertificateBundleLabels($bundleUuid) -> array + +#### Description + +Returns a list of available certificate bundle labels by given {bundle-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerCertificateBundleLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+ +
+$client->loadBalancer->createLoadBalancerCertificateBundleLabel($bundleUuid, $request) -> LoadBalancerLabelResponse + +#### Description + +Creates a new label by given {bundle-uuid}. + +Labels used for certificate bundles filtering. + +Certificate bundle labels usage examples +Below are some examples of what certain GET requests might look like. + +exact match: GET /1.3/load-balancer/certificate-bundles?label=env%3Dstaging +existence: GET /1.3/load-balancer/certificate-bundles?label=env +multiple: GET /1.3/load-balancer/certificate-bundles?label=env&label=foo%3Dbar + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerCertificateBundleLabelRequest([ + 'body' => new LoadBalancerLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +**$request:** `LoadBalancerLabelCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerCertificateBundleLabel($bundleUuid, $labelKey) -> LoadBalancerLabelResponse + +#### Description + +Returns label details by given {bundle-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +**$labelKey:** `string` β€” The unique identifier for the label. + +
+ +
+$client->loadBalancer->deleteLoadBalancerCertificateBundleLabel($bundleUuid, $labelKey) + +#### Description + +Deletes existing label by given {bundle-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +**$labelKey:** `string` β€” The unique identifier for the label. + +
+ +
+$client->loadBalancer->modifyLoadBalancerCertificateBundleLabel($bundleUuid, $labelKey, $request) -> LoadBalancerLabelResponse + +#### Description + +Modifies existing label by given {bundle-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', + new ModifyLoadBalancerCertificateBundleLabelRequest([ + 'body' => new LoadBalancerLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +**$labelKey:** `string` β€” The unique identifier for the label. + +**$request:** `LoadBalancerLabelModify` + +
+ +
+$client->loadBalancer->getLoadBalancerDnsChallengeDomain() -> LoadBalancerDnsChallengeDomainResponse + +#### Description + +Returns DNS challenge domain. + +This can be used to validate domain ownership using the ACME challenge method. To validate your domain, you need to add CNAME record to the domain provided by this API to your DNS settings. The name/host of the CNAME record should be _acme-challenge or _acme-challenge.mysubdomain if you are setting up a subdomain called mysubdomain. The target/points to of the record needs to be set to the value returned by this API. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerDnsChallengeDomain(); +``` + +
+ +
+$client->loadBalancer->listLoadBalancerPlans($request) -> array + +#### Description + +Returns a list of available load balancer plans. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerPlans( + new ListLoadBalancerPlansRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +
+ +
+$client->loadBalancer->getLoadBalancerPlan($planName) -> LoadBalancerPlan + +#### Description + +Returns load balancer plan details by given {plan-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerPlan( + 'example-plan-1', +); +``` + +#### Parameters + +**$planName:** `string` β€” The unique identifier for the plan. + +
+ +## firewall-ruleset +{:#firewall-rulesetAnchor} + +
+$client->firewallRuleset->listFirewallRulesets($request) -> array + +#### Description + +Returns a list of firewall rulesets. + +#### Usage + +```php +$client->firewallRuleset->listFirewallRulesets( + new ListFirewallRulesetsRequest([ + 'limit' => 10, + 'offset' => 0, + 'sort' => 'name', + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->firewallRuleset->createFirewallRuleset($request) -> FirewallRulesetDetailResponse + +#### Description + +Creates a new firewall ruleset. + +#### Usage + +```php +$client->firewallRuleset->createFirewallRuleset( + new CreateFirewallRuleset([ + 'name' => 'example_firewall_ruleset', + 'stateful' => true, + 'enabled' => false, + 'defaultDnsRulesEnabled' => false, + ]), +); +``` + +#### Parameters + +**$name:** `string` β€” Name of the firewall ruleset + +**$description:** `?string` β€” Description of the firewall ruleset + +**$stateful:** `?bool` + +**$enabled:** `?bool` + +**$defaultDnsRulesEnabled:** `?bool` + +**$labels:** `?array` β€” Labels + +
+ +
+$client->firewallRuleset->getFirewallRuleset($rulesetUuid) -> FirewallRulesetDetailResponse + +#### Description + +Returns firewall ruleset details by given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->getFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+ +
+$client->firewallRuleset->deleteFirewallRuleset($rulesetUuid) + +#### Description + +Deletes existing firewall ruleset by given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->deleteFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+ +
+$client->firewallRuleset->modifyFirewallRuleset($rulesetUuid, $request) -> FirewallRulesetDetailResponse + +#### Description + +Modifies existing firewall ruleset by given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->modifyFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetModify([ + 'name' => 'modified_example_firewall_ruleset', + 'description' => 'Modified example stateless firewall ruleset', + 'labels' => [ + new FirewallRulesetCreateLabel([ + 'key' => 'dev', + 'value' => 'dev-1', + ]), + ], + 'enabled' => false, + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$name:** `?string` β€” Name of the ruleset + +**$description:** `?string` β€” Description of the firewall ruleset + +**$labels:** `?array` β€” Labels + +**$enabled:** `?bool` β€” Enabled + +**$defaultDnsRulesEnabled:** `?bool` + +
+ +
+$client->firewallRuleset->restoreFirewallRuleset($rulesetUuid, $rulesetVersion) -> FirewallRulesetDetailResponse + +#### Description + +Restores existing firewall ruleset by given {ruleset-uuid} and {ruleset-version}. + +#### Usage + +```php +$client->firewallRuleset->restoreFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', + 1, +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$rulesetVersion:** `int` β€” Firewall ruleset version + +
+ +
+$client->firewallRuleset->listFirewallRulesetRules($rulesetUuid, $request) -> FirewallRulesetFirewallRuleListResponse + +#### Description + +Returns firewall ruleset rules. + +#### Usage + +```php +$client->firewallRuleset->listFirewallRulesetRules( + '01234567-89ab-cdef-0123-456789abcdef', + new ListFirewallRulesetRulesRequest([ + 'limit' => 10, + 'offset' => 0, + 'sort' => 'name', + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->firewallRuleset->createFirewallRulesetRule($rulesetUuid, $request) -> FirewallRulesetRuleDetailResponse + +#### Description + +Creates a new firewall ruleset rule by the given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->createFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateFirewallRulesetRuleRequest([ + 'body' => new FirewallRulesetFirewallRuleCreate([ + 'enabled' => false, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'direction' => FirewallRulesetRuleDirection::In->value, + 'family' => FirewallRulesetRuleFamily::IPv4->value, + 'protocol' => FirewallRulesetRuleProtocol::Tcp->value, + ]), + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$request:** `FirewallRulesetFirewallRuleCreate` + +
+ +
+$client->firewallRuleset->createMultipleFirewallRulesetRule($rulesetUuid, $request) -> FirewallRulesetFirewallRuleListResponse + +#### Description + +Creates multiple firewall ruleset rules by the given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->createMultipleFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetFirewallMultipleRuleCreate([ + 'rules' => [ + new FirewallRulesetFirewallRuleCreate([ + 'enabled' => false, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'direction' => FirewallRulesetRuleDirection::In->value, + 'family' => FirewallRulesetRuleFamily::IPv4->value, + 'protocol' => FirewallRulesetRuleProtocol::Tcp->value, + ]), + ], + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$rules:** `array` + +
+ +
+$client->firewallRuleset->getFirewallRulesetRule($rulesetUuid, $ruleId) -> FirewallRulesetRuleDetailResponse + +#### Description + +Returns firewall ruleset rule details. + +#### Usage + +```php +$client->firewallRuleset->getFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$ruleId:** `string` β€” Firewall ruleset rule UUID + +
+ +
+$client->firewallRuleset->deleteFirewallRulesetRule($rulesetUuid, $ruleId) + +#### Description + +Deletes an existing rule by given {ruleset-uuid} and {rule-uuid}. + +#### Usage + +```php +$client->firewallRuleset->deleteFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$ruleId:** `string` β€” Firewall ruleset rule UUID + +
+ +
+$client->firewallRuleset->modifyFirewallRulesetRule($rulesetUuid, $ruleId, $request) -> FirewallRulesetRuleDetailResponse + +#### Description + +Modifies existing firewall ruleset rule by given {ruleset_uuid} and {rule-uuid}. + +#### Usage + +```php +$client->firewallRuleset->modifyFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetFirewallRuleModify([ + 'enabled' => false, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'direction' => FirewallRulesetRuleDirection::In->value, + 'family' => FirewallRulesetRuleFamily::IPv4->value, + 'protocol' => FirewallRulesetRuleProtocol::Tcp->value, + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$ruleId:** `string` β€” Firewall ruleset rule UUID + +**$enabled:** `?bool` β€” Enabled + +**$action:** `?string` + +**$comment:** `?string` β€” Comments + +**$destinationAddressStart:** `?string` + +**$destinationAddressEnd:** `?string` + +**$destinationPortStart:** `?int` + +**$destinationPortEnd:** `?int` + +**$destinationAddressCidr:** `?string` + +**$direction:** `?string` + +**$family:** `?string` + +**$icmpType:** `?int` + +**$position:** `?int` + +**$protocol:** `?string` + +**$sourceAddressStart:** `?string` + +**$sourceAddressEnd:** `?string` + +**$sourcePortStart:** `?int` + +**$sourcePortEnd:** `?int` + +**$sourceAddressCidr:** `?string` + +
+ +
+$client->firewallRuleset->listFirewallRulesetLabels($rulesetUuid) -> array + +#### Description + +Returns a list of available firewall ruleset labels by given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->listFirewallRulesetLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+ +
+$client->firewallRuleset->createFirewallRulesetLabel($rulesetUuid, $request) -> FirewallRulesetLabelDetailResponse + +#### Description + +Creates a new label by given {ruleset-uuid}. Labels are used for group filtering. + +#### Usage + +```php +$client->firewallRuleset->createFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateFirewallRulesetLabelRequest([ + 'body' => new FirewallRulesetCreateLabel([ + 'key' => 'dev', + 'value' => 'dev-1', + ]), + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$request:** `FirewallRulesetCreateLabel` + +
+ +
+$client->firewallRuleset->listFirewallRulesetAttachedServers($rulesetUuid) -> array + +#### Description + +Returns a list of servers that are attached to the firewall ruleset by given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->listFirewallRulesetAttachedServers( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+ +
+$client->firewallRuleset->getFirewallRulesetLabel($rulesetUuid, $labelKey) -> FirewallRulesetLabelDetailResponse + +#### Description + +Returns label details by given {ruleset-uuid} and {label-key}. + +#### Usage + +```php +$client->firewallRuleset->getFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->firewallRuleset->deleteFirewallRulesetLabel($rulesetUuid, $labelKey) + +#### Description + +Deletes existing label by given {ruleset-uuid} and {label-key}. + +#### Usage + +```php +$client->firewallRuleset->deleteFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->firewallRuleset->modifyFirewallRulesetLabel($rulesetUuid, $labelKey, $request) -> FirewallRulesetLabelDetailResponse + +#### Description + +Modifies existing label by given {ruleset-uuid} and {label-key}. + +#### Usage + +```php +$client->firewallRuleset->modifyFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + new FirewallRulesetLabelModify([ + 'key' => 'foo', + 'value' => 'bar', + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$labelKey:** `string` β€” The key of the label. + +**$key:** `?string` + +**$value:** `?string` + +
+ +
+$client->firewallRuleset->listServerFirewallRule($serverUuid, $request) -> FirewallRulesetServerFirewallDetailResponse + +#### Description + +Returns a list of server firewall rules. + +#### Usage + +```php +$client->firewallRuleset->listServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + new ListServerFirewallRuleRequest([ + 'limit' => 10, + 'offset' => 0, + 'sort' => 'name', + ]), +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Server UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->firewallRuleset->createServerFirewallRule($serverUuid, $request) -> FirewallRulesetServerFirewallRuleDetail + +#### Description + +Creates a new server firewall rule. + +#### Usage + +```php +$client->firewallRuleset->createServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetServerFirewallRuleCreate([ + 'firewallRule' => new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::In->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'destinationAddressStart' => '', + 'destinationAddressEnd' => '', + 'sourceAddressStart' => '192.168.1.1', + 'sourceAddressEnd' => '192.168.1.255', + 'comment' => 'Allow SSH from this network', + ]), + ]), +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Server UUID + +**$firewallRule:** `FirewallRulesetServerFirewallRule` + +
+ +
+$client->firewallRuleset->createMultipleServerFirewallRules($serverUuid, $request) -> FirewallRulesetServerFirewallDetailResponse + +#### Description + +Creates multiple server firewall rules by given {server-uuid}. + +#### Usage + +```php +$client->firewallRuleset->createMultipleServerFirewallRules( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetServerMultipleFirewallRulesCreate([ + 'firewallRules' => new FirewallRulesetServerMultipleFirewallRulesCreateFirewallRules([ + 'firewallRule' => [ + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::In->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'sourceAddressStart' => '192.168.1.1', + 'sourceAddressEnd' => '192.168.1.255', + 'comment' => 'Allow SSH from this network', + ]), + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::In->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'sourceAddressStart' => '1.1.1.1', + 'sourceAddressEnd' => '1.1.1.1', + 'comment' => 'Allow DNS from this network', + ]), + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::Out->value, + 'action' => FirewallRulesetRuleAction::Drop->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'destinationAddressStart' => '100.100.128.2', + 'destinationAddressEnd' => '100.100.128.2', + 'comment' => 'dfg', + ]), + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::Out->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv6', + 'protocol' => 'icmp', + 'destinationAddressStart' => '2a04:3540:1001:1000:1411:4dff:fea5:1bab', + 'destinationAddressEnd' => '2a04:3540:1001:1000:1411:4dff:fea5:1bab', + 'comment' => "'w???''?p'2'?12??12?3?'231", + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Server UUID + +**$firewallRules:** `?FirewallRulesetServerMultipleFirewallRulesCreateFirewallRules` + +
+ +
+$client->firewallRuleset->getServerFirewallRule($serverUuid, $position) -> FirewallRulesetServerFirewallRuleDetail + +#### Description + +Returns server firewall rule details by given {server-uuid} and {position}. + +#### Usage + +```php +$client->firewallRuleset->getServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + 1, +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Server UUID + +**$position:** `int|string` β€” Server firewall rule position + +
+ +
+$client->firewallRuleset->deleteServerFirewallRule($serverUuid, $position) + +#### Description + +Deletes existing server firewall rule by given {server-uuid} and {position}. + +#### Usage + +```php +$client->firewallRuleset->deleteServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + 1, +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Server UUID + +**$position:** `int|string` β€” Server firewall rule position + +
+ +## vnc_keymap +{:#vnc_keymapAnchor} + +
+$client->vncKeymap->listVncKeymaps() -> VncKeymapKeymaps + +#### Description + +Retrieves a list of supported VNC keymaps. + +#### Usage + +```php +$client->vncKeymap->listVncKeymaps(); +``` + +
+ +## zone +{:#zoneAnchor} + +
+$client->zone->listZones() -> Zones + +#### Description + +Retrieves a list of zones. + +#### Usage + +```php +$client->zone->listZones(); +``` + +
+ +
+$client->zone->listZoneVlaNs($zone) -> ZoneVlans + +#### Description + +Retrieves a list of VLANs in a specific zone. + +#### Usage + +```php +$client->zone->listZoneVlaNs( + 'fi-hel1', +); +``` + +#### Parameters + +**$zone:** `string` β€” The zone identifier. + +
diff --git a/docs/v0.0.105/reference.md b/docs/v0.0.105/reference.md new file mode 100644 index 00000000..437d762e --- /dev/null +++ b/docs/v0.0.105/reference.md @@ -0,0 +1,13885 @@ +--- +layout: sdk +title: "API reference Β· v0.0.105" +version: "v0.0.105" +services: + - account + - kubernetes + - currency + - device + - events + - ip_address + - network-peering + - network + - audit-logs + - partner + - permission + - plan + - price + - router + - server-group + - server + - server_size + - storage + - tag + - timezone + - account-tokens + - object-storage-2 + - file-storage + - database + - gateway + - load-balancer + - firewall-ruleset + - vnc_keymap + - zone +--- +# API reference +## account +{:#accountAnchor} + +
+$client->account->details() -> Account + +#### Description + +Returns account details for the authenticated user + +#### Usage + +```php +$client->account->details(); +``` + +
+ +
+$client->account->getMonthlyDetailedBillingSummary($year, $month, $request) -> AccountBillingSummary + +#### Description + +Returns a billing summary grouped by resource, including billing detail changes during the specified month. The API user must have permission to read billing details. + +#### Usage + +```php +$client->account->getMonthlyDetailedBillingSummary( + 'year', + 'month', + new GetMonthlyDetailedBillingSummaryRequest([]), +); +``` + +#### Parameters + +**$year:** `string` β€” Billing year. + +**$month:** `string` β€” Billing month. + +**$username:** `?string` β€” Return the billing summary for this account instead of the calling account. Requires Partner API access and an existing association with the account. + +**$resourceId:** `?string` β€” Return details only for this resource UUID or IP address. + +
+ +
+$client->account->getMonthlyBillingSummary($year, $month) -> AccountBillingSummaryResponse + +#### Description + +Returns a billing summary for the specified month. The API user must have permission to read billing details. This endpoint is deprecated; use the monthly billing summary with resource details instead. + +#### Usage + +```php +$client->account->getMonthlyBillingSummary( + 'year', + 'month', +); +``` + +#### Parameters + +**$year:** `string` β€” Billing year. + +**$month:** `string` β€” Billing month. + +
+ +
+$client->account->getCurrentNetworkUsage() -> AccountCurrentNetworkUsage + +#### Description + +Returns the latest Network Transfer Pool usage report for the account. + +#### Usage + +```php +$client->account->getCurrentNetworkUsage(); +``` + +
+ +
+$client->account->listAccounts($request) -> Accounts + +#### Description + +Returns the main account and its subaccounts. Account listing is available only to the main account. + +#### Usage + +```php +$client->account->listAccounts( + new ListAccountsRequest([]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require all labels. Label keys are matched case-insensitively. + +
+ +
+$client->account->createMslmaSigningLink() -> AccountCreateMsLmaSigningLinkResponse + +#### Description + +Create a new Microsoft LMA signing link + +#### Usage + +```php +$client->account->createMslmaSigningLink(); +``` + +
+ +
+$client->account->getAccountNetworkTopUsage($request) -> AccountResourceNetworkUsage + +#### Description + +Returns the resources with the highest network usage. + +#### Usage + +```php +$client->account->getAccountNetworkTopUsage( + new GetAccountNetworkTopUsageRequest([ + 'from' => new DateTime('2026-07-01T00:00:00Z'), + 'to' => new DateTime('2026-07-01T00:00:00Z'), + 'zone' => 'fi-hel1', + ]), +); +``` + +#### Parameters + +**$from:** `DateTime` β€” Start of the usage period. + +**$to:** `DateTime` β€” End of the usage period. + +**$service:** `?string` β€” Filter by service type. Repeat the parameter to include multiple service types. + +**$zone:** `?string` β€” Filter by zone. Repeat the parameter to include multiple zones. + +**$accumulate:** `?string` β€” Accumulation period for the usage statistics. + +
+ +
+$client->account->getAccountNetworkUsage($request) -> AccountNetworkUsage + +#### Description + +Returns network transfer statistics. JSON responses support a maximum time window of 31 days; CSV responses have no time-window limit. Select the output format with the Accept header using application/json or text/csv. + +#### Usage + +```php +$client->account->getAccountNetworkUsage( + new GetAccountNetworkUsageRequest([ + 'from' => new DateTime('2026-07-01T00:00:00Z'), + 'to' => new DateTime('2026-07-01T00:00:00Z'), + ]), +); +``` + +#### Parameters + +**$from:** `DateTime` β€” First measurement timestamp in RFC 3339 format. + +**$to:** `DateTime` β€” Last measurement timestamp in RFC 3339 format. + +**$accumulate:** `?string` β€” Accumulate the transfer statistics by hour or day. + +
+ +
+$client->account->getAccountResourceUsage() -> array + +#### Description + +Returns current resource usage counts for the account. + +#### Usage + +```php +$client->account->getAccountResourceUsage(); +``` + +
+ +
+$client->account->getMonthlyResourceBillingSummary($resourceId, $year, $month) -> AccountResourceBillingSummaryResponse + +#### Description + +Returns a billing summary for one resource during the specified month. The API user must have permission to read billing details. + +#### Usage + +```php +$client->account->getMonthlyResourceBillingSummary( + 'resource_id', + 'year', + 'month', +); +``` + +#### Parameters + +**$resourceId:** `string` β€” Server UUID, storage UUID, or IP address. + +**$year:** `string` β€” Billing year. + +**$month:** `string` β€” Billing month. + +
+ +
+$client->account->getAccountResourceNetworkUsage($request) -> AccountResourceNetworkUsage + +#### Description + +Returns network transfer statistics grouped by resource, service, and zone. JSON responses support a maximum time window of 31 days; CSV responses have no time-window limit. Select the output format with the Accept header using application/json or text/csv. + +#### Usage + +```php +$client->account->getAccountResourceNetworkUsage( + new GetAccountResourceNetworkUsageRequest([ + 'from' => new DateTime('2026-07-01T00:00:00Z'), + 'to' => new DateTime('2026-07-01T00:00:00Z'), + 'resourceId' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'zone' => 'fi-hel1', + ]), +); +``` + +#### Parameters + +**$from:** `DateTime` β€” Data start timestamp in RFC 3339 format. + +**$to:** `DateTime` β€” Data end timestamp in RFC 3339 format. + +**$service:** `?string` β€” Limit results to a service type. Repeat the parameter to include multiple service types. + +**$resourceId:** `?string` β€” Limit results to this resource UUID. + +**$zone:** `?string` β€” Limit results to a zone. Repeat the parameter to include multiple zones. + +**$accumulate:** `?string` β€” Accumulate the transfer statistics by hour or day. + +
+ +
+$client->account->createSubaccount($request) + +#### Description + +Creates a subaccount for the authenticated main account. + +#### Usage + +```php +$client->account->createSubaccount( + new CreateSubaccountRequest([ + 'subAccount' => new CreateSubaccountRequestSubAccount([ + 'username' => 'myusername', + 'password' => 'mysecr3tPassword', + 'firstName' => 'first', + 'lastName' => 'last', + 'company' => 'my company name', + 'vatNumber' => 'my vat number', + 'address' => 'my address', + 'postalCode' => '00130', + 'city' => 'Helsinki', + 'state' => '', + 'country' => 'FIN', + 'email' => 'user@example.com', + 'phone' => '+358.31245434', + 'language' => 'en', + 'currency' => 'EUR', + 'timezone' => 'Europe/Helsinki', + 'allowApi' => AccountBooleanYesno::Yes->value, + 'allowGui' => AccountBooleanYesno::No->value, + 'roles' => new CreateSubaccountRequestSubAccountRoles([ + 'role' => [ + 'technical', + 'billing', + 'aux_billing', + ], + ]), + 'labels' => [ + new AccountLabel([ + 'key' => 'department', + 'value' => 'it', + ]), + ], + 'ipFilters' => new CreateSubaccountRequestSubAccountIpFilters([ + 'ipFilter' => [ + 'ip_filter', + ], + ]), + ]), + ]), +); +``` + +#### Parameters + +**$subAccount:** `CreateSubaccountRequestSubAccount` + +
+ +
+$client->account->deleteSubaccount($username) + +#### Description + +Deletes a subaccount from the authenticated main account. + +#### Usage + +```php +$client->account->deleteSubaccount( + 'username', +); +``` + +#### Parameters + +**$username:** `string` β€” Subaccount username. + +
+ +## kubernetes +{:#kubernetesAnchor} + +
+$client->kubernetes->listKubernetesClusters() -> array + +#### Description + +Returns a list of Kubernetes clusters. + +#### Usage + +```php +$client->kubernetes->listKubernetesClusters(); +``` + +
+ +
+$client->kubernetes->createKubernetesCluster($request) -> KubernetesCluster + +#### Description + +Creates a new Kubernetes cluster. + +#### Usage + +```php +$client->kubernetes->createKubernetesCluster( + new KubernetesCluster([ + 'controlPlaneIpFilter' => [ + '1.2.3.0/24', + '1.1.1.1', + ], + 'name' => 'example-cluster', + 'network' => '33333333-3333-3333-333333333333', + 'networkCidr' => '172.16.0.0/24', + 'nodeGroups' => [ + new KubernetesNodeGroup([ + 'count' => 4, + 'kubeletArgs' => [ + new KubernetesKubeletArg([ + 'key' => 'log-flush-frequency', + 'value' => '5s', + ]), + ], + 'labels' => [ + new KubernetesLabel([ + 'key' => 'managedBy', + 'value' => 'exampleDevelopmentTeam', + ]), + new KubernetesLabel([ + 'key' => 'environment', + 'value' => 'development', + ]), + ], + 'name' => 'small', + 'plan' => 'K8S-2xCPU-4GB', + 'sshKeys' => [ + 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV', + ], + 'storage' => '01000000-0000-4000-8000-000160010100', + 'taints' => [ + new KubernetesTaint([ + 'effect' => KubernetesEffect::NoSchedule->value, + 'key' => 'environment', + 'value' => 'development', + ]), + ], + ]), + new KubernetesNodeGroup([ + 'count' => 8, + 'kubeletArgs' => [ + new KubernetesKubeletArg([ + 'key' => 'log-flush-frequency', + 'value' => '15s', + ]), + ], + 'labels' => [ + new KubernetesLabel([ + 'key' => 'managedBy', + 'value' => 'exampleStagingTeam', + ]), + new KubernetesLabel([ + 'key' => 'environment', + 'value' => 'staging', + ]), + ], + 'name' => 'medium', + 'plan' => 'K8S-4xCPU-8GB', + 'sshKeys' => [ + 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV', + ], + 'storage' => '01000000-0000-4000-8000-000160010100', + 'taints' => [ + new KubernetesTaint([ + 'effect' => KubernetesEffect::NoSchedule->value, + 'key' => 'environment', + 'value' => 'staging', + ]), + ], + ]), + ], + 'zone' => 'de-fra1', + 'version' => 'version', + 'labels' => [ + [ + 'key' => "env", + 'value' => "prod", + ], + [ + 'key' => "app", + 'value' => "cats-dating-app", + ], + ], + ]), +); +``` + +#### Parameters + +**$request:** `KubernetesCluster` + +
+ +
+$client->kubernetes->getKubernetesCluster($uuid) -> KubernetesCluster + +#### Description + +Returns Kubernetes cluster details by given `uuid`. + +#### Usage + +```php +$client->kubernetes->getKubernetesCluster( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->deleteKubernetesCluster($uuid) -> KubernetesAccepted + +#### Description + +Deletes an existing Kubernetes cluster by given `uuid`. + +#### Usage + +```php +$client->kubernetes->deleteKubernetesCluster( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->modifyKubernetesCluster($uuid, $request) -> KubernetesCluster + +#### Description + +Modifies an existing Kubernetes cluster by given `{uuid}`. + +#### Usage + +```php +$client->kubernetes->modifyKubernetesCluster( + 'uuid', + new KubernetesClusterPatch([ + 'controlPlaneIpFilter' => [ + '1.2.3.0/24', + '1.1.1.1', + ], + 'labels' => [ + [ + 'key' => "env", + 'value' => "prod", + ], + [ + 'key' => "app", + 'value' => "cats-dating-app", + ], + ], + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$controlPlaneIpFilter:** `?array` + +**$labels:** `mixed` + +**$plan:** `?string` + +
+ +
+$client->kubernetes->getKubernetesClusterKubeconfig($uuid) -> KubernetesClusterKubeconfig + +#### Description + +Returns kubeconfig for Kubernetes cluster by given `{uuid}`. + +#### Usage + +```php +$client->kubernetes->getKubernetesClusterKubeconfig( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->getKubernetesClusterAvailableUpgrades($uuid) -> KubernetesClusterAvailableUpgrades + +#### Description + +Returns a list of available versions that can be used to upgrade the cluster. + +#### Usage + +```php +$client->kubernetes->getKubernetesClusterAvailableUpgrades( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->upgradeKubernetesCluster($uuid, $request) -> KubernetesClusterAvailableUpgradesPost + +#### Description + +Upgrades an existing Kubernetes cluster to specific version. + +#### Usage + +```php +$client->kubernetes->upgradeKubernetesCluster( + 'uuid', + new UpgradeKubernetesClusterRequest([ + 'body' => new KubernetesClusterAvailableUpgradesPost([ + 'version' => '1.31', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$request:** `KubernetesClusterAvailableUpgradesPost` + +
+ +
+$client->kubernetes->listKubernetesClusterNodeGroups($uuid) -> array + +#### Description + +Returns a list of available node groups of an existing Kubernetes cluster. Cluster is identified by given `{uuid}`. + +A node group is a uniform set of worker nodes attached to a cluster. + +#### Usage + +```php +$client->kubernetes->listKubernetesClusterNodeGroups( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->createKubernetesClusterNodeGroup($uuid, $request) -> KubernetesNodeGroup + +#### Description + +Creates a new node group to an existing Kubernetes cluster. Cluster is identified by given `{uuid}`. + +#### Usage + +```php +$client->kubernetes->createKubernetesClusterNodeGroup( + 'uuid', + new CreateKubernetesClusterNodeGroupRequest([ + 'body' => new KubernetesNodeGroup([ + 'count' => 4, + 'kubeletArgs' => [ + new KubernetesKubeletArg([ + 'key' => 'log-flush-frequency', + 'value' => '5s', + ]), + ], + 'labels' => [ + new KubernetesLabel([ + 'key' => 'managedBy', + 'value' => 'exampleDevelopmentTeam', + ]), + new KubernetesLabel([ + 'key' => 'environment', + 'value' => 'development', + ]), + ], + 'name' => 'small', + 'plan' => 'K8S-2xCPU-4GB', + 'sshKeys' => [ + 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV', + ], + 'storage' => '01000000-0000-4000-8000-000160010100', + 'taints' => [ + new KubernetesTaint([ + 'effect' => KubernetesEffect::NoSchedule->value, + 'key' => 'environment', + 'value' => 'development', + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$request:** `KubernetesNodeGroup` + +
+ +
+$client->kubernetes->getKubernetesClusterNodeGroup($uuid, $name) -> KubernetesNodeGroupDetails + +#### Description + +Returns node group details by given `{node_group_name}`. Cluster is identified by given `{uuid}`. + +#### Usage + +```php +$client->kubernetes->getKubernetesClusterNodeGroup( + 'uuid', + 'name', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +
+ +
+$client->kubernetes->deleteKubernetesClusterNodeGroup($uuid, $name) -> KubernetesAccepted + +#### Description + +Deletes an existing node group by given Kubernetes cluster `{uuid}` and `{node_group_name}`. + +#### Usage + +```php +$client->kubernetes->deleteKubernetesClusterNodeGroup( + 'uuid', + 'name', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +
+ +
+$client->kubernetes->modifyKubernetesClusterNodeGroup($uuid, $name, $request) -> KubernetesNodeGroup + +#### Description + +Modifies an existing node group of a cluster. Cluster is identified by given `{uuid}` and node group by `{node_group_name}`. + +#### Usage + +```php +$client->kubernetes->modifyKubernetesClusterNodeGroup( + 'uuid', + 'name', + new KubernetesNodeGroupPatch([ + 'count' => 16, + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +**$count:** `int` + +
+ +
+$client->kubernetes->deleteKubernetesClusterNodeGroupNode($uuid, $name, $nodeName) -> KubernetesAccepted + +#### Description + +Deletes a node group node from a cluster (experimental). Cluster is identified by given `{uuid}`, node group by `{name}`, and node by `{node-name}`. + +#### Usage + +```php +$client->kubernetes->deleteKubernetesClusterNodeGroupNode( + 'uuid', + 'name', + 'node-name', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +**$nodeName:** `string` β€” Node name + +
+ +
+$client->kubernetes->listKubernetesPlans() -> array + +#### Description + +Returns a list of available Kubernetes cluster plans. + +#### Usage + +```php +$client->kubernetes->listKubernetesPlans(); +``` + +
+ +
+$client->kubernetes->listKubernetesVersions() -> array + +#### Description + +Returns a list of available Kubernetes cluster versions. + +#### Usage + +```php +$client->kubernetes->listKubernetesVersions(); +``` + +
+ +
+$client->kubernetes->listClusterAuthentication($uuid) -> array + +#### Description + +Returns all OIDC authentication issuer configurations for a cluster. + +#### Usage + +```php +$client->kubernetes->listClusterAuthentication( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->createClusterAuthentication($uuid, $request) -> KubernetesAuthenticationIssuerConfig + +#### Description + +Creates a new OIDC authentication issuer configuration. The new entry is validated together with the cluster's existing entries before being applied. Fails if an entry with the same name already exists. + +#### Usage + +```php +$client->kubernetes->createClusterAuthentication( + 'uuid', + new CreateClusterAuthenticationRequest([ + 'body' => new KubernetesAuthenticationIssuerConfig([ + 'name' => 'name', + 'issuerUrl' => 'https://accounts.myoidcprovider.com', + 'audiences' => [ + 'client-id-123', + ], + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$request:** `KubernetesAuthenticationIssuerConfig` + +
+ +
+$client->kubernetes->setClusterAuthentication($uuid, $request) -> array + +#### Description + +Replaces the entire set of OIDC authentication issuer configurations for a cluster with the supplied JSON list of issuers. The full set is validated before being applied. An empty list clears all issuers. + +#### Usage + +```php +$client->kubernetes->setClusterAuthentication( + 'uuid', + new SetClusterAuthenticationRequest([ + 'body' => [ + new KubernetesAuthenticationIssuerConfig([ + 'name' => 'name', + 'issuerUrl' => 'https://accounts.myoidcprovider.com', + 'audiences' => [ + 'client-id-123', + ], + ]), + ], + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$request:** `array` + +
+ +
+$client->kubernetes->importClusterAuthentication($uuid) -> array + +#### Description + +Replaces the entire set of OIDC authentication issuer configurations for a cluster with the supplied native kube-apiserver v1 AuthenticationConfiguration YAML document. Issuers are named deterministically from their issuer URL host. The top-level `anonymous` field is not supported and any configuration that would drop data is rejected. + +#### Usage + +```php +$client->kubernetes->importClusterAuthentication( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->getClusterAuthentication($uuid, $name) -> KubernetesAuthenticationIssuerConfig + +#### Usage + +```php +$client->kubernetes->getClusterAuthentication( + 'uuid', + 'name', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +
+ +
+$client->kubernetes->updateClusterAuthentication($uuid, $name, $request) -> KubernetesAuthenticationIssuerConfig + +#### Description + +Updates an existing OIDC authentication issuer configuration. The name in the path is authoritative. The updated entry is validated together with the cluster's other entries before being applied. + +#### Usage + +```php +$client->kubernetes->updateClusterAuthentication( + 'uuid', + 'name', + new UpdateClusterAuthenticationRequest([ + 'body' => new KubernetesAuthenticationIssuerConfig([ + 'name' => 'name', + 'issuerUrl' => 'https://accounts.myoidcprovider.com', + 'audiences' => [ + 'client-id-123', + ], + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +**$request:** `KubernetesAuthenticationIssuerConfig` + +
+ +
+$client->kubernetes->deleteClusterAuthentication($uuid, $name) + +#### Description + +Removes an OIDC authentication issuer configuration by name. + +#### Usage + +```php +$client->kubernetes->deleteClusterAuthentication( + 'uuid', + 'name', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +
+ +
+$client->kubernetes->getKubernetesClusterOidcKubeconfig($uuid, $name, $request) -> KubernetesClusterKubeconfig + +#### Description + +Returns a kubeconfig for the cluster whose user authenticates via the kubelogin (`kubectl oidc-login`) exec credential plugin, using the cluster's configured OIDC issuer identified by the `name` path parameter. The plugin (kubelogin) must be installed on the client. No long-lived credential is embedded. The OIDC client secret and any provider-specific kubelogin flags are not injected by the server; the returned kubeconfig includes comments describing how to add them. + +#### Usage + +```php +$client->kubernetes->getKubernetesClusterOidcKubeconfig( + 'uuid', + 'name', + new GetKubernetesClusterOidcKubeconfigRequest([]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +**$audience:** `?string` β€” Which of the issuer's configured audiences to use as the OIDC client id in the generated kubeconfig. When omitted, the issuer's first audience is used. Must match one of the issuer's audiences. + +
+ +## currency +{:#currencyAnchor} + +
+$client->currency->listCurrencies() -> CurrencyCurrencies + +#### Description + +Retrieves a list of supported currencies and their exchange rates relative to the account credit currency. + +#### Usage + +```php +$client->currency->listCurrencies(); +``` + +
+ +## device +{:#deviceAnchor} + +
+$client->device->getAvailablePassthroughDevices($request) -> array + +#### Description + +Returns a list of available passthrough devices. + +#### Usage + +```php +$client->device->getAvailablePassthroughDevices( + new GetAvailablePassthroughDevicesRequest([]), +); +``` + +#### Parameters + +**$zone:** `?string` β€” Filter results to a specific zone. + +**$type:** `?string` β€” Filter results to a specific device type. The only valid type is "gpu" for now. + +
+ +## events +{:#eventsAnchor} + +
+$client->events->listEvents($serverUuid, $offset, $count) -> Events + +#### Description + +Retrieves a list of events. + +#### Usage + +```php +$client->events->listEvents( + 'server_uuid', + 1, + 1, +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Filter results to a specific server. + +**$offset:** `int` β€” The number of items to skip before starting to collect the result set. Default is 0. + +**$count:** `int` β€” The numbers of items to return. + +
+ +## ip_address +{:#ip_addressAnchor} + +
+$client->ipAddress->listIpAddresses() -> IpAddressesResponse + +#### Description + +Retrieves a list of IP addresses. + +#### Usage + +```php +$client->ipAddress->listIpAddresses(); +``` + +
+ +
+$client->ipAddress->addIpAddress($request) -> IpAddressRequest + +#### Description + +Adds a new IP address. + +#### Usage + +```php +$client->ipAddress->addIpAddress( + new AddIpAddressRequest([ + 'ipAddress' => new AddIpAddressRequestIpAddress([ + 'access' => 'access', + 'family' => IpAddressIpFamily::IPv4->value, + ]), + ]), +); +``` + +#### Parameters + +**$ipAddress:** `AddIpAddressRequestIpAddress` + +
+ +
+$client->ipAddress->bulkModifyIpAddresses($request) + +#### Description + +Modifies attributes of multiple IP addresses in a single request. + +#### Usage + +```php +$client->ipAddress->bulkModifyIpAddresses( + new BulkPatchIpAddressesRequestV13([ + 'ipAddresses' => [ + new BulkPatchIpAddressesRequestV13IpAddressesItem([ + 'address' => 'address', + 'mainAccountId' => 1000000, + 'delegatedToAccountId' => 1000000, + 'releasePolicy' => IpAddressIpReleasePolicy::Release->value, + ]), + ], + ]), +); +``` + +#### Parameters + +**$ipAddresses:** `array` + +
+ +
+$client->ipAddress->getIpAddressDetails($address) -> IpAddressResponse + +#### Description + +Retrieves details of a specific IP address. + +#### Usage + +```php +$client->ipAddress->getIpAddressDetails( + 'address', +); +``` + +#### Parameters + +**$address:** `string` β€” The IP address to retrieve details for. + +
+ +
+$client->ipAddress->modifyIpAddress($address, $request) -> IpAddressRequest + +#### Description + +Modifies attributes of a specific IP address. + +#### Usage + +```php +$client->ipAddress->modifyIpAddress( + 'address', + new ModifyIpAddressRequestV10([ + 'ipAddress' => new ModifyIpAddressRequestV10IpAddress([ + 'ptrRecord' => 'host.example.com', + ]), + ]), +); +``` + +#### Parameters + +**$address:** `string` β€” The IP address to modify. + +**$ipAddress:** `ModifyIpAddressRequestV10IpAddress` + +
+ +
+$client->ipAddress->deleteIpAddress($address) + +#### Description + +Deletes a specific IP address. + +#### Usage + +```php +$client->ipAddress->deleteIpAddress( + 'address', +); +``` + +#### Parameters + +**$address:** `string` β€” The IP address to delete. + +
+ +
+$client->ipAddress->patchModifyIpAddress($address, $request) -> IpAddressRequest + +#### Description + +Modifies attributes of a specific IP address. + +#### Usage + +```php +$client->ipAddress->patchModifyIpAddress( + 'address', + new PatchIpAddressRequestV13([ + 'ipAddress' => new PatchIpAddressRequestV13IpAddress([]), + ]), +); +``` + +#### Parameters + +**$address:** `string` β€” The IP address to modify. + +**$ipAddress:** `PatchIpAddressRequestV13IpAddress` + +
+ +## network-peering +{:#network-peeringAnchor} + +
+$client->networkPeering->listNetworkPeerings($request) -> NetworkPeerings + +#### Description + +Get a list of all peerings within the current account. Only peerings that refer to a network that the current +account has access are returned. + +It is also possible to filter network peering with label URL parameters, e.g. +`?label=env` or `?label=env%3Dprod`. The URL parameter can be given multiple +times to add more filters (e.g. `?label=env%3Dprod&label=v2`), where +only network peering that match all labels are returned. +Label keys are matched case insensitively. + +#### Usage + +```php +$client->networkPeering->listNetworkPeerings( + new ListNetworkPeeringsRequest([ + 'uuid' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'networkUuidLocal' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'networkUuidPeer' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ]), +); +``` + +#### Parameters + +**$uuid:** `?string` β€” Filter by network peering UUID. + +**$networkUuidLocal:** `?string` β€” Filter by local network uuid. + +**$networkUuidPeer:** `?string` β€” Filter by peer network uuid. + +**$label:** `?string` β€” Label filter in the form key=value. Can be specified multiple times to filter by multiple labels. + +
+ +
+$client->networkPeering->createNetworkPeering($request) -> NetworkPeering + +#### Description + +Network peerings are used to enable traffic between two networks that can be on different main accounts. +The peering must be established both ways before it's considered as active. Peering is only supported between networks +of type `private`. + +**Note**: you should only create peering between accounts and networks you trust. There is no limits on what traffic +can flow. The server firewall **has no effect** for `private` type networks. + +It is required that both networks have a *Router* attached to the network. + +#### Usage + +```php +$client->networkPeering->createNetworkPeering( + new NetworkPeeringCreate([ + 'configuredStatus' => NetworkPeeringCreateConfiguredStatus::Active->value, + 'name' => 'Peering A->B', + 'network' => new NetworkPeeringCreateNetwork([ + 'uuid' => '03126dc1-a69f-4bc2-8b24-e31c22d64712', + ]), + 'peerNetwork' => new NetworkPeeringCreatePeerNetwork([ + 'uuid' => '03585987-bf7d-4544-8e9b-5a1b4d74a333', + ]), + ]), +); +``` + +#### Parameters + +**$configuredStatus:** `?string` + +**$name:** `string` + +**$network:** `NetworkPeeringCreateNetwork` β€” Describes the local side of the peering + +**$peerNetwork:** `NetworkPeeringCreatePeerNetwork` β€” Describes the peer side of the peering + +
+ +
+$client->networkPeering->getNetworkPeering($peeringUuid) -> NetworkPeering + +#### Description + +Returns the state of an existing network peering. + +Note that the `peer_network` field only contains the network details if the peering has been defined by both accounts. + +#### Usage + +```php +$client->networkPeering->getNetworkPeering( + 'peering_uuid', +); +``` + +#### Parameters + +**$peeringUuid:** `string` β€” The network peering identifier. + +
+ +
+$client->networkPeering->deleteNetworkPeering($peeringUuid) + +#### Description + +Deletes a network peering. It is required that the peering is in `disabled` state before delete is possible. + +#### Usage + +```php +$client->networkPeering->deleteNetworkPeering( + 'peering_uuid', +); +``` + +#### Parameters + +**$peeringUuid:** `string` β€” The network peering identifier. + +
+ +
+$client->networkPeering->modifyNetworkPeering($peeringUuid, $request) -> NetworkPeering + +#### Description + +Modifies attributes of an existing network peering. + +#### Usage + +```php +$client->networkPeering->modifyNetworkPeering( + 'peering_uuid', + new NetworkPeeringModify([ + 'configuredStatus' => NetworkPeeringModifyConfiguredStatus::Disabled->value, + 'name' => 'Peering A->B modified', + ]), +); +``` + +#### Parameters + +**$peeringUuid:** `string` β€” The network peering identifier. + +**$configuredStatus:** `?string` + +**$name:** `?string` + +
+ +## network +{:#networkAnchor} + +
+$client->network->listNetworks($request) -> Networks + +#### Description + +Get a list of all networks. + +It is also possible to filter networks with label URL parameters, e.g. +`?label=env` or `?label=env%3Dprod`. URL parameter can be given multiple +times to add more filters (e.g. `?label=env%3Dprod&label=v2`), where +only networks that match all labels are returned. +Label keys are matched case insensitively. + +#### Usage + +```php +$client->network->listNetworks( + new ListNetworksRequest([]), +); +``` + +#### Parameters + +**$label:** `?NetworkLabel` β€” Filter networks by labels. + +
+ +
+$client->network->createNetwork($request) -> Network + +#### Description + +Creates a new SDN private network that cloud servers from the same zone can be attached to. + +#### Usage + +```php +$client->network->createNetwork( + new CreateNetworkRequest([ + 'network' => new CreateNetworkRequestNetwork([ + 'type' => NetworkType::Private_->value, + 'name' => 'backend-net', + 'zone' => 'fi-hel2', + 'ipNetworks' => new CreateNetworkRequestNetworkIpNetworks([ + 'ipNetwork' => [ + new CreateNetworkRequestNetworkIpNetworksIpNetworkItem([ + 'family' => NetworkIpFamily::IPv4->value, + 'address' => '10.0.0.0/24', + 'dhcp' => NetworkBooleanYesno::Yes->value, + ]), + ], + ]), + ]), + ]), +); +``` + +#### Parameters + +**$network:** `CreateNetworkRequestNetwork` + +
+ +
+$client->network->listNetworkInterfaces() -> NetworkInterfaces + +#### Description + +Retrieves a list of network interfaces. + +#### Usage + +```php +$client->network->listNetworkInterfaces(); +``` + +
+ +
+$client->network->createNetworkInterface($request) -> NetworkInterface + +#### Description + +Creates a new network interface. + +#### Usage + +```php +$client->network->createNetworkInterface( + new NetworkCreateInterfaceRequest([ + 'mainAccountId' => 123456, + 'interface' => new NetworkCreateInterfaceRequestInterface([ + 'bootable' => NetworkBooleanYesno::No->value, + 'network' => '8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a001', + 'sourceIpFiltering' => NetworkBooleanYesno::Yes->value, + 'type' => NetworkType::Private_->value, + ]), + ]), +); +``` + +#### Parameters + +**$mainAccountId:** `?int` + +**$interface_:** `?NetworkCreateInterfaceRequestInterface` + +
+ +
+$client->network->getNetworkInterfaceDetails($uuid) -> Network + +#### Description + +Retrieves details of a specific network interface. + +#### Usage + +```php +$client->network->getNetworkInterfaceDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID of the network interface. + +
+ +
+$client->network->deleteNetworkInterface($uuid) + +#### Description + +Deletes a specific network interface. + +#### Usage + +```php +$client->network->deleteNetworkInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID of the network. + +
+ +
+$client->network->getNetworkDetails($uuid) -> Network + +#### Description + +Retrieves details of a specific network. + +#### Usage + +```php +$client->network->getNetworkDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID of the network. + +
+ +
+$client->network->modifyNetwork($uuid, $request) -> Network + +#### Description + +Modifies the details of a specific SDN private network. The Utility and public networks cannot be modified. + +#### Usage + +```php +$client->network->modifyNetwork( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyNetworkRequest([ + 'network' => new ModifyNetworkRequestNetwork([ + 'type' => NetworkType::Public_->value, + 'name' => 'name', + 'zone' => 'fi-hel1', + 'tags' => new NetworkTags([ + 'tags' => new NetworkTagsTags([ + 'tag' => [ + new NetworkTagsTagsTagItem([ + 'description' => 'Production servers', + 'name' => 'PROD', + 'servers' => new NetworkServers([ + 'server' => [ + '0077fa3d-32db-4b09-9f5f-30d9e9afb565', + ], + ]), + ]), + ], + ]), + ]), + 'labels' => new NetworkLabels([ + 'label' => [ + new NetworkLabel([ + 'key' => 'env', + 'value' => 'prod', + ]), + new NetworkLabel([ + 'key' => 'team', + 'value' => 'network', + ]), + ], + ]), + 'router' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'grtExport' => 1000000, + 'parentNetwork' => 'parent_network', + 'ipNetworks' => new ModifyNetworkRequestNetworkIpNetworks([ + 'ipNetwork' => [ + new ModifyNetworkRequestNetworkIpNetworksIpNetworkItem([ + 'family' => NetworkIpFamily::IPv4->value, + 'address' => 'address', + ]), + ], + ]), + 'networkFeatures' => NetworkFeatures::AllowLinklocalAddress->value, + 'mainAccountId' => 1000000, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID of the network. + +**$network:** `ModifyNetworkRequestNetwork` + +
+ +
+$client->network->deleteNetwork($uuid) + +#### Description + +Deletes an SDN private network. All attached cloud servers must first be detached before SDN private networks can be deleted. Utility and public networks can only be detached from servers by [Releasing the corresponding IP addresses](https://upcloudltd.github.io/upcloud-openapi-spec/api/ip-address#delete-ip-address). + +#### Usage + +```php +$client->network->deleteNetwork( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID of the network. + +
+ +## audit-logs +{:#audit-logsAnchor} + +
+$client->auditLogs->listAuditLogs($request) -> AuditLogsResponse + +#### Description + +Returns a list of audit log rows according to the query parameters. Note that this endpoint is paginated by default and the list is limited in results. + +Pagination +Upcloud-Total-Count header is included in the response to indicate the total number of audit logs available with the current query parameters (excluding limit and offset). The total count can be used for a number of pagination strategies. limit and offset query parameters can be used to finally paginate the results. + +#### Usage + +```php +$client->auditLogs->listAuditLogs( + new ListAuditLogsRequest([ + 'q' => 'my_account', + 'limit' => 50, + 'offset' => 0, + 'createdAfter' => new DateTime('2024-01-01T00:00:00Z'), + 'createdBefore' => new DateTime('2024-12-31T23:59:59Z'), + ]), +); +``` + +#### Parameters + +**$q:** `?string` β€” Filter audit logs using a keyword such as account username, resource ID or IP address. + +**$limit:** `?int` β€” Number of results to return (max 100, default 50) + +**$offset:** `?int` β€” Offset for retrieved results. (default 0) + +**$actions:** `?string` β€” List of actions to filter by + +**$origins:** `?string` β€” List of origins to filter by + +**$resourceTypes:** `?string` β€” List of resource types to filter by + +**$createdAfter:** `?DateTime` β€” List audit logs created after the given timestamp (including the time of timestamp). Format: ISO timestamp eg. 2024-01-01T23:45:56Z + +**$createdBefore:** `?DateTime` β€” List audit logs created before the given timestamp (including the time of timestamp). Format: ISO timestamp eg. 2024-01-01T23:45:56Z + +
+ +
+$client->auditLogs->exportAuditLogs($request) -> AuditLogsResponse + +#### Description + +Export all audit logs for the authenticated account as CSV or JSON (up to 180 day limit). Note: Use the format parameter to specify output format; only JSON schema is documented here. + +#### Usage + +```php +$client->auditLogs->exportAuditLogs( + new ExportAuditLogsRequest([]), +); +``` + +#### Parameters + +**$format:** `?string` β€” Export format: 'csv' or 'json' (default: csv) + +
+ +
+$client->auditLogs->getAuditLog($cloudEventId) -> AuditLogsAuditLog + +#### Description + +Returns details of a single audit log event by its cloud event ID. + +#### Usage + +```php +$client->auditLogs->getAuditLog( + '01HQXYZ123456789ABCDEFGHJK', +); +``` + +#### Parameters + +**$cloudEventId:** `string` β€” Cloud event ID (ULID format) + +
+ +
+$client->auditLogs->getFilterOptions() -> AuditLogsFilterOptionsResponse + +#### Description + +Returns lists of available resource types, actions, and origins for filtering. + +#### Usage + +```php +$client->auditLogs->getFilterOptions(); +``` + +
+ +## partner +{:#partnerAnchor} + +
+$client->partner->listPartnerAccounts() -> array + +#### Description + +Returns list of accounts associated with the partner. + +#### Usage + +```php +$client->partner->listPartnerAccounts(); +``` + +
+ +
+$client->partner->createPartnerAccount($request) -> PartnerAccount + +#### Description + +Creates new UpCloud account that will be linked to partner's existing invoicing. + +#### Usage + +```php +$client->partner->createPartnerAccount( + new PartnerCreateAccount([ + 'username' => 'newuser', + 'password' => 'superSecret123', + ]), +); +``` + +#### Parameters + +**$username:** `string` + +**$password:** `string` + +**$contactDetails:** `?PartnerCreateAccountContactDetails` + +
+ +## permission +{:#permissionAnchor} + +
+$client->permission->listPermissions() -> Permissions + +#### Description + +Retrieves a list of permissions for sub-accounts to access resources owned by the main account. + +#### Usage + +```php +$client->permission->listPermissions(); +``` + +
+ +
+$client->permission->replacePermissions($request) -> Permissions + +#### Description + +Replaces the entire set of permissions for sub-accounts to access resources owned by the main account. + +#### Usage + +```php +$client->permission->replacePermissions( + new Permission([]), +); +``` + +#### Parameters + +**$request:** `Permission` + +
+ +
+$client->permission->grantPermission($request) -> Permission + +#### Description + +Grants a permission for a sub-account to access a resource owned by the main account. + +#### Usage + +```php +$client->permission->grantPermission( + new GrantPermissionRequest([ + 'body' => new Permission([]), + ]), +); +``` + +#### Parameters + +**$skipTargetCheck:** `?bool` β€” If true, skips the check whether the target resource exists. Default is false. + +**$request:** `Permission` + +
+ +
+$client->permission->revokePermission($request) + +#### Description + +Revokes a permission for a sub-account to access a resource owned by the main account. + +#### Usage + +```php +$client->permission->revokePermission( + new Permission([]), +); +``` + +#### Parameters + +**$request:** `Permission` + +
+ +
+$client->permission->revokeAllPermissionsByTarget($targetType, $targetIdentifier, $request) + +#### Description + +Revokes all permissions for sub-accounts to access a specific resource owned by the main account. + +#### Usage + +```php +$client->permission->revokeAllPermissionsByTarget( + 'target_type', + 'target_identifier', + new RevokeAllPermissionsByTargetRequest([]), +); +``` + +#### Parameters + +**$targetType:** `string` β€” The type of the target resource (e.g., "server", "storage"). + +**$targetIdentifier:** `string` β€” The identifier of the target resource. + +**$mainAccountId:** `?int` β€” If specified, revokes permissions for resources owned by the specified main account ID. Default is the current main account. + +
+ +
+$client->permission->revokeAllPermissionsByUser($user) + +#### Description + +Revokes all permissions for a specific sub-account to access any resources owned by the main account. + +#### Usage + +```php +$client->permission->revokeAllPermissionsByUser( + 'user', +); +``` + +#### Parameters + +**$user:** `string` β€” The username of the sub-account. + +
+ +## plan +{:#planAnchor} + +
+$client->plan->listPlans() -> Plan + +#### Description + +Returns a list of available plans. All plans are available in all zones but pricing may differ. See _List prices_ for how to obtain current price list. + +In addition to listed plans, server can be freely configured with "custom" plan which allows freely scalable CPU cores, memory amount and storage resources. __Note!__ Custom plans are available for new customers through contact with sales. + +#### Usage + +```php +$client->plan->listPlans(); +``` + +
+ +## price +{:#priceAnchor} + +
+$client->price->getPrice($request) -> Prices + +#### Description + +Returns a price list. + +#### Usage + +```php +$client->price->getPrice( + new GetPriceRequest([]), +); +``` + +#### Parameters + +**$zone:** `?string` β€” Filter results to a specific zone. Can be specified multiple times. + +
+ +## router +{:#routerAnchor} + +
+$client->router->listRouters($request) -> Routers + +#### Description + +Returns a list of all available routers associated with the current account. + +It is also possible to filter routers with label URL parameters, e.g. +`?label=env` or `?label=env%3Dprod`. URL parameter can be given multiple +times to add more filters (e.g. `?label=env%3Dprod&label=v2`), where +only routers that match all labels are returned. +Label keys are matched case insensitively. + +#### Usage + +```php +$client->router->listRouters( + new ListRoutersRequest([]), +); +``` + +#### Parameters + +**$label:** `?RouterLabel` β€” A label filter. Can be specified multiple times to create an AND condition. Format: label=key:value + +
+ +
+$client->router->createRouter($request) -> Router + +#### Description + +Creates a new router. +Routers can be used to connect multiple Private Networks. Cloud Servers on any attached network can communicate +directly with each other. + +#### Usage + +```php +$client->router->createRouter( + new RouterCreate([ + 'router' => new RouterCreateRouter([ + 'name' => 'Example router', + 'staticRoutes' => [ + new RouterCreateRouterStaticRoutesItem([ + 'name' => 'static-route-0', + 'nexthop' => '192.168.1.1', + 'route' => '0.0.0.0/0', + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$router:** `RouterCreateRouter` + +
+ +
+$client->router->getRouter($router) -> Router + +#### Description + +Retrieves details of a specific router. + +#### Usage + +```php +$client->router->getRouter( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$router:** `string` β€” The router identifier. + +
+ +
+$client->router->deleteRouter($router) + +#### Description + +Deletes a specific router. + +#### Usage + +```php +$client->router->deleteRouter( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$router:** `string` β€” The router identifier. + +
+ +
+$client->router->modifyRouter($router, $request) -> Router + +#### Description + +Modifies attributes of a specific router. +Modifications to static routes of type `service` will be ignored. + +#### Usage + +```php +$client->router->modifyRouter( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new RouterModify([ + 'routerModifyRouter' => new RouterModifyRouter([ + 'name' => 'Example router', + 'staticRoutes' => [ + new RouterModifyRouterStaticRoutesItem([ + 'name' => 'static-route-0', + 'nexthop' => '192.168.1.1', + 'route' => '0.0.0.0/0', + ]), + ], + 'labels' => [ + new RouterLabel([ + 'key' => 'service', + 'value' => 'postgres cluster connectivity', + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$router:** `string` β€” The router identifier. + +**$routerModifyRouter:** `RouterModifyRouter` + +
+ +## server-group +{:#server-groupAnchor} + +
+$client->serverGroup->listServerGroups($request) -> ServerGroups + +#### Description + +Retrieves a list of server groups. + +#### Usage + +```php +$client->serverGroup->listServerGroups( + new ListServerGroupsRequest([]), +); +``` + +#### Parameters + +**$label:** `?ServerGroupLabel` β€” A label filter to apply. Format: key:value. Multiple labels can be specified by repeating the parameter. + +
+ +
+$client->serverGroup->createServerGroup($request) -> ServerGroup + +#### Description + +Creates a new server group. + +#### Usage + +```php +$client->serverGroup->createServerGroup( + new ServerGroupModify([ + 'serverGroup' => new ServerGroupModifyServerGroup([ + 'title' => 'edge-cluster-a', + 'servers' => new ServerGroupServers([ + 'servers' => [ + '00fce2f9-f9f4-46ff-86af-9e60f131f5cb', + ], + ]), + 'labels' => new ServerGroupModifyServerGroupLabels([ + 'label' => [ + new ServerGroupLabel([ + 'key' => 'env', + 'value' => 'prod', + ]), + ], + ]), + 'antiAffinity' => ServerGroupAntiAffinity::Yes->value, + ]), + ]), +); +``` + +#### Parameters + +**$request:** `ServerGroupModify` + +
+ +
+$client->serverGroup->getServerGroup($uuid) -> ServerGroup + +#### Description + +Retrieves details of a specific server group. + +#### Usage + +```php +$client->serverGroup->getServerGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group to retrieve. + +
+ +
+$client->serverGroup->deleteServerGroup($uuid) + +#### Description + +Deletes a specific server group. + +#### Usage + +```php +$client->serverGroup->deleteServerGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group to delete. + +
+ +
+$client->serverGroup->modifyServerGroup($uuid, $request) -> ServerGroup + +#### Description + +Modifies an existing server group. + +#### Usage + +```php +$client->serverGroup->modifyServerGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyServerGroupRequest([ + 'body' => new ServerGroupModify([ + 'serverGroup' => new ServerGroupModifyServerGroup([ + 'title' => 'edge-cluster-a', + 'servers' => new ServerGroupServers([ + 'servers' => [ + '00fce2f9-f9f4-46ff-86af-9e60f131f5cb', + ], + ]), + 'labels' => new ServerGroupModifyServerGroupLabels([ + 'label' => [ + new ServerGroupLabel([ + 'key' => 'env', + 'value' => 'prod', + ]), + ], + ]), + 'antiAffinity' => ServerGroupAntiAffinity::Yes->value, + ]), + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group to modify. + +**$request:** `ServerGroupModify` + +
+ +
+$client->serverGroup->listServerGroupMembers($uuid) -> ServerGroupServers + +#### Description + +Retrieves a list of servers that are members of a specific server group. + +#### Usage + +```php +$client->serverGroup->listServerGroupMembers( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group whose members are to be listed. + +
+ +
+$client->serverGroup->addServerToGroup($uuid, $request) + +#### Description + +Adds a server to a specific server group. + +#### Usage + +```php +$client->serverGroup->addServerToGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerGroupServerAdd([ + 'server' => new ServerGroupServerAddServer([ + 'uuid' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group to which the server will be added. + +**$server:** `ServerGroupServerAddServer` + +
+ +
+$client->serverGroup->removeServerFromGroup($uuid, $serverUuid) + +#### Description + +Removes a server from a specific server group. + +#### Usage + +```php +$client->serverGroup->removeServerFromGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group from which the server will be removed. + +**$serverUuid:** `string` β€” The UUID of the server to remove from the group. + +
+ +## server +{:#serverAnchor} + +
+$client->server->listServers($request) -> GetServerList + +#### Description + +Returns the most relevant information for Cloud Servers associated with the current account. + +#### Usage + +```php +$client->server->listServers( + new ListServersRequest([ + 'uuid' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'host' => 7653311107, + 'tag' => 'prod,web', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair using "key" or "key=value". Repeat the parameter to require all labels. + +**$uuid:** `?string` β€” Filter by Cloud Server UUID. Repeat the parameter to match any of up to five UUIDs. + +**$host:** `?int` β€” Filter by Private Cloud host ID. Repeat the parameter to match any of up to five hosts. + +**$device:** `?string` β€” Filter by attached device using "type=gpu" or "type!=gpu". Repeat the parameter for up to five filters. + +**$state:** `?string` β€” Filter by the current Cloud Server state. + +**$tag:** `?string` β€” Filter by tag name. Separate names with commas to match any tag or colons to require all tags. + +**$search:** `?string` β€” Search UUIDs, titles, hostnames, zones, zone descriptions, IP addresses, tags, and template names. + +**$sortBy:** `?string` β€” Field to sort by. + +**$orderBy:** `?string` β€” Sort direction. Only applied when sort_by is specified. + +**$limit:** `?int` β€” Maximum number of Cloud Servers to return. + +**$offset:** `?int` β€” Number of Cloud Servers to skip. + +
+ +
+$client->server->createServer($request) -> CreateServerResponse + +#### Description + +Creates a new Cloud Server + +#### Usage + +```php +$client->server->createServer( + new CreateServer([ + 'server' => new CreateServerServer([ + 'hostname' => 'my-server.example.com', + 'loginUser' => new ServerLoginUser([ + 'sshKeys' => new ServerLoginUserSshKeys([ + 'sshKey' => [ + 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO3t5AQcuv4+KxJ5rC75N8bW/e7eOq0k5Y2L7V1oH3Z5 user@example.com', + ], + ]), + 'username' => 'upclouduser', + ]), + 'networking' => new ServerCreateNetworking([ + 'interfaces' => new ServerCreateNetworkingInterfaces([ + 'interface' => [ + new ServerCreateNetworkingInterfacesInterfaceItem([ + 'ipAddresses' => new ServerCreateNetworkingInterfacesInterfaceItemIpAddresses([ + 'ipAddress' => [ + new ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem([ + 'family' => ServerIpFamily::IPv4->value, + ]), + ], + ]), + 'type' => ServerNetworkType::Public_->value, + ]), + new ServerCreateNetworkingInterfacesInterfaceItem([ + 'ipAddresses' => new ServerCreateNetworkingInterfacesInterfaceItemIpAddresses([ + 'ipAddress' => [ + new ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem([ + 'family' => ServerIpFamily::IPv4->value, + ]), + ], + ]), + 'type' => ServerNetworkType::Utility->value, + ]), + new ServerCreateNetworkingInterfacesInterfaceItem([ + 'ipAddresses' => new ServerCreateNetworkingInterfacesInterfaceItemIpAddresses([ + 'ipAddress' => [ + new ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem([ + 'family' => ServerIpFamily::IPv4->value, + ]), + ], + ]), + 'network' => '03000000-0000-4000-8000-000000000000', + 'type' => ServerNetworkType::Private_->value, + ]), + ], + ]), + ]), + 'plan' => '1xCPU-1GB', + 'metadata' => ServerBooleanYesno::Yes->value, + 'storageDevices' => new ServerStorageDevices([ + 'storageDevice' => [ + new ServerStorageDevicesStorageDeviceItem([ + 'action' => ServerStorageDevicesStorageDeviceItemAction::Clone_->value, + 'size' => 30, + 'storage' => '01000000-0000-4000-8000-000020080100', + 'tier' => 'maxiops', + 'title' => 'Debian Trixie', + ]), + ], + ]), + 'title' => 'My Server', + 'zone' => 'fi-hel1', + ]), + ]), +); +``` + +#### Parameters + +**$server:** `CreateServerServer` + +
+ +
+$client->server->listFirewallRulesetRelationships($rulesetUuid) -> FirewallRulesetRelatedServers + +#### Description + +Return Cloud Servers visible to the authenticated account that are related to a private firewall ruleset, including each Cloud Server's private ruleset relationships. + +#### Usage + +```php +$client->server->listFirewallRulesetRelationships( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+ +
+$client->server->getLabels() -> array + +#### Description + +Returns the unique label key-value pairs used by Cloud Servers accessible to the current account. + +#### Usage + +```php +$client->server->getLabels(); +``` + +
+ +
+$client->server->getServer($uuid) -> Server + +#### Description + +Returns detailed information about a Cloud Server. + +#### Usage + +```php +$client->server->getServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->modifyServer($uuid, $request) -> Server + +#### Description + +Modifies an existing Cloud Server configuration. + +#### Usage + +```php +$client->server->modifyServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyServer([ + 'server' => new ModifyServerServer([ + 'coreNumber' => 8, + 'memoryAmount' => 16384, + 'plan' => 'custom', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$server:** `ModifyServerServer` + +
+ +
+$client->server->deleteServer($uuid, $request) + +#### Description + +Deletes a stopped Cloud Server and releases its IP addresses. Deleting backups requires deleting the associated storage devices. + +#### Usage + +```php +$client->server->deleteServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new DeleteServerRequest([]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$storages:** `?string` β€” Whether to delete attached storage devices. + +**$backups:** `?string` β€” How to handle backups when deleting storage devices. The delete value is valid only when storages is set to a truthy value. + +
+ +
+$client->server->attachPrivateFirewallRuleset($uuid, $request) -> ServerFirewallRulesetRelationship + +#### Description + +Attach a private, stateful firewall ruleset to a Cloud Server. The latest ruleset version is selected and applied to private network interfaces. + +#### Usage + +```php +$client->server->attachPrivateFirewallRuleset( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerAttachPrivateFirewallRuleset([ + 'firewallRuleset' => new ServerAttachPrivateFirewallRulesetFirewallRuleset([ + 'firewallRulesetUuid' => '190f56d8-4b3f-4a89-9e5f-320fbc3d17c8', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$firewallRuleset:** `ServerAttachPrivateFirewallRulesetFirewallRuleset` β€” Private firewall ruleset to attach. + +
+ +
+$client->server->cancelServerOperation($uuid) + +#### Description + +Cancels an operation while the Cloud Server is in maintenance state. + +#### Usage + +```php +$client->server->cancelServerOperation( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->ejectCdrom($uuid) -> Server + +#### Description + +Eject the storage from the Cloud Server's attached CD-ROM device. + +#### Usage + +```php +$client->server->ejectCdrom( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->loadCdrom($uuid, $request) -> Server + +#### Description + +Load a storage of type normal or cdrom into the Cloud Server's attached CD-ROM device. If media is already loaded, it is ejected first. + +#### Usage + +```php +$client->server->loadCdrom( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerLoadCdrom([ + 'storageDevice' => new ServerLoadCdromStorageDevice([ + 'storage' => '01000000-0000-4000-8000-000060010101', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$storageDevice:** `ServerLoadCdromStorageDevice` β€” Storage to load into the attached CD-ROM device. + +
+ +
+$client->server->detachPrivateFirewallRuleset($uuid, $request) -> ServerFirewallRulesetRelationship + +#### Description + +Detach a private firewall ruleset from a Cloud Server and reapply private-interface firewall rules. + +#### Usage + +```php +$client->server->detachPrivateFirewallRuleset( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerDetachPrivateFirewallRuleset([ + 'firewallRuleset' => new ServerDetachPrivateFirewallRulesetFirewallRuleset([ + 'firewallRulesetUuid' => '190f56d8-4b3f-4a89-9e5f-320fbc3d17c8', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$firewallRuleset:** `ServerDetachPrivateFirewallRulesetFirewallRuleset` β€” Private firewall ruleset to detach. + +
+ +
+$client->server->listFirewallRules($uuid) -> ServerFirewallRules + +#### Description + +Return the Cloud Server firewall rules in evaluation order. Changes to firewall rules can take 1-2 minutes to take effect. + +#### Usage + +```php +$client->server->listFirewallRules( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->createFirewallRule($uuid, $request) -> ServerFirewallRule + +#### Description + +Create a firewall rule. Rules are evaluated in position order; if position is omitted, the rule is appended. Changes can take 1-2 minutes to take effect. + +#### Usage + +```php +$client->server->createFirewallRule( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerCreateFirewallRule([ + 'firewallRule' => new ServerCreateFirewallRuleFirewallRule([ + 'action' => ServerCreateFirewallRuleFirewallRuleAction::Accept->value, + 'comment' => 'Allow SSH from the office network', + 'destinationPortEnd' => '22', + 'destinationPortStart' => '22', + 'direction' => ServerCreateFirewallRuleFirewallRuleDirection::In->value, + 'family' => ServerCreateFirewallRuleFirewallRuleFamily::IPv4->value, + 'position' => '1', + 'protocol' => ServerCreateFirewallRuleFirewallRuleProtocol::Tcp->value, + 'sourceAddressEnd' => '192.0.2.255', + 'sourceAddressStart' => '192.0.2.1', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$firewallRule:** `ServerCreateFirewallRuleFirewallRule` + +
+ +
+$client->server->updateFirewallRules($uuid, $request) + +#### Description + +Replace the Cloud Server's complete firewall rule chain. Array order determines rule positions. Changes can take 1-2 minutes to take effect. + +#### Usage + +```php +$client->server->updateFirewallRules( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerUpdateFirewallRules([ + 'firewallRules' => new ServerUpdateFirewallRulesFirewallRules([ + 'firewallRule' => [ + new ServerFirewallRuleItem([ + 'action' => ServerFirewallRuleItemAction::Accept->value, + 'comment' => 'Allow SSH', + 'destinationPortEnd' => '22', + 'destinationPortStart' => '22', + 'direction' => ServerFirewallRuleItemDirection::In->value, + 'family' => ServerFirewallRuleItemFamily::IPv4->value, + 'protocol' => ServerFirewallRuleItemProtocol::Tcp->value, + ]), + new ServerFirewallRuleItem([ + 'action' => ServerFirewallRuleItemAction::Drop->value, + 'direction' => ServerFirewallRuleItemDirection::In->value, + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$firewallRules:** `ServerUpdateFirewallRulesFirewallRules` + +
+ +
+$client->server->getFirewallRule($uuid, $position) -> ServerFirewallRule + +#### Description + +Return the firewall rule at the specified one-based position in the Cloud Server rule chain. + +#### Usage + +```php +$client->server->getFirewallRule( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$position:** `int` β€” Firewall rule position + +
+ +
+$client->server->deleteFirewallRule($uuid, $position) + +#### Description + +Delete the firewall rule at the specified one-based position. Remaining rules are renumbered. Changes can take 1-2 minutes to take effect. + +#### Usage + +```php +$client->server->deleteFirewallRule( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$position:** `int` β€” Firewall rule position + +
+ +
+$client->server->listPrivateFirewallRulesetRelationships($uuid) -> ServerFirewallRulesetRelationships + +#### Description + +Return all private firewall ruleset relationships configured for a Cloud Server. + +#### Usage + +```php +$client->server->listPrivateFirewallRulesetRelationships( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->listServerGpUs($uuid) -> ServerGpus + +#### Description + +Returns GPUs attached to a Cloud Server. + +#### Usage + +```php +$client->server->listServerGpUs( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->getServerNetworking($uuid) -> ServerNetworkingResponse + +#### Description + +Return all network interfaces and IP addresses configured for a Cloud Server. + +#### Usage + +```php +$client->server->getServerNetworking( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->addServerInterface($uuid, $request) -> ServerInterfaceResponse + +#### Description + +Add a network interface to a stopped Cloud Server. A private interface must identify the SDN network to attach. The combined limit of network interfaces and storage devices is 24. + +#### Usage + +```php +$client->server->addServerInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerAddInterface([ + 'interface' => new ServerAddInterfaceInterface([ + 'ipAddresses' => new ServerAddInterfaceInterfaceIpAddresses([ + 'ipAddress' => [ + new ServerAddInterfaceInterfaceIpAddressesIpAddressItem([ + 'address' => '10.0.0.20', + 'dhcpProvided' => ServerBooleanYesno::Yes->value, + 'family' => ServerIpFamily::IPv4->value, + ]), + ], + ]), + 'network' => '0374ce47-4303-4490-987d-32dc96cfd79b', + 'sourceIpFiltering' => ServerBooleanYesno::Yes->value, + 'type' => ServerNetworkType::Private_->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$interface_:** `ServerAddInterfaceInterface` + +
+ +
+$client->server->modifyServerInterface($uuid, $index, $request) -> ServerInterfaceResponse + +#### Description + +Modify the IP addresses, source IP filtering, boot setting, or index of a network interface on a stopped Cloud Server. Changing the interface network or type is not supported. + +#### Usage + +```php +$client->server->modifyServerInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, + new ServerModifyInterface([ + 'interface' => new ServerModifyInterfaceInterface([ + 'bootable' => ServerBooleanYesno::Yes->value, + 'index' => 5, + 'sourceIpFiltering' => ServerBooleanYesno::No->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$index:** `int` β€” Network interface index + +**$interface_:** `ServerModifyInterfaceInterface` + +
+ +
+$client->server->deleteServerInterface($uuid, $index) + +#### Description + +Delete a network interface from a stopped Cloud Server. IP addresses attached to the interface are released according to their release policies. + +#### Usage + +```php +$client->server->deleteServerInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$index:** `int` β€” Network interface index + +
+ +
+$client->server->addServerInterfaceIpAddress($uuid, $index, $request) -> ServerIpAddressInterfaceResponse + +#### Description + +Add an IPv4 or IPv6 address to a private network interface. The interface cannot contain addresses from both families and can have at most five addresses. + +#### Usage + +```php +$client->server->addServerInterfaceIpAddress( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, + new ServerAddIpAddress([ + 'ipAddress' => new ServerAddIpAddressIpAddress([ + 'address' => '10.0.0.30', + 'family' => ServerIpFamily::IPv4->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$index:** `int` β€” Network interface index + +**$force:** `?string` β€” Move the address from another interface when that interface can retain its required minimum number of addresses + +**$ipAddress:** `ServerAddIpAddressIpAddress` + +
+ +
+$client->server->deleteServerInterfaceIpAddress($uuid, $index, $ip) + +#### Description + +Delete an IP address from a private network interface. At least one IP address must remain attached to the interface. + +#### Usage + +```php +$client->server->deleteServerInterfaceIpAddress( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, + 'ip', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$index:** `int` β€” Network interface index + +**$ip:** `string` β€” IP address to delete + +
+ +
+$client->server->rebuildServer($uuid, $request) -> Server + +#### Description + +Reinstalls a stopped Cloud Server from a public template. + +#### Usage + +```php +$client->server->rebuildServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerRebuild([ + 'serverRebuild' => new ServerRebuildServerRebuild([ + 'cloneSource' => '01000000-0000-4000-8000-000020050100', + 'deleteDetachedDisk' => ServerLegacyBoolean::Yes->value, + 'detachDisk' => '0169b4f8-051c-4a86-9484-f5b798249949', + 'encrypted' => ServerLegacyBoolean::Yes->value, + 'loginUser' => new ServerRebuildServerRebuildLoginUser([ + 'createPassword' => ServerLegacyBoolean::No->value, + 'sshKeys' => new ServerRebuildServerRebuildLoginUserSshKeys([ + 'sshKey' => [ + 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEexamplekey user@example', + ], + ]), + 'username' => 'debian', + ]), + 'passwordDelivery' => ServerRebuildServerRebuildPasswordDelivery::None->value, + 'storageTitle' => 'Rebuilt system disk', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$serverRebuild:** `ServerRebuildServerRebuild` + +
+ +
+$client->server->relocateServer($uuid, $request) -> Server + +#### Description + +Relocates a stopped Cloud Server to another zone in the same physical location (datacenter). + +#### Usage + +```php +$client->server->relocateServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new RelocateServer([ + 'zone' => 'fi-hel2', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$zone:** `string` + +
+ +
+$client->server->getRemoteAccessDetails($uuid) -> ServerRemoteAccessDetails + +#### Description + +Returns remote access settings and VNC connection details for a Cloud Server. + +#### Usage + +```php +$client->server->getRemoteAccessDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->restartServer($uuid, $request) -> Server + +#### Description + +Stops and starts a Cloud Server in started state. + +#### Usage + +```php +$client->server->restartServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new RestartServer([ + 'restartServer' => new RestartServerRestartServerStopType([ + 'stopType' => RestartServerRestartServerStopTypeStopType::Hard->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$restartServer:** `mixed` + +
+ +
+$client->server->startServer($uuid, $request) -> Server + +#### Description + +Starts a Cloud Server in stopped state. + +#### Usage + +```php +$client->server->startServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new StartServer([ + 'server' => new StartServerServer([ + 'host' => 8055964291, + 'startType' => StartServerServerStartType::Sync->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$server:** `StartServerServer` + +
+ +
+$client->server->getCpuStats($uuid) -> ServerCpuStats + +#### Description + +Returns CPU usage statistics for all supported periods. + +#### Usage + +```php +$client->server->getCpuStats( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +
+$client->server->getCpuStatsByPeriod($uuid, $period) -> ServerCpuStats + +#### Description + +Returns CPU usage statistics for the selected period. + +#### Usage + +```php +$client->server->getCpuStatsByPeriod( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ServerStatsPeriod::Daily->value, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$period:** `string` β€” Statistics period. + +
+ +
+$client->server->getDiskStats($uuid, $type) -> ServerDiskStats + +#### Description + +Returns aggregate disk read and write statistics for all supported periods. + +#### Usage + +```php +$client->server->getDiskStats( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + GetDiskStatsRequestType::Bytes->value, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$type:** `string` β€” Measure disk activity as transferred bytes or I/O requests. + +
+ +
+$client->server->getDiskStatsByPeriod($uuid, $type, $period) -> ServerDiskStats + +#### Description + +Returns aggregate disk read and write statistics for the selected period. + +#### Usage + +```php +$client->server->getDiskStatsByPeriod( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + GetDiskStatsByPeriodRequestType::Bytes->value, + ServerStatsPeriod::Daily->value, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$type:** `string` β€” Measure disk activity as transferred bytes or I/O requests. + +**$period:** `string` β€” Statistics period. + +
+ +
+$client->server->getNetworkStats($uuid, $type) -> ServerNetworkStats + +#### Description + +Returns aggregate inbound and outbound network statistics for all interfaces and periods. + +#### Usage + +```php +$client->server->getNetworkStats( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ServerStatsNetworkType::Bytes->value, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$type:** `string` β€” Measure network activity as transferred bytes or packets. + +
+ +
+$client->server->getNetworkStatsByNetwork($uuid, $type, $network) -> ServerNetworkStats + +#### Description + +Returns inbound and outbound network statistics for the selected network type and all periods. + +#### Usage + +```php +$client->server->getNetworkStatsByNetwork( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ServerStatsNetworkType::Bytes->value, + ServerNetworkType::Public_->value, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$type:** `string` β€” Measure network activity as transferred bytes or packets. + +**$network:** `string` β€” Network access type to aggregate. + +
+ +
+$client->server->getNetworkStatsByNetworkAndPeriod($uuid, $type, $network, $period) -> ServerNetworkStats + +#### Description + +Returns inbound and outbound network statistics for the selected network type and period. + +#### Usage + +```php +$client->server->getNetworkStatsByNetworkAndPeriod( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ServerStatsNetworkType::Bytes->value, + ServerNetworkType::Public_->value, + ServerStatsPeriod::Daily->value, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$type:** `string` β€” Measure network activity as transferred bytes or packets. + +**$network:** `string` β€” Network access type to aggregate. + +**$period:** `string` β€” Statistics period. + +
+ +
+$client->server->stopServer($uuid, $request) -> Server + +#### Description + +Stops a Cloud Server in started state. + +#### Usage + +```php +$client->server->stopServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new StopServer([ + 'stopServer' => new StopServerStopServer([ + 'stopType' => StopServerStopServerStopType::Soft->value, + 'timeout' => '60', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$stopServer:** `StopServerStopServer` + +
+ +
+$client->server->attachStorageDevice($uuid, $request) -> Server + +#### Description + +Attach a storage resource as a disk or CD-ROM device to a Cloud Server. SCSI and virtio disks can be attached while the Cloud Server is started; IDE and CD-ROM devices require a stopped Cloud Server. An empty CD-ROM device can be attached without specifying a storage resource. + +#### Usage + +```php +$client->server->attachStorageDevice( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerAttachStorage([ + 'storageDevice' => new ServerAttachStorageStorageDevice([ + 'address' => 'virtio:0', + 'bootDisk' => 1, + 'storage' => '012580a1-32a1-466e-a323-689ca16f2d43', + 'type' => ServerAttachStorageStorageDeviceType::Disk->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$storageDevice:** `ServerAttachStorageStorageDevice` β€” Storage device to attach. + +
+ +
+$client->server->detachStorageDevice($uuid, $request) -> Server + +#### Description + +Detach a storage device identified by its device address or storage resource UUID. IDE and CD-ROM devices cannot be detached while the Cloud Server is started. + +#### Usage + +```php +$client->server->detachStorageDevice( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerDetachStorage([ + 'storageDevice' => [ + 'address' => "virtio:0", + ], + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +**$storageDevice:** `mixed` + +
+ +
+$client->server->getVncDetails($uuid) -> ServerRemoteAccessDetails + +#### Description + +Returns VNC connection details and remote access settings for a Cloud Server. + +#### Usage + +```php +$client->server->getVncDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Cloud Server UUID + +
+ +## server_size +{:#server_sizeAnchor} + +
+$client->serverSize->listServerSizes() -> ServerSizes + +#### Description + +Retrieves a list of available server sizes (combinations of memory and CPU cores). + +#### Usage + +```php +$client->serverSize->listServerSizes(); +``` + +
+ +
+$client->serverSize->getServerSizeLimits() -> ServerSizeLimits + +#### Description + +Retrieves the minimum and maximum limits for server sizes, including any zone-specific limits for private zones. + +#### Usage + +```php +$client->serverSize->getServerSizeLimits(); +``` + +
+ +## storage +{:#storageAnchor} + +
+$client->storage->getStorageList($request) -> Storages + +#### Description + +Returns all storage resources accessible to the account. The results can be filtered by labels or a title and UUID search, sorted, and paginated. + +#### Usage + +```php +$client->storage->getStorageList( + new GetStorageListRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +**$sortBy:** `?string` β€” Field by which to sort the results. + +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +**$limit:** `?int` β€” Maximum number of storage resources to return. + +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+ +
+$client->storage->createStorage($request) -> CreateStorageResponse + +#### Description + +Creates a block storage resource in a specific zone. The new block storage is not attached to a Cloud Server. + +#### Usage + +```php +$client->storage->createStorage( + new CreateStorageRequest([ + 'storage' => new CreateStorageRequestStorage([ + 'backupRule' => new StorageBackupRule([ + 'interval' => StorageBackupRuleInterval::Daily->value, + 'time' => '0400', + 'retention' => '7', + ]), + 'encrypted' => StorageEncrypted::Yes->value, + 'labels' => [ + new StorageLabel([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + 'size' => 50, + 'tier' => StorageTier::Maxiops->value, + 'title' => 'Block Storage 1', + 'zone' => 'fi-hel1', + ]), + ]), +); +``` + +#### Parameters + +**$storage:** `CreateStorageRequestStorage` β€” Block storage creation parameters. + +
+ +
+$client->storage->getStorageListByBackup($request) -> Storages + +#### Description + +Returns accessible storage resources whose type is `backup`. + +#### Usage + +```php +$client->storage->getStorageListByBackup( + new GetStorageListByBackupRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +**$sortBy:** `?string` β€” Field by which to sort the results. + +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +**$limit:** `?int` β€” Maximum number of storage resources to return. + +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+ +
+$client->storage->getStorageListByCdrom($request) -> Storages + +#### Description + +Returns accessible storage resources whose type is `cdrom`. + +#### Usage + +```php +$client->storage->getStorageListByCdrom( + new GetStorageListByCdromRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +**$sortBy:** `?string` β€” Field by which to sort the results. + +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +**$limit:** `?int` β€” Maximum number of storage resources to return. + +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+ +
+$client->storage->getFavoriteStorageList() -> Storages + +#### Description + +Returns the public templates and CD-ROM images that the account has marked as favorites. + +#### Usage + +```php +$client->storage->getFavoriteStorageList(); +``` + +
+ +
+$client->storage->getStorageListByNormal($request) -> Storages + +#### Description + +Returns accessible Block Storage resources whose type is `normal`. + +#### Usage + +```php +$client->storage->getStorageListByNormal( + new GetStorageListByNormalRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +**$sortBy:** `?string` β€” Field by which to sort the results. + +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +**$limit:** `?int` β€” Maximum number of storage resources to return. + +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+ +
+$client->storage->getStorageListByPrivateAccess($request) -> Storages + +#### Description + +Returns accessible storage resources whose access type is `private`. + +#### Usage + +```php +$client->storage->getStorageListByPrivateAccess( + new GetStorageListByPrivateAccessRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +**$sortBy:** `?string` β€” Field by which to sort the results. + +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +**$limit:** `?int` β€” Maximum number of storage resources to return. + +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+ +
+$client->storage->getStorageListByPublicAccess($request) -> Storages + +#### Description + +Returns accessible storage resources whose access type is `public`. + +#### Usage + +```php +$client->storage->getStorageListByPublicAccess( + new GetStorageListByPublicAccessRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +**$sortBy:** `?string` β€” Field by which to sort the results. + +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +**$limit:** `?int` β€” Maximum number of storage resources to return. + +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+ +
+$client->storage->getStorageListByTemplate($request) -> Storages + +#### Description + +Returns accessible storage resources whose type is `template`. + +#### Usage + +```php +$client->storage->getStorageListByTemplate( + new GetStorageListByTemplateRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +**$sortBy:** `?string` β€” Field by which to sort the results. + +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +**$limit:** `?int` β€” Maximum number of storage resources to return. + +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+ +
+$client->storage->getStorageListByTypeAndAccess($type, $access, $request) -> Storages + +#### Description + +Returns accessible storage resources matching both the requested storage type and access type. + +#### Usage + +```php +$client->storage->getStorageListByTypeAndAccess( + StorageType::Normal->value, + StorageAccessFilter::Public_->value, + new GetStorageListByTypeAndAccessRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$type:** `string` β€” Storage resource type to return. + +**$access:** `string` β€” Storage resource access type to return. + +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +**$sortBy:** `?string` β€” Field by which to sort the results. + +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +**$limit:** `?int` β€” Maximum number of storage resources to return. + +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+ +
+$client->storage->getStorageInfo($uuid) -> Storage + +#### Description + +Returns detailed information about a storage resource, including its current state, attachments, labels, and backup configuration when applicable. + +#### Usage + +```php +$client->storage->getStorageInfo( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +
+ +
+$client->storage->modifyStorage($uuid, $request) -> ModifyStorageResponse + +#### Description + +Modifies a block storage title, labels, automatic backup rule, or size. A new size must be greater than the current size. Set `filesystem_resize` to `yes` to also resize the last partition and its supported filesystem after increasing the block storage size. + +#### Usage + +```php +$client->storage->modifyStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyStorageBody([ + 'storage' => new ModifyStorageBodyStorage([ + 'size' => 100, + 'title' => 'Production data expanded', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Block storage UUID + +**$storage:** `ModifyStorageBodyStorage` β€” Block storage properties to modify. + +
+ +
+$client->storage->deleteStorage($uuid, $request) + +#### Description + +Schedules an unattached private storage resource for deletion. Associated backups are kept by default unless another backup policy is selected. + +#### Usage + +```php +$client->storage->deleteStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new DeleteStorageRequest([]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +**$backups:** `?string` β€” Policy for handling backups when deleting a storage resource. Defaults to `keep`. Allowed values: keep, delete, keep_latest + +
+ +
+$client->storage->attachStorageToServer($uuid, $request) -> AttachStorageResponse + +#### Description + +Attaches the storage resource to a Cloud Server in the same zone. The device defaults to a disk at the next available address. IDE and CD-ROM devices can be attached only while the Cloud Server is stopped; SCSI and VirtIO disks can also be attached while it is running. + +#### Usage + +```php +$client->storage->attachStorageToServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new AttachStorageRequest([ + 'storageDevice' => new AttachStorageRequestStorageDevice([ + 'server' => '00798b85-efdc-41ca-8021-f6ef457b8531', + 'type' => AttachStorageRequestStorageDeviceType::Disk->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +**$storageDevice:** `AttachStorageRequestStorageDevice` β€” Parameters for attaching this storage resource to a Cloud Server in the same zone. + +
+ +
+$client->storage->createOnDemandBackup($uuid, $request) -> CreateStorageBackupResponse + +#### Description + +Creates a point-in-time backup of private normal block storage. The operation is asynchronous: the source block storage is `backuping` while the backup is created, and the returned backup remains in `maintenance` until it is ready. + +#### Usage + +```php +$client->storage->createOnDemandBackup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CreateStorageBackupRequest([ + 'storage' => new CreateStorageBackupRequestStorage([ + 'title' => 'Manually created backup', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Block storage UUID + +**$storage:** `CreateStorageBackupRequestStorage` β€” Parameters for the point-in-time backup. + +
+ +
+$client->storage->cancelStorageOperation($uuid) + +#### Description + +Requests cancellation of an interruptible operation on block storage in the `maintenance` state. For a running clone, cancellation removes the incomplete copy and returns the source block storage to the `online` state. + +#### Usage + +```php +$client->storage->cancelStorageOperation( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Block storage UUID + +
+ +
+$client->storage->cloneStorage($uuid, $request) -> CreateStorageResponse + +#### Description + +Creates a Block Storage copy of a storage resource. Cloning is asynchronous: the returned block storage remains in the `maintenance` state until the operation completes and can be monitored with the storage resource details endpoint. + +#### Usage + +```php +$client->storage->cloneStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CloneStorageRequest([ + 'storage' => new CloneStorageRequestStorage([ + 'encrypted' => StorageEncrypted::Yes->value, + 'tier' => StorageTier::Maxiops->value, + 'title' => 'Cloned Block Storage', + 'zone' => 'fi-hel1', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +**$storage:** `CloneStorageRequestStorage` β€” Parameters for the cloned block storage. + +
+ +
+$client->storage->detachStorageFromServer($uuid) -> DetachStorageResponse + +#### Description + +Detaches the storage resource from its attached Cloud Server. IDE and CD-ROM devices can be detached only while the Cloud Server is stopped; SCSI and VirtIO disks can also be detached while it is running. If the storage resource is already detached, it is returned unchanged. + +#### Usage + +```php +$client->storage->detachStorageFromServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +
+ +
+$client->storage->addStorageToFavorites($uuid) + +#### Description + +Adds an accessible storage resource to the account's favorites. The operation succeeds if the storage resource is already a favorite. + +#### Usage + +```php +$client->storage->addStorageToFavorites( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +
+ +
+$client->storage->removeStorageFromFavorites($uuid) + +#### Description + +Removes an accessible storage resource from the account's favorites. The operation succeeds if the storage resource is not a favorite. + +#### Usage + +```php +$client->storage->removeStorageFromFavorites( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +
+ +
+$client->storage->getStorageImportDetails($uuid) -> StorageImportResponse + +#### Description + +Returns details of the latest import task for a storage resource, including its state, transferred byte counts, checksums, and any error information. + +#### Usage + +```php +$client->storage->getStorageImportDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +
+ +
+$client->storage->createStorageImport($uuid, $request) -> StorageImportResponse + +#### Description + +Creates an asynchronous task that imports a raw disk image into existing Block Storage from an HTTP URL or a temporary direct-upload URL. Attached Cloud Servers must be stopped. + +#### Usage + +```php +$client->storage->createStorageImport( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CreateStorageImportRequest([ + 'storageImport' => new CreateStorageImportRequestStorageImport([ + 'source' => CreateStorageImportRequestStorageImportSource::HttpImport->value, + 'sourceLocation' => 'https://example.com/disk.raw', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +**$storageImport:** `CreateStorageImportRequestStorageImport` β€” Storage import parameters. + +
+ +
+$client->storage->cancelStorageImport($uuid) -> StorageImportResponse + +#### Description + +Requests cancellation of an ongoing storage import. The task enters the `cancelling` state while imported data is rolled back when necessary. + +#### Usage + +```php +$client->storage->cancelStorageImport( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage resource UUID + +
+ +
+$client->storage->resizeStorage($uuid) -> ResizeStorageResponse + +#### Description + +Resizes the last partition and its supported filesystem to use the block storage capacity already available. A backup is created before the operation and returned on success. Increase the block storage capacity first with the modify block storage endpoint. + +#### Usage + +```php +$client->storage->resizeStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Block storage UUID + +
+ +
+$client->storage->restoreStorageFromBackup($uuid) + +#### Description + +Starts restoring the backup identified by `uuid` to its origin block storage. If the origin block storage is attached to a Cloud Server, the Cloud Server must be stopped. + +#### Usage + +```php +$client->storage->restoreStorageFromBackup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Backup UUID + +
+ +
+$client->storage->createTemplateFromStorage($uuid, $request) -> CreateStorageTemplateResponse + +#### Description + +Creates a private template from private normal block storage. The operation is asynchronous: the returned template remains in `maintenance` until it is ready. Deployments from the template use the source block storage tier. + +#### Usage + +```php +$client->storage->createTemplateFromStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CreateStorageTemplateRequest([ + 'storage' => new CreateStorageTemplateRequestStorage([ + 'title' => 'My server template', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Block storage UUID + +**$storage:** `CreateStorageTemplateRequestStorage` β€” Parameters for creating a template from the block storage. + +
+ +## tag +{:#tagAnchor} + +
+$client->tag->listTags() -> Tags + +#### Description + +Returns all existing tags with their properties and servers tagged. + +#### Usage + +```php +$client->tag->listTags(); +``` + +
+ +
+$client->tag->createTag($request) -> Tag + +#### Description + +Creates a new tag. Existing servers can be tagged in same request. + +#### Usage + +```php +$client->tag->createTag( + new Tag([ + 'tag' => new TagTag([ + 'description' => 'Production servers', + 'name' => 'PROD', + 'servers' => new TagServers([ + 'server' => [ + '0077fa3d-32db-4b09-9f5f-30d9e9afb565', + ], + ]), + ]), + ]), +); +``` + +#### Parameters + +**$request:** `Tag` + +
+ +
+$client->tag->getTag($name) -> Tag + +#### Description + +Returns details for a specific tag. + +#### Usage + +```php +$client->tag->getTag( + 'DEV', +); +``` + +#### Parameters + +**$name:** `string` β€” Tag name + +
+ +
+$client->tag->modifyTag($name, $request) -> Tag + +#### Description + +Changes attributes of an existing tag + +#### Usage + +```php +$client->tag->modifyTag( + 'DEV', + new ModifyTagRequest([ + 'body' => new Tag([ + 'tag' => new TagTag([ + 'description' => 'Production servers', + 'name' => 'PROD', + 'servers' => new TagServers([ + 'server' => [ + '0077fa3d-32db-4b09-9f5f-30d9e9afb565', + ], + ]), + ]), + ]), + ]), +); +``` + +#### Parameters + +**$name:** `string` β€” Tag name + +**$request:** `Tag` + +
+ +
+$client->tag->deleteTag($name) + +#### Description + +Deletes a specific tag. + +#### Usage + +```php +$client->tag->deleteTag( + 'DEV', +); +``` + +#### Parameters + +**$name:** `string` β€” Tag name + +
+ +## timezone +{:#timezoneAnchor} + +
+$client->timezone->listTimezones() -> Timezones + +#### Description + +Retrieves a list of supported timezones. + +#### Usage + +```php +$client->timezone->listTimezones(); +``` + +
+ +## account-tokens +{:#account-tokensAnchor} + +
+$client->accountTokens->listTokens($request) -> array + +#### Description + +List all tokens for the currently authorized account. +The tokens are returned in a paged format, with the default page size being 20. +The maximum page size is 100. + +#### Usage + +```php +$client->accountTokens->listTokens( + new ListTokensRequest([ + 'gui' => true, + 'sort' => '+name,-created_at', + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” How many tokens to return at per page + +**$offset:** `?int` β€” Offset to start listing the tokens from + +**$gui:** `?bool` β€” Filter tokens based on GUI flag (true or false). Default is no value, i.e. no filtering and all tokens are returned. + +**$sort:** `?string` β€” Comma-separated list of fields to sort by. Prefix with '+' for ascending or '-' for descending order. Supported fields: created_at, expires_at, last_used_at, name. Example: sort=+name,-created_at. If no prefix is given, descending is assumed. Follows OpenAPI collectionFormat 'csv'. + +
+ +
+$client->accountTokens->createToken($request) -> AccountTokensToken + +#### Description + +Create a new API token. Maximum token validity is 24*365h=8760h (~1 year). +Attribute allowed_ip_prefixes allows defining a list of CIDR/IP addresses from where the token is accepted. +Empty list denies access from everywhere. If unset, the default list will be the IP filters of the account. If no IP filters are defined for the account either, the default will be ["0.0.0.0/0", "::0/0"], i.e. allow from any address. + +#### Usage + +```php +$client->accountTokens->createToken( + new AccountTokensCreateTokenRequestExpiresIn([]), +); +``` + +#### Parameters + +**$request:** `AccountTokensCreateTokenRequestExpiresIn|AccountTokensCreateTokenRequestExpiresAt` + +
+ +
+$client->accountTokens->getToken($tokenUuid) -> AccountTokensGetTokenResponse + +#### Description + +Get the details of a specific API token. + +#### Usage + +```php +$client->accountTokens->getToken( + 'token-uuid', +); +``` + +#### Parameters + +**$tokenUuid:** `string` β€” The uuid of the token to get + +
+ +
+$client->accountTokens->revokeToken($tokenUuid) + +#### Description + +Revoke a specific API token. + +#### Usage + +```php +$client->accountTokens->revokeToken( + 'token-uuid', +); +``` + +#### Parameters + +**$tokenUuid:** `string` β€” The uuid of the token to delete + +
+ +## object-storage-2 +{:#object-storage-2Anchor} + +
+$client->objectStorage2->listObjectStorages($request) -> array + +#### Description + +Returns a list of object storage services. + +#### Usage + +```php +$client->objectStorage2->listObjectStorages( + new ListObjectStoragesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->objectStorage2->createObjectStorage($request) -> ObjectStorage2ServiceDetailResponse + +#### Description + +Creates a new object storage service. + +#### Usage + +```php +$client->objectStorage2->createObjectStorage( + new ObjectStorage2ServiceCreate([ + 'name' => 'example-service', + 'region' => 'example', + 'configuredStatus' => ObjectStorage2PropertyConfiguredStatus::Started->value, + 'networks' => [ + new ObjectStorage2NetworkCreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2NetworkType::Public_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + new ObjectStorage2NetworkCreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2NetworkType::Private_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ], + ]), +); +``` + +#### Parameters + +**$name:** `string` + +**$region:** `string` + +**$configuredStatus:** `string` + +**$networks:** `?array` β€” Networks to attach to the service. Private networks must reside in the same region as the object storage. + +**$customDomains:** `?array` β€” Custom domains to attach to the service. + +**$labels:** `?array` β€” Labels for classifying the service. + +**$properties:** `?ObjectStorage2PropertiesCreate` + +**$terminationProtection:** `?bool` β€” Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first. + +
+ +
+$client->objectStorage2->getObjectStorage($serviceUuid) -> ObjectStorage2ServiceDetailResponse + +#### Description + +Returns object storage service details by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->replaceObjectStorage($serviceUuid, $request) -> ObjectStorage2ServiceDetailResponse + +#### Description + +Replaces existing object storage service by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->replaceObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2ServiceReplace([ + 'name' => 'example-service', + 'configuredStatus' => ObjectStorage2PropertyConfiguredStatus::Started->value, + 'networks' => [ + new ObjectStorage2NetworkCreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2NetworkType::Public_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + new ObjectStorage2NetworkCreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2NetworkType::Private_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ], + 'labels' => [ + new ObjectStorage2LabelCreate([ + 'key' => 'example-label-key', + 'value' => 'example-label-value', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” The name of the service. + +**$configuredStatus:** `string` + +**$terminationProtection:** `?bool` β€” Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first. + +**$networks:** `?array` + +**$customDomains:** `?array` + +**$staticWebsites:** `?array` β€” Static website configurations for this service. Array replaces all existing configurations. + +**$labels:** `?array` + +**$properties:** `?ObjectStorage2PropertiesCreate` + +
+ +
+$client->objectStorage2->deleteObjectStorage($serviceUuid, $request) + +#### Description + +Deletes existing object storage service by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', + new DeleteObjectStorageRequest([ + 'force' => true, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$force:** `?bool` β€” If the parameter is provided, the deletion process starts even if the service is not empty. + +
+ +
+$client->objectStorage2->modifyObjectStorage($serviceUuid, $request) -> ObjectStorage2ServiceDetailResponse + +#### Description + +Modifies existing object storage service by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->modifyObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2ServiceModify([ + 'name' => 'example-service', + 'configuredStatus' => ObjectStorage2PropertyConfiguredStatus::Started->value, + 'networks' => [ + new ObjectStorage2NetworkCreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2NetworkType::Private_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `?string` + +**$configuredStatus:** `?string` + +**$networks:** `?array` + +**$customDomains:** `?array` + +**$staticWebsites:** `?array` β€” Static website configurations for this service. Array replaces all existing configurations. + +**$labels:** `?array` + +**$properties:** `?ObjectStorage2PropertiesCreate` + +**$terminationProtection:** `?bool` β€” Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first. + +
+ +
+$client->objectStorage2->listObjectStorageNetworks($serviceUuid) -> array + +#### Description + +Returns a list of available service networks by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageNetworks( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageNetwork($serviceUuid, $request) -> ObjectStorage2NetworkDetailResponse + +#### Description + +Creates a new service network by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateObjectStorageNetworkRequest([ + 'body' => new ObjectStorage2NetworkCreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2NetworkType::Public_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `ObjectStorage2NetworkCreate` + +
+ +
+$client->objectStorage2->getObjectStorageNetwork($serviceUuid, $networkName) -> ObjectStorage2NetworkDetailResponse + +#### Description + +Returns service network details by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +
+ +
+$client->objectStorage2->deleteObjectStorageNetwork($serviceUuid, $networkName) + +#### Description + +Deletes existing network by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +
+ +
+$client->objectStorage2->listObjectStorageCustomDomains($serviceUuid) -> array + +#### Description + +Returns a list of custom domains attached to a service by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageCustomDomains( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->attachObjectStorageCustomDomain($serviceUuid, $request) -> ObjectStorage2CustomDomainDetailResponse + +#### Description + +Attaches a new custom domain to the service identified by {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->attachObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + new AttachObjectStorageCustomDomainRequest([ + 'body' => new ObjectStorage2CustomDomainCreate([ + 'type' => ObjectStorage2CustomDomainCreateType::Public_->value, + 'domainName' => 'example.com', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `ObjectStorage2CustomDomainCreate` + +
+ +
+$client->objectStorage2->getObjectStorageCustomDomain($serviceUuid, $customDomainName) -> ObjectStorage2CustomDomainDetailResponse + +#### Description + +Returns custom domain details by given {service_uuid} and {domain_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +
+ +
+$client->objectStorage2->deleteObjectStorageCustomDomain($serviceUuid, $customDomainName) + +#### Description + +Deletes existing custom domain by given {service_uuid} and {domain_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +
+ +
+$client->objectStorage2->modifyObjectStorageCustomDomain($serviceUuid, $customDomainName, $request) -> ObjectStorage2CustomDomainDetailResponse + +#### Description + +Modifies existing custom domain by given {service_uuid} and {domain_name}. + +#### Usage + +```php +$client->objectStorage2->modifyObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', + new ObjectStorage2CustomDomainModify([ + 'type' => ObjectStorage2CustomDomainModifyType::Public_->value, + 'domainName' => 'example.com', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +**$type:** `?string` β€” Type of the custom domain. + +**$domainName:** `?string` β€” New modified custom domain. Supports both apex domains (example.com) and subdomains (objects.example.com). + +
+ +
+$client->objectStorage2->listObjectStorageRegions() -> array + +#### Description + +Returns a list of available managed object storage regions. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageRegions(); +``` + +
+ +
+$client->objectStorage2->getObjectStorageRegion($regionName) -> ObjectStorage2RegionDetailResponse + +#### Description + +Returns object storage region details by given {name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageRegion( + 'my-object-storage', +); +``` + +#### Parameters + +**$regionName:** `string` β€” The name of the region. + +
+ +
+$client->objectStorage2->getObjectStorageMetrics($serviceUuid) -> ObjectStorage2MetricsUsageResponse + +#### Description + +Returns object storage metrics by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageMetrics( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->listObjectStorageBucketMetrics($serviceUuid, $request) -> array + +#### Description + +Returns metrics for buckets within a service. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageBucketMetrics( + '01234567-89ab-cdef-0123-456789abcdef', + new ListObjectStorageBucketMetricsRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +
+ +
+$client->objectStorage2->createObjectStorageBucket($serviceUuid, $request) -> ObjectStorage2BucketDetailResponse + +#### Description + +Creates a new service bucket by the given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageBucket( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2BucketCreate([ + 'name' => 'my-bucket-1', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” Must be unique within the service, and should contain only alphanumeric, .,- and _. + +
+ +
+$client->objectStorage2->deleteObjectStorageBucket($serviceUuid, $bucketName) + +#### Description + +Deletes an existing bucket by given {service_uuid} and {bucket_name}. This API call will remove all objects from the bucket permanently and cannot be reversed. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageBucket( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$bucketName:** `string` β€” The name of the bucket. + +
+ +
+$client->objectStorage2->listObjectStorageMetricsSeries($serviceUuid, $request) -> array + +#### Description + +Returns Object Storage instance metrics series by a given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + new ListObjectStorageMetricsSeriesRequest([ + 'from' => new DateTime('2024-01-01T00:00:00Z'), + 'to' => new DateTime('2024-01-01T00:00:00Z'), + 'interval' => '1h', + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$from:** `?DateTime` β€” Beginning of the time range for which to return metrics. + +**$to:** `?DateTime` β€” End of the time range for which to return metrics. + +**$interval:** `?string` β€” Metrics aggregation interval. + +**$sort:** `?string` β€” Order of returned results. + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +
+ +
+$client->objectStorage2->listObjectStorageLabels($serviceUuid) -> array + +#### Description + +Returns a list of available service labels by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageLabel($serviceUuid, $request) -> ObjectStorage2LabelDetailResponse + +#### Description + +Creates a new label by given {service_uuid}. Labels are used for service filtering. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateObjectStorageLabelRequest([ + 'body' => new ObjectStorage2LabelCreate([ + 'key' => 'foo', + 'value' => 'bar', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `ObjectStorage2LabelCreate` + +
+ +
+$client->objectStorage2->getObjectStorageLabel($serviceUuid, $labelKey) -> ObjectStorage2LabelDetailResponse + +#### Description + +Returns label details by given {service_uuid} and {key}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->objectStorage2->deleteObjectStorageLabel($serviceUuid, $labelKey) + +#### Description + +Deletes existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->objectStorage2->modifyObjectStorageLabel($serviceUuid, $labelKey, $request) -> ObjectStorage2LabelDetailResponse + +#### Description + +Modifies existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->objectStorage2->modifyObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + new ObjectStorage2LabelModify([ + 'key' => 'foo', + 'value' => 'bar', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +**$key:** `?string` + +**$value:** `?string` + +
+ +
+$client->objectStorage2->listObjectStorageStaticWebsites($serviceUuid) + +#### Description + +Returns all static website configurations for a service along with available domains. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageStaticWebsites( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageStaticWebsite($serviceUuid, $request) -> ObjectStorage2StaticWebsiteConfig + +#### Description + +Creates a new static website hosting configuration for a domain. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateObjectStorageStaticWebsiteRequest([ + 'body' => new ObjectStorage2StaticWebsiteConfigCreate([ + 'bucketName' => 'my-website', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `ObjectStorage2StaticWebsiteConfigCreate` + +
+ +
+$client->objectStorage2->getObjectStorageStaticWebsite($serviceUuid, $customDomainName) -> ObjectStorage2StaticWebsiteConfig + +#### Description + +Returns a static website configuration for a specific domain. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +
+ +
+$client->objectStorage2->deleteObjectStorageStaticWebsite($serviceUuid, $customDomainName) + +#### Description + +Deletes a static website configuration. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +
+ +
+$client->objectStorage2->modifyObjectStorageStaticWebsite($serviceUuid, $customDomainName, $request) -> ObjectStorage2StaticWebsiteConfig + +#### Description + +Updates an existing static website configuration. + +#### Usage + +```php +$client->objectStorage2->modifyObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', + new ObjectStorage2StaticWebsiteConfigModify([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +**$bucketName:** `?string` β€” Name of the S3/ECS bucket containing the website content. Only alphanumerics, dots, hyphens, and underscores are allowed. + +**$bucketPrefix:** `?string` β€” Optional prefix/subfolder within the bucket. Only alphanumerics, slashes, dots, hyphens, and underscores are allowed. + +**$indexDocument:** `?string` β€” Default document for directories. Only alphanumerics, slashes, dots, hyphens, and underscores are allowed. + +**$spaMode:** `?bool` β€” Enable Single Page Application (SPA) mode. When enabled, all non-file routes serve the index document, allowing client-side routing to handle the URL. Essential for React, Vue, Next.js, and similar frameworks. + +**$enabled:** `?bool` β€” Whether the static website configuration should be active + +**$errorPages:** `?array` β€” Custom error page configurations for specific HTTP status codes or ranges. Replaces the entire set when provided. + +
+ +
+$client->objectStorage2->listObjectStorageDomains($serviceUuid) -> ObjectStorage2ServiceDomains + +#### Description + +Returns all domains associated with this service (public endpoint, private endpoint, custom domains) along with their static website hosting status. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageDomains( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->listObjectStorageUsers($serviceUuid) -> array + +#### Description + +Returns a list of available service users by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageUsers( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageUser($serviceUuid, $request) -> ObjectStorage2UserDetailResponse + +#### Description + +Creates a new service user by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageUser( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2UserCreate([ + 'username' => 'example_user', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user to create. + +
+ +
+$client->objectStorage2->getObjectStorageUser($serviceUuid, $username) -> ObjectStorage2UserDetailResponse + +#### Description + +Returns service user details by given {service_uuid} and {username}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->deleteObjectStorageUser($serviceUuid, $username) + +#### Description + +Deletes existing user by given {service_uuid} and {username}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->listObjectStorageAccessKeys($serviceUuid, $username) -> array + +#### Description + +Returns a list of available access keys for a user. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageAccessKeys( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->createObjectStorageAccessKey($serviceUuid, $username) -> ObjectStorage2CreateAccessKeyResponse + +#### Description + +Creates a new access key by given {service_uuid} and {username}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageAccessKey( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->getObjectStorageAccessKeyDetails($serviceUuid, $username, $accessKeyId) -> ObjectStorage2AccessKeyDetailResponse + +#### Description + +Returns access key details by given {service_uuid}, {username}, and {access-key-id}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageAccessKeyDetails( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$accessKeyId:** `string` β€” The ID of the access key. + +
+ +
+$client->objectStorage2->deleteObjectStorageAccessKey($serviceUuid, $username, $accessKeyId) + +#### Description + +Deletes existing access key by given {service_uuid}, {username}, and {access-key-id}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageAccessKey( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$accessKeyId:** `string` β€” The ID of the access key. + +
+ +
+$client->objectStorage2->modifyObjectStorageAccessKeyDetails($serviceUuid, $username, $accessKeyId, $request) -> ObjectStorage2AccessKeyDetailResponse + +#### Description + +Modifies access key details. + +#### Usage + +```php +$client->objectStorage2->modifyObjectStorageAccessKeyDetails( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', + new ObjectStorage2AccessKeyModify([ + 'status' => ObjectStorage2AccessKeyModifyStatus::Inactive->value, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$accessKeyId:** `string` β€” The ID of the access key. + +**$status:** `?string` β€” Indicates if the key is active or inactive. + +
+ +
+$client->objectStorage2->listObjectStorageAttachedUserPolicies($serviceUuid, $username) -> array + +#### Description + +Returns a list of attached user policies for a user. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageAttachedUserPolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->attachObjectStorageUserPolicy($serviceUuid, $username, $request) + +#### Description + +Attach a policy to a user. + +#### Usage + +```php +$client->objectStorage2->attachObjectStorageUserPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachObjectStorageUserPolicyRequest([ + 'body' => new ObjectStorage2PolicyAttachmentCreate([ + 'name' => 'test-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$request:** `ObjectStorage2PolicyAttachmentCreate` + +
+ +
+$client->objectStorage2->detachObjectStorageUserPolicy($serviceUuid, $username, $nestedName) + +#### Description + +Detach a policy from a user. + +#### Usage + +```php +$client->objectStorage2->detachObjectStorageUserPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$nestedName:** `string` β€” The name of the policy to detach. + +
+ +
+$client->objectStorage2->getObjectStorageUserInlinePolicy($serviceUuid, $username, $userPolicyName) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Get the user inline policy by the given {service_uuid}, {username} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$userPolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->deleteObjectStorageUserInlinePolicy($serviceUuid, $username, $userPolicyName) + +#### Description + +Deletes the user inline policy by the given {service_uuid}, {username}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$userPolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->listObjectStorageUserInlinePolicies($serviceUuid, $username) -> array + +#### Description + +Lists the user inline policies by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageUserInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->createObjectStorageUserInlinePolicy($serviceUuid, $username, $request) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Creates a user inline policy by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageUserInlinePolicyRequest([ + 'body' => new ObjectStorage2InlinePolicyCreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$request:** `ObjectStorage2InlinePolicyCreate` + +
+ +
+$client->objectStorage2->getObjectStorageUserTags($serviceUuid, $username) -> array + +#### Description + +Returns a user's tags by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageUserTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->replaceObjectStorageUserTags($serviceUuid, $username, $request) -> array + +#### Description + +Replaces a user's tags by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->replaceObjectStorageUserTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ReplaceObjectStorageUserTagsRequest([ + 'body' => [ + new ObjectStorage2TagListRequestItem([ + 'key' => 'environment', + 'value' => 'production', + ]), + new ObjectStorage2TagListRequestItem([ + 'key' => 'team', + 'value' => 'backend', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$request:** `array` + +
+ +
+$client->objectStorage2->deleteObjectStorageUserTag($serviceUuid, $username, $userTagKey) + +#### Description + +Deletes a user's tag by the given {service_uuid}, {username}, and {tag_key}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageUserTag( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$userTagKey:** `string` β€” The key of the user tag. + +
+ +
+$client->objectStorage2->createObjectStorageUserPermissionsBoundary($serviceUuid, $username, $request) -> string + +#### Description + +Creates a user's permissions boundary by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageUserPermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageUserPermissionsBoundaryRequest([ + 'body' => new ObjectStorage2PermissionsBoundaryCreate([ + 'policyName' => 'sample-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$request:** `ObjectStorage2PermissionsBoundaryCreate` + +
+ +
+$client->objectStorage2->deleteObjectStorageUserPermissionsBoundary($serviceUuid, $username) + +#### Description + +Deletes a user's permissions boundary by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageUserPermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->listObjectStoragePolicyVersions($serviceUuid, $policyName) -> array + +#### Description + +Lists policy versions given by {service_uuid}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->listObjectStoragePolicyVersions( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +
+ +
+$client->objectStorage2->createObjectStoragePolicyVersion($serviceUuid, $policyName, $request) -> ObjectStorage2PolicyVersionResponse + +#### Description + +Creates a policy version by the given {service_uuid}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->createObjectStoragePolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2PolicyVersionCreate([ + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":["*"],"Effect":"Deny","Resource":"*"}]}', + 'isDefault' => true, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +**$document:** `string` β€” A valid, URL-encoded policy document. + +**$isDefault:** `bool` β€” Set this version as the default. + +
+ +
+$client->objectStorage2->getObjectStoragePolicyVersion($serviceUuid, $policyName, $policyVersion) -> ObjectStorage2PolicyVersionResponse + +#### Description + +Get a single policy version by the given {service_uuid}, {policy_name}, and {policy_version}. + +#### Usage + +```php +$client->objectStorage2->getObjectStoragePolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'v1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +**$policyVersion:** `string` β€” The version identifier of the policy. + +
+ +
+$client->objectStorage2->deleteObjectStoragePolicyVersion($serviceUuid, $policyName, $policyVersion) + +#### Description + +Deletes a policy version by the given {service_uuid}, {policy_name}, and {policy_version}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStoragePolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'v1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +**$policyVersion:** `string` β€” The version identifier of the policy. + +
+ +
+$client->objectStorage2->getObjectStoragePolicy($serviceUuid, $policyName) -> ObjectStorage2PolicyDetailResponse + +#### Description + +Returns service policy details by given {service_uuid} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStoragePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +
+ +
+$client->objectStorage2->deleteObjectStoragePolicy($serviceUuid, $policyName) + +#### Description + +Deletes existing policy by given {service_uuid} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStoragePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +
+ +
+$client->objectStorage2->setObjectStorageDefaultPolicyVersion($serviceUuid, $policyName, $request) -> ObjectStorage2PolicyDetailResponse + +#### Description + +Sets the default version for a policy. Note: This is mapped from ModifyPolicyVersion handler. + +#### Usage + +```php +$client->objectStorage2->setObjectStorageDefaultPolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2PolicySetDefaultVersion([ + 'versionId' => 'v2', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +**$versionId:** `string` β€” The policy version ID to set as default. + +
+ +
+$client->objectStorage2->listObjectStoragePolicies($serviceUuid) -> array + +#### Description + +Returns a list of available service policies by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStoragePolicies( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStoragePolicy($serviceUuid, $request) -> ObjectStorage2PolicyDetailResponse + +#### Description + +Creates a new service policy by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->createObjectStoragePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2PolicyCreate([ + 'name' => 'example-policy', + 'description' => 'example-description', + 'document' => '%7B%22Version%22%3A%20%222012-10-17%22%2C%20%20%22Statement%22%3A%20%5B%7B%22Action%22%3A%20%5B%22iam%3AGetUser%22%5D%2C%20%22Resource%22%3A%20%22%2A%22%2C%20%22Effect%22%3A%20%22Allow%22%2C%20%22Sid%22%3A%20%22editor%22%7D%5D%7D', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” Unique name of the policy. + +**$description:** `?string` β€” The policy description. + +**$document:** `string` β€” A valid, URL-encoded policy document. + +
+ +
+$client->objectStorage2->listObjectStorageIamGroupPolicies($serviceUuid, $groupName) -> array + +#### Description + +Lists IAM policies attached to a group. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageIamGroupPolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +
+ +
+$client->objectStorage2->attachObjectStorageIamGroupPolicy($serviceUuid, $groupName, $request) + +#### Description + +Attaches a policy to a group. + +#### Usage + +```php +$client->objectStorage2->attachObjectStorageIamGroupPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachObjectStorageIamGroupPolicyRequest([ + 'body' => new ObjectStorage2PolicyAttachmentCreate([ + 'name' => 'test-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$request:** `ObjectStorage2PolicyAttachmentCreate` + +
+ +
+$client->objectStorage2->detachObjectStorageIamGroupPolicy($serviceUuid, $groupName, $policyName) + +#### Description + +Detaches a policy from a group. + +#### Usage + +```php +$client->objectStorage2->detachObjectStorageIamGroupPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$policyName:** `string` β€” The name of the policy. + +
+ +
+$client->objectStorage2->listObjectStorageGroups($serviceUuid) -> array + +#### Description + +Returns a list of available service groups by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageGroups( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageGroup($serviceUuid, $request) -> ObjectStorage2GroupResponse + +#### Description + +Creates an iam group. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageGroup( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2GroupCreate([ + 'name' => 'new-group', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” A valid string to represent the name of the IAM group. + +
+ +
+$client->objectStorage2->getObjectStorageGroup($serviceUuid, $groupName) -> ObjectStorage2GroupResponse + +#### Description + +Get a single group identified by {service_uuid}, and {group_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +
+ +
+$client->objectStorage2->deleteObjectStorageGroup($serviceUuid, $groupName) + +#### Description + +Deletes a group identified by {group_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +
+ +
+$client->objectStorage2->attachObjectStorageUserToGroup($serviceUuid, $groupName, $username) + +#### Description + +Attaches an iam user to a group identified by {group_name}, and {username}. + +#### Usage + +```php +$client->objectStorage2->attachObjectStorageUserToGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->removeObjectStorageUserFromGroup($serviceUuid, $groupName, $username) + +#### Description + +Removes an iam user from the group identified by {group_name}, and {username}. + +#### Usage + +```php +$client->objectStorage2->removeObjectStorageUserFromGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->listObjectStorageGroupInlinePolicies($serviceUuid, $groupName) -> array + +#### Description + +Lists the group inline policies by the given {service_uuid}, and {group_name}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageGroupInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +
+ +
+$client->objectStorage2->createObjectStorageGroupInlinePolicy($serviceUuid, $groupName, $request) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Creates a group inline policy by the given {service_uuid}, and {group_name}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageGroupInlinePolicyRequest([ + 'body' => new ObjectStorage2InlinePolicyCreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$request:** `ObjectStorage2InlinePolicyCreate` + +
+ +
+$client->objectStorage2->getObjectStorageGroupInlinePolicy($serviceUuid, $groupName, $groupPolicyName) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Get the group inline policy by the given {service_uuid}, {group_name} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$groupPolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->deleteObjectStorageGroupInlinePolicy($serviceUuid, $groupName, $groupPolicyName) + +#### Description + +Deletes the group inline policy by the given {service_uuid}, {group_name}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$groupPolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->listObjectStorageRoles($serviceUuid) -> array + +#### Description + +Lists the roles. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageRoles( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageRole($serviceUuid, $request) -> ObjectStorage2RoleResponse + +#### Description + +Creates a service IAM role. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2RoleCreate([ + 'name' => 'test-role', + 'assumeRolePolicyDocument' => '{"Version": "2012-10-17","Statement": [{"Action": "sts:AssumeRole","Principal": {"AWS": ["urn:ecs:iam::ns1:user/Demby"]},"Effect": "Allow","Resource": "*"}]}', + 'description' => 'A test role.', + 'maxSessionDuration' => 3600, + 'permissionsBoundary' => 'test-policy', + 'tags' => [ + new ObjectStorage2RoleTag([ + 'key' => 'department', + 'value' => 'Finance', + ]), + new ObjectStorage2RoleTag([ + 'key' => 'school', + 'value' => 'University of Helsinki', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` + +**$assumeRolePolicyDocument:** `string` β€” The policy document that grants an entity permission to assume the role. + +**$description:** `?string` β€” Description of the role. + +**$maxSessionDuration:** `?int` β€” Maximum session duration in seconds. + +**$permissionsBoundary:** `?string` β€” Policy name to set as the permissions boundary. + +**$tags:** `?array` β€” Tags to attach to the role (max 50). + +
+ +
+$client->objectStorage2->getObjectStorageRole($serviceUuid, $roleName) -> ObjectStorage2RoleResponse + +#### Description + +Get a single role identified by {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->deleteObjectStorageRole($serviceUuid, $roleName) + +#### Description + +Deletes a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->updateObjectStorageRole($serviceUuid, $roleName, $request) -> ObjectStorage2RoleResponse + +#### Description + +Updates a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->updateObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2RoleUpdate([ + 'description' => 'New description', + 'maxSessionDuration' => 3900, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$description:** `?string` β€” New description for the role. + +**$maxSessionDuration:** `?int` β€” New maximum session duration in seconds. + +
+ +
+$client->objectStorage2->listObjectStorageRoleInlinePolicies($serviceUuid, $roleName) -> array + +#### Description + +Returns a list of role inline policies by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageRoleInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->createObjectStorageRoleInlinePolicy($serviceUuid, $roleName, $request) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Creates a role inline policy by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageRoleInlinePolicyRequest([ + 'body' => new ObjectStorage2InlinePolicyCreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$request:** `ObjectStorage2InlinePolicyCreate` + +
+ +
+$client->objectStorage2->getObjectStorageRoleInlinePolicy($serviceUuid, $roleName, $rolePolicyName) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Returns a role's inline policy by the given {service_uuid}, {role_name}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$rolePolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->deleteObjectStorageRoleInlinePolicy($serviceUuid, $roleName, $rolePolicyName) + +#### Description + +Delete a role inline policy by the given {service_uuid}, {role_name} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$rolePolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->createObjectStorageRolePermissionsBoundary($serviceUuid, $roleName, $request) -> string + +#### Description + +Creates a role policy's permissions boundary by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageRolePermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageRolePermissionsBoundaryRequest([ + 'body' => new ObjectStorage2PermissionsBoundaryCreate([ + 'policyName' => 'sample-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$request:** `ObjectStorage2PermissionsBoundaryCreate` + +
+ +
+$client->objectStorage2->deleteObjectStorageRolePermissionsBoundary($serviceUuid, $roleName) + +#### Description + +Deletes a role permissions boundary by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageRolePermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->assumeObjectStorageRolePolicy($serviceUuid, $roleName, $request) -> ObjectStorage2AssumeRolePolicyResponse + +#### Description + +Assume a role policy by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->assumeObjectStorageRolePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2AssumeRolePolicyRequest([ + 'document' => '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":"backup.upcloud.com"},"Action":"sts:AssumeRole"}]}', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$document:** `string` β€” The assume role policy document that grants an entity permission to assume the role. + +
+ +
+$client->objectStorage2->listObjectStorageAttachedRolePolicies($serviceUuid, $roleName) -> array + +#### Description + +Lists all policies attached to a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageAttachedRolePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->attachObjectStoragePolicyToRole($serviceUuid, $roleName, $request) + +#### Description + +Attaches a policy to a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->attachObjectStoragePolicyToRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachObjectStoragePolicyToRoleRequest([ + 'body' => new ObjectStorage2PolicyAttachmentCreate([ + 'name' => 'test-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$request:** `ObjectStorage2PolicyAttachmentCreate` + +
+ +
+$client->objectStorage2->detachObjectStoragePolicyFromRole($serviceUuid, $roleName, $rolePolicyName) + +#### Description + +Detaches a policy from a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->detachObjectStoragePolicyFromRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$rolePolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->getObjectStorageRoleTags($serviceUuid, $roleName) -> array + +#### Description + +Returns a role's tags by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageRoleTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->replaceObjectStorageRoleTags($serviceUuid, $roleName, $request) -> array + +#### Description + +Replaces a role's tags by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->replaceObjectStorageRoleTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ReplaceObjectStorageRoleTagsRequest([ + 'body' => [ + new ObjectStorage2TagListRequestItem([ + 'key' => 'environment', + 'value' => 'production', + ]), + new ObjectStorage2TagListRequestItem([ + 'key' => 'team', + 'value' => 'backend', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$request:** `array` + +
+ +
+$client->objectStorage2->deleteObjectStorageRoleTag($serviceUuid, $roleName, $roleTagKey) + +#### Description + +Deletes a role's tag by the given {service_uuid}, {role_name}, and {tag_key}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageRoleTag( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$roleTagKey:** `string` β€” The key of the role tag. + +
+ +## file-storage +{:#file-storageAnchor} + +
+$client->fileStorage->listFileStorages($request) -> array + +#### Description + +Returns a list of File Storage services. + +#### Usage + +```php +$client->fileStorage->listFileStorages( + new ListFileStoragesRequest([]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->fileStorage->createFileStorage($request) -> FileStorageServiceDetailResponse + +#### Description + +Creates a new File Storage service. + +#### Usage + +```php +$client->fileStorage->createFileStorage( + new FileStorageServiceCreate([ + 'name' => 'test-name', + 'zone' => 'fi-hel2', + 'configuredStatus' => FileStorageConfiguredStatus::Started->value, + 'sizeGib' => 250, + 'encrypted' => false, + 'networks' => [ + new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'net', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '192.168.147.120', + ]), + ], + 'shares' => [ + new FileStorageShareCreate([ + 'name' => 'read', + 'path' => '/public', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '*', + 'permission' => FileStoragePermission::Ro->value, + ]), + ], + ]), + new FileStorageShareCreate([ + 'name' => 'write', + 'path' => '/project/data', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.147.0/24', + 'permission' => FileStoragePermission::Rw->value, + ]), + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => 'local.domain', + 'permission' => FileStoragePermission::Rw->value, + ]), + ], + ]), + ], + 'labels' => [ + new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + ]), +); +``` + +#### Parameters + +**$name:** `string` + +**$zone:** `string` β€” Indicates the zone where the service will be created. + +**$configuredStatus:** `string` + +**$sizeGib:** `int` + +**$encrypted:** `?bool` β€” Indicates whether encryption at rest is enabled for the service. + +**$networks:** `?array` + +**$shares:** `?array` + +**$labels:** `?array` β€” Labels + +
+ +
+$client->fileStorage->getFileStorage($serviceUuid) -> FileStorageServiceDetailResponse + +#### Description + +Returns managed File Storage details by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->getFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->fileStorage->replaceFileStorage($serviceUuid, $request) -> FileStorageServiceDetailResponse + +#### Description + +Replaces existing File Storage service by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->replaceFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new FileStorageServiceReplace([ + 'name' => 'test-name', + 'configuredStatus' => FileStorageConfiguredStatus::Started->value, + 'sizeGib' => 250, + 'networks' => [ + new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'net', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '192.168.147.120', + ]), + ], + 'labels' => [ + new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` + +**$configuredStatus:** `string` + +**$sizeGib:** `int` + +**$networks:** `?array` + +**$labels:** `?array` β€” Labels + +
+ +
+$client->fileStorage->deleteFileStorage($serviceUuid) + +#### Description + +Deletes existing File Storage service by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->deleteFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->fileStorage->modifyFileStorage($serviceUuid, $request) -> FileStorageServiceDetailResponse + +#### Description + +Modifies existing File Storage service by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->modifyFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new FileStorageServiceModify([ + 'name' => 'test-name', + 'configuredStatus' => FileStorageConfiguredStatus::Started->value, + 'sizeGib' => 250, + 'networks' => [ + new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'net', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '192.168.147.120', + ]), + ], + 'labels' => [ + new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `?string` + +**$configuredStatus:** `?string` + +**$sizeGib:** `?int` + +**$networks:** `?array` + +**$labels:** `?array` + +
+ +
+$client->fileStorage->listFileStorageNetworks($serviceUuid) -> array + +#### Description + +Returns a list of available service networks by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->listFileStorageNetworks( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->fileStorage->createFileStorageNetwork($serviceUuid, $request) -> FileStorageNetworkDetailResponse + +#### Description + +Creates a new service network by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->createFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new CreateFileStorageNetworkRequest([ + 'body' => new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'test-name', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '10.20.30.40', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `FileStorageNetworkCreate` + +
+ +
+$client->fileStorage->getFileStorageNetwork($serviceUuid, $networkName) -> FileStorageNetworkDetailResponse + +#### Description + +Returns service network details by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->fileStorage->getFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +
+ +
+$client->fileStorage->deleteFileStorageNetwork($serviceUuid, $networkName) + +#### Description + +Deletes existing network by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->fileStorage->deleteFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +
+ +
+$client->fileStorage->modifyFileStorageNetwork($serviceUuid, $networkName, $request) -> FileStorageNetworkDetailResponse + +#### Description + +Modifies existing service network by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->fileStorage->modifyFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + new FileStorageNetworkModify([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'test-name', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '10.20.30.40', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +**$uuid:** `?string` + +**$name:** `?string` + +**$family:** `?string` + +**$ipAddress:** `?string` + +
+ +
+$client->fileStorage->listFileStorageShares($serviceUuid) -> array + +#### Description + +Returns a list of available service shares by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->listFileStorageShares( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->fileStorage->createFileStorageShare($serviceUuid, $request) -> FileStorageShareDetailResponse + +#### Description + +Creates a new service share by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->createFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new CreateFileStorageShareRequest([ + 'body' => new FileStorageShareCreate([ + 'name' => 'read', + 'path' => '/public', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.147.0/24', + 'permission' => FileStoragePermission::Ro->value, + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `FileStorageShareCreate` + +
+ +
+$client->fileStorage->getFileStorageShare($serviceUuid, $shareName) -> FileStorageShareDetailResponse + +#### Description + +Returns service share details by given {service_uuid} and {share_name}. + +#### Usage + +```php +$client->fileStorage->getFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +
+ +
+$client->fileStorage->deleteFileStorageShare($serviceUuid, $shareName) + +#### Description + +Deletes existing share by given {service_uuid} and {share_name}. + +#### Usage + +```php +$client->fileStorage->deleteFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +
+ +
+$client->fileStorage->modifyFileStorageShare($serviceUuid, $shareName, $request) -> FileStorageShareDetailResponse + +#### Description + +Modifies existing service share by given {service_uuid} and {share_name}. + +#### Usage + +```php +$client->fileStorage->modifyFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + new FileStorageShareModify([ + 'name' => 'test-name', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.25.0/24', + 'permission' => FileStoragePermission::Ro->value, + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +**$name:** `?string` β€” A resource name. + +**$acl:** `?array` + +
+ +
+$client->fileStorage->listFileStorageAcls($serviceUuid, $shareName) -> array + +#### Description + +Returns a list of available ACLs by given {service_uuid} and {share_name}. + +#### Usage + +```php +$client->fileStorage->listFileStorageAcls( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +
+ +
+$client->fileStorage->createFileStorageAcl($serviceUuid, $shareName, $request) -> FileStorageAclDetailResponse + +#### Description + +Creates a new share ACL by given {service_uuid} and {share_name}. + +#### Usage + +```php +$client->fileStorage->createFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + new CreateFileStorageAclRequest([ + 'body' => new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.25.147', + 'permission' => FileStoragePermission::Ro->value, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +**$request:** `FileStorageAclCreate` + +
+ +
+$client->fileStorage->getFileStorageAcl($serviceUuid, $shareName, $aclName) -> FileStorageAclDetailResponse + +#### Description + +Returns ACL details by given {service_uuid}, {share_name} and {acl_name}. + +#### Usage + +```php +$client->fileStorage->getFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +**$aclName:** `string` β€” The name of the ACL. + +
+ +
+$client->fileStorage->deleteFileStorageAcl($serviceUuid, $shareName, $aclName) + +#### Description + +Deletes existing ACL by given {service_uuid}, {share_name} and {acl_name}. + +#### Usage + +```php +$client->fileStorage->deleteFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +**$aclName:** `string` β€” The name of the ACL. + +
+ +
+$client->fileStorage->modifyFileStorageAcl($serviceUuid, $shareName, $aclName, $request) -> FileStorageAclDetailResponse + +#### Description + +Modifies existing ACL by given {service_uuid}, {share_name} and {acl_name}. + +#### Usage + +```php +$client->fileStorage->modifyFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + 'test-name', + new FileStorageAclModify([ + 'name' => 'test-name', + 'target' => '192.168.25.0/24', + 'permission' => FileStoragePermission::Rw->value, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +**$aclName:** `string` β€” The name of the ACL. + +**$name:** `?string` + +**$target:** `?string` β€” The target of the ACL entry. It can be an IP Address, Network Prefix or a wildcard. + +**$permission:** `?string` + +
+ +
+$client->fileStorage->listFileStorageLabels($serviceUuid) -> array + +#### Description + +Returns a list of available service labels by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->listFileStorageLabels( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->fileStorage->createFileStorageLabel($serviceUuid, $request) -> FileStorageLabelDetails + +#### Description + +Creates a new label by given {service_uuid}. Labels are used for service filtering. + +#### Usage + +```php +$client->fileStorage->createFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new CreateFileStorageLabelRequest([ + 'body' => new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `FileStorageLabelCreate` + +
+ +
+$client->fileStorage->getFileStorageLabel($serviceUuid, $labelKey) -> FileStorageLabelDetails + +#### Description + +Returns label details by given {service_uuid} and {key}. + +#### Usage + +```php +$client->fileStorage->getFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->fileStorage->deleteFileStorageLabel($serviceUuid, $labelKey) + +#### Description + +Deletes existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->fileStorage->deleteFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->fileStorage->modifyFileStorageLabel($serviceUuid, $labelKey, $request) -> FileStorageLabelDetails + +#### Description + +Modifies existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->fileStorage->modifyFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'environment', + new FileStorageLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +**$key:** `?string` + +**$value:** `?string` + +
+ +
+$client->fileStorage->getFileStorageCurrentState($serviceUuid) -> FileStorageServiceDetailResponse + +#### Description + +Returns the current state of the File Storage service by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->getFileStorageCurrentState( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +## database +{:#databaseAnchor} + +
+$client->database->listDatabaseTypes() -> array + +#### Description + +Returns a list of available database types. Contains available legacy plans, zones, database versions supported and the configuration properties for each database. PostgreSQL and MySQL componentised (rdb.*) plans are selected with the plan_* request fields instead of a listed plan name. + +#### Usage + +```php +$client->database->listDatabaseTypes(); +``` + +
+ +
+$client->database->listDatabasePlans() -> DatabasePlansResponse + +#### Description + +Lists available componentised database plans + +#### Usage + +```php +$client->database->listDatabasePlans(); +``` + +
+ +
+$client->database->getDatabaseType($serviceTypeName) -> DatabaseServiceTypeResponse + +#### Description + +Returns database type details by given {database_type}. Contains available legacy plans, zones, database versions supported and configuration properties. PostgreSQL and MySQL componentised (rdb.*) plans are selected with the plan_* request fields instead of a listed plan name. + +#### Usage + +```php +$client->database->getDatabaseType( + DatabaseServiceType::Mysql->value, +); +``` + +#### Parameters + +**$serviceTypeName:** `string` β€” Service type parameter + +
+ +
+$client->database->listDatabases($request) -> array + +#### Description + +Returns a list of all available Managed Database services. Depending on their database type, Managed Databases services will have different details. + +#### Usage + +```php +$client->database->listDatabases( + new ListDatabasesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Sort results by the specified field. Prefix with '-' for descending order. Supported fields: `created_at`, `name` (service hostname), `operational_state` (service status), `zone` (location). + +
+ +
+$client->database->createDatabase($request) -> DatabaseServiceInformationResponse + +#### Description + +Creates a new Managed Database instance. New databases are started by default. An initial backup is created automatically on startup and the API will be fully functional only after this backup has been created. The creation might take a while. Note that different databases have different properties that can be passed on creation. For PostgreSQL and MySQL, select the plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines. + +#### Usage + +```php +$client->database->createDatabase( + new DatabaseServiceCreateOpenApi([ + 'hostnamePrefix' => 'doc-api-unique-prefix', + 'title' => 'my-managed-database', + 'type' => DatabaseServiceType::Mysql->value, + 'zone' => 'de-fra1', + 'terminationProtection' => false, + 'maintenance' => new DatabaseServiceCreateOpenApiMaintenance([ + 'dow' => DatabaseMaintenanceDow::Sunday->value, + 'time' => '05:00:00', + ]), + 'networks' => [ + new DatabaseNetworkCreate([ + 'uuid' => '03631160-d57a-4926-ad48-a2f828229dcb', + 'name' => 'example-network-1', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + new DatabaseNetworkCreate([ + 'uuid' => '03631160-d57a-4926-ad48-a2f828229dcb', + 'name' => 'example-network-2', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + ], + 'labels' => [ + new DatabaseLabelCreate([ + 'key' => 'env', + 'value' => 'staging', + ]), + new DatabaseLabelCreate([ + 'key' => 'foo', + 'value' => 'bar', + ]), + ], + 'properties' => new DatabaseServicePropertiesMysql([ + 'automaticUtilityNetworkIpFilter' => true, + 'ipFilter' => [ + 'ip_filter', + ], + ]), + ]), +); +``` + +#### Parameters + +**$hostnamePrefix:** `string` β€” Hostname prefix for the service nodes. + +**$title:** `string` β€” Human-readable title for the service. + +**$type:** `string` + +**$zone:** `string` β€” Zone where the service is created. + +**$setServiceUuid:** `?string` β€” Optional UUID to assign to the created service. + +**$plan:** `?string` β€” Deprecated: prefer the plan_* selection fields (plan_compute, plan_node_count, plan_storage_gib, plan_backups) for PostgreSQL and MySQL. The plan name remains supported, and required for engines without componentised plans. For componentised (rdb.*) plans the storage segment is the desired TOTAL storage per node: any total reachable from a catalog plan's included storage in the plan's storage steps (within its cap) is a valid plan name, e.g. rdb.standard.2x-2CPU-8GB-120GB-regular selects the 80GB catalog plan with a 40GB dynamic top-up. + +**$planCompute:** `?string` β€” Plan selection: compute shape combining family, CPU and memory as one token, as listed in the plan catalog components. PostgreSQL and MySQL only. + +**$planNodeCount:** `?int` β€” Plan selection: number of nodes. + +**$planStorageGib:** `?int` β€” Plan selection: desired TOTAL storage per node in GiB. Resolution picks the plan whose included storage matches, or tops the closest plan up with dynamic additional storage within the allowed limits. Mutually exclusive with additional_disk_space_gib. + +**$planBackups:** `?string` β€” Plan selection: backup tier. PostgreSQL and MySQL tiered plans only. + +**$additionalDiskSpaceGib:** `?int` β€” Additional disk space in GiB. Legacy plans only: componentised (rdb.*) plans set storage as a total via plan_storage_gib or the plan name. + +**$terminationProtection:** `?bool` β€” When enabled, the service cannot be deleted until termination protection is disabled. + +**$maintenance:** `?DatabaseServiceCreateOpenApiMaintenance` β€” Weekly maintenance window. + +**$networks:** `?array` β€” SDN networks to attach to the service. + +**$labels:** `?array` β€” Labels used for service filtering. + +**$serviceIntegrations:** `?array` β€” Service integrations to configure on creation. + +**$properties:** `DatabaseServicePropertiesMysql|DatabaseServicePropertiesPg|DatabaseServicePropertiesRedis|DatabaseServicePropertiesOpensearch|DatabaseServicePropertiesValkey|null` β€” Engine-specific configuration properties. The allowed keys depend on the selected service type; provide the property set matching the chosen type. + +
+ +
+$client->database->getDatabase($uuid) -> DatabaseServiceInformationResponse + +#### Description + +Returns details of a Managed Database service by its {uuid}. + +#### Usage + +```php +$client->database->getDatabase( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->deleteDatabase($uuid) + +#### Description + +Deletes a specified Managed Database. All data will be erased and lost, including backups. If the service is not powered off, it will be powered off before deletion. The state of the service can be anything. + +#### Usage + +```php +$client->database->deleteDatabase( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->modifyDatabase($uuid, $request) -> DatabaseServiceInformationResponse + +#### Description + +Modifies Managed Database service details by its {uuid} including upgrading plans, migration to other zones and database type-specific configurations. For PostgreSQL and MySQL, change the plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines. + +#### Usage + +```php +$client->database->modifyDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceModifyOpenApi([ + 'title' => 'my-managed-database', + 'powered' => true, + 'zone' => 'de-fra1', + 'terminationProtection' => false, + 'maintenance' => new DatabaseServiceModifyOpenApiMaintenance([ + 'dow' => DatabaseMaintenanceDow::Sunday->value, + 'time' => '12:00:00', + ]), + 'networks' => [ + new DatabaseNetworkCreate([ + 'uuid' => '03631160-d57a-4926-ad48-a2f828229dcb', + 'name' => 'example-network-1', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + ], + 'properties' => new DatabaseServicePropertiesMysql([ + 'automaticUtilityNetworkIpFilter' => true, + 'ipFilter' => [ + 'ip_filter', + ], + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$title:** `?string` β€” Human-readable title for the service. + +**$type:** `?string` + +**$powered:** `?bool` β€” Desired power state of the service. + +**$zone:** `?string` β€” Zone to migrate the service to. + +**$plan:** `?string` β€” Deprecated: prefer the plan_* selection fields (plan_compute, plan_node_count, plan_storage_gib, plan_backups) for PostgreSQL and MySQL. The plan name remains supported, and required for engines without componentised plans. For componentised (rdb.*) plans the storage segment is the desired TOTAL storage per node: any total reachable from a catalog plan's included storage in the plan's storage steps (within its cap) is a valid plan name, e.g. rdb.standard.2x-2CPU-8GB-120GB-regular selects the 80GB catalog plan with a 40GB dynamic top-up. + +**$planCompute:** `?string` β€” Plan selection: compute shape combining family, CPU and memory as one token, as listed in the plan catalog components. PostgreSQL and MySQL only. + +**$planNodeCount:** `?int` β€” Plan selection: number of nodes. + +**$planStorageGib:** `?int` β€” Plan selection: desired TOTAL storage per node in GiB. Resolution picks the plan whose included storage matches, or tops the closest plan up with dynamic additional storage within the allowed limits. Mutually exclusive with additional_disk_space_gib. + +**$planBackups:** `?string` β€” Plan selection: backup tier. PostgreSQL and MySQL tiered plans only. + +**$additionalDiskSpaceGib:** `?int` β€” Additional disk space in GiB. Legacy plans only: componentised (rdb.*) plans set storage as a total via plan_storage_gib or the plan name. + +**$terminationProtection:** `?bool` β€” When enabled, the service cannot be deleted until termination protection is disabled. + +**$maintenance:** `?DatabaseServiceModifyOpenApiMaintenance` β€” Weekly maintenance window. + +**$networks:** `?array` β€” SDN networks attached to the service. + +**$labels:** `?array` β€” Labels used for service filtering. + +**$properties:** `DatabaseServicePropertiesMysql|DatabaseServicePropertiesPg|DatabaseServicePropertiesRedis|DatabaseServicePropertiesOpensearch|DatabaseServicePropertiesValkey|null` β€” Engine-specific configuration properties. The allowed keys depend on the service type; provide the property set matching the service's type. + +
+ +
+$client->database->modifyDatabaseType($uuid, $request) -> DatabaseServiceInformationResponse + +#### Description + +Update a service's type by the given {service-uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseType( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceTypeModify([ + 'targetType' => 'primary', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$targetType:** `string` β€” Service type + +
+ +
+$client->database->cloneDatabase($uuid, $request) -> DatabaseServiceInformationResponse + +#### Description + +Creates a clone of a Managed Database service based on its {uuid}. It is possible to change location, plans and use the point in time feature to clone your service at a specific time using your backups. For PostgreSQL and MySQL, select the clone's plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines. + +#### Usage + +```php +$client->database->cloneDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new CloneDatabaseRequest([ + 'body' => new DatabaseServiceCloneMysql([ + 'hostnamePrefix' => 'dev', + 'cloneTime' => new DateTime('2024-01-30T15:04:05Z'), + 'backupName' => 'daily-backup-2024-01-30', + 'zone' => 'fi-hel1', + 'terminationProtection' => false, + 'maintenance' => new DatabaseServiceCloneMysqlMaintenance([ + 'dow' => DatabaseMaintenanceDow::Monday->value, + 'time' => '03:00:00', + ]), + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$request:** `DatabaseServiceCloneMysql|DatabaseServiceClonePg|DatabaseServiceCloneRedis|DatabaseServiceCloneOpensearch|DatabaseServiceCloneValkey` + +
+ +
+$client->database->listDatabaseNetworks($uuid) -> array + +#### Description + +Returns a list of attached SDN networks to a Managed Database service by its {uuid}. + +#### Usage + +```php +$client->database->listDatabaseNetworks( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->createDatabaseNetwork($uuid, $request) -> DatabaseNetworkInformationDetailsResponse + +#### Description + +Attaches an SDN network to a Managed Database service by its {uuid}. + +#### Usage + +```php +$client->database->createDatabaseNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateDatabaseNetworkRequest([ + 'body' => new DatabaseNetworkCreate([ + 'name' => 'my-network', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$request:** `DatabaseNetworkCreate` + +
+ +
+$client->database->getDatabaseNetwork($uuid, $networkName) -> DatabaseNetworkInformationDetailsResponse + +#### Description + +Returns the attached SDN network details to service by its {uuid} and {network_name}. + +#### Usage + +```php +$client->database->getDatabaseNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” Network UUID + +
+ +
+$client->database->deleteDatabaseNetwork($uuid, $networkName) + +#### Description + +Detaches an existing SDN network from a Managed Database service by its {uuid} and {network_name}. + +#### Usage + +```php +$client->database->deleteDatabaseNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” Network UUID + +
+ +
+$client->database->upgradeDatabase($uuid, $request) -> DatabaseServiceInformationResponse + +#### Description + +Upgrades your PostgreSQL Managed Database service database to a newer major version. Downgrades are not permitted. + +#### Usage + +```php +$client->database->upgradeDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceUpgrade([ + 'targetVersion' => '12', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$targetVersion:** `string` β€” Version to upgrade the service + +
+ +
+$client->database->listDatabaseLabels($uuid) -> array + +#### Description + +Returns a list of available service labels by given {service_uuid}. + +#### Usage + +```php +$client->database->listDatabaseLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->createDatabaseLabel($uuid, $request) -> DatabaseLabelResponse + +#### Description + +Creates a new label by given {service_uuid}. Labels used for service filtering. + +#### Usage + +```php +$client->database->createDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateDatabaseLabelRequest([ + 'body' => new DatabaseLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$request:** `DatabaseLabelCreate` + +
+ +
+$client->database->getDatabaseLabel($uuid, $labelKey) -> DatabaseLabelResponse + +#### Description + +Returns label details by given {service_uuid} and {key}. + +#### Usage + +```php +$client->database->getDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'foo', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” Label ID + +
+ +
+$client->database->deleteDatabaseLabel($uuid, $labelKey) + +#### Description + +Deletes existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->database->deleteDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'foo', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” Label ID + +
+ +
+$client->database->modifyDatabaseLabel($uuid, $labelKey, $request) -> DatabaseLabelResponse + +#### Description + +Modifies existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->database->modifyDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'foo', + new DatabaseLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” Label ID + +**$key:** `?string` + +**$value:** `?string` + +
+ +
+$client->database->getDatabaseAvailableExtensions($uuid) -> array + +#### Description + +Returns a list of available PostgreSQL extensions for the Managed Database service by its {service-uuid}. Only supported for PostgreSQL services. + +#### Usage + +```php +$client->database->getDatabaseAvailableExtensions( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getPgAvailableExtensions() -> array + +#### Description + +Returns a list of available PostgreSQL extensions grouped by PostgreSQL version. + +#### Usage + +```php +$client->database->getPgAvailableExtensions(); +``` + +
+ +
+$client->database->getDatabaseTypeVersions() -> array + +#### Description + +Returns a list of supported Managed Database service versions. + +#### Usage + +```php +$client->database->getDatabaseTypeVersions(); +``` + +
+ +
+$client->database->getDatabaseAccessControl($uuid) -> DatabaseAccessControlSettingsResponse + +#### Description + +Return access controls settings for the OpenSearch Managed Database service {uuid}. + +#### Usage + +```php +$client->database->getDatabaseAccessControl( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->modifyDatabaseAccessControl($uuid, $request) -> DatabaseAccessControlSettingsResponse + +#### Description + +Modifies the user {username} access control for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseAccessControl( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceAclModify([ + 'accessControl' => true, + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$accessControl:** `?bool` β€” Enables OpenSearch access control + +**$extendedAccessControl:** `?bool` β€” Enables OpenSearch extended access control + +
+ +
+$client->database->getDatabaseSecurity($uuid) -> DatabaseOpenSearchSecurityPluginStatusResponse + +#### Description + +Returns Security management status for the OpenSearch Managed Database service {uuid}. + +#### Usage + +```php +$client->database->getDatabaseSecurity( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->enableDatabaseSecurityAdmin($uuid, $request) -> DatabaseOpenSearchSecurityPluginStatusResponse + +#### Description + +Enables Security management admin for the OpenSearch Managed Database service {uuid}. + +#### Usage + +```php +$client->database->enableDatabaseSecurityAdmin( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceSecurityEnable([ + 'adminPassword' => 'Str0ngP@ssw0rd!', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$adminPassword:** `string` β€” Security admin password + +
+ +
+$client->database->modifyDatabaseSecurityAdmin($uuid, $request) -> DatabaseOpenSearchSecurityPluginStatusResponse + +#### Description + +Modifies Security management admin password for the OpenSearch Managed Database service {uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseSecurityAdmin( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceSecurityModify([ + 'adminPassword' => 'Curr3nt@Passw0rd!', + 'newPassword' => 'N3w@Str0ngPassw0rd!', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$adminPassword:** `string` β€” Current admin password + +**$newPassword:** `string` β€” New admin password + +
+ +
+$client->database->listDatabaseIntegrationEndpoints() -> array + +#### Description + +Returns a list of available integration endpoints. + +#### Usage + +```php +$client->database->listDatabaseIntegrationEndpoints(); +``` + +
+ +
+$client->database->createDatabaseIntegrationEndpoint($request) -> DatabaseIntegrationEndpointResponse + +#### Description + +Creates a new integration endpoint. + +#### Usage + +```php +$client->database->createDatabaseIntegrationEndpoint( + new DatabaseIntegrationEndpointCreate([ + 'type' => DatabaseIntegrationEndpoint::Logs->value, + 'name' => 'webhook-endpoint', + ]), +); +``` + +#### Parameters + +**$type:** `string` + +**$name:** `string` β€” The name of the integration endpoint. + +**$properties:** `?array` β€” A key-value map of properties specific to the integration endpoint type. + +
+ +
+$client->database->getDatabaseIntegrationEndpoint($integrationUuid) -> DatabaseIntegrationEndpointResponse + +#### Description + +Returns integration endpoint details by given {integration-uuid}. + +#### Usage + +```php +$client->database->getDatabaseIntegrationEndpoint( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$integrationUuid:** `string` β€” Integration UUID + +
+ +
+$client->database->deleteDatabaseIntegrationEndpoint($integrationUuid) + +#### Description + +Deletes existing integration endpoint by given {integration-uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseIntegrationEndpoint( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$integrationUuid:** `string` β€” Integration UUID + +
+ +
+$client->database->modifyDatabaseIntegrationEndpoint($integrationUuid, $request) -> DatabaseIntegrationEndpointResponse + +#### Description + +Modifies existing integration endpoint by given {integration-uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseIntegrationEndpoint( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseIntegrationEndpointModify([]), +); +``` + +#### Parameters + +**$integrationUuid:** `string` β€” Integration UUID + +**$properties:** `?array` + +
+ +
+$client->database->getDatabaseAccountCa() -> DatabaseAccountCaResponse + +#### Description + +Returns the CA certificate. Every customer main account has a private Certificate Authority (CA) that signs certificates for internal use. Managed Database service types, such as PostgreSQL, use it for external connections. To access these services, you must download and configure the certificate on your browser or client. + +#### Usage + +```php +$client->database->getDatabaseAccountCa(); +``` + +
+ +
+$client->database->listDatabaseAlerts() -> array + +#### Description + +Returns all the alerts associated with your Managed Database services. + +#### Usage + +```php +$client->database->listDatabaseAlerts(); +``` + +
+ +
+$client->database->getDatabaseStatus($uuid) -> DatabaseServiceStatusResponse + +#### Description + +Get a service's status by the given {service-uuid}. + +#### Usage + +```php +$client->database->getDatabaseStatus( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseVersions($uuid) -> array + +#### Description + +Returns available versions of the Managed Database service by its {uuid}. + +#### Usage + +```php +$client->database->getDatabaseVersions( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->startDatabaseManualMaintenance($uuid) -> DatabaseUpCloudApiResponse + +#### Description + +Start maintenance updates for your Managed Database service if any updates are pending. + +#### Usage + +```php +$client->database->startDatabaseManualMaintenance( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->enableDatabaseTemporaryWrites($uuid) -> DatabaseUpCloudApiResponse + +#### Description + +Enable temporary writes by the given {service-uuid}. + +#### Usage + +```php +$client->database->enableDatabaseTemporaryWrites( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseMigrationStatus($uuid) -> DatabaseServiceMigrationStatusResponse + +#### Description + +Returns details about the migration progress over time of a Managed database service by its {uuid}. + +#### Usage + +```php +$client->database->getDatabaseMigrationStatus( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseAlerts($uuid) -> array + +#### Description + +Returns alerts for Managed Database service identified by `{uuid}`. + +#### Usage + +```php +$client->database->getDatabaseAlerts( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseMetrics($uuid) -> array + +#### Description + +Returns metrics related to a Managed Database service by its {uuid} and query parameter {period}. + +#### Usage + +```php +$client->database->getDatabaseMetrics( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseQueryStatistics($uuid, $request) -> DatabaseQueryStatisticsResponse + +#### Description + +Returns a list of query statistics for the Managed Database service by its {uuid} and optional query parameters {limit}, {offset} and {order}. Query statistics will differ depending on the database type. + +#### Usage + +```php +$client->database->getDatabaseQueryStatistics( + '01234567-89ab-cdef-0123-456789abcdef', + new GetDatabaseQueryStatisticsRequest([ + 'limit' => 10, + 'offset' => 0, + 'order' => 'asc', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$order:** `?string` β€” Sort order + +
+ +
+$client->database->getDatabaseLogs($uuid, $request) -> DatabaseLogListResponse + +#### Description + +Returns Managed Database service system-level logs by its {uuid} and optional query parameters {limit}, {offset} and {order}. + +#### Usage + +```php +$client->database->getDatabaseLogs( + '01234567-89ab-cdef-0123-456789abcdef', + new GetDatabaseLogsRequest([ + 'limit' => 10, + 'offset' => 0, + 'order' => 'asc', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$order:** `?string` β€” Sort order + +
+ +
+$client->database->listDatabaseConnectionPools($uuid, $request) -> array + +#### Description + +Returns a list of available connection pools for a Managed Database service. Connection pools are available only for PostgreSQL database services. + +#### Usage + +```php +$client->database->listDatabaseConnectionPools( + '01234567-89ab-cdef-0123-456789abcdef', + new ListDatabaseConnectionPoolsRequest([ + 'sort' => 'asc', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->database->createDatabaseConnectionPool($uuid, $request) -> DatabaseConnectionPoolResponse + +#### Description + +Creates a connection pool for the Managed Database service {uuid}. Connection pool endpoints are for PostgreSQL Managed Databases only. + +#### Usage + +```php +$client->database->createDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseConnectionPoolCreate([ + 'database' => 'defaultdb', + 'poolMode' => DatabaseConnectionPoolCreatePoolMode::Statement->value, + 'poolName' => 'readonly-pool', + 'poolSize' => 10, + 'username' => 'readonly', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$database:** `string` β€” Database + +**$poolMode:** `string` β€” Connection Pool mode + +**$poolName:** `string` β€” Connection Pool name + +**$poolSize:** `int` β€” Connection Pool size + +**$username:** `?string` β€” Connection Pool username + +
+ +
+$client->database->getDatabaseConnectionPool($uuid, $poolName) -> DatabaseConnectionPoolResponse + +#### Description + +Returns the connection pool {pool-name} details for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->getDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$poolName:** `string` β€” Connection Pool Name + +
+ +
+$client->database->deleteDatabaseConnectionPool($uuid, $poolName) + +#### Description + +Deletes the connection pool {pool-name} for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$poolName:** `string` β€” Connection Pool Name + +
+ +
+$client->database->modifyDatabaseConnectionPool($uuid, $poolName, $request) -> DatabaseConnectionPoolResponse + +#### Description + +Modifies the connection pool {pool-name} for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + new DatabaseConnectionPoolModify([ + 'database' => 'defaultdb', + 'poolMode' => DatabaseConnectionPoolModifyPoolMode::Session->value, + 'poolSize' => 20, + 'username' => 'app-user', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$poolName:** `string` β€” Connection Pool Name + +**$database:** `?string` β€” Database + +**$poolMode:** `?string` β€” Connection Pool mode + +**$poolSize:** `?int` β€” Connection Pool size + +**$username:** `?string` β€” Connection Pool username + +
+ +
+$client->database->listDatabaseIndices($uuid) -> array + +#### Description + +Returns a list of available indices for a Managed Database service {uuid}. + +#### Usage + +```php +$client->database->listDatabaseIndices( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->deleteDatabaseIndex($uuid, $indexName) + +#### Description + +Deletes the index {index_name} for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseIndex( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$indexName:** `string` β€” OpenSearch Index Name + +
+ +
+$client->database->listDatabaseIntegrations($uuid) -> array + +#### Description + +Returns a list of available service integrations by given {service-uuid}. + +#### Usage + +```php +$client->database->listDatabaseIntegrations( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->createDatabaseIntegration($uuid, $request) -> DatabaseServiceIntegrationResponse + +#### Description + +Creates a new integration by given {service-uuid}. + +#### Usage + +```php +$client->database->createDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateDatabaseIntegrationRequest([ + 'body' => new DatabaseServiceIntegrationCreate([ + 'type' => DatabaseServiceIntegration::Logs->value, + 'destinationUuid' => '09e86f48-2dcd-4a43-843d-3532ab112c1d', + 'properties' => [ + 'opensearch_index_days_max' => 30, + 'opensearch_index_prefix' => "mysql_logs", + ], + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$request:** `DatabaseServiceIntegrationCreate` + +
+ +
+$client->database->getDatabaseIntegration($uuid, $integrationUuid) -> DatabaseServiceIntegrationResponse + +#### Description + +Returns integration details by given {service-uuid} and {integration-uuid}. + +#### Usage + +```php +$client->database->getDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$integrationUuid:** `string` β€” Integration UUID + +
+ +
+$client->database->deleteDatabaseIntegration($uuid, $integrationUuid) + +#### Description + +Deletes existing integration by given {service-uuid} and {integration-uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$integrationUuid:** `string` β€” Integration UUID + +
+ +
+$client->database->modifyDatabaseIntegration($uuid, $integrationUuid, $request) -> DatabaseServiceIntegrationResponse + +#### Description + +Modifies existing integration by given {service-uuid} and {integration-uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceIntegrationModify([ + 'properties' => [ + 'key1' => "value1", + ], + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$integrationUuid:** `string` β€” Integration UUID + +**$properties:** `?array` + +
+ +
+$client->database->listDatabaseLogicalDatabases($uuid) -> array + +#### Description + +Returns a list of logical databases for a Managed Database service identified by {uuid}. + +#### Usage + +```php +$client->database->listDatabaseLogicalDatabases( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->createDatabaseLogicalDatabase($uuid, $request) -> LogicalDatabaseResponse + +#### Description + +Creates a new logical database for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->createDatabaseLogicalDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new LogicalDatabaseCreate([ + 'name' => 'my_database', + 'lcCollate' => 'en_US.UTF-8', + 'lcCtype' => 'en_US.UTF-8', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$name:** `string` β€” logical database name + +**$lcCollate:** `?string` β€” Collation order + +**$lcCtype:** `?string` β€” Category of a locale definition source file + +
+ +
+$client->database->deleteDatabaseLogicalDatabase($uuid, $databaseName) + +#### Description + +Deletes the logical database {database_name} from the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseLogicalDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$databaseName:** `string` β€” Database name + +
+ +
+$client->database->getDatabasePeeringsStatus($uuid) -> DatabaseServiceNetworkDetailsResponse + +#### Description + +Returns networks peering status for a service by its {uuid}. Only available for services using SDN private networks. + +#### Usage + +```php +$client->database->getDatabasePeeringsStatus( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseSessions($uuid, $request) -> DatabaseCurrentSessionsResponse + +#### Description + +Returns a list of current sessions details for your Managed Database service by its {uuid} and optional query parameters {limit}, {offset} and {order}. + +#### Usage + +```php +$client->database->getDatabaseSessions( + '01234567-89ab-cdef-0123-456789abcdef', + new GetDatabaseSessionsRequest([ + 'limit' => 10, + 'offset' => 0, + 'order' => 'asc', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$order:** `?string` β€” Sort order + +
+ +
+$client->database->terminateDatabaseSession($uuid, $pid) + +#### Description + +Terminates a sessions or kills a running query for a Managed Database service by its {uuid}, session {pid} and optional query parameter {terminate}. + +#### Usage + +```php +$client->database->terminateDatabaseSession( + '01234567-89ab-cdef-0123-456789abcdef', + 1001, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$pid:** `int` β€” Session PID + +
+ +
+$client->database->createDatabaseTask($uuid, $request) -> DatabaseServiceTaskResponse + +#### Description + +Creates a task that checks for potential errors before starting a migration or upgrade for a Managed Database service by its {uuid}. + +#### Usage + +```php +$client->database->createDatabaseTask( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceTaskCreate([ + 'datasetImport' => new DatabaseServiceTaskCreateDatasetImport([ + 'datasetName' => 'customer-events', + ]), + 'operation' => 'dataset_import', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$datasetImport:** `?DatabaseServiceTaskCreateDatasetImport` + +**$migrationCheck:** `?DatabaseServiceTaskCreateMigrationCheck` + +**$upgradeCheck:** `?DatabaseServiceTaskCreateUpgradeCheck` + +**$targetVersion:** `?string` β€” The target version for upgrade operations. + +**$operation:** `string` β€” The operation to be performed. + +
+ +
+$client->database->getDatabaseTask($uuid, $taskId) -> DatabaseServiceTaskDetailsResponse + +#### Description + +Returns task details of a Managed Database service by its {uuid} and the task {id} obtained from Create Managed Database task. + +#### Usage + +```php +$client->database->getDatabaseTask( + '01234567-89ab-cdef-0123-456789abcdef', + 1001, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$taskId:** `int` β€” Task ID + +
+ +
+$client->database->listDatabaseUsers($uuid) -> array + +#### Description + +Returns a list of database users associated with the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->listDatabaseUsers( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->createDatabaseUser($uuid, $request) -> DatabaseUserResponse + +#### Description + +Creates a new user for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->createDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceUserCreate([ + 'username' => 'api-doc-user', + 'password' => 'new-password', + 'authentication' => 'caching_sha2_password', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$username:** `string` β€” The username of the service user + +**$password:** `?string` β€” The password of the service user + +**$authentication:** `?string` β€” The authentication method for the service user + +**$redisAccessControl:** `?DatabaseServiceUserCreateRedisAccessControl` β€” Redis access control settings + +**$pgAccessControl:** `?DatabaseServiceUserCreatePgAccessControl` β€” PostgreSQL access control settings + +**$opensearchAccessControl:** `?DatabaseServiceUserCreateOpensearchAccessControl` β€” OpenSearch access control settings + +**$valkeyAccessControl:** `?DatabaseServiceUserCreateValkeyAccessControl` β€” Valkey access control settings + +
+ +
+$client->database->getDatabaseUser($uuid, $username) -> DatabaseUserResponse + +#### Description + +Returns the user {username} details for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->getDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$username:** `string` β€” Username identifier + +
+ +
+$client->database->deleteDatabaseUser($uuid, $username) + +#### Description + +Deletes the user {username} from the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$username:** `string` β€” Username identifier + +
+ +
+$client->database->modifyDatabaseUser($uuid, $username, $request) -> DatabaseUserResponse + +#### Description + +Modifies the user {username} details for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + new DatabaseServiceUserModify([ + 'password' => 'new_secure_password_123!', + 'authentication' => 'caching_sha2_password', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$username:** `string` β€” Username identifier + +**$password:** `?string` β€” New password for the service user + +**$authentication:** `?string` β€” Authentication method for the service user + +
+ +
+$client->database->modifyDatabaseUserAccessControl($uuid, $username, $request) -> DatabaseUserResponse + +#### Description + +Return access controls settings for the OpenSearch Managed Database service {uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseUserAccessControl( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + new DatabaseServiceUserAclModify([ + 'redisAccessControl' => new DatabaseServiceUserAclModifyRedisAccessControl([ + 'categories' => [ + '@admin', + '@read', + ], + 'channels' => [ + 'news', + 'alerts', + ], + 'commands' => [ + 'GET', + 'SET', + ], + 'keys' => [ + 'user:*', + 'session:*', + ], + ]), + 'pgAccessControl' => new DatabaseServiceUserAclModifyPgAccessControl([ + 'allowReplication' => true, + ]), + 'opensearchAccessControl' => new DatabaseServiceUserAclModifyOpensearchAccessControl([ + 'rules' => [ + new DatabaseServiceUserAclModifyOpensearchAccessControlRulesItem([ + 'index' => 'logs-*', + 'permission' => 'read', + ]), + ], + ]), + 'valkeyAccessControl' => new DatabaseServiceUserAclModifyValkeyAccessControl([ + 'categories' => [ + '@write', + ], + 'channels' => [ + 'updates', + ], + 'commands' => [ + 'DEL', + ], + 'keys' => [ + 'cache:*', + ], + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$username:** `string` β€” Username identifier + +**$redisAccessControl:** `?DatabaseServiceUserAclModifyRedisAccessControl` β€” Redis ACL modification schema + +**$pgAccessControl:** `?DatabaseServiceUserAclModifyPgAccessControl` β€” PostgreSQL replication permission modification schema + +**$opensearchAccessControl:** `?DatabaseServiceUserAclModifyOpensearchAccessControl` β€” OpenSearch index permission modification schema + +**$valkeyAccessControl:** `?DatabaseServiceUserAclModifyValkeyAccessControl` β€” Valkey ACL modification schema + +
+ +## gateway +{:#gatewayAnchor} + +
+$client->gateway->listGatewayPlans($request) -> array + +#### Description + +List available plans. + +#### Usage + +```php +$client->gateway->listGatewayPlans( + new ListGatewayPlansRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +
+ +
+$client->gateway->getGatewayPlan($planName) -> GatewayPlanDetailsResponse + +#### Description + +Get plan details. + +#### Usage + +```php +$client->gateway->getGatewayPlan( + 'advanced', +); +``` + +#### Parameters + +**$planName:** `string` β€” Plan identifier + +
+ +
+$client->gateway->listGatewayServices($request) -> array + +#### Description + +List available services. + +#### Usage + +```php +$client->gateway->listGatewayServices( + new ListGatewayServicesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Sort resources by field. Prefix with '-' for descending order. + +
+ +
+$client->gateway->createGatewayService($request) -> GatewayServiceDetailsResponse + +#### Description + +Create a new service. + +#### Usage + +```php +$client->gateway->createGatewayService( + new GatewayServiceCreateRequest([ + 'name' => 'gateway-service', + 'plan' => 'development-gwaas-1c2g', + 'zone' => 'fi-hel1', + 'features' => [ + GatewayServiceFeatures::Nat->value, + ], + 'routers' => [ + new GatewayRouterCreateRequest([ + 'uuid' => 'fedcba98-7654-3210-fedc-ba9876543210', + ]), + ], + 'addresses' => [ + new GatewayAddressCreateRequest([ + 'name' => 'gateway-service', + ]), + ], + 'connections' => [ + new GatewayConnectionCreateRequest([ + 'name' => 'gateway-service', + 'type' => GatewayConnectionType::Ipsec->value, + 'localRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'upcloud-example-route', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.0.0/24', + ]), + ], + 'remoteRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'remote-example-route', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.1.0/24', + ]), + ], + 'tunnels' => [ + new GatewayTunnelCreateRequest([ + 'name' => 'example-tunnel-1', + 'localAddress' => new GatewayTunnelCreateRequestLocalAddress([ + 'name' => 'public-ip-1', + ]), + 'remoteAddress' => new GatewayTunnelCreateRequestRemoteAddress([ + 'address' => '100.10.0.111', + ]), + 'ipsec' => new GatewayTunnelCreateRequestIpsec([ + 'authentication' => new GatewayTunnelCreateRequestIpsecAuthentication([ + 'authentication' => GatewayIpsecAuthenticationType::Psk->value, + 'psk' => '{your PSK}', + ]), + ]), + 'tunnelInternalIp' => '169.254.17.1', + 'internalPeerPingInterval' => 0, + ]), + ], + ]), + ], + 'labels' => [ + new GatewayLabelCreateRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + 'configuredStatus' => GatewayServiceConfiguredStatus::Started->value, + 'automaticTunnelInternalIpAllocation' => true, + ]), +); +``` + +#### Parameters + +**$name:** `string` β€” Name of the service + +**$plan:** `string` β€” Plan + +**$zone:** `string` β€” Zone + +**$features:** `array` β€” Active features + +**$routers:** `array` β€” Service routers + +**$addresses:** `?array` β€” Service addresses + +**$connections:** `?array` β€” Service connections + +**$labels:** `?array` β€” Labels + +**$configuredStatus:** `string` + +**$automaticTunnelInternalIpAllocation:** `?bool` β€” Allocate and use tunnel internal IPs automatically + +
+ +
+$client->gateway->getGatewayService($serviceUuid) -> GatewayServiceDetailsResponse + +#### Description + +Get service details. + +#### Usage + +```php +$client->gateway->getGatewayService( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->gateway->replaceGatewayService($serviceUuid, $request) -> GatewayServiceDetailsResponse + +#### Description + +Replace service configuration. + +#### Usage + +```php +$client->gateway->replaceGatewayService( + '01234567-89ab-cdef-0123-456789abcdef', + new GatewayServiceReplaceRequest([ + 'name' => 'gateway-service', + 'plan' => 'development-gwaas-1c2g', + 'configuredStatus' => GatewayServiceConfiguredStatus::Started->value, + 'labels' => [ + new GatewayLabelCreateRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + 'automaticTunnelInternalIpAllocation' => true, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” Name of the service + +**$plan:** `?string` β€” Plan + +**$configuredStatus:** `string` + +**$connections:** `mixed` β€” Service connections + +**$labels:** `?array` β€” Labels + +**$automaticTunnelInternalIpAllocation:** `?bool` β€” Allocate and use tunnel internal IPs automatically + +
+ +
+$client->gateway->deleteGatewayService($serviceUuid) + +#### Description + +Deletes existing service by given {service-identifier}. + +#### Usage + +```php +$client->gateway->deleteGatewayService( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->gateway->modifyGatewayService($serviceUuid, $request) -> GatewayServiceDetailsResponse + +#### Description + +Modify service configuration. + +#### Usage + +```php +$client->gateway->modifyGatewayService( + '01234567-89ab-cdef-0123-456789abcdef', + new GatewayServiceModifyRequest([ + 'name' => 'gateway-service', + 'features' => [ + GatewayServiceFeatures::Nat->value, + ], + 'plan' => 'development-gwaas-1c2g', + 'configuredStatus' => GatewayServiceConfiguredStatus::Started->value, + 'connections' => [ + new GatewayConnectionModifyRequest([ + 'uuid' => '01234567-89ab-cdef-0123-456789abcdef', + 'name' => 'gateway-service', + 'type' => GatewayConnectionType::Ipsec->value, + 'localRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'modified-routes', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.22.0/24', + ]), + ], + ]), + ], + 'labels' => [ + new GatewayLabelCreateRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + 'automaticTunnelInternalIpAllocation' => true, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `?string` β€” Name of the service + +**$features:** `?array` β€” Active features + +**$plan:** `?string` β€” Plan + +**$configuredStatus:** `?string` + +**$connections:** `?array` β€” Service connections + +**$labels:** `?array` β€” Labels + +**$automaticTunnelInternalIpAllocation:** `?bool` β€” Allocate and use tunnel internal IPs automatically + +
+ +
+$client->gateway->flushGatewayNat($serviceUuid) + +#### Description + +Flush NAT rules. + +#### Usage + +```php +$client->gateway->flushGatewayNat( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->gateway->listGatewayConnections($serviceUuid) -> array + +#### Description + +List available connections for service. + +#### Usage + +```php +$client->gateway->listGatewayConnections( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->gateway->createGatewayConnection($serviceUuid, $request) -> GatewayConnectionDetailsResponse + +#### Description + +Create a new connection. + +#### Usage + +```php +$client->gateway->createGatewayConnection( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateGatewayConnectionRequest([ + 'body' => new GatewayConnectionCreateRequest([ + 'name' => 'gateway-service', + 'type' => GatewayConnectionType::Ipsec->value, + 'localRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'upcloud-example-route', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.0.0/24', + ]), + ], + 'remoteRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'remote-example-route', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.1.0/24', + ]), + ], + 'tunnels' => [ + new GatewayTunnelCreateRequest([ + 'name' => 'example-tunnel-1', + 'localAddress' => new GatewayTunnelCreateRequestLocalAddress([ + 'name' => 'public-ip-1', + ]), + 'remoteAddress' => new GatewayTunnelCreateRequestRemoteAddress([ + 'address' => '100.10.0.111', + ]), + 'ipsec' => new GatewayTunnelCreateRequestIpsec([ + 'authentication' => new GatewayTunnelCreateRequestIpsecAuthentication([ + 'authentication' => GatewayIpsecAuthenticationType::Psk->value, + 'psk' => '{your PSK}', + ]), + ]), + 'tunnelInternalIp' => '169.254.17.1', + 'internalPeerPingInterval' => 0, + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `GatewayConnectionCreateRequest` + +
+ +
+$client->gateway->getGatewayConnection($serviceUuid, $connectionUuid) -> GatewayConnectionDetailsResponse + +#### Description + +Get connection details. + +#### Usage + +```php +$client->gateway->getGatewayConnection( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$connectionUuid:** `string` β€” Connection UUID + +
+ +
+$client->gateway->deleteGatewayConnection($serviceUuid, $connectionUuid) + +#### Description + +Deletes existing connection by given {connection-identifier}. + +#### Usage + +```php +$client->gateway->deleteGatewayConnection( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$connectionUuid:** `string` β€” Connection UUID + +
+ +
+$client->gateway->modifyGatewayConnection($serviceUuid, $connectionUuid, $request) -> GatewayConnectionDetailsResponse + +#### Description + +Modify connection configuration. + +#### Usage + +```php +$client->gateway->modifyGatewayConnection( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new ModifyGatewayConnectionRequest([ + 'body' => new GatewayConnectionModifyRequest([ + 'uuid' => '01234567-89ab-cdef-0123-456789abcdef', + 'name' => 'gateway-service', + 'type' => GatewayConnectionType::Ipsec->value, + 'localRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'modified-routes', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.22.0/24', + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$connectionUuid:** `string` β€” Connection UUID + +**$request:** `GatewayConnectionModifyRequest` + +
+ +
+$client->gateway->listGatewayTunnels($serviceUuid, $connectionUuid) -> array + +#### Description + +List available tunnels for service. + +#### Usage + +```php +$client->gateway->listGatewayTunnels( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$connectionUuid:** `string` β€” Connection UUID + +
+ +
+$client->gateway->createGatewayTunnel($serviceUuid, $connectionUuid, $request) -> GatewayTunnelDetailsResponse + +#### Description + +Create a new tunnel. + +#### Usage + +```php +$client->gateway->createGatewayTunnel( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new CreateGatewayTunnelRequest([ + 'body' => new GatewayTunnelCreateRequest([ + 'name' => 'gateway-service', + 'localAddress' => new GatewayTunnelCreateRequestLocalAddress([ + 'name' => 'gateway-service', + ]), + 'remoteAddress' => new GatewayTunnelCreateRequestRemoteAddress([ + 'address' => '203.0.113.10', + ]), + 'ipsec' => new GatewayTunnelCreateRequestIpsec([ + 'authentication' => new GatewayTunnelCreateRequestIpsecAuthentication([ + 'authentication' => GatewayIpsecAuthenticationType::Psk->value, + 'psk' => 'MySecretPsk123', + ]), + 'phase1Algorithms' => [ + GatewaySupportedProposalAlgorithms::Aes128->value, + GatewaySupportedProposalAlgorithms::Aes256->value, + GatewaySupportedProposalAlgorithms::Aes128Gcm128->value, + GatewaySupportedProposalAlgorithms::Aes256Gcm128->value, + ], + 'phase2Algorithms' => [ + GatewaySupportedProposalAlgorithms::Aes128->value, + GatewaySupportedProposalAlgorithms::Aes256->value, + GatewaySupportedProposalAlgorithms::Aes128Gcm128->value, + GatewaySupportedProposalAlgorithms::Aes256Gcm128->value, + ], + 'phase1IntegrityAlgorithms' => [ + GatewaySupportedIntegrityAlgorithms::Sha256->value, + GatewaySupportedIntegrityAlgorithms::Sha384->value, + GatewaySupportedIntegrityAlgorithms::Sha512->value, + ], + 'phase2IntegrityAlgorithms' => [ + GatewaySupportedIntegrityAlgorithms::Sha256->value, + GatewaySupportedIntegrityAlgorithms::Sha384->value, + GatewaySupportedIntegrityAlgorithms::Sha512->value, + ], + 'phase1DhGroupNumbers' => [ + 16, + 18, + 19, + ], + 'phase2DhGroupNumbers' => [ + 14, + 16, + 18, + 19, + ], + ]), + 'tunnelInternalIp' => '10.0.0.1', + 'internalPeerPingInterval' => 0, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$connectionUuid:** `string` β€” Connection UUID + +**$request:** `GatewayTunnelCreateRequest` + +
+ +
+$client->gateway->getGatewayTunnel($serviceUuid, $connectionUuid, $tunnelUuid) -> GatewayTunnelDetailsResponse + +#### Description + +Get tunnel details. + +#### Usage + +```php +$client->gateway->getGatewayTunnel( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$connectionUuid:** `string` β€” Connection UUID + +**$tunnelUuid:** `string` β€” Tunnel UUID + +
+ +
+$client->gateway->deleteGatewayTunnel($serviceUuid, $connectionUuid, $tunnelUuid) + +#### Description + +Deletes existing tunnel by given {tunnel-identifier}. + +#### Usage + +```php +$client->gateway->deleteGatewayTunnel( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$connectionUuid:** `string` β€” Connection UUID + +**$tunnelUuid:** `string` β€” Tunnel UUID + +
+ +
+$client->gateway->modifyGatewayTunnel($serviceUuid, $connectionUuid, $tunnelUuid, $request) -> GatewayTunnelDetailsResponse + +#### Description + +Modify tunnel configuration. + +#### Usage + +```php +$client->gateway->modifyGatewayTunnel( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new ModifyGatewayTunnelRequest([ + 'body' => new GatewayTunnelModifyRequest([ + 'uuid' => '01234567-89ab-cdef-0123-456789abcdef', + 'name' => 'gateway-service', + 'localAddress' => new GatewayTunnelModifyRequestLocalAddress([ + 'name' => 'gateway-service', + ]), + 'remoteAddress' => new GatewayTunnelModifyRequestRemoteAddress([ + 'address' => '203.0.113.10', + ]), + 'ipsec' => new GatewayTunnelModifyRequestIpsec([ + 'authentication' => new GatewayTunnelModifyRequestIpsecAuthentication([ + 'authentication' => GatewayIpsecAuthenticationType::Psk->value, + 'psk' => 'MySecretPsk123', + ]), + 'phase1Algorithms' => [ + GatewaySupportedProposalAlgorithms::Aes128Gcm16->value, + ], + 'phase2Algorithms' => [ + GatewaySupportedProposalAlgorithms::Aes128Gcm16->value, + ], + 'phase1IntegrityAlgorithms' => [ + GatewaySupportedIntegrityAlgorithms::Sha256->value, + GatewaySupportedIntegrityAlgorithms::Sha384->value, + GatewaySupportedIntegrityAlgorithms::Sha512->value, + ], + 'phase2IntegrityAlgorithms' => [ + GatewaySupportedIntegrityAlgorithms::Sha256->value, + GatewaySupportedIntegrityAlgorithms::Sha384->value, + GatewaySupportedIntegrityAlgorithms::Sha512->value, + ], + 'phase1DhGroupNumbers' => [ + 16, + 18, + 19, + ], + 'phase2DhGroupNumbers' => [ + 14, + 16, + 18, + 19, + ], + ]), + 'tunnelInternalIp' => '10.0.0.1', + 'internalPeerPingInterval' => 0, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$connectionUuid:** `string` β€” Connection UUID + +**$tunnelUuid:** `string` β€” Tunnel UUID + +**$request:** `GatewayTunnelModifyRequest` + +
+ +
+$client->gateway->listGatewayServiceLabels($serviceUuid) -> array + +#### Description + +List available service labels for service. + +#### Usage + +```php +$client->gateway->listGatewayServiceLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->gateway->createGatewayServiceLabel($serviceUuid, $request) + +#### Description + +Create a new service label. + +#### Usage + +```php +$client->gateway->createGatewayServiceLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateGatewayServiceLabelRequest([ + 'body' => new GatewayLabelCreateRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `GatewayLabelCreateRequest` + +
+ +
+$client->gateway->getGatewayServiceLabel($serviceUuid, $labelKey) -> GatewayLabelDetailsResponse + +#### Description + +Get service label details. + +#### Usage + +```php +$client->gateway->getGatewayServiceLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” Label identifier + +
+ +
+$client->gateway->deleteGatewayServiceLabel($serviceUuid, $labelKey) + +#### Description + +Deletes existing service label by given {service-label-identifier}. + +#### Usage + +```php +$client->gateway->deleteGatewayServiceLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” Label identifier + +
+ +
+$client->gateway->modifyGatewayServiceLabel($serviceUuid, $labelKey, $request) + +#### Description + +Modify service label configuration. + +#### Usage + +```php +$client->gateway->modifyGatewayServiceLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + new GatewayLabelModifyRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” Label identifier + +**$key:** `?string` + +**$value:** `?string` + +
+ +
+$client->gateway->listGatewayAddresses($serviceUuid) -> array + +#### Description + +List available service addresses for service. + +#### Usage + +```php +$client->gateway->listGatewayAddresses( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->gateway->getGatewayAddress($serviceUuid, $addressName) -> GatewayAddressDetailsResponse + +#### Description + +Get service address details. + +#### Usage + +```php +$client->gateway->getGatewayAddress( + '01234567-89ab-cdef-0123-456789abcdef', + 'advanced', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$addressName:** `string` β€” Address identifier + +
+ +
+$client->gateway->modifyGatewayAddress($serviceUuid, $addressName, $request) -> GatewayAddressDetailsResponse + +#### Description + +Modify existing service address by given {service-address-identifier}. + +#### Usage + +```php +$client->gateway->modifyGatewayAddress( + '01234567-89ab-cdef-0123-456789abcdef', + 'advanced', + new GatewayAddressModifyRequest([ + 'address' => '203.0.113.10', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$addressName:** `string` β€” Address identifier + +**$address:** `string` β€” Floating IP address to assign to the service address. + +
+ +
+$client->gateway->releaseGatewayFloatingIp($serviceUuid, $addressName) + +#### Description + +Release the user-provisioned Floating IP of an existing service address by given {service-address-identifier}, reverting it to a service-provisioned address while keeping the same name. + +#### Usage + +```php +$client->gateway->releaseGatewayFloatingIp( + '01234567-89ab-cdef-0123-456789abcdef', + 'advanced', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$addressName:** `string` β€” Address identifier + +
+ +
+$client->gateway->getGatewayMetrics($serviceUuid) -> GatewayServiceMetricsResponse + +#### Description + +List available service metrics for service. + +#### Usage + +```php +$client->gateway->getGatewayMetrics( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->gateway->createGatewayServiceLogSession($serviceUuid, $request) -> GatewayServiceLogSessionCreateResponse + +#### Description + +Create a new service log session. + +#### Usage + +```php +$client->gateway->createGatewayServiceLogSession( + '01234567-89ab-cdef-0123-456789abcdef', + new GatewayServiceLogSessionCreateRequest([ + 'sessionType' => GatewayServiceLogSessionTypes::Vpn->value, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$sessionType:** `string` + +
+ +## load-balancer +{:#load-balancerAnchor} + +
+$client->loadBalancer->listLoadBalancers($request) -> array + +#### Description + +Returns a list of available load balancer services. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancers( + new ListLoadBalancersRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Sort resources by field. Prefix with '-' for descending order. + +**$label:** `?string` β€” Filter resources by label. Can be provided multiple times for multiple labels. Format: 'key=value' for exact match or 'key' for existence check. + +
+ +
+$client->loadBalancer->createLoadBalancer($request) -> LoadBalancerService + +#### Description + +Creates a new load balancer service. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancer( + new LoadBalancerServiceCreate([ + 'name' => 'my-loadbalancer', + 'zone' => 'fi-hel1', + 'plan' => 'production-small', + 'configuredStatus' => LoadBalancerServiceConfiguredStatus::Started->value, + 'frontends' => [ + new LoadBalancerFrontendCreate([ + 'name' => 'my-frontend', + 'port' => 80, + 'mode' => LoadBalancerFrontendMode::Http->value, + 'defaultBackend' => 'my-backend', + ]), + ], + ]), +); +``` + +#### Parameters + +**$name:** `string` β€” Name of the service + +**$zone:** `string` β€” Zone + +**$plan:** `string` β€” Plan + +**$configuredStatus:** `string` + +**$frontends:** `array` β€” Service frontends + +**$backends:** `?array` β€” Service backends + +**$resolvers:** `?array` β€” Service resolvers + +**$networkUuid:** `?string` β€” Private Network UUID + +**$networks:** `?array` β€” Service networks + +**$labels:** `?array` β€” Labels + +**$maintenanceDow:** `?string` + +**$maintenanceTime:** `?string` + +**$ipAddresses:** `?array` β€” List of IP addresses for the network + +
+ +
+$client->loadBalancer->getLoadBalancer($serviceUuid) -> LoadBalancerService + +#### Description + +Returns load balancer service details by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->replaceLoadBalancer($serviceUuid, $request) -> LoadBalancerService + +#### Description + +Replaces existing load balancer service by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->replaceLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', + new LoadBalancerServiceReplace([ + 'name' => 'my-loadbalancer', + 'plan' => 'production', + 'configuredStatus' => LoadBalancerServiceConfiguredStatus::Started->value, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$name:** `string` β€” Name of the service + +**$plan:** `string` β€” Plan + +**$configuredStatus:** `string` + +**$frontends:** `?array` β€” Service frontends + +**$backends:** `?array` β€” Service backends + +**$resolvers:** `?array` β€” Service resolvers + +**$labels:** `?array` β€” Labels + +**$maintenanceDow:** `?string` + +**$maintenanceTime:** `?string` + +**$ipAddresses:** `?array` β€” List of IP addresses for the network + +
+ +
+$client->loadBalancer->deleteLoadBalancer($serviceUuid) + +#### Description + +Deletes existing load balancer service by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->modifyLoadBalancer($serviceUuid, $request) -> LoadBalancerService + +#### Description + +Modifies existing load balancer service by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', + new LoadBalancerServiceModify([ + 'name' => 'updated-loadbalancer', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$name:** `?string` β€” Name of the service + +**$plan:** `?string` β€” Plan + +**$configuredStatus:** `?string` + +**$frontends:** `?array` β€” Service frontends + +**$backends:** `?array` β€” Service backends + +**$resolvers:** `?array` β€” Service resolvers + +**$labels:** `?array` β€” Labels + +**$maintenanceDow:** `?string` + +**$maintenanceTime:** `?string` + +**$ipAddresses:** `?array` β€” List of IP addresses for the network + +
+ +
+$client->loadBalancer->listLoadBalancerFrontends($serviceUuid) -> array + +#### Description + +Returns a list of available service frontends by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerFrontends( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->createLoadBalancerFrontend($serviceUuid, $request) -> LoadBalancerFrontend + +#### Description + +Creates a new service frontend by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerFrontendRequest([ + 'body' => new LoadBalancerFrontendCreate([ + 'name' => 'my-frontend', + 'port' => 80, + 'mode' => LoadBalancerFrontendMode::Http->value, + 'defaultBackend' => 'my-backend', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$request:** `LoadBalancerFrontendCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerFrontend($serviceUuid, $frontendName) -> LoadBalancerFrontend + +#### Description + +Returns service frontend details by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+ +
+$client->loadBalancer->deleteLoadBalancerFrontend($serviceUuid, $frontendName) + +#### Description + +Deletes existing frontend by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+ +
+$client->loadBalancer->modifyLoadBalancerFrontend($serviceUuid, $frontendName, $request) -> LoadBalancerFrontend + +#### Description + +Modifies existing service frontend by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new LoadBalancerFrontendModify([ + 'name' => 'updated-frontend', + 'port' => 443, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$name:** `?string` β€” Name of the frontend + +**$port:** `?int` β€” Port to listen + +**$mode:** `?string` + +**$defaultBackend:** `?string` β€” Default backend + +**$properties:** `?LoadBalancerFrontendPropertiesCreate` + +**$networks:** `?array` β€” Network names + +**$tlsConfigs:** `?array` β€” TLS Configs + +**$rules:** `?array` β€” Rules + +
+ +
+$client->loadBalancer->listLoadBalancerFrontendTlsConfigs($serviceUuid, $frontendName) -> array + +#### Description + +Returns a list of available frontend TLS configs by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerFrontendTlsConfigs( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+ +
+$client->loadBalancer->createLoadBalancerFrontendTlsConfig($serviceUuid, $frontendName, $request) -> LoadBalancerTlsConfig + +#### Description + +Creates a new TLS config by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new CreateLoadBalancerFrontendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigCreate([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$request:** `LoadBalancerTlsConfigCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerFrontendTlsConfig($serviceUuid, $frontendName, $tlsConfigName) -> LoadBalancerTlsConfig + +#### Description + +Returns frontend TLS config details by given {service-uuid}, {frontend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-tls-config-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+ +
+$client->loadBalancer->deleteLoadBalancerFrontendTlsConfig($serviceUuid, $frontendName, $tlsConfigName) + +#### Description + +Deletes existing TLS config by given {service-uuid}, {frontend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-tls-config-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+ +
+$client->loadBalancer->modifyLoadBalancerFrontendTlsConfig($serviceUuid, $frontendName, $tlsConfigName, $request) -> LoadBalancerTlsConfig + +#### Description + +Modifies existing TLS config by given {service-uuid}, {frontend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-tls-config-1', + new ModifyLoadBalancerFrontendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigModify([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +**$request:** `LoadBalancerTlsConfigModify` + +
+ +
+$client->loadBalancer->listLoadBalancerRules($serviceUuid, $frontendName) -> array + +#### Description + +Returns a list of available frontend rules by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerRules( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+ +
+$client->loadBalancer->createLoadBalancerRule($serviceUuid, $frontendName, $request) -> LoadBalancerRule + +#### Description + +Creates a new rule by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new CreateLoadBalancerRuleRequest([ + 'body' => new LoadBalancerRuleCreate([ + 'name' => 'my-rule', + 'priority' => 10, + 'matchingCondition' => LoadBalancerMatchingCondition::And_->value, + 'matchers' => [ + new LoadBalancerMatcherCreateMatchSrcIp([ + 'type' => LoadBalancerMatcherCreateMatchSrcIpType::SrcIp->value, + 'matchSrcIp' => new LoadBalancerMatcherIpCreate([ + 'value' => '192.168.1.1', + ]), + ]), + ], + 'actions' => [ + new LoadBalancerActionCreateActionUseBackend([ + 'type' => LoadBalancerActionCreateActionUseBackendType::UseBackend->value, + 'actionUseBackend' => new LoadBalancerActionUseBackendCreate([ + 'backend' => 'backend-1', + ]), + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$request:** `LoadBalancerRuleCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerRule($serviceUuid, $frontendName, $ruleName) -> LoadBalancerRule + +#### Description + +Returns frontend rule details by given {service-uuid}, {frontend-name}, and {rule-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$ruleName:** `string` β€” The unique identifier for the rule. + +
+ +
+$client->loadBalancer->replaceLoadBalancerRule($serviceUuid, $frontendName, $ruleName, $request) -> LoadBalancerRule + +#### Description + +Replaces existing rule by given {service-uuid}, {frontend-name}, and {rule-name}. + +#### Usage + +```php +$client->loadBalancer->replaceLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', + new ReplaceLoadBalancerRuleRequest([ + 'body' => new LoadBalancerRuleCreate([ + 'name' => 'my-rule', + 'priority' => 10, + 'matchingCondition' => LoadBalancerMatchingCondition::And_->value, + 'matchers' => [ + new LoadBalancerMatcherCreateMatchSrcIp([ + 'type' => LoadBalancerMatcherCreateMatchSrcIpType::SrcIp->value, + 'matchSrcIp' => new LoadBalancerMatcherIpCreate([ + 'value' => '192.168.1.1', + ]), + ]), + ], + 'actions' => [ + new LoadBalancerActionCreateActionUseBackend([ + 'type' => LoadBalancerActionCreateActionUseBackendType::UseBackend->value, + 'actionUseBackend' => new LoadBalancerActionUseBackendCreate([ + 'backend' => 'backend-1', + ]), + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$ruleName:** `string` β€” The unique identifier for the rule. + +**$request:** `LoadBalancerRuleCreate` + +
+ +
+$client->loadBalancer->deleteLoadBalancerRule($serviceUuid, $frontendName, $ruleName) + +#### Description + +Deletes existing rule by given {service-uuid}, {frontend-name}, and {rule-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$ruleName:** `string` β€” The unique identifier for the rule. + +
+ +
+$client->loadBalancer->modifyLoadBalancerRule($serviceUuid, $frontendName, $ruleName, $request) -> LoadBalancerRule + +#### Description + +Modifies existing rule by given {service-uuid}, {frontend-name}, and {rule-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', + new LoadBalancerRuleModify([ + 'name' => 'updated-rule', + 'priority' => 10, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$ruleName:** `string` β€” The unique identifier for the rule. + +**$name:** `?string` β€” Name of the rule + +**$priority:** `?int` β€” Priority + +**$matchingCondition:** `?string` + +**$matchers:** `?array` β€” Rule matchers + +**$actions:** `?array` β€” Rule actions + +
+ +
+$client->loadBalancer->listLoadBalancerBackends($serviceUuid) -> array + +#### Description + +Returns a list of available service backends by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerBackends( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->createLoadBalancerBackend($serviceUuid, $request) -> LoadBalancerBackend + +#### Description + +Creates a new backend by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerBackendRequest([ + 'body' => new LoadBalancerBackendCreate([ + 'name' => 'my-backend', + 'members' => [ + new LoadBalancerMemberCreateZero([ + 'type' => LoadBalancerMemberCreateZeroType::Static_->value, + 'ip' => 'ip', + 'port' => 1, + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$request:** `LoadBalancerBackendCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerBackend($serviceUuid, $backendName) -> LoadBalancerBackend + +#### Description + +Returns service backend details by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +
+ +
+$client->loadBalancer->deleteLoadBalancerBackend($serviceUuid, $backendName) + +#### Description + +Deletes existing backend by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +
+ +
+$client->loadBalancer->modifyLoadBalancerBackend($serviceUuid, $backendName, $request) -> LoadBalancerBackend + +#### Description + +Modifies existing backend by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new LoadBalancerBackendModify([ + 'name' => 'updated-backend', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$name:** `?string` β€” Name of the backend + +**$members:** `?array` β€” Backend members + +**$tlsConfigs:** `?array` β€” TLS Configs + +**$resolver:** `?string` β€” Resolver reference + +**$properties:** `?LoadBalancerBackendPropertiesCreate` + +
+ +
+$client->loadBalancer->listLoadBalancerMembers($serviceUuid, $backendName) -> array + +#### Description + +Returns a list of available backend members by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerMembers( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +
+ +
+$client->loadBalancer->createLoadBalancerMember($serviceUuid, $backendName, $request) -> LoadBalancerMember + +#### Description + +Creates a new member by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new CreateLoadBalancerMemberRequest([ + 'body' => new LoadBalancerMemberCreateZero([ + 'type' => LoadBalancerMemberCreateZeroType::Static_->value, + 'ip' => 'ip', + 'port' => 1, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$request:** `LoadBalancerMemberCreateZero|LoadBalancerMemberCreateOne` + +
+ +
+$client->loadBalancer->getLoadBalancerMember($serviceUuid, $backendName, $memberName) -> LoadBalancerMember + +#### Description + +Returns backend member details by given {service-uuid}, {backend-name} and {member-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$memberName:** `string` β€” The unique identifier for the member. + +
+ +
+$client->loadBalancer->deleteLoadBalancerMember($serviceUuid, $backendName, $memberName) + +#### Description + +Deletes existing member by given {service-uuid}, {backend-name} and {member-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$memberName:** `string` β€” The unique identifier for the member. + +
+ +
+$client->loadBalancer->modifyLoadBalancerMember($serviceUuid, $backendName, $memberName, $request) -> LoadBalancerMember + +#### Description + +Modifies existing member by given {service-uuid}, {backend-name} and {member-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', + new ModifyLoadBalancerMemberRequest([ + 'body' => new LoadBalancerMemberModifyZero([]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$memberName:** `string` β€” The unique identifier for the member. + +**$request:** `LoadBalancerMemberModifyZero|LoadBalancerMemberModifyOne` + +
+ +
+$client->loadBalancer->listLoadBalancerBackendTlsConfigs($serviceUuid, $backendName) -> array + +#### Description + +Returns a list of available backend TLS configs by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerBackendTlsConfigs( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +
+ +
+$client->loadBalancer->createLoadBalancerBackendTlsConfig($serviceUuid, $backendName, $request) -> LoadBalancerTlsConfig + +#### Description + +Creates a new TLS config by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new CreateLoadBalancerBackendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigCreate([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$request:** `LoadBalancerTlsConfigCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerBackendTlsConfig($serviceUuid, $backendName, $tlsConfigName) -> LoadBalancerTlsConfig + +#### Description + +Returns backend TLS config details by given {service-uuid}, {backend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'example-tls-config-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+ +
+$client->loadBalancer->deleteLoadBalancerBackendTlsConfig($serviceUuid, $backendName, $tlsConfigName) + +#### Description + +Deletes existing TLS config by given {service-uuid}, {backend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'example-tls-config-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+ +
+$client->loadBalancer->modifyLoadBalancerBackendTlsConfig($serviceUuid, $backendName, $tlsConfigName, $request) -> LoadBalancerTlsConfig + +#### Description + +Modifies existing TLS config by given {service-uuid}, {backend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'example-tls-config-1', + new ModifyLoadBalancerBackendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigModify([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +**$request:** `LoadBalancerTlsConfigModify` + +
+ +
+$client->loadBalancer->modifyLoadBalancerNetwork($serviceUuid, $networkName, $request) -> LoadBalancerNetwork + +#### Description + +Modifies existing service network by given {service-uuid} and {network-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-network-1', + new LoadBalancerNetworkModify([ + 'name' => 'updated-network', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$networkName:** `string` β€” The unique identifier for the network. + +**$name:** `?string` β€” Name of the network + +
+ +
+$client->loadBalancer->listLoadBalancerIpAddresses($serviceUuid) -> array + +#### Description + +Returns a list of available IP addresses by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerIpAddresses( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->createLoadBalancerIpAddress($serviceUuid, $request) -> LoadBalancerIpAddress + +#### Description + +Attach a floating public IPv4 address to the service using the specified {service-uuid}. The number of attachable floating IPv4 addresses is limited to the number of nodes in the plan, and all addresses must be in the same zone as the service and detached. + +Note: Floating public IPv4 addresses have configurable release policies. When the service is deleted or an IP address is detached, addresses with the keep policy will be converted to detached floating IPs that remain available in your account. Addresses with the release policy will be automatically deleted. For more details, see IP Addresses. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerIpAddress( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerIpAddressRequest([ + 'body' => new LoadBalancerIpAddressCreate([ + 'address' => '192.168.1.10', + 'networkName' => 'private-net-1', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$request:** `LoadBalancerIpAddressCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerIpAddress($serviceUuid, $ipAddress) -> array + +#### Description + +Returns IP address details by given {service-uuid} and {ip-address}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerIpAddress( + '01234567-89ab-cdef-0123-456789abcdef', + '192.168.1.1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$ipAddress:** `string` β€” The unique identifier for the IP address. + +
+ +
+$client->loadBalancer->deleteLoadBalancerIpAddress($serviceUuid, $ipAddress) + +#### Description + +Detach a floating public IPv4 address from the service by given {service-uuid} and {address}. + Depending on the release policy, the customer retains the floating IP if the policy is set to keep. + If the policy is set to release, the floating IP will be deleted. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerIpAddress( + '01234567-89ab-cdef-0123-456789abcdef', + '192.168.1.1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$ipAddress:** `string` β€” The unique identifier for the IP address. + +
+ +
+$client->loadBalancer->listLoadBalancerResolvers($serviceUuid) -> array + +#### Description + +Returns a list of available service domain name resolvers by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerResolvers( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->createLoadBalancerResolver($serviceUuid, $request) -> LoadBalancerResolver + +#### Description + +Creates a new resolver by given {service-uuid}. + +Resolver is a DNS server usually residing in a user's private network. It's used to resolve IPs for backend members of type dynamic. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerResolverRequest([ + 'body' => new LoadBalancerResolverCreate([ + 'name' => 'default-resolver', + 'nameservers' => [ + '1.1.1.1:53', + '8.8.8.8:53', + ], + 'retries' => 3, + 'timeout' => 5, + 'timeoutRetry' => 3, + 'cacheValid' => 300, + 'cacheInvalid' => 60, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$request:** `LoadBalancerResolverCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerResolver($serviceUuid, $resolverName) -> LoadBalancerResolver + +#### Description + +Returns backend resolver details by given {service-uuid} and {resolver-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-resolver-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$resolverName:** `string` β€” The unique identifier for the resolver. + +
+ +
+$client->loadBalancer->deleteLoadBalancerResolver($serviceUuid, $resolverName) + +#### Description + +Deletes existing resolver by given {service-uuid} and {resolver-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-resolver-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$resolverName:** `string` β€” The unique identifier for the resolver. + +
+ +
+$client->loadBalancer->modifyLoadBalancerResolver($serviceUuid, $resolverName, $request) -> LoadBalancerResolver + +#### Description + +Modifies existing resolver by given {service-uuid} and {resolver-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-resolver-1', + new LoadBalancerResolverModify([ + 'name' => 'default-resolver', + 'nameservers' => [ + '1.1.1.1:53', + '8.8.8.8:53', + ], + 'retries' => 3, + 'timeout' => 5, + 'timeoutRetry' => 3, + 'cacheValid' => 300, + 'cacheInvalid' => 60, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$resolverName:** `string` β€” The unique identifier for the resolver. + +**$name:** `?string` β€” Name of the resolver + +**$nameservers:** `?array` β€” Nameservers + +**$retries:** `?int` β€” Number of retries on failure + +**$timeout:** `?int` β€” Timeout for the query in seconds + +**$timeoutRetry:** `?int` β€” Timeout for the query retries in seconds + +**$cacheValid:** `?int` β€” Time in seconds to cache valid results + +**$cacheInvalid:** `?int` β€” Time in seconds to cache invalid results + +
+ +
+$client->loadBalancer->listLoadBalancerLabels($serviceUuid) -> array + +#### Description + +Returns a list of available service labels by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->createLoadBalancerLabel($serviceUuid, $request) -> LoadBalancerLabelResponse + +#### Description + +Creates a new label by given {service-uuid}. + +Labels used for service filtering. + +Service labels usage examples +Below are some examples of what certain GET requests might look like. + +exact match: GET /1.3/load-balancer?label=env%3Dstaging +existence: GET /1.3/load-balancer?label=env +multiple: GET /1.3/load-balancer?label=env&label=foo%3Dbar + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerLabelRequest([ + 'body' => new LoadBalancerLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$request:** `LoadBalancerLabelCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerLabel($serviceUuid, $labelKey) -> LoadBalancerLabelResponse + +#### Description + +Returns label details by given {service-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$labelKey:** `string` β€” The unique identifier for the label. + +
+ +
+$client->loadBalancer->deleteLoadBalancerLabel($serviceUuid, $labelKey) + +#### Description + +Deletes existing label by given {service-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$labelKey:** `string` β€” The unique identifier for the label. + +
+ +
+$client->loadBalancer->modifyLoadBalancerLabel($serviceUuid, $labelKey, $request) -> LoadBalancerLabelResponse + +#### Description + +Modifies existing label by given {service-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', + new ModifyLoadBalancerLabelRequest([ + 'body' => new LoadBalancerLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$labelKey:** `string` β€” The unique identifier for the label. + +**$request:** `LoadBalancerLabelModify` + +
+ +
+$client->loadBalancer->getLoadBalancerMetrics($serviceUuid) -> LoadBalancerMetrics + +#### Description + +Returns service metrics by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerMetrics( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->getLoadBalancerMetricsSeries($serviceUuid) -> array + +#### Description + +Returns service metric series by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->getLoadBalancerFrontendCombinedMetricsSeries($serviceUuid, $request) -> array + +#### Description + +Returns combined frontend metric series by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerFrontendCombinedMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + new GetLoadBalancerFrontendCombinedMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->getLoadBalancerFrontendMetricsSeries($serviceUuid, $frontendName, $request) -> array + +#### Description + +Returns frontend metric series by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerFrontendMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new GetLoadBalancerFrontendMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->getLoadBalancerBackendCombinedMetricsSeries($serviceUuid, $request) -> array + +#### Description + +Returns combined backend metric series by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerBackendCombinedMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + new GetLoadBalancerBackendCombinedMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->getLoadBalancerBackendMetricsSeries($serviceUuid, $backendName, $request) -> array + +#### Description + +Returns backend metric series by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerBackendMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new GetLoadBalancerBackendMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->getLoadBalancerMemberCombinedMetricsSeries($serviceUuid, $backendName, $request) -> LoadBalancerMemberMetricsSeriesResponse + +#### Description + +Returns combined backend members metric series by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerMemberCombinedMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new GetLoadBalancerMemberCombinedMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->getLoadBalancerMemberMetricsSeries($serviceUuid, $backendName, $memberName, $request) -> LoadBalancerMemberMetricsSeriesResponse + +#### Description + +Returns backend member metric series by given {service-uuid}, {backend-name}, and {member-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerMemberMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', + new GetLoadBalancerMemberMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$memberName:** `string` β€” The unique identifier for the member. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->listLoadBalancerCertificateBundles($request) -> array + +#### Description + +Returns a list of available certificate bundles. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerCertificateBundles( + new ListLoadBalancerCertificateBundlesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$label:** `?string` β€” Filter resources by label. Can be provided multiple times for multiple labels. Format: 'key=value' for exact match or 'key' for existence check. + +
+ +
+$client->loadBalancer->createLoadBalancerCertificateBundle($request) -> LoadBalancerCertificateBundle + +#### Description + +Creates a new certificate bundle. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerCertificateBundle( + new LoadBalancerCertificateBundleCreateZero([ + 'type' => LoadBalancerCertificateBundleCreateZeroType::Manual->value, + ]), +); +``` + +#### Parameters + +**$request:** `LoadBalancerCertificateBundleCreateZero|LoadBalancerCertificateBundleCreateCertificate|LoadBalancerCertificateBundleCreateType` + +
+ +
+$client->loadBalancer->getLoadBalancerCertificateBundle($bundleUuid) -> LoadBalancerCertificateBundle + +#### Description + +Returns certificate bundle details by given {bundle-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerCertificateBundle( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+ +
+$client->loadBalancer->deleteLoadBalancerCertificateBundle($bundleUuid) + +#### Description + +Deletes existing certificate bundle by given {bundle-uuid}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerCertificateBundle( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+ +
+$client->loadBalancer->modifyLoadBalancerCertificateBundle($bundleUuid, $request) -> LoadBalancerCertificateBundle + +#### Description + +Modifies existing a manual, dynamic or authority certificate bundle by given {bundle-uuid}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerCertificateBundle( + '01234567-89ab-cdef-0123-456789abcdef', + new ModifyLoadBalancerCertificateBundleRequest([ + 'body' => new LoadBalancerCertificateBundleManualModify([ + 'name' => 'updated-manual-cert', + ]), + ]), +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +**$request:** `LoadBalancerCertificateBundleManualModify|LoadBalancerCertificateBundleDynamicModify|LoadBalancerCertificateBundleAuthorityModify` + +
+ +
+$client->loadBalancer->listLoadBalancerCertificateBundleLabels($bundleUuid) -> array + +#### Description + +Returns a list of available certificate bundle labels by given {bundle-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerCertificateBundleLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+ +
+$client->loadBalancer->createLoadBalancerCertificateBundleLabel($bundleUuid, $request) -> LoadBalancerLabelResponse + +#### Description + +Creates a new label by given {bundle-uuid}. + +Labels used for certificate bundles filtering. + +Certificate bundle labels usage examples +Below are some examples of what certain GET requests might look like. + +exact match: GET /1.3/load-balancer/certificate-bundles?label=env%3Dstaging +existence: GET /1.3/load-balancer/certificate-bundles?label=env +multiple: GET /1.3/load-balancer/certificate-bundles?label=env&label=foo%3Dbar + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerCertificateBundleLabelRequest([ + 'body' => new LoadBalancerLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +**$request:** `LoadBalancerLabelCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerCertificateBundleLabel($bundleUuid, $labelKey) -> LoadBalancerLabelResponse + +#### Description + +Returns label details by given {bundle-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +**$labelKey:** `string` β€” The unique identifier for the label. + +
+ +
+$client->loadBalancer->deleteLoadBalancerCertificateBundleLabel($bundleUuid, $labelKey) + +#### Description + +Deletes existing label by given {bundle-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +**$labelKey:** `string` β€” The unique identifier for the label. + +
+ +
+$client->loadBalancer->modifyLoadBalancerCertificateBundleLabel($bundleUuid, $labelKey, $request) -> LoadBalancerLabelResponse + +#### Description + +Modifies existing label by given {bundle-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', + new ModifyLoadBalancerCertificateBundleLabelRequest([ + 'body' => new LoadBalancerLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +**$labelKey:** `string` β€” The unique identifier for the label. + +**$request:** `LoadBalancerLabelModify` + +
+ +
+$client->loadBalancer->getLoadBalancerDnsChallengeDomain() -> LoadBalancerDnsChallengeDomainResponse + +#### Description + +Returns DNS challenge domain. + +This can be used to validate domain ownership using the ACME challenge method. To validate your domain, you need to add CNAME record to the domain provided by this API to your DNS settings. The name/host of the CNAME record should be _acme-challenge or _acme-challenge.mysubdomain if you are setting up a subdomain called mysubdomain. The target/points to of the record needs to be set to the value returned by this API. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerDnsChallengeDomain(); +``` + +
+ +
+$client->loadBalancer->listLoadBalancerPlans($request) -> array + +#### Description + +Returns a list of available load balancer plans. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerPlans( + new ListLoadBalancerPlansRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +
+ +
+$client->loadBalancer->getLoadBalancerPlan($planName) -> LoadBalancerPlan + +#### Description + +Returns load balancer plan details by given {plan-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerPlan( + 'example-plan-1', +); +``` + +#### Parameters + +**$planName:** `string` β€” The unique identifier for the plan. + +
+ +## firewall-ruleset +{:#firewall-rulesetAnchor} + +
+$client->firewallRuleset->listFirewallRulesets($request) -> array + +#### Description + +Returns a list of firewall rulesets. + +#### Usage + +```php +$client->firewallRuleset->listFirewallRulesets( + new ListFirewallRulesetsRequest([ + 'limit' => 10, + 'offset' => 0, + 'sort' => 'name', + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->firewallRuleset->createFirewallRuleset($request) -> FirewallRulesetDetailResponse + +#### Description + +Creates a new firewall ruleset. + +#### Usage + +```php +$client->firewallRuleset->createFirewallRuleset( + new CreateFirewallRuleset([ + 'name' => 'example_firewall_ruleset', + 'stateful' => true, + 'enabled' => false, + 'defaultDnsRulesEnabled' => false, + ]), +); +``` + +#### Parameters + +**$name:** `string` β€” Name of the firewall ruleset + +**$description:** `?string` β€” Description of the firewall ruleset + +**$stateful:** `?bool` + +**$enabled:** `?bool` + +**$defaultDnsRulesEnabled:** `?bool` + +**$labels:** `?array` β€” Labels + +
+ +
+$client->firewallRuleset->getFirewallRuleset($rulesetUuid) -> FirewallRulesetDetailResponse + +#### Description + +Returns firewall ruleset details by given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->getFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+ +
+$client->firewallRuleset->deleteFirewallRuleset($rulesetUuid) + +#### Description + +Deletes existing firewall ruleset by given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->deleteFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+ +
+$client->firewallRuleset->modifyFirewallRuleset($rulesetUuid, $request) -> FirewallRulesetDetailResponse + +#### Description + +Modifies existing firewall ruleset by given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->modifyFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetModify([ + 'name' => 'modified_example_firewall_ruleset', + 'description' => 'Modified example stateless firewall ruleset', + 'labels' => [ + new FirewallRulesetCreateLabel([ + 'key' => 'dev', + 'value' => 'dev-1', + ]), + ], + 'enabled' => false, + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$name:** `?string` β€” Name of the ruleset + +**$description:** `?string` β€” Description of the firewall ruleset + +**$labels:** `?array` β€” Labels + +**$enabled:** `?bool` β€” Enabled + +**$defaultDnsRulesEnabled:** `?bool` + +
+ +
+$client->firewallRuleset->restoreFirewallRuleset($rulesetUuid, $rulesetVersion) -> FirewallRulesetDetailResponse + +#### Description + +Restores existing firewall ruleset by given {ruleset-uuid} and {ruleset-version}. + +#### Usage + +```php +$client->firewallRuleset->restoreFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', + 1, +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$rulesetVersion:** `int` β€” Firewall ruleset version + +
+ +
+$client->firewallRuleset->listFirewallRulesetRules($rulesetUuid, $request) -> FirewallRulesetFirewallRuleListResponse + +#### Description + +Returns firewall ruleset rules. + +#### Usage + +```php +$client->firewallRuleset->listFirewallRulesetRules( + '01234567-89ab-cdef-0123-456789abcdef', + new ListFirewallRulesetRulesRequest([ + 'limit' => 10, + 'offset' => 0, + 'sort' => 'name', + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->firewallRuleset->createFirewallRulesetRule($rulesetUuid, $request) -> FirewallRulesetRuleDetailResponse + +#### Description + +Creates a new firewall ruleset rule by the given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->createFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateFirewallRulesetRuleRequest([ + 'body' => new FirewallRulesetFirewallRuleCreate([ + 'enabled' => false, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'direction' => FirewallRulesetRuleDirection::In->value, + 'family' => FirewallRulesetRuleFamily::IPv4->value, + 'protocol' => FirewallRulesetRuleProtocol::Tcp->value, + ]), + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$request:** `FirewallRulesetFirewallRuleCreate` + +
+ +
+$client->firewallRuleset->createMultipleFirewallRulesetRule($rulesetUuid, $request) -> FirewallRulesetFirewallRuleListResponse + +#### Description + +Creates multiple firewall ruleset rules by the given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->createMultipleFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetFirewallMultipleRuleCreate([ + 'rules' => [ + new FirewallRulesetFirewallRuleCreate([ + 'enabled' => false, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'direction' => FirewallRulesetRuleDirection::In->value, + 'family' => FirewallRulesetRuleFamily::IPv4->value, + 'protocol' => FirewallRulesetRuleProtocol::Tcp->value, + ]), + ], + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$rules:** `array` + +
+ +
+$client->firewallRuleset->getFirewallRulesetRule($rulesetUuid, $ruleId) -> FirewallRulesetRuleDetailResponse + +#### Description + +Returns firewall ruleset rule details. + +#### Usage + +```php +$client->firewallRuleset->getFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$ruleId:** `string` β€” Firewall ruleset rule UUID + +
+ +
+$client->firewallRuleset->deleteFirewallRulesetRule($rulesetUuid, $ruleId) + +#### Description + +Deletes an existing rule by given {ruleset-uuid} and {rule-uuid}. + +#### Usage + +```php +$client->firewallRuleset->deleteFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$ruleId:** `string` β€” Firewall ruleset rule UUID + +
+ +
+$client->firewallRuleset->modifyFirewallRulesetRule($rulesetUuid, $ruleId, $request) -> FirewallRulesetRuleDetailResponse + +#### Description + +Modifies existing firewall ruleset rule by given {ruleset_uuid} and {rule-uuid}. + +#### Usage + +```php +$client->firewallRuleset->modifyFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetFirewallRuleModify([ + 'enabled' => false, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'direction' => FirewallRulesetRuleDirection::In->value, + 'family' => FirewallRulesetRuleFamily::IPv4->value, + 'protocol' => FirewallRulesetRuleProtocol::Tcp->value, + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$ruleId:** `string` β€” Firewall ruleset rule UUID + +**$enabled:** `?bool` β€” Enabled + +**$action:** `?string` + +**$comment:** `?string` β€” Comments + +**$destinationAddressStart:** `?string` + +**$destinationAddressEnd:** `?string` + +**$destinationPortStart:** `?int` + +**$destinationPortEnd:** `?int` + +**$destinationAddressCidr:** `?string` + +**$direction:** `?string` + +**$family:** `?string` + +**$icmpType:** `?int` + +**$position:** `?int` + +**$protocol:** `?string` + +**$sourceAddressStart:** `?string` + +**$sourceAddressEnd:** `?string` + +**$sourcePortStart:** `?int` + +**$sourcePortEnd:** `?int` + +**$sourceAddressCidr:** `?string` + +
+ +
+$client->firewallRuleset->listFirewallRulesetLabels($rulesetUuid) -> array + +#### Description + +Returns a list of available firewall ruleset labels by given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->listFirewallRulesetLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+ +
+$client->firewallRuleset->createFirewallRulesetLabel($rulesetUuid, $request) -> FirewallRulesetLabelDetailResponse + +#### Description + +Creates a new label by given {ruleset-uuid}. Labels are used for group filtering. + +#### Usage + +```php +$client->firewallRuleset->createFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateFirewallRulesetLabelRequest([ + 'body' => new FirewallRulesetCreateLabel([ + 'key' => 'dev', + 'value' => 'dev-1', + ]), + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$request:** `FirewallRulesetCreateLabel` + +
+ +
+$client->firewallRuleset->listFirewallRulesetAttachedServers($rulesetUuid) -> array + +#### Description + +Returns a list of servers that are attached to the firewall ruleset by given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->listFirewallRulesetAttachedServers( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+ +
+$client->firewallRuleset->getFirewallRulesetLabel($rulesetUuid, $labelKey) -> FirewallRulesetLabelDetailResponse + +#### Description + +Returns label details by given {ruleset-uuid} and {label-key}. + +#### Usage + +```php +$client->firewallRuleset->getFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->firewallRuleset->deleteFirewallRulesetLabel($rulesetUuid, $labelKey) + +#### Description + +Deletes existing label by given {ruleset-uuid} and {label-key}. + +#### Usage + +```php +$client->firewallRuleset->deleteFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->firewallRuleset->modifyFirewallRulesetLabel($rulesetUuid, $labelKey, $request) -> FirewallRulesetLabelDetailResponse + +#### Description + +Modifies existing label by given {ruleset-uuid} and {label-key}. + +#### Usage + +```php +$client->firewallRuleset->modifyFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + new FirewallRulesetLabelModify([ + 'key' => 'foo', + 'value' => 'bar', + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$labelKey:** `string` β€” The key of the label. + +**$key:** `?string` + +**$value:** `?string` + +
+ +
+$client->firewallRuleset->listServerFirewallRule($serverUuid, $request) -> FirewallRulesetServerFirewallDetailResponse + +#### Description + +Returns a list of server firewall rules. + +#### Usage + +```php +$client->firewallRuleset->listServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + new ListServerFirewallRuleRequest([ + 'limit' => 10, + 'offset' => 0, + 'sort' => 'name', + ]), +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Server UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->firewallRuleset->createServerFirewallRule($serverUuid, $request) -> FirewallRulesetServerFirewallRuleDetail + +#### Description + +Creates a new server firewall rule. + +#### Usage + +```php +$client->firewallRuleset->createServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetServerFirewallRuleCreate([ + 'firewallRule' => new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::In->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'destinationAddressStart' => '', + 'destinationAddressEnd' => '', + 'sourceAddressStart' => '192.168.1.1', + 'sourceAddressEnd' => '192.168.1.255', + 'comment' => 'Allow SSH from this network', + ]), + ]), +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Server UUID + +**$firewallRule:** `FirewallRulesetServerFirewallRule` + +
+ +
+$client->firewallRuleset->createMultipleServerFirewallRules($serverUuid, $request) -> FirewallRulesetServerFirewallDetailResponse + +#### Description + +Creates multiple server firewall rules by given {server-uuid}. + +#### Usage + +```php +$client->firewallRuleset->createMultipleServerFirewallRules( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetServerMultipleFirewallRulesCreate([ + 'firewallRules' => new FirewallRulesetServerMultipleFirewallRulesCreateFirewallRules([ + 'firewallRule' => [ + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::In->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'sourceAddressStart' => '192.168.1.1', + 'sourceAddressEnd' => '192.168.1.255', + 'comment' => 'Allow SSH from this network', + ]), + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::In->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'sourceAddressStart' => '1.1.1.1', + 'sourceAddressEnd' => '1.1.1.1', + 'comment' => 'Allow DNS from this network', + ]), + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::Out->value, + 'action' => FirewallRulesetRuleAction::Drop->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'destinationAddressStart' => '100.100.128.2', + 'destinationAddressEnd' => '100.100.128.2', + 'comment' => 'dfg', + ]), + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::Out->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv6', + 'protocol' => 'icmp', + 'destinationAddressStart' => '2a04:3540:1001:1000:1411:4dff:fea5:1bab', + 'destinationAddressEnd' => '2a04:3540:1001:1000:1411:4dff:fea5:1bab', + 'comment' => "'w???''?p'2'?12??12?3?'231", + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Server UUID + +**$firewallRules:** `?FirewallRulesetServerMultipleFirewallRulesCreateFirewallRules` + +
+ +
+$client->firewallRuleset->getServerFirewallRule($serverUuid, $position) -> FirewallRulesetServerFirewallRuleDetail + +#### Description + +Returns server firewall rule details by given {server-uuid} and {position}. + +#### Usage + +```php +$client->firewallRuleset->getServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + 1, +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Server UUID + +**$position:** `int|string` β€” Server firewall rule position + +
+ +
+$client->firewallRuleset->deleteServerFirewallRule($serverUuid, $position) + +#### Description + +Deletes existing server firewall rule by given {server-uuid} and {position}. + +#### Usage + +```php +$client->firewallRuleset->deleteServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + 1, +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Server UUID + +**$position:** `int|string` β€” Server firewall rule position + +
+ +## vnc_keymap +{:#vnc_keymapAnchor} + +
+$client->vncKeymap->listVncKeymaps() -> VncKeymapKeymaps + +#### Description + +Retrieves a list of supported VNC keymaps. + +#### Usage + +```php +$client->vncKeymap->listVncKeymaps(); +``` + +
+ +## zone +{:#zoneAnchor} + +
+$client->zone->listZones() -> Zones + +#### Description + +Retrieves a list of zones. + +#### Usage + +```php +$client->zone->listZones(); +``` + +
+ +
+$client->zone->listZoneVlaNs($zone) -> ZoneVlans + +#### Description + +Retrieves a list of VLANs in a specific zone. + +#### Usage + +```php +$client->zone->listZoneVlaNs( + 'fi-hel1', +); +``` + +#### Parameters + +**$zone:** `string` β€” The zone identifier. + +
diff --git a/docs/v0.0.11/reference.md b/docs/v0.0.11/reference.md new file mode 100644 index 00000000..6f6c0e32 --- /dev/null +++ b/docs/v0.0.11/reference.md @@ -0,0 +1,2679 @@ +--- +layout: sdk +title: "API reference Β· v0.0.11" +version: "v0.0.11" +services: + - partner + - tag + - objectStorage2 +--- +# API reference +## partner +{:#partnerAnchor} + +
+$client->partner->listPartnerAccounts() -> array + +#### Description + +Returns list of accounts associated with the partner. + +#### Usage + +```php +$client->partner->listPartnerAccounts(); +``` + +
+ +
+$client->partner->createPartnerAccount($request) -> PartnerAccount + +#### Description + +Creates new UpCloud account that will be linked to partner's existing invoicing. + +#### Usage + +```php +$client->partner->createPartnerAccount( + new PartnerCreateAccount([ + 'username' => 'newuser', + 'password' => 'superSecret123', + ]), +); +``` + +#### Parameters + +**$username:** `string` + +**$password:** `string` + +**$contactDetails:** `?PartnerCreateAccountContactDetails` + +
+ +## tag +{:#tagAnchor} + +
+$client->tag->listTags() -> Tags + +#### Description + +Returns all existing tags with their properties and servers tagged. + +#### Usage + +```php +$client->tag->listTags(); +``` + +
+ +
+$client->tag->createTag($request) -> Tag + +#### Description + +Creates a new tag. Existing servers can be tagged in same request. + +#### Usage + +```php +$client->tag->createTag( + new Tag([ + 'tag' => new TagTag([ + 'name' => 'DEV', + 'servers' => new TagServers([]), + ]), + ]), +); +``` + +#### Parameters + +**$request:** `Tag` + +
+ +
+$client->tag->getTag($name) -> Tag + +#### Description + +Returns details for a specific tag. + +#### Usage + +```php +$client->tag->getTag( + 'DEV', +); +``` + +#### Parameters + +**$name:** `string` β€” Tag name + +
+ +
+$client->tag->modifyTag($name, $request) -> Tag + +#### Description + +Changes attributes of an existing tag + +#### Usage + +```php +$client->tag->modifyTag( + 'DEV', + new ModifyTagRequest([ + 'body' => new Tag([ + 'tag' => new TagTag([ + 'name' => 'DEV', + 'servers' => new TagServers([]), + ]), + ]), + ]), +); +``` + +#### Parameters + +**$name:** `string` β€” Tag name + +**$request:** `Tag` + +
+ +
+$client->tag->deleteTag($name) + +#### Description + +Deletes a specific tag. + +#### Usage + +```php +$client->tag->deleteTag( + 'DEV', +); +``` + +#### Parameters + +**$name:** `string` β€” Tag name + +
+ +## objectStorage2 +{:#objectStorage2Anchor} + +
+$client->objectStorage2->listServices($request) -> array + +#### Description + +Returns a list of object storage services. + +#### Usage + +```php +$client->objectStorage2->listServices( + new ListServicesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->objectStorage2->createService($request) -> ObjectStorage2Servicedetailresponse + +#### Description + +Creates a new object storage service. + +#### Usage + +```php +$client->objectStorage2->createService( + new ObjectStorage2Servicecreate([ + 'name' => 'example-service', + 'region' => 'example', + 'configuredStatus' => ObjectStorage2Propertyconfiguredstatus::Started->value, + 'networks' => [ + new ObjectStorage2Networkcreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2Networktype::Public_->value, + 'family' => ObjectStorage2Networkfamily::IPv4->value, + ]), + new ObjectStorage2Networkcreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2Networktype::Private_->value, + 'family' => ObjectStorage2Networkfamily::IPv4->value, + ]), + ], + ]), +); +``` + +#### Parameters + +**$name:** `string` + +**$region:** `string` + +**$configuredStatus:** `string` + +**$networks:** `?array` + +**$customDomains:** `?array` + +**$labels:** `?array` β€” Labels + +**$properties:** `?ObjectStorage2Propertiescreate` + +
+ +
+$client->objectStorage2->getService($serviceUuid) -> ObjectStorage2Servicedetailresponse + +#### Description + +Returns object storage service details by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->getService( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->replaceService($serviceUuid, $request) -> ObjectStorage2Servicedetailresponse + +#### Description + +Replaces existing object storage service by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->replaceService( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2Servicereplace([ + 'name' => 'example-service', + 'configuredStatus' => ObjectStorage2Propertyconfiguredstatus::Started->value, + 'networks' => [ + new ObjectStorage2Networkcreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2Networktype::Public_->value, + 'family' => ObjectStorage2Networkfamily::IPv4->value, + ]), + new ObjectStorage2Networkcreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2Networktype::Private_->value, + 'family' => ObjectStorage2Networkfamily::IPv4->value, + ]), + ], + 'labels' => [ + new ObjectStorage2Labelcreate([ + 'key' => 'example-label-key', + 'value' => 'example-label-value', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” The name of the service. + +**$configuredStatus:** `string` + +**$networks:** `?array` + +**$customDomains:** `?array` + +**$labels:** `?array` + +**$properties:** `?ObjectStorage2Propertiescreate` + +
+ +
+$client->objectStorage2->deleteService($serviceUuid, $request) + +#### Description + +Deletes existing object storage service by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->deleteService( + '01234567-89ab-cdef-0123-456789abcdef', + new DeleteServiceRequest([ + 'force' => true, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$force:** `?bool` β€” If the parameter is provided, the deletion process starts even if the service is not empty. + +
+ +
+$client->objectStorage2->modifyService($serviceUuid, $request) -> ObjectStorage2Servicedetailresponse + +#### Description + +Modifies existing object storage service by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->modifyService( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2Servicemodify([ + 'name' => 'example-service', + 'configuredStatus' => ObjectStorage2Propertyconfiguredstatus::Started->value, + 'networks' => [ + new ObjectStorage2Networkcreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2Networktype::Private_->value, + 'family' => ObjectStorage2Networkfamily::IPv4->value, + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `?string` + +**$configuredStatus:** `?string` + +**$networks:** `?array` + +**$customDomains:** `?array` + +**$labels:** `?array` + +**$properties:** `?ObjectStorage2Propertiescreate` + +
+ +
+$client->objectStorage2->listNetworks($serviceUuid) -> array + +#### Description + +Returns a list of available service networks by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listNetworks( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createNetwork($serviceUuid, $request) -> ObjectStorage2Networkdetailresponse + +#### Description + +Creates a new service network by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->createNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateNetworkRequest([ + 'body' => new ObjectStorage2Networkcreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2Networktype::Public_->value, + 'family' => ObjectStorage2Networkfamily::IPv4->value, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `ObjectStorage2Networkcreate` + +
+ +
+$client->objectStorage2->getNetwork($serviceUuid, $networkName) -> ObjectStorage2Networkdetailresponse + +#### Description + +Returns service network details by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->objectStorage2->getNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +
+ +
+$client->objectStorage2->deleteNetwork($serviceUuid, $networkName) + +#### Description + +Deletes existing network by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->objectStorage2->deleteNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +
+ +
+$client->objectStorage2->listCustomDomains($serviceUuid) -> array + +#### Description + +Returns a list of custom domains attached to a service by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listCustomDomains( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->attachCustomDomain($serviceUuid, $request) -> ObjectStorage2Customdomaindetailresponse + +#### Description + +Attaches a new custom domain to the service identified by {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->attachCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + new AttachCustomDomainRequest([ + 'body' => new ObjectStorage2Customdomaincreate([ + 'type' => ObjectStorage2CustomdomaincreateType::Public_->value, + 'domainName' => 'objects.example.com', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `ObjectStorage2Customdomaincreate` + +
+ +
+$client->objectStorage2->getCustomDomainDetails($serviceUuid, $customDomainName) -> ObjectStorage2Customdomaindetailresponse + +#### Description + +Returns custom domain details by given {service_uuid} and {domain_name}. + +#### Usage + +```php +$client->objectStorage2->getCustomDomainDetails( + '01234567-89ab-cdef-0123-456789abcdef', + 'objects.example.com', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +
+ +
+$client->objectStorage2->deleteCustomDomain($serviceUuid, $customDomainName) + +#### Description + +Deletes existing custom domain by given {service_uuid} and {domain_name}. + +#### Usage + +```php +$client->objectStorage2->deleteCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'objects.example.com', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +
+ +
+$client->objectStorage2->modifyCustomDomain($serviceUuid, $customDomainName, $request) -> ObjectStorage2Customdomaindetailresponse + +#### Description + +Modifies existing custom domain by given {service_uuid} and {domain_name}. + +#### Usage + +```php +$client->objectStorage2->modifyCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'objects.example.com', + new ObjectStorage2Customdomainmodify([ + 'type' => ObjectStorage2CustomdomainmodifyType::Public_->value, + 'domainName' => 'objects.example.com', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +**$type:** `?string` β€” Type of the custom domain. + +**$domainName:** `?string` β€” New modified custom domain. + +
+ +
+$client->objectStorage2->listRegions() -> array + +#### Description + +Returns a list of available managed object storage regions. + +#### Usage + +```php +$client->objectStorage2->listRegions(); +``` + +
+ +
+$client->objectStorage2->getRegionDetails($regionName) -> ObjectStorage2Regiondetailresponse + +#### Description + +Returns object storage region details by given {name}. + +#### Usage + +```php +$client->objectStorage2->getRegionDetails( + 'my-object-storage', +); +``` + +#### Parameters + +**$regionName:** `string` β€” The name of the region. + +
+ +
+$client->objectStorage2->getServiceMetrics($serviceUuid) -> ObjectStorage2Metricsusageresponse + +#### Description + +Returns object storage metrics by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->getServiceMetrics( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->listBucketMetrics($serviceUuid, $request) -> array + +#### Description + +Returns metrics for buckets within a service. + +#### Usage + +```php +$client->objectStorage2->listBucketMetrics( + '01234567-89ab-cdef-0123-456789abcdef', + new ListBucketMetricsRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +
+ +
+$client->objectStorage2->createBucket($serviceUuid, $request) -> ObjectStorage2Bucketdetailresponse + +#### Description + +Creates a new service bucket by the given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->createBucket( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2Bucketcreate([ + 'name' => 'my-bucket-1', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” Must be unique within the service, and should contain only alphanumeric, .,- and _. + +
+ +
+$client->objectStorage2->deleteBucket($serviceUuid, $bucketName) + +#### Description + +Deletes an existing bucket by given {service_uuid} and {bucket_name}. This API call will remove all objects from the bucket permanently and cannot be reversed. + +#### Usage + +```php +$client->objectStorage2->deleteBucket( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$bucketName:** `string` β€” The name of the bucket. + +
+ +
+$client->objectStorage2->listServiceMetricsSeries($serviceUuid, $request) -> array + +#### Description + +Returns Object Storage instance metrics series by a given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listServiceMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + new ListServiceMetricsSeriesRequest([ + 'from' => new DateTime('2024-01-01T00:00:00Z'), + 'to' => new DateTime('2024-01-01T00:00:00Z'), + 'interval' => '1h', + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$from:** `?DateTime` β€” Beginning of the time range for which to return metrics. + +**$to:** `?DateTime` β€” End of the time range for which to return metrics. + +**$interval:** `?string` β€” Metrics aggregation interval. + +**$sort:** `?string` β€” Order of returned results. + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +
+ +
+$client->objectStorage2->listLabels($serviceUuid) -> array + +#### Description + +Returns a list of available service labels by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createLabel($serviceUuid, $request) -> ObjectStorage2Labeldetailresponse + +#### Description + +Creates a new label by given {service_uuid}. Labels are used for service filtering. + +#### Usage + +```php +$client->objectStorage2->createLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLabelRequest([ + 'body' => new ObjectStorage2Labelcreate([ + 'key' => 'foo', + 'value' => 'bar', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `ObjectStorage2Labelcreate` + +
+ +
+$client->objectStorage2->getLabelDetails($serviceUuid, $labelKey) -> ObjectStorage2Labeldetailresponse + +#### Description + +Returns label details by given {service_uuid} and {key}. + +#### Usage + +```php +$client->objectStorage2->getLabelDetails( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->objectStorage2->deleteLabel($serviceUuid, $labelKey) + +#### Description + +Deletes existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->objectStorage2->deleteLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->objectStorage2->modifyLabel($serviceUuid, $labelKey, $request) -> ObjectStorage2Labeldetailresponse + +#### Description + +Modifies existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->objectStorage2->modifyLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + new ObjectStorage2Labelmodify([ + 'key' => 'foo', + 'value' => 'bar', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +**$key:** `?string` + +**$value:** `?string` + +
+ +
+$client->objectStorage2->listUsers($serviceUuid) -> array + +#### Description + +Returns a list of available service users by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listUsers( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createUser($serviceUuid, $request) -> ObjectStorage2Userdetailresponse + +#### Description + +Creates a new service user by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->createUser( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2Usercreate([ + 'username' => 'example_user', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user to create. + +
+ +
+$client->objectStorage2->getUserDetails($serviceUuid, $username) -> ObjectStorage2Userdetailresponse + +#### Description + +Returns service user details by given {service_uuid} and {username}. + +#### Usage + +```php +$client->objectStorage2->getUserDetails( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->deleteUser($serviceUuid, $username) + +#### Description + +Deletes existing user by given {service_uuid} and {username}. + +#### Usage + +```php +$client->objectStorage2->deleteUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->listAccessKeys($serviceUuid, $username) -> array + +#### Description + +Returns a list of available access keys for a user. + +#### Usage + +```php +$client->objectStorage2->listAccessKeys( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->createAccessKey($serviceUuid, $username) -> ObjectStorage2Createaccesskeyresponse + +#### Description + +Creates a new access key by given {service_uuid} and {username}. + +#### Usage + +```php +$client->objectStorage2->createAccessKey( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->getAccessKeyDetails($serviceUuid, $username, $accessKeyId) -> ObjectStorage2Accesskeydetailresponse + +#### Description + +Returns access key details by given {service_uuid}, {username}, and {access-key-id}. + +#### Usage + +```php +$client->objectStorage2->getAccessKeyDetails( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$accessKeyId:** `string` β€” The ID of the access key. + +
+ +
+$client->objectStorage2->deleteAccessKey($serviceUuid, $username, $accessKeyId) + +#### Description + +Deletes existing access key by given {service_uuid}, {username}, and {access-key-id}. + +#### Usage + +```php +$client->objectStorage2->deleteAccessKey( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$accessKeyId:** `string` β€” The ID of the access key. + +
+ +
+$client->objectStorage2->modifyAccessKeyDetails($serviceUuid, $username, $accessKeyId, $request) -> ObjectStorage2Accesskeydetailresponse + +#### Description + +Modifies access key details. + +#### Usage + +```php +$client->objectStorage2->modifyAccessKeyDetails( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', + new ObjectStorage2Accesskeymodify([ + 'status' => ObjectStorage2AccesskeymodifyStatus::Inactive->value, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$accessKeyId:** `string` β€” The ID of the access key. + +**$status:** `?string` β€” Indicates if the key is active or inactive. + +
+ +
+$client->objectStorage2->listAttachedUserPolicies($serviceUuid, $username) -> array + +#### Description + +Returns a list of attached user policies for a user. + +#### Usage + +```php +$client->objectStorage2->listAttachedUserPolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->attachUserPolicy($serviceUuid, $username, $request) + +#### Description + +Attach a policy to a user. + +#### Usage + +```php +$client->objectStorage2->attachUserPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachUserPolicyRequest([ + 'body' => new ObjectStorage2Policyattachmentcreate([ + 'name' => 'test-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$request:** `ObjectStorage2Policyattachmentcreate` + +
+ +
+$client->objectStorage2->detachUserPolicy($serviceUuid, $username, $nestedName) + +#### Description + +Detach a policy from a user. + +#### Usage + +```php +$client->objectStorage2->detachUserPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$nestedName:** `string` β€” The name of the policy to detach. + +
+ +
+$client->objectStorage2->getUserInlinePolicy($serviceUuid, $username, $userPolicyName) -> ObjectStorage2Inlinepolicyresponse + +#### Description + +Get the user inline policy by the given {service_uuid}, {username} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->getUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$userPolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->deleteUserInlinePolicy($serviceUuid, $username, $userPolicyName) + +#### Description + +Deletes the user inline policy by the given {service_uuid}, {username}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->deleteUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$userPolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->listUserInlinePolicies($serviceUuid, $username) -> array + +#### Description + +Lists the user inline policies by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->listUserInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->createUserInlinePolicy($serviceUuid, $username, $request) -> ObjectStorage2Inlinepolicyresponse + +#### Description + +Creates a user inline policy by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->createUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateUserInlinePolicyRequest([ + 'body' => new ObjectStorage2Inlinepolicycreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$request:** `ObjectStorage2Inlinepolicycreate` + +
+ +
+$client->objectStorage2->getUserTags($serviceUuid, $username) -> array + +#### Description + +Returns a user's tags by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->getUserTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->replaceUserTags($serviceUuid, $username, $request) -> array + +#### Description + +Replaces a user's tags by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->replaceUserTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ReplaceUserTagsRequest([ + 'body' => [ + new ObjectStorage2TaglistrequestItem([ + 'key' => 'environment', + 'value' => 'production', + ]), + new ObjectStorage2TaglistrequestItem([ + 'key' => 'team', + 'value' => 'backend', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$request:** `array` + +
+ +
+$client->objectStorage2->deleteUserTag($serviceUuid, $username, $userTagKey) + +#### Description + +Deletes a user's tag by the given {service_uuid}, {username}, and {tag_key}. + +#### Usage + +```php +$client->objectStorage2->deleteUserTag( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$userTagKey:** `string` β€” The key of the user tag. + +
+ +
+$client->objectStorage2->createUserPermissionsBoundary($serviceUuid, $username, $request) -> ObjectStorage2Permissionsboundaryresponse + +#### Description + +Creates a user's permissions boundary by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->createUserPermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateUserPermissionsBoundaryRequest([ + 'body' => new ObjectStorage2Permissionsboundarycreate([ + 'policyName' => 'sample-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$request:** `ObjectStorage2Permissionsboundarycreate` + +
+ +
+$client->objectStorage2->deleteUserPermissionsBoundary($serviceUuid, $username) + +#### Description + +Deletes a user's permissions boundary by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->deleteUserPermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->listPolicyVersions($serviceUuid, $policyName) -> array + +#### Description + +Lists policy versions given by {service_uuid}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->listPolicyVersions( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +
+ +
+$client->objectStorage2->createPolicyVersion($serviceUuid, $policyName, $request) -> ObjectStorage2Policyversionresponse + +#### Description + +Creates a policy version by the given {service_uuid}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->createPolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2Policyversioncreate([ + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":["*"],"Effect":"Deny","Resource":"*"}]}', + 'isDefault' => true, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +**$document:** `string` β€” A valid, URL-encoded policy document. + +**$isDefault:** `bool` β€” Set this version as the default. + +
+ +
+$client->objectStorage2->getPolicyVersion($serviceUuid, $policyName, $policyVersion) -> ObjectStorage2Policyversionresponse + +#### Description + +Get a single policy version by the given {service_uuid}, {policy_name}, and {policy_version}. + +#### Usage + +```php +$client->objectStorage2->getPolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'v1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +**$policyVersion:** `string` β€” The version identifier of the policy. + +
+ +
+$client->objectStorage2->deletePolicyVersion($serviceUuid, $policyName, $policyVersion) + +#### Description + +Deletes a policy version by the given {service_uuid}, {policy_name}, and {policy_version}. + +#### Usage + +```php +$client->objectStorage2->deletePolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'v1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +**$policyVersion:** `string` β€” The version identifier of the policy. + +
+ +
+$client->objectStorage2->getPolicyDetails($serviceUuid, $policyName) -> ObjectStorage2Policydetailresponse + +#### Description + +Returns service policy details by given {service_uuid} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->getPolicyDetails( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +
+ +
+$client->objectStorage2->deletePolicy($serviceUuid, $policyName) + +#### Description + +Deletes existing policy by given {service_uuid} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->deletePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +
+ +
+$client->objectStorage2->setDefaultPolicyVersion($serviceUuid, $policyName, $request) -> ObjectStorage2Policydetailresponse + +#### Description + +Sets the default version for a policy. Note: This is mapped from ModifyPolicyVersion handler. + +#### Usage + +```php +$client->objectStorage2->setDefaultPolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2Policysetdefaultversion([ + 'versionId' => 'v2', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +**$versionId:** `string` β€” The policy version ID to set as default. + +
+ +
+$client->objectStorage2->listPolicies($serviceUuid) -> array + +#### Description + +Returns a list of available service policies by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listPolicies( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createPolicy($serviceUuid, $request) -> ObjectStorage2Policydetailresponse + +#### Description + +Creates a new service policy by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->createPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2Policycreate([ + 'name' => 'example-policy', + 'description' => 'example-description', + 'document' => '%7B%22Version%22%3A%20%222012-10-17%22%2C%20%20%22Statement%22%3A%20%5B%7B%22Action%22%3A%20%5B%22iam%3AGetUser%22%5D%2C%20%22Resource%22%3A%20%22%2A%22%2C%20%22Effect%22%3A%20%22Allow%22%2C%20%22Sid%22%3A%20%22editor%22%7D%5D%7D', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” Unique name of the policy. + +**$description:** `?string` β€” The policy description. + +**$document:** `string` β€” A valid, URL-encoded policy document. + +
+ +
+$client->objectStorage2->listIamGroupPolicies($serviceUuid, $groupName) -> array + +#### Description + +Lists IAM policies attached to a group. + +#### Usage + +```php +$client->objectStorage2->listIamGroupPolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +
+ +
+$client->objectStorage2->attachIamGroupPolicy($serviceUuid, $groupName, $request) + +#### Description + +Attaches a policy to a group. + +#### Usage + +```php +$client->objectStorage2->attachIamGroupPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachIamGroupPolicyRequest([ + 'body' => new ObjectStorage2Policyattachmentcreate([ + 'name' => 'test-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$request:** `ObjectStorage2Policyattachmentcreate` + +
+ +
+$client->objectStorage2->detachIamGroupPolicy($serviceUuid, $groupName, $policyName) + +#### Description + +Detaches a policy from a group. + +#### Usage + +```php +$client->objectStorage2->detachIamGroupPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$policyName:** `string` β€” The name of the policy. + +
+ +
+$client->objectStorage2->listGroups($serviceUuid) -> array + +#### Description + +Returns a list of available service groups by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listGroups( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createGroup($serviceUuid, $request) -> ObjectStorage2Groupresponse + +#### Description + +Creates an iam group. + +#### Usage + +```php +$client->objectStorage2->createGroup( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2Groupcreate([ + 'name' => 'new-group', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” A valid string to represent the name of the IAM group. + +
+ +
+$client->objectStorage2->getGroup($serviceUuid, $groupName) -> ObjectStorage2Groupresponse + +#### Description + +Get a single group identified by {service_uuid}, and {group_name}. + +#### Usage + +```php +$client->objectStorage2->getGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +
+ +
+$client->objectStorage2->deleteGroup($serviceUuid, $groupName) + +#### Description + +Deletes a group identified by {group_name}. + +#### Usage + +```php +$client->objectStorage2->deleteGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +
+ +
+$client->objectStorage2->attachUserToGroup($serviceUuid, $groupName, $username) + +#### Description + +Attaches an iam user to a group identified by {group_name}, and {username}. + +#### Usage + +```php +$client->objectStorage2->attachUserToGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->removeUserFromGroup($serviceUuid, $groupName, $username) + +#### Description + +Removes an iam user from the group identified by {group_name}, and {username}. + +#### Usage + +```php +$client->objectStorage2->removeUserFromGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->listGroupInlinePolicies($serviceUuid, $groupName) -> array + +#### Description + +Lists the group inline policies by the given {service_uuid}, and {group_name}. + +#### Usage + +```php +$client->objectStorage2->listGroupInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +
+ +
+$client->objectStorage2->createGroupInlinePolicy($serviceUuid, $groupName, $request) -> ObjectStorage2Inlinepolicyresponse + +#### Description + +Creates a group inline policy by the given {service_uuid}, and {group_name}. + +#### Usage + +```php +$client->objectStorage2->createGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateGroupInlinePolicyRequest([ + 'body' => new ObjectStorage2Inlinepolicycreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$request:** `ObjectStorage2Inlinepolicycreate` + +
+ +
+$client->objectStorage2->getGroupInlinePolicy($serviceUuid, $groupName, $groupPolicyName) -> ObjectStorage2Inlinepolicyresponse + +#### Description + +Get the group inline policy by the given {service_uuid}, {group_name} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->getGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$groupPolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->deleteGroupInlinePolicy($serviceUuid, $groupName, $groupPolicyName) + +#### Description + +Deletes the group inline policy by the given {service_uuid}, {group_name}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->deleteGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$groupPolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->listRoles($serviceUuid) -> array + +#### Description + +Lists the roles. + +#### Usage + +```php +$client->objectStorage2->listRoles( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createRole($serviceUuid, $request) -> ObjectStorage2Roleresponse + +#### Description + +Creates a service IAM role. + +#### Usage + +```php +$client->objectStorage2->createRole( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2Rolecreate([ + 'name' => 'test-role', + 'assumeRolePolicyDocument' => '{"Version": "2012-10-17","Statement": [{"Action": "sts:AssumeRole","Principal": {"AWS": ["urn:ecs:iam::ns1:user/Demby"]},"Effect": "Allow","Resource": "*"}]}', + 'description' => 'A test role.', + 'maxSessionDuration' => 3600, + 'permissionsBoundary' => 'test-policy', + 'tags' => [ + new ObjectStorage2Roletag([ + 'key' => 'department', + 'value' => 'Finance', + ]), + new ObjectStorage2Roletag([ + 'key' => 'school', + 'value' => 'University of Helsinki', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` + +**$assumeRolePolicyDocument:** `string` β€” The policy document that grants an entity permission to assume the role. + +**$description:** `?string` β€” Description of the role. + +**$maxSessionDuration:** `?int` β€” Maximum session duration in seconds. + +**$permissionsBoundary:** `?string` β€” Policy name to set as the permissions boundary. + +**$tags:** `?array` β€” Tags to attach to the role (max 50). + +
+ +
+$client->objectStorage2->getRole($serviceUuid, $roleName) -> ObjectStorage2Roleresponse + +#### Description + +Get a single role identified by {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->getRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->deleteRole($serviceUuid, $roleName) + +#### Description + +Deletes a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->deleteRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->updateRole($serviceUuid, $roleName, $request) -> ObjectStorage2Roleresponse + +#### Description + +Updates a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->updateRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2Roleupdate([ + 'description' => 'New description', + 'maxSessionDuration' => 3900, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$description:** `?string` β€” New description for the role. + +**$maxSessionDuration:** `?int` β€” New maximum session duration in seconds. + +
+ +
+$client->objectStorage2->listRoleInlinePolicies($serviceUuid, $roleName) -> array + +#### Description + +Returns a list of role inline policies by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->listRoleInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->createRoleInlinePolicy($serviceUuid, $roleName, $request) -> ObjectStorage2Inlinepolicyresponse + +#### Description + +Creates a role inline policy by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->createRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateRoleInlinePolicyRequest([ + 'body' => new ObjectStorage2Inlinepolicycreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$request:** `ObjectStorage2Inlinepolicycreate` + +
+ +
+$client->objectStorage2->getRoleInlinePolicy($serviceUuid, $roleName, $rolePolicyName) -> ObjectStorage2Inlinepolicyresponse + +#### Description + +Returns a role's inline policy by the given {service_uuid}, {role_name}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->getRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$rolePolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->deleteRoleInlinePolicy($serviceUuid, $roleName, $rolePolicyName) + +#### Description + +Delete a role inline policy by the given {service_uuid}, {role_name} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->deleteRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$rolePolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->createRolePermissionsBoundary($serviceUuid, $roleName, $request) -> ObjectStorage2Permissionsboundaryresponse + +#### Description + +Creates a role policy's permissions boundary by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->createRolePermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateRolePermissionsBoundaryRequest([ + 'body' => new ObjectStorage2Permissionsboundarycreate([ + 'policyName' => 'sample-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$request:** `ObjectStorage2Permissionsboundarycreate` + +
+ +
+$client->objectStorage2->deleteRolePermissionsBoundary($serviceUuid, $roleName) + +#### Description + +Deletes a role permissions boundary by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->deleteRolePermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->assumeRolePolicy($serviceUuid, $roleName, $request) -> ObjectStorage2Assumerolepolicyresponse + +#### Description + +Assume a role policy by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->assumeRolePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2Assumerolepolicyrequest([ + 'document' => '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":"backup.upcloud.com"},"Action":"sts:AssumeRole"}]}', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$document:** `string` β€” The assume role policy document that grants an entity permission to assume the role. + +
+ +
+$client->objectStorage2->listAttachedRolePolicies($serviceUuid, $roleName) -> array + +#### Description + +Lists all policies attached to a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->listAttachedRolePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->attachPolicyToRole($serviceUuid, $roleName, $request) + +#### Description + +Attaches a policy to a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->attachPolicyToRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachPolicyToRoleRequest([ + 'body' => new ObjectStorage2Policyattachmentcreate([ + 'name' => 'test-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$request:** `ObjectStorage2Policyattachmentcreate` + +
+ +
+$client->objectStorage2->detachPolicyFromRole($serviceUuid, $roleName, $rolePolicyName) + +#### Description + +Detaches a policy from a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->detachPolicyFromRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$rolePolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->getRoleTags($serviceUuid, $roleName) -> array + +#### Description + +Returns a role's tags by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->getRoleTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->replaceRoleTags($serviceUuid, $roleName, $request) -> array + +#### Description + +Replaces a role's tags by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->replaceRoleTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ReplaceRoleTagsRequest([ + 'body' => [ + new ObjectStorage2TaglistrequestItem([ + 'key' => 'environment', + 'value' => 'production', + ]), + new ObjectStorage2TaglistrequestItem([ + 'key' => 'team', + 'value' => 'backend', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$request:** `array` + +
+ +
+$client->objectStorage2->deleteRoleTag($serviceUuid, $roleName, $roleTagKey) + +#### Description + +Deletes a role's tag by the given {service_uuid}, {role_name}, and {tag_key}. + +#### Usage + +```php +$client->objectStorage2->deleteRoleTag( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$roleTagKey:** `string` β€” The key of the role tag. + +
+ +
+$client->objectStorage2->integrationListServices() + +#### Description + +INTERNAL: This endpoint lists all services available for integration use-cases. + +#### Usage + +```php +$client->objectStorage2->integrationListServices(); +``` + +
+ +
+$client->objectStorage2->integrationGetService($serviceUuid) + +#### Description + +INTERNAL: This endpoint retrieves details of a specific service for integration use-cases. + +#### Usage + +```php +$client->objectStorage2->integrationGetService( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->integrationCreateNetwork($serviceUuid) + +#### Description + +INTERNAL: This endpoint creates a new network for integration use-cases. + +#### Usage + +```php +$client->objectStorage2->integrationCreateNetwork( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->integrationDeleteNetwork($serviceUuid, $networkName) + +#### Description + +This endpoint deletes a network created for integration use-cases. + +#### Usage + +```php +$client->objectStorage2->integrationDeleteNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +
diff --git a/docs/v0.0.65/reference.md b/docs/v0.0.65/reference.md new file mode 100644 index 00000000..ff88fc11 --- /dev/null +++ b/docs/v0.0.65/reference.md @@ -0,0 +1,10279 @@ +--- +layout: sdk +title: "API reference Β· v0.0.65" +version: "v0.0.65" +services: + - account + - kubernetes + - currency + - device + - events + - ip_address + - network-peering + - network + - partner + - permission + - plan + - price + - server-group + - server + - server_size + - storage + - tag + - timezone + - account-tokens + - object-storage-2 + - file-storage + - database + - load-balancer + - firewall-ruleset + - vnc_keymap + - zone +--- +# API reference +## account +{:#accountAnchor} + +
+$client->account->details() -> Account + +#### Description + +Returns account details for the authenticated user + +#### Usage + +```php +$client->account->details(); +``` + +
+ +
+$client->account->createMslmaSigningLink() -> AccountCreateMsLmaSigningLinkResponse + +#### Description + +Create a new Microsoft LMA signing link + +#### Usage + +```php +$client->account->createMslmaSigningLink(); +``` + +
+ +## kubernetes +{:#kubernetesAnchor} + +
+$client->kubernetes->listKubernetesClusters() -> array + +#### Description + +Returns a list of Kubernetes clusters. + +#### Usage + +```php +$client->kubernetes->listKubernetesClusters(); +``` + +
+ +
+$client->kubernetes->createKubernetesCluster($request) -> KubernetesCluster + +#### Description + +Creates a new Kubernetes cluster. + +#### Usage + +```php +$client->kubernetes->createKubernetesCluster( + new KubernetesCluster([ + 'controlPlaneIpFilter' => [ + '1.2.3.0/24', + '1.1.1.1', + ], + 'name' => 'example-cluster', + 'network' => '33333333-3333-3333-333333333333', + 'networkCidr' => '172.16.0.0/24', + 'nodeGroups' => [ + new KubernetesNodeGroup([ + 'count' => 4, + 'kubeletArgs' => [ + new KubernetesKubeletArg([ + 'key' => 'log-flush-frequency', + 'value' => '5s', + ]), + ], + 'labels' => [ + new KubernetesLabel([ + 'key' => 'managedBy', + 'value' => 'exampleDevelopmentTeam', + ]), + new KubernetesLabel([ + 'key' => 'environment', + 'value' => 'development', + ]), + ], + 'name' => 'small', + 'plan' => 'K8S-2xCPU-4GB', + 'sshKeys' => [ + 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV', + ], + 'storage' => '01000000-0000-4000-8000-000160010100', + 'taints' => [ + new KubernetesTaint([ + 'effect' => KubernetesEffect::NoSchedule->value, + 'key' => 'environment', + 'value' => 'development', + ]), + ], + ]), + new KubernetesNodeGroup([ + 'count' => 8, + 'kubeletArgs' => [ + new KubernetesKubeletArg([ + 'key' => 'log-flush-frequency', + 'value' => '15s', + ]), + ], + 'labels' => [ + new KubernetesLabel([ + 'key' => 'managedBy', + 'value' => 'exampleStagingTeam', + ]), + new KubernetesLabel([ + 'key' => 'environment', + 'value' => 'staging', + ]), + ], + 'name' => 'medium', + 'plan' => 'K8S-4xCPU-8GB', + 'sshKeys' => [ + 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV', + ], + 'storage' => '01000000-0000-4000-8000-000160010100', + 'taints' => [ + new KubernetesTaint([ + 'effect' => KubernetesEffect::NoSchedule->value, + 'key' => 'environment', + 'value' => 'staging', + ]), + ], + ]), + ], + 'zone' => 'de-fra1', + 'version' => 'version', + 'labels' => [ + [ + 'key' => "env", + 'value' => "prod", + ], + [ + 'key' => "app", + 'value' => "cats-dating-app", + ], + ], + ]), +); +``` + +#### Parameters + +**$request:** `KubernetesCluster` + +
+ +
+$client->kubernetes->getKubernetesCluster($uuid) -> KubernetesCluster + +#### Description + +Returns Kubernetes cluster details by given `uuid`. + +#### Usage + +```php +$client->kubernetes->getKubernetesCluster( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->deleteKubernetesCluster($uuid) -> KubernetesAccepted + +#### Description + +Deletes an existing Kubernetes cluster by given `uuid`. + +#### Usage + +```php +$client->kubernetes->deleteKubernetesCluster( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->modifyKubernetesCluster($uuid, $request) -> KubernetesCluster + +#### Description + +Modifies an existing Kubernetes cluster by given `{uuid}`. + +#### Usage + +```php +$client->kubernetes->modifyKubernetesCluster( + 'uuid', + new KubernetesClusterPatch([ + 'controlPlaneIpFilter' => [ + '1.2.3.0/24', + '1.1.1.1', + ], + 'labels' => [ + [ + 'key' => "env", + 'value' => "prod", + ], + [ + 'key' => "app", + 'value' => "cats-dating-app", + ], + ], + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$controlPlaneIpFilter:** `?array` + +**$labels:** `mixed` + +**$plan:** `?string` + +
+ +
+$client->kubernetes->getKubernetesClusterKubeconfig($uuid) -> KubernetesClusterKubeconfig + +#### Description + +Returns kubeconfig for Kubernetes cluster by given `{uuid}`. + +#### Usage + +```php +$client->kubernetes->getKubernetesClusterKubeconfig( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->getKubernetesClusterAvailableUpgrades($uuid) -> KubernetesClusterAvailableUpgrades + +#### Description + +Returns a list of available versions that can be used to upgrade the cluster. + +#### Usage + +```php +$client->kubernetes->getKubernetesClusterAvailableUpgrades( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->upgradeKubernetesCluster($uuid, $request) -> KubernetesClusterAvailableUpgradesPost + +#### Description + +Upgrades an existing Kubernetes cluster to specific version. + +#### Usage + +```php +$client->kubernetes->upgradeKubernetesCluster( + 'uuid', + new UpgradeKubernetesClusterRequest([ + 'body' => new KubernetesClusterAvailableUpgradesPost([ + 'version' => '1.31', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$request:** `KubernetesClusterAvailableUpgradesPost` + +
+ +
+$client->kubernetes->listKubernetesClusterNodeGroups($uuid) -> array + +#### Description + +Returns a list of available node groups of an existing Kubernetes cluster. Cluster is identified by given `{uuid}`. + +A node group is a uniform set of worker nodes attached to a cluster. + +#### Usage + +```php +$client->kubernetes->listKubernetesClusterNodeGroups( + 'uuid', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +
+ +
+$client->kubernetes->createKubernetesClusterNodeGroup($uuid, $request) -> KubernetesNodeGroup + +#### Description + +Creates a new node group to an existing Kubernetes cluster. Cluster is identified by given `{uuid}`. + +#### Usage + +```php +$client->kubernetes->createKubernetesClusterNodeGroup( + 'uuid', + new CreateKubernetesClusterNodeGroupRequest([ + 'body' => new KubernetesNodeGroup([ + 'count' => 4, + 'kubeletArgs' => [ + new KubernetesKubeletArg([ + 'key' => 'log-flush-frequency', + 'value' => '5s', + ]), + ], + 'labels' => [ + new KubernetesLabel([ + 'key' => 'managedBy', + 'value' => 'exampleDevelopmentTeam', + ]), + new KubernetesLabel([ + 'key' => 'environment', + 'value' => 'development', + ]), + ], + 'name' => 'small', + 'plan' => 'K8S-2xCPU-4GB', + 'sshKeys' => [ + 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV', + ], + 'storage' => '01000000-0000-4000-8000-000160010100', + 'taints' => [ + new KubernetesTaint([ + 'effect' => KubernetesEffect::NoSchedule->value, + 'key' => 'environment', + 'value' => 'development', + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$request:** `KubernetesNodeGroup` + +
+ +
+$client->kubernetes->getKubernetesClusterNodeGroup($uuid, $name) -> KubernetesNodeGroupDetails + +#### Description + +Returns node group details by given `{node_group_name}`. Cluster is identified by given `{uuid}`. + +#### Usage + +```php +$client->kubernetes->getKubernetesClusterNodeGroup( + 'uuid', + 'name', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +
+ +
+$client->kubernetes->deleteKubernetesClusterNodeGroup($uuid, $name) -> KubernetesAccepted + +#### Description + +Deletes an existing node group by given Kubernetes cluster `{uuid}` and `{node_group_name}`. + +#### Usage + +```php +$client->kubernetes->deleteKubernetesClusterNodeGroup( + 'uuid', + 'name', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +
+ +
+$client->kubernetes->modifyKubernetesClusterNodeGroup($uuid, $name, $request) -> KubernetesNodeGroup + +#### Description + +Modifies an existing node group of a cluster. Cluster is identified by given `{uuid}` and node group by `{node_group_name}`. + +#### Usage + +```php +$client->kubernetes->modifyKubernetesClusterNodeGroup( + 'uuid', + 'name', + new KubernetesNodeGroupPatch([ + 'count' => 16, + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +**$count:** `int` + +
+ +
+$client->kubernetes->deleteKubernetesClusterNodeGroupNode($uuid, $name, $nodeName) -> KubernetesAccepted + +#### Description + +Deletes a node group node from a cluster (experimental). Cluster is identified by given `{uuid}`, node group by `{name}`, and node by `{node-name}`. + +#### Usage + +```php +$client->kubernetes->deleteKubernetesClusterNodeGroupNode( + 'uuid', + 'name', + 'node-name', +); +``` + +#### Parameters + +**$uuid:** `string` β€” UUID + +**$name:** `string` β€” Name + +**$nodeName:** `string` β€” Node name + +
+ +
+$client->kubernetes->listKubernetesPlans() -> array + +#### Description + +Returns a list of available Kubernetes cluster plans. + +#### Usage + +```php +$client->kubernetes->listKubernetesPlans(); +``` + +
+ +
+$client->kubernetes->listKubernetesVersions() -> array + +#### Description + +Returns a list of available Kubernetes cluster versions. + +#### Usage + +```php +$client->kubernetes->listKubernetesVersions(); +``` + +
+ +## currency +{:#currencyAnchor} + +
+$client->currency->listCurrencies() -> CurrencyCurrencies + +#### Description + +Retrieves a list of supported currencies and their exchange rates relative to the account credit currency. + +#### Usage + +```php +$client->currency->listCurrencies(); +``` + +
+ +## device +{:#deviceAnchor} + +
+$client->device->getAvailablePassthroughDevices($request) -> array + +#### Description + +Returns a list of available passthrough devices. + +#### Usage + +```php +$client->device->getAvailablePassthroughDevices( + new GetAvailablePassthroughDevicesRequest([]), +); +``` + +#### Parameters + +**$zone:** `?string` β€” Filter results to a specific zone. + +**$type:** `?string` β€” Filter results to a specific device type. The only valid type is "gpu" for now. + +
+ +## events +{:#eventsAnchor} + +
+$client->events->listEvents($serverUuid, $offset, $count) -> Events + +#### Description + +Retrieves a list of events. + +#### Usage + +```php +$client->events->listEvents( + 'server_uuid', + 1, + 1, +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Filter results to a specific server. + +**$offset:** `int` β€” The number of items to skip before starting to collect the result set. Default is 0. + +**$count:** `int` β€” The numbers of items to return. + +
+ +## ip_address +{:#ip_addressAnchor} + +
+$client->ipAddress->listIpAddresses() -> IpAddressesResponse + +#### Description + +Retrieves a list of IP addresses. + +#### Usage + +```php +$client->ipAddress->listIpAddresses(); +``` + +
+ +
+$client->ipAddress->getIpAddressDetails($address) -> IpAddressResponse + +#### Description + +Retrieves details of a specific IP address. + +#### Usage + +```php +$client->ipAddress->getIpAddressDetails( + 'address', +); +``` + +#### Parameters + +**$address:** `string` β€” The IP address to retrieve details for. + +
+ +
+$client->ipAddress->modifyIpAddress($address, $request) -> IpAddressRequest + +#### Description + +Modifies attributes of a specific IP address. + +#### Usage + +```php +$client->ipAddress->modifyIpAddress( + 'address', + new ModifyIpAddressRequestV10([ + 'ipAddress' => new ModifyIpAddressRequestV10IpAddress([ + 'ptrRecord' => 'ptr_record', + ]), + ]), +); +``` + +#### Parameters + +**$address:** `string` + +**$ipAddress:** `ModifyIpAddressRequestV10IpAddress` + +
+ +
+$client->ipAddress->deleteIpAddress($address) + +#### Description + +Deletes a specific IP address. + +#### Usage + +```php +$client->ipAddress->deleteIpAddress( + 'address', +); +``` + +#### Parameters + +**$address:** `string` + +
+ +## network-peering +{:#network-peeringAnchor} + +
+$client->networkPeering->listNetworkPeerings($request) -> NetworkPeerings + +#### Description + +Retrieves a list of network peerings. + +#### Usage + +```php +$client->networkPeering->listNetworkPeerings( + new ListNetworkPeeringsRequest([ + 'uuid' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'networkUuidLocal' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'networkUuidPeer' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ]), +); +``` + +#### Parameters + +**$uuid:** `?string` β€” Filter by network peering UUID. + +**$networkUuidLocal:** `?string` β€” Filter by local network uuid. + +**$networkUuidPeer:** `?string` β€” Filter by peer network uuid. + +**$label:** `?string` β€” Label filter in the form key=value. Can be specified multiple times to filter by multiple labels. + +
+ +
+$client->networkPeering->createNetworkPeering($request) -> NetworkPeering + +#### Description + +Creates a new network peering between two networks. + +#### Usage + +```php +$client->networkPeering->createNetworkPeering( + new NetworkPeeringCreate([ + 'configuredStatus' => NetworkPeeringCreateConfiguredStatus::Active->value, + 'name' => 'Peering A->B', + 'network' => new NetworkPeeringCreateNetwork([ + 'uuid' => '03126dc1-a69f-4bc2-8b24-e31c22d64712', + ]), + 'peerNetwork' => new NetworkPeeringCreatePeerNetwork([ + 'uuid' => '03585987-bf7d-4544-8e9b-5a1b4d74a333', + ]), + ]), +); +``` + +#### Parameters + +**$configuredStatus:** `?string` + +**$name:** `string` + +**$network:** `NetworkPeeringCreateNetwork` β€” Describes the local side of the peering + +**$peerNetwork:** `NetworkPeeringCreatePeerNetwork` β€” Describes the peer side of the peering + +
+ +
+$client->networkPeering->getNetworkPeering($peeringUuid) -> NetworkPeering + +#### Description + +Retrieves information about a specific network peering. + +#### Usage + +```php +$client->networkPeering->getNetworkPeering( + 'peering_uuid', +); +``` + +#### Parameters + +**$peeringUuid:** `string` β€” The network peering identifier. + +
+ +
+$client->networkPeering->deleteNetworkPeering($peeringUuid) + +#### Description + +Deletes a specific network peering. + +#### Usage + +```php +$client->networkPeering->deleteNetworkPeering( + 'peering_uuid', +); +``` + +#### Parameters + +**$peeringUuid:** `string` β€” The network peering identifier. + +
+ +
+$client->networkPeering->modifyNetworkPeering($peeringUuid, $request) -> NetworkPeering + +#### Description + +Modifies attributes of an existing network peering. + +#### Usage + +```php +$client->networkPeering->modifyNetworkPeering( + 'peering_uuid', + new NetworkPeeringModify([ + 'configuredStatus' => NetworkPeeringModifyConfiguredStatus::Disabled->value, + 'name' => 'Peering A->B modified', + ]), +); +``` + +#### Parameters + +**$peeringUuid:** `string` β€” The network peering identifier. + +**$configuredStatus:** `?string` + +**$name:** `?string` + +
+ +## network +{:#networkAnchor} + +
+$client->network->listNetworks($request) -> Networks + +#### Description + +Retrieves a list of networks. + +#### Usage + +```php +$client->network->listNetworks( + new ListNetworksRequest([]), +); +``` + +#### Parameters + +**$label:** `?NetworkLabel` β€” Filter networks by labels. + +
+ +
+$client->network->listNetworkInterfaces() -> NetworkInterfaces + +#### Description + +Retrieves a list of network interfaces. + +#### Usage + +```php +$client->network->listNetworkInterfaces(); +``` + +
+ +
+$client->network->createNetworkInterface($request) -> NetworkInterface + +#### Description + +Creates a new network interface. + +#### Usage + +```php +$client->network->createNetworkInterface( + new NetworkCreateInterfaceRequest([]), +); +``` + +#### Parameters + +**$mainAccountId:** `?int` + +**$interface_:** `?NetworkCreateInterfaceRequestInterface` + +
+ +
+$client->network->getNetworkInterfaceDetails($uuid) -> Network + +#### Description + +Retrieves details of a specific network interface. + +#### Usage + +```php +$client->network->getNetworkInterfaceDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` + +
+ +
+$client->network->deleteNetworkInterface($uuid) + +#### Description + +Deletes a specific network interface. + +#### Usage + +```php +$client->network->deleteNetworkInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` + +
+ +## partner +{:#partnerAnchor} + +
+$client->partner->listPartnerAccounts() -> array + +#### Description + +Returns list of accounts associated with the partner. + +#### Usage + +```php +$client->partner->listPartnerAccounts(); +``` + +
+ +
+$client->partner->createPartnerAccount($request) -> PartnerAccount + +#### Description + +Creates new UpCloud account that will be linked to partner's existing invoicing. + +#### Usage + +```php +$client->partner->createPartnerAccount( + new PartnerCreateAccount([ + 'username' => 'newuser', + 'password' => 'superSecret123', + ]), +); +``` + +#### Parameters + +**$username:** `string` + +**$password:** `string` + +**$contactDetails:** `?PartnerCreateAccountContactDetails` + +
+ +## permission +{:#permissionAnchor} + +
+$client->permission->listPermissions() -> Permissions + +#### Description + +Retrieves a list of permissions for sub-accounts to access resources owned by the main account. + +#### Usage + +```php +$client->permission->listPermissions(); +``` + +
+ +
+$client->permission->replacePermissions($request) -> Permissions + +#### Description + +Replaces the entire set of permissions for sub-accounts to access resources owned by the main account. + +#### Usage + +```php +$client->permission->replacePermissions( + new Permission([]), +); +``` + +#### Parameters + +**$request:** `Permission` + +
+ +
+$client->permission->grantPermission($request) -> Permission + +#### Description + +Grants a permission for a sub-account to access a resource owned by the main account. + +#### Usage + +```php +$client->permission->grantPermission( + new GrantPermissionRequest([ + 'body' => new Permission([]), + ]), +); +``` + +#### Parameters + +**$skipTargetCheck:** `?bool` β€” If true, skips the check whether the target resource exists. Default is false. + +**$request:** `Permission` + +
+ +
+$client->permission->revokePermission($request) + +#### Description + +Revokes a permission for a sub-account to access a resource owned by the main account. + +#### Usage + +```php +$client->permission->revokePermission( + new Permission([]), +); +``` + +#### Parameters + +**$request:** `Permission` + +
+ +
+$client->permission->revokeAllPermissionsByTarget($targetType, $targetIdentifier, $request) + +#### Description + +Revokes all permissions for sub-accounts to access a specific resource owned by the main account. + +#### Usage + +```php +$client->permission->revokeAllPermissionsByTarget( + 'target_type', + 'target_identifier', + new RevokeAllPermissionsByTargetRequest([]), +); +``` + +#### Parameters + +**$targetType:** `string` β€” The type of the target resource (e.g., "server", "storage"). + +**$targetIdentifier:** `string` β€” The identifier of the target resource. + +**$mainAccountId:** `?int` β€” If specified, revokes permissions for resources owned by the specified main account ID. Default is the current main account. + +
+ +
+$client->permission->revokeAllPermissionsByUser($user) + +#### Description + +Revokes all permissions for a specific sub-account to access any resources owned by the main account. + +#### Usage + +```php +$client->permission->revokeAllPermissionsByUser( + 'user', +); +``` + +#### Parameters + +**$user:** `string` β€” The username of the sub-account. + +
+ +## plan +{:#planAnchor} + +
+$client->plan->listPlans() -> Plan + +#### Description + +Returns a list of available plans. + +#### Usage + +```php +$client->plan->listPlans(); +``` + +
+ +## price +{:#priceAnchor} + +
+$client->price->getPrice() -> Prices + +#### Description + +Returns a price list. + +#### Usage + +```php +$client->price->getPrice(); +``` + +
+ +## server-group +{:#server-groupAnchor} + +
+$client->serverGroup->listServerGroups($request) -> ServerGroups + +#### Description + +Retrieves a list of server groups. + +#### Usage + +```php +$client->serverGroup->listServerGroups( + new ListServerGroupsRequest([]), +); +``` + +#### Parameters + +**$label:** `?ServerGroupLabel` β€” A label filter to apply. Format: key:value. Multiple labels can be specified by repeating the parameter. + +
+ +
+$client->serverGroup->createServerGroup($request) -> ServerGroup + +#### Description + +Creates a new server group. + +#### Usage + +```php +$client->serverGroup->createServerGroup( + new ServerGroupModify([ + 'serverGroup' => new ServerGroupModifyServerGroup([]), + ]), +); +``` + +#### Parameters + +**$request:** `ServerGroupModify` + +
+ +
+$client->serverGroup->getServerGroup($uuid) -> ServerGroup + +#### Description + +Retrieves details of a specific server group. + +#### Usage + +```php +$client->serverGroup->getServerGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group to retrieve. + +
+ +
+$client->serverGroup->deleteServerGroup($uuid) + +#### Description + +Deletes a specific server group. + +#### Usage + +```php +$client->serverGroup->deleteServerGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group to delete. + +
+ +
+$client->serverGroup->modifyServerGroup($uuid, $request) -> ServerGroup + +#### Description + +Modifies an existing server group. + +#### Usage + +```php +$client->serverGroup->modifyServerGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyServerGroupRequest([ + 'body' => new ServerGroupModify([ + 'serverGroup' => new ServerGroupModifyServerGroup([]), + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group to modify. + +**$request:** `ServerGroupModify` + +
+ +
+$client->serverGroup->listServerGroupMembers($uuid) -> ServerGroupServers + +#### Description + +Retrieves a list of servers that are members of a specific server group. + +#### Usage + +```php +$client->serverGroup->listServerGroupMembers( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group whose members are to be listed. + +
+ +
+$client->serverGroup->addServerToGroup($uuid, $request) + +#### Description + +Adds a server to a specific server group. + +#### Usage + +```php +$client->serverGroup->addServerToGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerGroupServerAdd([ + 'server' => new ServerGroupServerAddServer([ + 'uuid' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group to which the server will be added. + +**$server:** `ServerGroupServerAddServer` + +
+ +
+$client->serverGroup->removeServerFromGroup($uuid, $serverUuid) + +#### Description + +Removes a server from a specific server group. + +#### Usage + +```php +$client->serverGroup->removeServerFromGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” The UUID of the server group from which the server will be removed. + +**$serverUuid:** `string` β€” The UUID of the server to remove from the group. + +
+ +## server +{:#serverAnchor} + +
+$client->server->createServer($request) -> CreateServerResponse + +#### Description + +Creates a new server + +#### Usage + +```php +$client->server->createServer( + new CreateServer([ + 'server' => new CreateServerServer([ + 'hostname' => 'my-server.example.com', + 'storageDevices' => new ServerStorageDevices([ + 'storageDevice' => [ + new ServerStorageDevicesStorageDeviceItem([ + 'action' => 'clone', + 'storage' => '01234567-89ab-cdef-0123-456789abcdef', + 'title' => 'Operating System', + ]), + ], + ]), + 'title' => 'My Server', + 'zone' => 'fi-hel1', + ]), + ]), +); +``` + +#### Parameters + +**$server:** `CreateServerServer` + +
+ +
+$client->server->modifyServer($request) -> Server + +#### Description + +Modifies an existing server + +#### Usage + +```php +$client->server->modifyServer( + new Server([ + 'server' => new ServerDetails([ + 'created' => 1705320000, + 'bootOrder' => 'cdrom,disk', + 'coreNumber' => 2, + 'hostname' => 'example1', + 'license' => 0, + 'memoryAmount' => 2048, + 'osType' => ServerOsType::Ubuntu->value, + 'plan' => '2xCPU-2GB', + 'planIpv4Bytes' => 0, + 'planIpv6Bytes' => 0, + 'state' => ServerState::Started->value, + 'timezone' => 'UTC', + 'title' => 'First example server', + 'uuid' => '007bf7bd-e3cf-4a10-bf01-4251dc7f3b65', + 'zone' => 'fi-hel1', + ]), + ]), +); +``` + +#### Parameters + +**$request:** `Server` + +
+ +## server_size +{:#server_sizeAnchor} + +
+$client->serverSize->listServerSizes() -> ServerSizes + +#### Description + +Retrieves a list of available server sizes (combinations of memory and CPU cores). + +#### Usage + +```php +$client->serverSize->listServerSizes(); +``` + +
+ +
+$client->serverSize->getServerSizeLimits() -> ServerSizeLimits + +#### Description + +Retrieves the minimum and maximum limits for server sizes, including any zone-specific limits for private zones. + +#### Usage + +```php +$client->serverSize->getServerSizeLimits(); +``` + +
+ +## storage +{:#storageAnchor} + +
+$client->storage->getStorageList($request) -> Storages + +#### Description + +Returns a list of storage devices. Supports filtering by type, access level, and labels, as well as sorting and pagination + +#### Usage + +```php +$client->storage->getStorageList( + new GetStorageListRequest([ + 'label' => 'environment=production', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$type:** `?string` β€” Filter by storage type + +**$access:** `?string` β€” Filter by access level (public or private) + +**$label:** `?string` β€” Filter by labels. Can be specified multiple times. + +**$sortBy:** `?string` β€” Sort results by the specified field + +**$orderBy:** `?string` β€” Sort order (ascending or descending). Only valid when sort_by is also specified. + +**$limit:** `?int` β€” Maximum number of storages to return per page + +**$offset:** `?int` β€” Number of storages to skip before starting to return results + +**$allowHidden:** `?string` β€” Include hidden storages in the response + +**$favorite:** `?string` β€” Filter storages by favorite status + +**$metadata:** `?string` β€” Whether to include metadata in the response + +**$servers:** `?string` β€” Whether to include server information in the response + +
+ +
+$client->storage->createStorage($request) -> CreateStorageResponse + +#### Description + +Create new storage + +#### Usage + +```php +$client->storage->createStorage( + new CreateStorageRequest([ + 'storage' => new CreateStorageRequestStorage([]), + ]), +); +``` + +#### Parameters + +**$storage:** `CreateStorageRequestStorage` + +
+ +
+$client->storage->createCdromStorage($request) -> CreateStorageResponse + +#### Description + +Create new CD-ROM storage + +#### Usage + +```php +$client->storage->createCdromStorage( + new StorageCreateCdromRequest([ + 'createCdrom' => new StorageCreateCdromRequestCreateCdrom([]), + ]), +); +``` + +#### Parameters + +**$createCdrom:** `StorageCreateCdromRequestCreateCdrom` + +
+ +
+$client->storage->getFavoriteStorageList() -> Storages + +#### Description + +List favorite storages + +#### Usage + +```php +$client->storage->getFavoriteStorageList(); +``` + +
+ +
+$client->storage->getStorageInfo($uuid) -> Storage + +#### Description + +Get storage details + +#### Usage + +```php +$client->storage->getStorageInfo( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage UUID + +
+ +
+$client->storage->modifyStorage($uuid, $request) -> mixed + +#### Description + +Modify storage + +#### Usage + +```php +$client->storage->modifyStorage( + 'uuid', + new ModifyStorageRequest([ + 'body' => [ + 'key' => "value", + ], + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage UUID + +**$request:** `mixed` + +
+ +
+$client->storage->deleteStorage($uuid, $request) + +#### Description + +Delete storage + +#### Usage + +```php +$client->storage->deleteStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new DeleteStorageRequest([]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage UUID + +**$backups:** `?string` β€” Policy for handling backups when deleting a storage. Allowed values: keep, delete, keep_latest + +
+ +
+$client->storage->addStorageComponent($uuid, $request) + +#### Description + +Add storage component + +#### Usage + +```php +$client->storage->addStorageComponent( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new AddStorageComponentRequest([ + 'storage' => new AddStorageComponentRequestStorage([]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage UUID + +**$storage:** `AddStorageComponentRequestStorage` + +
+ +
+$client->storage->attachStorageToServer($uuid, $request) + +#### Description + +Attach storage to server + +#### Usage + +```php +$client->storage->attachStorageToServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new AttachStorage([ + 'storageDevice' => new AttachStorageStorageDevice([]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage UUID + +**$storageDevice:** `AttachStorageStorageDevice` + +
+ +
+$client->storage->createOnDemandBackup($uuid, $request) -> CreateStorageResponse + +#### Description + +Create on-demand backup + +#### Usage + +```php +$client->storage->createOnDemandBackup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CreateStorageBackupRequest([ + 'interval' => 'interval', + 'retention' => 'retention', + 'time' => 'time', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage UUID + +**$interval:** `string` + +**$retention:** `string` + +**$time:** `string` + +
+ +
+$client->storage->cancelStorageOperation($uuid) + +#### Description + +Cancel storage operation + +#### Usage + +```php +$client->storage->cancelStorageOperation( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage UUID + +
+ +
+$client->storage->cloneStorage($uuid, $request) -> CreateStorageResponse + +#### Description + +Clone storage + +#### Usage + +```php +$client->storage->cloneStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CloneStorageRequest([ + 'storage' => new CloneStorageRequestStorage([ + 'tier' => 'tier', + 'title' => 'title', + 'zone' => 'fi-hel1', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage UUID + +**$storage:** `CloneStorageRequestStorage` + +
+ +
+$client->storage->detachStorageFromServer($uuid) + +#### Description + +Detach storage from server + +#### Usage + +```php +$client->storage->detachStorageFromServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage UUID + +
+ +
+$client->storage->addStorageToFavorites($uuid) + +#### Description + +Add storage to favorites + +#### Usage + +```php +$client->storage->addStorageToFavorites( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage UUID + +
+ +
+$client->storage->removeStorageFromFavorites($uuid) + +#### Description + +Remove storage from favorites + +#### Usage + +```php +$client->storage->removeStorageFromFavorites( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage UUID + +
+ +
+$client->storage->resizeStorage($uuid) -> mixed + +#### Description + +Resize storage + +#### Usage + +```php +$client->storage->resizeStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage UUID + +
+ +
+$client->storage->restoreStorageFromBackup($uuid) + +#### Description + +Restore storage from backup + +#### Usage + +```php +$client->storage->restoreStorageFromBackup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage UUID + +
+ +
+$client->storage->createTemplateFromStorage($uuid, $request) -> CreateStorageResponse + +#### Description + +Create template from storage + +#### Usage + +```php +$client->storage->createTemplateFromStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CreateStorageTemplateRequest([ + 'storage' => new CreateStorageTemplateRequestStorage([ + 'title' => 'My Template', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage UUID + +**$storage:** `CreateStorageTemplateRequestStorage` + +
+ +
+$client->storage->updatePublicTemplateFromSource($uuid, $request) + +#### Description + +Update public template from source + +#### Usage + +```php +$client->storage->updatePublicTemplateFromSource( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new StorageUpdateTemplateRequest([ + 'updateTemplate' => new StorageUpdateTemplateRequestUpdateTemplate([]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Storage UUID + +**$updateTemplate:** `StorageUpdateTemplateRequestUpdateTemplate` + +
+ +## tag +{:#tagAnchor} + +
+$client->tag->listTags() -> Tags + +#### Description + +Returns all existing tags with their properties and servers tagged. + +#### Usage + +```php +$client->tag->listTags(); +``` + +
+ +
+$client->tag->createTag($request) -> Tag + +#### Description + +Creates a new tag. Existing servers can be tagged in same request. + +#### Usage + +```php +$client->tag->createTag( + new Tag([ + 'tag' => new TagTag([ + 'name' => 'DEV', + 'servers' => new TagServers([]), + ]), + ]), +); +``` + +#### Parameters + +**$request:** `Tag` + +
+ +
+$client->tag->getTag($name) -> Tag + +#### Description + +Returns details for a specific tag. + +#### Usage + +```php +$client->tag->getTag( + 'DEV', +); +``` + +#### Parameters + +**$name:** `string` β€” Tag name + +
+ +
+$client->tag->modifyTag($name, $request) -> Tag + +#### Description + +Changes attributes of an existing tag + +#### Usage + +```php +$client->tag->modifyTag( + 'DEV', + new ModifyTagRequest([ + 'body' => new Tag([ + 'tag' => new TagTag([ + 'name' => 'DEV', + 'servers' => new TagServers([]), + ]), + ]), + ]), +); +``` + +#### Parameters + +**$name:** `string` β€” Tag name + +**$request:** `Tag` + +
+ +
+$client->tag->deleteTag($name) + +#### Description + +Deletes a specific tag. + +#### Usage + +```php +$client->tag->deleteTag( + 'DEV', +); +``` + +#### Parameters + +**$name:** `string` β€” Tag name + +
+ +## timezone +{:#timezoneAnchor} + +
+$client->timezone->listTimezones() -> Timezones + +#### Description + +Retrieves a list of supported timezones. + +#### Usage + +```php +$client->timezone->listTimezones(); +``` + +
+ +## account-tokens +{:#account-tokensAnchor} + +
+$client->accountTokens->listTokens($request) -> array + +#### Description + +List all tokens for the currently authorized account. +The tokens are returned in a paged format, with the default page size being 20. +The maximum page size is 100. + +#### Usage + +```php +$client->accountTokens->listTokens( + new ListTokensRequest([ + 'gui' => true, + 'sort' => '+name,-created_at', + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” How many tokens to return at per page + +**$offset:** `?int` β€” Offset to start listing the tokens from + +**$gui:** `?bool` β€” Filter tokens based on GUI flag (true or false). Default is no value, i.e. no filtering and all tokens are returned. + +**$sort:** `?string` β€” Comma-separated list of fields to sort by. Prefix with '+' for ascending or '-' for descending order. Supported fields: created_at, expires_at, last_used_at, name. Example: sort=+name,-created_at. If no prefix is given, descending is assumed. Follows OpenAPI collectionFormat 'csv'. + +
+ +
+$client->accountTokens->createToken($request) -> AccountTokensToken + +#### Description + +Create a new API token. Maximum token validity is 24*365h=8760h (~1 year). +Attribute allowed_ip_prefixes allows defining a list of CIDR/IP addresses from where the token is accepted. +Empty list denies access from everywhere. If unset, the default list will be the IP filters of the account. If no IP filters are defined for the account either, the default will be ["0.0.0.0/0", "::0/0"], i.e. allow from any address. + +#### Usage + +```php +$client->accountTokens->createToken( + new AccountTokensCreateTokenRequestExpiresIn([]), +); +``` + +#### Parameters + +**$request:** `AccountTokensCreateTokenRequestExpiresIn|AccountTokensCreateTokenRequestExpiresAt` + +
+ +
+$client->accountTokens->getToken($tokenUuid) -> AccountTokensGetTokenResponse + +#### Description + +Get the details of a specific token. + +#### Usage + +```php +$client->accountTokens->getToken( + 'token-uuid', +); +``` + +#### Parameters + +**$tokenUuid:** `string` β€” The uuid of the token to get + +
+ +
+$client->accountTokens->revokeToken($tokenUuid) + +#### Description + +Delete a specific token. + +#### Usage + +```php +$client->accountTokens->revokeToken( + 'token-uuid', +); +``` + +#### Parameters + +**$tokenUuid:** `string` β€” The uuid of the token to delete + +
+ +## object-storage-2 +{:#object-storage-2Anchor} + +
+$client->objectStorage2->listObjectStorages($request) -> array + +#### Description + +Returns a list of object storage services. + +#### Usage + +```php +$client->objectStorage2->listObjectStorages( + new ListObjectStoragesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->objectStorage2->createObjectStorage($request) -> ObjectStorage2ServiceDetailResponse + +#### Description + +Creates a new object storage service. + +#### Usage + +```php +$client->objectStorage2->createObjectStorage( + new ObjectStorage2ServiceCreate([ + 'name' => 'example-service', + 'region' => 'example', + 'configuredStatus' => ObjectStorage2PropertyConfiguredStatus::Started->value, + 'networks' => [ + new ObjectStorage2NetworkCreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2NetworkType::Public_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + new ObjectStorage2NetworkCreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2NetworkType::Private_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ], + ]), +); +``` + +#### Parameters + +**$name:** `string` + +**$region:** `string` + +**$configuredStatus:** `string` + +**$networks:** `?array` β€” Networks to attach to the service. Private networks must reside in the same region as the object storage. + +**$customDomains:** `?array` β€” Custom domains to attach to the service. + +**$labels:** `?array` β€” Labels for classifying the service. + +**$properties:** `?ObjectStorage2PropertiesCreate` + +**$terminationProtection:** `?bool` β€” Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first. + +
+ +
+$client->objectStorage2->getObjectStorage($serviceUuid) -> ObjectStorage2ServiceDetailResponse + +#### Description + +Returns object storage service details by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->replaceObjectStorage($serviceUuid, $request) -> ObjectStorage2ServiceDetailResponse + +#### Description + +Replaces existing object storage service by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->replaceObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2ServiceReplace([ + 'name' => 'example-service', + 'configuredStatus' => ObjectStorage2PropertyConfiguredStatus::Started->value, + 'networks' => [ + new ObjectStorage2NetworkCreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2NetworkType::Public_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + new ObjectStorage2NetworkCreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2NetworkType::Private_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ], + 'labels' => [ + new ObjectStorage2LabelCreate([ + 'key' => 'example-label-key', + 'value' => 'example-label-value', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” The name of the service. + +**$configuredStatus:** `string` + +**$terminationProtection:** `?bool` β€” Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first. + +**$networks:** `?array` + +**$customDomains:** `?array` + +**$staticWebsites:** `?array` β€” Static website configurations for this service. Array replaces all existing configurations. + +**$labels:** `?array` + +**$properties:** `?ObjectStorage2PropertiesCreate` + +
+ +
+$client->objectStorage2->deleteObjectStorage($serviceUuid, $request) + +#### Description + +Deletes existing object storage service by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', + new DeleteObjectStorageRequest([ + 'force' => true, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$force:** `?bool` β€” If the parameter is provided, the deletion process starts even if the service is not empty. + +
+ +
+$client->objectStorage2->modifyObjectStorage($serviceUuid, $request) -> ObjectStorage2ServiceDetailResponse + +#### Description + +Modifies existing object storage service by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->modifyObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2ServiceModify([ + 'name' => 'example-service', + 'configuredStatus' => ObjectStorage2PropertyConfiguredStatus::Started->value, + 'networks' => [ + new ObjectStorage2NetworkCreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2NetworkType::Private_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `?string` + +**$configuredStatus:** `?string` + +**$networks:** `?array` + +**$customDomains:** `?array` + +**$staticWebsites:** `?array` β€” Static website configurations for this service. Array replaces all existing configurations. + +**$labels:** `?array` + +**$properties:** `?ObjectStorage2PropertiesCreate` + +**$terminationProtection:** `?bool` β€” Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first. + +
+ +
+$client->objectStorage2->listObjectStorageNetworks($serviceUuid) -> array + +#### Description + +Returns a list of available service networks by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageNetworks( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageNetwork($serviceUuid, $request) -> ObjectStorage2NetworkDetailResponse + +#### Description + +Creates a new service network by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateObjectStorageNetworkRequest([ + 'body' => new ObjectStorage2NetworkCreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2NetworkType::Public_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `ObjectStorage2NetworkCreate` + +
+ +
+$client->objectStorage2->getObjectStorageNetwork($serviceUuid, $networkName) -> ObjectStorage2NetworkDetailResponse + +#### Description + +Returns service network details by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +
+ +
+$client->objectStorage2->deleteObjectStorageNetwork($serviceUuid, $networkName) + +#### Description + +Deletes existing network by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +
+ +
+$client->objectStorage2->listObjectStorageCustomDomains($serviceUuid) -> array + +#### Description + +Returns a list of custom domains attached to a service by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageCustomDomains( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->attachObjectStorageCustomDomain($serviceUuid, $request) -> ObjectStorage2CustomDomainDetailResponse + +#### Description + +Attaches a new custom domain to the service identified by {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->attachObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + new AttachObjectStorageCustomDomainRequest([ + 'body' => new ObjectStorage2CustomDomainCreate([ + 'type' => ObjectStorage2CustomDomainCreateType::Public_->value, + 'domainName' => 'example.com', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `ObjectStorage2CustomDomainCreate` + +
+ +
+$client->objectStorage2->getObjectStorageCustomDomain($serviceUuid, $customDomainName) -> ObjectStorage2CustomDomainDetailResponse + +#### Description + +Returns custom domain details by given {service_uuid} and {domain_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +
+ +
+$client->objectStorage2->deleteObjectStorageCustomDomain($serviceUuid, $customDomainName) + +#### Description + +Deletes existing custom domain by given {service_uuid} and {domain_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +
+ +
+$client->objectStorage2->modifyObjectStorageCustomDomain($serviceUuid, $customDomainName, $request) -> ObjectStorage2CustomDomainDetailResponse + +#### Description + +Modifies existing custom domain by given {service_uuid} and {domain_name}. + +#### Usage + +```php +$client->objectStorage2->modifyObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', + new ObjectStorage2CustomDomainModify([ + 'type' => ObjectStorage2CustomDomainModifyType::Public_->value, + 'domainName' => 'example.com', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +**$type:** `?string` β€” Type of the custom domain. + +**$domainName:** `?string` β€” New modified custom domain. Supports both apex domains (example.com) and subdomains (objects.example.com). + +
+ +
+$client->objectStorage2->listObjectStorageRegions() -> array + +#### Description + +Returns a list of available managed object storage regions. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageRegions(); +``` + +
+ +
+$client->objectStorage2->getObjectStorageRegion($regionName) -> ObjectStorage2RegionDetailResponse + +#### Description + +Returns object storage region details by given {name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageRegion( + 'my-object-storage', +); +``` + +#### Parameters + +**$regionName:** `string` β€” The name of the region. + +
+ +
+$client->objectStorage2->getObjectStorageMetrics($serviceUuid) -> ObjectStorage2MetricsUsageResponse + +#### Description + +Returns object storage metrics by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageMetrics( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->listObjectStorageBucketMetrics($serviceUuid, $request) -> array + +#### Description + +Returns metrics for buckets within a service. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageBucketMetrics( + '01234567-89ab-cdef-0123-456789abcdef', + new ListObjectStorageBucketMetricsRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +
+ +
+$client->objectStorage2->createObjectStorageBucket($serviceUuid, $request) -> ObjectStorage2BucketDetailResponse + +#### Description + +Creates a new service bucket by the given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageBucket( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2BucketCreate([ + 'name' => 'my-bucket-1', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” Must be unique within the service, and should contain only alphanumeric, .,- and _. + +
+ +
+$client->objectStorage2->deleteObjectStorageBucket($serviceUuid, $bucketName) + +#### Description + +Deletes an existing bucket by given {service_uuid} and {bucket_name}. This API call will remove all objects from the bucket permanently and cannot be reversed. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageBucket( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$bucketName:** `string` β€” The name of the bucket. + +
+ +
+$client->objectStorage2->listObjectStorageMetricsSeries($serviceUuid, $request) -> array + +#### Description + +Returns Object Storage instance metrics series by a given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + new ListObjectStorageMetricsSeriesRequest([ + 'from' => new DateTime('2024-01-01T00:00:00Z'), + 'to' => new DateTime('2024-01-01T00:00:00Z'), + 'interval' => '1h', + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$from:** `?DateTime` β€” Beginning of the time range for which to return metrics. + +**$to:** `?DateTime` β€” End of the time range for which to return metrics. + +**$interval:** `?string` β€” Metrics aggregation interval. + +**$sort:** `?string` β€” Order of returned results. + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +
+ +
+$client->objectStorage2->listObjectStorageLabels($serviceUuid) -> array + +#### Description + +Returns a list of available service labels by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageLabel($serviceUuid, $request) -> ObjectStorage2LabelDetailResponse + +#### Description + +Creates a new label by given {service_uuid}. Labels are used for service filtering. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateObjectStorageLabelRequest([ + 'body' => new ObjectStorage2LabelCreate([ + 'key' => 'foo', + 'value' => 'bar', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `ObjectStorage2LabelCreate` + +
+ +
+$client->objectStorage2->getObjectStorageLabel($serviceUuid, $labelKey) -> ObjectStorage2LabelDetailResponse + +#### Description + +Returns label details by given {service_uuid} and {key}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->objectStorage2->deleteObjectStorageLabel($serviceUuid, $labelKey) + +#### Description + +Deletes existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->objectStorage2->modifyObjectStorageLabel($serviceUuid, $labelKey, $request) -> ObjectStorage2LabelDetailResponse + +#### Description + +Modifies existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->objectStorage2->modifyObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + new ObjectStorage2LabelModify([ + 'key' => 'foo', + 'value' => 'bar', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +**$key:** `?string` + +**$value:** `?string` + +
+ +
+$client->objectStorage2->listObjectStorageStaticWebsites($serviceUuid) + +#### Description + +Returns all static website configurations for a service along with available domains. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageStaticWebsites( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageStaticWebsite($serviceUuid, $request) -> ObjectStorage2StaticWebsiteConfig + +#### Description + +Creates a new static website hosting configuration for a domain. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateObjectStorageStaticWebsiteRequest([ + 'body' => new ObjectStorage2StaticWebsiteConfigCreate([ + 'bucketName' => 'my-website', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `ObjectStorage2StaticWebsiteConfigCreate` + +
+ +
+$client->objectStorage2->getObjectStorageStaticWebsite($serviceUuid, $customDomainName) -> ObjectStorage2StaticWebsiteConfig + +#### Description + +Returns a static website configuration for a specific domain. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +
+ +
+$client->objectStorage2->deleteObjectStorageStaticWebsite($serviceUuid, $customDomainName) + +#### Description + +Deletes a static website configuration. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +
+ +
+$client->objectStorage2->modifyObjectStorageStaticWebsite($serviceUuid, $customDomainName, $request) -> ObjectStorage2StaticWebsiteConfig + +#### Description + +Updates an existing static website configuration. + +#### Usage + +```php +$client->objectStorage2->modifyObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', + new ObjectStorage2StaticWebsiteConfigModify([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$customDomainName:** `string` β€” The domain name. + +**$bucketName:** `?string` β€” Name of the S3/ECS bucket containing the website content. Only alphanumerics, dots, hyphens, and underscores are allowed. + +**$bucketPrefix:** `?string` β€” Optional prefix/subfolder within the bucket. Only alphanumerics, slashes, dots, hyphens, and underscores are allowed. + +**$indexDocument:** `?string` β€” Default document for directories. Only alphanumerics, slashes, dots, hyphens, and underscores are allowed. + +**$spaMode:** `?bool` β€” Enable Single Page Application (SPA) mode. When enabled, all non-file routes serve the index document, allowing client-side routing to handle the URL. Essential for React, Vue, Next.js, and similar frameworks. + +**$enabled:** `?bool` β€” Whether the static website configuration should be active + +**$errorPages:** `?array` β€” Custom error page configurations for specific HTTP status codes or ranges. Replaces the entire set when provided. + +
+ +
+$client->objectStorage2->listObjectStorageDomains($serviceUuid) -> ObjectStorage2ServiceDomains + +#### Description + +Returns all domains associated with this service (public endpoint, private endpoint, custom domains) along with their static website hosting status. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageDomains( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->listObjectStorageUsers($serviceUuid) -> array + +#### Description + +Returns a list of available service users by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageUsers( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageUser($serviceUuid, $request) -> ObjectStorage2UserDetailResponse + +#### Description + +Creates a new service user by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageUser( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2UserCreate([ + 'username' => 'example_user', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user to create. + +
+ +
+$client->objectStorage2->getObjectStorageUser($serviceUuid, $username) -> ObjectStorage2UserDetailResponse + +#### Description + +Returns service user details by given {service_uuid} and {username}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->deleteObjectStorageUser($serviceUuid, $username) + +#### Description + +Deletes existing user by given {service_uuid} and {username}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->listObjectStorageAccessKeys($serviceUuid, $username) -> array + +#### Description + +Returns a list of available access keys for a user. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageAccessKeys( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->createObjectStorageAccessKey($serviceUuid, $username) -> ObjectStorage2CreateAccessKeyResponse + +#### Description + +Creates a new access key by given {service_uuid} and {username}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageAccessKey( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->getObjectStorageAccessKeyDetails($serviceUuid, $username, $accessKeyId) -> ObjectStorage2AccessKeyDetailResponse + +#### Description + +Returns access key details by given {service_uuid}, {username}, and {access-key-id}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageAccessKeyDetails( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$accessKeyId:** `string` β€” The ID of the access key. + +
+ +
+$client->objectStorage2->deleteObjectStorageAccessKey($serviceUuid, $username, $accessKeyId) + +#### Description + +Deletes existing access key by given {service_uuid}, {username}, and {access-key-id}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageAccessKey( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$accessKeyId:** `string` β€” The ID of the access key. + +
+ +
+$client->objectStorage2->modifyObjectStorageAccessKeyDetails($serviceUuid, $username, $accessKeyId, $request) -> ObjectStorage2AccessKeyDetailResponse + +#### Description + +Modifies access key details. + +#### Usage + +```php +$client->objectStorage2->modifyObjectStorageAccessKeyDetails( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', + new ObjectStorage2AccessKeyModify([ + 'status' => ObjectStorage2AccessKeyModifyStatus::Inactive->value, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$accessKeyId:** `string` β€” The ID of the access key. + +**$status:** `?string` β€” Indicates if the key is active or inactive. + +
+ +
+$client->objectStorage2->listObjectStorageAttachedUserPolicies($serviceUuid, $username) -> array + +#### Description + +Returns a list of attached user policies for a user. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageAttachedUserPolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->attachObjectStorageUserPolicy($serviceUuid, $username, $request) + +#### Description + +Attach a policy to a user. + +#### Usage + +```php +$client->objectStorage2->attachObjectStorageUserPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachObjectStorageUserPolicyRequest([ + 'body' => new ObjectStorage2PolicyAttachmentCreate([ + 'name' => 'test-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$request:** `ObjectStorage2PolicyAttachmentCreate` + +
+ +
+$client->objectStorage2->detachObjectStorageUserPolicy($serviceUuid, $username, $nestedName) + +#### Description + +Detach a policy from a user. + +#### Usage + +```php +$client->objectStorage2->detachObjectStorageUserPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$nestedName:** `string` β€” The name of the policy to detach. + +
+ +
+$client->objectStorage2->getObjectStorageUserInlinePolicy($serviceUuid, $username, $userPolicyName) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Get the user inline policy by the given {service_uuid}, {username} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$userPolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->deleteObjectStorageUserInlinePolicy($serviceUuid, $username, $userPolicyName) + +#### Description + +Deletes the user inline policy by the given {service_uuid}, {username}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$userPolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->listObjectStorageUserInlinePolicies($serviceUuid, $username) -> array + +#### Description + +Lists the user inline policies by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageUserInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->createObjectStorageUserInlinePolicy($serviceUuid, $username, $request) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Creates a user inline policy by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageUserInlinePolicyRequest([ + 'body' => new ObjectStorage2InlinePolicyCreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$request:** `ObjectStorage2InlinePolicyCreate` + +
+ +
+$client->objectStorage2->getObjectStorageUserTags($serviceUuid, $username) -> array + +#### Description + +Returns a user's tags by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageUserTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->replaceObjectStorageUserTags($serviceUuid, $username, $request) -> array + +#### Description + +Replaces a user's tags by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->replaceObjectStorageUserTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ReplaceObjectStorageUserTagsRequest([ + 'body' => [ + new ObjectStorage2TagListRequestItem([ + 'key' => 'environment', + 'value' => 'production', + ]), + new ObjectStorage2TagListRequestItem([ + 'key' => 'team', + 'value' => 'backend', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$request:** `array` + +
+ +
+$client->objectStorage2->deleteObjectStorageUserTag($serviceUuid, $username, $userTagKey) + +#### Description + +Deletes a user's tag by the given {service_uuid}, {username}, and {tag_key}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageUserTag( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$userTagKey:** `string` β€” The key of the user tag. + +
+ +
+$client->objectStorage2->createObjectStorageUserPermissionsBoundary($serviceUuid, $username, $request) -> ObjectStorage2PermissionsBoundaryResponse + +#### Description + +Creates a user's permissions boundary by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageUserPermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageUserPermissionsBoundaryRequest([ + 'body' => new ObjectStorage2PermissionsBoundaryCreate([ + 'policyName' => 'sample-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +**$request:** `ObjectStorage2PermissionsBoundaryCreate` + +
+ +
+$client->objectStorage2->deleteObjectStorageUserPermissionsBoundary($serviceUuid, $username) + +#### Description + +Deletes a user's permissions boundary by the given {service_uuid}, and {username}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageUserPermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->listObjectStoragePolicyVersions($serviceUuid, $policyName) -> array + +#### Description + +Lists policy versions given by {service_uuid}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->listObjectStoragePolicyVersions( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +
+ +
+$client->objectStorage2->createObjectStoragePolicyVersion($serviceUuid, $policyName, $request) -> ObjectStorage2PolicyVersionResponse + +#### Description + +Creates a policy version by the given {service_uuid}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->createObjectStoragePolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2PolicyVersionCreate([ + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":["*"],"Effect":"Deny","Resource":"*"}]}', + 'isDefault' => true, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +**$document:** `string` β€” A valid, URL-encoded policy document. + +**$isDefault:** `bool` β€” Set this version as the default. + +
+ +
+$client->objectStorage2->getObjectStoragePolicyVersion($serviceUuid, $policyName, $policyVersion) -> ObjectStorage2PolicyVersionResponse + +#### Description + +Get a single policy version by the given {service_uuid}, {policy_name}, and {policy_version}. + +#### Usage + +```php +$client->objectStorage2->getObjectStoragePolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'v1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +**$policyVersion:** `string` β€” The version identifier of the policy. + +
+ +
+$client->objectStorage2->deleteObjectStoragePolicyVersion($serviceUuid, $policyName, $policyVersion) + +#### Description + +Deletes a policy version by the given {service_uuid}, {policy_name}, and {policy_version}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStoragePolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'v1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +**$policyVersion:** `string` β€” The version identifier of the policy. + +
+ +
+$client->objectStorage2->getObjectStoragePolicy($serviceUuid, $policyName) -> ObjectStorage2PolicyDetailResponse + +#### Description + +Returns service policy details by given {service_uuid} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStoragePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +
+ +
+$client->objectStorage2->deleteObjectStoragePolicy($serviceUuid, $policyName) + +#### Description + +Deletes existing policy by given {service_uuid} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStoragePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +
+ +
+$client->objectStorage2->setObjectStorageDefaultPolicyVersion($serviceUuid, $policyName, $request) -> ObjectStorage2PolicyDetailResponse + +#### Description + +Sets the default version for a policy. Note: This is mapped from ModifyPolicyVersion handler. + +#### Usage + +```php +$client->objectStorage2->setObjectStorageDefaultPolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2PolicySetDefaultVersion([ + 'versionId' => 'v2', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$policyName:** `string` β€” The name of the policy. + +**$versionId:** `string` β€” The policy version ID to set as default. + +
+ +
+$client->objectStorage2->listObjectStoragePolicies($serviceUuid) -> array + +#### Description + +Returns a list of available service policies by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStoragePolicies( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStoragePolicy($serviceUuid, $request) -> ObjectStorage2PolicyDetailResponse + +#### Description + +Creates a new service policy by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->createObjectStoragePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2PolicyCreate([ + 'name' => 'example-policy', + 'description' => 'example-description', + 'document' => '%7B%22Version%22%3A%20%222012-10-17%22%2C%20%20%22Statement%22%3A%20%5B%7B%22Action%22%3A%20%5B%22iam%3AGetUser%22%5D%2C%20%22Resource%22%3A%20%22%2A%22%2C%20%22Effect%22%3A%20%22Allow%22%2C%20%22Sid%22%3A%20%22editor%22%7D%5D%7D', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” Unique name of the policy. + +**$description:** `?string` β€” The policy description. + +**$document:** `string` β€” A valid, URL-encoded policy document. + +
+ +
+$client->objectStorage2->listObjectStorageIamGroupPolicies($serviceUuid, $groupName) -> array + +#### Description + +Lists IAM policies attached to a group. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageIamGroupPolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +
+ +
+$client->objectStorage2->attachObjectStorageIamGroupPolicy($serviceUuid, $groupName, $request) + +#### Description + +Attaches a policy to a group. + +#### Usage + +```php +$client->objectStorage2->attachObjectStorageIamGroupPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachObjectStorageIamGroupPolicyRequest([ + 'body' => new ObjectStorage2PolicyAttachmentCreate([ + 'name' => 'test-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$request:** `ObjectStorage2PolicyAttachmentCreate` + +
+ +
+$client->objectStorage2->detachObjectStorageIamGroupPolicy($serviceUuid, $groupName, $policyName) + +#### Description + +Detaches a policy from a group. + +#### Usage + +```php +$client->objectStorage2->detachObjectStorageIamGroupPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$policyName:** `string` β€” The name of the policy. + +
+ +
+$client->objectStorage2->listObjectStorageGroups($serviceUuid) -> array + +#### Description + +Returns a list of available service groups by given {service_uuid}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageGroups( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageGroup($serviceUuid, $request) -> ObjectStorage2GroupResponse + +#### Description + +Creates an iam group. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageGroup( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2GroupCreate([ + 'name' => 'new-group', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` β€” A valid string to represent the name of the IAM group. + +
+ +
+$client->objectStorage2->getObjectStorageGroup($serviceUuid, $groupName) -> ObjectStorage2GroupResponse + +#### Description + +Get a single group identified by {service_uuid}, and {group_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +
+ +
+$client->objectStorage2->deleteObjectStorageGroup($serviceUuid, $groupName) + +#### Description + +Deletes a group identified by {group_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +
+ +
+$client->objectStorage2->attachObjectStorageUserToGroup($serviceUuid, $groupName, $username) + +#### Description + +Attaches an iam user to a group identified by {group_name}, and {username}. + +#### Usage + +```php +$client->objectStorage2->attachObjectStorageUserToGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->removeObjectStorageUserFromGroup($serviceUuid, $groupName, $username) + +#### Description + +Removes an iam user from the group identified by {group_name}, and {username}. + +#### Usage + +```php +$client->objectStorage2->removeObjectStorageUserFromGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$username:** `string` β€” The name of the user. + +
+ +
+$client->objectStorage2->listObjectStorageGroupInlinePolicies($serviceUuid, $groupName) -> array + +#### Description + +Lists the group inline policies by the given {service_uuid}, and {group_name}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageGroupInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +
+ +
+$client->objectStorage2->createObjectStorageGroupInlinePolicy($serviceUuid, $groupName, $request) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Creates a group inline policy by the given {service_uuid}, and {group_name}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageGroupInlinePolicyRequest([ + 'body' => new ObjectStorage2InlinePolicyCreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$request:** `ObjectStorage2InlinePolicyCreate` + +
+ +
+$client->objectStorage2->getObjectStorageGroupInlinePolicy($serviceUuid, $groupName, $groupPolicyName) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Get the group inline policy by the given {service_uuid}, {group_name} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$groupPolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->deleteObjectStorageGroupInlinePolicy($serviceUuid, $groupName, $groupPolicyName) + +#### Description + +Deletes the group inline policy by the given {service_uuid}, {group_name}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$groupName:** `string` β€” The name of the group. + +**$groupPolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->listObjectStorageRoles($serviceUuid) -> array + +#### Description + +Lists the roles. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageRoles( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->objectStorage2->createObjectStorageRole($serviceUuid, $request) -> ObjectStorage2RoleResponse + +#### Description + +Creates a service IAM role. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2RoleCreate([ + 'name' => 'test-role', + 'assumeRolePolicyDocument' => '{"Version": "2012-10-17","Statement": [{"Action": "sts:AssumeRole","Principal": {"AWS": ["urn:ecs:iam::ns1:user/Demby"]},"Effect": "Allow","Resource": "*"}]}', + 'description' => 'A test role.', + 'maxSessionDuration' => 3600, + 'permissionsBoundary' => 'test-policy', + 'tags' => [ + new ObjectStorage2RoleTag([ + 'key' => 'department', + 'value' => 'Finance', + ]), + new ObjectStorage2RoleTag([ + 'key' => 'school', + 'value' => 'University of Helsinki', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` + +**$assumeRolePolicyDocument:** `string` β€” The policy document that grants an entity permission to assume the role. + +**$description:** `?string` β€” Description of the role. + +**$maxSessionDuration:** `?int` β€” Maximum session duration in seconds. + +**$permissionsBoundary:** `?string` β€” Policy name to set as the permissions boundary. + +**$tags:** `?array` β€” Tags to attach to the role (max 50). + +
+ +
+$client->objectStorage2->getObjectStorageRole($serviceUuid, $roleName) -> ObjectStorage2RoleResponse + +#### Description + +Get a single role identified by {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->deleteObjectStorageRole($serviceUuid, $roleName) + +#### Description + +Deletes a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->updateObjectStorageRole($serviceUuid, $roleName, $request) -> ObjectStorage2RoleResponse + +#### Description + +Updates a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->updateObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2RoleUpdate([ + 'description' => 'New description', + 'maxSessionDuration' => 3900, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$description:** `?string` β€” New description for the role. + +**$maxSessionDuration:** `?int` β€” New maximum session duration in seconds. + +
+ +
+$client->objectStorage2->listObjectStorageRoleInlinePolicies($serviceUuid, $roleName) -> array + +#### Description + +Returns a list of role inline policies by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageRoleInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->createObjectStorageRoleInlinePolicy($serviceUuid, $roleName, $request) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Creates a role inline policy by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageRoleInlinePolicyRequest([ + 'body' => new ObjectStorage2InlinePolicyCreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$request:** `ObjectStorage2InlinePolicyCreate` + +
+ +
+$client->objectStorage2->getObjectStorageRoleInlinePolicy($serviceUuid, $roleName, $rolePolicyName) -> ObjectStorage2InlinePolicyResponse + +#### Description + +Returns a role's inline policy by the given {service_uuid}, {role_name}, and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$rolePolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->deleteObjectStorageRoleInlinePolicy($serviceUuid, $roleName, $rolePolicyName) + +#### Description + +Delete a role inline policy by the given {service_uuid}, {role_name} and {policy_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$rolePolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->createObjectStorageRolePermissionsBoundary($serviceUuid, $roleName, $request) -> ObjectStorage2PermissionsBoundaryResponse + +#### Description + +Creates a role policy's permissions boundary by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->createObjectStorageRolePermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageRolePermissionsBoundaryRequest([ + 'body' => new ObjectStorage2PermissionsBoundaryCreate([ + 'policyName' => 'sample-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$request:** `ObjectStorage2PermissionsBoundaryCreate` + +
+ +
+$client->objectStorage2->deleteObjectStorageRolePermissionsBoundary($serviceUuid, $roleName) + +#### Description + +Deletes a role permissions boundary by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageRolePermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->assumeObjectStorageRolePolicy($serviceUuid, $roleName, $request) -> ObjectStorage2AssumeRolePolicyResponse + +#### Description + +Assume a role policy by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->assumeObjectStorageRolePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2AssumeRolePolicyRequest([ + 'document' => '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":"backup.upcloud.com"},"Action":"sts:AssumeRole"}]}', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$document:** `string` β€” The assume role policy document that grants an entity permission to assume the role. + +
+ +
+$client->objectStorage2->listObjectStorageAttachedRolePolicies($serviceUuid, $roleName) -> array + +#### Description + +Lists all policies attached to a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->listObjectStorageAttachedRolePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->attachObjectStoragePolicyToRole($serviceUuid, $roleName, $request) + +#### Description + +Attaches a policy to a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->attachObjectStoragePolicyToRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachObjectStoragePolicyToRoleRequest([ + 'body' => new ObjectStorage2PolicyAttachmentCreate([ + 'name' => 'test-policy', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$request:** `ObjectStorage2PolicyAttachmentCreate` + +
+ +
+$client->objectStorage2->detachObjectStoragePolicyFromRole($serviceUuid, $roleName, $rolePolicyName) + +#### Description + +Detaches a policy from a service's IAM role. + +#### Usage + +```php +$client->objectStorage2->detachObjectStoragePolicyFromRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$rolePolicyName:** `string` β€” The name of the inline policy. + +
+ +
+$client->objectStorage2->getObjectStorageRoleTags($serviceUuid, $roleName) -> array + +#### Description + +Returns a role's tags by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->getObjectStorageRoleTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +
+ +
+$client->objectStorage2->replaceObjectStorageRoleTags($serviceUuid, $roleName, $request) -> array + +#### Description + +Replaces a role's tags by the given {service_uuid}, and {role_name}. + +#### Usage + +```php +$client->objectStorage2->replaceObjectStorageRoleTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ReplaceObjectStorageRoleTagsRequest([ + 'body' => [ + new ObjectStorage2TagListRequestItem([ + 'key' => 'environment', + 'value' => 'production', + ]), + new ObjectStorage2TagListRequestItem([ + 'key' => 'team', + 'value' => 'backend', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$request:** `array` + +
+ +
+$client->objectStorage2->deleteObjectStorageRoleTag($serviceUuid, $roleName, $roleTagKey) + +#### Description + +Deletes a role's tag by the given {service_uuid}, {role_name}, and {tag_key}. + +#### Usage + +```php +$client->objectStorage2->deleteObjectStorageRoleTag( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$roleName:** `string` β€” The name of the role. + +**$roleTagKey:** `string` β€” The key of the role tag. + +
+ +## file-storage +{:#file-storageAnchor} + +
+$client->fileStorage->listFileStorages($request) -> array + +#### Description + +Returns a list of File Storage services. + +#### Usage + +```php +$client->fileStorage->listFileStorages( + new ListFileStoragesRequest([]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->fileStorage->createFileStorage($request) -> FileStorageServiceDetailResponse + +#### Description + +Creates a new File Storage service. + +#### Usage + +```php +$client->fileStorage->createFileStorage( + new FileStorageServiceCreate([ + 'name' => 'test-name', + 'zone' => 'fi-hel2', + 'configuredStatus' => FileStorageConfiguredStatus::Started->value, + 'sizeGib' => 250, + 'encrypted' => false, + 'networks' => [ + new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'net', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '192.168.147.120', + ]), + ], + 'shares' => [ + new FileStorageShareCreate([ + 'name' => 'read', + 'path' => '/public', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '*', + 'permission' => FileStoragePermission::Ro->value, + ]), + ], + ]), + new FileStorageShareCreate([ + 'name' => 'write', + 'path' => '/project/data', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.147.0/24', + 'permission' => FileStoragePermission::Rw->value, + ]), + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => 'local.domain', + 'permission' => FileStoragePermission::Rw->value, + ]), + ], + ]), + ], + 'labels' => [ + new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + ]), +); +``` + +#### Parameters + +**$name:** `string` + +**$zone:** `string` β€” Indicates the zone where the service will be created. + +**$configuredStatus:** `string` + +**$sizeGib:** `int` + +**$encrypted:** `?bool` β€” Indicates whether encryption at rest is enabled for the service. + +**$networks:** `?array` + +**$shares:** `?array` + +**$labels:** `?array` β€” Labels + +
+ +
+$client->fileStorage->getFileStorage($serviceUuid) -> FileStorageServiceDetailResponse + +#### Description + +Returns managed File Storage details by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->getFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->fileStorage->replaceFileStorage($serviceUuid, $request) -> FileStorageServiceDetailResponse + +#### Description + +Replaces existing File Storage service by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->replaceFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new FileStorageServiceReplace([ + 'name' => 'test-name', + 'configuredStatus' => FileStorageConfiguredStatus::Started->value, + 'sizeGib' => 250, + 'networks' => [ + new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'net', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '192.168.147.120', + ]), + ], + 'labels' => [ + new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `string` + +**$configuredStatus:** `string` + +**$sizeGib:** `int` + +**$networks:** `?array` + +**$labels:** `?array` β€” Labels + +
+ +
+$client->fileStorage->deleteFileStorage($serviceUuid) + +#### Description + +Deletes existing File Storage service by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->deleteFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->fileStorage->modifyFileStorage($serviceUuid, $request) -> FileStorageServiceDetailResponse + +#### Description + +Modifies existing File Storage service by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->modifyFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new FileStorageServiceModify([ + 'name' => 'test-name', + 'configuredStatus' => FileStorageConfiguredStatus::Started->value, + 'sizeGib' => 250, + 'networks' => [ + new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'net', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '192.168.147.120', + ]), + ], + 'labels' => [ + new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$name:** `?string` + +**$configuredStatus:** `?string` + +**$sizeGib:** `?int` + +**$networks:** `?array` + +**$labels:** `?array` + +
+ +
+$client->fileStorage->listFileStorageNetworks($serviceUuid) -> array + +#### Description + +Returns a list of available service networks by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->listFileStorageNetworks( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->fileStorage->createFileStorageNetwork($serviceUuid, $request) -> FileStorageNetworkDetailResponse + +#### Description + +Creates a new service network by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->createFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new CreateFileStorageNetworkRequest([ + 'body' => new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'test-name', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '10.20.30.40', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `FileStorageNetworkCreate` + +
+ +
+$client->fileStorage->getFileStorageNetwork($serviceUuid, $networkName) -> FileStorageNetworkDetailResponse + +#### Description + +Returns service network details by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->fileStorage->getFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +
+ +
+$client->fileStorage->deleteFileStorageNetwork($serviceUuid, $networkName) + +#### Description + +Deletes existing network by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->fileStorage->deleteFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +
+ +
+$client->fileStorage->modifyFileStorageNetwork($serviceUuid, $networkName, $request) -> FileStorageNetworkDetailResponse + +#### Description + +Modifies existing service network by given {service_uuid} and {network_name}. + +#### Usage + +```php +$client->fileStorage->modifyFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + new FileStorageNetworkModify([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'test-name', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '10.20.30.40', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” The name of the network. + +**$uuid:** `?string` + +**$name:** `?string` + +**$family:** `?string` + +**$ipAddress:** `?string` + +
+ +
+$client->fileStorage->listFileStorageShares($serviceUuid) -> array + +#### Description + +Returns a list of available service shares by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->listFileStorageShares( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->fileStorage->createFileStorageShare($serviceUuid, $request) -> FileStorageShareDetailResponse + +#### Description + +Creates a new service share by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->createFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new CreateFileStorageShareRequest([ + 'body' => new FileStorageShareCreate([ + 'name' => 'read', + 'path' => '/public', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.147.0/24', + 'permission' => FileStoragePermission::Ro->value, + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `FileStorageShareCreate` + +
+ +
+$client->fileStorage->getFileStorageShare($serviceUuid, $shareName) -> FileStorageShareDetailResponse + +#### Description + +Returns service share details by given {service_uuid} and {share_name}. + +#### Usage + +```php +$client->fileStorage->getFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +
+ +
+$client->fileStorage->deleteFileStorageShare($serviceUuid, $shareName) + +#### Description + +Deletes existing share by given {service_uuid} and {share_name}. + +#### Usage + +```php +$client->fileStorage->deleteFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +
+ +
+$client->fileStorage->modifyFileStorageShare($serviceUuid, $shareName, $request) -> FileStorageShareDetailResponse + +#### Description + +Modifies existing service share by given {service_uuid} and {share_name}. + +#### Usage + +```php +$client->fileStorage->modifyFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + new FileStorageShareModify([ + 'name' => 'test-name', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.25.0/24', + 'permission' => FileStoragePermission::Ro->value, + ]), + ], + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +**$name:** `?string` β€” A resource name. + +**$acl:** `?array` + +
+ +
+$client->fileStorage->listFileStorageAcls($serviceUuid, $shareName) -> array + +#### Description + +Returns a list of available ACLs by given {service_uuid} and {share_name}. + +#### Usage + +```php +$client->fileStorage->listFileStorageAcls( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +
+ +
+$client->fileStorage->createFileStorageAcl($serviceUuid, $shareName, $request) -> FileStorageAclDetailResponse + +#### Description + +Creates a new share ACL by given {service_uuid} and {share_name}. + +#### Usage + +```php +$client->fileStorage->createFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + new CreateFileStorageAclRequest([ + 'body' => new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.25.147', + 'permission' => FileStoragePermission::Ro->value, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +**$request:** `FileStorageAclCreate` + +
+ +
+$client->fileStorage->getFileStorageAcl($serviceUuid, $shareName, $aclName) -> FileStorageAclDetailResponse + +#### Description + +Returns ACL details by given {service_uuid}, {share_name} and {acl_name}. + +#### Usage + +```php +$client->fileStorage->getFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +**$aclName:** `string` β€” The name of the ACL. + +
+ +
+$client->fileStorage->deleteFileStorageAcl($serviceUuid, $shareName, $aclName) + +#### Description + +Deletes existing ACL by given {service_uuid}, {share_name} and {acl_name}. + +#### Usage + +```php +$client->fileStorage->deleteFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + 'test-name', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +**$aclName:** `string` β€” The name of the ACL. + +
+ +
+$client->fileStorage->modifyFileStorageAcl($serviceUuid, $shareName, $aclName, $request) -> FileStorageAclDetailResponse + +#### Description + +Modifies existing ACL by given {service_uuid}, {share_name} and {acl_name}. + +#### Usage + +```php +$client->fileStorage->modifyFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + 'test-name', + new FileStorageAclModify([ + 'name' => 'test-name', + 'target' => '192.168.25.0/24', + 'permission' => FileStoragePermission::Rw->value, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$shareName:** `string` β€” The name of the share. + +**$aclName:** `string` β€” The name of the ACL. + +**$name:** `?string` + +**$target:** `?string` β€” The target of the ACL entry. It can be a IP Address, Network Prefix or a wildcard. + +**$permission:** `?string` + +
+ +
+$client->fileStorage->listFileStorageLabels($serviceUuid) -> array + +#### Description + +Returns a list of available service labels by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->listFileStorageLabels( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +
+$client->fileStorage->createFileStorageLabel($serviceUuid, $request) -> FileStorageLabelDetails + +#### Description + +Creates a new label by given {service_uuid}. Labels are used for service filtering. + +#### Usage + +```php +$client->fileStorage->createFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new CreateFileStorageLabelRequest([ + 'body' => new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$request:** `FileStorageLabelCreate` + +
+ +
+$client->fileStorage->getFileStorageLabel($serviceUuid, $labelKey) -> FileStorageLabelDetails + +#### Description + +Returns label details by given {service_uuid} and {key}. + +#### Usage + +```php +$client->fileStorage->getFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->fileStorage->deleteFileStorageLabel($serviceUuid, $labelKey) + +#### Description + +Deletes existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->fileStorage->deleteFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'environment', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->fileStorage->modifyFileStorageLabel($serviceUuid, $labelKey, $request) -> FileStorageLabelDetails + +#### Description + +Modifies existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->fileStorage->modifyFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'environment', + new FileStorageLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” The key of the label. + +**$key:** `?string` + +**$value:** `?string` + +
+ +
+$client->fileStorage->getFileStorageCurrentState($serviceUuid) -> FileStorageServiceDetailResponse + +#### Description + +Returns the current state of the File Storage service by given {service_uuid}. + +#### Usage + +```php +$client->fileStorage->getFileStorageCurrentState( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” Service UUID + +
+ +## database +{:#databaseAnchor} + +
+$client->database->listDatabaseTypes() -> array + +#### Description + +Returns a list of available database types. Contains available plans, zones, database versions supported and the configuration properties for each database. + +#### Usage + +```php +$client->database->listDatabaseTypes(); +``` + +
+ +
+$client->database->getDatabaseType($serviceTypeName) -> DatabaseServiceTypeResponse + +#### Description + +Returns database type details by given {database_type}. Contains available plans, zones, database versions supported and configuration properties. + +#### Usage + +```php +$client->database->getDatabaseType( + DatabaseServiceType::Mysql->value, +); +``` + +#### Parameters + +**$serviceTypeName:** `string` β€” Service type parameter + +
+ +
+$client->database->listDatabases($request) -> array + +#### Description + +Returns a list of all available Managed Database services. Depending on their database type, Managed Databases services will have different details. + +#### Usage + +```php +$client->database->listDatabases( + new ListDatabasesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Sort results by the specified field. Prefix with '-' for descending order. Supported fields: `created_at`, `name` (service hostname), `operational_state` (service status), `zone` (location). + +
+ +
+$client->database->createDatabase($request) -> DatabaseServiceInformationResponse + +#### Description + +Creates a new Managed Database instance. New databases are started by default. An initial backup is created automatically on startup and the API will be fully functional only after this backup has been created. The creation might take a while. Note that different databases have different properties that can be passed on creation. + +#### Usage + +```php +$client->database->createDatabase( + new DatabaseServicePropertiesMysql([]), +); +``` + +#### Parameters + +**$request:** `DatabaseServicePropertiesMysql|DatabaseServicePropertiesPg|DatabaseServicePropertiesRedis|DatabaseServicePropertiesOpensearch|DatabaseServicePropertiesValkey` + +
+ +
+$client->database->getDatabase($uuid) -> DatabaseServiceInformationResponse + +#### Description + +Returns details of a Managed Database service by its {uuid}. + +#### Usage + +```php +$client->database->getDatabase( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->deleteDatabase($uuid) + +#### Description + +Deletes a specified Managed Database. All data will be erased and lost, including backups. If the service is not powered off, it will be powered off before deletion. The state of the service can be anything. + +#### Usage + +```php +$client->database->deleteDatabase( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->modifyDatabase($uuid, $request) -> DatabaseServiceInformationResponse + +#### Description + +Modifies Managed Database service details by its {uuid} including upgrading plans, migration to other zones and database type-specific configurations. + +#### Usage + +```php +$client->database->modifyDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new ModifyDatabaseRequest([ + 'body' => new DatabaseServicePropertiesMysql([]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$request:** `DatabaseServicePropertiesMysql|DatabaseServicePropertiesPg|DatabaseServicePropertiesRedis|DatabaseServicePropertiesOpensearch|DatabaseServicePropertiesValkey` + +
+ +
+$client->database->modifyDatabaseType($uuid, $request) -> DatabaseServiceInformationResponse + +#### Description + +Update a service's type by the given {service-uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseType( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceTypeModify([ + 'targetType' => 'primary', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$targetType:** `string` β€” Service type + +
+ +
+$client->database->cloneDatabase($uuid, $request) -> DatabaseServiceInformationResponse + +#### Description + +Creates a clone of a Managed Database service based on its {uuid}. It is possible to change location, plans and use the point in time feature to clone your service at a specific time using your backups. + +#### Usage + +```php +$client->database->cloneDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new CloneDatabaseRequest([ + 'body' => new DatabaseServiceCloneMysql([ + 'hostnamePrefix' => 'dev', + 'plan' => 'starter-kit-plan', + 'cloneTime' => new DateTime('2024-01-30T15:04:05Z'), + 'backupName' => 'daily-backup-2024-01-30', + 'zone' => 'fi-hel1', + 'terminationProtection' => false, + 'maintenance' => new DatabaseServiceCloneMysqlMaintenance([ + 'dow' => DatabaseMaintenanceDow::Monday->value, + 'time' => '03:00:00', + ]), + 'additionalDiskSpaceGib' => 10, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$request:** `DatabaseServiceCloneMysql|DatabaseServiceClonePg|DatabaseServiceCloneRedis|DatabaseServiceCloneOpensearch|DatabaseServiceCloneValkey` + +
+ +
+$client->database->listDatabaseNetworks($uuid) -> array + +#### Description + +Returns a list of attached SDN networks to a Managed Database service by its {uuid}. + +#### Usage + +```php +$client->database->listDatabaseNetworks( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->createDatabaseNetwork($uuid, $request) -> DatabaseNetworkInformationDetailsResponse + +#### Description + +Attaches an SDN network to a Managed Database service by its {uuid}. + +#### Usage + +```php +$client->database->createDatabaseNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateDatabaseNetworkRequest([ + 'body' => new DatabaseNetworkCreate([ + 'name' => 'my-network', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$request:** `DatabaseNetworkCreate` + +
+ +
+$client->database->getDatabaseNetwork($uuid, $networkName) -> DatabaseNetworkInformationDetailsResponse + +#### Description + +Returns the attached SDN network details to service by its {uuid} and {network_name}. + +#### Usage + +```php +$client->database->getDatabaseNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” Network UUID + +
+ +
+$client->database->deleteDatabaseNetwork($uuid, $networkName) + +#### Description + +Detaches an existing SDN network from a Managed Database service by its {uuid} and {network_name}. + +#### Usage + +```php +$client->database->deleteDatabaseNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$networkName:** `string` β€” Network UUID + +
+ +
+$client->database->upgradeDatabase($uuid, $request) -> DatabaseServiceInformationResponse + +#### Description + +Upgrades your PostgreSQL Managed Database service database to a newer major version. Downgrades are not permitted. + +#### Usage + +```php +$client->database->upgradeDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceUpgrade([ + 'targetVersion' => '12', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$targetVersion:** `string` β€” Version to upgrade the service + +
+ +
+$client->database->listDatabaseLabels($uuid) -> array + +#### Description + +Returns a list of available service labels by given {service_uuid}. + +#### Usage + +```php +$client->database->listDatabaseLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->createDatabaseLabel($uuid, $request) -> DatabaseLabelResponse + +#### Description + +Creates a new label by given {service_uuid}. Labels used for service filtering. + +#### Usage + +```php +$client->database->createDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateDatabaseLabelRequest([ + 'body' => new DatabaseLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$request:** `DatabaseLabelCreate` + +
+ +
+$client->database->getDatabaseLabel($uuid, $labelKey) -> DatabaseLabelResponse + +#### Description + +Returns label details by given {service_uuid} and {key}. + +#### Usage + +```php +$client->database->getDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'foo', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” Label ID + +
+ +
+$client->database->deleteDatabaseLabel($uuid, $labelKey) + +#### Description + +Deletes existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->database->deleteDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'foo', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” Label ID + +
+ +
+$client->database->modifyDatabaseLabel($uuid, $labelKey, $request) -> DatabaseLabelResponse + +#### Description + +Modifies existing label by given {service_uuid} and {key}. + +#### Usage + +```php +$client->database->modifyDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'foo', + new DatabaseLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$labelKey:** `string` β€” Label ID + +**$key:** `?string` + +**$value:** `?string` + +
+ +
+$client->database->getDatabaseAvailableExtensions($uuid) -> array + +#### Description + +Returns a list of available PostgreSQL extensions for the Managed Database service by its {service-uuid}. Only supported for PostgreSQL services. + +#### Usage + +```php +$client->database->getDatabaseAvailableExtensions( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getPgAvailableExtensions() -> array + +#### Description + +Returns a list of available PostgreSQL extensions grouped by PostgreSQL version. + +#### Usage + +```php +$client->database->getPgAvailableExtensions(); +``` + +
+ +
+$client->database->getDatabaseTypeVersions() -> array + +#### Description + +Returns a list of supported Managed Database service versions. + +#### Usage + +```php +$client->database->getDatabaseTypeVersions(); +``` + +
+ +
+$client->database->getDatabaseOpenSearchAclSettings($uuid) -> DatabaseAccessControlSettingsResponse + +#### Description + +Return access controls settings for the OpenSearch Managed Database service {uuid}. + +#### Usage + +```php +$client->database->getDatabaseOpenSearchAclSettings( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->modifyDatabaseOpenSearchAclSettings($uuid, $request) -> DatabaseAccessControlSettingsResponse + +#### Description + +Modifies the user {username} access control for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseOpenSearchAclSettings( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceAclModify([ + 'accessControl' => true, + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$accessControl:** `?bool` β€” Enables OpenSearch access control + +**$extendedAccessControl:** `?bool` β€” Enables OpenSearch extended access control + +
+ +
+$client->database->getDatabaseOpenSearchSecurityPluginStatus($uuid) -> DatabaseOpenSearchSecurityPluginStatusResponse + +#### Description + +Returns Security management status for the OpenSearch Managed Database service {uuid}. + +#### Usage + +```php +$client->database->getDatabaseOpenSearchSecurityPluginStatus( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->enableDatabaseOpenSearchSecurityPlugin($uuid, $request) -> DatabaseOpenSearchSecurityPluginStatusResponse + +#### Description + +Enables Security management admin for the OpenSearch Managed Database service {uuid}. + +#### Usage + +```php +$client->database->enableDatabaseOpenSearchSecurityPlugin( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceSecurityEnable([ + 'adminPassword' => 'Str0ngP@ssw0rd!', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$adminPassword:** `string` β€” Security admin password + +
+ +
+$client->database->modifyDatabaseOpenSearchSecurityPluginPassword($uuid, $request) -> DatabaseOpenSearchSecurityPluginStatusResponse + +#### Description + +Modifies Security management admin password for the OpenSearch Managed Database service {uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseOpenSearchSecurityPluginPassword( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceSecurityModify([ + 'adminPassword' => 'Curr3nt@Passw0rd!', + 'newPassword' => 'N3w@Str0ngPassw0rd!', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$adminPassword:** `string` β€” Current admin password + +**$newPassword:** `string` β€” New admin password + +
+ +
+$client->database->listDatabaseIntegrationEndpoints() -> array + +#### Description + +Returns a list of available integration endpoints. + +#### Usage + +```php +$client->database->listDatabaseIntegrationEndpoints(); +``` + +
+ +
+$client->database->createDatabaseIntegrationEndpoint($request) -> DatabaseIntegrationEndpointResponse + +#### Description + +Creates a new integration endpoint. + +#### Usage + +```php +$client->database->createDatabaseIntegrationEndpoint( + new DatabaseIntegrationEndpointCreate([ + 'type' => DatabaseIntegrationEndpoint::Logs->value, + 'name' => 'webhook-endpoint', + ]), +); +``` + +#### Parameters + +**$type:** `string` + +**$name:** `string` β€” The name of the integration endpoint. + +**$properties:** `?array` β€” A key-value map of properties specific to the integration endpoint type. + +
+ +
+$client->database->getDatabaseIntegrationEndpoint($integrationUuid) -> DatabaseIntegrationEndpointResponse + +#### Description + +Returns integration endpoint details by given {integration-uuid}. + +#### Usage + +```php +$client->database->getDatabaseIntegrationEndpoint( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$integrationUuid:** `string` β€” Integration UUID + +
+ +
+$client->database->deleteDatabaseIntegrationEndpoint($integrationUuid) + +#### Description + +Deletes existing integration endpoint by given {integration-uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseIntegrationEndpoint( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$integrationUuid:** `string` β€” Integration UUID + +
+ +
+$client->database->modifyDatabaseIntegrationEndpoint($integrationUuid, $request) -> DatabaseIntegrationEndpointResponse + +#### Description + +Modifies existing integration endpoint by given {integration-uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseIntegrationEndpoint( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseIntegrationEndpointModify([]), +); +``` + +#### Parameters + +**$integrationUuid:** `string` β€” Integration UUID + +**$properties:** `?array` + +
+ +
+$client->database->getDatabaseAccountCa() -> DatabaseAccountCaResponse + +#### Description + +Returns the CA certificate. Every customer main account has a private Certificate Authority (CA) that signs certificates for internal use. Managed Database service types, such as PostgreSQL, use it for external connections. To access these services, you must download and configure the certificate on your browser or client. + +#### Usage + +```php +$client->database->getDatabaseAccountCa(); +``` + +
+ +
+$client->database->getDatabaseProjectAlerts() -> array + +#### Description + +Returns all the alerts associated with your Managed Database services. + +#### Usage + +```php +$client->database->getDatabaseProjectAlerts(); +``` + +
+ +
+$client->database->getDatabaseStatus($uuid) -> DatabaseServiceStatusResponse + +#### Description + +Get a service's status by the given {service-uuid}. + +#### Usage + +```php +$client->database->getDatabaseStatus( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseVersions($uuid) -> array + +#### Description + +Returns available versions of the Managed Database service by its {uuid}. + +#### Usage + +```php +$client->database->getDatabaseVersions( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->startDatabaseManualMaintenanceService($uuid) -> DatabaseUpCloudApiResponse + +#### Description + +Start maintenance updates for your Managed Database service if any updates are pending. + +#### Usage + +```php +$client->database->startDatabaseManualMaintenanceService( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->enableDatabaseTemporaryWrites($uuid) -> DatabaseUpCloudApiResponse + +#### Description + +Enable temporary writes by the given {service-uuid}. + +#### Usage + +```php +$client->database->enableDatabaseTemporaryWrites( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseMigrationStatus($uuid) -> DatabaseServiceMigrationStatusResponse + +#### Description + +Returns details about the migration progress over time of a Managed database service by its {uuid}. + +#### Usage + +```php +$client->database->getDatabaseMigrationStatus( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseAlerts($uuid) -> array + +#### Description + +Returns all the alerts associated with your Managed Database services. + +#### Usage + +```php +$client->database->getDatabaseAlerts( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseMetrics($uuid) -> array + +#### Description + +Returns metrics related to a Managed Database service by its {uuid} and query parameter {period}. + +#### Usage + +```php +$client->database->getDatabaseMetrics( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseQueryStatistics($uuid, $request) -> DatabaseQueryStatisticsResponse + +#### Description + +Returns a list of query statistics for the Managed Database service by its {uuid} and optional query parameters {limit}, {offset} and {order}. Query statistics will differ depending on the database type. + +#### Usage + +```php +$client->database->getDatabaseQueryStatistics( + '01234567-89ab-cdef-0123-456789abcdef', + new GetDatabaseQueryStatisticsRequest([ + 'limit' => 10, + 'offset' => 0, + 'order' => 'asc', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$order:** `?string` β€” Sort order + +
+ +
+$client->database->getDatabaseLogs($uuid, $request) -> DatabaseLogListResponse + +#### Description + +Returns Managed Database service system-level logs by its {uuid} and optional query parameters {limit}, {offset} and {order}. + +#### Usage + +```php +$client->database->getDatabaseLogs( + '01234567-89ab-cdef-0123-456789abcdef', + new GetDatabaseLogsRequest([ + 'limit' => 10, + 'offset' => 0, + 'order' => 'asc', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$order:** `?string` β€” Sort order + +
+ +
+$client->database->listDatabaseConnectionPools($uuid, $request) -> array + +#### Description + +Returns a list of available connection pools for a Managed Database service. Connection pools are available only for PostgreSQL database services. + +#### Usage + +```php +$client->database->listDatabaseConnectionPools( + '01234567-89ab-cdef-0123-456789abcdef', + new ListDatabaseConnectionPoolsRequest([ + 'sort' => 'asc', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->database->createDatabaseConnectionPool($uuid, $request) -> DatabaseConnectionPoolResponse + +#### Description + +Creates a connection pool for the Managed Database service {uuid}. Connection pool endpoints are for PostgreSQL Managed Databases only. + +#### Usage + +```php +$client->database->createDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseConnectionPoolCreate([ + 'database' => 'defaultdb', + 'poolMode' => DatabaseConnectionPoolCreatePoolMode::Statement->value, + 'poolName' => 'readonly-pool', + 'poolSize' => 10, + 'username' => 'readonly', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$database:** `string` β€” Database + +**$poolMode:** `string` β€” Connection Pool mode + +**$poolName:** `string` β€” Connection Pool name + +**$poolSize:** `int` β€” Connection Pool size + +**$username:** `?string` β€” Connection Pool username + +
+ +
+$client->database->getDatabaseConnectionPool($uuid, $poolName) -> DatabaseConnectionPoolResponse + +#### Description + +Returns the connection pool {pool-name} details for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->getDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$poolName:** `string` β€” Connection Pool Name + +
+ +
+$client->database->deleteDatabaseConnectionPool($uuid, $poolName) + +#### Description + +Deletes the connection pool {pool-name} for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$poolName:** `string` β€” Connection Pool Name + +
+ +
+$client->database->modifyDatabaseConnectionPool($uuid, $poolName, $request) -> DatabaseConnectionPoolResponse + +#### Description + +Modifies the connection pool {pool-name} for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + new DatabaseConnectionPoolModify([ + 'database' => 'defaultdb', + 'poolMode' => DatabaseConnectionPoolModifyPoolMode::Session->value, + 'poolSize' => 20, + 'username' => 'app-user', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$poolName:** `string` β€” Connection Pool Name + +**$database:** `?string` β€” Database + +**$poolMode:** `?string` β€” Connection Pool mode + +**$poolSize:** `?int` β€” Connection Pool size + +**$username:** `?string` β€” Connection Pool username + +
+ +
+$client->database->listDatabaseOpenSearchIndices($uuid) -> array + +#### Description + +Returns a list of available indices for a Managed Database service {uuid}. + +#### Usage + +```php +$client->database->listDatabaseOpenSearchIndices( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->deleteDatabaseOpenSearchIndex($uuid, $indexName) + +#### Description + +Deletes the index {index_name} for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseOpenSearchIndex( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$indexName:** `string` β€” OpenSearch Index Name + +
+ +
+$client->database->listDatabaseIntegrations($uuid) -> array + +#### Description + +Returns a list of available service integrations by given {service-uuid}. + +#### Usage + +```php +$client->database->listDatabaseIntegrations( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->createDatabaseIntegration($uuid, $request) -> DatabaseServiceIntegrationResponse + +#### Description + +Creates a new integration by given {service-uuid}. + +#### Usage + +```php +$client->database->createDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceIntegrationCreate([ + 'type' => DatabaseServiceIntegration::Logs->value, + 'destinationUuid' => '09e86f48-2dcd-4a43-843d-3532ab112c1d', + 'properties' => [ + 'opensearch_index_days_max' => 30, + 'opensearch_index_prefix' => "mysql_logs", + ], + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$type:** `string` + +**$destinationUuid:** `?string` β€” The UUID of the destination where the service integration will send data. + +**$properties:** `?array` + +
+ +
+$client->database->getDatabaseIntegration($uuid, $integrationUuid) -> DatabaseServiceIntegrationResponse + +#### Description + +Returns integration details by given {service-uuid} and {integration-uuid}. + +#### Usage + +```php +$client->database->getDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$integrationUuid:** `string` β€” Integration UUID + +
+ +
+$client->database->deleteDatabaseIntegration($uuid, $integrationUuid) + +#### Description + +Deletes existing integration by given {service-uuid} and {integration-uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$integrationUuid:** `string` β€” Integration UUID + +
+ +
+$client->database->modifyDatabaseIntegration($uuid, $integrationUuid, $request) -> DatabaseServiceIntegrationResponse + +#### Description + +Modifies existing integration by given {service-uuid} and {integration-uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceIntegrationModify([ + 'properties' => [ + 'key1' => "value1", + ], + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$integrationUuid:** `string` β€” Integration UUID + +**$properties:** `?array` + +
+ +
+$client->database->listDatabaseLogicalDatabases($uuid) -> array + +#### Description + +Returns a list of logical databases for a Managed Database service identified by {uuid}. + +#### Usage + +```php +$client->database->listDatabaseLogicalDatabases( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->createDatabaseLogicalDatabase($uuid, $request) -> LogicalDatabaseResponse + +#### Description + +Creates a new logical database for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->createDatabaseLogicalDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new LogicalDatabaseCreate([ + 'name' => 'my_database', + 'lcCollate' => 'en_US.UTF-8', + 'lcCtype' => 'en_US.UTF-8', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$name:** `string` β€” logical database name + +**$lcCollate:** `?string` β€” Collation order + +**$lcCtype:** `?string` β€” Category of a locale definition source file + +
+ +
+$client->database->deleteDatabaseLogicalDatabase($uuid, $databaseName) + +#### Description + +Deletes the logical database {database_name} from the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseLogicalDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$databaseName:** `string` β€” Database name + +
+ +
+$client->database->getDatabasePeeringsStatus($uuid) -> DatabaseServiceNetworkDetailsResponse + +#### Description + +Returns networks peering status for a service by its {uuid}. Only available for services using SDN private networks. + +#### Usage + +```php +$client->database->getDatabasePeeringsStatus( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->getDatabaseSessions($uuid, $request) -> DatabaseCurrentSessionsResponse + +#### Description + +Returns a list of current sessions details for your Managed Database service by its {uuid} and optional query parameters {limit}, {offset} and {order}. + +#### Usage + +```php +$client->database->getDatabaseSessions( + '01234567-89ab-cdef-0123-456789abcdef', + new GetDatabaseSessionsRequest([ + 'limit' => 10, + 'offset' => 0, + 'order' => 'asc', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$order:** `?string` β€” Sort order + +
+ +
+$client->database->terminateDatabaseSession($uuid, $pid) -> DatabaseTerminateSessionResponse + +#### Description + +Terminates a sessions or kills a running query for a Managed Database service by its {uuid}, session {pid} and optional query parameter {terminate}. + +#### Usage + +```php +$client->database->terminateDatabaseSession( + '01234567-89ab-cdef-0123-456789abcdef', + 1001, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$pid:** `int` β€” Session PID + +
+ +
+$client->database->createDatabaseTask($uuid, $request) -> DatabaseServiceTaskResponse + +#### Description + +Creates a task that checks for potential errors before starting a migration or upgrade for a Managed Database service by its {uuid}. + +#### Usage + +```php +$client->database->createDatabaseTask( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceTaskCreate([ + 'datasetImport' => new DatabaseServiceTaskCreateDatasetImport([ + 'datasetName' => 'customer-events', + ]), + 'operation' => 'dataset_import', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$datasetImport:** `?DatabaseServiceTaskCreateDatasetImport` + +**$migrationCheck:** `?DatabaseServiceTaskCreateMigrationCheck` + +**$upgradeCheck:** `?DatabaseServiceTaskCreateUpgradeCheck` + +**$targetVersion:** `?string` β€” The target version for upgrade operations. + +**$operation:** `string` β€” The operation to be performed. + +
+ +
+$client->database->getDatabaseTask($uuid, $taskId) -> DatabaseServiceTaskDetailsResponse + +#### Description + +Returns task details of a Managed Database service by its {uuid} and the task {id} obtained from Create Managed Database task. + +#### Usage + +```php +$client->database->getDatabaseTask( + '01234567-89ab-cdef-0123-456789abcdef', + 1001, +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$taskId:** `int` β€” Task ID + +
+ +
+$client->database->listDatabaseUsers($uuid) -> array + +#### Description + +Returns a list of database users associated with the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->listDatabaseUsers( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +
+ +
+$client->database->createDatabaseUser($uuid, $request) -> DatabaseUserResponse + +#### Description + +Creates a new user for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->createDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceUserCreate([ + 'username' => 'api-doc-user', + 'password' => 'new-password', + 'authentication' => 'caching_sha2_password', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$username:** `string` β€” The username of the service user + +**$password:** `?string` β€” The password of the service user + +**$authentication:** `?string` β€” The authentication method for the service user + +**$redisAccessControl:** `?DatabaseServiceUserCreateRedisAccessControl` β€” Redis access control settings + +**$pgAccessControl:** `?DatabaseServiceUserCreatePgAccessControl` β€” PostgreSQL access control settings + +**$opensearchAccessControl:** `?DatabaseServiceUserCreateOpensearchAccessControl` β€” OpenSearch access control settings + +**$valkeyAccessControl:** `?DatabaseServiceUserCreateValkeyAccessControl` β€” Valkey access control settings + +
+ +
+$client->database->getDatabaseUser($uuid, $username) -> DatabaseUserResponse + +#### Description + +Returns the user {username} details for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->getDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$username:** `string` β€” Username identifier + +
+ +
+$client->database->deleteDatabaseUser($uuid, $username) + +#### Description + +Deletes the user {username} from the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->deleteDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$username:** `string` β€” Username identifier + +
+ +
+$client->database->modifyDatabaseUser($uuid, $username, $request) -> DatabaseUserResponse + +#### Description + +Modifies the user {username} details for the Managed Database service {uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + new DatabaseServiceUserModify([ + 'password' => 'new_secure_password_123!', + 'authentication' => 'caching_sha2_password', + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$username:** `string` β€” Username identifier + +**$password:** `?string` β€” New password for the service user + +**$authentication:** `?string` β€” Authentication method for the service user + +
+ +
+$client->database->modifyDatabaseUserAccessControl($uuid, $username, $request) -> DatabaseUserResponse + +#### Description + +Return access controls settings for the OpenSearch Managed Database service {uuid}. + +#### Usage + +```php +$client->database->modifyDatabaseUserAccessControl( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + new DatabaseServiceUserAclModify([ + 'redisAccessControl' => new DatabaseServiceUserAclModifyRedisAccessControl([ + 'categories' => [ + '@admin', + '@read', + ], + 'channels' => [ + 'news', + 'alerts', + ], + 'commands' => [ + 'GET', + 'SET', + ], + 'keys' => [ + 'user:*', + 'session:*', + ], + ]), + 'pgAccessControl' => new DatabaseServiceUserAclModifyPgAccessControl([ + 'allowReplication' => true, + ]), + 'opensearchAccessControl' => new DatabaseServiceUserAclModifyOpensearchAccessControl([ + 'rules' => [ + new DatabaseServiceUserAclModifyOpensearchAccessControlRulesItem([ + 'index' => 'logs-*', + 'permission' => 'read', + ]), + ], + ]), + 'valkeyAccessControl' => new DatabaseServiceUserAclModifyValkeyAccessControl([ + 'categories' => [ + '@write', + ], + 'channels' => [ + 'updates', + ], + 'commands' => [ + 'DEL', + ], + 'keys' => [ + 'cache:*', + ], + ]), + ]), +); +``` + +#### Parameters + +**$uuid:** `string` β€” Service UUID + +**$username:** `string` β€” Username identifier + +**$redisAccessControl:** `?DatabaseServiceUserAclModifyRedisAccessControl` β€” Redis ACL modification schema + +**$pgAccessControl:** `?DatabaseServiceUserAclModifyPgAccessControl` β€” PostgreSQL replication permission modification schema + +**$opensearchAccessControl:** `?DatabaseServiceUserAclModifyOpensearchAccessControl` β€” OpenSearch index permission modification schema + +**$valkeyAccessControl:** `?DatabaseServiceUserAclModifyValkeyAccessControl` β€” Valkey ACL modification schema + +
+ +## load-balancer +{:#load-balancerAnchor} + +
+$client->loadBalancer->listLoadBalancers($request) -> array + +#### Description + +Returns a list of available load balancer services. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancers( + new ListLoadBalancersRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Sort resources by field. Prefix with '-' for descending order. + +**$label:** `?string` β€” Filter resources by label. Can be provided multiple times for multiple labels. Format: 'key=value' for exact match or 'key' for existence check. + +
+ +
+$client->loadBalancer->createLoadBalancer($request) -> LoadBalancerService + +#### Description + +Creates a new load balancer service. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancer( + new LoadBalancerServiceCreate([ + 'name' => 'my-loadbalancer', + 'zone' => 'fi-hel1', + 'plan' => 'production-small', + 'configuredStatus' => LoadBalancerServiceConfiguredStatus::Started->value, + 'frontends' => [ + new LoadBalancerFrontendCreate([ + 'name' => 'my-frontend', + 'port' => 80, + 'mode' => LoadBalancerFrontendMode::Http->value, + 'defaultBackend' => 'my-backend', + ]), + ], + ]), +); +``` + +#### Parameters + +**$name:** `string` β€” Name of the service + +**$zone:** `string` β€” Zone + +**$plan:** `string` β€” Plan + +**$configuredStatus:** `string` + +**$frontends:** `array` β€” Service frontends + +**$backends:** `?array` β€” Service backends + +**$resolvers:** `?array` β€” Service resolvers + +**$networkUuid:** `?string` β€” Private Network UUID + +**$networks:** `?array` β€” Service networks + +**$labels:** `?array` β€” Labels + +**$maintenanceDow:** `?string` + +**$maintenanceTime:** `?string` + +**$ipAddresses:** `?array` β€” List of IP addresses for the network + +
+ +
+$client->loadBalancer->getLoadBalancer($serviceUuid) -> LoadBalancerService + +#### Description + +Returns load balancer service details by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->replaceLoadBalancer($serviceUuid, $request) -> LoadBalancerService + +#### Description + +Replaces existing load balancer service by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->replaceLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', + new LoadBalancerServiceReplace([ + 'name' => 'my-loadbalancer', + 'plan' => 'production', + 'configuredStatus' => LoadBalancerServiceConfiguredStatus::Started->value, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$name:** `string` β€” Name of the service + +**$plan:** `string` β€” Plan + +**$configuredStatus:** `string` + +**$frontends:** `?array` β€” Service frontends + +**$backends:** `?array` β€” Service backends + +**$resolvers:** `?array` β€” Service resolvers + +**$labels:** `?array` β€” Labels + +**$maintenanceDow:** `?string` + +**$maintenanceTime:** `?string` + +**$ipAddresses:** `?array` β€” List of IP addresses for the network + +
+ +
+$client->loadBalancer->deleteLoadBalancer($serviceUuid) + +#### Description + +Deletes existing load balancer service by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->modifyLoadBalancer($serviceUuid, $request) -> LoadBalancerService + +#### Description + +Modifies existing load balancer service by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', + new LoadBalancerServiceModify([ + 'name' => 'updated-loadbalancer', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$name:** `?string` β€” Name of the service + +**$plan:** `?string` β€” Plan + +**$configuredStatus:** `?string` + +**$frontends:** `?array` β€” Service frontends + +**$backends:** `?array` β€” Service backends + +**$resolvers:** `?array` β€” Service resolvers + +**$labels:** `?array` β€” Labels + +**$maintenanceDow:** `?string` + +**$maintenanceTime:** `?string` + +**$ipAddresses:** `?array` β€” List of IP addresses for the network + +
+ +
+$client->loadBalancer->listLoadBalancerFrontends($serviceUuid) -> array + +#### Description + +Returns a list of available service frontends by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerFrontends( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->createLoadBalancerFrontend($serviceUuid, $request) -> LoadBalancerFrontend + +#### Description + +Creates a new service frontend by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerFrontendRequest([ + 'body' => new LoadBalancerFrontendCreate([ + 'name' => 'my-frontend', + 'port' => 80, + 'mode' => LoadBalancerFrontendMode::Http->value, + 'defaultBackend' => 'my-backend', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$request:** `LoadBalancerFrontendCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerFrontend($serviceUuid, $frontendName) -> LoadBalancerFrontend + +#### Description + +Returns service frontend details by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+ +
+$client->loadBalancer->deleteLoadBalancerFrontend($serviceUuid, $frontendName) + +#### Description + +Deletes existing frontend by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+ +
+$client->loadBalancer->modifyLoadBalancerFrontend($serviceUuid, $frontendName, $request) -> LoadBalancerFrontend + +#### Description + +Modifies existing service frontend by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new LoadBalancerFrontendModify([ + 'name' => 'updated-frontend', + 'port' => 443, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$name:** `?string` β€” Name of the frontend + +**$port:** `?int` β€” Port to listen + +**$mode:** `?string` + +**$defaultBackend:** `?string` β€” Default backend + +**$properties:** `?LoadBalancerFrontendPropertiesCreate` + +**$networks:** `?array` β€” Network names + +**$tlsConfigs:** `?array` β€” TLS Configs + +**$rules:** `?array` β€” Rules + +
+ +
+$client->loadBalancer->listLoadBalancerFrontendTlsConfigs($serviceUuid, $frontendName) -> array + +#### Description + +Returns a list of available frontend TLS configs by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerFrontendTlsConfigs( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+ +
+$client->loadBalancer->createLoadBalancerFrontendTlsConfig($serviceUuid, $frontendName, $request) -> LoadBalancerTlsConfig + +#### Description + +Creates a new TLS config by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new CreateLoadBalancerFrontendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigCreate([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$request:** `LoadBalancerTlsConfigCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerFrontendTlsConfig($serviceUuid, $frontendName, $tlsConfigName) -> LoadBalancerTlsConfig + +#### Description + +Returns frontend TLS config details by given {service-uuid}, {frontend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-tls-config-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+ +
+$client->loadBalancer->deleteLoadBalancerFrontendTlsConfig($serviceUuid, $frontendName, $tlsConfigName) + +#### Description + +Deletes existing TLS config by given {service-uuid}, {frontend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-tls-config-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+ +
+$client->loadBalancer->modifyLoadBalancerFrontendTlsConfig($serviceUuid, $frontendName, $tlsConfigName, $request) -> LoadBalancerTlsConfig + +#### Description + +Modifies existing TLS config by given {service-uuid}, {frontend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-tls-config-1', + new ModifyLoadBalancerFrontendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigModify([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +**$request:** `LoadBalancerTlsConfigModify` + +
+ +
+$client->loadBalancer->listLoadBalancerRules($serviceUuid, $frontendName) -> array + +#### Description + +Returns a list of available frontend rules by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerRules( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+ +
+$client->loadBalancer->createLoadBalancerRule($serviceUuid, $frontendName, $request) -> LoadBalancerRule + +#### Description + +Creates a new rule by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new CreateLoadBalancerRuleRequest([ + 'body' => new LoadBalancerRuleCreate([ + 'name' => 'my-rule', + 'priority' => 10, + 'matchingCondition' => LoadBalancerMatchingCondition::And_->value, + 'matchers' => [ + new LoadBalancerMatcherCreateMatchSrcIp([ + 'type' => LoadBalancerMatcherCreateMatchSrcIpType::SrcIp->value, + 'matchSrcIp' => new LoadBalancerMatcherIpCreate([ + 'value' => '192.168.1.1', + ]), + ]), + ], + 'actions' => [ + new LoadBalancerActionCreateActionUseBackend([ + 'type' => LoadBalancerActionCreateActionUseBackendType::UseBackend->value, + 'actionUseBackend' => new LoadBalancerActionUseBackendCreate([ + 'backend' => 'backend-1', + ]), + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$request:** `LoadBalancerRuleCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerRule($serviceUuid, $frontendName, $ruleName) -> LoadBalancerRule + +#### Description + +Returns frontend rule details by given {service-uuid}, {frontend-name}, and {rule-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$ruleName:** `string` β€” The unique identifier for the rule. + +
+ +
+$client->loadBalancer->replaceLoadBalancerRule($serviceUuid, $frontendName, $ruleName, $request) -> LoadBalancerRule + +#### Description + +Replaces existing rule by given {service-uuid}, {frontend-name}, and {rule-name}. + +#### Usage + +```php +$client->loadBalancer->replaceLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', + new ReplaceLoadBalancerRuleRequest([ + 'body' => new LoadBalancerRuleCreate([ + 'name' => 'my-rule', + 'priority' => 10, + 'matchingCondition' => LoadBalancerMatchingCondition::And_->value, + 'matchers' => [ + new LoadBalancerMatcherCreateMatchSrcIp([ + 'type' => LoadBalancerMatcherCreateMatchSrcIpType::SrcIp->value, + 'matchSrcIp' => new LoadBalancerMatcherIpCreate([ + 'value' => '192.168.1.1', + ]), + ]), + ], + 'actions' => [ + new LoadBalancerActionCreateActionUseBackend([ + 'type' => LoadBalancerActionCreateActionUseBackendType::UseBackend->value, + 'actionUseBackend' => new LoadBalancerActionUseBackendCreate([ + 'backend' => 'backend-1', + ]), + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$ruleName:** `string` β€” The unique identifier for the rule. + +**$request:** `LoadBalancerRuleCreate` + +
+ +
+$client->loadBalancer->deleteLoadBalancerRule($serviceUuid, $frontendName, $ruleName) + +#### Description + +Deletes existing rule by given {service-uuid}, {frontend-name}, and {rule-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$ruleName:** `string` β€” The unique identifier for the rule. + +
+ +
+$client->loadBalancer->modifyLoadBalancerRule($serviceUuid, $frontendName, $ruleName, $request) -> LoadBalancerRule + +#### Description + +Modifies existing rule by given {service-uuid}, {frontend-name}, and {rule-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', + new LoadBalancerRuleModify([ + 'name' => 'updated-rule', + 'priority' => 10, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$ruleName:** `string` β€” The unique identifier for the rule. + +**$name:** `?string` β€” Name of the rule + +**$priority:** `?int` β€” Priority + +**$matchingCondition:** `?string` + +**$matchers:** `?array` β€” Rule matchers + +**$actions:** `?array` β€” Rule actions + +
+ +
+$client->loadBalancer->listLoadBalancerBackends($serviceUuid) -> array + +#### Description + +Returns a list of available service backends by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerBackends( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->createLoadBalancerBackend($serviceUuid, $request) -> LoadBalancerBackend + +#### Description + +Creates a new backend by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerBackendRequest([ + 'body' => new LoadBalancerBackendCreate([ + 'name' => 'my-backend', + 'members' => [ + new LoadBalancerMemberCreateZero([ + 'type' => LoadBalancerMemberCreateZeroType::Static_->value, + 'ip' => 'ip', + 'port' => 1, + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$request:** `LoadBalancerBackendCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerBackend($serviceUuid, $backendName) -> LoadBalancerBackend + +#### Description + +Returns service backend details by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +
+ +
+$client->loadBalancer->deleteLoadBalancerBackend($serviceUuid, $backendName) + +#### Description + +Deletes existing backend by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +
+ +
+$client->loadBalancer->modifyLoadBalancerBackend($serviceUuid, $backendName, $request) -> LoadBalancerBackend + +#### Description + +Modifies existing backend by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new LoadBalancerBackendModify([ + 'name' => 'updated-backend', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$name:** `?string` β€” Name of the backend + +**$members:** `?array` β€” Backend members + +**$tlsConfigs:** `?array` β€” TLS Configs + +**$resolver:** `?string` β€” Resolver reference + +**$properties:** `?LoadBalancerBackendPropertiesCreate` + +
+ +
+$client->loadBalancer->listLoadBalancerMembers($serviceUuid, $backendName) -> array + +#### Description + +Returns a list of available backend members by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerMembers( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +
+ +
+$client->loadBalancer->createLoadBalancerMember($serviceUuid, $backendName, $request) -> LoadBalancerMember + +#### Description + +Creates a new member by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new CreateLoadBalancerMemberRequest([ + 'body' => new LoadBalancerMemberCreateZero([ + 'type' => LoadBalancerMemberCreateZeroType::Static_->value, + 'ip' => 'ip', + 'port' => 1, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$request:** `LoadBalancerMemberCreateZero|LoadBalancerMemberCreateOne` + +
+ +
+$client->loadBalancer->getLoadBalancerMember($serviceUuid, $backendName, $memberName) -> LoadBalancerMember + +#### Description + +Returns backend member details by given {service-uuid}, {backend-name} and {member-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$memberName:** `string` β€” The unique identifier for the member. + +
+ +
+$client->loadBalancer->deleteLoadBalancerMember($serviceUuid, $backendName, $memberName) + +#### Description + +Deletes existing member by given {service-uuid}, {backend-name} and {member-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$memberName:** `string` β€” The unique identifier for the member. + +
+ +
+$client->loadBalancer->modifyLoadBalancerMember($serviceUuid, $backendName, $memberName, $request) -> LoadBalancerMember + +#### Description + +Modifies existing member by given {service-uuid}, {backend-name} and {member-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', + new ModifyLoadBalancerMemberRequest([ + 'body' => new LoadBalancerMemberModifyZero([]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$memberName:** `string` β€” The unique identifier for the member. + +**$request:** `LoadBalancerMemberModifyZero|LoadBalancerMemberModifyOne` + +
+ +
+$client->loadBalancer->listLoadBalancerBackendTlsConfigs($serviceUuid, $backendName) -> array + +#### Description + +Returns a list of available backend TLS configs by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerBackendTlsConfigs( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +
+ +
+$client->loadBalancer->createLoadBalancerBackendTlsConfig($serviceUuid, $backendName, $request) -> LoadBalancerTlsConfig + +#### Description + +Creates a new TLS config by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new CreateLoadBalancerBackendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigCreate([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$request:** `LoadBalancerTlsConfigCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerBackendTlsConfig($serviceUuid, $backendName, $tlsConfigName) -> LoadBalancerTlsConfig + +#### Description + +Returns backend TLS config details by given {service-uuid}, {backend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'example-tls-config-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+ +
+$client->loadBalancer->deleteLoadBalancerBackendTlsConfig($serviceUuid, $backendName, $tlsConfigName) + +#### Description + +Deletes existing TLS config by given {service-uuid}, {backend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'example-tls-config-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+ +
+$client->loadBalancer->modifyLoadBalancerBackendTlsConfig($serviceUuid, $backendName, $tlsConfigName, $request) -> LoadBalancerTlsConfig + +#### Description + +Modifies existing TLS config by given {service-uuid}, {backend-name}, and {tls-config-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'example-tls-config-1', + new ModifyLoadBalancerBackendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigModify([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +**$request:** `LoadBalancerTlsConfigModify` + +
+ +
+$client->loadBalancer->modifyLoadBalancerNetwork($serviceUuid, $networkName, $request) -> LoadBalancerNetwork + +#### Description + +Modifies existing service network by given {service-uuid} and {network-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-network-1', + new LoadBalancerNetworkModify([ + 'name' => 'updated-network', + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$networkName:** `string` β€” The unique identifier for the network. + +**$name:** `?string` β€” Name of the network + +
+ +
+$client->loadBalancer->listLoadBalancerIpAddresses($serviceUuid) -> array + +#### Description + +Returns a list of available IP addresses by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerIpAddresses( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->createLoadBalancerIpAddress($serviceUuid, $request) -> LoadBalancerIpAddress + +#### Description + +Attach a floating public IPv4 address to the service using the specified {service-uuid}. The number of attachable floating IPv4 addresses is limited to the number of nodes in the plan, and all addresses must be in the same zone as the service and detached. + +Note: Floating public IPv4 addresses have configurable release policies. When the service is deleted or an IP address is detached, addresses with the keep policy will be converted to detached floating IPs that remain available in your account. Addresses with the release policy will be automatically deleted. For more details, see IP Addresses. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerIpAddress( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerIpAddressRequest([ + 'body' => new LoadBalancerIpAddressCreate([ + 'address' => '192.168.1.10', + 'networkName' => 'private-net-1', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$request:** `LoadBalancerIpAddressCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerIpAddress($serviceUuid, $ipAddress) -> array + +#### Description + +Returns IP address details by given {service-uuid} and {ip-address}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerIpAddress( + '01234567-89ab-cdef-0123-456789abcdef', + '192.168.1.1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$ipAddress:** `string` β€” The unique identifier for the IP address. + +
+ +
+$client->loadBalancer->deleteLoadBalancerIpAddress($serviceUuid, $ipAddress) + +#### Description + +Detach a floating public IPv4 address from the service by given {service-uuid} and {address}. + Depending on the release policy, the customer retains the floating IP if the policy is set to keep. + If the policy is set to release, the floating IP will be deleted. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerIpAddress( + '01234567-89ab-cdef-0123-456789abcdef', + '192.168.1.1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$ipAddress:** `string` β€” The unique identifier for the IP address. + +
+ +
+$client->loadBalancer->listLoadBalancerResolvers($serviceUuid) -> array + +#### Description + +Returns a list of available service domain name resolvers by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerResolvers( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->createLoadBalancerResolver($serviceUuid, $request) -> LoadBalancerResolver + +#### Description + +Creates a new resolver by given {service-uuid}. + +Resolver is a DNS server usually residing in a user's private network. It's used to resolve IPs for backend members of type dynamic. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerResolverRequest([ + 'body' => new LoadBalancerResolverCreate([ + 'name' => 'default-resolver', + 'nameservers' => [ + '1.1.1.1:53', + '8.8.8.8:53', + ], + 'retries' => 3, + 'timeout' => 5, + 'timeoutRetry' => 3, + 'cacheValid' => 300, + 'cacheInvalid' => 60, + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$request:** `LoadBalancerResolverCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerResolver($serviceUuid, $resolverName) -> LoadBalancerResolver + +#### Description + +Returns backend resolver details by given {service-uuid} and {resolver-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-resolver-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$resolverName:** `string` β€” The unique identifier for the resolver. + +
+ +
+$client->loadBalancer->deleteLoadBalancerResolver($serviceUuid, $resolverName) + +#### Description + +Deletes existing resolver by given {service-uuid} and {resolver-name}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-resolver-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$resolverName:** `string` β€” The unique identifier for the resolver. + +
+ +
+$client->loadBalancer->modifyLoadBalancerResolver($serviceUuid, $resolverName, $request) -> LoadBalancerResolver + +#### Description + +Modifies existing resolver by given {service-uuid} and {resolver-name}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-resolver-1', + new LoadBalancerResolverModify([ + 'name' => 'default-resolver', + 'nameservers' => [ + '1.1.1.1:53', + '8.8.8.8:53', + ], + 'retries' => 3, + 'timeout' => 5, + 'timeoutRetry' => 3, + 'cacheValid' => 300, + 'cacheInvalid' => 60, + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$resolverName:** `string` β€” The unique identifier for the resolver. + +**$name:** `?string` β€” Name of the resolver + +**$nameservers:** `?array` β€” Nameservers + +**$retries:** `?int` β€” Number of retries on failure + +**$timeout:** `?int` β€” Timeout for the query in seconds + +**$timeoutRetry:** `?int` β€” Timeout for the query retries in seconds + +**$cacheValid:** `?int` β€” Time in seconds to cache valid results + +**$cacheInvalid:** `?int` β€” Time in seconds to cache invalid results + +
+ +
+$client->loadBalancer->listLoadBalancerLabels($serviceUuid) -> array + +#### Description + +Returns a list of available service labels by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->createLoadBalancerLabel($serviceUuid, $request) -> LoadBalancerLabelResponse + +#### Description + +Creates a new label by given {service-uuid}. + +Labels used for service filtering. + +Service labels usage examples +Below are some examples of what certain GET requests might look like. + +exact match: GET /1.3/load-balancer?label=env%3Dstaging +existence: GET /1.3/load-balancer?label=env +multiple: GET /1.3/load-balancer?label=env&label=foo%3Dbar + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerLabelRequest([ + 'body' => new LoadBalancerLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$request:** `LoadBalancerLabelCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerLabel($serviceUuid, $labelKey) -> LoadBalancerLabelResponse + +#### Description + +Returns label details by given {service-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$labelKey:** `string` β€” The unique identifier for the label. + +
+ +
+$client->loadBalancer->deleteLoadBalancerLabel($serviceUuid, $labelKey) + +#### Description + +Deletes existing label by given {service-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$labelKey:** `string` β€” The unique identifier for the label. + +
+ +
+$client->loadBalancer->modifyLoadBalancerLabel($serviceUuid, $labelKey, $request) -> LoadBalancerLabelResponse + +#### Description + +Modifies existing label by given {service-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', + new ModifyLoadBalancerLabelRequest([ + 'body' => new LoadBalancerLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$labelKey:** `string` β€” The unique identifier for the label. + +**$request:** `LoadBalancerLabelModify` + +
+ +
+$client->loadBalancer->getLoadBalancerMetrics($serviceUuid) -> LoadBalancerMetrics + +#### Description + +Returns service metrics by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerMetrics( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->getLoadBalancerMetricsSeries($serviceUuid) -> array + +#### Description + +Returns service metric series by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+ +
+$client->loadBalancer->getLoadBalancerFrontendCombinedMetricsSeries($serviceUuid, $request) -> array + +#### Description + +Returns combined frontend metric series by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerFrontendCombinedMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + new GetLoadBalancerFrontendCombinedMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->getLoadBalancerFrontendMetricsSeries($serviceUuid, $frontendName, $request) -> array + +#### Description + +Returns frontend metric series by given {service-uuid} and {frontend-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerFrontendMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new GetLoadBalancerFrontendMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$frontendName:** `string` β€” The unique identifier for the frontend. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->getLoadBalancerBackendCombinedMetricsSeries($serviceUuid, $request) -> array + +#### Description + +Returns combined backend metric series by given {service-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerBackendCombinedMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + new GetLoadBalancerBackendCombinedMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->getLoadBalancerBackendMetricsSeries($serviceUuid, $backendName, $request) -> array + +#### Description + +Returns backend metric series by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerBackendMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new GetLoadBalancerBackendMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->getLoadBalancerMemberCombinedMetricsSeries($serviceUuid, $backendName, $request) -> LoadBalancerMemberMetricsSeriesResponse + +#### Description + +Returns combined backend members metric series by given {service-uuid} and {backend-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerMemberCombinedMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new GetLoadBalancerMemberCombinedMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->getLoadBalancerMemberMetricsSeries($serviceUuid, $backendName, $memberName, $request) -> LoadBalancerMemberMetricsSeriesResponse + +#### Description + +Returns backend member metric series by given {service-uuid}, {backend-name}, and {member-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerMemberMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', + new GetLoadBalancerMemberMetricsSeriesRequest([]), +); +``` + +#### Parameters + +**$serviceUuid:** `string` β€” The unique identifier for the service. + +**$backendName:** `string` β€” The unique identifier for the backend. + +**$memberName:** `string` β€” The unique identifier for the member. + +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+ +
+$client->loadBalancer->listLoadBalancerCertificateBundles($request) -> array + +#### Description + +Returns a list of available certificate bundles. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerCertificateBundles( + new ListLoadBalancerCertificateBundlesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$label:** `?string` β€” Filter resources by label. Can be provided multiple times for multiple labels. Format: 'key=value' for exact match or 'key' for existence check. + +
+ +
+$client->loadBalancer->createLoadBalancerCertificateBundle($request) -> LoadBalancerCertificateBundle + +#### Description + +Creates a new certificate bundle. + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerCertificateBundle( + new LoadBalancerCertificateBundleCreateZero([ + 'type' => LoadBalancerCertificateBundleCreateZeroType::Manual->value, + ]), +); +``` + +#### Parameters + +**$request:** `LoadBalancerCertificateBundleCreateZero|LoadBalancerCertificateBundleCreateCertificate|LoadBalancerCertificateBundleCreateType` + +
+ +
+$client->loadBalancer->getLoadBalancerCertificateBundle($bundleUuid) -> LoadBalancerCertificateBundle + +#### Description + +Returns certificate bundle details by given {bundle-uuid}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerCertificateBundle( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+ +
+$client->loadBalancer->deleteLoadBalancerCertificateBundle($bundleUuid) + +#### Description + +Deletes existing certificate bundle by given {bundle-uuid}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerCertificateBundle( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+ +
+$client->loadBalancer->modifyLoadBalancerCertificateBundle($bundleUuid, $request) -> LoadBalancerCertificateBundle + +#### Description + +Modifies existing a manual, dynamic or authority certificate bundle by given {bundle-uuid}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerCertificateBundle( + '01234567-89ab-cdef-0123-456789abcdef', + new ModifyLoadBalancerCertificateBundleRequest([ + 'body' => new LoadBalancerCertificateBundleManualModify([ + 'name' => 'updated-manual-cert', + ]), + ]), +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +**$request:** `LoadBalancerCertificateBundleManualModify|LoadBalancerCertificateBundleDynamicModify|LoadBalancerCertificateBundleAuthorityModify` + +
+ +
+$client->loadBalancer->listLoadBalancerCertificateBundleLabels($bundleUuid) -> array + +#### Description + +Returns a list of available certificate bundle labels by given {bundle-uuid}. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerCertificateBundleLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+ +
+$client->loadBalancer->createLoadBalancerCertificateBundleLabel($bundleUuid, $request) -> LoadBalancerLabelResponse + +#### Description + +Creates a new label by given {bundle-uuid}. + +Labels used for certificate bundles filtering. + +Certificate bundle labels usage examples +Below are some examples of what certain GET requests might look like. + +exact match: GET /1.3/load-balancer/certificate-bundles?label=env%3Dstaging +existence: GET /1.3/load-balancer/certificate-bundles?label=env +multiple: GET /1.3/load-balancer/certificate-bundles?label=env&label=foo%3Dbar + +#### Usage + +```php +$client->loadBalancer->createLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerCertificateBundleLabelRequest([ + 'body' => new LoadBalancerLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +**$request:** `LoadBalancerLabelCreate` + +
+ +
+$client->loadBalancer->getLoadBalancerCertificateBundleLabel($bundleUuid, $labelKey) -> LoadBalancerLabelResponse + +#### Description + +Returns label details by given {bundle-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +**$labelKey:** `string` β€” The unique identifier for the label. + +
+ +
+$client->loadBalancer->deleteLoadBalancerCertificateBundleLabel($bundleUuid, $labelKey) + +#### Description + +Deletes existing label by given {bundle-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->deleteLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +**$labelKey:** `string` β€” The unique identifier for the label. + +
+ +
+$client->loadBalancer->modifyLoadBalancerCertificateBundleLabel($bundleUuid, $labelKey, $request) -> LoadBalancerLabelResponse + +#### Description + +Modifies existing label by given {bundle-uuid} and {label-key}. + +#### Usage + +```php +$client->loadBalancer->modifyLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', + new ModifyLoadBalancerCertificateBundleLabelRequest([ + 'body' => new LoadBalancerLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` + +#### Parameters + +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +**$labelKey:** `string` β€” The unique identifier for the label. + +**$request:** `LoadBalancerLabelModify` + +
+ +
+$client->loadBalancer->getLoadBalancerDnsChallengeDomain() -> LoadBalancerDnsChallengeDomainResponse + +#### Description + +Returns DNS challenge domain. + +This can be used to validate domain ownership using the ACME challenge method. To validate your domain, you need to add CNAME record to the domain provided by this API to your DNS settings. The name/host of the CNAME record should be _acme-challenge or _acme-challenge.mysubdomain if you are setting up a subdomain called mysubdomain. The target/points to of the record needs to be set to the value returned by this API. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerDnsChallengeDomain(); +``` + +
+ +
+$client->loadBalancer->listLoadBalancerPlans($request) -> array + +#### Description + +Returns a list of available load balancer plans. + +#### Usage + +```php +$client->loadBalancer->listLoadBalancerPlans( + new ListLoadBalancerPlansRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +
+ +
+$client->loadBalancer->getLoadBalancerPlan($planName) -> LoadBalancerPlan + +#### Description + +Returns load balancer plan details by given {plan-name}. + +#### Usage + +```php +$client->loadBalancer->getLoadBalancerPlan( + 'example-plan-1', +); +``` + +#### Parameters + +**$planName:** `string` β€” The unique identifier for the plan. + +
+ +## firewall-ruleset +{:#firewall-rulesetAnchor} + +
+$client->firewallRuleset->listFirewallRulesets($request) -> array + +#### Description + +Returns a list of firewall rulesets. + +#### Usage + +```php +$client->firewallRuleset->listFirewallRulesets( + new ListFirewallRulesetsRequest([ + 'limit' => 10, + 'offset' => 0, + 'sort' => 'name', + ]), +); +``` + +#### Parameters + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->firewallRuleset->createFirewallRuleset($request) -> FirewallRulesetDetailResponse + +#### Description + +Creates a new firewall rulesets. + +#### Usage + +```php +$client->firewallRuleset->createFirewallRuleset( + new CreateFirewallRuleset([ + 'name' => 'example_firewall_ruleset', + 'stateful' => true, + 'enabled' => false, + 'defaultDnsRulesEnabled' => false, + ]), +); +``` + +#### Parameters + +**$uuid:** `?string` + +**$name:** `string` β€” Name of the firewall ruleset + +**$description:** `?string` β€” Description of the firewall ruleset + +**$stateful:** `?bool` + +**$enabled:** `?bool` + +**$defaultDnsRulesEnabled:** `?bool` + +**$labels:** `?array` β€” Labels + +**$serverUuid:** `?string` + +
+ +
+$client->firewallRuleset->getFirewallRuleset($rulesetUuid) -> FirewallRulesetDetailResponse + +#### Description + +Returns firewall ruleset details by given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->getFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+ +
+$client->firewallRuleset->deleteFirewallRuleset($rulesetUuid) + +#### Description + +Deletes existing firewall ruleset by given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->deleteFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+ +
+$client->firewallRuleset->modifyFirewallRuleset($rulesetUuid, $request) -> FirewallRulesetDetailResponse + +#### Description + +Modifies existing firewall ruleset by given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->modifyFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetModify([ + 'name' => 'modified_example_firewall_ruleset', + 'description' => 'Modified example stateless firewall ruleset', + 'labels' => [ + new FirewallRulesetCreateLabel([ + 'key' => 'dev', + 'value' => 'dev-1', + ]), + ], + 'enabled' => false, + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$name:** `?string` β€” Name of the ruleset + +**$description:** `?string` β€” Description of the firewall ruleset + +**$labels:** `?array` β€” Labels + +**$enabled:** `?bool` β€” Enabled + +**$defaultDnsRulesEnabled:** `?bool` + +
+ +
+$client->firewallRuleset->restoreFirewallRuleset($rulesetUuid, $rulesetVersion) -> FirewallRulesetDetailResponse + +#### Description + +Restores existing firewall ruleset by given {ruleset-uuid} and {ruleset-version}. + +#### Usage + +```php +$client->firewallRuleset->restoreFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', + 1000000, +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$rulesetVersion:** `int` β€” Firewall ruleset version + +
+ +
+$client->firewallRuleset->listFirewallRulesetRules($rulesetUuid, $request) -> array + +#### Description + +Returns firewall ruleset rules. + +#### Usage + +```php +$client->firewallRuleset->listFirewallRulesetRules( + '01234567-89ab-cdef-0123-456789abcdef', + new ListFirewallRulesetRulesRequest([ + 'limit' => 10, + 'offset' => 0, + 'sort' => 'name', + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->firewallRuleset->createFirewallRulesetRule($rulesetUuid, $request) -> FirewallRulesetRuleDetailResponse + +#### Description + +Creates a new firewall ruleset rule by the given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->createFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetFirewallRuleCreate([ + 'enabled' => false, + 'action' => "accept", + 'direction' => "in", + 'family' => "IPv4", + 'protocol' => "tcp", + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$uuid:** `?string` + +**$enabled:** `?bool` β€” Enabled + +**$action:** `mixed` + +**$comment:** `?string` β€” Comments + +**$destinationAddressStart:** `?string` + +**$destinationAddressEnd:** `?string` + +**$destinationPortStart:** `?int` + +**$destinationPortEnd:** `?int` + +**$destinationAddressCidr:** `?string` + +**$direction:** `mixed` + +**$family:** `mixed` + +**$icmpType:** `?int` + +**$position:** `?int` + +**$protocol:** `mixed` + +**$sourceAddressStart:** `?string` + +**$sourceAddressEnd:** `?string` + +**$sourcePortStart:** `?int` + +**$sourcePortEnd:** `?int` + +**$sourceAddressCidr:** `?string` + +
+ +
+$client->firewallRuleset->getFirewallRulesetRule($rulesetUuid, $ruleId) -> FirewallRulesetRuleDetailResponse + +#### Description + +Returns firewall ruleset rule details. + +#### Usage + +```php +$client->firewallRuleset->getFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$ruleId:** `string` β€” Firewall ruleset rule UUID + +
+ +
+$client->firewallRuleset->deleteFirewallRulesetRule($rulesetUuid, $ruleId) + +#### Description + +Deletes an existing rule by given {ruleset-uuid} and {rule-uuid}. + +#### Usage + +```php +$client->firewallRuleset->deleteFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$ruleId:** `string` β€” Firewall ruleset rule UUID + +
+ +
+$client->firewallRuleset->modifyFirewallRulesetRule($rulesetUuid, $ruleId, $request) -> FirewallRulesetRuleDetailResponse + +#### Description + +Modifies existing firewall ruleset rule by given {ruleset_uuid} and {rule-uuid}. + +#### Usage + +```php +$client->firewallRuleset->modifyFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetFirewallRuleModify([ + 'enabled' => false, + 'action' => "accept", + 'direction' => "in", + 'family' => "IPv4", + 'protocol' => "tcp", + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$ruleId:** `string` β€” Firewall ruleset rule UUID + +**$enabled:** `?bool` β€” Enabled + +**$action:** `mixed` + +**$comment:** `?string` β€” Comments + +**$destinationAddressStart:** `?string` + +**$destinationAddressEnd:** `?string` + +**$destinationPortStart:** `?int` + +**$destinationPortEnd:** `?int` + +**$destinationAddressCidr:** `?string` + +**$direction:** `mixed` + +**$family:** `mixed` + +**$icmpType:** `?int` + +**$position:** `?int` + +**$protocol:** `mixed` + +**$sourceAddressStart:** `?string` + +**$sourceAddressEnd:** `?string` + +**$sourcePortStart:** `?int` + +**$sourcePortEnd:** `?int` + +**$sourceAddressCidr:** `?string` + +
+ +
+$client->firewallRuleset->listFirewallRulesetLabels($rulesetUuid) -> array + +#### Description + +Returns a list of available firewall ruleset labels by given {ruleset-uuid}. + +#### Usage + +```php +$client->firewallRuleset->listFirewallRulesetLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+ +
+$client->firewallRuleset->createFirewallRulesetLabel($rulesetUuid, $request) -> FirewallRulesetLabelDetailResponse + +#### Description + +Creates a new label by given {ruleset-uuid}. Labels are used for group filtering. + +#### Usage + +```php +$client->firewallRuleset->createFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateFirewallRulesetLabelRequest([ + 'body' => new FirewallRulesetCreateLabel([ + 'key' => 'dev', + 'value' => 'dev-1', + ]), + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$request:** `FirewallRulesetCreateLabel` + +
+ +
+$client->firewallRuleset->getFirewallRulesetLabel($rulesetUuid, $labelKey) -> FirewallRulesetLabelDetailResponse + +#### Description + +Returns label details by given {ruleset-uuid} and {label-key}. + +#### Usage + +```php +$client->firewallRuleset->getFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->firewallRuleset->deleteFirewallRulesetLabel($rulesetUuid, $labelKey) + +#### Description + +Deletes existing label by given {ruleset-uuid} and {label-key}. + +#### Usage + +```php +$client->firewallRuleset->deleteFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$labelKey:** `string` β€” The key of the label. + +
+ +
+$client->firewallRuleset->modifyFirewallRulesetLabel($rulesetUuid, $labelKey, $request) -> FirewallRulesetLabelDetailResponse + +#### Description + +Modifies existing label by given {ruleset-uuid} and {label-key}. + +#### Usage + +```php +$client->firewallRuleset->modifyFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + new FirewallRulesetLabelModify([ + 'key' => 'foo', + 'value' => 'bar', + ]), +); +``` + +#### Parameters + +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +**$labelKey:** `string` β€” The key of the label. + +**$key:** `?string` + +**$value:** `?string` + +
+ +
+$client->firewallRuleset->listServerFirewallRule($serverUuid, $request) -> FirewallRulesetServerFirewallDetailResponse + +#### Description + +Returns a list of server firewall rules. + +#### Usage + +```php +$client->firewallRuleset->listServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + new ListServerFirewallRuleRequest([ + 'limit' => 10, + 'offset' => 0, + 'sort' => 'name', + ]), +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Server UUID + +**$limit:** `?int` β€” Number of entries to receive at most. + +**$offset:** `?int` β€” Offset for retrieved results. + +**$sort:** `?string` β€” Order of returned results. + +
+ +
+$client->firewallRuleset->createServerFirewallRule($serverUuid, $request) -> FirewallRulesetServerFirewallRuleDetail + +#### Description + +Creates a new server firewall rule. + +#### Usage + +```php +$client->firewallRuleset->createServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetServerFirewallRuleCreate([ + 'firewallRule' => new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::In->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'destinationAddressStart' => '', + 'destinationAddressEnd' => '', + 'sourceAddressStart' => '192.168.1.1', + 'sourceAddressEnd' => '192.168.1.255', + 'comment' => 'Allow SSH from this network', + ]), + ]), +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Server UUID + +**$firewallRule:** `FirewallRulesetServerFirewallRule` + +
+ +
+$client->firewallRuleset->createMultipleServerFirewallRules($serverUuid, $request) -> FirewallRulesetServerFirewallDetailResponse + +#### Description + +Creates multiple server firewall rules by given {server-uuid}. + +#### Usage + +```php +$client->firewallRuleset->createMultipleServerFirewallRules( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetServerMultipleFirewallRulesCreate([ + 'firewallRules' => new FirewallRulesetServerMultipleFirewallRulesCreateFirewallRules([ + 'firewallRule' => [ + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::In->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'sourceAddressStart' => '192.168.1.1', + 'sourceAddressEnd' => '192.168.1.255', + 'comment' => 'Allow SSH from this network', + ]), + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::In->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'sourceAddressStart' => '1.1.1.1', + 'sourceAddressEnd' => '1.1.1.1', + 'comment' => 'Allow DNS from this network', + ]), + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::Out->value, + 'action' => FirewallRulesetRuleAction::Drop->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'destinationAddressStart' => '100.100.128.2', + 'destinationAddressEnd' => '100.100.128.2', + 'comment' => 'dfg', + ]), + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::Out->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv6', + 'protocol' => 'icmp', + 'destinationAddressStart' => '2a04:3540:1001:1000:1411:4dff:fea5:1bab', + 'destinationAddressEnd' => '2a04:3540:1001:1000:1411:4dff:fea5:1bab', + 'comment' => "'w???''?p'2'?12??12?3?'231", + ]), + ], + ]), + ]), +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Server UUID + +**$firewallRules:** `?FirewallRulesetServerMultipleFirewallRulesCreateFirewallRules` + +
+ +
+$client->firewallRuleset->getServerFirewallRule($serverUuid, $position) -> FirewallRulesetServerFirewallRuleDetail + +#### Description + +Returns server firewall rule details by given {server-uuid} and {position}. + +#### Usage + +```php +$client->firewallRuleset->getServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + , +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Server UUID + +**$position:** `int|string` β€” Server firewall rule position + +
+ +
+$client->firewallRuleset->deleteServerFirewallRule($serverUuid, $position) + +#### Description + +Deletes existing server firewall rule by given {server-uuid} and {position}. + +#### Usage + +```php +$client->firewallRuleset->deleteServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + , +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Server UUID + +**$position:** `int|string` β€” Server firewall rule position + +
+ +
+$client->firewallRuleset->adminListServerFirewallRules($serverUuid) -> FirewallRulesetServerFirewallDetailResponse + +#### Description + +Admin List server firewall rules. + +#### Usage + +```php +$client->firewallRuleset->adminListServerFirewallRules( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` + +#### Parameters + +**$serverUuid:** `string` β€” Server UUID + +
+ +## vnc_keymap +{:#vnc_keymapAnchor} + +
+$client->vncKeymap->listVncKeymaps() -> VncKeymapKeymaps + +#### Description + +Retrieves a list of supported VNC keymaps. + +#### Usage + +```php +$client->vncKeymap->listVncKeymaps(); +``` + +
+ +## zone +{:#zoneAnchor} + +
+$client->zone->listZones() -> Zones + +#### Description + +Retrieves a list of zones. + +#### Usage + +```php +$client->zone->listZones(); +``` + +
+ +
+$client->zone->listZoneVlaNs($zone) -> ZoneVlans + +#### Description + +Retrieves a list of VLANs in a specific zone. + +#### Usage + +```php +$client->zone->listZoneVlaNs( + 'fi-hel1', +); +``` + +#### Parameters + +**$zone:** `string` β€” The zone identifier. + +
diff --git a/fern/fern.config.json b/fern/fern.config.json new file mode 100644 index 00000000..eb268b44 --- /dev/null +++ b/fern/fern.config.json @@ -0,0 +1,4 @@ +{ + "organization": "upcloud", + "version": "2.13.0" +} \ No newline at end of file diff --git a/fern/generators.yaml b/fern/generators.yaml new file mode 100644 index 00000000..da492f0f --- /dev/null +++ b/fern/generators.yaml @@ -0,0 +1,18 @@ +# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json + +api: + specs: + - openapi: ../generator/openapi/spec.patched.json + +default-group: local + +groups: + local: + generators: + - name: fernapi/fern-php-sdk + version: 1.25.0 + config: + enable-wire-tests: true + output: + location: local-file-system + path: ./sdk diff --git a/fern/sdk/.fern/metadata.json b/fern/sdk/.fern/metadata.json new file mode 100644 index 00000000..f9c5a5c4 --- /dev/null +++ b/fern/sdk/.fern/metadata.json @@ -0,0 +1,8 @@ +{ + "cliVersion": "2.13.0", + "generatorName": "fernapi/fern-php-sdk", + "generatorVersion": "1.25.0", + "generatorConfig": { + "enable-wire-tests": true + } +} \ No newline at end of file diff --git a/fern/sdk/.github/workflows/ci.yml b/fern/sdk/.github/workflows/ci.yml new file mode 100644 index 00000000..ba5836ae --- /dev/null +++ b/fern/sdk/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: ci + +on: [push] + +jobs: + compile: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "8.1" + + - name: Install tools + run: | + composer install + + - name: Build + run: | + composer build + + - name: Analyze + run: | + composer analyze + + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "8.1" + + - name: Install tools + run: | + composer install + + - name: Run Tests + run: | + composer test diff --git a/fern/sdk/.gitignore b/fern/sdk/.gitignore new file mode 100644 index 00000000..31a1aeb1 --- /dev/null +++ b/fern/sdk/.gitignore @@ -0,0 +1,5 @@ +.idea +.php-cs-fixer.cache +.phpunit.result.cache +composer.lock +vendor/ \ No newline at end of file diff --git a/fern/sdk/README.md b/fern/sdk/README.md new file mode 100644 index 00000000..39c9ecc6 --- /dev/null +++ b/fern/sdk/README.md @@ -0,0 +1,151 @@ +# UpCloud PHP SDK + +The **UpCloud PHP SDK** provides a convenient, strongly-typed way to interact with the **UpCloud API** from PHP applications. + +It is automatically generated from UpCloud’s official OpenAPI specification and kept up to date through an automated release process, ensuring alignment with the latest publicly released API versions. + +--- + +## ✨ Features + +- Official UpCloud SDK for PHP +- Generated from the public OpenAPI specification +- Fully typed API client +- Automatically updated as the API evolves +- Versioned releases matching API changes +- Open-source and MIT licensed + +--- + +## πŸ“¦ Installation + +# UpCloud PHP SDK + +The UpCloud PHP SDK is a typed PHP client for the UpCloud API. Its clients and +API reference are generated from UpCloud's public OpenAPI specification. + +## Requirements + +- PHP `^8.1` +- Composer + +Composer installs the SDK's HTTP and JSON dependencies automatically. + +## Installation + +```sh +composer require upcloudltd/upcloud-php-api +``` + +## Authentication + +Create an API token for your UpCloud account and provide it to the client. Keep +the token outside source control; the example reads it from an environment +variable. + +## Quick Start + +```php +server->listServers( + new ListServersRequest([ + 'limit' => 25, + 'offset' => 0, + ]), + ); + + foreach ($response->servers->server ?? [] as $server) { + printf("%s\n", $server->uuid); + } +} catch (UpcloudApiException $exception) { + fprintf(STDERR, "UpCloud API returned HTTP %d\n", $exception->getCode()); + var_dump($exception->getBody()); +} catch (UpcloudException $exception) { + fprintf(STDERR, "UpCloud SDK request failed: %s\n", $exception->getMessage()); +} +``` + +Service clients are properties of `UpcloudClient`, such as `$client->server` +and `$client->database`. Request objects accept associative arrays of typed +fields, and successful operations return typed response objects. The API +reference lists each operation's parameters and return type. + +## Errors + +`UpcloudApiException` represents a non-success API response. `getCode()` returns +the HTTP status code, and `getBody()` returns the response payload. +`UpcloudException` represents other SDK failures, including transport and +response-deserialization errors. + +## Client Options + +Pass options to the client to set defaults, or to an operation to override them. +Supported options include `baseUrl`, `timeout` in seconds, `maxRetries`, +additional `headers`, and a custom Guzzle-compatible `client`. The retry limit +defaults to two retries after the initial request. + +```php +$client = new UpcloudClient( + token: $token, + options: [ + 'timeout' => 10.0, + 'maxRetries' => 2, + ], +); + +$response = $client->server->listServers( + options: ['timeout' => 5.0], +); +``` + +## API Reference + +Browse the [versioned SDK API reference](https://upcloudltd.github.io/upcloud-php-api/) +for operation descriptions, parameters, response types, and examples. + +## Upgrading from v3 + +Version 4 is a breaking replacement of the legacy client, published under the same +Composer package name. Existing v1-v3 tags remain unchanged. Applications staying +on v3 should keep their Composer constraint within `^3.0`. + +The generated v4 client uses `Upcloud\UpcloudClient` and service/request classes +instead of the legacy `Upcloud\ApiClient\` API. Review authentication, request +objects, response models, and exception handling against the examples above; this +is not a drop-in upgrade. Test an alpha explicitly with: + +```sh +composer require 'upcloudltd/upcloud-php-api:4.0.0-alpha.1@alpha' +``` + +The [v3 source and documentation](https://github.com/UpCloudLtd/upcloud-php-api/tree/v3.0.0) +remain available at the original tag. The `v0.0.x` reference snapshots in Pages +belong to pre-migration SDK development, not to the legacy Packagist releases. + +## Releases and Contributions + +SDK releases follow semantic versioning and correspond to reviewed API +specification releases. The SDK source is generated; make generator changes in +the `generator/` sources rather than editing generated files directly. Issues, +bug reports, and documentation contributions are welcome. + +## License + +This project is licensed under the MIT License. See the +[LICENSE file](https://github.com/UpCloudLtd/upcloud-php-api/blob/main/LICENSE). \ No newline at end of file diff --git a/fern/sdk/composer.json b/fern/sdk/composer.json new file mode 100644 index 00000000..01d7b08e --- /dev/null +++ b/fern/sdk/composer.json @@ -0,0 +1,43 @@ +{ + "name": "upcloudltd/upcloud-php-api", + "description": "Official UpCloud PHP SDK for the UpCloud API", + "homepage": "https://github.com/UpCloudLtd/upcloud-php-api", + "support": { + "issues": "https://github.com/UpCloudLtd/upcloud-php-api/issues", + "source": "https://github.com/UpCloudLtd/upcloud-php-api" + }, + "keywords": [ + "upcloud", + "api", + "sdk" + ], + "license": "MIT", + "require": { + "php": "^8.1", + "ext-json": "*", + "guzzlehttp/guzzle": "^7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.0", + "friendsofphp/php-cs-fixer": "3.5.0", + "phpstan/phpstan": "^1.12" + }, + "autoload": { + "psr-4": { + "Upcloud\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Upcloud\\Tests\\": "tests/" + } + }, + "scripts": { + "build": [ + "@php -l src", + "@php -l tests" + ], + "test": "phpunit", + "analyze": "phpstan analyze src tests --memory-limit=1G" + } +} \ No newline at end of file diff --git a/fern/sdk/phpstan.neon b/fern/sdk/phpstan.neon new file mode 100644 index 00000000..780706b8 --- /dev/null +++ b/fern/sdk/phpstan.neon @@ -0,0 +1,6 @@ +parameters: + level: max + reportUnmatchedIgnoredErrors: false + paths: + - src + - tests \ No newline at end of file diff --git a/fern/sdk/phpunit.xml b/fern/sdk/phpunit.xml new file mode 100644 index 00000000..54630a51 --- /dev/null +++ b/fern/sdk/phpunit.xml @@ -0,0 +1,7 @@ + + + + tests + + + \ No newline at end of file diff --git a/fern/sdk/reference.md b/fern/sdk/reference.md new file mode 100644 index 00000000..b2b5d9e6 --- /dev/null +++ b/fern/sdk/reference.md @@ -0,0 +1,34884 @@ +# Reference +## account +
$client->account->details() -> Account +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns account details for the authenticated user +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->account->details(); +``` +
+
+
+
+ + +
+
+
+ +
$client->account->getMonthlyDetailedBillingSummary($year, $month, $request) -> AccountBillingSummary +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a billing summary grouped by resource, including billing detail changes during the specified month. The API user must have permission to read billing details. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->account->getMonthlyDetailedBillingSummary( + 'year', + 'month', + new GetMonthlyDetailedBillingSummaryRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$year:** `string` β€” Billing year. + +
+
+ +
+
+ +**$month:** `string` β€” Billing month. + +
+
+ +
+
+ +**$username:** `?string` β€” Return the billing summary for this account instead of the calling account. Requires Partner API access and an existing association with the account. + +
+
+ +
+
+ +**$resourceId:** `?string` β€” Return details only for this resource UUID or IP address. + +
+
+
+
+ + +
+
+
+ +
$client->account->getMonthlyBillingSummary($year, $month) -> AccountBillingSummaryResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a billing summary for the specified month. The API user must have permission to read billing details. This endpoint is deprecated; use the monthly billing summary with resource details instead. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->account->getMonthlyBillingSummary( + 'year', + 'month', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$year:** `string` β€” Billing year. + +
+
+ +
+
+ +**$month:** `string` β€” Billing month. + +
+
+
+
+ + +
+
+
+ +
$client->account->getCurrentNetworkUsage() -> AccountCurrentNetworkUsage +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns the latest Network Transfer Pool usage report for the account. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->account->getCurrentNetworkUsage(); +``` +
+
+
+
+ + +
+
+
+ +
$client->account->listAccounts($request) -> Accounts +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns the main account and its subaccounts. Account listing is available only to the main account. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->account->listAccounts( + new ListAccountsRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require all labels. Label keys are matched case-insensitively. + +
+
+
+
+ + +
+
+
+ +
$client->account->createMslmaSigningLink() -> AccountCreateMsLmaSigningLinkResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Create a new Microsoft LMA signing link +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->account->createMslmaSigningLink(); +``` +
+
+
+
+ + +
+
+
+ +
$client->account->getAccountNetworkTopUsage($request) -> AccountResourceNetworkUsage +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns the resources with the highest network usage. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->account->getAccountNetworkTopUsage( + new GetAccountNetworkTopUsageRequest([ + 'from' => new DateTime('2026-07-01T00:00:00Z'), + 'to' => new DateTime('2026-07-01T00:00:00Z'), + 'zone' => 'fi-hel1', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$from:** `DateTime` β€” Start of the usage period. + +
+
+ +
+
+ +**$to:** `DateTime` β€” End of the usage period. + +
+
+ +
+
+ +**$service:** `?string` β€” Filter by service type. Repeat the parameter to include multiple service types. + +
+
+ +
+
+ +**$zone:** `?string` β€” Filter by zone. Repeat the parameter to include multiple zones. + +
+
+ +
+
+ +**$accumulate:** `?string` β€” Accumulation period for the usage statistics. + +
+
+
+
+ + +
+
+
+ +
$client->account->getAccountNetworkUsage($request) -> AccountNetworkUsage +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns network transfer statistics. JSON responses support a maximum time window of 31 days; CSV responses have no time-window limit. Select the output format with the Accept header using application/json or text/csv. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->account->getAccountNetworkUsage( + new GetAccountNetworkUsageRequest([ + 'from' => new DateTime('2026-07-01T00:00:00Z'), + 'to' => new DateTime('2026-07-01T00:00:00Z'), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$from:** `DateTime` β€” First measurement timestamp in RFC 3339 format. + +
+
+ +
+
+ +**$to:** `DateTime` β€” Last measurement timestamp in RFC 3339 format. + +
+
+ +
+
+ +**$accumulate:** `?string` β€” Accumulate the transfer statistics by hour or day. + +
+
+
+
+ + +
+
+
+ +
$client->account->getAccountResourceUsage() -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns current resource usage counts for the account. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->account->getAccountResourceUsage(); +``` +
+
+
+
+ + +
+
+
+ +
$client->account->getMonthlyResourceBillingSummary($resourceId, $year, $month) -> AccountResourceBillingSummaryResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a billing summary for one resource during the specified month. The API user must have permission to read billing details. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->account->getMonthlyResourceBillingSummary( + 'resource_id', + 'year', + 'month', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$resourceId:** `string` β€” Server UUID, storage UUID, or IP address. + +
+
+ +
+
+ +**$year:** `string` β€” Billing year. + +
+
+ +
+
+ +**$month:** `string` β€” Billing month. + +
+
+
+
+ + +
+
+
+ +
$client->account->getAccountResourceNetworkUsage($request) -> AccountResourceNetworkUsage +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns network transfer statistics grouped by resource, service, and zone. JSON responses support a maximum time window of 31 days; CSV responses have no time-window limit. Select the output format with the Accept header using application/json or text/csv. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->account->getAccountResourceNetworkUsage( + new GetAccountResourceNetworkUsageRequest([ + 'from' => new DateTime('2026-07-01T00:00:00Z'), + 'to' => new DateTime('2026-07-01T00:00:00Z'), + 'resourceId' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'zone' => 'fi-hel1', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$from:** `DateTime` β€” Data start timestamp in RFC 3339 format. + +
+
+ +
+
+ +**$to:** `DateTime` β€” Data end timestamp in RFC 3339 format. + +
+
+ +
+
+ +**$service:** `?string` β€” Limit results to a service type. Repeat the parameter to include multiple service types. + +
+
+ +
+
+ +**$resourceId:** `?string` β€” Limit results to this resource UUID. + +
+
+ +
+
+ +**$zone:** `?string` β€” Limit results to a zone. Repeat the parameter to include multiple zones. + +
+
+ +
+
+ +**$accumulate:** `?string` β€” Accumulate the transfer statistics by hour or day. + +
+
+
+
+ + +
+
+
+ +
$client->account->createSubaccount($request) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a subaccount for the authenticated main account. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->account->createSubaccount( + new CreateSubaccountRequest([ + 'subAccount' => new CreateSubaccountRequestSubAccount([ + 'username' => 'myusername', + 'password' => 'mysecr3tPassword', + 'firstName' => 'first', + 'lastName' => 'last', + 'company' => 'my company name', + 'vatNumber' => 'my vat number', + 'address' => 'my address', + 'postalCode' => '00130', + 'city' => 'Helsinki', + 'state' => '', + 'country' => 'FIN', + 'email' => 'user@example.com', + 'phone' => '+358.31245434', + 'language' => 'en', + 'currency' => 'EUR', + 'timezone' => 'Europe/Helsinki', + 'allowApi' => AccountBooleanYesno::Yes->value, + 'allowGui' => AccountBooleanYesno::No->value, + 'roles' => new CreateSubaccountRequestSubAccountRoles([ + 'role' => [ + 'technical', + 'billing', + 'aux_billing', + ], + ]), + 'labels' => [ + new AccountLabel([ + 'key' => 'department', + 'value' => 'it', + ]), + ], + 'ipFilters' => new CreateSubaccountRequestSubAccountIpFilters([ + 'ipFilter' => [ + 'ip_filter', + ], + ]), + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$subAccount:** `CreateSubaccountRequestSubAccount` + +
+
+
+
+ + +
+
+
+ +
$client->account->deleteSubaccount($username) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a subaccount from the authenticated main account. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->account->deleteSubaccount( + 'username', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$username:** `string` β€” Subaccount username. + +
+
+
+
+ + +
+
+
+ +## kubernetes +
$client->kubernetes->listKubernetesClusters() -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of Kubernetes clusters. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->listKubernetesClusters(); +``` +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->createKubernetesCluster($request) -> KubernetesCluster +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new Kubernetes cluster. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->createKubernetesCluster( + new KubernetesCluster([ + 'controlPlaneIpFilter' => [ + '1.2.3.0/24', + '1.1.1.1', + ], + 'name' => 'example-cluster', + 'network' => '33333333-3333-3333-333333333333', + 'networkCidr' => '172.16.0.0/24', + 'nodeGroups' => [ + new KubernetesNodeGroup([ + 'count' => 4, + 'kubeletArgs' => [ + new KubernetesKubeletArg([ + 'key' => 'log-flush-frequency', + 'value' => '5s', + ]), + ], + 'labels' => [ + new KubernetesLabel([ + 'key' => 'managedBy', + 'value' => 'exampleDevelopmentTeam', + ]), + new KubernetesLabel([ + 'key' => 'environment', + 'value' => 'development', + ]), + ], + 'name' => 'small', + 'plan' => 'K8S-2xCPU-4GB', + 'sshKeys' => [ + 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV', + ], + 'storage' => '01000000-0000-4000-8000-000160010100', + 'taints' => [ + new KubernetesTaint([ + 'effect' => KubernetesEffect::NoSchedule->value, + 'key' => 'environment', + 'value' => 'development', + ]), + ], + ]), + new KubernetesNodeGroup([ + 'count' => 8, + 'kubeletArgs' => [ + new KubernetesKubeletArg([ + 'key' => 'log-flush-frequency', + 'value' => '15s', + ]), + ], + 'labels' => [ + new KubernetesLabel([ + 'key' => 'managedBy', + 'value' => 'exampleStagingTeam', + ]), + new KubernetesLabel([ + 'key' => 'environment', + 'value' => 'staging', + ]), + ], + 'name' => 'medium', + 'plan' => 'K8S-4xCPU-8GB', + 'sshKeys' => [ + 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV', + ], + 'storage' => '01000000-0000-4000-8000-000160010100', + 'taints' => [ + new KubernetesTaint([ + 'effect' => KubernetesEffect::NoSchedule->value, + 'key' => 'environment', + 'value' => 'staging', + ]), + ], + ]), + ], + 'zone' => 'de-fra1', + 'version' => 'version', + 'labels' => [ + [ + 'key' => "env", + 'value' => "prod", + ], + [ + 'key' => "app", + 'value' => "cats-dating-app", + ], + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$request:** `KubernetesCluster` + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->getKubernetesCluster($uuid) -> KubernetesCluster +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns Kubernetes cluster details by given `uuid`. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->getKubernetesCluster( + 'uuid', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->deleteKubernetesCluster($uuid) -> KubernetesAccepted +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes an existing Kubernetes cluster by given `uuid`. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->deleteKubernetesCluster( + 'uuid', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->modifyKubernetesCluster($uuid, $request) -> KubernetesCluster +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies an existing Kubernetes cluster by given `{uuid}`. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->modifyKubernetesCluster( + 'uuid', + new KubernetesClusterPatch([ + 'controlPlaneIpFilter' => [ + '1.2.3.0/24', + '1.1.1.1', + ], + 'labels' => [ + [ + 'key' => "env", + 'value' => "prod", + ], + [ + 'key' => "app", + 'value' => "cats-dating-app", + ], + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+ +
+
+ +**$controlPlaneIpFilter:** `?array` + +
+
+ +
+
+ +**$labels:** `mixed` + +
+
+ +
+
+ +**$plan:** `?string` + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->getKubernetesClusterKubeconfig($uuid) -> KubernetesClusterKubeconfig +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns kubeconfig for Kubernetes cluster by given `{uuid}`. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->getKubernetesClusterKubeconfig( + 'uuid', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->getKubernetesClusterAvailableUpgrades($uuid) -> KubernetesClusterAvailableUpgrades +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available versions that can be used to upgrade the cluster. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->getKubernetesClusterAvailableUpgrades( + 'uuid', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->upgradeKubernetesCluster($uuid, $request) -> KubernetesClusterAvailableUpgradesPost +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Upgrades an existing Kubernetes cluster to specific version. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->upgradeKubernetesCluster( + 'uuid', + new UpgradeKubernetesClusterRequest([ + 'body' => new KubernetesClusterAvailableUpgradesPost([ + 'version' => '1.31', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+ +
+
+ +**$request:** `KubernetesClusterAvailableUpgradesPost` + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->listKubernetesClusterNodeGroups($uuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available node groups of an existing Kubernetes cluster. Cluster is identified by given `{uuid}`. + +A node group is a uniform set of worker nodes attached to a cluster. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->listKubernetesClusterNodeGroups( + 'uuid', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->createKubernetesClusterNodeGroup($uuid, $request) -> KubernetesNodeGroup +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new node group to an existing Kubernetes cluster. Cluster is identified by given `{uuid}`. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->createKubernetesClusterNodeGroup( + 'uuid', + new CreateKubernetesClusterNodeGroupRequest([ + 'body' => new KubernetesNodeGroup([ + 'count' => 4, + 'kubeletArgs' => [ + new KubernetesKubeletArg([ + 'key' => 'log-flush-frequency', + 'value' => '5s', + ]), + ], + 'labels' => [ + new KubernetesLabel([ + 'key' => 'managedBy', + 'value' => 'exampleDevelopmentTeam', + ]), + new KubernetesLabel([ + 'key' => 'environment', + 'value' => 'development', + ]), + ], + 'name' => 'small', + 'plan' => 'K8S-2xCPU-4GB', + 'sshKeys' => [ + 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV', + ], + 'storage' => '01000000-0000-4000-8000-000160010100', + 'taints' => [ + new KubernetesTaint([ + 'effect' => KubernetesEffect::NoSchedule->value, + 'key' => 'environment', + 'value' => 'development', + ]), + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+ +
+
+ +**$request:** `KubernetesNodeGroup` + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->getKubernetesClusterNodeGroup($uuid, $name) -> KubernetesNodeGroupDetails +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns node group details by given `{node_group_name}`. Cluster is identified by given `{uuid}`. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->getKubernetesClusterNodeGroup( + 'uuid', + 'name', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+ +
+
+ +**$name:** `string` β€” Name + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->deleteKubernetesClusterNodeGroup($uuid, $name) -> KubernetesAccepted +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes an existing node group by given Kubernetes cluster `{uuid}` and `{node_group_name}`. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->deleteKubernetesClusterNodeGroup( + 'uuid', + 'name', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+ +
+
+ +**$name:** `string` β€” Name + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->modifyKubernetesClusterNodeGroup($uuid, $name, $request) -> KubernetesNodeGroup +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies an existing node group of a cluster. Cluster is identified by given `{uuid}` and node group by `{node_group_name}`. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->modifyKubernetesClusterNodeGroup( + 'uuid', + 'name', + new KubernetesNodeGroupPatch([ + 'count' => 16, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+ +
+
+ +**$name:** `string` β€” Name + +
+
+ +
+
+ +**$count:** `int` + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->deleteKubernetesClusterNodeGroupNode($uuid, $name, $nodeName) -> KubernetesAccepted +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a node group node from a cluster (experimental). Cluster is identified by given `{uuid}`, node group by `{name}`, and node by `{node-name}`. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->deleteKubernetesClusterNodeGroupNode( + 'uuid', + 'name', + 'node-name', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+ +
+
+ +**$name:** `string` β€” Name + +
+
+ +
+
+ +**$nodeName:** `string` β€” Node name + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->listKubernetesPlans() -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available Kubernetes cluster plans. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->listKubernetesPlans(); +``` +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->listKubernetesVersions() -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available Kubernetes cluster versions. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->listKubernetesVersions(); +``` +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->listClusterAuthentication($uuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns all OIDC authentication issuer configurations for a cluster. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->listClusterAuthentication( + 'uuid', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->createClusterAuthentication($uuid, $request) -> KubernetesAuthenticationIssuerConfig +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new OIDC authentication issuer configuration. The new entry is validated together with the cluster's existing entries before being applied. Fails if an entry with the same name already exists. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->createClusterAuthentication( + 'uuid', + new CreateClusterAuthenticationRequest([ + 'body' => new KubernetesAuthenticationIssuerConfig([ + 'name' => 'name', + 'issuerUrl' => 'https://accounts.myoidcprovider.com', + 'audiences' => [ + 'client-id-123', + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+ +
+
+ +**$request:** `KubernetesAuthenticationIssuerConfig` + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->setClusterAuthentication($uuid, $request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Replaces the entire set of OIDC authentication issuer configurations for a cluster with the supplied JSON list of issuers. The full set is validated before being applied. An empty list clears all issuers. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->setClusterAuthentication( + 'uuid', + new SetClusterAuthenticationRequest([ + 'body' => [ + new KubernetesAuthenticationIssuerConfig([ + 'name' => 'name', + 'issuerUrl' => 'https://accounts.myoidcprovider.com', + 'audiences' => [ + 'client-id-123', + ], + ]), + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+ +
+
+ +**$request:** `array` + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->importClusterAuthentication($uuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Replaces the entire set of OIDC authentication issuer configurations for a cluster with the supplied native kube-apiserver v1 AuthenticationConfiguration YAML document. Issuers are named deterministically from their issuer URL host. The top-level `anonymous` field is not supported and any configuration that would drop data is rejected. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->importClusterAuthentication( + 'uuid', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->getClusterAuthentication($uuid, $name) -> KubernetesAuthenticationIssuerConfig +
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->getClusterAuthentication( + 'uuid', + 'name', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+ +
+
+ +**$name:** `string` β€” Name + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->updateClusterAuthentication($uuid, $name, $request) -> KubernetesAuthenticationIssuerConfig +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Updates an existing OIDC authentication issuer configuration. The name in the path is authoritative. The updated entry is validated together with the cluster's other entries before being applied. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->updateClusterAuthentication( + 'uuid', + 'name', + new UpdateClusterAuthenticationRequest([ + 'body' => new KubernetesAuthenticationIssuerConfig([ + 'name' => 'name', + 'issuerUrl' => 'https://accounts.myoidcprovider.com', + 'audiences' => [ + 'client-id-123', + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+ +
+
+ +**$name:** `string` β€” Name + +
+
+ +
+
+ +**$request:** `KubernetesAuthenticationIssuerConfig` + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->deleteClusterAuthentication($uuid, $name) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Removes an OIDC authentication issuer configuration by name. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->deleteClusterAuthentication( + 'uuid', + 'name', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+ +
+
+ +**$name:** `string` β€” Name + +
+
+
+
+ + +
+
+
+ +
$client->kubernetes->getKubernetesClusterOidcKubeconfig($uuid, $name, $request) -> KubernetesClusterKubeconfig +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a kubeconfig for the cluster whose user authenticates via the kubelogin (`kubectl oidc-login`) exec credential plugin, using the cluster's configured OIDC issuer identified by the `name` path parameter. The plugin (kubelogin) must be installed on the client. No long-lived credential is embedded. The OIDC client secret and any provider-specific kubelogin flags are not injected by the server; the returned kubeconfig includes comments describing how to add them. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->kubernetes->getKubernetesClusterOidcKubeconfig( + 'uuid', + 'name', + new GetKubernetesClusterOidcKubeconfigRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID + +
+
+ +
+
+ +**$name:** `string` β€” Name + +
+
+ +
+
+ +**$audience:** `?string` β€” Which of the issuer's configured audiences to use as the OIDC client id in the generated kubeconfig. When omitted, the issuer's first audience is used. Must match one of the issuer's audiences. + +
+
+
+
+ + +
+
+
+ +## currency +
$client->currency->listCurrencies() -> CurrencyCurrencies +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves a list of supported currencies and their exchange rates relative to the account credit currency. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->currency->listCurrencies(); +``` +
+
+
+
+ + +
+
+
+ +## device +
$client->device->getAvailablePassthroughDevices($request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available passthrough devices. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->device->getAvailablePassthroughDevices( + new GetAvailablePassthroughDevicesRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$zone:** `?string` β€” Filter results to a specific zone. + +
+
+ +
+
+ +**$type:** `?string` β€” Filter results to a specific device type. The only valid type is "gpu" for now. + +
+
+
+
+ + +
+
+
+ +## events +
$client->events->listEvents($serverUuid, $offset, $count) -> Events +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves a list of events. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->events->listEvents( + 'server_uuid', + 1, + 1, +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serverUuid:** `string` β€” Filter results to a specific server. + +
+
+ +
+
+ +**$offset:** `int` β€” The number of items to skip before starting to collect the result set. Default is 0. + +
+
+ +
+
+ +**$count:** `int` β€” The numbers of items to return. + +
+
+
+
+ + +
+
+
+ +## ip_address +
$client->ipAddress->listIpAddresses() -> IpAddressesResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves a list of IP addresses. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->ipAddress->listIpAddresses(); +``` +
+
+
+
+ + +
+
+
+ +
$client->ipAddress->addIpAddress($request) -> IpAddressRequest +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Adds a new IP address. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->ipAddress->addIpAddress( + new AddIpAddressRequest([ + 'ipAddress' => new AddIpAddressRequestIpAddress([ + 'access' => 'access', + 'family' => IpAddressIpFamily::IPv4->value, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$ipAddress:** `AddIpAddressRequestIpAddress` + +
+
+
+
+ + +
+
+
+ +
$client->ipAddress->bulkModifyIpAddresses($request) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies attributes of multiple IP addresses in a single request. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->ipAddress->bulkModifyIpAddresses( + new BulkPatchIpAddressesRequestV13([ + 'ipAddresses' => [ + new BulkPatchIpAddressesRequestV13IpAddressesItem([ + 'address' => 'address', + 'mainAccountId' => 1000000, + 'delegatedToAccountId' => 1000000, + 'releasePolicy' => IpAddressIpReleasePolicy::Release->value, + ]), + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$ipAddresses:** `array` + +
+
+
+
+ + +
+
+
+ +
$client->ipAddress->getIpAddressDetails($address) -> IpAddressResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves details of a specific IP address. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->ipAddress->getIpAddressDetails( + 'address', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$address:** `string` β€” The IP address to retrieve details for. + +
+
+
+
+ + +
+
+
+ +
$client->ipAddress->modifyIpAddress($address, $request) -> IpAddressRequest +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies attributes of a specific IP address. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->ipAddress->modifyIpAddress( + 'address', + new ModifyIpAddressRequestV10([ + 'ipAddress' => new ModifyIpAddressRequestV10IpAddress([ + 'ptrRecord' => 'host.example.com', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$address:** `string` β€” The IP address to modify. + +
+
+ +
+
+ +**$ipAddress:** `ModifyIpAddressRequestV10IpAddress` + +
+
+
+
+ + +
+
+
+ +
$client->ipAddress->deleteIpAddress($address) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a specific IP address. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->ipAddress->deleteIpAddress( + 'address', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$address:** `string` β€” The IP address to delete. + +
+
+
+
+ + +
+
+
+ +
$client->ipAddress->patchModifyIpAddress($address, $request) -> IpAddressRequest +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies attributes of a specific IP address. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->ipAddress->patchModifyIpAddress( + 'address', + new PatchIpAddressRequestV13([ + 'ipAddress' => new PatchIpAddressRequestV13IpAddress([]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$address:** `string` β€” The IP address to modify. + +
+
+ +
+
+ +**$ipAddress:** `PatchIpAddressRequestV13IpAddress` + +
+
+
+
+ + +
+
+
+ +## network-peering +
$client->networkPeering->listNetworkPeerings($request) -> NetworkPeerings +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get a list of all peerings within the current account. Only peerings that refer to a network that the current +account has access are returned. + +It is also possible to filter network peering with label URL parameters, e.g. +`?label=env` or `?label=env%3Dprod`. The URL parameter can be given multiple +times to add more filters (e.g. `?label=env%3Dprod&label=v2`), where +only network peering that match all labels are returned. +Label keys are matched case insensitively. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->networkPeering->listNetworkPeerings( + new ListNetworkPeeringsRequest([ + 'uuid' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'networkUuidLocal' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'networkUuidPeer' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `?string` β€” Filter by network peering UUID. + +
+
+ +
+
+ +**$networkUuidLocal:** `?string` β€” Filter by local network uuid. + +
+
+ +
+
+ +**$networkUuidPeer:** `?string` β€” Filter by peer network uuid. + +
+
+ +
+
+ +**$label:** `?string` β€” Label filter in the form key=value. Can be specified multiple times to filter by multiple labels. + +
+
+
+
+ + +
+
+
+ +
$client->networkPeering->createNetworkPeering($request) -> NetworkPeering +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Network peerings are used to enable traffic between two networks that can be on different main accounts. +The peering must be established both ways before it's considered as active. Peering is only supported between networks +of type `private`. + +**Note**: you should only create peering between accounts and networks you trust. There is no limits on what traffic +can flow. The server firewall **has no effect** for `private` type networks. + +It is required that both networks have a *Router* attached to the network. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->networkPeering->createNetworkPeering( + new NetworkPeeringCreate([ + 'configuredStatus' => NetworkPeeringCreateConfiguredStatus::Active->value, + 'name' => 'Peering A->B', + 'network' => new NetworkPeeringCreateNetwork([ + 'uuid' => '03126dc1-a69f-4bc2-8b24-e31c22d64712', + ]), + 'peerNetwork' => new NetworkPeeringCreatePeerNetwork([ + 'uuid' => '03585987-bf7d-4544-8e9b-5a1b4d74a333', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$configuredStatus:** `?string` + +
+
+ +
+
+ +**$name:** `string` + +
+
+ +
+
+ +**$network:** `NetworkPeeringCreateNetwork` β€” Describes the local side of the peering + +
+
+ +
+
+ +**$peerNetwork:** `NetworkPeeringCreatePeerNetwork` β€” Describes the peer side of the peering + +
+
+
+
+ + +
+
+
+ +
$client->networkPeering->getNetworkPeering($peeringUuid) -> NetworkPeering +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns the state of an existing network peering. + +Note that the `peer_network` field only contains the network details if the peering has been defined by both accounts. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->networkPeering->getNetworkPeering( + 'peering_uuid', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$peeringUuid:** `string` β€” The network peering identifier. + +
+
+
+
+ + +
+
+
+ +
$client->networkPeering->deleteNetworkPeering($peeringUuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a network peering. It is required that the peering is in `disabled` state before delete is possible. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->networkPeering->deleteNetworkPeering( + 'peering_uuid', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$peeringUuid:** `string` β€” The network peering identifier. + +
+
+
+
+ + +
+
+
+ +
$client->networkPeering->modifyNetworkPeering($peeringUuid, $request) -> NetworkPeering +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies attributes of an existing network peering. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->networkPeering->modifyNetworkPeering( + 'peering_uuid', + new NetworkPeeringModify([ + 'configuredStatus' => NetworkPeeringModifyConfiguredStatus::Disabled->value, + 'name' => 'Peering A->B modified', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$peeringUuid:** `string` β€” The network peering identifier. + +
+
+ +
+
+ +**$configuredStatus:** `?string` + +
+
+ +
+
+ +**$name:** `?string` + +
+
+
+
+ + +
+
+
+ +## network +
$client->network->listNetworks($request) -> Networks +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get a list of all networks. + +It is also possible to filter networks with label URL parameters, e.g. +`?label=env` or `?label=env%3Dprod`. URL parameter can be given multiple +times to add more filters (e.g. `?label=env%3Dprod&label=v2`), where +only networks that match all labels are returned. +Label keys are matched case insensitively. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->network->listNetworks( + new ListNetworksRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$label:** `?NetworkLabel` β€” Filter networks by labels. + +
+
+
+
+ + +
+
+
+ +
$client->network->createNetwork($request) -> Network +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new SDN private network that cloud servers from the same zone can be attached to. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->network->createNetwork( + new CreateNetworkRequest([ + 'network' => new CreateNetworkRequestNetwork([ + 'type' => NetworkType::Private_->value, + 'name' => 'backend-net', + 'zone' => 'fi-hel2', + 'ipNetworks' => new CreateNetworkRequestNetworkIpNetworks([ + 'ipNetwork' => [ + new CreateNetworkRequestNetworkIpNetworksIpNetworkItem([ + 'family' => NetworkIpFamily::IPv4->value, + 'address' => '10.0.0.0/24', + 'dhcp' => NetworkBooleanYesno::Yes->value, + ]), + ], + ]), + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$network:** `CreateNetworkRequestNetwork` + +
+
+
+
+ + +
+
+
+ +
$client->network->listNetworkInterfaces() -> NetworkInterfaces +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves a list of network interfaces. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->network->listNetworkInterfaces(); +``` +
+
+
+
+ + +
+
+
+ +
$client->network->createNetworkInterface($request) -> NetworkInterface +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new network interface. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->network->createNetworkInterface( + new NetworkCreateInterfaceRequest([ + 'mainAccountId' => 123456, + 'interface' => new NetworkCreateInterfaceRequestInterface([ + 'bootable' => NetworkBooleanYesno::No->value, + 'network' => '8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a001', + 'sourceIpFiltering' => NetworkBooleanYesno::Yes->value, + 'type' => NetworkType::Private_->value, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$mainAccountId:** `?int` + +
+
+ +
+
+ +**$interface_:** `?NetworkCreateInterfaceRequestInterface` + +
+
+
+
+ + +
+
+
+ +
$client->network->getNetworkInterfaceDetails($uuid) -> Network +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves details of a specific network interface. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->network->getNetworkInterfaceDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID of the network interface. + +
+
+
+
+ + +
+
+
+ +
$client->network->deleteNetworkInterface($uuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a specific network interface. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->network->deleteNetworkInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID of the network. + +
+
+
+
+ + +
+
+
+ +
$client->network->getNetworkDetails($uuid) -> Network +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves details of a specific network. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->network->getNetworkDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID of the network. + +
+
+
+
+ + +
+
+
+ +
$client->network->modifyNetwork($uuid, $request) -> Network +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies the details of a specific SDN private network. The Utility and public networks cannot be modified. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->network->modifyNetwork( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyNetworkRequest([ + 'network' => new ModifyNetworkRequestNetwork([ + 'type' => NetworkType::Public_->value, + 'name' => 'name', + 'zone' => 'fi-hel1', + 'tags' => new NetworkTags([ + 'tags' => new NetworkTagsTags([ + 'tag' => [ + new NetworkTagsTagsTagItem([ + 'description' => 'Production servers', + 'name' => 'PROD', + 'servers' => new NetworkServers([ + 'server' => [ + '0077fa3d-32db-4b09-9f5f-30d9e9afb565', + ], + ]), + ]), + ], + ]), + ]), + 'labels' => new NetworkLabels([ + 'label' => [ + new NetworkLabel([ + 'key' => 'env', + 'value' => 'prod', + ]), + new NetworkLabel([ + 'key' => 'team', + 'value' => 'network', + ]), + ], + ]), + 'router' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'grtExport' => 1000000, + 'parentNetwork' => 'parent_network', + 'ipNetworks' => new ModifyNetworkRequestNetworkIpNetworks([ + 'ipNetwork' => [ + new ModifyNetworkRequestNetworkIpNetworksIpNetworkItem([ + 'family' => NetworkIpFamily::IPv4->value, + 'address' => 'address', + ]), + ], + ]), + 'networkFeatures' => NetworkFeatures::AllowLinklocalAddress->value, + 'mainAccountId' => 1000000, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID of the network. + +
+
+ +
+
+ +**$network:** `ModifyNetworkRequestNetwork` + +
+
+
+
+ + +
+
+
+ +
$client->network->deleteNetwork($uuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes an SDN private network. All attached cloud servers must first be detached before SDN private networks can be deleted. Utility and public networks can only be detached from servers by [Releasing the corresponding IP addresses](https://upcloudltd.github.io/upcloud-openapi-spec/api/ip-address#delete-ip-address). +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->network->deleteNetwork( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” UUID of the network. + +
+
+
+
+ + +
+
+
+ +## audit-logs +
$client->auditLogs->listAuditLogs($request) -> AuditLogsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of audit log rows according to the query parameters. Note that this endpoint is paginated by default and the list is limited in results. + +Pagination +Upcloud-Total-Count header is included in the response to indicate the total number of audit logs available with the current query parameters (excluding limit and offset). The total count can be used for a number of pagination strategies. limit and offset query parameters can be used to finally paginate the results. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->auditLogs->listAuditLogs( + new ListAuditLogsRequest([ + 'q' => 'my_account', + 'limit' => 50, + 'offset' => 0, + 'createdAfter' => new DateTime('2024-01-01T00:00:00Z'), + 'createdBefore' => new DateTime('2024-12-31T23:59:59Z'), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$q:** `?string` β€” Filter audit logs using a keyword such as account username, resource ID or IP address. + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of results to return (max 100, default 50) + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. (default 0) + +
+
+ +
+
+ +**$actions:** `?string` β€” List of actions to filter by + +
+
+ +
+
+ +**$origins:** `?string` β€” List of origins to filter by + +
+
+ +
+
+ +**$resourceTypes:** `?string` β€” List of resource types to filter by + +
+
+ +
+
+ +**$createdAfter:** `?DateTime` β€” List audit logs created after the given timestamp (including the time of timestamp). Format: ISO timestamp eg. 2024-01-01T23:45:56Z + +
+
+ +
+
+ +**$createdBefore:** `?DateTime` β€” List audit logs created before the given timestamp (including the time of timestamp). Format: ISO timestamp eg. 2024-01-01T23:45:56Z + +
+
+
+
+ + +
+
+
+ +
$client->auditLogs->exportAuditLogs($request) -> AuditLogsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Export all audit logs for the authenticated account as CSV or JSON (up to 180 day limit). Note: Use the format parameter to specify output format; only JSON schema is documented here. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->auditLogs->exportAuditLogs( + new ExportAuditLogsRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$format:** `?string` β€” Export format: 'csv' or 'json' (default: csv) + +
+
+
+
+ + +
+
+
+ +
$client->auditLogs->getAuditLog($cloudEventId) -> AuditLogsAuditLog +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns details of a single audit log event by its cloud event ID. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->auditLogs->getAuditLog( + '01HQXYZ123456789ABCDEFGHJK', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$cloudEventId:** `string` β€” Cloud event ID (ULID format) + +
+
+
+
+ + +
+
+
+ +
$client->auditLogs->getFilterOptions() -> AuditLogsFilterOptionsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns lists of available resource types, actions, and origins for filtering. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->auditLogs->getFilterOptions(); +``` +
+
+
+
+ + +
+
+
+ +## partner +
$client->partner->listPartnerAccounts() -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns list of accounts associated with the partner. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->partner->listPartnerAccounts(); +``` +
+
+
+
+ + +
+
+
+ +
$client->partner->createPartnerAccount($request) -> PartnerAccount +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates new UpCloud account that will be linked to partner's existing invoicing. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->partner->createPartnerAccount( + new PartnerCreateAccount([ + 'username' => 'newuser', + 'password' => 'superSecret123', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$username:** `string` + +
+
+ +
+
+ +**$password:** `string` + +
+
+ +
+
+ +**$contactDetails:** `?PartnerCreateAccountContactDetails` + +
+
+
+
+ + +
+
+
+ +## permission +
$client->permission->listPermissions() -> Permissions +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves a list of permissions for sub-accounts to access resources owned by the main account. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->permission->listPermissions(); +``` +
+
+
+
+ + +
+
+
+ +
$client->permission->replacePermissions($request) -> Permissions +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Replaces the entire set of permissions for sub-accounts to access resources owned by the main account. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->permission->replacePermissions( + new Permission([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$request:** `Permission` + +
+
+
+
+ + +
+
+
+ +
$client->permission->grantPermission($request) -> Permission +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Grants a permission for a sub-account to access a resource owned by the main account. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->permission->grantPermission( + new GrantPermissionRequest([ + 'body' => new Permission([]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$skipTargetCheck:** `?bool` β€” If true, skips the check whether the target resource exists. Default is false. + +
+
+ +
+
+ +**$request:** `Permission` + +
+
+
+
+ + +
+
+
+ +
$client->permission->revokePermission($request) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Revokes a permission for a sub-account to access a resource owned by the main account. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->permission->revokePermission( + new Permission([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$request:** `Permission` + +
+
+
+
+ + +
+
+
+ +
$client->permission->revokeAllPermissionsByTarget($targetType, $targetIdentifier, $request) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Revokes all permissions for sub-accounts to access a specific resource owned by the main account. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->permission->revokeAllPermissionsByTarget( + 'target_type', + 'target_identifier', + new RevokeAllPermissionsByTargetRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$targetType:** `string` β€” The type of the target resource (e.g., "server", "storage"). + +
+
+ +
+
+ +**$targetIdentifier:** `string` β€” The identifier of the target resource. + +
+
+ +
+
+ +**$mainAccountId:** `?int` β€” If specified, revokes permissions for resources owned by the specified main account ID. Default is the current main account. + +
+
+
+
+ + +
+
+
+ +
$client->permission->revokeAllPermissionsByUser($user) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Revokes all permissions for a specific sub-account to access any resources owned by the main account. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->permission->revokeAllPermissionsByUser( + 'user', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$user:** `string` β€” The username of the sub-account. + +
+
+
+
+ + +
+
+
+ +## plan +
$client->plan->listPlans() -> Plan +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available plans. All plans are available in all zones but pricing may differ. See _List prices_ for how to obtain current price list. + +In addition to listed plans, server can be freely configured with "custom" plan which allows freely scalable CPU cores, memory amount and storage resources. __Note!__ Custom plans are available for new customers through contact with sales. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->plan->listPlans(); +``` +
+
+
+
+ + +
+
+
+ +## price +
$client->price->getPrice($request) -> Prices +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a price list. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->price->getPrice( + new GetPriceRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$zone:** `?string` β€” Filter results to a specific zone. Can be specified multiple times. + +
+
+
+
+ + +
+
+
+ +## router +
$client->router->listRouters($request) -> Routers +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of all available routers associated with the current account. + +It is also possible to filter routers with label URL parameters, e.g. +`?label=env` or `?label=env%3Dprod`. URL parameter can be given multiple +times to add more filters (e.g. `?label=env%3Dprod&label=v2`), where +only routers that match all labels are returned. +Label keys are matched case insensitively. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->router->listRouters( + new ListRoutersRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$label:** `?RouterLabel` β€” A label filter. Can be specified multiple times to create an AND condition. Format: label=key:value + +
+
+
+
+ + +
+
+
+ +
$client->router->createRouter($request) -> Router +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new router. +Routers can be used to connect multiple Private Networks. Cloud Servers on any attached network can communicate +directly with each other. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->router->createRouter( + new RouterCreate([ + 'router' => new RouterCreateRouter([ + 'name' => 'Example router', + 'staticRoutes' => [ + new RouterCreateRouterStaticRoutesItem([ + 'name' => 'static-route-0', + 'nexthop' => '192.168.1.1', + 'route' => '0.0.0.0/0', + ]), + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$router:** `RouterCreateRouter` + +
+
+
+
+ + +
+
+
+ +
$client->router->getRouter($router) -> Router +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves details of a specific router. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->router->getRouter( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$router:** `string` β€” The router identifier. + +
+
+
+
+ + +
+
+
+ +
$client->router->deleteRouter($router) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a specific router. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->router->deleteRouter( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$router:** `string` β€” The router identifier. + +
+
+
+
+ + +
+
+
+ +
$client->router->modifyRouter($router, $request) -> Router +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies attributes of a specific router. +Modifications to static routes of type `service` will be ignored. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->router->modifyRouter( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new RouterModify([ + 'routerModifyRouter' => new RouterModifyRouter([ + 'name' => 'Example router', + 'staticRoutes' => [ + new RouterModifyRouterStaticRoutesItem([ + 'name' => 'static-route-0', + 'nexthop' => '192.168.1.1', + 'route' => '0.0.0.0/0', + ]), + ], + 'labels' => [ + new RouterLabel([ + 'key' => 'service', + 'value' => 'postgres cluster connectivity', + ]), + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$router:** `string` β€” The router identifier. + +
+
+ +
+
+ +**$routerModifyRouter:** `RouterModifyRouter` + +
+
+
+
+ + +
+
+
+ +## server-group +
$client->serverGroup->listServerGroups($request) -> ServerGroups +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves a list of server groups. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->serverGroup->listServerGroups( + new ListServerGroupsRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$label:** `?ServerGroupLabel` β€” A label filter to apply. Format: key:value. Multiple labels can be specified by repeating the parameter. + +
+
+
+
+ + +
+
+
+ +
$client->serverGroup->createServerGroup($request) -> ServerGroup +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new server group. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->serverGroup->createServerGroup( + new ServerGroupModify([ + 'serverGroup' => new ServerGroupModifyServerGroup([ + 'title' => 'edge-cluster-a', + 'servers' => new ServerGroupServers([ + 'servers' => [ + '00fce2f9-f9f4-46ff-86af-9e60f131f5cb', + ], + ]), + 'labels' => new ServerGroupModifyServerGroupLabels([ + 'label' => [ + new ServerGroupLabel([ + 'key' => 'env', + 'value' => 'prod', + ]), + ], + ]), + 'antiAffinity' => ServerGroupAntiAffinity::Yes->value, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$request:** `ServerGroupModify` + +
+
+
+
+ + +
+
+
+ +
$client->serverGroup->getServerGroup($uuid) -> ServerGroup +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves details of a specific server group. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->serverGroup->getServerGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” The UUID of the server group to retrieve. + +
+
+
+
+ + +
+
+
+ +
$client->serverGroup->deleteServerGroup($uuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a specific server group. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->serverGroup->deleteServerGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” The UUID of the server group to delete. + +
+
+
+
+ + +
+
+
+ +
$client->serverGroup->modifyServerGroup($uuid, $request) -> ServerGroup +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies an existing server group. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->serverGroup->modifyServerGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyServerGroupRequest([ + 'body' => new ServerGroupModify([ + 'serverGroup' => new ServerGroupModifyServerGroup([ + 'title' => 'edge-cluster-a', + 'servers' => new ServerGroupServers([ + 'servers' => [ + '00fce2f9-f9f4-46ff-86af-9e60f131f5cb', + ], + ]), + 'labels' => new ServerGroupModifyServerGroupLabels([ + 'label' => [ + new ServerGroupLabel([ + 'key' => 'env', + 'value' => 'prod', + ]), + ], + ]), + 'antiAffinity' => ServerGroupAntiAffinity::Yes->value, + ]), + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” The UUID of the server group to modify. + +
+
+ +
+
+ +**$request:** `ServerGroupModify` + +
+
+
+
+ + +
+
+
+ +
$client->serverGroup->listServerGroupMembers($uuid) -> ServerGroupServers +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves a list of servers that are members of a specific server group. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->serverGroup->listServerGroupMembers( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” The UUID of the server group whose members are to be listed. + +
+
+
+
+ + +
+
+
+ +
$client->serverGroup->addServerToGroup($uuid, $request) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Adds a server to a specific server group. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->serverGroup->addServerToGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerGroupServerAdd([ + 'server' => new ServerGroupServerAddServer([ + 'uuid' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” The UUID of the server group to which the server will be added. + +
+
+ +
+
+ +**$server:** `ServerGroupServerAddServer` + +
+
+
+
+ + +
+
+
+ +
$client->serverGroup->removeServerFromGroup($uuid, $serverUuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Removes a server from a specific server group. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->serverGroup->removeServerFromGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” The UUID of the server group from which the server will be removed. + +
+
+ +
+
+ +**$serverUuid:** `string` β€” The UUID of the server to remove from the group. + +
+
+
+
+ + +
+
+
+ +## server +
$client->server->listServers($request) -> GetServerList +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns the most relevant information for Cloud Servers associated with the current account. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->listServers( + new ListServersRequest([ + 'uuid' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'host' => 7653311107, + 'tag' => 'prod,web', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$label:** `?string` β€” Filter by label key or key-value pair using "key" or "key=value". Repeat the parameter to require all labels. + +
+
+ +
+
+ +**$uuid:** `?string` β€” Filter by Cloud Server UUID. Repeat the parameter to match any of up to five UUIDs. + +
+
+ +
+
+ +**$host:** `?int` β€” Filter by Private Cloud host ID. Repeat the parameter to match any of up to five hosts. + +
+
+ +
+
+ +**$device:** `?string` β€” Filter by attached device using "type=gpu" or "type!=gpu". Repeat the parameter for up to five filters. + +
+
+ +
+
+ +**$state:** `?string` β€” Filter by the current Cloud Server state. + +
+
+ +
+
+ +**$tag:** `?string` β€” Filter by tag name. Separate names with commas to match any tag or colons to require all tags. + +
+
+ +
+
+ +**$search:** `?string` β€” Search UUIDs, titles, hostnames, zones, zone descriptions, IP addresses, tags, and template names. + +
+
+ +
+
+ +**$sortBy:** `?string` β€” Field to sort by. + +
+
+ +
+
+ +**$orderBy:** `?string` β€” Sort direction. Only applied when sort_by is specified. + +
+
+ +
+
+ +**$limit:** `?int` β€” Maximum number of Cloud Servers to return. + +
+
+ +
+
+ +**$offset:** `?int` β€” Number of Cloud Servers to skip. + +
+
+
+
+ + +
+
+
+ +
$client->server->createServer($request) -> CreateServerResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new Cloud Server +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->createServer( + new CreateServer([ + 'server' => new CreateServerServer([ + 'hostname' => 'my-server.example.com', + 'loginUser' => new ServerLoginUser([ + 'sshKeys' => new ServerLoginUserSshKeys([ + 'sshKey' => [ + 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO3t5AQcuv4+KxJ5rC75N8bW/e7eOq0k5Y2L7V1oH3Z5 user@example.com', + ], + ]), + 'username' => 'upclouduser', + ]), + 'networking' => new ServerCreateNetworking([ + 'interfaces' => new ServerCreateNetworkingInterfaces([ + 'interface' => [ + new ServerCreateNetworkingInterfacesInterfaceItem([ + 'ipAddresses' => new ServerCreateNetworkingInterfacesInterfaceItemIpAddresses([ + 'ipAddress' => [ + new ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem([ + 'family' => ServerIpFamily::IPv4->value, + ]), + ], + ]), + 'type' => ServerNetworkType::Public_->value, + ]), + new ServerCreateNetworkingInterfacesInterfaceItem([ + 'ipAddresses' => new ServerCreateNetworkingInterfacesInterfaceItemIpAddresses([ + 'ipAddress' => [ + new ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem([ + 'family' => ServerIpFamily::IPv4->value, + ]), + ], + ]), + 'type' => ServerNetworkType::Utility->value, + ]), + new ServerCreateNetworkingInterfacesInterfaceItem([ + 'ipAddresses' => new ServerCreateNetworkingInterfacesInterfaceItemIpAddresses([ + 'ipAddress' => [ + new ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem([ + 'family' => ServerIpFamily::IPv4->value, + ]), + ], + ]), + 'network' => '03000000-0000-4000-8000-000000000000', + 'type' => ServerNetworkType::Private_->value, + ]), + ], + ]), + ]), + 'plan' => '1xCPU-1GB', + 'metadata' => ServerBooleanYesno::Yes->value, + 'storageDevices' => new ServerStorageDevices([ + 'storageDevice' => [ + new ServerStorageDevicesStorageDeviceItem([ + 'action' => ServerStorageDevicesStorageDeviceItemAction::Clone_->value, + 'size' => 30, + 'storage' => '01000000-0000-4000-8000-000020080100', + 'tier' => 'maxiops', + 'title' => 'Debian Trixie', + ]), + ], + ]), + 'title' => 'My Server', + 'zone' => 'fi-hel1', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$server:** `CreateServerServer` + +
+
+
+
+ + +
+
+
+ +
$client->server->listFirewallRulesetRelationships($rulesetUuid) -> FirewallRulesetRelatedServers +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Return Cloud Servers visible to the authenticated account that are related to a private firewall ruleset, including each Cloud Server's private ruleset relationships. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->listFirewallRulesetRelationships( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+
+
+ + +
+
+
+ +
$client->server->getLabels() -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns the unique label key-value pairs used by Cloud Servers accessible to the current account. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->getLabels(); +``` +
+
+
+
+ + +
+
+
+ +
$client->server->getServer($uuid) -> Server +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns detailed information about a Cloud Server. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->getServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+
+
+ + +
+
+
+ +
$client->server->modifyServer($uuid, $request) -> Server +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies an existing Cloud Server configuration. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->modifyServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyServer([ + 'server' => new ModifyServerServer([ + 'coreNumber' => 8, + 'memoryAmount' => 16384, + 'plan' => 'custom', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$server:** `ModifyServerServer` + +
+
+
+
+ + +
+
+
+ +
$client->server->deleteServer($uuid, $request) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a stopped Cloud Server and releases its IP addresses. Deleting backups requires deleting the associated storage devices. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->deleteServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new DeleteServerRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$storages:** `?string` β€” Whether to delete attached storage devices. + +
+
+ +
+
+ +**$backups:** `?string` β€” How to handle backups when deleting storage devices. The delete value is valid only when storages is set to a truthy value. + +
+
+
+
+ + +
+
+
+ +
$client->server->attachPrivateFirewallRuleset($uuid, $request) -> ServerFirewallRulesetRelationship +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Attach a private, stateful firewall ruleset to a Cloud Server. The latest ruleset version is selected and applied to private network interfaces. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->attachPrivateFirewallRuleset( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerAttachPrivateFirewallRuleset([ + 'firewallRuleset' => new ServerAttachPrivateFirewallRulesetFirewallRuleset([ + 'firewallRulesetUuid' => '190f56d8-4b3f-4a89-9e5f-320fbc3d17c8', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$firewallRuleset:** `ServerAttachPrivateFirewallRulesetFirewallRuleset` β€” Private firewall ruleset to attach. + +
+
+
+
+ + +
+
+
+ +
$client->server->cancelServerOperation($uuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Cancels an operation while the Cloud Server is in maintenance state. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->cancelServerOperation( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+
+
+ + +
+
+
+ +
$client->server->ejectCdrom($uuid) -> Server +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Eject the storage from the Cloud Server's attached CD-ROM device. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->ejectCdrom( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+
+
+ + +
+
+
+ +
$client->server->loadCdrom($uuid, $request) -> Server +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Load a storage of type normal or cdrom into the Cloud Server's attached CD-ROM device. If media is already loaded, it is ejected first. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->loadCdrom( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerLoadCdrom([ + 'storageDevice' => new ServerLoadCdromStorageDevice([ + 'storage' => '01000000-0000-4000-8000-000060010101', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$storageDevice:** `ServerLoadCdromStorageDevice` β€” Storage to load into the attached CD-ROM device. + +
+
+
+
+ + +
+
+
+ +
$client->server->detachPrivateFirewallRuleset($uuid, $request) -> ServerFirewallRulesetRelationship +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Detach a private firewall ruleset from a Cloud Server and reapply private-interface firewall rules. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->detachPrivateFirewallRuleset( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerDetachPrivateFirewallRuleset([ + 'firewallRuleset' => new ServerDetachPrivateFirewallRulesetFirewallRuleset([ + 'firewallRulesetUuid' => '190f56d8-4b3f-4a89-9e5f-320fbc3d17c8', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$firewallRuleset:** `ServerDetachPrivateFirewallRulesetFirewallRuleset` β€” Private firewall ruleset to detach. + +
+
+
+
+ + +
+
+
+ +
$client->server->listFirewallRules($uuid) -> ServerFirewallRules +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Return the Cloud Server firewall rules in evaluation order. Changes to firewall rules can take 1-2 minutes to take effect. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->listFirewallRules( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+
+
+ + +
+
+
+ +
$client->server->createFirewallRule($uuid, $request) -> ServerFirewallRule +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Create a firewall rule. Rules are evaluated in position order; if position is omitted, the rule is appended. Changes can take 1-2 minutes to take effect. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->createFirewallRule( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerCreateFirewallRule([ + 'firewallRule' => new ServerCreateFirewallRuleFirewallRule([ + 'action' => ServerCreateFirewallRuleFirewallRuleAction::Accept->value, + 'comment' => 'Allow SSH from the office network', + 'destinationPortEnd' => '22', + 'destinationPortStart' => '22', + 'direction' => ServerCreateFirewallRuleFirewallRuleDirection::In->value, + 'family' => ServerCreateFirewallRuleFirewallRuleFamily::IPv4->value, + 'position' => '1', + 'protocol' => ServerCreateFirewallRuleFirewallRuleProtocol::Tcp->value, + 'sourceAddressEnd' => '192.0.2.255', + 'sourceAddressStart' => '192.0.2.1', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$firewallRule:** `ServerCreateFirewallRuleFirewallRule` + +
+
+
+
+ + +
+
+
+ +
$client->server->updateFirewallRules($uuid, $request) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Replace the Cloud Server's complete firewall rule chain. Array order determines rule positions. Changes can take 1-2 minutes to take effect. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->updateFirewallRules( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerUpdateFirewallRules([ + 'firewallRules' => new ServerUpdateFirewallRulesFirewallRules([ + 'firewallRule' => [ + new ServerFirewallRuleItem([ + 'action' => ServerFirewallRuleItemAction::Accept->value, + 'comment' => 'Allow SSH', + 'destinationPortEnd' => '22', + 'destinationPortStart' => '22', + 'direction' => ServerFirewallRuleItemDirection::In->value, + 'family' => ServerFirewallRuleItemFamily::IPv4->value, + 'protocol' => ServerFirewallRuleItemProtocol::Tcp->value, + ]), + new ServerFirewallRuleItem([ + 'action' => ServerFirewallRuleItemAction::Drop->value, + 'direction' => ServerFirewallRuleItemDirection::In->value, + ]), + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$firewallRules:** `ServerUpdateFirewallRulesFirewallRules` + +
+
+
+
+ + +
+
+
+ +
$client->server->getFirewallRule($uuid, $position) -> ServerFirewallRule +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Return the firewall rule at the specified one-based position in the Cloud Server rule chain. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->getFirewallRule( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$position:** `int` β€” Firewall rule position + +
+
+
+
+ + +
+
+
+ +
$client->server->deleteFirewallRule($uuid, $position) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Delete the firewall rule at the specified one-based position. Remaining rules are renumbered. Changes can take 1-2 minutes to take effect. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->deleteFirewallRule( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$position:** `int` β€” Firewall rule position + +
+
+
+
+ + +
+
+
+ +
$client->server->listPrivateFirewallRulesetRelationships($uuid) -> ServerFirewallRulesetRelationships +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Return all private firewall ruleset relationships configured for a Cloud Server. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->listPrivateFirewallRulesetRelationships( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+
+
+ + +
+
+
+ +
$client->server->listServerGpUs($uuid) -> ServerGpus +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns GPUs attached to a Cloud Server. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->listServerGpUs( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+
+
+ + +
+
+
+ +
$client->server->getServerNetworking($uuid) -> ServerNetworkingResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Return all network interfaces and IP addresses configured for a Cloud Server. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->getServerNetworking( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+
+
+ + +
+
+
+ +
$client->server->addServerInterface($uuid, $request) -> ServerInterfaceResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Add a network interface to a stopped Cloud Server. A private interface must identify the SDN network to attach. The combined limit of network interfaces and storage devices is 24. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->addServerInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerAddInterface([ + 'interface' => new ServerAddInterfaceInterface([ + 'ipAddresses' => new ServerAddInterfaceInterfaceIpAddresses([ + 'ipAddress' => [ + new ServerAddInterfaceInterfaceIpAddressesIpAddressItem([ + 'address' => '10.0.0.20', + 'dhcpProvided' => ServerBooleanYesno::Yes->value, + 'family' => ServerIpFamily::IPv4->value, + ]), + ], + ]), + 'network' => '0374ce47-4303-4490-987d-32dc96cfd79b', + 'sourceIpFiltering' => ServerBooleanYesno::Yes->value, + 'type' => ServerNetworkType::Private_->value, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$interface_:** `ServerAddInterfaceInterface` + +
+
+
+
+ + +
+
+
+ +
$client->server->modifyServerInterface($uuid, $index, $request) -> ServerInterfaceResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modify the IP addresses, source IP filtering, boot setting, or index of a network interface on a stopped Cloud Server. Changing the interface network or type is not supported. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->modifyServerInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, + new ServerModifyInterface([ + 'interface' => new ServerModifyInterfaceInterface([ + 'bootable' => ServerBooleanYesno::Yes->value, + 'index' => 5, + 'sourceIpFiltering' => ServerBooleanYesno::No->value, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$index:** `int` β€” Network interface index + +
+
+ +
+
+ +**$interface_:** `ServerModifyInterfaceInterface` + +
+
+
+
+ + +
+
+
+ +
$client->server->deleteServerInterface($uuid, $index) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Delete a network interface from a stopped Cloud Server. IP addresses attached to the interface are released according to their release policies. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->deleteServerInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$index:** `int` β€” Network interface index + +
+
+
+
+ + +
+
+
+ +
$client->server->addServerInterfaceIpAddress($uuid, $index, $request) -> ServerIpAddressInterfaceResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Add an IPv4 or IPv6 address to a private network interface. The interface cannot contain addresses from both families and can have at most five addresses. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->addServerInterfaceIpAddress( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, + new ServerAddIpAddress([ + 'ipAddress' => new ServerAddIpAddressIpAddress([ + 'address' => '10.0.0.30', + 'family' => ServerIpFamily::IPv4->value, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$index:** `int` β€” Network interface index + +
+
+ +
+
+ +**$force:** `?string` β€” Move the address from another interface when that interface can retain its required minimum number of addresses + +
+
+ +
+
+ +**$ipAddress:** `ServerAddIpAddressIpAddress` + +
+
+
+
+ + +
+
+
+ +
$client->server->deleteServerInterfaceIpAddress($uuid, $index, $ip) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Delete an IP address from a private network interface. At least one IP address must remain attached to the interface. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->deleteServerInterfaceIpAddress( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, + 'ip', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$index:** `int` β€” Network interface index + +
+
+ +
+
+ +**$ip:** `string` β€” IP address to delete + +
+
+
+
+ + +
+
+
+ +
$client->server->rebuildServer($uuid, $request) -> Server +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Reinstalls a stopped Cloud Server from a public template. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->rebuildServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerRebuild([ + 'serverRebuild' => new ServerRebuildServerRebuild([ + 'cloneSource' => '01000000-0000-4000-8000-000020050100', + 'deleteDetachedDisk' => ServerLegacyBoolean::Yes->value, + 'detachDisk' => '0169b4f8-051c-4a86-9484-f5b798249949', + 'encrypted' => ServerLegacyBoolean::Yes->value, + 'loginUser' => new ServerRebuildServerRebuildLoginUser([ + 'createPassword' => ServerLegacyBoolean::No->value, + 'sshKeys' => new ServerRebuildServerRebuildLoginUserSshKeys([ + 'sshKey' => [ + 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEexamplekey user@example', + ], + ]), + 'username' => 'debian', + ]), + 'passwordDelivery' => ServerRebuildServerRebuildPasswordDelivery::None->value, + 'storageTitle' => 'Rebuilt system disk', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$serverRebuild:** `ServerRebuildServerRebuild` + +
+
+
+
+ + +
+
+
+ +
$client->server->relocateServer($uuid, $request) -> Server +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Relocates a stopped Cloud Server to another zone in the same physical location (datacenter). +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->relocateServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new RelocateServer([ + 'zone' => 'fi-hel2', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$zone:** `string` + +
+
+
+
+ + +
+
+
+ +
$client->server->getRemoteAccessDetails($uuid) -> ServerRemoteAccessDetails +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns remote access settings and VNC connection details for a Cloud Server. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->getRemoteAccessDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+
+
+ + +
+
+
+ +
$client->server->restartServer($uuid, $request) -> Server +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Stops and starts a Cloud Server in started state. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->restartServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new RestartServer([ + 'restartServer' => new RestartServerRestartServerStopType([ + 'stopType' => RestartServerRestartServerStopTypeStopType::Hard->value, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$restartServer:** `mixed` + +
+
+
+
+ + +
+
+
+ +
$client->server->startServer($uuid, $request) -> Server +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Starts a Cloud Server in stopped state. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->startServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new StartServer([ + 'server' => new StartServerServer([ + 'host' => 8055964291, + 'startType' => StartServerServerStartType::Sync->value, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$server:** `StartServerServer` + +
+
+
+
+ + +
+
+
+ +
$client->server->getCpuStats($uuid) -> ServerCpuStats +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns CPU usage statistics for all supported periods. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->getCpuStats( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+
+
+ + +
+
+
+ +
$client->server->getCpuStatsByPeriod($uuid, $period) -> ServerCpuStats +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns CPU usage statistics for the selected period. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->getCpuStatsByPeriod( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ServerStatsPeriod::Daily->value, +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$period:** `string` β€” Statistics period. + +
+
+
+
+ + +
+
+
+ +
$client->server->getDiskStats($uuid, $type) -> ServerDiskStats +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns aggregate disk read and write statistics for all supported periods. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->getDiskStats( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + GetDiskStatsRequestType::Bytes->value, +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$type:** `string` β€” Measure disk activity as transferred bytes or I/O requests. + +
+
+
+
+ + +
+
+
+ +
$client->server->getDiskStatsByPeriod($uuid, $type, $period) -> ServerDiskStats +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns aggregate disk read and write statistics for the selected period. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->getDiskStatsByPeriod( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + GetDiskStatsByPeriodRequestType::Bytes->value, + ServerStatsPeriod::Daily->value, +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$type:** `string` β€” Measure disk activity as transferred bytes or I/O requests. + +
+
+ +
+
+ +**$period:** `string` β€” Statistics period. + +
+
+
+
+ + +
+
+
+ +
$client->server->getNetworkStats($uuid, $type) -> ServerNetworkStats +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns aggregate inbound and outbound network statistics for all interfaces and periods. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->getNetworkStats( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ServerStatsNetworkType::Bytes->value, +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$type:** `string` β€” Measure network activity as transferred bytes or packets. + +
+
+
+
+ + +
+
+
+ +
$client->server->getNetworkStatsByNetwork($uuid, $type, $network) -> ServerNetworkStats +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns inbound and outbound network statistics for the selected network type and all periods. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->getNetworkStatsByNetwork( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ServerStatsNetworkType::Bytes->value, + ServerNetworkType::Public_->value, +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$type:** `string` β€” Measure network activity as transferred bytes or packets. + +
+
+ +
+
+ +**$network:** `string` β€” Network access type to aggregate. + +
+
+
+
+ + +
+
+
+ +
$client->server->getNetworkStatsByNetworkAndPeriod($uuid, $type, $network, $period) -> ServerNetworkStats +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns inbound and outbound network statistics for the selected network type and period. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->getNetworkStatsByNetworkAndPeriod( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ServerStatsNetworkType::Bytes->value, + ServerNetworkType::Public_->value, + ServerStatsPeriod::Daily->value, +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$type:** `string` β€” Measure network activity as transferred bytes or packets. + +
+
+ +
+
+ +**$network:** `string` β€” Network access type to aggregate. + +
+
+ +
+
+ +**$period:** `string` β€” Statistics period. + +
+
+
+
+ + +
+
+
+ +
$client->server->stopServer($uuid, $request) -> Server +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Stops a Cloud Server in started state. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->stopServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new StopServer([ + 'stopServer' => new StopServerStopServer([ + 'stopType' => StopServerStopServerStopType::Soft->value, + 'timeout' => '60', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$stopServer:** `StopServerStopServer` + +
+
+
+
+ + +
+
+
+ +
$client->server->attachStorageDevice($uuid, $request) -> Server +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Attach a storage resource as a disk or CD-ROM device to a Cloud Server. SCSI and virtio disks can be attached while the Cloud Server is started; IDE and CD-ROM devices require a stopped Cloud Server. An empty CD-ROM device can be attached without specifying a storage resource. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->attachStorageDevice( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerAttachStorage([ + 'storageDevice' => new ServerAttachStorageStorageDevice([ + 'address' => 'virtio:0', + 'bootDisk' => 1, + 'storage' => '012580a1-32a1-466e-a323-689ca16f2d43', + 'type' => ServerAttachStorageStorageDeviceType::Disk->value, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$storageDevice:** `ServerAttachStorageStorageDevice` β€” Storage device to attach. + +
+
+
+
+ + +
+
+
+ +
$client->server->detachStorageDevice($uuid, $request) -> Server +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Detach a storage device identified by its device address or storage resource UUID. IDE and CD-ROM devices cannot be detached while the Cloud Server is started. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->detachStorageDevice( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerDetachStorage([ + 'storageDevice' => [ + 'address' => "virtio:0", + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+ +
+
+ +**$storageDevice:** `mixed` + +
+
+
+
+ + +
+
+
+ +
$client->server->getVncDetails($uuid) -> ServerRemoteAccessDetails +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns VNC connection details and remote access settings for a Cloud Server. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->server->getVncDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Cloud Server UUID + +
+
+
+
+ + +
+
+
+ +## server_size +
$client->serverSize->listServerSizes() -> ServerSizes +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves a list of available server sizes (combinations of memory and CPU cores). +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->serverSize->listServerSizes(); +``` +
+
+
+
+ + +
+
+
+ +
$client->serverSize->getServerSizeLimits() -> ServerSizeLimits +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves the minimum and maximum limits for server sizes, including any zone-specific limits for private zones. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->serverSize->getServerSizeLimits(); +``` +
+
+
+
+ + +
+
+
+ +## storage +
$client->storage->getStorageList($request) -> Storages +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns all storage resources accessible to the account. The results can be filtered by labels or a title and UUID search, sorted, and paginated. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->getStorageList( + new GetStorageListRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +
+
+ +
+
+ +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +
+
+ +
+
+ +**$sortBy:** `?string` β€” Field by which to sort the results. + +
+
+ +
+
+ +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +
+
+ +
+
+ +**$limit:** `?int` β€” Maximum number of storage resources to return. + +
+
+ +
+
+ +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+
+
+
+ + +
+
+
+ +
$client->storage->createStorage($request) -> CreateStorageResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a block storage resource in a specific zone. The new block storage is not attached to a Cloud Server. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->createStorage( + new CreateStorageRequest([ + 'storage' => new CreateStorageRequestStorage([ + 'backupRule' => new StorageBackupRule([ + 'interval' => StorageBackupRuleInterval::Daily->value, + 'time' => '0400', + 'retention' => '7', + ]), + 'encrypted' => StorageEncrypted::Yes->value, + 'labels' => [ + new StorageLabel([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + 'size' => 50, + 'tier' => StorageTier::Maxiops->value, + 'title' => 'Block Storage 1', + 'zone' => 'fi-hel1', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$storage:** `CreateStorageRequestStorage` β€” Block storage creation parameters. + +
+
+
+
+ + +
+
+
+ +
$client->storage->getStorageListByBackup($request) -> Storages +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns accessible storage resources whose type is `backup`. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->getStorageListByBackup( + new GetStorageListByBackupRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +
+
+ +
+
+ +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +
+
+ +
+
+ +**$sortBy:** `?string` β€” Field by which to sort the results. + +
+
+ +
+
+ +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +
+
+ +
+
+ +**$limit:** `?int` β€” Maximum number of storage resources to return. + +
+
+ +
+
+ +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+
+
+
+ + +
+
+
+ +
$client->storage->getStorageListByCdrom($request) -> Storages +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns accessible storage resources whose type is `cdrom`. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->getStorageListByCdrom( + new GetStorageListByCdromRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +
+
+ +
+
+ +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +
+
+ +
+
+ +**$sortBy:** `?string` β€” Field by which to sort the results. + +
+
+ +
+
+ +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +
+
+ +
+
+ +**$limit:** `?int` β€” Maximum number of storage resources to return. + +
+
+ +
+
+ +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+
+
+
+ + +
+
+
+ +
$client->storage->getFavoriteStorageList() -> Storages +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns the public templates and CD-ROM images that the account has marked as favorites. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->getFavoriteStorageList(); +``` +
+
+
+
+ + +
+
+
+ +
$client->storage->getStorageListByNormal($request) -> Storages +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns accessible Block Storage resources whose type is `normal`. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->getStorageListByNormal( + new GetStorageListByNormalRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +
+
+ +
+
+ +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +
+
+ +
+
+ +**$sortBy:** `?string` β€” Field by which to sort the results. + +
+
+ +
+
+ +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +
+
+ +
+
+ +**$limit:** `?int` β€” Maximum number of storage resources to return. + +
+
+ +
+
+ +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+
+
+
+ + +
+
+
+ +
$client->storage->getStorageListByPrivateAccess($request) -> Storages +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns accessible storage resources whose access type is `private`. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->getStorageListByPrivateAccess( + new GetStorageListByPrivateAccessRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +
+
+ +
+
+ +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +
+
+ +
+
+ +**$sortBy:** `?string` β€” Field by which to sort the results. + +
+
+ +
+
+ +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +
+
+ +
+
+ +**$limit:** `?int` β€” Maximum number of storage resources to return. + +
+
+ +
+
+ +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+
+
+
+ + +
+
+
+ +
$client->storage->getStorageListByPublicAccess($request) -> Storages +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns accessible storage resources whose access type is `public`. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->getStorageListByPublicAccess( + new GetStorageListByPublicAccessRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +
+
+ +
+
+ +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +
+
+ +
+
+ +**$sortBy:** `?string` β€” Field by which to sort the results. + +
+
+ +
+
+ +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +
+
+ +
+
+ +**$limit:** `?int` β€” Maximum number of storage resources to return. + +
+
+ +
+
+ +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+
+
+
+ + +
+
+
+ +
$client->storage->getStorageListByTemplate($request) -> Storages +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns accessible storage resources whose type is `template`. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->getStorageListByTemplate( + new GetStorageListByTemplateRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +
+
+ +
+
+ +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +
+
+ +
+
+ +**$sortBy:** `?string` β€” Field by which to sort the results. + +
+
+ +
+
+ +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +
+
+ +
+
+ +**$limit:** `?int` β€” Maximum number of storage resources to return. + +
+
+ +
+
+ +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+
+
+
+ + +
+
+
+ +
$client->storage->getStorageListByTypeAndAccess($type, $access, $request) -> Storages +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns accessible storage resources matching both the requested storage type and access type. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->getStorageListByTypeAndAccess( + StorageType::Normal->value, + StorageAccessFilter::Public_->value, + new GetStorageListByTypeAndAccessRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$type:** `string` β€” Storage resource type to return. + +
+
+ +
+
+ +**$access:** `string` β€” Storage resource access type to return. + +
+
+ +
+
+ +**$label:** `?string` β€” Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively. + +
+
+ +
+
+ +**$search:** `?string` β€” Search storage resource titles and UUIDs by partial match. + +
+
+ +
+
+ +**$sortBy:** `?string` β€” Field by which to sort the results. + +
+
+ +
+
+ +**$orderBy:** `?string` β€” Sort direction. Used only when `sort_by` is specified. + +
+
+ +
+
+ +**$limit:** `?int` β€” Maximum number of storage resources to return. + +
+
+ +
+
+ +**$offset:** `?int` β€” Number of storage resources to skip before returning results. + +
+
+
+
+ + +
+
+
+ +
$client->storage->getStorageInfo($uuid) -> Storage +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns detailed information about a storage resource, including its current state, attachments, labels, and backup configuration when applicable. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->getStorageInfo( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Storage resource UUID + +
+
+
+
+ + +
+
+
+ +
$client->storage->modifyStorage($uuid, $request) -> ModifyStorageResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies a block storage title, labels, automatic backup rule, or size. A new size must be greater than the current size. Set `filesystem_resize` to `yes` to also resize the last partition and its supported filesystem after increasing the block storage size. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->modifyStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyStorageBody([ + 'storage' => new ModifyStorageBodyStorage([ + 'size' => 100, + 'title' => 'Production data expanded', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Block storage UUID + +
+
+ +
+
+ +**$storage:** `ModifyStorageBodyStorage` β€” Block storage properties to modify. + +
+
+
+
+ + +
+
+
+ +
$client->storage->deleteStorage($uuid, $request) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Schedules an unattached private storage resource for deletion. Associated backups are kept by default unless another backup policy is selected. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->deleteStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new DeleteStorageRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Storage resource UUID + +
+
+ +
+
+ +**$backups:** `?string` β€” Policy for handling backups when deleting a storage resource. Defaults to `keep`. Allowed values: keep, delete, keep_latest + +
+
+
+
+ + +
+
+
+ +
$client->storage->attachStorageToServer($uuid, $request) -> AttachStorageResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Attaches the storage resource to a Cloud Server in the same zone. The device defaults to a disk at the next available address. IDE and CD-ROM devices can be attached only while the Cloud Server is stopped; SCSI and VirtIO disks can also be attached while it is running. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->attachStorageToServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new AttachStorageRequest([ + 'storageDevice' => new AttachStorageRequestStorageDevice([ + 'server' => '00798b85-efdc-41ca-8021-f6ef457b8531', + 'type' => AttachStorageRequestStorageDeviceType::Disk->value, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Storage resource UUID + +
+
+ +
+
+ +**$storageDevice:** `AttachStorageRequestStorageDevice` β€” Parameters for attaching this storage resource to a Cloud Server in the same zone. + +
+
+
+
+ + +
+
+
+ +
$client->storage->createOnDemandBackup($uuid, $request) -> CreateStorageBackupResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a point-in-time backup of private normal block storage. The operation is asynchronous: the source block storage is `backuping` while the backup is created, and the returned backup remains in `maintenance` until it is ready. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->createOnDemandBackup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CreateStorageBackupRequest([ + 'storage' => new CreateStorageBackupRequestStorage([ + 'title' => 'Manually created backup', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Block storage UUID + +
+
+ +
+
+ +**$storage:** `CreateStorageBackupRequestStorage` β€” Parameters for the point-in-time backup. + +
+
+
+
+ + +
+
+
+ +
$client->storage->cancelStorageOperation($uuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Requests cancellation of an interruptible operation on block storage in the `maintenance` state. For a running clone, cancellation removes the incomplete copy and returns the source block storage to the `online` state. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->cancelStorageOperation( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Block storage UUID + +
+
+
+
+ + +
+
+
+ +
$client->storage->cloneStorage($uuid, $request) -> CreateStorageResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a Block Storage copy of a storage resource. Cloning is asynchronous: the returned block storage remains in the `maintenance` state until the operation completes and can be monitored with the storage resource details endpoint. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->cloneStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CloneStorageRequest([ + 'storage' => new CloneStorageRequestStorage([ + 'encrypted' => StorageEncrypted::Yes->value, + 'tier' => StorageTier::Maxiops->value, + 'title' => 'Cloned Block Storage', + 'zone' => 'fi-hel1', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Storage resource UUID + +
+
+ +
+
+ +**$storage:** `CloneStorageRequestStorage` β€” Parameters for the cloned block storage. + +
+
+
+
+ + +
+
+
+ +
$client->storage->detachStorageFromServer($uuid) -> DetachStorageResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Detaches the storage resource from its attached Cloud Server. IDE and CD-ROM devices can be detached only while the Cloud Server is stopped; SCSI and VirtIO disks can also be detached while it is running. If the storage resource is already detached, it is returned unchanged. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->detachStorageFromServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Storage resource UUID + +
+
+
+
+ + +
+
+
+ +
$client->storage->addStorageToFavorites($uuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Adds an accessible storage resource to the account's favorites. The operation succeeds if the storage resource is already a favorite. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->addStorageToFavorites( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Storage resource UUID + +
+
+
+
+ + +
+
+
+ +
$client->storage->removeStorageFromFavorites($uuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Removes an accessible storage resource from the account's favorites. The operation succeeds if the storage resource is not a favorite. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->removeStorageFromFavorites( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Storage resource UUID + +
+
+
+
+ + +
+
+
+ +
$client->storage->getStorageImportDetails($uuid) -> StorageImportResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns details of the latest import task for a storage resource, including its state, transferred byte counts, checksums, and any error information. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->getStorageImportDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Storage resource UUID + +
+
+
+
+ + +
+
+
+ +
$client->storage->createStorageImport($uuid, $request) -> StorageImportResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates an asynchronous task that imports a raw disk image into existing Block Storage from an HTTP URL or a temporary direct-upload URL. Attached Cloud Servers must be stopped. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->createStorageImport( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CreateStorageImportRequest([ + 'storageImport' => new CreateStorageImportRequestStorageImport([ + 'source' => CreateStorageImportRequestStorageImportSource::HttpImport->value, + 'sourceLocation' => 'https://example.com/disk.raw', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Storage resource UUID + +
+
+ +
+
+ +**$storageImport:** `CreateStorageImportRequestStorageImport` β€” Storage import parameters. + +
+
+
+
+ + +
+
+
+ +
$client->storage->cancelStorageImport($uuid) -> StorageImportResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Requests cancellation of an ongoing storage import. The task enters the `cancelling` state while imported data is rolled back when necessary. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->cancelStorageImport( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Storage resource UUID + +
+
+
+
+ + +
+
+
+ +
$client->storage->resizeStorage($uuid) -> ResizeStorageResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Resizes the last partition and its supported filesystem to use the block storage capacity already available. A backup is created before the operation and returned on success. Increase the block storage capacity first with the modify block storage endpoint. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->resizeStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Block storage UUID + +
+
+
+
+ + +
+
+
+ +
$client->storage->restoreStorageFromBackup($uuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Starts restoring the backup identified by `uuid` to its origin block storage. If the origin block storage is attached to a Cloud Server, the Cloud Server must be stopped. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->restoreStorageFromBackup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Backup UUID + +
+
+
+
+ + +
+
+
+ +
$client->storage->createTemplateFromStorage($uuid, $request) -> CreateStorageTemplateResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a private template from private normal block storage. The operation is asynchronous: the returned template remains in `maintenance` until it is ready. Deployments from the template use the source block storage tier. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->storage->createTemplateFromStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CreateStorageTemplateRequest([ + 'storage' => new CreateStorageTemplateRequestStorage([ + 'title' => 'My server template', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Block storage UUID + +
+
+ +
+
+ +**$storage:** `CreateStorageTemplateRequestStorage` β€” Parameters for creating a template from the block storage. + +
+
+
+
+ + +
+
+
+ +## tag +
$client->tag->listTags() -> Tags +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns all existing tags with their properties and servers tagged. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->tag->listTags(); +``` +
+
+
+
+ + +
+
+
+ +
$client->tag->createTag($request) -> Tag +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new tag. Existing servers can be tagged in same request. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->tag->createTag( + new Tag([ + 'tag' => new TagTag([ + 'description' => 'Production servers', + 'name' => 'PROD', + 'servers' => new TagServers([ + 'server' => [ + '0077fa3d-32db-4b09-9f5f-30d9e9afb565', + ], + ]), + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$request:** `Tag` + +
+
+
+
+ + +
+
+
+ +
$client->tag->getTag($name) -> Tag +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns details for a specific tag. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->tag->getTag( + 'DEV', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$name:** `string` β€” Tag name + +
+
+
+
+ + +
+
+
+ +
$client->tag->modifyTag($name, $request) -> Tag +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Changes attributes of an existing tag +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->tag->modifyTag( + 'DEV', + new ModifyTagRequest([ + 'body' => new Tag([ + 'tag' => new TagTag([ + 'description' => 'Production servers', + 'name' => 'PROD', + 'servers' => new TagServers([ + 'server' => [ + '0077fa3d-32db-4b09-9f5f-30d9e9afb565', + ], + ]), + ]), + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$name:** `string` β€” Tag name + +
+
+ +
+
+ +**$request:** `Tag` + +
+
+
+
+ + +
+
+
+ +
$client->tag->deleteTag($name) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a specific tag. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->tag->deleteTag( + 'DEV', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$name:** `string` β€” Tag name + +
+
+
+
+ + +
+
+
+ +## timezone +
$client->timezone->listTimezones() -> Timezones +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves a list of supported timezones. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->timezone->listTimezones(); +``` +
+
+
+
+ + +
+
+
+ +## account-tokens +
$client->accountTokens->listTokens($request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +List all tokens for the currently authorized account. +The tokens are returned in a paged format, with the default page size being 20. +The maximum page size is 100. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->accountTokens->listTokens( + new ListTokensRequest([ + 'gui' => true, + 'sort' => '+name,-created_at', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$limit:** `?int` β€” How many tokens to return at per page + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset to start listing the tokens from + +
+
+ +
+
+ +**$gui:** `?bool` β€” Filter tokens based on GUI flag (true or false). Default is no value, i.e. no filtering and all tokens are returned. + +
+
+ +
+
+ +**$sort:** `?string` β€” Comma-separated list of fields to sort by. Prefix with '+' for ascending or '-' for descending order. Supported fields: created_at, expires_at, last_used_at, name. Example: sort=+name,-created_at. If no prefix is given, descending is assumed. Follows OpenAPI collectionFormat 'csv'. + +
+
+
+
+ + +
+
+
+ +
$client->accountTokens->createToken($request) -> AccountTokensToken +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Create a new API token. Maximum token validity is 24*365h=8760h (~1 year). +Attribute allowed_ip_prefixes allows defining a list of CIDR/IP addresses from where the token is accepted. +Empty list denies access from everywhere. If unset, the default list will be the IP filters of the account. If no IP filters are defined for the account either, the default will be ["0.0.0.0/0", "::0/0"], i.e. allow from any address. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->accountTokens->createToken( + new AccountTokensCreateTokenRequestExpiresIn([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$request:** `AccountTokensCreateTokenRequestExpiresIn|AccountTokensCreateTokenRequestExpiresAt` + +
+
+
+
+ + +
+
+
+ +
$client->accountTokens->getToken($tokenUuid) -> AccountTokensGetTokenResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get the details of a specific API token. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->accountTokens->getToken( + 'token-uuid', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$tokenUuid:** `string` β€” The uuid of the token to get + +
+
+
+
+ + +
+
+
+ +
$client->accountTokens->revokeToken($tokenUuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Revoke a specific API token. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->accountTokens->revokeToken( + 'token-uuid', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$tokenUuid:** `string` β€” The uuid of the token to delete + +
+
+
+
+ + +
+
+
+ +## object-storage-2 +
$client->objectStorage2->listObjectStorages($request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of object storage services. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorages( + new ListObjectStoragesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of entries to receive at most. + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. + +
+
+ +
+
+ +**$sort:** `?string` β€” Order of returned results. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->createObjectStorage($request) -> ObjectStorage2ServiceDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new object storage service. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->createObjectStorage( + new ObjectStorage2ServiceCreate([ + 'name' => 'example-service', + 'region' => 'example', + 'configuredStatus' => ObjectStorage2PropertyConfiguredStatus::Started->value, + 'networks' => [ + new ObjectStorage2NetworkCreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2NetworkType::Public_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + new ObjectStorage2NetworkCreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2NetworkType::Private_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$name:** `string` + +
+
+ +
+
+ +**$region:** `string` + +
+
+ +
+
+ +**$configuredStatus:** `string` + +
+
+ +
+
+ +**$networks:** `?array` β€” Networks to attach to the service. Private networks must reside in the same region as the object storage. + +
+
+ +
+
+ +**$customDomains:** `?array` β€” Custom domains to attach to the service. + +
+
+ +
+
+ +**$labels:** `?array` β€” Labels for classifying the service. + +
+
+ +
+
+ +**$properties:** `?ObjectStorage2PropertiesCreate` + +
+
+ +
+
+ +**$terminationProtection:** `?bool` β€” Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStorage($serviceUuid) -> ObjectStorage2ServiceDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns object storage service details by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->replaceObjectStorage($serviceUuid, $request) -> ObjectStorage2ServiceDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Replaces existing object storage service by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->replaceObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2ServiceReplace([ + 'name' => 'example-service', + 'configuredStatus' => ObjectStorage2PropertyConfiguredStatus::Started->value, + 'networks' => [ + new ObjectStorage2NetworkCreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2NetworkType::Public_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + new ObjectStorage2NetworkCreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2NetworkType::Private_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ], + 'labels' => [ + new ObjectStorage2LabelCreate([ + 'key' => 'example-label-key', + 'value' => 'example-label-value', + ]), + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$name:** `string` β€” The name of the service. + +
+
+ +
+
+ +**$configuredStatus:** `string` + +
+
+ +
+
+ +**$terminationProtection:** `?bool` β€” Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first. + +
+
+ +
+
+ +**$networks:** `?array` + +
+
+ +
+
+ +**$customDomains:** `?array` + +
+
+ +
+
+ +**$staticWebsites:** `?array` β€” Static website configurations for this service. Array replaces all existing configurations. + +
+
+ +
+
+ +**$labels:** `?array` + +
+
+ +
+
+ +**$properties:** `?ObjectStorage2PropertiesCreate` + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorage($serviceUuid, $request) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing object storage service by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', + new DeleteObjectStorageRequest([ + 'force' => true, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$force:** `?bool` β€” If the parameter is provided, the deletion process starts even if the service is not empty. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->modifyObjectStorage($serviceUuid, $request) -> ObjectStorage2ServiceDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing object storage service by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->modifyObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2ServiceModify([ + 'name' => 'example-service', + 'configuredStatus' => ObjectStorage2PropertyConfiguredStatus::Started->value, + 'networks' => [ + new ObjectStorage2NetworkCreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2NetworkType::Private_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$name:** `?string` + +
+
+ +
+
+ +**$configuredStatus:** `?string` + +
+
+ +
+
+ +**$networks:** `?array` + +
+
+ +
+
+ +**$customDomains:** `?array` + +
+
+ +
+
+ +**$staticWebsites:** `?array` β€” Static website configurations for this service. Array replaces all existing configurations. + +
+
+ +
+
+ +**$labels:** `?array` + +
+
+ +
+
+ +**$properties:** `?ObjectStorage2PropertiesCreate` + +
+
+ +
+
+ +**$terminationProtection:** `?bool` β€” Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageNetworks($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available service networks by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageNetworks( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->createObjectStorageNetwork($serviceUuid, $request) -> ObjectStorage2NetworkDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new service network by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->createObjectStorageNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateObjectStorageNetworkRequest([ + 'body' => new ObjectStorage2NetworkCreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2NetworkType::Public_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$request:** `ObjectStorage2NetworkCreate` + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStorageNetwork($serviceUuid, $networkName) -> ObjectStorage2NetworkDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns service network details by given {service_uuid} and {network_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStorageNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$networkName:** `string` β€” The name of the network. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorageNetwork($serviceUuid, $networkName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing network by given {service_uuid} and {network_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorageNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$networkName:** `string` β€” The name of the network. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageCustomDomains($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of custom domains attached to a service by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageCustomDomains( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->attachObjectStorageCustomDomain($serviceUuid, $request) -> ObjectStorage2CustomDomainDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Attaches a new custom domain to the service identified by {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->attachObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + new AttachObjectStorageCustomDomainRequest([ + 'body' => new ObjectStorage2CustomDomainCreate([ + 'type' => ObjectStorage2CustomDomainCreateType::Public_->value, + 'domainName' => 'example.com', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$request:** `ObjectStorage2CustomDomainCreate` + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStorageCustomDomain($serviceUuid, $customDomainName) -> ObjectStorage2CustomDomainDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns custom domain details by given {service_uuid} and {domain_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$customDomainName:** `string` β€” The domain name. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorageCustomDomain($serviceUuid, $customDomainName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing custom domain by given {service_uuid} and {domain_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$customDomainName:** `string` β€” The domain name. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->modifyObjectStorageCustomDomain($serviceUuid, $customDomainName, $request) -> ObjectStorage2CustomDomainDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing custom domain by given {service_uuid} and {domain_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->modifyObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', + new ObjectStorage2CustomDomainModify([ + 'type' => ObjectStorage2CustomDomainModifyType::Public_->value, + 'domainName' => 'example.com', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$customDomainName:** `string` β€” The domain name. + +
+
+ +
+
+ +**$type:** `?string` β€” Type of the custom domain. + +
+
+ +
+
+ +**$domainName:** `?string` β€” New modified custom domain. Supports both apex domains (example.com) and subdomains (objects.example.com). + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageRegions() -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available managed object storage regions. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageRegions(); +``` +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStorageRegion($regionName) -> ObjectStorage2RegionDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns object storage region details by given {name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStorageRegion( + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$regionName:** `string` β€” The name of the region. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStorageMetrics($serviceUuid) -> ObjectStorage2MetricsUsageResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns object storage metrics by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStorageMetrics( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageBucketMetrics($serviceUuid, $request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns metrics for buckets within a service. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageBucketMetrics( + '01234567-89ab-cdef-0123-456789abcdef', + new ListObjectStorageBucketMetricsRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of entries to receive at most. + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->createObjectStorageBucket($serviceUuid, $request) -> ObjectStorage2BucketDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new service bucket by the given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->createObjectStorageBucket( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2BucketCreate([ + 'name' => 'my-bucket-1', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$name:** `string` β€” Must be unique within the service, and should contain only alphanumeric, .,- and _. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorageBucket($serviceUuid, $bucketName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes an existing bucket by given {service_uuid} and {bucket_name}. This API call will remove all objects from the bucket permanently and cannot be reversed. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorageBucket( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$bucketName:** `string` β€” The name of the bucket. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageMetricsSeries($serviceUuid, $request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns Object Storage instance metrics series by a given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + new ListObjectStorageMetricsSeriesRequest([ + 'from' => new DateTime('2024-01-01T00:00:00Z'), + 'to' => new DateTime('2024-01-01T00:00:00Z'), + 'interval' => '1h', + 'limit' => 10, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$from:** `?DateTime` β€” Beginning of the time range for which to return metrics. + +
+
+ +
+
+ +**$to:** `?DateTime` β€” End of the time range for which to return metrics. + +
+
+ +
+
+ +**$interval:** `?string` β€” Metrics aggregation interval. + +
+
+ +
+
+ +**$sort:** `?string` β€” Order of returned results. + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of entries to receive at most. + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageLabels($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available service labels by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->createObjectStorageLabel($serviceUuid, $request) -> ObjectStorage2LabelDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new label by given {service_uuid}. Labels are used for service filtering. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->createObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateObjectStorageLabelRequest([ + 'body' => new ObjectStorage2LabelCreate([ + 'key' => 'foo', + 'value' => 'bar', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$request:** `ObjectStorage2LabelCreate` + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStorageLabel($serviceUuid, $labelKey) -> ObjectStorage2LabelDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns label details by given {service_uuid} and {key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$labelKey:** `string` β€” The key of the label. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorageLabel($serviceUuid, $labelKey) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing label by given {service_uuid} and {key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$labelKey:** `string` β€” The key of the label. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->modifyObjectStorageLabel($serviceUuid, $labelKey, $request) -> ObjectStorage2LabelDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing label by given {service_uuid} and {key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->modifyObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + new ObjectStorage2LabelModify([ + 'key' => 'foo', + 'value' => 'bar', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$labelKey:** `string` β€” The key of the label. + +
+
+ +
+
+ +**$key:** `?string` + +
+
+ +
+
+ +**$value:** `?string` + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageStaticWebsites($serviceUuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns all static website configurations for a service along with available domains. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageStaticWebsites( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->createObjectStorageStaticWebsite($serviceUuid, $request) -> ObjectStorage2StaticWebsiteConfig +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new static website hosting configuration for a domain. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->createObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateObjectStorageStaticWebsiteRequest([ + 'body' => new ObjectStorage2StaticWebsiteConfigCreate([ + 'bucketName' => 'my-website', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$request:** `ObjectStorage2StaticWebsiteConfigCreate` + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStorageStaticWebsite($serviceUuid, $customDomainName) -> ObjectStorage2StaticWebsiteConfig +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a static website configuration for a specific domain. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$customDomainName:** `string` β€” The domain name. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorageStaticWebsite($serviceUuid, $customDomainName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a static website configuration. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$customDomainName:** `string` β€” The domain name. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->modifyObjectStorageStaticWebsite($serviceUuid, $customDomainName, $request) -> ObjectStorage2StaticWebsiteConfig +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Updates an existing static website configuration. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->modifyObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', + new ObjectStorage2StaticWebsiteConfigModify([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$customDomainName:** `string` β€” The domain name. + +
+
+ +
+
+ +**$bucketName:** `?string` β€” Name of the S3/ECS bucket containing the website content. Only alphanumerics, dots, hyphens, and underscores are allowed. + +
+
+ +
+
+ +**$bucketPrefix:** `?string` β€” Optional prefix/subfolder within the bucket. Only alphanumerics, slashes, dots, hyphens, and underscores are allowed. + +
+
+ +
+
+ +**$indexDocument:** `?string` β€” Default document for directories. Only alphanumerics, slashes, dots, hyphens, and underscores are allowed. + +
+
+ +
+
+ +**$spaMode:** `?bool` β€” Enable Single Page Application (SPA) mode. When enabled, all non-file routes serve the index document, allowing client-side routing to handle the URL. Essential for React, Vue, Next.js, and similar frameworks. + +
+
+ +
+
+ +**$enabled:** `?bool` β€” Whether the static website configuration should be active + +
+
+ +
+
+ +**$errorPages:** `?array` β€” Custom error page configurations for specific HTTP status codes or ranges. Replaces the entire set when provided. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageDomains($serviceUuid) -> ObjectStorage2ServiceDomains +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns all domains associated with this service (public endpoint, private endpoint, custom domains) along with their static website hosting status. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageDomains( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageUsers($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available service users by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageUsers( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->createObjectStorageUser($serviceUuid, $request) -> ObjectStorage2UserDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new service user by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->createObjectStorageUser( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2UserCreate([ + 'username' => 'example_user', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user to create. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStorageUser($serviceUuid, $username) -> ObjectStorage2UserDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns service user details by given {service_uuid} and {username}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStorageUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorageUser($serviceUuid, $username) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing user by given {service_uuid} and {username}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorageUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageAccessKeys($serviceUuid, $username) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available access keys for a user. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageAccessKeys( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->createObjectStorageAccessKey($serviceUuid, $username) -> ObjectStorage2CreateAccessKeyResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new access key by given {service_uuid} and {username}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->createObjectStorageAccessKey( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStorageAccessKeyDetails($serviceUuid, $username, $accessKeyId) -> ObjectStorage2AccessKeyDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns access key details by given {service_uuid}, {username}, and {access-key-id}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStorageAccessKeyDetails( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+ +
+
+ +**$accessKeyId:** `string` β€” The ID of the access key. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorageAccessKey($serviceUuid, $username, $accessKeyId) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing access key by given {service_uuid}, {username}, and {access-key-id}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorageAccessKey( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+ +
+
+ +**$accessKeyId:** `string` β€” The ID of the access key. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->modifyObjectStorageAccessKeyDetails($serviceUuid, $username, $accessKeyId, $request) -> ObjectStorage2AccessKeyDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies access key details. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->modifyObjectStorageAccessKeyDetails( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', + new ObjectStorage2AccessKeyModify([ + 'status' => ObjectStorage2AccessKeyModifyStatus::Inactive->value, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+ +
+
+ +**$accessKeyId:** `string` β€” The ID of the access key. + +
+
+ +
+
+ +**$status:** `?string` β€” Indicates if the key is active or inactive. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageAttachedUserPolicies($serviceUuid, $username) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of attached user policies for a user. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageAttachedUserPolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->attachObjectStorageUserPolicy($serviceUuid, $username, $request) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Attach a policy to a user. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->attachObjectStorageUserPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachObjectStorageUserPolicyRequest([ + 'body' => new ObjectStorage2PolicyAttachmentCreate([ + 'name' => 'test-policy', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+ +
+
+ +**$request:** `ObjectStorage2PolicyAttachmentCreate` + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->detachObjectStorageUserPolicy($serviceUuid, $username, $nestedName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Detach a policy from a user. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->detachObjectStorageUserPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+ +
+
+ +**$nestedName:** `string` β€” The name of the policy to detach. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStorageUserInlinePolicy($serviceUuid, $username, $userPolicyName) -> ObjectStorage2InlinePolicyResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get the user inline policy by the given {service_uuid}, {username} and {policy_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStorageUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+ +
+
+ +**$userPolicyName:** `string` β€” The name of the inline policy. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorageUserInlinePolicy($serviceUuid, $username, $userPolicyName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes the user inline policy by the given {service_uuid}, {username}, and {policy_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorageUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+ +
+
+ +**$userPolicyName:** `string` β€” The name of the inline policy. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageUserInlinePolicies($serviceUuid, $username) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Lists the user inline policies by the given {service_uuid}, and {username}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageUserInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->createObjectStorageUserInlinePolicy($serviceUuid, $username, $request) -> ObjectStorage2InlinePolicyResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a user inline policy by the given {service_uuid}, and {username}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->createObjectStorageUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageUserInlinePolicyRequest([ + 'body' => new ObjectStorage2InlinePolicyCreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+ +
+
+ +**$request:** `ObjectStorage2InlinePolicyCreate` + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStorageUserTags($serviceUuid, $username) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a user's tags by the given {service_uuid}, and {username}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStorageUserTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->replaceObjectStorageUserTags($serviceUuid, $username, $request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Replaces a user's tags by the given {service_uuid}, and {username}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->replaceObjectStorageUserTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ReplaceObjectStorageUserTagsRequest([ + 'body' => [ + new ObjectStorage2TagListRequestItem([ + 'key' => 'environment', + 'value' => 'production', + ]), + new ObjectStorage2TagListRequestItem([ + 'key' => 'team', + 'value' => 'backend', + ]), + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+ +
+
+ +**$request:** `array` + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorageUserTag($serviceUuid, $username, $userTagKey) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a user's tag by the given {service_uuid}, {username}, and {tag_key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorageUserTag( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'environment', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+ +
+
+ +**$userTagKey:** `string` β€” The key of the user tag. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->createObjectStorageUserPermissionsBoundary($serviceUuid, $username, $request) -> string +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a user's permissions boundary by the given {service_uuid}, and {username}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->createObjectStorageUserPermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageUserPermissionsBoundaryRequest([ + 'body' => new ObjectStorage2PermissionsBoundaryCreate([ + 'policyName' => 'sample-policy', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+ +
+
+ +**$request:** `ObjectStorage2PermissionsBoundaryCreate` + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorageUserPermissionsBoundary($serviceUuid, $username) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a user's permissions boundary by the given {service_uuid}, and {username}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorageUserPermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStoragePolicyVersions($serviceUuid, $policyName) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Lists policy versions given by {service_uuid}, and {policy_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStoragePolicyVersions( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$policyName:** `string` β€” The name of the policy. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->createObjectStoragePolicyVersion($serviceUuid, $policyName, $request) -> ObjectStorage2PolicyVersionResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a policy version by the given {service_uuid}, and {policy_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->createObjectStoragePolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2PolicyVersionCreate([ + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":["*"],"Effect":"Deny","Resource":"*"}]}', + 'isDefault' => true, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$policyName:** `string` β€” The name of the policy. + +
+
+ +
+
+ +**$document:** `string` β€” A valid, URL-encoded policy document. + +
+
+ +
+
+ +**$isDefault:** `bool` β€” Set this version as the default. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStoragePolicyVersion($serviceUuid, $policyName, $policyVersion) -> ObjectStorage2PolicyVersionResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get a single policy version by the given {service_uuid}, {policy_name}, and {policy_version}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStoragePolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'v1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$policyName:** `string` β€” The name of the policy. + +
+
+ +
+
+ +**$policyVersion:** `string` β€” The version identifier of the policy. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStoragePolicyVersion($serviceUuid, $policyName, $policyVersion) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a policy version by the given {service_uuid}, {policy_name}, and {policy_version}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStoragePolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'v1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$policyName:** `string` β€” The name of the policy. + +
+
+ +
+
+ +**$policyVersion:** `string` β€” The version identifier of the policy. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStoragePolicy($serviceUuid, $policyName) -> ObjectStorage2PolicyDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns service policy details by given {service_uuid} and {policy_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStoragePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$policyName:** `string` β€” The name of the policy. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStoragePolicy($serviceUuid, $policyName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing policy by given {service_uuid} and {policy_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStoragePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$policyName:** `string` β€” The name of the policy. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->setObjectStorageDefaultPolicyVersion($serviceUuid, $policyName, $request) -> ObjectStorage2PolicyDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Sets the default version for a policy. Note: This is mapped from ModifyPolicyVersion handler. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->setObjectStorageDefaultPolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2PolicySetDefaultVersion([ + 'versionId' => 'v2', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$policyName:** `string` β€” The name of the policy. + +
+
+ +
+
+ +**$versionId:** `string` β€” The policy version ID to set as default. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStoragePolicies($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available service policies by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStoragePolicies( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->createObjectStoragePolicy($serviceUuid, $request) -> ObjectStorage2PolicyDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new service policy by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->createObjectStoragePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2PolicyCreate([ + 'name' => 'example-policy', + 'description' => 'example-description', + 'document' => '%7B%22Version%22%3A%20%222012-10-17%22%2C%20%20%22Statement%22%3A%20%5B%7B%22Action%22%3A%20%5B%22iam%3AGetUser%22%5D%2C%20%22Resource%22%3A%20%22%2A%22%2C%20%22Effect%22%3A%20%22Allow%22%2C%20%22Sid%22%3A%20%22editor%22%7D%5D%7D', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$name:** `string` β€” Unique name of the policy. + +
+
+ +
+
+ +**$description:** `?string` β€” The policy description. + +
+
+ +
+
+ +**$document:** `string` β€” A valid, URL-encoded policy document. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageIamGroupPolicies($serviceUuid, $groupName) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Lists IAM policies attached to a group. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageIamGroupPolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$groupName:** `string` β€” The name of the group. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->attachObjectStorageIamGroupPolicy($serviceUuid, $groupName, $request) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Attaches a policy to a group. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->attachObjectStorageIamGroupPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachObjectStorageIamGroupPolicyRequest([ + 'body' => new ObjectStorage2PolicyAttachmentCreate([ + 'name' => 'test-policy', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$groupName:** `string` β€” The name of the group. + +
+
+ +
+
+ +**$request:** `ObjectStorage2PolicyAttachmentCreate` + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->detachObjectStorageIamGroupPolicy($serviceUuid, $groupName, $policyName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Detaches a policy from a group. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->detachObjectStorageIamGroupPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$groupName:** `string` β€” The name of the group. + +
+
+ +
+
+ +**$policyName:** `string` β€” The name of the policy. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageGroups($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available service groups by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageGroups( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->createObjectStorageGroup($serviceUuid, $request) -> ObjectStorage2GroupResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates an iam group. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->createObjectStorageGroup( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2GroupCreate([ + 'name' => 'new-group', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$name:** `string` β€” A valid string to represent the name of the IAM group. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStorageGroup($serviceUuid, $groupName) -> ObjectStorage2GroupResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get a single group identified by {service_uuid}, and {group_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStorageGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$groupName:** `string` β€” The name of the group. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorageGroup($serviceUuid, $groupName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a group identified by {group_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorageGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$groupName:** `string` β€” The name of the group. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->attachObjectStorageUserToGroup($serviceUuid, $groupName, $username) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Attaches an iam user to a group identified by {group_name}, and {username}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->attachObjectStorageUserToGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$groupName:** `string` β€” The name of the group. + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->removeObjectStorageUserFromGroup($serviceUuid, $groupName, $username) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Removes an iam user from the group identified by {group_name}, and {username}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->removeObjectStorageUserFromGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$groupName:** `string` β€” The name of the group. + +
+
+ +
+
+ +**$username:** `string` β€” The name of the user. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageGroupInlinePolicies($serviceUuid, $groupName) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Lists the group inline policies by the given {service_uuid}, and {group_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageGroupInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$groupName:** `string` β€” The name of the group. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->createObjectStorageGroupInlinePolicy($serviceUuid, $groupName, $request) -> ObjectStorage2InlinePolicyResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a group inline policy by the given {service_uuid}, and {group_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->createObjectStorageGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageGroupInlinePolicyRequest([ + 'body' => new ObjectStorage2InlinePolicyCreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$groupName:** `string` β€” The name of the group. + +
+
+ +
+
+ +**$request:** `ObjectStorage2InlinePolicyCreate` + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStorageGroupInlinePolicy($serviceUuid, $groupName, $groupPolicyName) -> ObjectStorage2InlinePolicyResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get the group inline policy by the given {service_uuid}, {group_name} and {policy_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStorageGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$groupName:** `string` β€” The name of the group. + +
+
+ +
+
+ +**$groupPolicyName:** `string` β€” The name of the inline policy. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorageGroupInlinePolicy($serviceUuid, $groupName, $groupPolicyName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes the group inline policy by the given {service_uuid}, {group_name}, and {policy_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorageGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$groupName:** `string` β€” The name of the group. + +
+
+ +
+
+ +**$groupPolicyName:** `string` β€” The name of the inline policy. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageRoles($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Lists the roles. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageRoles( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->createObjectStorageRole($serviceUuid, $request) -> ObjectStorage2RoleResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a service IAM role. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->createObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2RoleCreate([ + 'name' => 'test-role', + 'assumeRolePolicyDocument' => '{"Version": "2012-10-17","Statement": [{"Action": "sts:AssumeRole","Principal": {"AWS": ["urn:ecs:iam::ns1:user/Demby"]},"Effect": "Allow","Resource": "*"}]}', + 'description' => 'A test role.', + 'maxSessionDuration' => 3600, + 'permissionsBoundary' => 'test-policy', + 'tags' => [ + new ObjectStorage2RoleTag([ + 'key' => 'department', + 'value' => 'Finance', + ]), + new ObjectStorage2RoleTag([ + 'key' => 'school', + 'value' => 'University of Helsinki', + ]), + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$name:** `string` + +
+
+ +
+
+ +**$assumeRolePolicyDocument:** `string` β€” The policy document that grants an entity permission to assume the role. + +
+
+ +
+
+ +**$description:** `?string` β€” Description of the role. + +
+
+ +
+
+ +**$maxSessionDuration:** `?int` β€” Maximum session duration in seconds. + +
+
+ +
+
+ +**$permissionsBoundary:** `?string` β€” Policy name to set as the permissions boundary. + +
+
+ +
+
+ +**$tags:** `?array` β€” Tags to attach to the role (max 50). + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStorageRole($serviceUuid, $roleName) -> ObjectStorage2RoleResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get a single role identified by {service_uuid}, and {role_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$roleName:** `string` β€” The name of the role. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorageRole($serviceUuid, $roleName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a service's IAM role. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$roleName:** `string` β€” The name of the role. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->updateObjectStorageRole($serviceUuid, $roleName, $request) -> ObjectStorage2RoleResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Updates a service's IAM role. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->updateObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2RoleUpdate([ + 'description' => 'New description', + 'maxSessionDuration' => 3900, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$roleName:** `string` β€” The name of the role. + +
+
+ +
+
+ +**$description:** `?string` β€” New description for the role. + +
+
+ +
+
+ +**$maxSessionDuration:** `?int` β€” New maximum session duration in seconds. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageRoleInlinePolicies($serviceUuid, $roleName) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of role inline policies by the given {service_uuid}, and {role_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageRoleInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$roleName:** `string` β€” The name of the role. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->createObjectStorageRoleInlinePolicy($serviceUuid, $roleName, $request) -> ObjectStorage2InlinePolicyResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a role inline policy by the given {service_uuid}, and {role_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->createObjectStorageRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageRoleInlinePolicyRequest([ + 'body' => new ObjectStorage2InlinePolicyCreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$roleName:** `string` β€” The name of the role. + +
+
+ +
+
+ +**$request:** `ObjectStorage2InlinePolicyCreate` + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStorageRoleInlinePolicy($serviceUuid, $roleName, $rolePolicyName) -> ObjectStorage2InlinePolicyResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a role's inline policy by the given {service_uuid}, {role_name}, and {policy_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStorageRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$roleName:** `string` β€” The name of the role. + +
+
+ +
+
+ +**$rolePolicyName:** `string` β€” The name of the inline policy. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorageRoleInlinePolicy($serviceUuid, $roleName, $rolePolicyName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Delete a role inline policy by the given {service_uuid}, {role_name} and {policy_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorageRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$roleName:** `string` β€” The name of the role. + +
+
+ +
+
+ +**$rolePolicyName:** `string` β€” The name of the inline policy. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->createObjectStorageRolePermissionsBoundary($serviceUuid, $roleName, $request) -> string +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a role policy's permissions boundary by the given {service_uuid}, and {role_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->createObjectStorageRolePermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageRolePermissionsBoundaryRequest([ + 'body' => new ObjectStorage2PermissionsBoundaryCreate([ + 'policyName' => 'sample-policy', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$roleName:** `string` β€” The name of the role. + +
+
+ +
+
+ +**$request:** `ObjectStorage2PermissionsBoundaryCreate` + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorageRolePermissionsBoundary($serviceUuid, $roleName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a role permissions boundary by the given {service_uuid}, and {role_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorageRolePermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$roleName:** `string` β€” The name of the role. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->assumeObjectStorageRolePolicy($serviceUuid, $roleName, $request) -> ObjectStorage2AssumeRolePolicyResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Assume a role policy by the given {service_uuid}, and {role_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->assumeObjectStorageRolePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2AssumeRolePolicyRequest([ + 'document' => '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":"backup.upcloud.com"},"Action":"sts:AssumeRole"}]}', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$roleName:** `string` β€” The name of the role. + +
+
+ +
+
+ +**$document:** `string` β€” The assume role policy document that grants an entity permission to assume the role. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->listObjectStorageAttachedRolePolicies($serviceUuid, $roleName) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Lists all policies attached to a service's IAM role. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->listObjectStorageAttachedRolePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$roleName:** `string` β€” The name of the role. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->attachObjectStoragePolicyToRole($serviceUuid, $roleName, $request) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Attaches a policy to a service's IAM role. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->attachObjectStoragePolicyToRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachObjectStoragePolicyToRoleRequest([ + 'body' => new ObjectStorage2PolicyAttachmentCreate([ + 'name' => 'test-policy', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$roleName:** `string` β€” The name of the role. + +
+
+ +
+
+ +**$request:** `ObjectStorage2PolicyAttachmentCreate` + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->detachObjectStoragePolicyFromRole($serviceUuid, $roleName, $rolePolicyName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Detaches a policy from a service's IAM role. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->detachObjectStoragePolicyFromRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$roleName:** `string` β€” The name of the role. + +
+
+ +
+
+ +**$rolePolicyName:** `string` β€” The name of the inline policy. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->getObjectStorageRoleTags($serviceUuid, $roleName) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a role's tags by the given {service_uuid}, and {role_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->getObjectStorageRoleTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$roleName:** `string` β€” The name of the role. + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->replaceObjectStorageRoleTags($serviceUuid, $roleName, $request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Replaces a role's tags by the given {service_uuid}, and {role_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->replaceObjectStorageRoleTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ReplaceObjectStorageRoleTagsRequest([ + 'body' => [ + new ObjectStorage2TagListRequestItem([ + 'key' => 'environment', + 'value' => 'production', + ]), + new ObjectStorage2TagListRequestItem([ + 'key' => 'team', + 'value' => 'backend', + ]), + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$roleName:** `string` β€” The name of the role. + +
+
+ +
+
+ +**$request:** `array` + +
+
+
+
+ + +
+
+
+ +
$client->objectStorage2->deleteObjectStorageRoleTag($serviceUuid, $roleName, $roleTagKey) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a role's tag by the given {service_uuid}, {role_name}, and {tag_key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->objectStorage2->deleteObjectStorageRoleTag( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'environment', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$roleName:** `string` β€” The name of the role. + +
+
+ +
+
+ +**$roleTagKey:** `string` β€” The key of the role tag. + +
+
+
+
+ + +
+
+
+ +## file-storage +
$client->fileStorage->listFileStorages($request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of File Storage services. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->listFileStorages( + new ListFileStoragesRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of entries to receive at most. + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. + +
+
+ +
+
+ +**$sort:** `?string` β€” Order of returned results. + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->createFileStorage($request) -> FileStorageServiceDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new File Storage service. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->createFileStorage( + new FileStorageServiceCreate([ + 'name' => 'test-name', + 'zone' => 'fi-hel2', + 'configuredStatus' => FileStorageConfiguredStatus::Started->value, + 'sizeGib' => 250, + 'encrypted' => false, + 'networks' => [ + new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'net', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '192.168.147.120', + ]), + ], + 'shares' => [ + new FileStorageShareCreate([ + 'name' => 'read', + 'path' => '/public', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '*', + 'permission' => FileStoragePermission::Ro->value, + ]), + ], + ]), + new FileStorageShareCreate([ + 'name' => 'write', + 'path' => '/project/data', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.147.0/24', + 'permission' => FileStoragePermission::Rw->value, + ]), + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => 'local.domain', + 'permission' => FileStoragePermission::Rw->value, + ]), + ], + ]), + ], + 'labels' => [ + new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$name:** `string` + +
+
+ +
+
+ +**$zone:** `string` β€” Indicates the zone where the service will be created. + +
+
+ +
+
+ +**$configuredStatus:** `string` + +
+
+ +
+
+ +**$sizeGib:** `int` + +
+
+ +
+
+ +**$encrypted:** `?bool` β€” Indicates whether encryption at rest is enabled for the service. + +
+
+ +
+
+ +**$networks:** `?array` + +
+
+ +
+
+ +**$shares:** `?array` + +
+
+ +
+
+ +**$labels:** `?array` β€” Labels + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->getFileStorage($serviceUuid) -> FileStorageServiceDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns managed File Storage details by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->getFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->replaceFileStorage($serviceUuid, $request) -> FileStorageServiceDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Replaces existing File Storage service by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->replaceFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new FileStorageServiceReplace([ + 'name' => 'test-name', + 'configuredStatus' => FileStorageConfiguredStatus::Started->value, + 'sizeGib' => 250, + 'networks' => [ + new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'net', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '192.168.147.120', + ]), + ], + 'labels' => [ + new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$name:** `string` + +
+
+ +
+
+ +**$configuredStatus:** `string` + +
+
+ +
+
+ +**$sizeGib:** `int` + +
+
+ +
+
+ +**$networks:** `?array` + +
+
+ +
+
+ +**$labels:** `?array` β€” Labels + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->deleteFileStorage($serviceUuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing File Storage service by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->deleteFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->modifyFileStorage($serviceUuid, $request) -> FileStorageServiceDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing File Storage service by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->modifyFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new FileStorageServiceModify([ + 'name' => 'test-name', + 'configuredStatus' => FileStorageConfiguredStatus::Started->value, + 'sizeGib' => 250, + 'networks' => [ + new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'net', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '192.168.147.120', + ]), + ], + 'labels' => [ + new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$name:** `?string` + +
+
+ +
+
+ +**$configuredStatus:** `?string` + +
+
+ +
+
+ +**$sizeGib:** `?int` + +
+
+ +
+
+ +**$networks:** `?array` + +
+
+ +
+
+ +**$labels:** `?array` + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->listFileStorageNetworks($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available service networks by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->listFileStorageNetworks( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->createFileStorageNetwork($serviceUuid, $request) -> FileStorageNetworkDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new service network by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->createFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new CreateFileStorageNetworkRequest([ + 'body' => new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'test-name', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '10.20.30.40', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$request:** `FileStorageNetworkCreate` + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->getFileStorageNetwork($serviceUuid, $networkName) -> FileStorageNetworkDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns service network details by given {service_uuid} and {network_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->getFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$networkName:** `string` β€” The name of the network. + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->deleteFileStorageNetwork($serviceUuid, $networkName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing network by given {service_uuid} and {network_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->deleteFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$networkName:** `string` β€” The name of the network. + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->modifyFileStorageNetwork($serviceUuid, $networkName, $request) -> FileStorageNetworkDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing service network by given {service_uuid} and {network_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->modifyFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + new FileStorageNetworkModify([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'test-name', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '10.20.30.40', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$networkName:** `string` β€” The name of the network. + +
+
+ +
+
+ +**$uuid:** `?string` + +
+
+ +
+
+ +**$name:** `?string` + +
+
+ +
+
+ +**$family:** `?string` + +
+
+ +
+
+ +**$ipAddress:** `?string` + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->listFileStorageShares($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available service shares by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->listFileStorageShares( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->createFileStorageShare($serviceUuid, $request) -> FileStorageShareDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new service share by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->createFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new CreateFileStorageShareRequest([ + 'body' => new FileStorageShareCreate([ + 'name' => 'read', + 'path' => '/public', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.147.0/24', + 'permission' => FileStoragePermission::Ro->value, + ]), + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$request:** `FileStorageShareCreate` + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->getFileStorageShare($serviceUuid, $shareName) -> FileStorageShareDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns service share details by given {service_uuid} and {share_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->getFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$shareName:** `string` β€” The name of the share. + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->deleteFileStorageShare($serviceUuid, $shareName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing share by given {service_uuid} and {share_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->deleteFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$shareName:** `string` β€” The name of the share. + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->modifyFileStorageShare($serviceUuid, $shareName, $request) -> FileStorageShareDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing service share by given {service_uuid} and {share_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->modifyFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + new FileStorageShareModify([ + 'name' => 'test-name', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.25.0/24', + 'permission' => FileStoragePermission::Ro->value, + ]), + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$shareName:** `string` β€” The name of the share. + +
+
+ +
+
+ +**$name:** `?string` β€” A resource name. + +
+
+ +
+
+ +**$acl:** `?array` + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->listFileStorageAcls($serviceUuid, $shareName) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available ACLs by given {service_uuid} and {share_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->listFileStorageAcls( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$shareName:** `string` β€” The name of the share. + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->createFileStorageAcl($serviceUuid, $shareName, $request) -> FileStorageAclDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new share ACL by given {service_uuid} and {share_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->createFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + new CreateFileStorageAclRequest([ + 'body' => new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.25.147', + 'permission' => FileStoragePermission::Ro->value, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$shareName:** `string` β€” The name of the share. + +
+
+ +
+
+ +**$request:** `FileStorageAclCreate` + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->getFileStorageAcl($serviceUuid, $shareName, $aclName) -> FileStorageAclDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns ACL details by given {service_uuid}, {share_name} and {acl_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->getFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + 'test-name', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$shareName:** `string` β€” The name of the share. + +
+
+ +
+
+ +**$aclName:** `string` β€” The name of the ACL. + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->deleteFileStorageAcl($serviceUuid, $shareName, $aclName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing ACL by given {service_uuid}, {share_name} and {acl_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->deleteFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + 'test-name', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$shareName:** `string` β€” The name of the share. + +
+
+ +
+
+ +**$aclName:** `string` β€” The name of the ACL. + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->modifyFileStorageAcl($serviceUuid, $shareName, $aclName, $request) -> FileStorageAclDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing ACL by given {service_uuid}, {share_name} and {acl_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->modifyFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + 'test-name', + new FileStorageAclModify([ + 'name' => 'test-name', + 'target' => '192.168.25.0/24', + 'permission' => FileStoragePermission::Rw->value, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$shareName:** `string` β€” The name of the share. + +
+
+ +
+
+ +**$aclName:** `string` β€” The name of the ACL. + +
+
+ +
+
+ +**$name:** `?string` + +
+
+ +
+
+ +**$target:** `?string` β€” The target of the ACL entry. It can be an IP Address, Network Prefix or a wildcard. + +
+
+ +
+
+ +**$permission:** `?string` + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->listFileStorageLabels($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available service labels by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->listFileStorageLabels( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->createFileStorageLabel($serviceUuid, $request) -> FileStorageLabelDetails +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new label by given {service_uuid}. Labels are used for service filtering. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->createFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new CreateFileStorageLabelRequest([ + 'body' => new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$request:** `FileStorageLabelCreate` + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->getFileStorageLabel($serviceUuid, $labelKey) -> FileStorageLabelDetails +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns label details by given {service_uuid} and {key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->getFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'environment', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$labelKey:** `string` β€” The key of the label. + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->deleteFileStorageLabel($serviceUuid, $labelKey) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing label by given {service_uuid} and {key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->deleteFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'environment', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$labelKey:** `string` β€” The key of the label. + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->modifyFileStorageLabel($serviceUuid, $labelKey, $request) -> FileStorageLabelDetails +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing label by given {service_uuid} and {key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->modifyFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'environment', + new FileStorageLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$labelKey:** `string` β€” The key of the label. + +
+
+ +
+
+ +**$key:** `?string` + +
+
+ +
+
+ +**$value:** `?string` + +
+
+
+
+ + +
+
+
+ +
$client->fileStorage->getFileStorageCurrentState($serviceUuid) -> FileStorageServiceDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns the current state of the File Storage service by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->fileStorage->getFileStorageCurrentState( + '17fd43a5-a97e-44f7-98a8-0a787da67069', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +## database +
$client->database->listDatabaseTypes() -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available database types. Contains available legacy plans, zones, database versions supported and the configuration properties for each database. PostgreSQL and MySQL componentised (rdb.*) plans are selected with the plan_* request fields instead of a listed plan name. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->listDatabaseTypes(); +``` +
+
+
+
+ + +
+
+
+ +
$client->database->listDatabasePlans() -> DatabasePlansResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Lists available componentised database plans +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->listDatabasePlans(); +``` +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseType($serviceTypeName) -> DatabaseServiceTypeResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns database type details by given {database_type}. Contains available legacy plans, zones, database versions supported and configuration properties. PostgreSQL and MySQL componentised (rdb.*) plans are selected with the plan_* request fields instead of a listed plan name. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseType( + DatabaseServiceType::Mysql->value, +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceTypeName:** `string` β€” Service type parameter + +
+
+
+
+ + +
+
+
+ +
$client->database->listDatabases($request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of all available Managed Database services. Depending on their database type, Managed Databases services will have different details. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->listDatabases( + new ListDatabasesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of entries to receive at most. + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. + +
+
+ +
+
+ +**$sort:** `?string` β€” Sort results by the specified field. Prefix with '-' for descending order. Supported fields: `created_at`, `name` (service hostname), `operational_state` (service status), `zone` (location). + +
+
+
+
+ + +
+
+
+ +
$client->database->createDatabase($request) -> DatabaseServiceInformationResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new Managed Database instance. New databases are started by default. An initial backup is created automatically on startup and the API will be fully functional only after this backup has been created. The creation might take a while. Note that different databases have different properties that can be passed on creation. For PostgreSQL and MySQL, select the plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->createDatabase( + new DatabaseServiceCreateOpenApi([ + 'hostnamePrefix' => 'doc-api-unique-prefix', + 'title' => 'my-managed-database', + 'type' => DatabaseServiceType::Mysql->value, + 'zone' => 'de-fra1', + 'terminationProtection' => false, + 'maintenance' => new DatabaseServiceCreateOpenApiMaintenance([ + 'dow' => DatabaseMaintenanceDow::Sunday->value, + 'time' => '05:00:00', + ]), + 'networks' => [ + new DatabaseNetworkCreate([ + 'uuid' => '03631160-d57a-4926-ad48-a2f828229dcb', + 'name' => 'example-network-1', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + new DatabaseNetworkCreate([ + 'uuid' => '03631160-d57a-4926-ad48-a2f828229dcb', + 'name' => 'example-network-2', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + ], + 'labels' => [ + new DatabaseLabelCreate([ + 'key' => 'env', + 'value' => 'staging', + ]), + new DatabaseLabelCreate([ + 'key' => 'foo', + 'value' => 'bar', + ]), + ], + 'properties' => new DatabaseServicePropertiesMysql([ + 'automaticUtilityNetworkIpFilter' => true, + 'ipFilter' => [ + 'ip_filter', + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$hostnamePrefix:** `string` β€” Hostname prefix for the service nodes. + +
+
+ +
+
+ +**$title:** `string` β€” Human-readable title for the service. + +
+
+ +
+
+ +**$type:** `string` + +
+
+ +
+
+ +**$zone:** `string` β€” Zone where the service is created. + +
+
+ +
+
+ +**$setServiceUuid:** `?string` β€” Optional UUID to assign to the created service. + +
+
+ +
+
+ +**$plan:** `?string` β€” Deprecated: prefer the plan_* selection fields (plan_compute, plan_node_count, plan_storage_gib, plan_backups) for PostgreSQL and MySQL. The plan name remains supported, and required for engines without componentised plans. For componentised (rdb.*) plans the storage segment is the desired TOTAL storage per node: any total reachable from a catalog plan's included storage in the plan's storage steps (within its cap) is a valid plan name, e.g. rdb.standard.2x-2CPU-8GB-120GB-regular selects the 80GB catalog plan with a 40GB dynamic top-up. + +
+
+ +
+
+ +**$planCompute:** `?string` β€” Plan selection: compute shape combining family, CPU and memory as one token, as listed in the plan catalog components. PostgreSQL and MySQL only. + +
+
+ +
+
+ +**$planNodeCount:** `?int` β€” Plan selection: number of nodes. + +
+
+ +
+
+ +**$planStorageGib:** `?int` β€” Plan selection: desired TOTAL storage per node in GiB. Resolution picks the plan whose included storage matches, or tops the closest plan up with dynamic additional storage within the allowed limits. Mutually exclusive with additional_disk_space_gib. + +
+
+ +
+
+ +**$planBackups:** `?string` β€” Plan selection: backup tier. PostgreSQL and MySQL tiered plans only. + +
+
+ +
+
+ +**$additionalDiskSpaceGib:** `?int` β€” Additional disk space in GiB. Legacy plans only: componentised (rdb.*) plans set storage as a total via plan_storage_gib or the plan name. + +
+
+ +
+
+ +**$terminationProtection:** `?bool` β€” When enabled, the service cannot be deleted until termination protection is disabled. + +
+
+ +
+
+ +**$maintenance:** `?DatabaseServiceCreateOpenApiMaintenance` β€” Weekly maintenance window. + +
+
+ +
+
+ +**$networks:** `?array` β€” SDN networks to attach to the service. + +
+
+ +
+
+ +**$labels:** `?array` β€” Labels used for service filtering. + +
+
+ +
+
+ +**$serviceIntegrations:** `?array` β€” Service integrations to configure on creation. + +
+
+ +
+
+ +**$properties:** `DatabaseServicePropertiesMysql|DatabaseServicePropertiesPg|DatabaseServicePropertiesRedis|DatabaseServicePropertiesOpensearch|DatabaseServicePropertiesValkey|null` β€” Engine-specific configuration properties. The allowed keys depend on the selected service type; provide the property set matching the chosen type. + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabase($uuid) -> DatabaseServiceInformationResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns details of a Managed Database service by its {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabase( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->deleteDatabase($uuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes a specified Managed Database. All data will be erased and lost, including backups. If the service is not powered off, it will be powered off before deletion. The state of the service can be anything. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->deleteDatabase( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->modifyDatabase($uuid, $request) -> DatabaseServiceInformationResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies Managed Database service details by its {uuid} including upgrading plans, migration to other zones and database type-specific configurations. For PostgreSQL and MySQL, change the plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->modifyDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceModifyOpenApi([ + 'title' => 'my-managed-database', + 'powered' => true, + 'zone' => 'de-fra1', + 'terminationProtection' => false, + 'maintenance' => new DatabaseServiceModifyOpenApiMaintenance([ + 'dow' => DatabaseMaintenanceDow::Sunday->value, + 'time' => '12:00:00', + ]), + 'networks' => [ + new DatabaseNetworkCreate([ + 'uuid' => '03631160-d57a-4926-ad48-a2f828229dcb', + 'name' => 'example-network-1', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + ], + 'properties' => new DatabaseServicePropertiesMysql([ + 'automaticUtilityNetworkIpFilter' => true, + 'ipFilter' => [ + 'ip_filter', + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$title:** `?string` β€” Human-readable title for the service. + +
+
+ +
+
+ +**$type:** `?string` + +
+
+ +
+
+ +**$powered:** `?bool` β€” Desired power state of the service. + +
+
+ +
+
+ +**$zone:** `?string` β€” Zone to migrate the service to. + +
+
+ +
+
+ +**$plan:** `?string` β€” Deprecated: prefer the plan_* selection fields (plan_compute, plan_node_count, plan_storage_gib, plan_backups) for PostgreSQL and MySQL. The plan name remains supported, and required for engines without componentised plans. For componentised (rdb.*) plans the storage segment is the desired TOTAL storage per node: any total reachable from a catalog plan's included storage in the plan's storage steps (within its cap) is a valid plan name, e.g. rdb.standard.2x-2CPU-8GB-120GB-regular selects the 80GB catalog plan with a 40GB dynamic top-up. + +
+
+ +
+
+ +**$planCompute:** `?string` β€” Plan selection: compute shape combining family, CPU and memory as one token, as listed in the plan catalog components. PostgreSQL and MySQL only. + +
+
+ +
+
+ +**$planNodeCount:** `?int` β€” Plan selection: number of nodes. + +
+
+ +
+
+ +**$planStorageGib:** `?int` β€” Plan selection: desired TOTAL storage per node in GiB. Resolution picks the plan whose included storage matches, or tops the closest plan up with dynamic additional storage within the allowed limits. Mutually exclusive with additional_disk_space_gib. + +
+
+ +
+
+ +**$planBackups:** `?string` β€” Plan selection: backup tier. PostgreSQL and MySQL tiered plans only. + +
+
+ +
+
+ +**$additionalDiskSpaceGib:** `?int` β€” Additional disk space in GiB. Legacy plans only: componentised (rdb.*) plans set storage as a total via plan_storage_gib or the plan name. + +
+
+ +
+
+ +**$terminationProtection:** `?bool` β€” When enabled, the service cannot be deleted until termination protection is disabled. + +
+
+ +
+
+ +**$maintenance:** `?DatabaseServiceModifyOpenApiMaintenance` β€” Weekly maintenance window. + +
+
+ +
+
+ +**$networks:** `?array` β€” SDN networks attached to the service. + +
+
+ +
+
+ +**$labels:** `?array` β€” Labels used for service filtering. + +
+
+ +
+
+ +**$properties:** `DatabaseServicePropertiesMysql|DatabaseServicePropertiesPg|DatabaseServicePropertiesRedis|DatabaseServicePropertiesOpensearch|DatabaseServicePropertiesValkey|null` β€” Engine-specific configuration properties. The allowed keys depend on the service type; provide the property set matching the service's type. + +
+
+
+
+ + +
+
+
+ +
$client->database->modifyDatabaseType($uuid, $request) -> DatabaseServiceInformationResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Update a service's type by the given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->modifyDatabaseType( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceTypeModify([ + 'targetType' => 'primary', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$targetType:** `string` β€” Service type + +
+
+
+
+ + +
+
+
+ +
$client->database->cloneDatabase($uuid, $request) -> DatabaseServiceInformationResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a clone of a Managed Database service based on its {uuid}. It is possible to change location, plans and use the point in time feature to clone your service at a specific time using your backups. For PostgreSQL and MySQL, select the clone's plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->cloneDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new CloneDatabaseRequest([ + 'body' => new DatabaseServiceCloneMysql([ + 'hostnamePrefix' => 'dev', + 'cloneTime' => new DateTime('2024-01-30T15:04:05Z'), + 'backupName' => 'daily-backup-2024-01-30', + 'zone' => 'fi-hel1', + 'terminationProtection' => false, + 'maintenance' => new DatabaseServiceCloneMysqlMaintenance([ + 'dow' => DatabaseMaintenanceDow::Monday->value, + 'time' => '03:00:00', + ]), + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$request:** `DatabaseServiceCloneMysql|DatabaseServiceClonePg|DatabaseServiceCloneRedis|DatabaseServiceCloneOpensearch|DatabaseServiceCloneValkey` + +
+
+
+
+ + +
+
+
+ +
$client->database->listDatabaseNetworks($uuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of attached SDN networks to a Managed Database service by its {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->listDatabaseNetworks( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->createDatabaseNetwork($uuid, $request) -> DatabaseNetworkInformationDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Attaches an SDN network to a Managed Database service by its {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->createDatabaseNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateDatabaseNetworkRequest([ + 'body' => new DatabaseNetworkCreate([ + 'name' => 'my-network', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$request:** `DatabaseNetworkCreate` + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseNetwork($uuid, $networkName) -> DatabaseNetworkInformationDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns the attached SDN network details to service by its {uuid} and {network_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$networkName:** `string` β€” Network UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->deleteDatabaseNetwork($uuid, $networkName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Detaches an existing SDN network from a Managed Database service by its {uuid} and {network_name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->deleteDatabaseNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$networkName:** `string` β€” Network UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->upgradeDatabase($uuid, $request) -> DatabaseServiceInformationResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Upgrades your PostgreSQL Managed Database service database to a newer major version. Downgrades are not permitted. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->upgradeDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceUpgrade([ + 'targetVersion' => '12', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$targetVersion:** `string` β€” Version to upgrade the service + +
+
+
+
+ + +
+
+
+ +
$client->database->listDatabaseLabels($uuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available service labels by given {service_uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->listDatabaseLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->createDatabaseLabel($uuid, $request) -> DatabaseLabelResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new label by given {service_uuid}. Labels used for service filtering. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->createDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateDatabaseLabelRequest([ + 'body' => new DatabaseLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$request:** `DatabaseLabelCreate` + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseLabel($uuid, $labelKey) -> DatabaseLabelResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns label details by given {service_uuid} and {key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'foo', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$labelKey:** `string` β€” Label ID + +
+
+
+
+ + +
+
+
+ +
$client->database->deleteDatabaseLabel($uuid, $labelKey) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing label by given {service_uuid} and {key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->deleteDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'foo', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$labelKey:** `string` β€” Label ID + +
+
+
+
+ + +
+
+
+ +
$client->database->modifyDatabaseLabel($uuid, $labelKey, $request) -> DatabaseLabelResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing label by given {service_uuid} and {key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->modifyDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'foo', + new DatabaseLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$labelKey:** `string` β€” Label ID + +
+
+ +
+
+ +**$key:** `?string` + +
+
+ +
+
+ +**$value:** `?string` + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseAvailableExtensions($uuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available PostgreSQL extensions for the Managed Database service by its {service-uuid}. Only supported for PostgreSQL services. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseAvailableExtensions( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->getPgAvailableExtensions() -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available PostgreSQL extensions grouped by PostgreSQL version. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getPgAvailableExtensions(); +``` +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseTypeVersions() -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of supported Managed Database service versions. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseTypeVersions(); +``` +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseAccessControl($uuid) -> DatabaseAccessControlSettingsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Return access controls settings for the OpenSearch Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseAccessControl( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->modifyDatabaseAccessControl($uuid, $request) -> DatabaseAccessControlSettingsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies the user {username} access control for the Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->modifyDatabaseAccessControl( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceAclModify([ + 'accessControl' => true, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$accessControl:** `?bool` β€” Enables OpenSearch access control + +
+
+ +
+
+ +**$extendedAccessControl:** `?bool` β€” Enables OpenSearch extended access control + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseSecurity($uuid) -> DatabaseOpenSearchSecurityPluginStatusResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns Security management status for the OpenSearch Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseSecurity( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->enableDatabaseSecurityAdmin($uuid, $request) -> DatabaseOpenSearchSecurityPluginStatusResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Enables Security management admin for the OpenSearch Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->enableDatabaseSecurityAdmin( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceSecurityEnable([ + 'adminPassword' => 'Str0ngP@ssw0rd!', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$adminPassword:** `string` β€” Security admin password + +
+
+
+
+ + +
+
+
+ +
$client->database->modifyDatabaseSecurityAdmin($uuid, $request) -> DatabaseOpenSearchSecurityPluginStatusResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies Security management admin password for the OpenSearch Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->modifyDatabaseSecurityAdmin( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceSecurityModify([ + 'adminPassword' => 'Curr3nt@Passw0rd!', + 'newPassword' => 'N3w@Str0ngPassw0rd!', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$adminPassword:** `string` β€” Current admin password + +
+
+ +
+
+ +**$newPassword:** `string` β€” New admin password + +
+
+
+
+ + +
+
+
+ +
$client->database->listDatabaseIntegrationEndpoints() -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available integration endpoints. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->listDatabaseIntegrationEndpoints(); +``` +
+
+
+
+ + +
+
+
+ +
$client->database->createDatabaseIntegrationEndpoint($request) -> DatabaseIntegrationEndpointResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new integration endpoint. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->createDatabaseIntegrationEndpoint( + new DatabaseIntegrationEndpointCreate([ + 'type' => DatabaseIntegrationEndpoint::Logs->value, + 'name' => 'webhook-endpoint', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$type:** `string` + +
+
+ +
+
+ +**$name:** `string` β€” The name of the integration endpoint. + +
+
+ +
+
+ +**$properties:** `?array` β€” A key-value map of properties specific to the integration endpoint type. + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseIntegrationEndpoint($integrationUuid) -> DatabaseIntegrationEndpointResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns integration endpoint details by given {integration-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseIntegrationEndpoint( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$integrationUuid:** `string` β€” Integration UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->deleteDatabaseIntegrationEndpoint($integrationUuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing integration endpoint by given {integration-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->deleteDatabaseIntegrationEndpoint( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$integrationUuid:** `string` β€” Integration UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->modifyDatabaseIntegrationEndpoint($integrationUuid, $request) -> DatabaseIntegrationEndpointResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing integration endpoint by given {integration-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->modifyDatabaseIntegrationEndpoint( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseIntegrationEndpointModify([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$integrationUuid:** `string` β€” Integration UUID + +
+
+ +
+
+ +**$properties:** `?array` + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseAccountCa() -> DatabaseAccountCaResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns the CA certificate. Every customer main account has a private Certificate Authority (CA) that signs certificates for internal use. Managed Database service types, such as PostgreSQL, use it for external connections. To access these services, you must download and configure the certificate on your browser or client. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseAccountCa(); +``` +
+
+
+
+ + +
+
+
+ +
$client->database->listDatabaseAlerts() -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns all the alerts associated with your Managed Database services. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->listDatabaseAlerts(); +``` +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseStatus($uuid) -> DatabaseServiceStatusResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get a service's status by the given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseStatus( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseVersions($uuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns available versions of the Managed Database service by its {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseVersions( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->startDatabaseManualMaintenance($uuid) -> DatabaseUpCloudApiResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Start maintenance updates for your Managed Database service if any updates are pending. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->startDatabaseManualMaintenance( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->enableDatabaseTemporaryWrites($uuid) -> DatabaseUpCloudApiResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Enable temporary writes by the given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->enableDatabaseTemporaryWrites( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseMigrationStatus($uuid) -> DatabaseServiceMigrationStatusResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns details about the migration progress over time of a Managed database service by its {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseMigrationStatus( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseAlerts($uuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns alerts for Managed Database service identified by `{uuid}`. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseAlerts( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseMetrics($uuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns metrics related to a Managed Database service by its {uuid} and query parameter {period}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseMetrics( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseQueryStatistics($uuid, $request) -> DatabaseQueryStatisticsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of query statistics for the Managed Database service by its {uuid} and optional query parameters {limit}, {offset} and {order}. Query statistics will differ depending on the database type. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseQueryStatistics( + '01234567-89ab-cdef-0123-456789abcdef', + new GetDatabaseQueryStatisticsRequest([ + 'limit' => 10, + 'offset' => 0, + 'order' => 'asc', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of entries to receive at most. + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. + +
+
+ +
+
+ +**$order:** `?string` β€” Sort order + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseLogs($uuid, $request) -> DatabaseLogListResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns Managed Database service system-level logs by its {uuid} and optional query parameters {limit}, {offset} and {order}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseLogs( + '01234567-89ab-cdef-0123-456789abcdef', + new GetDatabaseLogsRequest([ + 'limit' => 10, + 'offset' => 0, + 'order' => 'asc', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of entries to receive at most. + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. + +
+
+ +
+
+ +**$order:** `?string` β€” Sort order + +
+
+
+
+ + +
+
+
+ +
$client->database->listDatabaseConnectionPools($uuid, $request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available connection pools for a Managed Database service. Connection pools are available only for PostgreSQL database services. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->listDatabaseConnectionPools( + '01234567-89ab-cdef-0123-456789abcdef', + new ListDatabaseConnectionPoolsRequest([ + 'sort' => 'asc', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$sort:** `?string` β€” Order of returned results. + +
+
+
+
+ + +
+
+
+ +
$client->database->createDatabaseConnectionPool($uuid, $request) -> DatabaseConnectionPoolResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a connection pool for the Managed Database service {uuid}. Connection pool endpoints are for PostgreSQL Managed Databases only. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->createDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseConnectionPoolCreate([ + 'database' => 'defaultdb', + 'poolMode' => DatabaseConnectionPoolCreatePoolMode::Statement->value, + 'poolName' => 'readonly-pool', + 'poolSize' => 10, + 'username' => 'readonly', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$database:** `string` β€” Database + +
+
+ +
+
+ +**$poolMode:** `string` β€” Connection Pool mode + +
+
+ +
+
+ +**$poolName:** `string` β€” Connection Pool name + +
+
+ +
+
+ +**$poolSize:** `int` β€” Connection Pool size + +
+
+ +
+
+ +**$username:** `?string` β€” Connection Pool username + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseConnectionPool($uuid, $poolName) -> DatabaseConnectionPoolResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns the connection pool {pool-name} details for the Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$poolName:** `string` β€” Connection Pool Name + +
+
+
+
+ + +
+
+
+ +
$client->database->deleteDatabaseConnectionPool($uuid, $poolName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes the connection pool {pool-name} for the Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->deleteDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$poolName:** `string` β€” Connection Pool Name + +
+
+
+
+ + +
+
+
+ +
$client->database->modifyDatabaseConnectionPool($uuid, $poolName, $request) -> DatabaseConnectionPoolResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies the connection pool {pool-name} for the Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->modifyDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + new DatabaseConnectionPoolModify([ + 'database' => 'defaultdb', + 'poolMode' => DatabaseConnectionPoolModifyPoolMode::Session->value, + 'poolSize' => 20, + 'username' => 'app-user', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$poolName:** `string` β€” Connection Pool Name + +
+
+ +
+
+ +**$database:** `?string` β€” Database + +
+
+ +
+
+ +**$poolMode:** `?string` β€” Connection Pool mode + +
+
+ +
+
+ +**$poolSize:** `?int` β€” Connection Pool size + +
+
+ +
+
+ +**$username:** `?string` β€” Connection Pool username + +
+
+
+
+ + +
+
+
+ +
$client->database->listDatabaseIndices($uuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available indices for a Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->listDatabaseIndices( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->deleteDatabaseIndex($uuid, $indexName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes the index {index_name} for the Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->deleteDatabaseIndex( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$indexName:** `string` β€” OpenSearch Index Name + +
+
+
+
+ + +
+
+
+ +
$client->database->listDatabaseIntegrations($uuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available service integrations by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->listDatabaseIntegrations( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->createDatabaseIntegration($uuid, $request) -> DatabaseServiceIntegrationResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new integration by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->createDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateDatabaseIntegrationRequest([ + 'body' => new DatabaseServiceIntegrationCreate([ + 'type' => DatabaseServiceIntegration::Logs->value, + 'destinationUuid' => '09e86f48-2dcd-4a43-843d-3532ab112c1d', + 'properties' => [ + 'opensearch_index_days_max' => 30, + 'opensearch_index_prefix' => "mysql_logs", + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$request:** `DatabaseServiceIntegrationCreate` + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseIntegration($uuid, $integrationUuid) -> DatabaseServiceIntegrationResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns integration details by given {service-uuid} and {integration-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$integrationUuid:** `string` β€” Integration UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->deleteDatabaseIntegration($uuid, $integrationUuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing integration by given {service-uuid} and {integration-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->deleteDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$integrationUuid:** `string` β€” Integration UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->modifyDatabaseIntegration($uuid, $integrationUuid, $request) -> DatabaseServiceIntegrationResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing integration by given {service-uuid} and {integration-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->modifyDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceIntegrationModify([ + 'properties' => [ + 'key1' => "value1", + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$integrationUuid:** `string` β€” Integration UUID + +
+
+ +
+
+ +**$properties:** `?array` + +
+
+
+
+ + +
+
+
+ +
$client->database->listDatabaseLogicalDatabases($uuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of logical databases for a Managed Database service identified by {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->listDatabaseLogicalDatabases( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->createDatabaseLogicalDatabase($uuid, $request) -> LogicalDatabaseResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new logical database for the Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->createDatabaseLogicalDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new LogicalDatabaseCreate([ + 'name' => 'my_database', + 'lcCollate' => 'en_US.UTF-8', + 'lcCtype' => 'en_US.UTF-8', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$name:** `string` β€” logical database name + +
+
+ +
+
+ +**$lcCollate:** `?string` β€” Collation order + +
+
+ +
+
+ +**$lcCtype:** `?string` β€” Category of a locale definition source file + +
+
+
+
+ + +
+
+
+ +
$client->database->deleteDatabaseLogicalDatabase($uuid, $databaseName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes the logical database {database_name} from the Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->deleteDatabaseLogicalDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$databaseName:** `string` β€” Database name + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabasePeeringsStatus($uuid) -> DatabaseServiceNetworkDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns networks peering status for a service by its {uuid}. Only available for services using SDN private networks. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabasePeeringsStatus( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseSessions($uuid, $request) -> DatabaseCurrentSessionsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of current sessions details for your Managed Database service by its {uuid} and optional query parameters {limit}, {offset} and {order}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseSessions( + '01234567-89ab-cdef-0123-456789abcdef', + new GetDatabaseSessionsRequest([ + 'limit' => 10, + 'offset' => 0, + 'order' => 'asc', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of entries to receive at most. + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. + +
+
+ +
+
+ +**$order:** `?string` β€” Sort order + +
+
+
+
+ + +
+
+
+ +
$client->database->terminateDatabaseSession($uuid, $pid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Terminates a sessions or kills a running query for a Managed Database service by its {uuid}, session {pid} and optional query parameter {terminate}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->terminateDatabaseSession( + '01234567-89ab-cdef-0123-456789abcdef', + 1001, +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$pid:** `int` β€” Session PID + +
+
+
+
+ + +
+
+
+ +
$client->database->createDatabaseTask($uuid, $request) -> DatabaseServiceTaskResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a task that checks for potential errors before starting a migration or upgrade for a Managed Database service by its {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->createDatabaseTask( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceTaskCreate([ + 'datasetImport' => new DatabaseServiceTaskCreateDatasetImport([ + 'datasetName' => 'customer-events', + ]), + 'operation' => 'dataset_import', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$datasetImport:** `?DatabaseServiceTaskCreateDatasetImport` + +
+
+ +
+
+ +**$migrationCheck:** `?DatabaseServiceTaskCreateMigrationCheck` + +
+
+ +
+
+ +**$upgradeCheck:** `?DatabaseServiceTaskCreateUpgradeCheck` + +
+
+ +
+
+ +**$targetVersion:** `?string` β€” The target version for upgrade operations. + +
+
+ +
+
+ +**$operation:** `string` β€” The operation to be performed. + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseTask($uuid, $taskId) -> DatabaseServiceTaskDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns task details of a Managed Database service by its {uuid} and the task {id} obtained from Create Managed Database task. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseTask( + '01234567-89ab-cdef-0123-456789abcdef', + 1001, +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$taskId:** `int` β€” Task ID + +
+
+
+
+ + +
+
+
+ +
$client->database->listDatabaseUsers($uuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of database users associated with the Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->listDatabaseUsers( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->database->createDatabaseUser($uuid, $request) -> DatabaseUserResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new user for the Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->createDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceUserCreate([ + 'username' => 'api-doc-user', + 'password' => 'new-password', + 'authentication' => 'caching_sha2_password', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” The username of the service user + +
+
+ +
+
+ +**$password:** `?string` β€” The password of the service user + +
+
+ +
+
+ +**$authentication:** `?string` β€” The authentication method for the service user + +
+
+ +
+
+ +**$redisAccessControl:** `?DatabaseServiceUserCreateRedisAccessControl` β€” Redis access control settings + +
+
+ +
+
+ +**$pgAccessControl:** `?DatabaseServiceUserCreatePgAccessControl` β€” PostgreSQL access control settings + +
+
+ +
+
+ +**$opensearchAccessControl:** `?DatabaseServiceUserCreateOpensearchAccessControl` β€” OpenSearch access control settings + +
+
+ +
+
+ +**$valkeyAccessControl:** `?DatabaseServiceUserCreateValkeyAccessControl` β€” Valkey access control settings + +
+
+
+
+ + +
+
+
+ +
$client->database->getDatabaseUser($uuid, $username) -> DatabaseUserResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns the user {username} details for the Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->getDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” Username identifier + +
+
+
+
+ + +
+
+
+ +
$client->database->deleteDatabaseUser($uuid, $username) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes the user {username} from the Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->deleteDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” Username identifier + +
+
+
+
+ + +
+
+
+ +
$client->database->modifyDatabaseUser($uuid, $username, $request) -> DatabaseUserResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies the user {username} details for the Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->modifyDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + new DatabaseServiceUserModify([ + 'password' => 'new_secure_password_123!', + 'authentication' => 'caching_sha2_password', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” Username identifier + +
+
+ +
+
+ +**$password:** `?string` β€” New password for the service user + +
+
+ +
+
+ +**$authentication:** `?string` β€” Authentication method for the service user + +
+
+
+
+ + +
+
+
+ +
$client->database->modifyDatabaseUserAccessControl($uuid, $username, $request) -> DatabaseUserResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Return access controls settings for the OpenSearch Managed Database service {uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->database->modifyDatabaseUserAccessControl( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + new DatabaseServiceUserAclModify([ + 'redisAccessControl' => new DatabaseServiceUserAclModifyRedisAccessControl([ + 'categories' => [ + '@admin', + '@read', + ], + 'channels' => [ + 'news', + 'alerts', + ], + 'commands' => [ + 'GET', + 'SET', + ], + 'keys' => [ + 'user:*', + 'session:*', + ], + ]), + 'pgAccessControl' => new DatabaseServiceUserAclModifyPgAccessControl([ + 'allowReplication' => true, + ]), + 'opensearchAccessControl' => new DatabaseServiceUserAclModifyOpensearchAccessControl([ + 'rules' => [ + new DatabaseServiceUserAclModifyOpensearchAccessControlRulesItem([ + 'index' => 'logs-*', + 'permission' => 'read', + ]), + ], + ]), + 'valkeyAccessControl' => new DatabaseServiceUserAclModifyValkeyAccessControl([ + 'categories' => [ + '@write', + ], + 'channels' => [ + 'updates', + ], + 'commands' => [ + 'DEL', + ], + 'keys' => [ + 'cache:*', + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$uuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$username:** `string` β€” Username identifier + +
+
+ +
+
+ +**$redisAccessControl:** `?DatabaseServiceUserAclModifyRedisAccessControl` β€” Redis ACL modification schema + +
+
+ +
+
+ +**$pgAccessControl:** `?DatabaseServiceUserAclModifyPgAccessControl` β€” PostgreSQL replication permission modification schema + +
+
+ +
+
+ +**$opensearchAccessControl:** `?DatabaseServiceUserAclModifyOpensearchAccessControl` β€” OpenSearch index permission modification schema + +
+
+ +
+
+ +**$valkeyAccessControl:** `?DatabaseServiceUserAclModifyValkeyAccessControl` β€” Valkey ACL modification schema + +
+
+
+
+ + +
+
+
+ +## gateway +
$client->gateway->listGatewayPlans($request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +List available plans. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->listGatewayPlans( + new ListGatewayPlansRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of entries to receive at most. + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. + +
+
+
+
+ + +
+
+
+ +
$client->gateway->getGatewayPlan($planName) -> GatewayPlanDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get plan details. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->getGatewayPlan( + 'advanced', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$planName:** `string` β€” Plan identifier + +
+
+
+
+ + +
+
+
+ +
$client->gateway->listGatewayServices($request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +List available services. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->listGatewayServices( + new ListGatewayServicesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of entries to receive at most. + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. + +
+
+ +
+
+ +**$sort:** `?string` β€” Sort resources by field. Prefix with '-' for descending order. + +
+
+
+
+ + +
+
+
+ +
$client->gateway->createGatewayService($request) -> GatewayServiceDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Create a new service. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->createGatewayService( + new GatewayServiceCreateRequest([ + 'name' => 'gateway-service', + 'plan' => 'development-gwaas-1c2g', + 'zone' => 'fi-hel1', + 'features' => [ + GatewayServiceFeatures::Nat->value, + ], + 'routers' => [ + new GatewayRouterCreateRequest([ + 'uuid' => 'fedcba98-7654-3210-fedc-ba9876543210', + ]), + ], + 'addresses' => [ + new GatewayAddressCreateRequest([ + 'name' => 'gateway-service', + ]), + ], + 'connections' => [ + new GatewayConnectionCreateRequest([ + 'name' => 'gateway-service', + 'type' => GatewayConnectionType::Ipsec->value, + 'localRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'upcloud-example-route', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.0.0/24', + ]), + ], + 'remoteRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'remote-example-route', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.1.0/24', + ]), + ], + 'tunnels' => [ + new GatewayTunnelCreateRequest([ + 'name' => 'example-tunnel-1', + 'localAddress' => new GatewayTunnelCreateRequestLocalAddress([ + 'name' => 'public-ip-1', + ]), + 'remoteAddress' => new GatewayTunnelCreateRequestRemoteAddress([ + 'address' => '100.10.0.111', + ]), + 'ipsec' => new GatewayTunnelCreateRequestIpsec([ + 'authentication' => new GatewayTunnelCreateRequestIpsecAuthentication([ + 'authentication' => GatewayIpsecAuthenticationType::Psk->value, + 'psk' => '{your PSK}', + ]), + ]), + 'tunnelInternalIp' => '169.254.17.1', + 'internalPeerPingInterval' => 0, + ]), + ], + ]), + ], + 'labels' => [ + new GatewayLabelCreateRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + 'configuredStatus' => GatewayServiceConfiguredStatus::Started->value, + 'automaticTunnelInternalIpAllocation' => true, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$name:** `string` β€” Name of the service + +
+
+ +
+
+ +**$plan:** `string` β€” Plan + +
+
+ +
+
+ +**$zone:** `string` β€” Zone + +
+
+ +
+
+ +**$features:** `array` β€” Active features + +
+
+ +
+
+ +**$routers:** `array` β€” Service routers + +
+
+ +
+
+ +**$addresses:** `?array` β€” Service addresses + +
+
+ +
+
+ +**$connections:** `?array` β€” Service connections + +
+
+ +
+
+ +**$labels:** `?array` β€” Labels + +
+
+ +
+
+ +**$configuredStatus:** `string` + +
+
+ +
+
+ +**$automaticTunnelInternalIpAllocation:** `?bool` β€” Allocate and use tunnel internal IPs automatically + +
+
+
+
+ + +
+
+
+ +
$client->gateway->getGatewayService($serviceUuid) -> GatewayServiceDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get service details. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->getGatewayService( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->gateway->replaceGatewayService($serviceUuid, $request) -> GatewayServiceDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Replace service configuration. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->replaceGatewayService( + '01234567-89ab-cdef-0123-456789abcdef', + new GatewayServiceReplaceRequest([ + 'name' => 'gateway-service', + 'plan' => 'development-gwaas-1c2g', + 'configuredStatus' => GatewayServiceConfiguredStatus::Started->value, + 'labels' => [ + new GatewayLabelCreateRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + 'automaticTunnelInternalIpAllocation' => true, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$name:** `string` β€” Name of the service + +
+
+ +
+
+ +**$plan:** `?string` β€” Plan + +
+
+ +
+
+ +**$configuredStatus:** `string` + +
+
+ +
+
+ +**$connections:** `mixed` β€” Service connections + +
+
+ +
+
+ +**$labels:** `?array` β€” Labels + +
+
+ +
+
+ +**$automaticTunnelInternalIpAllocation:** `?bool` β€” Allocate and use tunnel internal IPs automatically + +
+
+
+
+ + +
+
+
+ +
$client->gateway->deleteGatewayService($serviceUuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing service by given {service-identifier}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->deleteGatewayService( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->gateway->modifyGatewayService($serviceUuid, $request) -> GatewayServiceDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modify service configuration. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->modifyGatewayService( + '01234567-89ab-cdef-0123-456789abcdef', + new GatewayServiceModifyRequest([ + 'name' => 'gateway-service', + 'features' => [ + GatewayServiceFeatures::Nat->value, + ], + 'plan' => 'development-gwaas-1c2g', + 'configuredStatus' => GatewayServiceConfiguredStatus::Started->value, + 'connections' => [ + new GatewayConnectionModifyRequest([ + 'uuid' => '01234567-89ab-cdef-0123-456789abcdef', + 'name' => 'gateway-service', + 'type' => GatewayConnectionType::Ipsec->value, + 'localRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'modified-routes', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.22.0/24', + ]), + ], + ]), + ], + 'labels' => [ + new GatewayLabelCreateRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + 'automaticTunnelInternalIpAllocation' => true, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$name:** `?string` β€” Name of the service + +
+
+ +
+
+ +**$features:** `?array` β€” Active features + +
+
+ +
+
+ +**$plan:** `?string` β€” Plan + +
+
+ +
+
+ +**$configuredStatus:** `?string` + +
+
+ +
+
+ +**$connections:** `?array` β€” Service connections + +
+
+ +
+
+ +**$labels:** `?array` β€” Labels + +
+
+ +
+
+ +**$automaticTunnelInternalIpAllocation:** `?bool` β€” Allocate and use tunnel internal IPs automatically + +
+
+
+
+ + +
+
+
+ +
$client->gateway->flushGatewayNat($serviceUuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Flush NAT rules. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->flushGatewayNat( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->gateway->listGatewayConnections($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +List available connections for service. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->listGatewayConnections( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->gateway->createGatewayConnection($serviceUuid, $request) -> GatewayConnectionDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Create a new connection. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->createGatewayConnection( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateGatewayConnectionRequest([ + 'body' => new GatewayConnectionCreateRequest([ + 'name' => 'gateway-service', + 'type' => GatewayConnectionType::Ipsec->value, + 'localRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'upcloud-example-route', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.0.0/24', + ]), + ], + 'remoteRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'remote-example-route', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.1.0/24', + ]), + ], + 'tunnels' => [ + new GatewayTunnelCreateRequest([ + 'name' => 'example-tunnel-1', + 'localAddress' => new GatewayTunnelCreateRequestLocalAddress([ + 'name' => 'public-ip-1', + ]), + 'remoteAddress' => new GatewayTunnelCreateRequestRemoteAddress([ + 'address' => '100.10.0.111', + ]), + 'ipsec' => new GatewayTunnelCreateRequestIpsec([ + 'authentication' => new GatewayTunnelCreateRequestIpsecAuthentication([ + 'authentication' => GatewayIpsecAuthenticationType::Psk->value, + 'psk' => '{your PSK}', + ]), + ]), + 'tunnelInternalIp' => '169.254.17.1', + 'internalPeerPingInterval' => 0, + ]), + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$request:** `GatewayConnectionCreateRequest` + +
+
+
+
+ + +
+
+
+ +
$client->gateway->getGatewayConnection($serviceUuid, $connectionUuid) -> GatewayConnectionDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get connection details. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->getGatewayConnection( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$connectionUuid:** `string` β€” Connection UUID + +
+
+
+
+ + +
+
+
+ +
$client->gateway->deleteGatewayConnection($serviceUuid, $connectionUuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing connection by given {connection-identifier}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->deleteGatewayConnection( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$connectionUuid:** `string` β€” Connection UUID + +
+
+
+
+ + +
+
+
+ +
$client->gateway->modifyGatewayConnection($serviceUuid, $connectionUuid, $request) -> GatewayConnectionDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modify connection configuration. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->modifyGatewayConnection( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new ModifyGatewayConnectionRequest([ + 'body' => new GatewayConnectionModifyRequest([ + 'uuid' => '01234567-89ab-cdef-0123-456789abcdef', + 'name' => 'gateway-service', + 'type' => GatewayConnectionType::Ipsec->value, + 'localRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'modified-routes', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.22.0/24', + ]), + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$connectionUuid:** `string` β€” Connection UUID + +
+
+ +
+
+ +**$request:** `GatewayConnectionModifyRequest` + +
+
+
+
+ + +
+
+
+ +
$client->gateway->listGatewayTunnels($serviceUuid, $connectionUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +List available tunnels for service. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->listGatewayTunnels( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$connectionUuid:** `string` β€” Connection UUID + +
+
+
+
+ + +
+
+
+ +
$client->gateway->createGatewayTunnel($serviceUuid, $connectionUuid, $request) -> GatewayTunnelDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Create a new tunnel. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->createGatewayTunnel( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new CreateGatewayTunnelRequest([ + 'body' => new GatewayTunnelCreateRequest([ + 'name' => 'gateway-service', + 'localAddress' => new GatewayTunnelCreateRequestLocalAddress([ + 'name' => 'gateway-service', + ]), + 'remoteAddress' => new GatewayTunnelCreateRequestRemoteAddress([ + 'address' => '203.0.113.10', + ]), + 'ipsec' => new GatewayTunnelCreateRequestIpsec([ + 'authentication' => new GatewayTunnelCreateRequestIpsecAuthentication([ + 'authentication' => GatewayIpsecAuthenticationType::Psk->value, + 'psk' => 'MySecretPsk123', + ]), + 'phase1Algorithms' => [ + GatewaySupportedProposalAlgorithms::Aes128->value, + GatewaySupportedProposalAlgorithms::Aes256->value, + GatewaySupportedProposalAlgorithms::Aes128Gcm128->value, + GatewaySupportedProposalAlgorithms::Aes256Gcm128->value, + ], + 'phase2Algorithms' => [ + GatewaySupportedProposalAlgorithms::Aes128->value, + GatewaySupportedProposalAlgorithms::Aes256->value, + GatewaySupportedProposalAlgorithms::Aes128Gcm128->value, + GatewaySupportedProposalAlgorithms::Aes256Gcm128->value, + ], + 'phase1IntegrityAlgorithms' => [ + GatewaySupportedIntegrityAlgorithms::Sha256->value, + GatewaySupportedIntegrityAlgorithms::Sha384->value, + GatewaySupportedIntegrityAlgorithms::Sha512->value, + ], + 'phase2IntegrityAlgorithms' => [ + GatewaySupportedIntegrityAlgorithms::Sha256->value, + GatewaySupportedIntegrityAlgorithms::Sha384->value, + GatewaySupportedIntegrityAlgorithms::Sha512->value, + ], + 'phase1DhGroupNumbers' => [ + 16, + 18, + 19, + ], + 'phase2DhGroupNumbers' => [ + 14, + 16, + 18, + 19, + ], + ]), + 'tunnelInternalIp' => '10.0.0.1', + 'internalPeerPingInterval' => 0, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$connectionUuid:** `string` β€” Connection UUID + +
+
+ +
+
+ +**$request:** `GatewayTunnelCreateRequest` + +
+
+
+
+ + +
+
+
+ +
$client->gateway->getGatewayTunnel($serviceUuid, $connectionUuid, $tunnelUuid) -> GatewayTunnelDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get tunnel details. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->getGatewayTunnel( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$connectionUuid:** `string` β€” Connection UUID + +
+
+ +
+
+ +**$tunnelUuid:** `string` β€” Tunnel UUID + +
+
+
+
+ + +
+
+
+ +
$client->gateway->deleteGatewayTunnel($serviceUuid, $connectionUuid, $tunnelUuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing tunnel by given {tunnel-identifier}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->deleteGatewayTunnel( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$connectionUuid:** `string` β€” Connection UUID + +
+
+ +
+
+ +**$tunnelUuid:** `string` β€” Tunnel UUID + +
+
+
+
+ + +
+
+
+ +
$client->gateway->modifyGatewayTunnel($serviceUuid, $connectionUuid, $tunnelUuid, $request) -> GatewayTunnelDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modify tunnel configuration. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->modifyGatewayTunnel( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new ModifyGatewayTunnelRequest([ + 'body' => new GatewayTunnelModifyRequest([ + 'uuid' => '01234567-89ab-cdef-0123-456789abcdef', + 'name' => 'gateway-service', + 'localAddress' => new GatewayTunnelModifyRequestLocalAddress([ + 'name' => 'gateway-service', + ]), + 'remoteAddress' => new GatewayTunnelModifyRequestRemoteAddress([ + 'address' => '203.0.113.10', + ]), + 'ipsec' => new GatewayTunnelModifyRequestIpsec([ + 'authentication' => new GatewayTunnelModifyRequestIpsecAuthentication([ + 'authentication' => GatewayIpsecAuthenticationType::Psk->value, + 'psk' => 'MySecretPsk123', + ]), + 'phase1Algorithms' => [ + GatewaySupportedProposalAlgorithms::Aes128Gcm16->value, + ], + 'phase2Algorithms' => [ + GatewaySupportedProposalAlgorithms::Aes128Gcm16->value, + ], + 'phase1IntegrityAlgorithms' => [ + GatewaySupportedIntegrityAlgorithms::Sha256->value, + GatewaySupportedIntegrityAlgorithms::Sha384->value, + GatewaySupportedIntegrityAlgorithms::Sha512->value, + ], + 'phase2IntegrityAlgorithms' => [ + GatewaySupportedIntegrityAlgorithms::Sha256->value, + GatewaySupportedIntegrityAlgorithms::Sha384->value, + GatewaySupportedIntegrityAlgorithms::Sha512->value, + ], + 'phase1DhGroupNumbers' => [ + 16, + 18, + 19, + ], + 'phase2DhGroupNumbers' => [ + 14, + 16, + 18, + 19, + ], + ]), + 'tunnelInternalIp' => '10.0.0.1', + 'internalPeerPingInterval' => 0, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$connectionUuid:** `string` β€” Connection UUID + +
+
+ +
+
+ +**$tunnelUuid:** `string` β€” Tunnel UUID + +
+
+ +
+
+ +**$request:** `GatewayTunnelModifyRequest` + +
+
+
+
+ + +
+
+
+ +
$client->gateway->listGatewayServiceLabels($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +List available service labels for service. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->listGatewayServiceLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->gateway->createGatewayServiceLabel($serviceUuid, $request) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Create a new service label. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->createGatewayServiceLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateGatewayServiceLabelRequest([ + 'body' => new GatewayLabelCreateRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$request:** `GatewayLabelCreateRequest` + +
+
+
+
+ + +
+
+
+ +
$client->gateway->getGatewayServiceLabel($serviceUuid, $labelKey) -> GatewayLabelDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get service label details. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->getGatewayServiceLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$labelKey:** `string` β€” Label identifier + +
+
+
+
+ + +
+
+
+ +
$client->gateway->deleteGatewayServiceLabel($serviceUuid, $labelKey) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing service label by given {service-label-identifier}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->deleteGatewayServiceLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$labelKey:** `string` β€” Label identifier + +
+
+
+
+ + +
+
+
+ +
$client->gateway->modifyGatewayServiceLabel($serviceUuid, $labelKey, $request) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modify service label configuration. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->modifyGatewayServiceLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + new GatewayLabelModifyRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$labelKey:** `string` β€” Label identifier + +
+
+ +
+
+ +**$key:** `?string` + +
+
+ +
+
+ +**$value:** `?string` + +
+
+
+
+ + +
+
+
+ +
$client->gateway->listGatewayAddresses($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +List available service addresses for service. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->listGatewayAddresses( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->gateway->getGatewayAddress($serviceUuid, $addressName) -> GatewayAddressDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get service address details. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->getGatewayAddress( + '01234567-89ab-cdef-0123-456789abcdef', + 'advanced', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$addressName:** `string` β€” Address identifier + +
+
+
+
+ + +
+
+
+ +
$client->gateway->modifyGatewayAddress($serviceUuid, $addressName, $request) -> GatewayAddressDetailsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modify existing service address by given {service-address-identifier}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->modifyGatewayAddress( + '01234567-89ab-cdef-0123-456789abcdef', + 'advanced', + new GatewayAddressModifyRequest([ + 'address' => '203.0.113.10', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$addressName:** `string` β€” Address identifier + +
+
+ +
+
+ +**$address:** `string` β€” Floating IP address to assign to the service address. + +
+
+
+
+ + +
+
+
+ +
$client->gateway->releaseGatewayFloatingIp($serviceUuid, $addressName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Release the user-provisioned Floating IP of an existing service address by given {service-address-identifier}, reverting it to a service-provisioned address while keeping the same name. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->releaseGatewayFloatingIp( + '01234567-89ab-cdef-0123-456789abcdef', + 'advanced', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$addressName:** `string` β€” Address identifier + +
+
+
+
+ + +
+
+
+ +
$client->gateway->getGatewayMetrics($serviceUuid) -> GatewayServiceMetricsResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +List available service metrics for service. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->getGatewayMetrics( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+
+
+ + +
+
+
+ +
$client->gateway->createGatewayServiceLogSession($serviceUuid, $request) -> GatewayServiceLogSessionCreateResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Create a new service log session. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->gateway->createGatewayServiceLogSession( + '01234567-89ab-cdef-0123-456789abcdef', + new GatewayServiceLogSessionCreateRequest([ + 'sessionType' => GatewayServiceLogSessionTypes::Vpn->value, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” Service UUID + +
+
+ +
+
+ +**$sessionType:** `string` + +
+
+
+
+ + +
+
+
+ +## load-balancer +
$client->loadBalancer->listLoadBalancers($request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available load balancer services. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->listLoadBalancers( + new ListLoadBalancersRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of entries to receive at most. + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. + +
+
+ +
+
+ +**$sort:** `?string` β€” Sort resources by field. Prefix with '-' for descending order. + +
+
+ +
+
+ +**$label:** `?string` β€” Filter resources by label. Can be provided multiple times for multiple labels. Format: 'key=value' for exact match or 'key' for existence check. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->createLoadBalancer($request) -> LoadBalancerService +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new load balancer service. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->createLoadBalancer( + new LoadBalancerServiceCreate([ + 'name' => 'my-loadbalancer', + 'zone' => 'fi-hel1', + 'plan' => 'production-small', + 'configuredStatus' => LoadBalancerServiceConfiguredStatus::Started->value, + 'frontends' => [ + new LoadBalancerFrontendCreate([ + 'name' => 'my-frontend', + 'port' => 80, + 'mode' => LoadBalancerFrontendMode::Http->value, + 'defaultBackend' => 'my-backend', + ]), + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$name:** `string` β€” Name of the service + +
+
+ +
+
+ +**$zone:** `string` β€” Zone + +
+
+ +
+
+ +**$plan:** `string` β€” Plan + +
+
+ +
+
+ +**$configuredStatus:** `string` + +
+
+ +
+
+ +**$frontends:** `array` β€” Service frontends + +
+
+ +
+
+ +**$backends:** `?array` β€” Service backends + +
+
+ +
+
+ +**$resolvers:** `?array` β€” Service resolvers + +
+
+ +
+
+ +**$networkUuid:** `?string` β€” Private Network UUID + +
+
+ +
+
+ +**$networks:** `?array` β€” Service networks + +
+
+ +
+
+ +**$labels:** `?array` β€” Labels + +
+
+ +
+
+ +**$maintenanceDow:** `?string` + +
+
+ +
+
+ +**$maintenanceTime:** `?string` + +
+
+ +
+
+ +**$ipAddresses:** `?array` β€” List of IP addresses for the network + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancer($serviceUuid) -> LoadBalancerService +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns load balancer service details by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->replaceLoadBalancer($serviceUuid, $request) -> LoadBalancerService +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Replaces existing load balancer service by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->replaceLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', + new LoadBalancerServiceReplace([ + 'name' => 'my-loadbalancer', + 'plan' => 'production', + 'configuredStatus' => LoadBalancerServiceConfiguredStatus::Started->value, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$name:** `string` β€” Name of the service + +
+
+ +
+
+ +**$plan:** `string` β€” Plan + +
+
+ +
+
+ +**$configuredStatus:** `string` + +
+
+ +
+
+ +**$frontends:** `?array` β€” Service frontends + +
+
+ +
+
+ +**$backends:** `?array` β€” Service backends + +
+
+ +
+
+ +**$resolvers:** `?array` β€” Service resolvers + +
+
+ +
+
+ +**$labels:** `?array` β€” Labels + +
+
+ +
+
+ +**$maintenanceDow:** `?string` + +
+
+ +
+
+ +**$maintenanceTime:** `?string` + +
+
+ +
+
+ +**$ipAddresses:** `?array` β€” List of IP addresses for the network + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->deleteLoadBalancer($serviceUuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing load balancer service by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->deleteLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->modifyLoadBalancer($serviceUuid, $request) -> LoadBalancerService +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing load balancer service by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->modifyLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', + new LoadBalancerServiceModify([ + 'name' => 'updated-loadbalancer', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$name:** `?string` β€” Name of the service + +
+
+ +
+
+ +**$plan:** `?string` β€” Plan + +
+
+ +
+
+ +**$configuredStatus:** `?string` + +
+
+ +
+
+ +**$frontends:** `?array` β€” Service frontends + +
+
+ +
+
+ +**$backends:** `?array` β€” Service backends + +
+
+ +
+
+ +**$resolvers:** `?array` β€” Service resolvers + +
+
+ +
+
+ +**$labels:** `?array` β€” Labels + +
+
+ +
+
+ +**$maintenanceDow:** `?string` + +
+
+ +
+
+ +**$maintenanceTime:** `?string` + +
+
+ +
+
+ +**$ipAddresses:** `?array` β€” List of IP addresses for the network + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->listLoadBalancerFrontends($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available service frontends by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->listLoadBalancerFrontends( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->createLoadBalancerFrontend($serviceUuid, $request) -> LoadBalancerFrontend +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new service frontend by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->createLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerFrontendRequest([ + 'body' => new LoadBalancerFrontendCreate([ + 'name' => 'my-frontend', + 'port' => 80, + 'mode' => LoadBalancerFrontendMode::Http->value, + 'defaultBackend' => 'my-backend', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$request:** `LoadBalancerFrontendCreate` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerFrontend($serviceUuid, $frontendName) -> LoadBalancerFrontend +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns service frontend details by given {service-uuid} and {frontend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->deleteLoadBalancerFrontend($serviceUuid, $frontendName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing frontend by given {service-uuid} and {frontend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->deleteLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->modifyLoadBalancerFrontend($serviceUuid, $frontendName, $request) -> LoadBalancerFrontend +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing service frontend by given {service-uuid} and {frontend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->modifyLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new LoadBalancerFrontendModify([ + 'name' => 'updated-frontend', + 'port' => 443, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+
+ +
+
+ +**$name:** `?string` β€” Name of the frontend + +
+
+ +
+
+ +**$port:** `?int` β€” Port to listen + +
+
+ +
+
+ +**$mode:** `?string` + +
+
+ +
+
+ +**$defaultBackend:** `?string` β€” Default backend + +
+
+ +
+
+ +**$properties:** `?LoadBalancerFrontendPropertiesCreate` + +
+
+ +
+
+ +**$networks:** `?array` β€” Network names + +
+
+ +
+
+ +**$tlsConfigs:** `?array` β€” TLS Configs + +
+
+ +
+
+ +**$rules:** `?array` β€” Rules + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->listLoadBalancerFrontendTlsConfigs($serviceUuid, $frontendName) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available frontend TLS configs by given {service-uuid} and {frontend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->listLoadBalancerFrontendTlsConfigs( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->createLoadBalancerFrontendTlsConfig($serviceUuid, $frontendName, $request) -> LoadBalancerTlsConfig +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new TLS config by given {service-uuid} and {frontend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->createLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new CreateLoadBalancerFrontendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigCreate([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+
+ +
+
+ +**$request:** `LoadBalancerTlsConfigCreate` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerFrontendTlsConfig($serviceUuid, $frontendName, $tlsConfigName) -> LoadBalancerTlsConfig +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns frontend TLS config details by given {service-uuid}, {frontend-name}, and {tls-config-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-tls-config-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+
+ +
+
+ +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->deleteLoadBalancerFrontendTlsConfig($serviceUuid, $frontendName, $tlsConfigName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing TLS config by given {service-uuid}, {frontend-name}, and {tls-config-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->deleteLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-tls-config-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+
+ +
+
+ +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->modifyLoadBalancerFrontendTlsConfig($serviceUuid, $frontendName, $tlsConfigName, $request) -> LoadBalancerTlsConfig +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing TLS config by given {service-uuid}, {frontend-name}, and {tls-config-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->modifyLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-tls-config-1', + new ModifyLoadBalancerFrontendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigModify([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+
+ +
+
+ +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+
+ +
+
+ +**$request:** `LoadBalancerTlsConfigModify` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->listLoadBalancerRules($serviceUuid, $frontendName) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available frontend rules by given {service-uuid} and {frontend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->listLoadBalancerRules( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->createLoadBalancerRule($serviceUuid, $frontendName, $request) -> LoadBalancerRule +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new rule by given {service-uuid} and {frontend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->createLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new CreateLoadBalancerRuleRequest([ + 'body' => new LoadBalancerRuleCreate([ + 'name' => 'my-rule', + 'priority' => 10, + 'matchingCondition' => LoadBalancerMatchingCondition::And_->value, + 'matchers' => [ + new LoadBalancerMatcherCreateMatchSrcIp([ + 'type' => LoadBalancerMatcherCreateMatchSrcIpType::SrcIp->value, + 'matchSrcIp' => new LoadBalancerMatcherIpCreate([ + 'value' => '192.168.1.1', + ]), + ]), + ], + 'actions' => [ + new LoadBalancerActionCreateActionUseBackend([ + 'type' => LoadBalancerActionCreateActionUseBackendType::UseBackend->value, + 'actionUseBackend' => new LoadBalancerActionUseBackendCreate([ + 'backend' => 'backend-1', + ]), + ]), + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+
+ +
+
+ +**$request:** `LoadBalancerRuleCreate` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerRule($serviceUuid, $frontendName, $ruleName) -> LoadBalancerRule +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns frontend rule details by given {service-uuid}, {frontend-name}, and {rule-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+
+ +
+
+ +**$ruleName:** `string` β€” The unique identifier for the rule. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->replaceLoadBalancerRule($serviceUuid, $frontendName, $ruleName, $request) -> LoadBalancerRule +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Replaces existing rule by given {service-uuid}, {frontend-name}, and {rule-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->replaceLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', + new ReplaceLoadBalancerRuleRequest([ + 'body' => new LoadBalancerRuleCreate([ + 'name' => 'my-rule', + 'priority' => 10, + 'matchingCondition' => LoadBalancerMatchingCondition::And_->value, + 'matchers' => [ + new LoadBalancerMatcherCreateMatchSrcIp([ + 'type' => LoadBalancerMatcherCreateMatchSrcIpType::SrcIp->value, + 'matchSrcIp' => new LoadBalancerMatcherIpCreate([ + 'value' => '192.168.1.1', + ]), + ]), + ], + 'actions' => [ + new LoadBalancerActionCreateActionUseBackend([ + 'type' => LoadBalancerActionCreateActionUseBackendType::UseBackend->value, + 'actionUseBackend' => new LoadBalancerActionUseBackendCreate([ + 'backend' => 'backend-1', + ]), + ]), + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+
+ +
+
+ +**$ruleName:** `string` β€” The unique identifier for the rule. + +
+
+ +
+
+ +**$request:** `LoadBalancerRuleCreate` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->deleteLoadBalancerRule($serviceUuid, $frontendName, $ruleName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing rule by given {service-uuid}, {frontend-name}, and {rule-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->deleteLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+
+ +
+
+ +**$ruleName:** `string` β€” The unique identifier for the rule. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->modifyLoadBalancerRule($serviceUuid, $frontendName, $ruleName, $request) -> LoadBalancerRule +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing rule by given {service-uuid}, {frontend-name}, and {rule-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->modifyLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', + new LoadBalancerRuleModify([ + 'name' => 'updated-rule', + 'priority' => 10, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+
+ +
+
+ +**$ruleName:** `string` β€” The unique identifier for the rule. + +
+
+ +
+
+ +**$name:** `?string` β€” Name of the rule + +
+
+ +
+
+ +**$priority:** `?int` β€” Priority + +
+
+ +
+
+ +**$matchingCondition:** `?string` + +
+
+ +
+
+ +**$matchers:** `?array` β€” Rule matchers + +
+
+ +
+
+ +**$actions:** `?array` β€” Rule actions + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->listLoadBalancerBackends($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available service backends by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->listLoadBalancerBackends( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->createLoadBalancerBackend($serviceUuid, $request) -> LoadBalancerBackend +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new backend by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->createLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerBackendRequest([ + 'body' => new LoadBalancerBackendCreate([ + 'name' => 'my-backend', + 'members' => [ + new LoadBalancerMemberCreateZero([ + 'type' => LoadBalancerMemberCreateZeroType::Static_->value, + 'ip' => 'ip', + 'port' => 1, + ]), + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$request:** `LoadBalancerBackendCreate` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerBackend($serviceUuid, $backendName) -> LoadBalancerBackend +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns service backend details by given {service-uuid} and {backend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$backendName:** `string` β€” The unique identifier for the backend. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->deleteLoadBalancerBackend($serviceUuid, $backendName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing backend by given {service-uuid} and {backend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->deleteLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$backendName:** `string` β€” The unique identifier for the backend. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->modifyLoadBalancerBackend($serviceUuid, $backendName, $request) -> LoadBalancerBackend +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing backend by given {service-uuid} and {backend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->modifyLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new LoadBalancerBackendModify([ + 'name' => 'updated-backend', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$backendName:** `string` β€” The unique identifier for the backend. + +
+
+ +
+
+ +**$name:** `?string` β€” Name of the backend + +
+
+ +
+
+ +**$members:** `?array` β€” Backend members + +
+
+ +
+
+ +**$tlsConfigs:** `?array` β€” TLS Configs + +
+
+ +
+
+ +**$resolver:** `?string` β€” Resolver reference + +
+
+ +
+
+ +**$properties:** `?LoadBalancerBackendPropertiesCreate` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->listLoadBalancerMembers($serviceUuid, $backendName) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available backend members by given {service-uuid} and {backend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->listLoadBalancerMembers( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$backendName:** `string` β€” The unique identifier for the backend. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->createLoadBalancerMember($serviceUuid, $backendName, $request) -> LoadBalancerMember +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new member by given {service-uuid} and {backend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->createLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new CreateLoadBalancerMemberRequest([ + 'body' => new LoadBalancerMemberCreateZero([ + 'type' => LoadBalancerMemberCreateZeroType::Static_->value, + 'ip' => 'ip', + 'port' => 1, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$backendName:** `string` β€” The unique identifier for the backend. + +
+
+ +
+
+ +**$request:** `LoadBalancerMemberCreateZero|LoadBalancerMemberCreateOne` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerMember($serviceUuid, $backendName, $memberName) -> LoadBalancerMember +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns backend member details by given {service-uuid}, {backend-name} and {member-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$backendName:** `string` β€” The unique identifier for the backend. + +
+
+ +
+
+ +**$memberName:** `string` β€” The unique identifier for the member. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->deleteLoadBalancerMember($serviceUuid, $backendName, $memberName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing member by given {service-uuid}, {backend-name} and {member-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->deleteLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$backendName:** `string` β€” The unique identifier for the backend. + +
+
+ +
+
+ +**$memberName:** `string` β€” The unique identifier for the member. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->modifyLoadBalancerMember($serviceUuid, $backendName, $memberName, $request) -> LoadBalancerMember +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing member by given {service-uuid}, {backend-name} and {member-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->modifyLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', + new ModifyLoadBalancerMemberRequest([ + 'body' => new LoadBalancerMemberModifyZero([]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$backendName:** `string` β€” The unique identifier for the backend. + +
+
+ +
+
+ +**$memberName:** `string` β€” The unique identifier for the member. + +
+
+ +
+
+ +**$request:** `LoadBalancerMemberModifyZero|LoadBalancerMemberModifyOne` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->listLoadBalancerBackendTlsConfigs($serviceUuid, $backendName) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available backend TLS configs by given {service-uuid} and {backend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->listLoadBalancerBackendTlsConfigs( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$backendName:** `string` β€” The unique identifier for the backend. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->createLoadBalancerBackendTlsConfig($serviceUuid, $backendName, $request) -> LoadBalancerTlsConfig +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new TLS config by given {service-uuid} and {backend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->createLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new CreateLoadBalancerBackendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigCreate([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$backendName:** `string` β€” The unique identifier for the backend. + +
+
+ +
+
+ +**$request:** `LoadBalancerTlsConfigCreate` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerBackendTlsConfig($serviceUuid, $backendName, $tlsConfigName) -> LoadBalancerTlsConfig +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns backend TLS config details by given {service-uuid}, {backend-name}, and {tls-config-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'example-tls-config-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$backendName:** `string` β€” The unique identifier for the backend. + +
+
+ +
+
+ +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->deleteLoadBalancerBackendTlsConfig($serviceUuid, $backendName, $tlsConfigName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing TLS config by given {service-uuid}, {backend-name}, and {tls-config-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->deleteLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'example-tls-config-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$backendName:** `string` β€” The unique identifier for the backend. + +
+
+ +
+
+ +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->modifyLoadBalancerBackendTlsConfig($serviceUuid, $backendName, $tlsConfigName, $request) -> LoadBalancerTlsConfig +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing TLS config by given {service-uuid}, {backend-name}, and {tls-config-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->modifyLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'example-tls-config-1', + new ModifyLoadBalancerBackendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigModify([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$backendName:** `string` β€” The unique identifier for the backend. + +
+
+ +
+
+ +**$tlsConfigName:** `string` β€” The unique identifier for the TLS configuration. + +
+
+ +
+
+ +**$request:** `LoadBalancerTlsConfigModify` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->modifyLoadBalancerNetwork($serviceUuid, $networkName, $request) -> LoadBalancerNetwork +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing service network by given {service-uuid} and {network-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->modifyLoadBalancerNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-network-1', + new LoadBalancerNetworkModify([ + 'name' => 'updated-network', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$networkName:** `string` β€” The unique identifier for the network. + +
+
+ +
+
+ +**$name:** `?string` β€” Name of the network + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->listLoadBalancerIpAddresses($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available IP addresses by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->listLoadBalancerIpAddresses( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->createLoadBalancerIpAddress($serviceUuid, $request) -> LoadBalancerIpAddress +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Attach a floating public IPv4 address to the service using the specified {service-uuid}. The number of attachable floating IPv4 addresses is limited to the number of nodes in the plan, and all addresses must be in the same zone as the service and detached. + +Note: Floating public IPv4 addresses have configurable release policies. When the service is deleted or an IP address is detached, addresses with the keep policy will be converted to detached floating IPs that remain available in your account. Addresses with the release policy will be automatically deleted. For more details, see IP Addresses. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->createLoadBalancerIpAddress( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerIpAddressRequest([ + 'body' => new LoadBalancerIpAddressCreate([ + 'address' => '192.168.1.10', + 'networkName' => 'private-net-1', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$request:** `LoadBalancerIpAddressCreate` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerIpAddress($serviceUuid, $ipAddress) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns IP address details by given {service-uuid} and {ip-address}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerIpAddress( + '01234567-89ab-cdef-0123-456789abcdef', + '192.168.1.1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$ipAddress:** `string` β€” The unique identifier for the IP address. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->deleteLoadBalancerIpAddress($serviceUuid, $ipAddress) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Detach a floating public IPv4 address from the service by given {service-uuid} and {address}. + Depending on the release policy, the customer retains the floating IP if the policy is set to keep. + If the policy is set to release, the floating IP will be deleted. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->deleteLoadBalancerIpAddress( + '01234567-89ab-cdef-0123-456789abcdef', + '192.168.1.1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$ipAddress:** `string` β€” The unique identifier for the IP address. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->listLoadBalancerResolvers($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available service domain name resolvers by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->listLoadBalancerResolvers( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->createLoadBalancerResolver($serviceUuid, $request) -> LoadBalancerResolver +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new resolver by given {service-uuid}. + +Resolver is a DNS server usually residing in a user's private network. It's used to resolve IPs for backend members of type dynamic. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->createLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerResolverRequest([ + 'body' => new LoadBalancerResolverCreate([ + 'name' => 'default-resolver', + 'nameservers' => [ + '1.1.1.1:53', + '8.8.8.8:53', + ], + 'retries' => 3, + 'timeout' => 5, + 'timeoutRetry' => 3, + 'cacheValid' => 300, + 'cacheInvalid' => 60, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$request:** `LoadBalancerResolverCreate` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerResolver($serviceUuid, $resolverName) -> LoadBalancerResolver +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns backend resolver details by given {service-uuid} and {resolver-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-resolver-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$resolverName:** `string` β€” The unique identifier for the resolver. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->deleteLoadBalancerResolver($serviceUuid, $resolverName) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing resolver by given {service-uuid} and {resolver-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->deleteLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-resolver-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$resolverName:** `string` β€” The unique identifier for the resolver. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->modifyLoadBalancerResolver($serviceUuid, $resolverName, $request) -> LoadBalancerResolver +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing resolver by given {service-uuid} and {resolver-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->modifyLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-resolver-1', + new LoadBalancerResolverModify([ + 'name' => 'default-resolver', + 'nameservers' => [ + '1.1.1.1:53', + '8.8.8.8:53', + ], + 'retries' => 3, + 'timeout' => 5, + 'timeoutRetry' => 3, + 'cacheValid' => 300, + 'cacheInvalid' => 60, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$resolverName:** `string` β€” The unique identifier for the resolver. + +
+
+ +
+
+ +**$name:** `?string` β€” Name of the resolver + +
+
+ +
+
+ +**$nameservers:** `?array` β€” Nameservers + +
+
+ +
+
+ +**$retries:** `?int` β€” Number of retries on failure + +
+
+ +
+
+ +**$timeout:** `?int` β€” Timeout for the query in seconds + +
+
+ +
+
+ +**$timeoutRetry:** `?int` β€” Timeout for the query retries in seconds + +
+
+ +
+
+ +**$cacheValid:** `?int` β€” Time in seconds to cache valid results + +
+
+ +
+
+ +**$cacheInvalid:** `?int` β€” Time in seconds to cache invalid results + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->listLoadBalancerLabels($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available service labels by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->listLoadBalancerLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->createLoadBalancerLabel($serviceUuid, $request) -> LoadBalancerLabelResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new label by given {service-uuid}. + +Labels used for service filtering. + +Service labels usage examples +Below are some examples of what certain GET requests might look like. + +exact match: GET /1.3/load-balancer?label=env%3Dstaging +existence: GET /1.3/load-balancer?label=env +multiple: GET /1.3/load-balancer?label=env&label=foo%3Dbar +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->createLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerLabelRequest([ + 'body' => new LoadBalancerLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$request:** `LoadBalancerLabelCreate` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerLabel($serviceUuid, $labelKey) -> LoadBalancerLabelResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns label details by given {service-uuid} and {label-key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$labelKey:** `string` β€” The unique identifier for the label. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->deleteLoadBalancerLabel($serviceUuid, $labelKey) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing label by given {service-uuid} and {label-key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->deleteLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$labelKey:** `string` β€” The unique identifier for the label. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->modifyLoadBalancerLabel($serviceUuid, $labelKey, $request) -> LoadBalancerLabelResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing label by given {service-uuid} and {label-key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->modifyLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', + new ModifyLoadBalancerLabelRequest([ + 'body' => new LoadBalancerLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$labelKey:** `string` β€” The unique identifier for the label. + +
+
+ +
+
+ +**$request:** `LoadBalancerLabelModify` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerMetrics($serviceUuid) -> LoadBalancerMetrics +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns service metrics by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerMetrics( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerMetricsSeries($serviceUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns service metric series by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerFrontendCombinedMetricsSeries($serviceUuid, $request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns combined frontend metric series by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerFrontendCombinedMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + new GetLoadBalancerFrontendCombinedMetricsSeriesRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerFrontendMetricsSeries($serviceUuid, $frontendName, $request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns frontend metric series by given {service-uuid} and {frontend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerFrontendMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new GetLoadBalancerFrontendMetricsSeriesRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$frontendName:** `string` β€” The unique identifier for the frontend. + +
+
+ +
+
+ +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerBackendCombinedMetricsSeries($serviceUuid, $request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns combined backend metric series by given {service-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerBackendCombinedMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + new GetLoadBalancerBackendCombinedMetricsSeriesRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerBackendMetricsSeries($serviceUuid, $backendName, $request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns backend metric series by given {service-uuid} and {backend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerBackendMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new GetLoadBalancerBackendMetricsSeriesRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$backendName:** `string` β€” The unique identifier for the backend. + +
+
+ +
+
+ +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerMemberCombinedMetricsSeries($serviceUuid, $backendName, $request) -> LoadBalancerMemberMetricsSeriesResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns combined backend members metric series by given {service-uuid} and {backend-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerMemberCombinedMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new GetLoadBalancerMemberCombinedMetricsSeriesRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$backendName:** `string` β€” The unique identifier for the backend. + +
+
+ +
+
+ +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerMemberMetricsSeries($serviceUuid, $backendName, $memberName, $request) -> LoadBalancerMemberMetricsSeriesResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns backend member metric series by given {service-uuid}, {backend-name}, and {member-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerMemberMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', + new GetLoadBalancerMemberMetricsSeriesRequest([]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serviceUuid:** `string` β€” The unique identifier for the service. + +
+
+ +
+
+ +**$backendName:** `string` β€” The unique identifier for the backend. + +
+
+ +
+
+ +**$memberName:** `string` β€” The unique identifier for the member. + +
+
+ +
+
+ +**$sort:** `?string` β€” Sort metrics by field. Prefix with '-' for descending order. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->listLoadBalancerCertificateBundles($request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available certificate bundles. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->listLoadBalancerCertificateBundles( + new ListLoadBalancerCertificateBundlesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of entries to receive at most. + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. + +
+
+ +
+
+ +**$label:** `?string` β€” Filter resources by label. Can be provided multiple times for multiple labels. Format: 'key=value' for exact match or 'key' for existence check. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->createLoadBalancerCertificateBundle($request) -> LoadBalancerCertificateBundle +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new certificate bundle. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->createLoadBalancerCertificateBundle( + new LoadBalancerCertificateBundleCreateZero([ + 'type' => LoadBalancerCertificateBundleCreateZeroType::Manual->value, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$request:** `LoadBalancerCertificateBundleCreateZero|LoadBalancerCertificateBundleCreateCertificate|LoadBalancerCertificateBundleCreateType` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerCertificateBundle($bundleUuid) -> LoadBalancerCertificateBundle +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns certificate bundle details by given {bundle-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerCertificateBundle( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->deleteLoadBalancerCertificateBundle($bundleUuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing certificate bundle by given {bundle-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->deleteLoadBalancerCertificateBundle( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->modifyLoadBalancerCertificateBundle($bundleUuid, $request) -> LoadBalancerCertificateBundle +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing a manual, dynamic or authority certificate bundle by given {bundle-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->modifyLoadBalancerCertificateBundle( + '01234567-89ab-cdef-0123-456789abcdef', + new ModifyLoadBalancerCertificateBundleRequest([ + 'body' => new LoadBalancerCertificateBundleManualModify([ + 'name' => 'updated-manual-cert', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+
+ +
+
+ +**$request:** `LoadBalancerCertificateBundleManualModify|LoadBalancerCertificateBundleDynamicModify|LoadBalancerCertificateBundleAuthorityModify` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->listLoadBalancerCertificateBundleLabels($bundleUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available certificate bundle labels by given {bundle-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->listLoadBalancerCertificateBundleLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->createLoadBalancerCertificateBundleLabel($bundleUuid, $request) -> LoadBalancerLabelResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new label by given {bundle-uuid}. + +Labels used for certificate bundles filtering. + +Certificate bundle labels usage examples +Below are some examples of what certain GET requests might look like. + +exact match: GET /1.3/load-balancer/certificate-bundles?label=env%3Dstaging +existence: GET /1.3/load-balancer/certificate-bundles?label=env +multiple: GET /1.3/load-balancer/certificate-bundles?label=env&label=foo%3Dbar +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->createLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerCertificateBundleLabelRequest([ + 'body' => new LoadBalancerLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+
+ +
+
+ +**$request:** `LoadBalancerLabelCreate` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerCertificateBundleLabel($bundleUuid, $labelKey) -> LoadBalancerLabelResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns label details by given {bundle-uuid} and {label-key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+
+ +
+
+ +**$labelKey:** `string` β€” The unique identifier for the label. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->deleteLoadBalancerCertificateBundleLabel($bundleUuid, $labelKey) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing label by given {bundle-uuid} and {label-key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->deleteLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+
+ +
+
+ +**$labelKey:** `string` β€” The unique identifier for the label. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->modifyLoadBalancerCertificateBundleLabel($bundleUuid, $labelKey, $request) -> LoadBalancerLabelResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing label by given {bundle-uuid} and {label-key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->modifyLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', + new ModifyLoadBalancerCertificateBundleLabelRequest([ + 'body' => new LoadBalancerLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$bundleUuid:** `string` β€” The unique identifier for the certificate bundle. + +
+
+ +
+
+ +**$labelKey:** `string` β€” The unique identifier for the label. + +
+
+ +
+
+ +**$request:** `LoadBalancerLabelModify` + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerDnsChallengeDomain() -> LoadBalancerDnsChallengeDomainResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns DNS challenge domain. + +This can be used to validate domain ownership using the ACME challenge method. To validate your domain, you need to add CNAME record to the domain provided by this API to your DNS settings. The name/host of the CNAME record should be _acme-challenge or _acme-challenge.mysubdomain if you are setting up a subdomain called mysubdomain. The target/points to of the record needs to be set to the value returned by this API. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerDnsChallengeDomain(); +``` +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->listLoadBalancerPlans($request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available load balancer plans. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->listLoadBalancerPlans( + new ListLoadBalancerPlansRequest([ + 'limit' => 10, + 'offset' => 0, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of entries to receive at most. + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. + +
+
+
+
+ + +
+
+
+ +
$client->loadBalancer->getLoadBalancerPlan($planName) -> LoadBalancerPlan +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns load balancer plan details by given {plan-name}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->loadBalancer->getLoadBalancerPlan( + 'example-plan-1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$planName:** `string` β€” The unique identifier for the plan. + +
+
+
+
+ + +
+
+
+ +## firewall-ruleset +
$client->firewallRuleset->listFirewallRulesets($request) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of firewall rulesets. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->listFirewallRulesets( + new ListFirewallRulesetsRequest([ + 'limit' => 10, + 'offset' => 0, + 'sort' => 'name', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of entries to receive at most. + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. + +
+
+ +
+
+ +**$sort:** `?string` β€” Order of returned results. + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->createFirewallRuleset($request) -> FirewallRulesetDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new firewall ruleset. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->createFirewallRuleset( + new CreateFirewallRuleset([ + 'name' => 'example_firewall_ruleset', + 'stateful' => true, + 'enabled' => false, + 'defaultDnsRulesEnabled' => false, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$name:** `string` β€” Name of the firewall ruleset + +
+
+ +
+
+ +**$description:** `?string` β€” Description of the firewall ruleset + +
+
+ +
+
+ +**$stateful:** `?bool` + +
+
+ +
+
+ +**$enabled:** `?bool` + +
+
+ +
+
+ +**$defaultDnsRulesEnabled:** `?bool` + +
+
+ +
+
+ +**$labels:** `?array` β€” Labels + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->getFirewallRuleset($rulesetUuid) -> FirewallRulesetDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns firewall ruleset details by given {ruleset-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->getFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->deleteFirewallRuleset($rulesetUuid) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing firewall ruleset by given {ruleset-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->deleteFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->modifyFirewallRuleset($rulesetUuid, $request) -> FirewallRulesetDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing firewall ruleset by given {ruleset-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->modifyFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetModify([ + 'name' => 'modified_example_firewall_ruleset', + 'description' => 'Modified example stateless firewall ruleset', + 'labels' => [ + new FirewallRulesetCreateLabel([ + 'key' => 'dev', + 'value' => 'dev-1', + ]), + ], + 'enabled' => false, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+ +
+
+ +**$name:** `?string` β€” Name of the ruleset + +
+
+ +
+
+ +**$description:** `?string` β€” Description of the firewall ruleset + +
+
+ +
+
+ +**$labels:** `?array` β€” Labels + +
+
+ +
+
+ +**$enabled:** `?bool` β€” Enabled + +
+
+ +
+
+ +**$defaultDnsRulesEnabled:** `?bool` + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->restoreFirewallRuleset($rulesetUuid, $rulesetVersion) -> FirewallRulesetDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Restores existing firewall ruleset by given {ruleset-uuid} and {ruleset-version}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->restoreFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', + 1, +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+ +
+
+ +**$rulesetVersion:** `int` β€” Firewall ruleset version + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->listFirewallRulesetRules($rulesetUuid, $request) -> FirewallRulesetFirewallRuleListResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns firewall ruleset rules. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->listFirewallRulesetRules( + '01234567-89ab-cdef-0123-456789abcdef', + new ListFirewallRulesetRulesRequest([ + 'limit' => 10, + 'offset' => 0, + 'sort' => 'name', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of entries to receive at most. + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. + +
+
+ +
+
+ +**$sort:** `?string` β€” Order of returned results. + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->createFirewallRulesetRule($rulesetUuid, $request) -> FirewallRulesetRuleDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new firewall ruleset rule by the given {ruleset-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->createFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateFirewallRulesetRuleRequest([ + 'body' => new FirewallRulesetFirewallRuleCreate([ + 'enabled' => false, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'direction' => FirewallRulesetRuleDirection::In->value, + 'family' => FirewallRulesetRuleFamily::IPv4->value, + 'protocol' => FirewallRulesetRuleProtocol::Tcp->value, + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+ +
+
+ +**$request:** `FirewallRulesetFirewallRuleCreate` + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->createMultipleFirewallRulesetRule($rulesetUuid, $request) -> FirewallRulesetFirewallRuleListResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates multiple firewall ruleset rules by the given {ruleset-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->createMultipleFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetFirewallMultipleRuleCreate([ + 'rules' => [ + new FirewallRulesetFirewallRuleCreate([ + 'enabled' => false, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'direction' => FirewallRulesetRuleDirection::In->value, + 'family' => FirewallRulesetRuleFamily::IPv4->value, + 'protocol' => FirewallRulesetRuleProtocol::Tcp->value, + ]), + ], + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+ +
+
+ +**$rules:** `array` + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->getFirewallRulesetRule($rulesetUuid, $ruleId) -> FirewallRulesetRuleDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns firewall ruleset rule details. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->getFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+ +
+
+ +**$ruleId:** `string` β€” Firewall ruleset rule UUID + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->deleteFirewallRulesetRule($rulesetUuid, $ruleId) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes an existing rule by given {ruleset-uuid} and {rule-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->deleteFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+ +
+
+ +**$ruleId:** `string` β€” Firewall ruleset rule UUID + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->modifyFirewallRulesetRule($rulesetUuid, $ruleId, $request) -> FirewallRulesetRuleDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing firewall ruleset rule by given {ruleset_uuid} and {rule-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->modifyFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetFirewallRuleModify([ + 'enabled' => false, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'direction' => FirewallRulesetRuleDirection::In->value, + 'family' => FirewallRulesetRuleFamily::IPv4->value, + 'protocol' => FirewallRulesetRuleProtocol::Tcp->value, + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+ +
+
+ +**$ruleId:** `string` β€” Firewall ruleset rule UUID + +
+
+ +
+
+ +**$enabled:** `?bool` β€” Enabled + +
+
+ +
+
+ +**$action:** `?string` + +
+
+ +
+
+ +**$comment:** `?string` β€” Comments + +
+
+ +
+
+ +**$destinationAddressStart:** `?string` + +
+
+ +
+
+ +**$destinationAddressEnd:** `?string` + +
+
+ +
+
+ +**$destinationPortStart:** `?int` + +
+
+ +
+
+ +**$destinationPortEnd:** `?int` + +
+
+ +
+
+ +**$destinationAddressCidr:** `?string` + +
+
+ +
+
+ +**$direction:** `?string` + +
+
+ +
+
+ +**$family:** `?string` + +
+
+ +
+
+ +**$icmpType:** `?int` + +
+
+ +
+
+ +**$position:** `?int` + +
+
+ +
+
+ +**$protocol:** `?string` + +
+
+ +
+
+ +**$sourceAddressStart:** `?string` + +
+
+ +
+
+ +**$sourceAddressEnd:** `?string` + +
+
+ +
+
+ +**$sourcePortStart:** `?int` + +
+
+ +
+
+ +**$sourcePortEnd:** `?int` + +
+
+ +
+
+ +**$sourceAddressCidr:** `?string` + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->listFirewallRulesetLabels($rulesetUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of available firewall ruleset labels by given {ruleset-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->listFirewallRulesetLabels( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->createFirewallRulesetLabel($rulesetUuid, $request) -> FirewallRulesetLabelDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new label by given {ruleset-uuid}. Labels are used for group filtering. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->createFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateFirewallRulesetLabelRequest([ + 'body' => new FirewallRulesetCreateLabel([ + 'key' => 'dev', + 'value' => 'dev-1', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+ +
+
+ +**$request:** `FirewallRulesetCreateLabel` + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->listFirewallRulesetAttachedServers($rulesetUuid) -> array +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of servers that are attached to the firewall ruleset by given {ruleset-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->listFirewallRulesetAttachedServers( + '01234567-89ab-cdef-0123-456789abcdef', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->getFirewallRulesetLabel($rulesetUuid, $labelKey) -> FirewallRulesetLabelDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns label details by given {ruleset-uuid} and {label-key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->getFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+ +
+
+ +**$labelKey:** `string` β€” The key of the label. + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->deleteFirewallRulesetLabel($rulesetUuid, $labelKey) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing label by given {ruleset-uuid} and {label-key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->deleteFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+ +
+
+ +**$labelKey:** `string` β€” The key of the label. + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->modifyFirewallRulesetLabel($rulesetUuid, $labelKey, $request) -> FirewallRulesetLabelDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Modifies existing label by given {ruleset-uuid} and {label-key}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->modifyFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + new FirewallRulesetLabelModify([ + 'key' => 'foo', + 'value' => 'bar', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$rulesetUuid:** `string` β€” Firewall ruleset UUID + +
+
+ +
+
+ +**$labelKey:** `string` β€” The key of the label. + +
+
+ +
+
+ +**$key:** `?string` + +
+
+ +
+
+ +**$value:** `?string` + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->listServerFirewallRule($serverUuid, $request) -> FirewallRulesetServerFirewallDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns a list of server firewall rules. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->listServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + new ListServerFirewallRuleRequest([ + 'limit' => 10, + 'offset' => 0, + 'sort' => 'name', + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serverUuid:** `string` β€” Server UUID + +
+
+ +
+
+ +**$limit:** `?int` β€” Number of entries to receive at most. + +
+
+ +
+
+ +**$offset:** `?int` β€” Offset for retrieved results. + +
+
+ +
+
+ +**$sort:** `?string` β€” Order of returned results. + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->createServerFirewallRule($serverUuid, $request) -> FirewallRulesetServerFirewallRuleDetail +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates a new server firewall rule. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->createServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetServerFirewallRuleCreate([ + 'firewallRule' => new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::In->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'destinationAddressStart' => '', + 'destinationAddressEnd' => '', + 'sourceAddressStart' => '192.168.1.1', + 'sourceAddressEnd' => '192.168.1.255', + 'comment' => 'Allow SSH from this network', + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serverUuid:** `string` β€” Server UUID + +
+
+ +
+
+ +**$firewallRule:** `FirewallRulesetServerFirewallRule` + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->createMultipleServerFirewallRules($serverUuid, $request) -> FirewallRulesetServerFirewallDetailResponse +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Creates multiple server firewall rules by given {server-uuid}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->createMultipleServerFirewallRules( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetServerMultipleFirewallRulesCreate([ + 'firewallRules' => new FirewallRulesetServerMultipleFirewallRulesCreateFirewallRules([ + 'firewallRule' => [ + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::In->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'sourceAddressStart' => '192.168.1.1', + 'sourceAddressEnd' => '192.168.1.255', + 'comment' => 'Allow SSH from this network', + ]), + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::In->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'sourceAddressStart' => '1.1.1.1', + 'sourceAddressEnd' => '1.1.1.1', + 'comment' => 'Allow DNS from this network', + ]), + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::Out->value, + 'action' => FirewallRulesetRuleAction::Drop->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'destinationAddressStart' => '100.100.128.2', + 'destinationAddressEnd' => '100.100.128.2', + 'comment' => 'dfg', + ]), + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::Out->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv6', + 'protocol' => 'icmp', + 'destinationAddressStart' => '2a04:3540:1001:1000:1411:4dff:fea5:1bab', + 'destinationAddressEnd' => '2a04:3540:1001:1000:1411:4dff:fea5:1bab', + 'comment' => "'w???''?p'2'?12??12?3?'231", + ]), + ], + ]), + ]), +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serverUuid:** `string` β€” Server UUID + +
+
+ +
+
+ +**$firewallRules:** `?FirewallRulesetServerMultipleFirewallRulesCreateFirewallRules` + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->getServerFirewallRule($serverUuid, $position) -> FirewallRulesetServerFirewallRuleDetail +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Returns server firewall rule details by given {server-uuid} and {position}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->getServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + 1, +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serverUuid:** `string` β€” Server UUID + +
+
+ +
+
+ +**$position:** `int|string` β€” Server firewall rule position + +
+
+
+
+ + +
+
+
+ +
$client->firewallRuleset->deleteServerFirewallRule($serverUuid, $position) +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Deletes existing server firewall rule by given {server-uuid} and {position}. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->firewallRuleset->deleteServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + 1, +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$serverUuid:** `string` β€” Server UUID + +
+
+ +
+
+ +**$position:** `int|string` β€” Server firewall rule position + +
+
+
+
+ + +
+
+
+ +## vnc_keymap +
$client->vncKeymap->listVncKeymaps() -> VncKeymapKeymaps +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves a list of supported VNC keymaps. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->vncKeymap->listVncKeymaps(); +``` +
+
+
+
+ + +
+
+
+ +## zone +
$client->zone->listZones() -> Zones +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves a list of zones. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->zone->listZones(); +``` +
+
+
+
+ + +
+
+
+ +
$client->zone->listZoneVlaNs($zone) -> ZoneVlans +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieves a list of VLANs in a specific zone. +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```php +$client->zone->listZoneVlaNs( + 'fi-hel1', +); +``` +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**$zone:** `string` β€” The zone identifier. + +
+
+
+
+ + +
+
+
diff --git a/fern/sdk/src/Account/AccountClient.php b/fern/sdk/src/Account/AccountClient.php new file mode 100644 index 00000000..e139d540 --- /dev/null +++ b/fern/sdk/src/Account/AccountClient.php @@ -0,0 +1,826 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Returns account details for the authenticated user + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Account + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function details(?array $options = null): Account + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Account::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a billing summary grouped by resource, including billing detail changes during the specified month. The API user must have permission to read billing details. + * + * @param string $year Billing year. + * @param string $month Billing month. + * @param GetMonthlyDetailedBillingSummaryRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return AccountBillingSummary + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getMonthlyDetailedBillingSummary(string $year, string $month, GetMonthlyDetailedBillingSummaryRequest $request = new GetMonthlyDetailedBillingSummaryRequest(), ?array $options = null): AccountBillingSummary + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->username !== null) { + $query['username'] = $request->username; + } + if ($request->resourceId !== null) { + $query['resource_id'] = $request->resourceId; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account/billing/summary/{$year}-{$month}", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return AccountBillingSummary::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a billing summary for the specified month. The API user must have permission to read billing details. This endpoint is deprecated; use the monthly billing summary with resource details instead. + * + * @param string $year Billing year. + * @param string $month Billing month. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return AccountBillingSummaryResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getMonthlyBillingSummary(string $year, string $month, ?array $options = null): AccountBillingSummaryResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account/billing_summary/{$year}-{$month}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return AccountBillingSummaryResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns the latest Network Transfer Pool usage report for the account. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return AccountCurrentNetworkUsage + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getCurrentNetworkUsage(?array $options = null): AccountCurrentNetworkUsage + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account/current_network_usage", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return AccountCurrentNetworkUsage::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns the main account and its subaccounts. Account listing is available only to the main account. + * + * @param ListAccountsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Accounts + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listAccounts(ListAccountsRequest $request = new ListAccountsRequest(), ?array $options = null): Accounts + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->label !== null) { + $query['label'] = $request->label; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account/list", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Accounts::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Create a new Microsoft LMA signing link + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return AccountCreateMsLmaSigningLinkResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createMslmaSigningLink(?array $options = null): AccountCreateMsLmaSigningLinkResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account/ms_lma", + method: HttpMethod::POST, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return AccountCreateMsLmaSigningLinkResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns the resources with the highest network usage. + * + * @param GetAccountNetworkTopUsageRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return AccountResourceNetworkUsage + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getAccountNetworkTopUsage(GetAccountNetworkTopUsageRequest $request, ?array $options = null): AccountResourceNetworkUsage + { + $options = array_merge($this->options, $options ?? []); + $query = []; + $query['from'] = JsonSerializer::serializeDateTime($request->from); + $query['to'] = JsonSerializer::serializeDateTime($request->to); + if ($request->service !== null) { + $query['service'] = $request->service; + } + if ($request->zone !== null) { + $query['zone'] = $request->zone; + } + if ($request->accumulate !== null) { + $query['accumulate'] = $request->accumulate; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account/network_top_usage", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return AccountResourceNetworkUsage::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns network transfer statistics. JSON responses support a maximum time window of 31 days; CSV responses have no time-window limit. Select the output format with the Accept header using application/json or text/csv. + * + * @param GetAccountNetworkUsageRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return AccountNetworkUsage + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getAccountNetworkUsage(GetAccountNetworkUsageRequest $request, ?array $options = null): AccountNetworkUsage + { + $options = array_merge($this->options, $options ?? []); + $query = []; + $query['from'] = JsonSerializer::serializeDateTime($request->from); + $query['to'] = JsonSerializer::serializeDateTime($request->to); + if ($request->accumulate !== null) { + $query['accumulate'] = $request->accumulate; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account/network_usage", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return AccountNetworkUsage::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns current resource usage counts for the account. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getAccountResourceUsage(?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account/resource-usage", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, ['string' => 'integer']); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a billing summary for one resource during the specified month. The API user must have permission to read billing details. + * + * @param string $resourceId Server UUID, storage UUID, or IP address. + * @param string $year Billing year. + * @param string $month Billing month. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return AccountResourceBillingSummaryResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getMonthlyResourceBillingSummary(string $resourceId, string $year, string $month, ?array $options = null): AccountResourceBillingSummaryResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account/resource_billing_summary/{$resourceId}/{$year}-{$month}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return AccountResourceBillingSummaryResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns network transfer statistics grouped by resource, service, and zone. JSON responses support a maximum time window of 31 days; CSV responses have no time-window limit. Select the output format with the Accept header using application/json or text/csv. + * + * @param GetAccountResourceNetworkUsageRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return AccountResourceNetworkUsage + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getAccountResourceNetworkUsage(GetAccountResourceNetworkUsageRequest $request, ?array $options = null): AccountResourceNetworkUsage + { + $options = array_merge($this->options, $options ?? []); + $query = []; + $query['from'] = JsonSerializer::serializeDateTime($request->from); + $query['to'] = JsonSerializer::serializeDateTime($request->to); + if ($request->service !== null) { + $query['service'] = $request->service; + } + if ($request->resourceId !== null) { + $query['resource_id'] = $request->resourceId; + } + if ($request->zone !== null) { + $query['zone'] = $request->zone; + } + if ($request->accumulate !== null) { + $query['accumulate'] = $request->accumulate; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account/resource_network_usage", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return AccountResourceNetworkUsage::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a subaccount for the authenticated main account. + * + * @param CreateSubaccountRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createSubaccount(CreateSubaccountRequest $request, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account/sub", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a subaccount from the authenticated main account. + * + * @param string $username Subaccount username. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteSubaccount(string $username, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account/sub/{$username}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Account/Requests/CreateSubaccountRequest.php b/fern/sdk/src/Account/Requests/CreateSubaccountRequest.php new file mode 100644 index 00000000..2890f604 --- /dev/null +++ b/fern/sdk/src/Account/Requests/CreateSubaccountRequest.php @@ -0,0 +1,27 @@ +subAccount = $values['subAccount']; + } +} diff --git a/fern/sdk/src/Account/Requests/GetAccountNetworkTopUsageRequest.php b/fern/sdk/src/Account/Requests/GetAccountNetworkTopUsageRequest.php new file mode 100644 index 00000000..cd423cdb --- /dev/null +++ b/fern/sdk/src/Account/Requests/GetAccountNetworkTopUsageRequest.php @@ -0,0 +1,55 @@ + $service Filter by service type. Repeat the parameter to include multiple service types. + */ + public ?string $service; + + /** + * @var ?string $zone Filter by zone. Repeat the parameter to include multiple zones. + */ + public ?string $zone; + + /** + * @var ?value-of $accumulate Accumulation period for the usage statistics. + */ + public ?string $accumulate; + + /** + * @param array{ + * from: DateTime, + * to: DateTime, + * service?: ?value-of, + * zone?: ?string, + * accumulate?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->from = $values['from']; + $this->to = $values['to']; + $this->service = $values['service'] ?? null; + $this->zone = $values['zone'] ?? null; + $this->accumulate = $values['accumulate'] ?? null; + } +} diff --git a/fern/sdk/src/Account/Requests/GetAccountNetworkUsageRequest.php b/fern/sdk/src/Account/Requests/GetAccountNetworkUsageRequest.php new file mode 100644 index 00000000..0fc0226e --- /dev/null +++ b/fern/sdk/src/Account/Requests/GetAccountNetworkUsageRequest.php @@ -0,0 +1,40 @@ + $accumulate Accumulate the transfer statistics by hour or day. + */ + public ?string $accumulate; + + /** + * @param array{ + * from: DateTime, + * to: DateTime, + * accumulate?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->from = $values['from']; + $this->to = $values['to']; + $this->accumulate = $values['accumulate'] ?? null; + } +} diff --git a/fern/sdk/src/Account/Requests/GetAccountResourceNetworkUsageRequest.php b/fern/sdk/src/Account/Requests/GetAccountResourceNetworkUsageRequest.php new file mode 100644 index 00000000..5f468fff --- /dev/null +++ b/fern/sdk/src/Account/Requests/GetAccountResourceNetworkUsageRequest.php @@ -0,0 +1,62 @@ + $service Limit results to a service type. Repeat the parameter to include multiple service types. + */ + public ?string $service; + + /** + * @var ?string $resourceId Limit results to this resource UUID. + */ + public ?string $resourceId; + + /** + * @var ?string $zone Limit results to a zone. Repeat the parameter to include multiple zones. + */ + public ?string $zone; + + /** + * @var ?value-of $accumulate Accumulate the transfer statistics by hour or day. + */ + public ?string $accumulate; + + /** + * @param array{ + * from: DateTime, + * to: DateTime, + * service?: ?value-of, + * resourceId?: ?string, + * zone?: ?string, + * accumulate?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->from = $values['from']; + $this->to = $values['to']; + $this->service = $values['service'] ?? null; + $this->resourceId = $values['resourceId'] ?? null; + $this->zone = $values['zone'] ?? null; + $this->accumulate = $values['accumulate'] ?? null; + } +} diff --git a/fern/sdk/src/Account/Requests/GetMonthlyDetailedBillingSummaryRequest.php b/fern/sdk/src/Account/Requests/GetMonthlyDetailedBillingSummaryRequest.php new file mode 100644 index 00000000..03ca4e8b --- /dev/null +++ b/fern/sdk/src/Account/Requests/GetMonthlyDetailedBillingSummaryRequest.php @@ -0,0 +1,31 @@ +username = $values['username'] ?? null; + $this->resourceId = $values['resourceId'] ?? null; + } +} diff --git a/fern/sdk/src/Account/Requests/ListAccountsRequest.php b/fern/sdk/src/Account/Requests/ListAccountsRequest.php new file mode 100644 index 00000000..b51ddc4f --- /dev/null +++ b/fern/sdk/src/Account/Requests/ListAccountsRequest.php @@ -0,0 +1,24 @@ +label = $values['label'] ?? null; + } +} diff --git a/fern/sdk/src/Account/Types/CreateSubaccountRequestSubAccount.php b/fern/sdk/src/Account/Types/CreateSubaccountRequestSubAccount.php new file mode 100644 index 00000000..78db1fb0 --- /dev/null +++ b/fern/sdk/src/Account/Types/CreateSubaccountRequestSubAccount.php @@ -0,0 +1,237 @@ + $allowApi + */ + #[JsonProperty('allow_api')] + public ?string $allowApi; + + /** + * @var ?value-of $allowGui + */ + #[JsonProperty('allow_gui')] + public ?string $allowGui; + + /** + * @var ?CreateSubaccountRequestSubAccountRoles $roles + */ + #[JsonProperty('roles')] + public ?CreateSubaccountRequestSubAccountRoles $roles; + + /** + * @var ?array $labels + */ + #[JsonProperty('labels'), ArrayType([AccountLabel::class])] + public ?array $labels; + + /** + * @var ?CreateSubaccountRequestSubAccountIpFilters $ipFilters + */ + #[JsonProperty('ip_filters')] + public ?CreateSubaccountRequestSubAccountIpFilters $ipFilters; + + /** + * @var ?array $serverAccess + */ + #[JsonProperty('server_access'), ArrayType(['string' => 'mixed'])] + public ?array $serverAccess; + + /** + * @var ?array $storageAccess + */ + #[JsonProperty('storage_access'), ArrayType(['string' => 'mixed'])] + public ?array $storageAccess; + + /** + * @var ?array $networkAccess + */ + #[JsonProperty('network_access'), ArrayType(['string' => 'mixed'])] + public ?array $networkAccess; + + /** + * @var ?array $tagAccess + */ + #[JsonProperty('tag_access'), ArrayType(['string' => 'mixed'])] + public ?array $tagAccess; + + /** + * @var ?value-of $enable3rdPartyServices + */ + #[JsonProperty('enable_3rd_party_services')] + public ?string $enable3rdPartyServices; + + /** + * @param array{ + * username: string, + * email: string, + * phone: string, + * language: string, + * timezone: string, + * password?: ?string, + * firstName?: ?string, + * lastName?: ?string, + * company?: ?string, + * vatNumber?: ?string, + * address?: ?string, + * postalCode?: ?string, + * city?: ?string, + * state?: ?string, + * country?: ?string, + * currency?: ?string, + * allowApi?: ?value-of, + * allowGui?: ?value-of, + * roles?: ?CreateSubaccountRequestSubAccountRoles, + * labels?: ?array, + * ipFilters?: ?CreateSubaccountRequestSubAccountIpFilters, + * serverAccess?: ?array, + * storageAccess?: ?array, + * networkAccess?: ?array, + * tagAccess?: ?array, + * enable3rdPartyServices?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->username = $values['username']; + $this->password = $values['password'] ?? null; + $this->firstName = $values['firstName'] ?? null; + $this->lastName = $values['lastName'] ?? null; + $this->company = $values['company'] ?? null; + $this->vatNumber = $values['vatNumber'] ?? null; + $this->address = $values['address'] ?? null; + $this->postalCode = $values['postalCode'] ?? null; + $this->city = $values['city'] ?? null; + $this->state = $values['state'] ?? null; + $this->country = $values['country'] ?? null; + $this->email = $values['email']; + $this->phone = $values['phone']; + $this->language = $values['language']; + $this->currency = $values['currency'] ?? null; + $this->timezone = $values['timezone']; + $this->allowApi = $values['allowApi'] ?? null; + $this->allowGui = $values['allowGui'] ?? null; + $this->roles = $values['roles'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->ipFilters = $values['ipFilters'] ?? null; + $this->serverAccess = $values['serverAccess'] ?? null; + $this->storageAccess = $values['storageAccess'] ?? null; + $this->networkAccess = $values['networkAccess'] ?? null; + $this->tagAccess = $values['tagAccess'] ?? null; + $this->enable3rdPartyServices = $values['enable3rdPartyServices'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Account/Types/CreateSubaccountRequestSubAccountIpFilters.php b/fern/sdk/src/Account/Types/CreateSubaccountRequestSubAccountIpFilters.php new file mode 100644 index 00000000..76f78c74 --- /dev/null +++ b/fern/sdk/src/Account/Types/CreateSubaccountRequestSubAccountIpFilters.php @@ -0,0 +1,35 @@ + $ipFilter + */ + #[JsonProperty('ip_filter'), ArrayType(['string'])] + public array $ipFilter; + + /** + * @param array{ + * ipFilter: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->ipFilter = $values['ipFilter']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Account/Types/CreateSubaccountRequestSubAccountRoles.php b/fern/sdk/src/Account/Types/CreateSubaccountRequestSubAccountRoles.php new file mode 100644 index 00000000..39f88801 --- /dev/null +++ b/fern/sdk/src/Account/Types/CreateSubaccountRequestSubAccountRoles.php @@ -0,0 +1,35 @@ + $role + */ + #[JsonProperty('role'), ArrayType(['string'])] + public array $role; + + /** + * @param array{ + * role: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->role = $values['role']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/AccountTokens/AccountTokensClient.php b/fern/sdk/src/AccountTokens/AccountTokensClient.php new file mode 100644 index 00000000..e5769e17 --- /dev/null +++ b/fern/sdk/src/AccountTokens/AccountTokensClient.php @@ -0,0 +1,297 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * List all tokens for the currently authorized account. + * The tokens are returned in a paged format, with the default page size being 20. + * The maximum page size is 100. + * + * @param ListTokensRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listTokens(ListTokensRequest $request = new ListTokensRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + if ($request->gui !== null) { + $query['gui'] = $request->gui; + } + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account/tokens", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [AccountTokensToken::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Create a new API token. Maximum token validity is 24*365h=8760h (~1 year). + * Attribute allowed_ip_prefixes allows defining a list of CIDR/IP addresses from where the token is accepted. + * Empty list denies access from everywhere. If unset, the default list will be the IP filters of the account. If no IP filters are defined for the account either, the default will be ["0.0.0.0/0", "::0/0"], i.e. allow from any address. + * + * @param ( + * AccountTokensCreateTokenRequestExpiresIn + * |AccountTokensCreateTokenRequestExpiresAt + * ) $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return AccountTokensToken + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createToken(AccountTokensCreateTokenRequestExpiresIn|AccountTokensCreateTokenRequestExpiresAt $request, ?array $options = null): AccountTokensToken + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account/tokens", + method: HttpMethod::POST, + body: JsonSerializer::serializeUnion($request, new Union(AccountTokensCreateTokenRequestExpiresIn::class, AccountTokensCreateTokenRequestExpiresAt::class)), + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return AccountTokensToken::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Get the details of a specific API token. + * + * @param string $tokenUuid The uuid of the token to get + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return AccountTokensGetTokenResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getToken(string $tokenUuid, ?array $options = null): AccountTokensGetTokenResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account/tokens/{$tokenUuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return AccountTokensGetTokenResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Revoke a specific API token. + * + * @param string $tokenUuid The uuid of the token to delete + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function revokeToken(string $tokenUuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/account/tokens/{$tokenUuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/AccountTokens/Requests/ListTokensRequest.php b/fern/sdk/src/AccountTokens/Requests/ListTokensRequest.php new file mode 100644 index 00000000..57d610d9 --- /dev/null +++ b/fern/sdk/src/AccountTokens/Requests/ListTokensRequest.php @@ -0,0 +1,45 @@ +limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + $this->gui = $values['gui'] ?? null; + $this->sort = $values['sort'] ?? null; + } +} diff --git a/fern/sdk/src/AuditLogs/AuditLogsClient.php b/fern/sdk/src/AuditLogs/AuditLogsClient.php new file mode 100644 index 00000000..fcddf9a4 --- /dev/null +++ b/fern/sdk/src/AuditLogs/AuditLogsClient.php @@ -0,0 +1,310 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Returns a list of audit log rows according to the query parameters. Note that this endpoint is paginated by default and the list is limited in results. + * + * Pagination + * Upcloud-Total-Count header is included in the response to indicate the total number of audit logs available with the current query parameters (excluding limit and offset). The total count can be used for a number of pagination strategies. limit and offset query parameters can be used to finally paginate the results. + * + * @param ListAuditLogsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return AuditLogsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listAuditLogs(ListAuditLogsRequest $request = new ListAuditLogsRequest(), ?array $options = null): AuditLogsResponse + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->q !== null) { + $query['q'] = $request->q; + } + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + if ($request->actions !== null) { + $query['actions'] = $request->actions; + } + if ($request->origins !== null) { + $query['origins'] = $request->origins; + } + if ($request->resourceTypes !== null) { + $query['resource_types'] = $request->resourceTypes; + } + if ($request->createdAfter !== null) { + $query['created_after'] = JsonSerializer::serializeDateTime($request->createdAfter); + } + if ($request->createdBefore !== null) { + $query['created_before'] = JsonSerializer::serializeDateTime($request->createdBefore); + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/audit-logs", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return AuditLogsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Export all audit logs for the authenticated account as CSV or JSON (up to 180 day limit). Note: Use the format parameter to specify output format; only JSON schema is documented here. + * + * @param ExportAuditLogsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return AuditLogsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function exportAuditLogs(ExportAuditLogsRequest $request = new ExportAuditLogsRequest(), ?array $options = null): AuditLogsResponse + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->format !== null) { + $query['format'] = $request->format; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/audit-logs/export", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return AuditLogsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns details of a single audit log event by its cloud event ID. + * + * @param string $cloudEventId Cloud event ID (ULID format) + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return AuditLogsAuditLog + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getAuditLog(string $cloudEventId, ?array $options = null): AuditLogsAuditLog + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/audit-logs/{$cloudEventId}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return AuditLogsAuditLog::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns lists of available resource types, actions, and origins for filtering. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return AuditLogsFilterOptionsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getFilterOptions(?array $options = null): AuditLogsFilterOptionsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/audit-logs/filter-options", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return AuditLogsFilterOptionsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/AuditLogs/Requests/ExportAuditLogsRequest.php b/fern/sdk/src/AuditLogs/Requests/ExportAuditLogsRequest.php new file mode 100644 index 00000000..e29210de --- /dev/null +++ b/fern/sdk/src/AuditLogs/Requests/ExportAuditLogsRequest.php @@ -0,0 +1,25 @@ + $format Export format: 'csv' or 'json' (default: csv) + */ + public ?string $format; + + /** + * @param array{ + * format?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->format = $values['format'] ?? null; + } +} diff --git a/fern/sdk/src/AuditLogs/Requests/ListAuditLogsRequest.php b/fern/sdk/src/AuditLogs/Requests/ListAuditLogsRequest.php new file mode 100644 index 00000000..2c2e360a --- /dev/null +++ b/fern/sdk/src/AuditLogs/Requests/ListAuditLogsRequest.php @@ -0,0 +1,77 @@ +> $actions List of actions to filter by + */ + public ?array $actions; + + /** + * @var ?array> $origins List of origins to filter by + */ + public ?array $origins; + + /** + * @var ?array> $resourceTypes List of resource types to filter by + */ + public ?array $resourceTypes; + + /** + * @var ?DateTime $createdAfter List audit logs created after the given timestamp (including the time of timestamp). Format: ISO timestamp eg. 2024-01-01T23:45:56Z + */ + public ?DateTime $createdAfter; + + /** + * @var ?DateTime $createdBefore List audit logs created before the given timestamp (including the time of timestamp). Format: ISO timestamp eg. 2024-01-01T23:45:56Z + */ + public ?DateTime $createdBefore; + + /** + * @param array{ + * q?: ?string, + * limit?: ?int, + * offset?: ?int, + * actions?: ?array>, + * origins?: ?array>, + * resourceTypes?: ?array>, + * createdAfter?: ?DateTime, + * createdBefore?: ?DateTime, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->q = $values['q'] ?? null; + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + $this->actions = $values['actions'] ?? null; + $this->origins = $values['origins'] ?? null; + $this->resourceTypes = $values['resourceTypes'] ?? null; + $this->createdAfter = $values['createdAfter'] ?? null; + $this->createdBefore = $values['createdBefore'] ?? null; + } +} diff --git a/fern/sdk/src/Core/Client/BaseApiRequest.php b/fern/sdk/src/Core/Client/BaseApiRequest.php new file mode 100644 index 00000000..11c30a47 --- /dev/null +++ b/fern/sdk/src/Core/Client/BaseApiRequest.php @@ -0,0 +1,22 @@ + $headers Additional headers for the request (optional) + * @param array $query Query parameters for the request (optional) + */ + public function __construct( + public readonly string $baseUrl, + public readonly string $path, + public readonly HttpMethod $method, + public readonly array $headers = [], + public readonly array $query = [], + ) { + } +} diff --git a/fern/sdk/src/Core/Client/HttpMethod.php b/fern/sdk/src/Core/Client/HttpMethod.php new file mode 100644 index 00000000..746e0389 --- /dev/null +++ b/fern/sdk/src/Core/Client/HttpMethod.php @@ -0,0 +1,12 @@ + $headers + */ + private array $headers; + + /** + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * headers?: array, + * } $options + */ + public function __construct( + public readonly ?array $options = null, + ) { + $this->client = $this->options['client'] + ?? $this->createDefaultClient(); + $this->headers = $this->options['headers'] ?? []; + } + + /** + * @return Client + */ + private function createDefaultClient(): Client + { + $handler = HandlerStack::create(); + $handler->push(RetryMiddleware::create()); + return new Client(['handler' => $handler]); + } + + /** + * @param BaseApiRequest $request + * @param ?array{ + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ResponseInterface + * @throws ClientExceptionInterface + */ + public function sendRequest( + BaseApiRequest $request, + ?array $options = null, + ): ResponseInterface { + $opts = $options ?? []; + $httpRequest = $this->buildRequest($request, $opts); + return $this->client->send($httpRequest, $this->toGuzzleOptions($opts)); + } + + /** + * @param array{ + * maxRetries?: int, + * timeout?: float, + * } $options + * @return array + */ + private function toGuzzleOptions(array $options): array + { + $guzzleOptions = []; + if (isset($options['maxRetries'])) { + $guzzleOptions['maxRetries'] = $options['maxRetries']; + } + if (isset($options['timeout'])) { + $guzzleOptions['timeout'] = $options['timeout']; + } + return $guzzleOptions; + } + + /** + * @param BaseApiRequest $request + * @param array{ + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Request + */ + private function buildRequest( + BaseApiRequest $request, + array $options + ): Request { + $url = $this->buildUrl($request, $options); + $headers = $this->encodeHeaders($request, $options); + $body = $this->encodeRequestBody($request, $options); + return new Request( + $request->method->name, + $url, + $headers, + $body, + ); + } + + /** + * @param BaseApiRequest $request + * @param array{ + * headers?: array, + * } $options + * @return array + */ + private function encodeHeaders( + BaseApiRequest $request, + array $options, + ): array { + return match (get_class($request)) { + JsonApiRequest::class => array_merge( + [ + "Content-Type" => "application/json", + "Accept" => "*/*", + ], + $this->headers, + $request->headers, + $options['headers'] ?? [], + ), + MultipartApiRequest::class => array_merge( + $this->headers, + $request->headers, + $options['headers'] ?? [], + ), + default => throw new InvalidArgumentException('Unsupported request type: ' . get_class($request)), + }; + } + + /** + * @param BaseApiRequest $request + * @param array{ + * bodyProperties?: array, + * } $options + * @return ?StreamInterface + */ + private function encodeRequestBody( + BaseApiRequest $request, + array $options, + ): ?StreamInterface { + return match (get_class($request)) { + JsonApiRequest::class => $request->body === null ? null : Utils::streamFor( + json_encode( + $this->buildJsonBody( + $request->body, + $options, + ), + ) + ), + MultipartApiRequest::class => $request->body !== null ? new MultipartStream($request->body->toArray()) : null, + default => throw new InvalidArgumentException('Unsupported request type: ' . get_class($request)), + }; + } + + /** + * @param mixed $body + * @param array{ + * bodyProperties?: array, + * } $options + * @return mixed + */ + private function buildJsonBody( + mixed $body, + array $options, + ): mixed { + $overrideProperties = $options['bodyProperties'] ?? []; + if (is_array($body) && (empty($body) || self::isSequential($body))) { + return array_merge($body, $overrideProperties); + } + + if ($body instanceof JsonSerializable) { + $result = $body->jsonSerialize(); + } else { + $result = $body; + } + if (is_array($result)) { + $result = array_merge($result, $overrideProperties); + if (empty($result)) { + // force to be serialized as {} instead of [] + return (object)($result); + } + } + + return $result; + } + + /** + * @param BaseApiRequest $request + * @param array{ + * queryParameters?: array, + * } $options + * @return string + */ + private function buildUrl( + BaseApiRequest $request, + array $options, + ): string { + $baseUrl = $request->baseUrl; + $trimmedBaseUrl = rtrim($baseUrl, '/'); + $trimmedBasePath = ltrim($request->path, '/'); + $url = "{$trimmedBaseUrl}/{$trimmedBasePath}"; + $query = array_merge( + $request->query, + $options['queryParameters'] ?? [], + ); + if (!empty($query)) { + $url .= '?' . $this->encodeQuery($query); + } + return $url; + } + + /** + * @param array $query + * @return string + */ + private function encodeQuery(array $query): string + { + $parts = []; + foreach ($query as $key => $value) { + if (is_array($value)) { + foreach ($value as $item) { + $parts[] = urlencode($key) . '=' . $this->encodeQueryValue($item); + } + } else { + $parts[] = urlencode($key) . '=' . $this->encodeQueryValue($value); + } + } + return implode('&', $parts); + } + + private function encodeQueryValue(mixed $value): string + { + if (is_string($value)) { + return urlencode($value); + } + if (is_bool($value)) { + return $value ? 'true' : 'false'; + } + if (is_scalar($value)) { + return urlencode((string)$value); + } + if (is_null($value)) { + return 'null'; + } + // Unreachable, but included for a best effort. + return urlencode(strval(json_encode($value))); + } + + /** + * Check if an array is sequential, not associative. + * @param mixed[] $arr + * @return bool + */ + private static function isSequential(array $arr): bool + { + if (empty($arr)) { + return false; + } + $length = count($arr); + $keys = array_keys($arr); + for ($i = 0; $i < $length; $i++) { + if ($keys[$i] !== $i) { + return false; + } + } + return true; + } +} diff --git a/fern/sdk/src/Core/Client/RetryMiddleware.php b/fern/sdk/src/Core/Client/RetryMiddleware.php new file mode 100644 index 00000000..b99deed8 --- /dev/null +++ b/fern/sdk/src/Core/Client/RetryMiddleware.php @@ -0,0 +1,266 @@ + 2, + 'baseDelay' => 1000 + ]; + private const RETRY_STATUS_CODES = [408, 429]; + private const MAX_RETRY_DELAY = 60000; // 60 seconds in milliseconds + private const JITTER_FACTOR = 0.2; // 20% random jitter + + /** + * @var callable(RequestInterface, array): PromiseInterface + * @phpstan-ignore missingType.iterableValue + */ + private $nextHandler; + + /** + * @var array{ + * maxRetries: int, + * baseDelay: int, + * } + */ + private array $options; + + /** + * @param callable $nextHandler + * @param ?array{ + * maxRetries?: int, + * } $options + */ + public function __construct( + callable $nextHandler, + ?array $options = null, + ) { + $this->nextHandler = $nextHandler; + $this->options = array_merge(self::DEFAULT_RETRY_OPTIONS, $options ?? []); + } + + /** + * @param ?array{ + * maxRetries?: int, + * baseDelay?: int, + * } $options + * @return callable + */ + public static function create(?array $options = null): callable + { + return static function (callable $handler) use ($options): RetryMiddleware { + return new RetryMiddleware($handler, $options); + }; + } + + /** + * @param RequestInterface $request + * @param array{ + * retryAttempt?: int, + * delay: int, + * maxRetries?: int, + * } $options + * @return PromiseInterface + */ + public function __invoke(RequestInterface $request, array $options): PromiseInterface + { + $options = array_merge($this->options, $options); + if (!isset($options['retryAttempt'])) { + $options['retryAttempt'] = 0; + } + + $fn = $this->nextHandler; + + return $fn($request, $options) + ->then( + $this->onFulfilled($request, $options), + $this->onRejected($request, $options) + ); + } + + /** + * @param int $retryAttempt + * @param int $maxRetries + * @param ?ResponseInterface $response + * @param ?Throwable $exception + * @return bool + */ + private function shouldRetry( + int $retryAttempt, + int $maxRetries, + ?ResponseInterface $response = null, + ?Throwable $exception = null + ): bool { + if ($retryAttempt >= $maxRetries) { + return false; + } + + if ($exception instanceof ConnectException) { + return true; + } + + if ($response) { + return $response->getStatusCode() >= 500 || + in_array($response->getStatusCode(), self::RETRY_STATUS_CODES); + } + return false; + } + + /** + * Execute fulfilled closure + * @param array{ + * retryAttempt: int, + * delay: int, + * maxRetries: int, + * } $options + */ + private function onFulfilled(RequestInterface $request, array $options): callable + { + $retryAttempt = $options['retryAttempt']; + $maxRetries = $options['maxRetries']; + return function ($value) use ($request, $options, $retryAttempt, $maxRetries) { + if (!$this->shouldRetry( + $retryAttempt, + $maxRetries, + $value + )) { + return $value; + } + + return $this->doRetry($request, $options, $value); + }; + } + + /** + * Execute rejected closure + * @param RequestInterface $req + * @param array{ + * retryAttempt: int, + * delay: int, + * maxRetries: int, + * } $options + * @return callable + */ + private function onRejected(RequestInterface $req, array $options): callable + { + $retryAttempt = $options['retryAttempt']; + $maxRetries = $options['maxRetries']; + return function ($reason) use ($req, $options, $retryAttempt, $maxRetries) { + if (!$this->shouldRetry( + $retryAttempt, + $maxRetries, + null, + $reason + )) { + return P\Create::rejectionFor($reason); + } + + return $this->doRetry($req, $options); + }; + } + + /** + * @param RequestInterface $request + * @param array{ + * delay: int, + * retryAttempt: int, + * } $options + * @param ?ResponseInterface $response + * @return PromiseInterface + */ + private function doRetry(RequestInterface $request, array $options, ?ResponseInterface $response = null): PromiseInterface + { + $options['delay'] = $this->getRetryDelay(++$options['retryAttempt'], $response); + return $this($request, $options); + } + + /** + * Calculate the retry delay based on response headers or exponential backoff. + * + * @param int $retryAttempt + * @param ?ResponseInterface $response + * @return int milliseconds + */ + private function getRetryDelay(int $retryAttempt, ?ResponseInterface $response): int + { + if ($response !== null) { + // Check Retry-After header + $retryAfter = $response->getHeaderLine('Retry-After'); + if ($retryAfter !== '') { + // Try parsing as integer (seconds) + if (is_numeric($retryAfter)) { + $retryAfterSeconds = (int)$retryAfter; + if ($retryAfterSeconds > 0) { + return min($retryAfterSeconds * 1000, self::MAX_RETRY_DELAY); + } + } + + // Try parsing as HTTP date + $retryAfterDate = strtotime($retryAfter); + if ($retryAfterDate !== false) { + $delay = ($retryAfterDate - time()) * 1000; + if ($delay > 0) { + return min(max($delay, 0), self::MAX_RETRY_DELAY); + } + } + } + + // Check X-RateLimit-Reset header + $rateLimitReset = $response->getHeaderLine('X-RateLimit-Reset'); + if ($rateLimitReset !== '' && is_numeric($rateLimitReset)) { + $resetTime = (int)$rateLimitReset; + $delay = ($resetTime * 1000) - (int)(microtime(true) * 1000); + if ($delay > 0) { + return $this->addPositiveJitter(min($delay, self::MAX_RETRY_DELAY)); + } + } + } + + // Fall back to exponential backoff with symmetric jitter + return $this->addSymmetricJitter( + min($this->exponentialDelay($retryAttempt), self::MAX_RETRY_DELAY) + ); + } + + /** + * Add positive jitter (0% to +20%) to the delay. + * + * @param int $delay + * @return int + */ + private function addPositiveJitter(int $delay): int + { + $jitterMultiplier = 1 + (mt_rand() / mt_getrandmax()) * self::JITTER_FACTOR; + return (int)($delay * $jitterMultiplier); + } + + /** + * Add symmetric jitter (-10% to +10%) to the delay. + * + * @param int $delay + * @return int + */ + private function addSymmetricJitter(int $delay): int + { + $jitterMultiplier = 1 + ((mt_rand() / mt_getrandmax()) - 0.5) * self::JITTER_FACTOR; + return (int)($delay * $jitterMultiplier); + } + + /** + * Default exponential backoff delay function. + * + * @return int milliseconds. + */ + private function exponentialDelay(int $retryAttempt): int + { + return 2 ** ($retryAttempt - 1) * $this->options['baseDelay']; + } +} diff --git a/fern/sdk/src/Core/Json/JsonApiRequest.php b/fern/sdk/src/Core/Json/JsonApiRequest.php new file mode 100644 index 00000000..446858ad --- /dev/null +++ b/fern/sdk/src/Core/Json/JsonApiRequest.php @@ -0,0 +1,28 @@ + $headers Additional headers for the request (optional) + * @param array $query Query parameters for the request (optional) + * @param mixed|null $body The JSON request body (optional) + */ + public function __construct( + string $baseUrl, + string $path, + HttpMethod $method, + array $headers = [], + array $query = [], + public readonly mixed $body = null + ) { + parent::__construct($baseUrl, $path, $method, $headers, $query); + } +} diff --git a/fern/sdk/src/Core/Json/JsonDecoder.php b/fern/sdk/src/Core/Json/JsonDecoder.php new file mode 100644 index 00000000..96ca66d1 --- /dev/null +++ b/fern/sdk/src/Core/Json/JsonDecoder.php @@ -0,0 +1,161 @@ + $type The type definition for deserialization. + * @return mixed[]|array The deserialized array. + * @throws JsonException If the decoded value is not an array. + */ + public static function decodeArray(string $json, array $type): array + { + $decoded = self::decode($json); + if (!is_array($decoded)) { + throw new JsonException("Unexpected non-array json value: " . $json); + } + return JsonDeserializer::deserializeArray($decoded, $type); + } + + /** + * Decodes a JSON string and deserializes it based on the provided union type definition. + * + * @param string $json The JSON string to decode. + * @param Union $union The union type definition for deserialization. + * @return mixed The deserialized value. + * @throws JsonException If the deserialization for all types in the union fails. + */ + public static function decodeUnion(string $json, Union $union): mixed + { + $decoded = self::decode($json); + return JsonDeserializer::deserializeUnion($decoded, $union); + } + /** + * Decodes a JSON string and returns a mixed. + * + * @param string $json The JSON string to decode. + * @return mixed The decoded mixed. + * @throws JsonException If the decoded value is not an mixed. + */ + public static function decodeMixed(string $json): mixed + { + return self::decode($json); + } + + /** + * Decodes a JSON string into a PHP value. + * + * @param string $json The JSON string to decode. + * @return mixed The decoded value. + * @throws JsonException If an error occurs during JSON decoding. + */ + public static function decode(string $json): mixed + { + return json_decode($json, associative: true, flags: JSON_THROW_ON_ERROR); + } +} diff --git a/fern/sdk/src/Core/Json/JsonDeserializer.php b/fern/sdk/src/Core/Json/JsonDeserializer.php new file mode 100644 index 00000000..eca1e6dc --- /dev/null +++ b/fern/sdk/src/Core/Json/JsonDeserializer.php @@ -0,0 +1,206 @@ + $data The array to be deserialized. + * @param mixed[]|array $type The type definition from the annotation. + * @return mixed[]|array The deserialized array. + * @throws JsonException If deserialization fails. + */ + public static function deserializeArray(array $data, array $type): array + { + return Utils::isMapType($type) + ? self::deserializeMap($data, $type) + : self::deserializeList($data, $type); + } + + /** + * Deserializes a value based on its type definition. + * + * @param mixed $data The data to deserialize. + * @param mixed $type The type definition. + * @return mixed The deserialized value. + * @throws JsonException If deserialization fails. + */ + private static function deserializeValue(mixed $data, mixed $type): mixed + { + if ($type instanceof Union) { + return self::deserializeUnion($data, $type); + } + + if (is_array($type)) { + return self::deserializeArray((array)$data, $type); + } + + if (gettype($type) != "string") { + throw new JsonException("Unexpected non-string type."); + } + + return self::deserializeSingleValue($data, $type); + } + + /** + * Deserializes a value based on the possible types in a union type definition. + * + * @param mixed $data The data to deserialize. + * @param Union $type The union type definition. + * @return mixed The deserialized value. + * @throws JsonException If none of the union types can successfully deserialize the value. + */ + public static function deserializeUnion(mixed $data, Union $type): mixed + { + foreach ($type->types as $unionType) { + try { + return self::deserializeValue($data, $unionType); + } catch (\Throwable) { + // Catching Throwable instead of Exception to handle TypeError + // that occurs when assigning null to non-nullable typed properties + continue; + } + } + $readableType = Utils::getReadableType($data); + throw new JsonException( + "Cannot deserialize value of type $readableType with any of the union types: " . $type + ); + } + + /** + * Deserializes a single value based on its expected type. + * + * @param mixed $data The data to deserialize. + * @param string $type The expected type. + * @return mixed The deserialized value. + * @throws JsonException If deserialization fails. + */ + private static function deserializeSingleValue(mixed $data, string $type): mixed + { + if ($type === 'null' && $data === null) { + return null; + } + + if ($type === 'date' && is_string($data)) { + return self::deserializeDate($data); + } + + if ($type === 'datetime' && is_string($data)) { + return self::deserializeDateTime($data); + } + + if ($type === 'mixed') { + return $data; + } + + if (class_exists($type) && is_array($data)) { + return self::deserializeObject($data, $type); + } + + // Handle floats as a special case since gettype($data) returns "double" for float values in PHP, and because + // floats make come through from json_decoded as integers + if ($type === 'float' && (is_numeric($data))) { + return (float) $data; + } + + if (gettype($data) === $type) { + return $data; + } + + throw new JsonException("Unable to deserialize value of type '" . gettype($data) . "' as '$type'."); + } + + /** + * Deserializes an array into an object of the given type. + * + * @param array $data The data to deserialize. + * @param string $type The class name of the object to deserialize into. + * + * @return object The deserialized object. + * + * @throws JsonException If the type does not implement JsonSerializableType. + */ + public static function deserializeObject(array $data, string $type): object + { + if (!is_subclass_of($type, JsonSerializableType::class)) { + throw new JsonException("$type is not a subclass of JsonSerializableType."); + } + return $type::jsonDeserialize($data); + } + + /** + * Deserializes a map (associative array) with defined key and value types. + * + * @param array $data The associative array to deserialize. + * @param array $type The type definition for the map. + * @return array The deserialized map. + * @throws JsonException If deserialization fails. + */ + private static function deserializeMap(array $data, array $type): array + { + $keyType = array_key_first($type); + $valueType = $type[$keyType]; + $result = []; + + foreach ($data as $key => $item) { + $key = Utils::castKey($key, (string)$keyType); + $result[$key] = self::deserializeValue($item, $valueType); + } + + return $result; + } + + /** + * Deserializes a list (indexed array) with a defined value type. + * + * @param array $data The list to deserialize. + * @param array $type The type definition for the list. + * @return array The deserialized list. + * @throws JsonException If deserialization fails. + */ + private static function deserializeList(array $data, array $type): array + { + $valueType = $type[0]; + return array_map(fn ($item) => self::deserializeValue($item, $valueType), $data); + } +} diff --git a/fern/sdk/src/Core/Json/JsonEncoder.php b/fern/sdk/src/Core/Json/JsonEncoder.php new file mode 100644 index 00000000..ab74ea27 --- /dev/null +++ b/fern/sdk/src/Core/Json/JsonEncoder.php @@ -0,0 +1,20 @@ + Extra properties from JSON that don't map to class properties */ + private array $__additionalProperties = []; + + /** + * Serializes the object to a JSON string. + * + * @return string JSON-encoded string representation of the object. + * @throws Exception If encoding fails. + */ + public function toJson(): string + { + $serializedObject = $this->jsonSerialize(); + $encoded = JsonEncoder::encode($serializedObject); + if (!$encoded) { + throw new Exception("Could not encode type"); + } + return $encoded; + } + + /** + * Serializes the object to an array. + * + * @return mixed[] Array representation of the object. + * @throws JsonException If serialization fails. + */ + public function jsonSerialize(): array + { + $result = []; + $reflectionClass = new \ReflectionClass($this); + foreach ($reflectionClass->getProperties() as $property) { + $jsonKey = self::getJsonKey($property); + if ($jsonKey == null) { + continue; + } + $value = $property->getValue($this); + + // Handle DateTime properties + $dateTypeAttr = $property->getAttributes(Date::class)[0] ?? null; + if ($dateTypeAttr && $value instanceof DateTime) { + $dateType = $dateTypeAttr->newInstance()->type; + $value = ($dateType === Date::TYPE_DATE) + ? JsonSerializer::serializeDate($value) + : JsonSerializer::serializeDateTime($value); + } + + // Handle Union annotations + $unionTypeAttr = $property->getAttributes(Union::class)[0] ?? null; + if ($unionTypeAttr) { + $unionType = $unionTypeAttr->newInstance(); + $value = JsonSerializer::serializeUnion($value, $unionType); + } + + // Handle arrays with type annotations + $arrayTypeAttr = $property->getAttributes(ArrayType::class)[0] ?? null; + if ($arrayTypeAttr && is_array($value)) { + $arrayType = $arrayTypeAttr->newInstance()->type; + $value = JsonSerializer::serializeArray($value, $arrayType); + } + + // Handle object + if (is_object($value)) { + $value = JsonSerializer::serializeObject($value); + } + + if ($value !== null) { + $result[$jsonKey] = $value; + } + } + return $result; + } + + /** + * Deserializes a JSON string into an instance of the calling class. + * + * @param string $json JSON string to deserialize. + * @return static Deserialized object. + * @throws JsonException If decoding fails or the result is not an array. + * @throws Exception If deserialization fails. + */ + public static function fromJson(string $json): static + { + $decodedJson = JsonDecoder::decode($json); + if (!is_array($decodedJson)) { + throw new JsonException("Unexpected non-array decoded type: " . gettype($decodedJson)); + } + return self::jsonDeserialize($decodedJson); + } + + /** + * Deserializes an array into an instance of the calling class. + * + * @param array $data Array data to deserialize. + * @return static Deserialized object. + * @throws JsonException If deserialization fails. + */ + public static function jsonDeserialize(array $data): static + { + $reflectionClass = new \ReflectionClass(static::class); + $constructor = $reflectionClass->getConstructor(); + if ($constructor === null) { + throw new JsonException("No constructor found."); + } + + $args = []; + $properties = []; + $additionalProperties = []; + foreach ($reflectionClass->getProperties() as $property) { + $jsonKey = self::getJsonKey($property) ?? $property->getName(); + $properties[$jsonKey] = $property; + } + + foreach ($data as $jsonKey => $value) { + if (!isset($properties[$jsonKey])) { + // This JSON key doesn't map to any class property - add it to additionalProperties + $additionalProperties[$jsonKey] = $value; + continue; + } + + $property = $properties[$jsonKey]; + + // Handle Date annotation + $dateTypeAttr = $property->getAttributes(Date::class)[0] ?? null; + if ($dateTypeAttr) { + $dateType = $dateTypeAttr->newInstance()->type; + if (!is_string($value)) { + throw new JsonException("Unexpected non-string type for date."); + } + $value = ($dateType === Date::TYPE_DATE) + ? JsonDeserializer::deserializeDate($value) + : JsonDeserializer::deserializeDateTime($value); + } + + // Handle Array annotation + $arrayTypeAttr = $property->getAttributes(ArrayType::class)[0] ?? null; + if (is_array($value) && $arrayTypeAttr) { + $arrayType = $arrayTypeAttr->newInstance()->type; + $value = JsonDeserializer::deserializeArray($value, $arrayType); + } + + // Handle Union annotations + $unionTypeAttr = $property->getAttributes(Union::class)[0] ?? null; + if ($unionTypeAttr) { + $unionType = $unionTypeAttr->newInstance(); + $value = JsonDeserializer::deserializeUnion($value, $unionType); + } + + // Handle object + $type = $property->getType(); + if (is_array($value) && $type instanceof ReflectionNamedType && !$type->isBuiltin()) { + $value = JsonDeserializer::deserializeObject($value, $type->getName()); + } + + $args[$property->getName()] = $value; + } + + // Fill in any missing properties with defaults + foreach ($properties as $property) { + if (!isset($args[$property->getName()])) { + $args[$property->getName()] = $property->getDefaultValue() ?? null; + } + } + + // @phpstan-ignore-next-line + $result = new static($args); + $result->__additionalProperties = $additionalProperties; + return $result; + } + + /** + * Get properties from JSON that weren't mapped to class fields + * @return array + */ + public function getAdditionalProperties(): array + { + return $this->__additionalProperties; + } + + /** + * Retrieves the JSON key associated with a property. + * + * @param ReflectionProperty $property The reflection property. + * @return ?string The JSON key, or null if not available. + */ + private static function getJsonKey(ReflectionProperty $property): ?string + { + $jsonPropertyAttr = $property->getAttributes(JsonProperty::class)[0] ?? null; + return $jsonPropertyAttr?->newInstance()?->name; + } +} diff --git a/fern/sdk/src/Core/Json/JsonSerializer.php b/fern/sdk/src/Core/Json/JsonSerializer.php new file mode 100644 index 00000000..cb6e24e0 --- /dev/null +++ b/fern/sdk/src/Core/Json/JsonSerializer.php @@ -0,0 +1,197 @@ +format(Constant::DateFormat); + } + + /** + * Serializes a DateTime object into a string using the date-time format. + * Normalizes UTC times to use 'Z' suffix instead of '+00:00'. + * + * @param DateTime $date The DateTime object to serialize. + * @return string The serialized date-time string. + */ + public static function serializeDateTime(DateTime $date): string + { + $formatted = $date->format(Constant::DateTimeFormat); + if (str_ends_with($formatted, '+00:00')) { + return substr($formatted, 0, -6) . 'Z'; + } + return $formatted; + } + + /** + * Serializes an array based on type annotations (either a list or map). + * + * @param mixed[]|array $data The array to be serialized. + * @param mixed[]|array $type The type definition from the annotation. + * @return mixed[]|array The serialized array. + * @throws JsonException If serialization fails. + */ + public static function serializeArray(array $data, array $type): array + { + return Utils::isMapType($type) + ? self::serializeMap($data, $type) + : self::serializeList($data, $type); + } + + /** + * Serializes a value based on its type definition. + * + * @param mixed $data The value to serialize. + * @param mixed $type The type definition. + * @return mixed The serialized value. + * @throws JsonException If serialization fails. + */ + private static function serializeValue(mixed $data, mixed $type): mixed + { + if ($type instanceof Union) { + return self::serializeUnion($data, $type); + } + + if (is_array($type)) { + return self::serializeArray((array)$data, $type); + } + + if (gettype($type) != "string") { + throw new JsonException("Unexpected non-string type."); + } + + return self::serializeSingleValue($data, $type); + } + + /** + * Serializes a value for a union type definition. + * + * @param mixed $data The value to serialize. + * @param Union $unionType The union type definition. + * @return mixed The serialized value. + * @throws JsonException If serialization fails for all union types. + */ + public static function serializeUnion(mixed $data, Union $unionType): mixed + { + foreach ($unionType->types as $type) { + try { + return self::serializeValue($data, $type); + } catch (Exception) { + // Try the next type in the union + continue; + } + } + $readableType = Utils::getReadableType($data); + throw new JsonException( + "Cannot serialize value of type $readableType with any of the union types: " . $unionType + ); + } + + /** + * Serializes a single value based on its type. + * + * @param mixed $data The value to serialize. + * @param string $type The expected type. + * @return mixed The serialized value. + * @throws JsonException If serialization fails. + */ + private static function serializeSingleValue(mixed $data, string $type): mixed + { + if ($type === 'null' && $data === null) { + return null; + } + + if (($type === 'date' || $type === 'datetime') && $data instanceof DateTime) { + return $type === 'date' ? self::serializeDate($data) : self::serializeDateTime($data); + } + + if ($type === 'mixed') { + return $data; + } + + if (class_exists($type) && $data instanceof $type) { + return self::serializeObject($data); + } + + // Handle floats as a special case since gettype($data) returns "double" for float values in PHP. + if ($type === 'float' && is_float($data)) { + return $data; + } + + if (gettype($data) === $type) { + return $data; + } + + throw new JsonException("Unable to serialize value of type '" . gettype($data) . "' as '$type'."); + } + + /** + * Serializes an object to a JSON-serializable format. + * + * @param object $data The object to serialize. + * @return mixed The serialized data. + * @throws JsonException If the object does not implement JsonSerializable. + */ + public static function serializeObject(object $data): mixed + { + if (!is_subclass_of($data, JsonSerializable::class)) { + $type = get_class($data); + throw new JsonException("Class $type must implement JsonSerializable."); + } + return $data->jsonSerialize(); + } + + /** + * Serializes a map (associative array) with defined key and value types. + * + * @param array $data The associative array to serialize. + * @param array $type The type definition for the map. + * @return array The serialized map. + * @throws JsonException If serialization fails. + */ + private static function serializeMap(array $data, array $type): array + { + $keyType = array_key_first($type); + if ($keyType === null) { + throw new JsonException("Unexpected no key in ArrayType."); + } + $valueType = $type[$keyType]; + $result = []; + + foreach ($data as $key => $item) { + $key = Utils::castKey($key, $keyType); + $result[$key] = self::serializeValue($item, $valueType); + } + + return $result; + } + + /** + * Serializes a list (indexed array) where only the value type is defined. + * + * @param array $data The list to serialize. + * @param array $type The type definition for the list. + * @return array The serialized list. + * @throws JsonException If serialization fails. + */ + private static function serializeList(array $data, array $type): array + { + $valueType = $type[0]; + return array_map(fn ($item) => self::serializeValue($item, $valueType), $data); + } +} diff --git a/fern/sdk/src/Core/Json/Utils.php b/fern/sdk/src/Core/Json/Utils.php new file mode 100644 index 00000000..5318305f --- /dev/null +++ b/fern/sdk/src/Core/Json/Utils.php @@ -0,0 +1,61 @@ + $type The type definition from the annotation. + * @return bool True if the type is a map, false if it's a list. + */ + public static function isMapType(array $type): bool + { + return count($type) === 1 && !array_is_list($type); + } + + /** + * Casts the key to the appropriate type based on the key type. + * + * @param mixed $key The key to be cast. + * @param string $keyType The type to cast the key to ('string', 'integer', 'float'). + * @return mixed The casted key. + * @throws JsonException + */ + public static function castKey(mixed $key, string $keyType): mixed + { + if (!is_scalar($key)) { + throw new JsonException("Key must be a scalar type."); + } + return match ($keyType) { + 'integer' => (int)$key, + 'float' => (float)$key, + 'string' => (string)$key, + default => $key, + }; + } + + /** + * Returns a human-readable representation of the input's type. + * + * @param mixed $input The input value to determine the type of. + * @return string A readable description of the input type. + */ + public static function getReadableType(mixed $input): string + { + if (is_object($input)) { + return get_class($input); + } elseif (is_array($input)) { + return 'array(' . count($input) . ' items)'; + } elseif (is_null($input)) { + return 'null'; + } else { + return gettype($input); + } + } +} diff --git a/fern/sdk/src/Core/Multipart/MultipartApiRequest.php b/fern/sdk/src/Core/Multipart/MultipartApiRequest.php new file mode 100644 index 00000000..2d01b63d --- /dev/null +++ b/fern/sdk/src/Core/Multipart/MultipartApiRequest.php @@ -0,0 +1,28 @@ + $headers Additional headers for the request (optional) + * @param array $query Query parameters for the request (optional) + * @param ?MultipartFormData $body The multipart form data for the request (optional) + */ + public function __construct( + string $baseUrl, + string $path, + HttpMethod $method, + array $headers = [], + array $query = [], + public readonly ?MultipartFormData $body = null + ) { + parent::__construct($baseUrl, $path, $method, $headers, $query); + } +} diff --git a/fern/sdk/src/Core/Multipart/MultipartFormData.php b/fern/sdk/src/Core/Multipart/MultipartFormData.php new file mode 100644 index 00000000..b70d06e6 --- /dev/null +++ b/fern/sdk/src/Core/Multipart/MultipartFormData.php @@ -0,0 +1,61 @@ + + */ + private array $parts = []; + + /** + * Adds a new part to the multipart form data. + * + * @param string $name + * @param string|int|bool|float|StreamInterface $value + * @param ?string $contentType + */ + public function add( + string $name, + string|int|bool|float|StreamInterface $value, + ?string $contentType = null, + ): void { + $headers = $contentType !== null ? ['Content-Type' => $contentType] : null; + self::addPart( + new MultipartFormDataPart( + name: $name, + value: $value, + headers: $headers, + ) + ); + } + + /** + * Adds a new part to the multipart form data. + * + * @param MultipartFormDataPart $part + */ + public function addPart(MultipartFormDataPart $part): void + { + $this->parts[] = $part; + } + + /** + * Converts the multipart form data into an array suitable + * for Guzzle's multipart form data. + * + * @return array + * }> + */ + public function toArray(): array + { + return array_map(fn ($part) => $part->toArray(), $this->parts); + } +} diff --git a/fern/sdk/src/Core/Multipart/MultipartFormDataPart.php b/fern/sdk/src/Core/Multipart/MultipartFormDataPart.php new file mode 100644 index 00000000..67c29080 --- /dev/null +++ b/fern/sdk/src/Core/Multipart/MultipartFormDataPart.php @@ -0,0 +1,76 @@ + + */ + private ?array $headers; + + /** + * @param string $name + * @param string|bool|float|int|StreamInterface $value + * @param ?string $filename + * @param ?array $headers + */ + public function __construct( + string $name, + string|bool|float|int|StreamInterface $value, + ?string $filename = null, + ?array $headers = null + ) { + $this->name = $name; + $this->contents = Utils::streamFor($value); + $this->filename = $filename; + $this->headers = $headers; + } + + /** + * Converts the multipart form data part into an array suitable + * for Guzzle's multipart form data. + * + * @return array{ + * name: string, + * contents: StreamInterface, + * filename?: string, + * headers?: array + * } + */ + public function toArray(): array + { + $formData = [ + 'name' => $this->name, + 'contents' => $this->contents, + ]; + + if ($this->filename !== null) { + $formData['filename'] = $this->filename; + } + + if ($this->headers !== null) { + $formData['headers'] = $this->headers; + } + + return $formData; + } +} diff --git a/fern/sdk/src/Core/Types/ArrayType.php b/fern/sdk/src/Core/Types/ArrayType.php new file mode 100644 index 00000000..9b385637 --- /dev/null +++ b/fern/sdk/src/Core/Types/ArrayType.php @@ -0,0 +1,16 @@ + 'valueType'] for maps, or ['valueType'] for lists + */ + public function __construct(public array $type) + { + } +} diff --git a/fern/sdk/src/Core/Types/Constant.php b/fern/sdk/src/Core/Types/Constant.php new file mode 100644 index 00000000..6b377187 --- /dev/null +++ b/fern/sdk/src/Core/Types/Constant.php @@ -0,0 +1,12 @@ +> The types allowed for this property, which can be strings, arrays, or nested Union types. + */ + public array $types; + + /** + * Constructor for the Union attribute. + * + * @param string|Union|array ...$types The list of types that the property can accept. + * This can include primitive types (e.g., 'string', 'int'), arrays, or other Union instances. + * + * Example: + * ```php + * #[Union('string', 'null', 'date', new Union('boolean', 'int'))] + * ``` + */ + public function __construct(string|Union|array ...$types) + { + $this->types = $types; + } + + /** + * Converts the Union type to a string representation. + * + * @return string A string representation of the union types. + */ + public function __toString(): string + { + return implode(' | ', array_map(function ($type) { + if (is_string($type)) { + return $type; + } elseif ($type instanceof Union) { + return (string) $type; // Recursively handle nested unions + } elseif (is_array($type)) { + return 'array'; // Handle arrays + } + }, $this->types)); + } +} diff --git a/fern/sdk/src/Currency/CurrencyClient.php b/fern/sdk/src/Currency/CurrencyClient.php new file mode 100644 index 00000000..c758b3d7 --- /dev/null +++ b/fern/sdk/src/Currency/CurrencyClient.php @@ -0,0 +1,106 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Retrieves a list of supported currencies and their exchange rates relative to the account credit currency. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return CurrencyCurrencies + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listCurrencies(?array $options = null): CurrencyCurrencies + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/currency", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return CurrencyCurrencies::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Database/DatabaseClient.php b/fern/sdk/src/Database/DatabaseClient.php new file mode 100644 index 00000000..87748c70 --- /dev/null +++ b/fern/sdk/src/Database/DatabaseClient.php @@ -0,0 +1,4026 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Returns a list of available database types. Contains available legacy plans, zones, database versions supported and the configuration properties for each database. PostgreSQL and MySQL componentised (rdb.*) plans are selected with the plan_* request fields instead of a listed plan name. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listDatabaseTypes(?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/service-types", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, ['string' => DatabaseServiceTypeResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Lists available componentised database plans + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabasePlansResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listDatabasePlans(?array $options = null): DatabasePlansResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/plans", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabasePlansResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns database type details by given {database_type}. Contains available legacy plans, zones, database versions supported and configuration properties. PostgreSQL and MySQL componentised (rdb.*) plans are selected with the plan_* request fields instead of a listed plan name. + * + * @param value-of $serviceTypeName Service type parameter + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseServiceTypeResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseType(string $serviceTypeName, ?array $options = null): DatabaseServiceTypeResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/service-types/{$serviceTypeName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseServiceTypeResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of all available Managed Database services. Depending on their database type, Managed Databases services will have different details. + * + * @param ListDatabasesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listDatabases(ListDatabasesRequest $request = new ListDatabasesRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [DatabaseServiceInformationResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new Managed Database instance. New databases are started by default. An initial backup is created automatically on startup and the API will be fully functional only after this backup has been created. The creation might take a while. Note that different databases have different properties that can be passed on creation. For PostgreSQL and MySQL, select the plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines. + * + * @param DatabaseServiceCreateOpenApi $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseServiceInformationResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createDatabase(DatabaseServiceCreateOpenApi $request, ?array $options = null): DatabaseServiceInformationResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseServiceInformationResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns details of a Managed Database service by its {uuid}. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseServiceInformationResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabase(string $uuid, ?array $options = null): DatabaseServiceInformationResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseServiceInformationResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a specified Managed Database. All data will be erased and lost, including backups. If the service is not powered off, it will be powered off before deletion. The state of the service can be anything. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteDatabase(string $uuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies Managed Database service details by its {uuid} including upgrading plans, migration to other zones and database type-specific configurations. For PostgreSQL and MySQL, change the plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines. + * + * @param string $uuid Service UUID + * @param DatabaseServiceModifyOpenApi $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseServiceInformationResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyDatabase(string $uuid, DatabaseServiceModifyOpenApi $request = new DatabaseServiceModifyOpenApi(), ?array $options = null): DatabaseServiceInformationResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseServiceInformationResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Update a service's type by the given {service-uuid}. + * + * @param string $uuid Service UUID + * @param DatabaseServiceTypeModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseServiceInformationResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyDatabaseType(string $uuid, DatabaseServiceTypeModify $request, ?array $options = null): DatabaseServiceInformationResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/service-type", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseServiceInformationResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a clone of a Managed Database service based on its {uuid}. It is possible to change location, plans and use the point in time feature to clone your service at a specific time using your backups. For PostgreSQL and MySQL, select the clone's plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines. + * + * @param string $uuid Service UUID + * @param CloneDatabaseRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseServiceInformationResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function cloneDatabase(string $uuid, CloneDatabaseRequest $request, ?array $options = null): DatabaseServiceInformationResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/clone", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseServiceInformationResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of attached SDN networks to a Managed Database service by its {uuid}. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listDatabaseNetworks(string $uuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/networks", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [DatabaseNetworkInformationDetailsResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Attaches an SDN network to a Managed Database service by its {uuid}. + * + * @param string $uuid Service UUID + * @param CreateDatabaseNetworkRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseNetworkInformationDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createDatabaseNetwork(string $uuid, CreateDatabaseNetworkRequest $request, ?array $options = null): DatabaseNetworkInformationDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/networks", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseNetworkInformationDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns the attached SDN network details to service by its {uuid} and {network_name}. + * + * @param string $uuid Service UUID + * @param string $networkName Network UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseNetworkInformationDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseNetwork(string $uuid, string $networkName, ?array $options = null): DatabaseNetworkInformationDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/networks/{$networkName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseNetworkInformationDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Detaches an existing SDN network from a Managed Database service by its {uuid} and {network_name}. + * + * @param string $uuid Service UUID + * @param string $networkName Network UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteDatabaseNetwork(string $uuid, string $networkName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/networks/{$networkName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Upgrades your PostgreSQL Managed Database service database to a newer major version. Downgrades are not permitted. + * + * @param string $uuid Service UUID + * @param DatabaseServiceUpgrade $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseServiceInformationResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function upgradeDatabase(string $uuid, DatabaseServiceUpgrade $request, ?array $options = null): DatabaseServiceInformationResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/upgrade", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseServiceInformationResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available service labels by given {service_uuid}. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listDatabaseLabels(string $uuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/labels", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [DatabaseLabelResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new label by given {service_uuid}. Labels used for service filtering. + * + * @param string $uuid Service UUID + * @param CreateDatabaseLabelRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseLabelResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createDatabaseLabel(string $uuid, CreateDatabaseLabelRequest $request, ?array $options = null): DatabaseLabelResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/labels", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseLabelResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns label details by given {service_uuid} and {key}. + * + * @param string $uuid Service UUID + * @param string $labelKey Label ID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseLabelResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseLabel(string $uuid, string $labelKey, ?array $options = null): DatabaseLabelResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/labels/{$labelKey}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseLabelResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing label by given {service_uuid} and {key}. + * + * @param string $uuid Service UUID + * @param string $labelKey Label ID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteDatabaseLabel(string $uuid, string $labelKey, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/labels/{$labelKey}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing label by given {service_uuid} and {key}. + * + * @param string $uuid Service UUID + * @param string $labelKey Label ID + * @param DatabaseLabelModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseLabelResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyDatabaseLabel(string $uuid, string $labelKey, DatabaseLabelModify $request = new DatabaseLabelModify(), ?array $options = null): DatabaseLabelResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/labels/{$labelKey}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseLabelResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available PostgreSQL extensions for the Managed Database service by its {service-uuid}. Only supported for PostgreSQL services. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseAvailableExtensions(string $uuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/available-extensions", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [DatabaseAvailableExtensionsResponseItem::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available PostgreSQL extensions grouped by PostgreSQL version. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getPgAvailableExtensions(?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/pg/available-extensions", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [DatabasePgAvailableExtensionsResponseItem::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of supported Managed Database service versions. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseTypeVersions(?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/versions", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [DatabaseVersionsResponseItem::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Return access controls settings for the OpenSearch Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseAccessControlSettingsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseAccessControl(string $uuid, ?array $options = null): DatabaseAccessControlSettingsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/access-control", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseAccessControlSettingsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies the user {username} access control for the Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param DatabaseServiceAclModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseAccessControlSettingsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyDatabaseAccessControl(string $uuid, DatabaseServiceAclModify $request = new DatabaseServiceAclModify(), ?array $options = null): DatabaseAccessControlSettingsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/access-control", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseAccessControlSettingsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns Security management status for the OpenSearch Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseOpenSearchSecurityPluginStatusResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseSecurity(string $uuid, ?array $options = null): DatabaseOpenSearchSecurityPluginStatusResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/security", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseOpenSearchSecurityPluginStatusResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Enables Security management admin for the OpenSearch Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param DatabaseServiceSecurityEnable $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseOpenSearchSecurityPluginStatusResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function enableDatabaseSecurityAdmin(string $uuid, DatabaseServiceSecurityEnable $request, ?array $options = null): DatabaseOpenSearchSecurityPluginStatusResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/security/admin", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseOpenSearchSecurityPluginStatusResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies Security management admin password for the OpenSearch Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param DatabaseServiceSecurityModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseOpenSearchSecurityPluginStatusResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyDatabaseSecurityAdmin(string $uuid, DatabaseServiceSecurityModify $request, ?array $options = null): DatabaseOpenSearchSecurityPluginStatusResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/security/admin", + method: HttpMethod::PUT, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseOpenSearchSecurityPluginStatusResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available integration endpoints. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listDatabaseIntegrationEndpoints(?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/integration-endpoints", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [DatabaseIntegrationEndpointResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new integration endpoint. + * + * @param DatabaseIntegrationEndpointCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseIntegrationEndpointResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createDatabaseIntegrationEndpoint(DatabaseIntegrationEndpointCreate $request, ?array $options = null): DatabaseIntegrationEndpointResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/integration-endpoints", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseIntegrationEndpointResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns integration endpoint details by given {integration-uuid}. + * + * @param string $integrationUuid Integration UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseIntegrationEndpointResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseIntegrationEndpoint(string $integrationUuid, ?array $options = null): DatabaseIntegrationEndpointResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/integration-endpoints/{$integrationUuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseIntegrationEndpointResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing integration endpoint by given {integration-uuid}. + * + * @param string $integrationUuid Integration UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteDatabaseIntegrationEndpoint(string $integrationUuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/integration-endpoints/{$integrationUuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing integration endpoint by given {integration-uuid}. + * + * @param string $integrationUuid Integration UUID + * @param DatabaseIntegrationEndpointModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseIntegrationEndpointResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyDatabaseIntegrationEndpoint(string $integrationUuid, DatabaseIntegrationEndpointModify $request = new DatabaseIntegrationEndpointModify(), ?array $options = null): DatabaseIntegrationEndpointResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/integration-endpoints/{$integrationUuid}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseIntegrationEndpointResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns the CA certificate. Every customer main account has a private Certificate Authority (CA) that signs certificates for internal use. Managed Database service types, such as PostgreSQL, use it for external connections. To access these services, you must download and configure the certificate on your browser or client. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseAccountCaResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseAccountCa(?array $options = null): DatabaseAccountCaResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/certificate", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseAccountCaResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns all the alerts associated with your Managed Database services. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listDatabaseAlerts(?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/alerts", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [DatabaseProjectAlertResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Get a service's status by the given {service-uuid}. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseServiceStatusResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseStatus(string $uuid, ?array $options = null): DatabaseServiceStatusResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/status", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseServiceStatusResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns available versions of the Managed Database service by its {uuid}. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseVersions(string $uuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/versions", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, ['string']); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Start maintenance updates for your Managed Database service if any updates are pending. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseUpCloudApiResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function startDatabaseManualMaintenance(string $uuid, ?array $options = null): DatabaseUpCloudApiResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/start-maintenance", + method: HttpMethod::PUT, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseUpCloudApiResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Enable temporary writes by the given {service-uuid}. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseUpCloudApiResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function enableDatabaseTemporaryWrites(string $uuid, ?array $options = null): DatabaseUpCloudApiResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/enable-writes", + method: HttpMethod::POST, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseUpCloudApiResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns details about the migration progress over time of a Managed database service by its {uuid}. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseServiceMigrationStatusResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseMigrationStatus(string $uuid, ?array $options = null): DatabaseServiceMigrationStatusResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/migration-status", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseServiceMigrationStatusResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns alerts for Managed Database service identified by `{uuid}`. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseAlerts(string $uuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/alerts", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [DatabaseServiceAlertResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns metrics related to a Managed Database service by its {uuid} and query parameter {period}. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseMetrics(string $uuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/metrics", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, ['string' => DatabaseMetricsItemResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of query statistics for the Managed Database service by its {uuid} and optional query parameters {limit}, {offset} and {order}. Query statistics will differ depending on the database type. + * + * @param string $uuid Service UUID + * @param GetDatabaseQueryStatisticsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseQueryStatisticsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseQueryStatistics(string $uuid, GetDatabaseQueryStatisticsRequest $request = new GetDatabaseQueryStatisticsRequest(), ?array $options = null): DatabaseQueryStatisticsResponse + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + if ($request->order !== null) { + $query['order'] = $request->order; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/query-statistics", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseQueryStatisticsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns Managed Database service system-level logs by its {uuid} and optional query parameters {limit}, {offset} and {order}. + * + * @param string $uuid Service UUID + * @param GetDatabaseLogsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseLogListResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseLogs(string $uuid, GetDatabaseLogsRequest $request = new GetDatabaseLogsRequest(), ?array $options = null): DatabaseLogListResponse + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + if ($request->order !== null) { + $query['order'] = $request->order; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/logs", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseLogListResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available connection pools for a Managed Database service. Connection pools are available only for PostgreSQL database services. + * + * @param string $uuid Service UUID + * @param ListDatabaseConnectionPoolsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listDatabaseConnectionPools(string $uuid, ListDatabaseConnectionPoolsRequest $request = new ListDatabaseConnectionPoolsRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/connection-pools", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [DatabaseConnectionPoolResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a connection pool for the Managed Database service {uuid}. Connection pool endpoints are for PostgreSQL Managed Databases only. + * + * @param string $uuid Service UUID + * @param DatabaseConnectionPoolCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseConnectionPoolResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createDatabaseConnectionPool(string $uuid, DatabaseConnectionPoolCreate $request, ?array $options = null): DatabaseConnectionPoolResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/connection-pools", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseConnectionPoolResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns the connection pool {pool-name} details for the Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param string $poolName Connection Pool Name + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseConnectionPoolResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseConnectionPool(string $uuid, string $poolName, ?array $options = null): DatabaseConnectionPoolResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/connection-pools/{$poolName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseConnectionPoolResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes the connection pool {pool-name} for the Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param string $poolName Connection Pool Name + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteDatabaseConnectionPool(string $uuid, string $poolName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/connection-pools/{$poolName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies the connection pool {pool-name} for the Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param string $poolName Connection Pool Name + * @param DatabaseConnectionPoolModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseConnectionPoolResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyDatabaseConnectionPool(string $uuid, string $poolName, DatabaseConnectionPoolModify $request = new DatabaseConnectionPoolModify(), ?array $options = null): DatabaseConnectionPoolResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/connection-pools/{$poolName}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseConnectionPoolResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available indices for a Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listDatabaseIndices(string $uuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/indices", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [DatabaseIndexResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes the index {index_name} for the Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param string $indexName OpenSearch Index Name + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteDatabaseIndex(string $uuid, string $indexName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/indices/{$indexName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available service integrations by given {service-uuid}. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listDatabaseIntegrations(string $uuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/integrations", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [DatabaseServiceIntegrationResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new integration by given {service-uuid}. + * + * @param string $uuid Service UUID + * @param CreateDatabaseIntegrationRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseServiceIntegrationResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createDatabaseIntegration(string $uuid, CreateDatabaseIntegrationRequest $request, ?array $options = null): DatabaseServiceIntegrationResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/integrations", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseServiceIntegrationResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns integration details by given {service-uuid} and {integration-uuid}. + * + * @param string $uuid Service UUID + * @param string $integrationUuid Integration UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseServiceIntegrationResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseIntegration(string $uuid, string $integrationUuid, ?array $options = null): DatabaseServiceIntegrationResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/integrations/{$integrationUuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseServiceIntegrationResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing integration by given {service-uuid} and {integration-uuid}. + * + * @param string $uuid Service UUID + * @param string $integrationUuid Integration UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteDatabaseIntegration(string $uuid, string $integrationUuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/integrations/{$integrationUuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing integration by given {service-uuid} and {integration-uuid}. + * + * @param string $uuid Service UUID + * @param string $integrationUuid Integration UUID + * @param DatabaseServiceIntegrationModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseServiceIntegrationResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyDatabaseIntegration(string $uuid, string $integrationUuid, DatabaseServiceIntegrationModify $request = new DatabaseServiceIntegrationModify(), ?array $options = null): DatabaseServiceIntegrationResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/integrations/{$integrationUuid}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseServiceIntegrationResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of logical databases for a Managed Database service identified by {uuid}. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listDatabaseLogicalDatabases(string $uuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/databases", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LogicalDatabaseResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new logical database for the Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param LogicalDatabaseCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LogicalDatabaseResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createDatabaseLogicalDatabase(string $uuid, LogicalDatabaseCreate $request, ?array $options = null): LogicalDatabaseResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/databases", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LogicalDatabaseResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes the logical database {database_name} from the Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param string $databaseName Database name + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteDatabaseLogicalDatabase(string $uuid, string $databaseName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/databases/{$databaseName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns networks peering status for a service by its {uuid}. Only available for services using SDN private networks. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseServiceNetworkDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabasePeeringsStatus(string $uuid, ?array $options = null): DatabaseServiceNetworkDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/peering-status", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseServiceNetworkDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of current sessions details for your Managed Database service by its {uuid} and optional query parameters {limit}, {offset} and {order}. + * + * @param string $uuid Service UUID + * @param GetDatabaseSessionsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseCurrentSessionsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseSessions(string $uuid, GetDatabaseSessionsRequest $request = new GetDatabaseSessionsRequest(), ?array $options = null): DatabaseCurrentSessionsResponse + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + if ($request->order !== null) { + $query['order'] = $request->order; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/sessions", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseCurrentSessionsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Terminates a sessions or kills a running query for a Managed Database service by its {uuid}, session {pid} and optional query parameter {terminate}. + * + * @param string $uuid Service UUID + * @param int $pid Session PID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function terminateDatabaseSession(string $uuid, int $pid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/sessions/{$pid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a task that checks for potential errors before starting a migration or upgrade for a Managed Database service by its {uuid}. + * + * @param string $uuid Service UUID + * @param DatabaseServiceTaskCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseServiceTaskResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createDatabaseTask(string $uuid, DatabaseServiceTaskCreate $request, ?array $options = null): DatabaseServiceTaskResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/tasks", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseServiceTaskResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns task details of a Managed Database service by its {uuid} and the task {id} obtained from Create Managed Database task. + * + * @param string $uuid Service UUID + * @param int $taskId Task ID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseServiceTaskDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseTask(string $uuid, int $taskId, ?array $options = null): DatabaseServiceTaskDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/tasks/{$taskId}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseServiceTaskDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of database users associated with the Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listDatabaseUsers(string $uuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/users", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [DatabaseUserResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new user for the Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param DatabaseServiceUserCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseUserResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createDatabaseUser(string $uuid, DatabaseServiceUserCreate $request, ?array $options = null): DatabaseUserResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/users", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseUserResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns the user {username} details for the Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param string $username Username identifier + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseUserResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDatabaseUser(string $uuid, string $username, ?array $options = null): DatabaseUserResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/users/{$username}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseUserResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes the user {username} from the Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param string $username Username identifier + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteDatabaseUser(string $uuid, string $username, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/users/{$username}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies the user {username} details for the Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param string $username Username identifier + * @param DatabaseServiceUserModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseUserResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyDatabaseUser(string $uuid, string $username, DatabaseServiceUserModify $request = new DatabaseServiceUserModify(), ?array $options = null): DatabaseUserResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/users/{$username}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseUserResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Return access controls settings for the OpenSearch Managed Database service {uuid}. + * + * @param string $uuid Service UUID + * @param string $username Username identifier + * @param DatabaseServiceUserAclModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DatabaseUserResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyDatabaseUserAccessControl(string $uuid, string $username, DatabaseServiceUserAclModify $request = new DatabaseServiceUserAclModify(), ?array $options = null): DatabaseUserResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/database/{$uuid}/users/{$username}/access-control", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DatabaseUserResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Database/Requests/CloneDatabaseRequest.php b/fern/sdk/src/Database/Requests/CloneDatabaseRequest.php new file mode 100644 index 00000000..abd931fa --- /dev/null +++ b/fern/sdk/src/Database/Requests/CloneDatabaseRequest.php @@ -0,0 +1,41 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/Database/Requests/CreateDatabaseIntegrationRequest.php b/fern/sdk/src/Database/Requests/CreateDatabaseIntegrationRequest.php new file mode 100644 index 00000000..dc0c574b --- /dev/null +++ b/fern/sdk/src/Database/Requests/CreateDatabaseIntegrationRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/Database/Requests/CreateDatabaseLabelRequest.php b/fern/sdk/src/Database/Requests/CreateDatabaseLabelRequest.php new file mode 100644 index 00000000..6b900212 --- /dev/null +++ b/fern/sdk/src/Database/Requests/CreateDatabaseLabelRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/Database/Requests/CreateDatabaseNetworkRequest.php b/fern/sdk/src/Database/Requests/CreateDatabaseNetworkRequest.php new file mode 100644 index 00000000..09046526 --- /dev/null +++ b/fern/sdk/src/Database/Requests/CreateDatabaseNetworkRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseConnectionPoolCreate.php b/fern/sdk/src/Database/Requests/DatabaseConnectionPoolCreate.php new file mode 100644 index 00000000..25ba35d5 --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseConnectionPoolCreate.php @@ -0,0 +1,59 @@ + $poolMode Connection Pool mode + */ + #[JsonProperty('pool_mode')] + public string $poolMode; + + /** + * @var string $poolName Connection Pool name + */ + #[JsonProperty('pool_name')] + public string $poolName; + + /** + * @var int $poolSize Connection Pool size + */ + #[JsonProperty('pool_size')] + public int $poolSize; + + /** + * @var ?string $username Connection Pool username + */ + #[JsonProperty('username')] + public ?string $username; + + /** + * @param array{ + * database: string, + * poolMode: value-of, + * poolName: string, + * poolSize: int, + * username?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->database = $values['database']; + $this->poolMode = $values['poolMode']; + $this->poolName = $values['poolName']; + $this->poolSize = $values['poolSize']; + $this->username = $values['username'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseConnectionPoolModify.php b/fern/sdk/src/Database/Requests/DatabaseConnectionPoolModify.php new file mode 100644 index 00000000..257d48cd --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseConnectionPoolModify.php @@ -0,0 +1,51 @@ + $poolMode Connection Pool mode + */ + #[JsonProperty('pool_mode')] + public ?string $poolMode; + + /** + * @var ?int $poolSize Connection Pool size + */ + #[JsonProperty('pool_size')] + public ?int $poolSize; + + /** + * @var ?string $username Connection Pool username + */ + #[JsonProperty('username')] + public ?string $username; + + /** + * @param array{ + * database?: ?string, + * poolMode?: ?value-of, + * poolSize?: ?int, + * username?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->database = $values['database'] ?? null; + $this->poolMode = $values['poolMode'] ?? null; + $this->poolSize = $values['poolSize'] ?? null; + $this->username = $values['username'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseIntegrationEndpointCreate.php b/fern/sdk/src/Database/Requests/DatabaseIntegrationEndpointCreate.php new file mode 100644 index 00000000..d556462e --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseIntegrationEndpointCreate.php @@ -0,0 +1,44 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var string $name The name of the integration endpoint. + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var ?array $properties A key-value map of properties specific to the integration endpoint type. + */ + #[JsonProperty('properties'), ArrayType(['string' => 'mixed'])] + public ?array $properties; + + /** + * @param array{ + * type: value-of, + * name: string, + * properties?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->name = $values['name']; + $this->properties = $values['properties'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseIntegrationEndpointModify.php b/fern/sdk/src/Database/Requests/DatabaseIntegrationEndpointModify.php new file mode 100644 index 00000000..bc830b11 --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseIntegrationEndpointModify.php @@ -0,0 +1,27 @@ + $properties + */ + #[JsonProperty('properties'), ArrayType(['string' => 'mixed'])] + public ?array $properties; + + /** + * @param array{ + * properties?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->properties = $values['properties'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseLabelModify.php b/fern/sdk/src/Database/Requests/DatabaseLabelModify.php new file mode 100644 index 00000000..8eef9515 --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseLabelModify.php @@ -0,0 +1,34 @@ +key = $values['key'] ?? null; + $this->value = $values['value'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseServiceAclModify.php b/fern/sdk/src/Database/Requests/DatabaseServiceAclModify.php new file mode 100644 index 00000000..2a129b63 --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseServiceAclModify.php @@ -0,0 +1,34 @@ +accessControl = $values['accessControl'] ?? null; + $this->extendedAccessControl = $values['extendedAccessControl'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseServiceCreateOpenApi.php b/fern/sdk/src/Database/Requests/DatabaseServiceCreateOpenApi.php new file mode 100644 index 00000000..6965f122 --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseServiceCreateOpenApi.php @@ -0,0 +1,179 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var string $zone Zone where the service is created. + */ + #[JsonProperty('zone')] + public string $zone; + + /** + * @var ?string $setServiceUuid Optional UUID to assign to the created service. + */ + #[JsonProperty('set_service_uuid')] + public ?string $setServiceUuid; + + /** + * @var ?string $plan Deprecated: prefer the plan_* selection fields (plan_compute, plan_node_count, plan_storage_gib, plan_backups) for PostgreSQL and MySQL. The plan name remains supported, and required for engines without componentised plans. For componentised (rdb.*) plans the storage segment is the desired TOTAL storage per node: any total reachable from a catalog plan's included storage in the plan's storage steps (within its cap) is a valid plan name, e.g. rdb.standard.2x-2CPU-8GB-120GB-regular selects the 80GB catalog plan with a 40GB dynamic top-up. + */ + #[JsonProperty('plan')] + public ?string $plan; + + /** + * @var ?string $planCompute Plan selection: compute shape combining family, CPU and memory as one token, as listed in the plan catalog components. PostgreSQL and MySQL only. + */ + #[JsonProperty('plan_compute')] + public ?string $planCompute; + + /** + * @var ?int $planNodeCount Plan selection: number of nodes. + */ + #[JsonProperty('plan_node_count')] + public ?int $planNodeCount; + + /** + * @var ?int $planStorageGib Plan selection: desired TOTAL storage per node in GiB. Resolution picks the plan whose included storage matches, or tops the closest plan up with dynamic additional storage within the allowed limits. Mutually exclusive with additional_disk_space_gib. + */ + #[JsonProperty('plan_storage_gib')] + public ?int $planStorageGib; + + /** + * @var ?value-of $planBackups Plan selection: backup tier. PostgreSQL and MySQL tiered plans only. + */ + #[JsonProperty('plan_backups')] + public ?string $planBackups; + + /** + * @var ?int $additionalDiskSpaceGib Additional disk space in GiB. Legacy plans only: componentised (rdb.*) plans set storage as a total via plan_storage_gib or the plan name. + */ + #[JsonProperty('additional_disk_space_gib')] + public ?int $additionalDiskSpaceGib; + + /** + * @var ?bool $terminationProtection When enabled, the service cannot be deleted until termination protection is disabled. + */ + #[JsonProperty('termination_protection')] + public ?bool $terminationProtection; + + /** + * @var ?DatabaseServiceCreateOpenApiMaintenance $maintenance Weekly maintenance window. + */ + #[JsonProperty('maintenance')] + public ?DatabaseServiceCreateOpenApiMaintenance $maintenance; + + /** + * @var ?array $networks SDN networks to attach to the service. + */ + #[JsonProperty('networks'), ArrayType([DatabaseNetworkCreate::class])] + public ?array $networks; + + /** + * @var ?array $labels Labels used for service filtering. + */ + #[JsonProperty('labels'), ArrayType([DatabaseLabelCreate::class])] + public ?array $labels; + + /** + * @var ?array $serviceIntegrations Service integrations to configure on creation. + */ + #[JsonProperty('service_integrations'), ArrayType([DatabaseServiceIntegrationCreate::class])] + public ?array $serviceIntegrations; + + /** + * @var ( + * DatabaseServicePropertiesMysql + * |DatabaseServicePropertiesPg + * |DatabaseServicePropertiesRedis + * |DatabaseServicePropertiesOpensearch + * |DatabaseServicePropertiesValkey + * )|null $properties Engine-specific configuration properties. The allowed keys depend on the selected service type; provide the property set matching the chosen type. + */ + #[JsonProperty('properties'), Union(DatabaseServicePropertiesMysql::class, DatabaseServicePropertiesPg::class, DatabaseServicePropertiesRedis::class, DatabaseServicePropertiesOpensearch::class, DatabaseServicePropertiesValkey::class, 'null')] + public DatabaseServicePropertiesMysql|DatabaseServicePropertiesPg|DatabaseServicePropertiesRedis|DatabaseServicePropertiesOpensearch|DatabaseServicePropertiesValkey|null $properties; + + /** + * @param array{ + * hostnamePrefix: string, + * title: string, + * type: value-of, + * zone: string, + * setServiceUuid?: ?string, + * plan?: ?string, + * planCompute?: ?string, + * planNodeCount?: ?int, + * planStorageGib?: ?int, + * planBackups?: ?value-of, + * additionalDiskSpaceGib?: ?int, + * terminationProtection?: ?bool, + * maintenance?: ?DatabaseServiceCreateOpenApiMaintenance, + * networks?: ?array, + * labels?: ?array, + * serviceIntegrations?: ?array, + * properties?: ( + * DatabaseServicePropertiesMysql + * |DatabaseServicePropertiesPg + * |DatabaseServicePropertiesRedis + * |DatabaseServicePropertiesOpensearch + * |DatabaseServicePropertiesValkey + * )|null, + * } $values + */ + public function __construct( + array $values, + ) { + $this->hostnamePrefix = $values['hostnamePrefix']; + $this->title = $values['title']; + $this->type = $values['type']; + $this->zone = $values['zone']; + $this->setServiceUuid = $values['setServiceUuid'] ?? null; + $this->plan = $values['plan'] ?? null; + $this->planCompute = $values['planCompute'] ?? null; + $this->planNodeCount = $values['planNodeCount'] ?? null; + $this->planStorageGib = $values['planStorageGib'] ?? null; + $this->planBackups = $values['planBackups'] ?? null; + $this->additionalDiskSpaceGib = $values['additionalDiskSpaceGib'] ?? null; + $this->terminationProtection = $values['terminationProtection'] ?? null; + $this->maintenance = $values['maintenance'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->serviceIntegrations = $values['serviceIntegrations'] ?? null; + $this->properties = $values['properties'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseServiceIntegrationModify.php b/fern/sdk/src/Database/Requests/DatabaseServiceIntegrationModify.php new file mode 100644 index 00000000..856c11a4 --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseServiceIntegrationModify.php @@ -0,0 +1,27 @@ + $properties + */ + #[JsonProperty('properties'), ArrayType(['string' => 'mixed'])] + public ?array $properties; + + /** + * @param array{ + * properties?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->properties = $values['properties'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseServiceModifyOpenApi.php b/fern/sdk/src/Database/Requests/DatabaseServiceModifyOpenApi.php new file mode 100644 index 00000000..a9beb8e9 --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseServiceModifyOpenApi.php @@ -0,0 +1,162 @@ + $type + */ + #[JsonProperty('type')] + public ?string $type; + + /** + * @var ?bool $powered Desired power state of the service. + */ + #[JsonProperty('powered')] + public ?bool $powered; + + /** + * @var ?string $zone Zone to migrate the service to. + */ + #[JsonProperty('zone')] + public ?string $zone; + + /** + * @var ?string $plan Deprecated: prefer the plan_* selection fields (plan_compute, plan_node_count, plan_storage_gib, plan_backups) for PostgreSQL and MySQL. The plan name remains supported, and required for engines without componentised plans. For componentised (rdb.*) plans the storage segment is the desired TOTAL storage per node: any total reachable from a catalog plan's included storage in the plan's storage steps (within its cap) is a valid plan name, e.g. rdb.standard.2x-2CPU-8GB-120GB-regular selects the 80GB catalog plan with a 40GB dynamic top-up. + */ + #[JsonProperty('plan')] + public ?string $plan; + + /** + * @var ?string $planCompute Plan selection: compute shape combining family, CPU and memory as one token, as listed in the plan catalog components. PostgreSQL and MySQL only. + */ + #[JsonProperty('plan_compute')] + public ?string $planCompute; + + /** + * @var ?int $planNodeCount Plan selection: number of nodes. + */ + #[JsonProperty('plan_node_count')] + public ?int $planNodeCount; + + /** + * @var ?int $planStorageGib Plan selection: desired TOTAL storage per node in GiB. Resolution picks the plan whose included storage matches, or tops the closest plan up with dynamic additional storage within the allowed limits. Mutually exclusive with additional_disk_space_gib. + */ + #[JsonProperty('plan_storage_gib')] + public ?int $planStorageGib; + + /** + * @var ?value-of $planBackups Plan selection: backup tier. PostgreSQL and MySQL tiered plans only. + */ + #[JsonProperty('plan_backups')] + public ?string $planBackups; + + /** + * @var ?int $additionalDiskSpaceGib Additional disk space in GiB. Legacy plans only: componentised (rdb.*) plans set storage as a total via plan_storage_gib or the plan name. + */ + #[JsonProperty('additional_disk_space_gib')] + public ?int $additionalDiskSpaceGib; + + /** + * @var ?bool $terminationProtection When enabled, the service cannot be deleted until termination protection is disabled. + */ + #[JsonProperty('termination_protection')] + public ?bool $terminationProtection; + + /** + * @var ?DatabaseServiceModifyOpenApiMaintenance $maintenance Weekly maintenance window. + */ + #[JsonProperty('maintenance')] + public ?DatabaseServiceModifyOpenApiMaintenance $maintenance; + + /** + * @var ?array $networks SDN networks attached to the service. + */ + #[JsonProperty('networks'), ArrayType([DatabaseNetworkCreate::class])] + public ?array $networks; + + /** + * @var ?array $labels Labels used for service filtering. + */ + #[JsonProperty('labels'), ArrayType([DatabaseLabelCreate::class])] + public ?array $labels; + + /** + * @var ( + * DatabaseServicePropertiesMysql + * |DatabaseServicePropertiesPg + * |DatabaseServicePropertiesRedis + * |DatabaseServicePropertiesOpensearch + * |DatabaseServicePropertiesValkey + * )|null $properties Engine-specific configuration properties. The allowed keys depend on the service type; provide the property set matching the service's type. + */ + #[JsonProperty('properties'), Union(DatabaseServicePropertiesMysql::class, DatabaseServicePropertiesPg::class, DatabaseServicePropertiesRedis::class, DatabaseServicePropertiesOpensearch::class, DatabaseServicePropertiesValkey::class, 'null')] + public DatabaseServicePropertiesMysql|DatabaseServicePropertiesPg|DatabaseServicePropertiesRedis|DatabaseServicePropertiesOpensearch|DatabaseServicePropertiesValkey|null $properties; + + /** + * @param array{ + * title?: ?string, + * type?: ?value-of, + * powered?: ?bool, + * zone?: ?string, + * plan?: ?string, + * planCompute?: ?string, + * planNodeCount?: ?int, + * planStorageGib?: ?int, + * planBackups?: ?value-of, + * additionalDiskSpaceGib?: ?int, + * terminationProtection?: ?bool, + * maintenance?: ?DatabaseServiceModifyOpenApiMaintenance, + * networks?: ?array, + * labels?: ?array, + * properties?: ( + * DatabaseServicePropertiesMysql + * |DatabaseServicePropertiesPg + * |DatabaseServicePropertiesRedis + * |DatabaseServicePropertiesOpensearch + * |DatabaseServicePropertiesValkey + * )|null, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->title = $values['title'] ?? null; + $this->type = $values['type'] ?? null; + $this->powered = $values['powered'] ?? null; + $this->zone = $values['zone'] ?? null; + $this->plan = $values['plan'] ?? null; + $this->planCompute = $values['planCompute'] ?? null; + $this->planNodeCount = $values['planNodeCount'] ?? null; + $this->planStorageGib = $values['planStorageGib'] ?? null; + $this->planBackups = $values['planBackups'] ?? null; + $this->additionalDiskSpaceGib = $values['additionalDiskSpaceGib'] ?? null; + $this->terminationProtection = $values['terminationProtection'] ?? null; + $this->maintenance = $values['maintenance'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->properties = $values['properties'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseServiceSecurityEnable.php b/fern/sdk/src/Database/Requests/DatabaseServiceSecurityEnable.php new file mode 100644 index 00000000..1c3593ef --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseServiceSecurityEnable.php @@ -0,0 +1,26 @@ +adminPassword = $values['adminPassword']; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseServiceSecurityModify.php b/fern/sdk/src/Database/Requests/DatabaseServiceSecurityModify.php new file mode 100644 index 00000000..583b44c5 --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseServiceSecurityModify.php @@ -0,0 +1,34 @@ +adminPassword = $values['adminPassword']; + $this->newPassword = $values['newPassword']; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseServiceTaskCreate.php b/fern/sdk/src/Database/Requests/DatabaseServiceTaskCreate.php new file mode 100644 index 00000000..716a9307 --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseServiceTaskCreate.php @@ -0,0 +1,61 @@ +datasetImport = $values['datasetImport'] ?? null; + $this->migrationCheck = $values['migrationCheck'] ?? null; + $this->upgradeCheck = $values['upgradeCheck'] ?? null; + $this->targetVersion = $values['targetVersion'] ?? null; + $this->operation = $values['operation']; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseServiceTypeModify.php b/fern/sdk/src/Database/Requests/DatabaseServiceTypeModify.php new file mode 100644 index 00000000..41f8cf97 --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseServiceTypeModify.php @@ -0,0 +1,26 @@ +targetType = $values['targetType']; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseServiceUpgrade.php b/fern/sdk/src/Database/Requests/DatabaseServiceUpgrade.php new file mode 100644 index 00000000..1c7e32f4 --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseServiceUpgrade.php @@ -0,0 +1,26 @@ +targetVersion = $values['targetVersion']; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseServiceUserAclModify.php b/fern/sdk/src/Database/Requests/DatabaseServiceUserAclModify.php new file mode 100644 index 00000000..dd02d99a --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseServiceUserAclModify.php @@ -0,0 +1,54 @@ +redisAccessControl = $values['redisAccessControl'] ?? null; + $this->pgAccessControl = $values['pgAccessControl'] ?? null; + $this->opensearchAccessControl = $values['opensearchAccessControl'] ?? null; + $this->valkeyAccessControl = $values['valkeyAccessControl'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseServiceUserCreate.php b/fern/sdk/src/Database/Requests/DatabaseServiceUserCreate.php new file mode 100644 index 00000000..e5d9e596 --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseServiceUserCreate.php @@ -0,0 +1,78 @@ +username = $values['username']; + $this->password = $values['password'] ?? null; + $this->authentication = $values['authentication'] ?? null; + $this->redisAccessControl = $values['redisAccessControl'] ?? null; + $this->pgAccessControl = $values['pgAccessControl'] ?? null; + $this->opensearchAccessControl = $values['opensearchAccessControl'] ?? null; + $this->valkeyAccessControl = $values['valkeyAccessControl'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/DatabaseServiceUserModify.php b/fern/sdk/src/Database/Requests/DatabaseServiceUserModify.php new file mode 100644 index 00000000..756b193f --- /dev/null +++ b/fern/sdk/src/Database/Requests/DatabaseServiceUserModify.php @@ -0,0 +1,34 @@ +password = $values['password'] ?? null; + $this->authentication = $values['authentication'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/GetDatabaseLogsRequest.php b/fern/sdk/src/Database/Requests/GetDatabaseLogsRequest.php new file mode 100644 index 00000000..57117443 --- /dev/null +++ b/fern/sdk/src/Database/Requests/GetDatabaseLogsRequest.php @@ -0,0 +1,38 @@ +limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + $this->order = $values['order'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/GetDatabaseQueryStatisticsRequest.php b/fern/sdk/src/Database/Requests/GetDatabaseQueryStatisticsRequest.php new file mode 100644 index 00000000..e4b780a3 --- /dev/null +++ b/fern/sdk/src/Database/Requests/GetDatabaseQueryStatisticsRequest.php @@ -0,0 +1,38 @@ +limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + $this->order = $values['order'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/GetDatabaseSessionsRequest.php b/fern/sdk/src/Database/Requests/GetDatabaseSessionsRequest.php new file mode 100644 index 00000000..47edbf9a --- /dev/null +++ b/fern/sdk/src/Database/Requests/GetDatabaseSessionsRequest.php @@ -0,0 +1,38 @@ +limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + $this->order = $values['order'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/ListDatabaseConnectionPoolsRequest.php b/fern/sdk/src/Database/Requests/ListDatabaseConnectionPoolsRequest.php new file mode 100644 index 00000000..8f702c84 --- /dev/null +++ b/fern/sdk/src/Database/Requests/ListDatabaseConnectionPoolsRequest.php @@ -0,0 +1,24 @@ +sort = $values['sort'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/ListDatabasesRequest.php b/fern/sdk/src/Database/Requests/ListDatabasesRequest.php new file mode 100644 index 00000000..d3c3c815 --- /dev/null +++ b/fern/sdk/src/Database/Requests/ListDatabasesRequest.php @@ -0,0 +1,39 @@ + $sort Sort results by the specified field. Prefix with '-' for descending order. Supported fields: `created_at`, `name` (service hostname), `operational_state` (service status), `zone` (location). + */ + public ?string $sort; + + /** + * @param array{ + * limit?: ?int, + * offset?: ?int, + * sort?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + $this->sort = $values['sort'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Requests/LogicalDatabaseCreate.php b/fern/sdk/src/Database/Requests/LogicalDatabaseCreate.php new file mode 100644 index 00000000..aa64c788 --- /dev/null +++ b/fern/sdk/src/Database/Requests/LogicalDatabaseCreate.php @@ -0,0 +1,42 @@ +name = $values['name']; + $this->lcCollate = $values['lcCollate'] ?? null; + $this->lcCtype = $values['lcCtype'] ?? null; + } +} diff --git a/fern/sdk/src/Database/Types/DatabaseConnectionPoolCreatePoolMode.php b/fern/sdk/src/Database/Types/DatabaseConnectionPoolCreatePoolMode.php new file mode 100644 index 00000000..708d4516 --- /dev/null +++ b/fern/sdk/src/Database/Types/DatabaseConnectionPoolCreatePoolMode.php @@ -0,0 +1,10 @@ + $dow + */ + #[JsonProperty('dow')] + public string $dow; + + /** + * @var string $time + */ + #[JsonProperty('time')] + public string $time; + + /** + * @param array{ + * dow: value-of, + * time: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->dow = $values['dow']; + $this->time = $values['time']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Database/Types/DatabaseServiceCreateOpenApiPlanBackups.php b/fern/sdk/src/Database/Types/DatabaseServiceCreateOpenApiPlanBackups.php new file mode 100644 index 00000000..e4905b63 --- /dev/null +++ b/fern/sdk/src/Database/Types/DatabaseServiceCreateOpenApiPlanBackups.php @@ -0,0 +1,10 @@ + $dow + */ + #[JsonProperty('dow')] + public string $dow; + + /** + * @var string $time + */ + #[JsonProperty('time')] + public string $time; + + /** + * @param array{ + * dow: value-of, + * time: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->dow = $values['dow']; + $this->time = $values['time']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Database/Types/DatabaseServiceModifyOpenApiPlanBackups.php b/fern/sdk/src/Database/Types/DatabaseServiceModifyOpenApiPlanBackups.php new file mode 100644 index 00000000..08704e3e --- /dev/null +++ b/fern/sdk/src/Database/Types/DatabaseServiceModifyOpenApiPlanBackups.php @@ -0,0 +1,10 @@ +datasetName = $values['datasetName']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Database/Types/DatabaseServiceTaskCreateMigrationCheck.php b/fern/sdk/src/Database/Types/DatabaseServiceTaskCreateMigrationCheck.php new file mode 100644 index 00000000..1a0d5cd4 --- /dev/null +++ b/fern/sdk/src/Database/Types/DatabaseServiceTaskCreateMigrationCheck.php @@ -0,0 +1,58 @@ +ignoreDbs = $values['ignoreDbs'] ?? null; + $this->ignoreRoles = $values['ignoreRoles'] ?? null; + $this->method = $values['method'] ?? null; + $this->sourceServiceUri = $values['sourceServiceUri']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Database/Types/DatabaseServiceTaskCreateUpgradeCheck.php b/fern/sdk/src/Database/Types/DatabaseServiceTaskCreateUpgradeCheck.php new file mode 100644 index 00000000..c582feb5 --- /dev/null +++ b/fern/sdk/src/Database/Types/DatabaseServiceTaskCreateUpgradeCheck.php @@ -0,0 +1,34 @@ +targetVersion = $values['targetVersion']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyOpensearchAccessControl.php b/fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyOpensearchAccessControl.php new file mode 100644 index 00000000..b4fe9792 --- /dev/null +++ b/fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyOpensearchAccessControl.php @@ -0,0 +1,38 @@ + $rules List of index permission rules + */ + #[JsonProperty('rules'), ArrayType([DatabaseServiceUserAclModifyOpensearchAccessControlRulesItem::class])] + public array $rules; + + /** + * @param array{ + * rules: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->rules = $values['rules']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyOpensearchAccessControlRulesItem.php b/fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyOpensearchAccessControlRulesItem.php new file mode 100644 index 00000000..9eb3824e --- /dev/null +++ b/fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyOpensearchAccessControlRulesItem.php @@ -0,0 +1,42 @@ +index = $values['index']; + $this->permission = $values['permission']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyPgAccessControl.php b/fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyPgAccessControl.php new file mode 100644 index 00000000..10a66b29 --- /dev/null +++ b/fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyPgAccessControl.php @@ -0,0 +1,37 @@ +allowReplication = $values['allowReplication']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyRedisAccessControl.php b/fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyRedisAccessControl.php new file mode 100644 index 00000000..004d4e9b --- /dev/null +++ b/fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyRedisAccessControl.php @@ -0,0 +1,62 @@ + $categories List of categories for ACL + */ + #[JsonProperty('categories'), ArrayType(['string'])] + public ?array $categories; + + /** + * @var ?array $channels List of channels for ACL + */ + #[JsonProperty('channels'), ArrayType(['string'])] + public ?array $channels; + + /** + * @var ?array $commands List of commands for ACL + */ + #[JsonProperty('commands'), ArrayType(['string'])] + public ?array $commands; + + /** + * @var ?array $keys List of keys for ACL + */ + #[JsonProperty('keys'), ArrayType(['string'])] + public ?array $keys; + + /** + * @param array{ + * categories?: ?array, + * channels?: ?array, + * commands?: ?array, + * keys?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->categories = $values['categories'] ?? null; + $this->channels = $values['channels'] ?? null; + $this->commands = $values['commands'] ?? null; + $this->keys = $values['keys'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyValkeyAccessControl.php b/fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyValkeyAccessControl.php new file mode 100644 index 00000000..0fba2b33 --- /dev/null +++ b/fern/sdk/src/Database/Types/DatabaseServiceUserAclModifyValkeyAccessControl.php @@ -0,0 +1,62 @@ + $categories List of categories for ACL + */ + #[JsonProperty('categories'), ArrayType(['string'])] + public ?array $categories; + + /** + * @var ?array $channels List of channels for ACL + */ + #[JsonProperty('channels'), ArrayType(['string'])] + public ?array $channels; + + /** + * @var ?array $commands List of commands for ACL + */ + #[JsonProperty('commands'), ArrayType(['string'])] + public ?array $commands; + + /** + * @var ?array $keys List of keys for ACL + */ + #[JsonProperty('keys'), ArrayType(['string'])] + public ?array $keys; + + /** + * @param array{ + * categories?: ?array, + * channels?: ?array, + * commands?: ?array, + * keys?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->categories = $values['categories'] ?? null; + $this->channels = $values['channels'] ?? null; + $this->commands = $values['commands'] ?? null; + $this->keys = $values['keys'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Database/Types/DatabaseServiceUserCreateOpensearchAccessControl.php b/fern/sdk/src/Database/Types/DatabaseServiceUserCreateOpensearchAccessControl.php new file mode 100644 index 00000000..ec7a46bc --- /dev/null +++ b/fern/sdk/src/Database/Types/DatabaseServiceUserCreateOpensearchAccessControl.php @@ -0,0 +1,38 @@ + $rules List of index permission rules + */ + #[JsonProperty('rules'), ArrayType([DatabaseServiceUserCreateOpensearchAccessControlRulesItem::class])] + public array $rules; + + /** + * @param array{ + * rules: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->rules = $values['rules']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Database/Types/DatabaseServiceUserCreateOpensearchAccessControlRulesItem.php b/fern/sdk/src/Database/Types/DatabaseServiceUserCreateOpensearchAccessControlRulesItem.php new file mode 100644 index 00000000..304f5902 --- /dev/null +++ b/fern/sdk/src/Database/Types/DatabaseServiceUserCreateOpensearchAccessControlRulesItem.php @@ -0,0 +1,42 @@ +index = $values['index']; + $this->permission = $values['permission']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Database/Types/DatabaseServiceUserCreatePgAccessControl.php b/fern/sdk/src/Database/Types/DatabaseServiceUserCreatePgAccessControl.php new file mode 100644 index 00000000..92e843ee --- /dev/null +++ b/fern/sdk/src/Database/Types/DatabaseServiceUserCreatePgAccessControl.php @@ -0,0 +1,37 @@ +allowReplication = $values['allowReplication']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Database/Types/DatabaseServiceUserCreateRedisAccessControl.php b/fern/sdk/src/Database/Types/DatabaseServiceUserCreateRedisAccessControl.php new file mode 100644 index 00000000..cf882cc4 --- /dev/null +++ b/fern/sdk/src/Database/Types/DatabaseServiceUserCreateRedisAccessControl.php @@ -0,0 +1,62 @@ + $categories List of categories for Redis ACL + */ + #[JsonProperty('categories'), ArrayType(['string'])] + public ?array $categories; + + /** + * @var ?array $channels List of channels for Redis ACL + */ + #[JsonProperty('channels'), ArrayType(['string'])] + public ?array $channels; + + /** + * @var ?array $commands List of commands for Redis ACL + */ + #[JsonProperty('commands'), ArrayType(['string'])] + public ?array $commands; + + /** + * @var ?array $keys List of keys for Redis ACL + */ + #[JsonProperty('keys'), ArrayType(['string'])] + public ?array $keys; + + /** + * @param array{ + * categories?: ?array, + * channels?: ?array, + * commands?: ?array, + * keys?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->categories = $values['categories'] ?? null; + $this->channels = $values['channels'] ?? null; + $this->commands = $values['commands'] ?? null; + $this->keys = $values['keys'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Database/Types/DatabaseServiceUserCreateValkeyAccessControl.php b/fern/sdk/src/Database/Types/DatabaseServiceUserCreateValkeyAccessControl.php new file mode 100644 index 00000000..e35935c8 --- /dev/null +++ b/fern/sdk/src/Database/Types/DatabaseServiceUserCreateValkeyAccessControl.php @@ -0,0 +1,62 @@ + $categories List of categories for Valkey ACL + */ + #[JsonProperty('categories'), ArrayType(['string'])] + public ?array $categories; + + /** + * @var ?array $channels List of channels for Valkey ACL + */ + #[JsonProperty('channels'), ArrayType(['string'])] + public ?array $channels; + + /** + * @var ?array $commands List of commands for Valkey ACL + */ + #[JsonProperty('commands'), ArrayType(['string'])] + public ?array $commands; + + /** + * @var ?array $keys List of keys for Valkey ACL + */ + #[JsonProperty('keys'), ArrayType(['string'])] + public ?array $keys; + + /** + * @param array{ + * categories?: ?array, + * channels?: ?array, + * commands?: ?array, + * keys?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->categories = $values['categories'] ?? null; + $this->channels = $values['channels'] ?? null; + $this->commands = $values['commands'] ?? null; + $this->keys = $values['keys'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Device/DeviceClient.php b/fern/sdk/src/Device/DeviceClient.php new file mode 100644 index 00000000..ce4ded15 --- /dev/null +++ b/fern/sdk/src/Device/DeviceClient.php @@ -0,0 +1,117 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Returns a list of available passthrough devices. + * + * @param GetAvailablePassthroughDevicesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getAvailablePassthroughDevices(GetAvailablePassthroughDevicesRequest $request = new GetAvailablePassthroughDevicesRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->zone !== null) { + $query['zone'] = $request->zone; + } + if ($request->type !== null) { + $query['type'] = $request->type; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/device/availability", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, ['string' => DevicesValue::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Device/Requests/GetAvailablePassthroughDevicesRequest.php b/fern/sdk/src/Device/Requests/GetAvailablePassthroughDevicesRequest.php new file mode 100644 index 00000000..8062eaa8 --- /dev/null +++ b/fern/sdk/src/Device/Requests/GetAvailablePassthroughDevicesRequest.php @@ -0,0 +1,32 @@ + $type Filter results to a specific device type. The only valid type is "gpu" for now. + */ + public ?string $type; + + /** + * @param array{ + * zone?: ?string, + * type?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->zone = $values['zone'] ?? null; + $this->type = $values['type'] ?? null; + } +} diff --git a/fern/sdk/src/Device/Types/GetAvailablePassthroughDevicesRequestType.php b/fern/sdk/src/Device/Types/GetAvailablePassthroughDevicesRequestType.php new file mode 100644 index 00000000..60e1dcdb --- /dev/null +++ b/fern/sdk/src/Device/Types/GetAvailablePassthroughDevicesRequestType.php @@ -0,0 +1,8 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Retrieves a list of events. + * + * @param string $serverUuid Filter results to a specific server. + * @param int $offset The number of items to skip before starting to collect the result set. Default is 0. + * @param int $count The numbers of items to return. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Events + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listEvents(string $serverUuid, int $offset, int $count, ?array $options = null): Events + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/events/{$serverUuid}/{$offset},{$count}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Events::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Exceptions/UpcloudApiException.php b/fern/sdk/src/Exceptions/UpcloudApiException.php new file mode 100644 index 00000000..1022049c --- /dev/null +++ b/fern/sdk/src/Exceptions/UpcloudApiException.php @@ -0,0 +1,53 @@ +body = $body; + parent::__construct($message, $statusCode, $previous); + } + + /** + * Returns the body of the response that triggered the exception. + * + * @return mixed + */ + public function getBody(): mixed + { + return $this->body; + } + + /** + * @return string + */ + public function __toString(): string + { + if (empty($this->body)) { + return "$this->message; Status Code: $this->code\n"; + } + return "$this->message; Status Code: $this->code; Body: " . $this->body . "\n"; + } +} diff --git a/fern/sdk/src/Exceptions/UpcloudException.php b/fern/sdk/src/Exceptions/UpcloudException.php new file mode 100644 index 00000000..a2d3676f --- /dev/null +++ b/fern/sdk/src/Exceptions/UpcloudException.php @@ -0,0 +1,12 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Returns a list of File Storage services. + * + * @param ListFileStoragesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listFileStorages(ListFileStoragesRequest $request = new ListFileStoragesRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [FileStorageServiceDetailResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new File Storage service. + * + * @param FileStorageServiceCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageServiceDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createFileStorage(FileStorageServiceCreate $request, ?array $options = null): FileStorageServiceDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageServiceDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns managed File Storage details by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageServiceDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getFileStorage(string $serviceUuid, ?array $options = null): FileStorageServiceDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageServiceDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Replaces existing File Storage service by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param FileStorageServiceReplace $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageServiceDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function replaceFileStorage(string $serviceUuid, FileStorageServiceReplace $request, ?array $options = null): FileStorageServiceDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}", + method: HttpMethod::PUT, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageServiceDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing File Storage service by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteFileStorage(string $serviceUuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing File Storage service by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param FileStorageServiceModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageServiceDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyFileStorage(string $serviceUuid, FileStorageServiceModify $request = new FileStorageServiceModify(), ?array $options = null): FileStorageServiceDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageServiceDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available service networks by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listFileStorageNetworks(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/networks", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [FileStorageNetworkDetailResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new service network by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param CreateFileStorageNetworkRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageNetworkDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createFileStorageNetwork(string $serviceUuid, CreateFileStorageNetworkRequest $request, ?array $options = null): FileStorageNetworkDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/networks", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageNetworkDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns service network details by given {service_uuid} and {network_name}. + * + * @param string $serviceUuid Service UUID + * @param string $networkName The name of the network. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageNetworkDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getFileStorageNetwork(string $serviceUuid, string $networkName, ?array $options = null): FileStorageNetworkDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/networks/{$networkName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageNetworkDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing network by given {service_uuid} and {network_name}. + * + * @param string $serviceUuid Service UUID + * @param string $networkName The name of the network. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteFileStorageNetwork(string $serviceUuid, string $networkName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/networks/{$networkName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing service network by given {service_uuid} and {network_name}. + * + * @param string $serviceUuid Service UUID + * @param string $networkName The name of the network. + * @param FileStorageNetworkModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageNetworkDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyFileStorageNetwork(string $serviceUuid, string $networkName, FileStorageNetworkModify $request = new FileStorageNetworkModify(), ?array $options = null): FileStorageNetworkDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/networks/{$networkName}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageNetworkDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available service shares by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listFileStorageShares(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/shares", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [FileStorageShareDetailResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new service share by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param CreateFileStorageShareRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageShareDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createFileStorageShare(string $serviceUuid, CreateFileStorageShareRequest $request, ?array $options = null): FileStorageShareDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/shares", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageShareDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns service share details by given {service_uuid} and {share_name}. + * + * @param string $serviceUuid Service UUID + * @param string $shareName The name of the share. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageShareDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getFileStorageShare(string $serviceUuid, string $shareName, ?array $options = null): FileStorageShareDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/shares/{$shareName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageShareDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing share by given {service_uuid} and {share_name}. + * + * @param string $serviceUuid Service UUID + * @param string $shareName The name of the share. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteFileStorageShare(string $serviceUuid, string $shareName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/shares/{$shareName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing service share by given {service_uuid} and {share_name}. + * + * @param string $serviceUuid Service UUID + * @param string $shareName The name of the share. + * @param FileStorageShareModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageShareDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyFileStorageShare(string $serviceUuid, string $shareName, FileStorageShareModify $request = new FileStorageShareModify(), ?array $options = null): FileStorageShareDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/shares/{$shareName}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageShareDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available ACLs by given {service_uuid} and {share_name}. + * + * @param string $serviceUuid Service UUID + * @param string $shareName The name of the share. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listFileStorageAcls(string $serviceUuid, string $shareName, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/shares/{$shareName}/acl", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [FileStorageAclDetailResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new share ACL by given {service_uuid} and {share_name}. + * + * @param string $serviceUuid Service UUID + * @param string $shareName The name of the share. + * @param CreateFileStorageAclRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageAclDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createFileStorageAcl(string $serviceUuid, string $shareName, CreateFileStorageAclRequest $request, ?array $options = null): FileStorageAclDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/shares/{$shareName}/acl", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageAclDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns ACL details by given {service_uuid}, {share_name} and {acl_name}. + * + * @param string $serviceUuid Service UUID + * @param string $shareName The name of the share. + * @param string $aclName The name of the ACL. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageAclDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getFileStorageAcl(string $serviceUuid, string $shareName, string $aclName, ?array $options = null): FileStorageAclDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/shares/{$shareName}/acl/{$aclName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageAclDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing ACL by given {service_uuid}, {share_name} and {acl_name}. + * + * @param string $serviceUuid Service UUID + * @param string $shareName The name of the share. + * @param string $aclName The name of the ACL. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteFileStorageAcl(string $serviceUuid, string $shareName, string $aclName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/shares/{$shareName}/acl/{$aclName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing ACL by given {service_uuid}, {share_name} and {acl_name}. + * + * @param string $serviceUuid Service UUID + * @param string $shareName The name of the share. + * @param string $aclName The name of the ACL. + * @param FileStorageAclModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageAclDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyFileStorageAcl(string $serviceUuid, string $shareName, string $aclName, FileStorageAclModify $request = new FileStorageAclModify(), ?array $options = null): FileStorageAclDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/shares/{$shareName}/acl/{$aclName}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageAclDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available service labels by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listFileStorageLabels(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/labels", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [FileStorageLabelDetails::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new label by given {service_uuid}. Labels are used for service filtering. + * + * @param string $serviceUuid Service UUID + * @param CreateFileStorageLabelRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageLabelDetails + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createFileStorageLabel(string $serviceUuid, CreateFileStorageLabelRequest $request, ?array $options = null): FileStorageLabelDetails + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/labels", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageLabelDetails::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns label details by given {service_uuid} and {key}. + * + * @param string $serviceUuid Service UUID + * @param string $labelKey The key of the label. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageLabelDetails + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getFileStorageLabel(string $serviceUuid, string $labelKey, ?array $options = null): FileStorageLabelDetails + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/labels/{$labelKey}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageLabelDetails::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing label by given {service_uuid} and {key}. + * + * @param string $serviceUuid Service UUID + * @param string $labelKey The key of the label. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteFileStorageLabel(string $serviceUuid, string $labelKey, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/labels/{$labelKey}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing label by given {service_uuid} and {key}. + * + * @param string $serviceUuid Service UUID + * @param string $labelKey The key of the label. + * @param FileStorageLabelModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageLabelDetails + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyFileStorageLabel(string $serviceUuid, string $labelKey, FileStorageLabelModify $request = new FileStorageLabelModify(), ?array $options = null): FileStorageLabelDetails + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/labels/{$labelKey}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageLabelDetails::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns the current state of the File Storage service by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FileStorageServiceDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getFileStorageCurrentState(string $serviceUuid, ?array $options = null): FileStorageServiceDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/file-storage/{$serviceUuid}/current-state", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FileStorageServiceDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/FileStorage/Requests/CreateFileStorageAclRequest.php b/fern/sdk/src/FileStorage/Requests/CreateFileStorageAclRequest.php new file mode 100644 index 00000000..d8bf47fa --- /dev/null +++ b/fern/sdk/src/FileStorage/Requests/CreateFileStorageAclRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/FileStorage/Requests/CreateFileStorageLabelRequest.php b/fern/sdk/src/FileStorage/Requests/CreateFileStorageLabelRequest.php new file mode 100644 index 00000000..77c84690 --- /dev/null +++ b/fern/sdk/src/FileStorage/Requests/CreateFileStorageLabelRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/FileStorage/Requests/CreateFileStorageNetworkRequest.php b/fern/sdk/src/FileStorage/Requests/CreateFileStorageNetworkRequest.php new file mode 100644 index 00000000..49ce33aa --- /dev/null +++ b/fern/sdk/src/FileStorage/Requests/CreateFileStorageNetworkRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/FileStorage/Requests/CreateFileStorageShareRequest.php b/fern/sdk/src/FileStorage/Requests/CreateFileStorageShareRequest.php new file mode 100644 index 00000000..a7400ac3 --- /dev/null +++ b/fern/sdk/src/FileStorage/Requests/CreateFileStorageShareRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/FileStorage/Requests/FileStorageAclModify.php b/fern/sdk/src/FileStorage/Requests/FileStorageAclModify.php new file mode 100644 index 00000000..0f0279c8 --- /dev/null +++ b/fern/sdk/src/FileStorage/Requests/FileStorageAclModify.php @@ -0,0 +1,43 @@ + $permission + */ + #[JsonProperty('permission')] + public ?string $permission; + + /** + * @param array{ + * name?: ?string, + * target?: ?string, + * permission?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->target = $values['target'] ?? null; + $this->permission = $values['permission'] ?? null; + } +} diff --git a/fern/sdk/src/FileStorage/Requests/FileStorageLabelModify.php b/fern/sdk/src/FileStorage/Requests/FileStorageLabelModify.php new file mode 100644 index 00000000..db1fc137 --- /dev/null +++ b/fern/sdk/src/FileStorage/Requests/FileStorageLabelModify.php @@ -0,0 +1,34 @@ +key = $values['key'] ?? null; + $this->value = $values['value'] ?? null; + } +} diff --git a/fern/sdk/src/FileStorage/Requests/FileStorageNetworkModify.php b/fern/sdk/src/FileStorage/Requests/FileStorageNetworkModify.php new file mode 100644 index 00000000..08b9e4c7 --- /dev/null +++ b/fern/sdk/src/FileStorage/Requests/FileStorageNetworkModify.php @@ -0,0 +1,51 @@ + $family + */ + #[JsonProperty('family')] + public ?string $family; + + /** + * @var ?string $ipAddress + */ + #[JsonProperty('ip_address')] + public ?string $ipAddress; + + /** + * @param array{ + * uuid?: ?string, + * name?: ?string, + * family?: ?value-of, + * ipAddress?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->uuid = $values['uuid'] ?? null; + $this->name = $values['name'] ?? null; + $this->family = $values['family'] ?? null; + $this->ipAddress = $values['ipAddress'] ?? null; + } +} diff --git a/fern/sdk/src/FileStorage/Requests/FileStorageServiceCreate.php b/fern/sdk/src/FileStorage/Requests/FileStorageServiceCreate.php new file mode 100644 index 00000000..36f06892 --- /dev/null +++ b/fern/sdk/src/FileStorage/Requests/FileStorageServiceCreate.php @@ -0,0 +1,87 @@ + $configuredStatus + */ + #[JsonProperty('configured_status')] + public string $configuredStatus; + + /** + * @var int $sizeGib + */ + #[JsonProperty('size_gib')] + public int $sizeGib; + + /** + * @var ?bool $encrypted Indicates whether encryption at rest is enabled for the service. + */ + #[JsonProperty('encrypted')] + public ?bool $encrypted; + + /** + * @var ?array $networks + */ + #[JsonProperty('networks'), ArrayType([FileStorageNetworkCreate::class])] + public ?array $networks; + + /** + * @var ?array $shares + */ + #[JsonProperty('shares'), ArrayType([FileStorageShareCreate::class])] + public ?array $shares; + + /** + * @var ?array $labels Labels + */ + #[JsonProperty('labels'), ArrayType([FileStorageLabelCreate::class])] + public ?array $labels; + + /** + * @param array{ + * name: string, + * zone: string, + * configuredStatus: value-of, + * sizeGib: int, + * encrypted?: ?bool, + * networks?: ?array, + * shares?: ?array, + * labels?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->zone = $values['zone']; + $this->configuredStatus = $values['configuredStatus']; + $this->sizeGib = $values['sizeGib']; + $this->encrypted = $values['encrypted'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->shares = $values['shares'] ?? null; + $this->labels = $values['labels'] ?? null; + } +} diff --git a/fern/sdk/src/FileStorage/Requests/FileStorageServiceModify.php b/fern/sdk/src/FileStorage/Requests/FileStorageServiceModify.php new file mode 100644 index 00000000..4551525f --- /dev/null +++ b/fern/sdk/src/FileStorage/Requests/FileStorageServiceModify.php @@ -0,0 +1,62 @@ + $configuredStatus + */ + #[JsonProperty('configured_status')] + public ?string $configuredStatus; + + /** + * @var ?int $sizeGib + */ + #[JsonProperty('size_gib')] + public ?int $sizeGib; + + /** + * @var ?array $networks + */ + #[JsonProperty('networks'), ArrayType([FileStorageNetworkCreate::class])] + public ?array $networks; + + /** + * @var ?array $labels + */ + #[JsonProperty('labels'), ArrayType([FileStorageLabelCreate::class])] + public ?array $labels; + + /** + * @param array{ + * name?: ?string, + * configuredStatus?: ?value-of, + * sizeGib?: ?int, + * networks?: ?array, + * labels?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->configuredStatus = $values['configuredStatus'] ?? null; + $this->sizeGib = $values['sizeGib'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->labels = $values['labels'] ?? null; + } +} diff --git a/fern/sdk/src/FileStorage/Requests/FileStorageServiceReplace.php b/fern/sdk/src/FileStorage/Requests/FileStorageServiceReplace.php new file mode 100644 index 00000000..b15eb7a4 --- /dev/null +++ b/fern/sdk/src/FileStorage/Requests/FileStorageServiceReplace.php @@ -0,0 +1,62 @@ + $configuredStatus + */ + #[JsonProperty('configured_status')] + public string $configuredStatus; + + /** + * @var int $sizeGib + */ + #[JsonProperty('size_gib')] + public int $sizeGib; + + /** + * @var ?array $networks + */ + #[JsonProperty('networks'), ArrayType([FileStorageNetworkCreate::class])] + public ?array $networks; + + /** + * @var ?array $labels Labels + */ + #[JsonProperty('labels'), ArrayType([FileStorageLabelCreate::class])] + public ?array $labels; + + /** + * @param array{ + * name: string, + * configuredStatus: value-of, + * sizeGib: int, + * networks?: ?array, + * labels?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->configuredStatus = $values['configuredStatus']; + $this->sizeGib = $values['sizeGib']; + $this->networks = $values['networks'] ?? null; + $this->labels = $values['labels'] ?? null; + } +} diff --git a/fern/sdk/src/FileStorage/Requests/FileStorageShareModify.php b/fern/sdk/src/FileStorage/Requests/FileStorageShareModify.php new file mode 100644 index 00000000..b8138efd --- /dev/null +++ b/fern/sdk/src/FileStorage/Requests/FileStorageShareModify.php @@ -0,0 +1,36 @@ + $acl + */ + #[JsonProperty('acl'), ArrayType([FileStorageAclCreate::class])] + public ?array $acl; + + /** + * @param array{ + * name?: ?string, + * acl?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->acl = $values['acl'] ?? null; + } +} diff --git a/fern/sdk/src/FileStorage/Requests/ListFileStoragesRequest.php b/fern/sdk/src/FileStorage/Requests/ListFileStoragesRequest.php new file mode 100644 index 00000000..63c67fbb --- /dev/null +++ b/fern/sdk/src/FileStorage/Requests/ListFileStoragesRequest.php @@ -0,0 +1,39 @@ + $sort Order of returned results. + */ + public ?string $sort; + + /** + * @param array{ + * limit?: ?int, + * offset?: ?int, + * sort?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + $this->sort = $values['sort'] ?? null; + } +} diff --git a/fern/sdk/src/FirewallRuleset/FirewallRulesetClient.php b/fern/sdk/src/FirewallRuleset/FirewallRulesetClient.php new file mode 100644 index 00000000..4f72c779 --- /dev/null +++ b/fern/sdk/src/FirewallRuleset/FirewallRulesetClient.php @@ -0,0 +1,1386 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Returns a list of firewall rulesets. + * + * @param ListFirewallRulesetsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listFirewallRulesets(ListFirewallRulesetsRequest $request = new ListFirewallRulesetsRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [FirewallRulesetDetailResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new firewall ruleset. + * + * @param CreateFirewallRuleset $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createFirewallRuleset(CreateFirewallRuleset $request, ?array $options = null): FirewallRulesetDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns firewall ruleset details by given {ruleset-uuid}. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getFirewallRuleset(string $rulesetUuid, ?array $options = null): FirewallRulesetDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/{$rulesetUuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing firewall ruleset by given {ruleset-uuid}. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteFirewallRuleset(string $rulesetUuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/{$rulesetUuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing firewall ruleset by given {ruleset-uuid}. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param FirewallRulesetModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyFirewallRuleset(string $rulesetUuid, FirewallRulesetModify $request = new FirewallRulesetModify(), ?array $options = null): FirewallRulesetDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/{$rulesetUuid}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Restores existing firewall ruleset by given {ruleset-uuid} and {ruleset-version}. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param int $rulesetVersion Firewall ruleset version + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function restoreFirewallRuleset(string $rulesetUuid, int $rulesetVersion, ?array $options = null): FirewallRulesetDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/{$rulesetUuid}/restore/{$rulesetVersion}", + method: HttpMethod::PATCH, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns firewall ruleset rules. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param ListFirewallRulesetRulesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetFirewallRuleListResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listFirewallRulesetRules(string $rulesetUuid, ListFirewallRulesetRulesRequest $request = new ListFirewallRulesetRulesRequest(), ?array $options = null): FirewallRulesetFirewallRuleListResponse + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/{$rulesetUuid}/rule", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetFirewallRuleListResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new firewall ruleset rule by the given {ruleset-uuid}. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param CreateFirewallRulesetRuleRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetRuleDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createFirewallRulesetRule(string $rulesetUuid, CreateFirewallRulesetRuleRequest $request, ?array $options = null): FirewallRulesetRuleDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/{$rulesetUuid}/rule", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetRuleDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates multiple firewall ruleset rules by the given {ruleset-uuid}. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param FirewallRulesetFirewallMultipleRuleCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetFirewallRuleListResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createMultipleFirewallRulesetRule(string $rulesetUuid, FirewallRulesetFirewallMultipleRuleCreate $request, ?array $options = null): FirewallRulesetFirewallRuleListResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/{$rulesetUuid}/rule", + method: HttpMethod::PUT, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetFirewallRuleListResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns firewall ruleset rule details. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param string $ruleId Firewall ruleset rule UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetRuleDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getFirewallRulesetRule(string $rulesetUuid, string $ruleId, ?array $options = null): FirewallRulesetRuleDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/{$rulesetUuid}/rule/{$ruleId}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetRuleDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes an existing rule by given {ruleset-uuid} and {rule-uuid}. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param string $ruleId Firewall ruleset rule UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteFirewallRulesetRule(string $rulesetUuid, string $ruleId, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/{$rulesetUuid}/rule/{$ruleId}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing firewall ruleset rule by given {ruleset_uuid} and {rule-uuid}. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param string $ruleId Firewall ruleset rule UUID + * @param FirewallRulesetFirewallRuleModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetRuleDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyFirewallRulesetRule(string $rulesetUuid, string $ruleId, FirewallRulesetFirewallRuleModify $request = new FirewallRulesetFirewallRuleModify(), ?array $options = null): FirewallRulesetRuleDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/{$rulesetUuid}/rule/{$ruleId}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetRuleDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available firewall ruleset labels by given {ruleset-uuid}. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listFirewallRulesetLabels(string $rulesetUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/{$rulesetUuid}/labels", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [FirewallRulesetLabelDetailResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new label by given {ruleset-uuid}. Labels are used for group filtering. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param CreateFirewallRulesetLabelRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetLabelDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createFirewallRulesetLabel(string $rulesetUuid, CreateFirewallRulesetLabelRequest $request, ?array $options = null): FirewallRulesetLabelDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/{$rulesetUuid}/labels", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetLabelDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of servers that are attached to the firewall ruleset by given {ruleset-uuid}. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listFirewallRulesetAttachedServers(string $rulesetUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/{$rulesetUuid}/servers", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [FirewallRulesetLabelDetailResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns label details by given {ruleset-uuid} and {label-key}. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param string $labelKey The key of the label. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetLabelDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getFirewallRulesetLabel(string $rulesetUuid, string $labelKey, ?array $options = null): FirewallRulesetLabelDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/{$rulesetUuid}/labels/{$labelKey}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetLabelDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing label by given {ruleset-uuid} and {label-key}. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param string $labelKey The key of the label. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteFirewallRulesetLabel(string $rulesetUuid, string $labelKey, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/{$rulesetUuid}/labels/{$labelKey}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing label by given {ruleset-uuid} and {label-key}. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param string $labelKey The key of the label. + * @param FirewallRulesetLabelModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetLabelDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyFirewallRulesetLabel(string $rulesetUuid, string $labelKey, FirewallRulesetLabelModify $request = new FirewallRulesetLabelModify(), ?array $options = null): FirewallRulesetLabelDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/{$rulesetUuid}/labels/{$labelKey}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetLabelDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of server firewall rules. + * + * @param string $serverUuid Server UUID + * @param ListServerFirewallRuleRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetServerFirewallDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listServerFirewallRule(string $serverUuid, ListServerFirewallRuleRequest $request = new ListServerFirewallRuleRequest(), ?array $options = null): FirewallRulesetServerFirewallDetailResponse + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/server/{$serverUuid}/firewall-rule", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetServerFirewallDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new server firewall rule. + * + * @param string $serverUuid Server UUID + * @param FirewallRulesetServerFirewallRuleCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetServerFirewallRuleDetail + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createServerFirewallRule(string $serverUuid, FirewallRulesetServerFirewallRuleCreate $request, ?array $options = null): FirewallRulesetServerFirewallRuleDetail + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/server/{$serverUuid}/firewall-rule", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetServerFirewallRuleDetail::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates multiple server firewall rules by given {server-uuid}. + * + * @param string $serverUuid Server UUID + * @param FirewallRulesetServerMultipleFirewallRulesCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetServerFirewallDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createMultipleServerFirewallRules(string $serverUuid, FirewallRulesetServerMultipleFirewallRulesCreate $request, ?array $options = null): FirewallRulesetServerFirewallDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/server/{$serverUuid}/firewall-rule", + method: HttpMethod::PUT, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetServerFirewallDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns server firewall rule details by given {server-uuid} and {position}. + * + * @param string $serverUuid Server UUID + * @param ( + * int + * |string + * ) $position Server firewall rule position + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetServerFirewallRuleDetail + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getServerFirewallRule(string $serverUuid, int|string $position, ?array $options = null): FirewallRulesetServerFirewallRuleDetail + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/server/{$serverUuid}/firewall-rule/{$position}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetServerFirewallRuleDetail::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing server firewall rule by given {server-uuid} and {position}. + * + * @param string $serverUuid Server UUID + * @param ( + * int + * |string + * ) $position Server firewall rule position + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteServerFirewallRule(string $serverUuid, int|string $position, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/firewall-ruleset/server/{$serverUuid}/firewall-rule/{$position}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/FirewallRuleset/Requests/CreateFirewallRuleset.php b/fern/sdk/src/FirewallRuleset/Requests/CreateFirewallRuleset.php new file mode 100644 index 00000000..fd4eaa52 --- /dev/null +++ b/fern/sdk/src/FirewallRuleset/Requests/CreateFirewallRuleset.php @@ -0,0 +1,68 @@ + $labels Labels + */ + #[JsonProperty('labels'), ArrayType([FirewallRulesetCreateLabel::class])] + public ?array $labels; + + /** + * @param array{ + * name: string, + * description?: ?string, + * stateful?: ?bool, + * enabled?: ?bool, + * defaultDnsRulesEnabled?: ?bool, + * labels?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->description = $values['description'] ?? null; + $this->stateful = $values['stateful'] ?? null; + $this->enabled = $values['enabled'] ?? null; + $this->defaultDnsRulesEnabled = $values['defaultDnsRulesEnabled'] ?? null; + $this->labels = $values['labels'] ?? null; + } +} diff --git a/fern/sdk/src/FirewallRuleset/Requests/CreateFirewallRulesetLabelRequest.php b/fern/sdk/src/FirewallRuleset/Requests/CreateFirewallRulesetLabelRequest.php new file mode 100644 index 00000000..821d4018 --- /dev/null +++ b/fern/sdk/src/FirewallRuleset/Requests/CreateFirewallRulesetLabelRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/FirewallRuleset/Requests/CreateFirewallRulesetRuleRequest.php b/fern/sdk/src/FirewallRuleset/Requests/CreateFirewallRulesetRuleRequest.php new file mode 100644 index 00000000..5ce6c864 --- /dev/null +++ b/fern/sdk/src/FirewallRuleset/Requests/CreateFirewallRulesetRuleRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetFirewallMultipleRuleCreate.php b/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetFirewallMultipleRuleCreate.php new file mode 100644 index 00000000..b889204d --- /dev/null +++ b/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetFirewallMultipleRuleCreate.php @@ -0,0 +1,28 @@ + $rules + */ + #[JsonProperty('rules'), ArrayType([FirewallRulesetFirewallRuleCreate::class])] + public array $rules; + + /** + * @param array{ + * rules: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->rules = $values['rules']; + } +} diff --git a/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetFirewallRuleModify.php b/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetFirewallRuleModify.php new file mode 100644 index 00000000..59b96159 --- /dev/null +++ b/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetFirewallRuleModify.php @@ -0,0 +1,166 @@ + $action + */ + #[JsonProperty('action')] + public ?string $action; + + /** + * @var ?string $comment Comments + */ + #[JsonProperty('comment')] + public ?string $comment; + + /** + * @var ?string $destinationAddressStart + */ + #[JsonProperty('destination_address_start')] + public ?string $destinationAddressStart; + + /** + * @var ?string $destinationAddressEnd + */ + #[JsonProperty('destination_address_end')] + public ?string $destinationAddressEnd; + + /** + * @var ?int $destinationPortStart + */ + #[JsonProperty('destination_port_start')] + public ?int $destinationPortStart; + + /** + * @var ?int $destinationPortEnd + */ + #[JsonProperty('destination_port_end')] + public ?int $destinationPortEnd; + + /** + * @var ?string $destinationAddressCidr + */ + #[JsonProperty('destination_address_cidr')] + public ?string $destinationAddressCidr; + + /** + * @var ?value-of $direction + */ + #[JsonProperty('direction')] + public ?string $direction; + + /** + * @var ?value-of $family + */ + #[JsonProperty('family')] + public ?string $family; + + /** + * @var ?int $icmpType + */ + #[JsonProperty('icmp_type')] + public ?int $icmpType; + + /** + * @var ?int $position + */ + #[JsonProperty('position')] + public ?int $position; + + /** + * @var ?value-of $protocol + */ + #[JsonProperty('protocol')] + public ?string $protocol; + + /** + * @var ?string $sourceAddressStart + */ + #[JsonProperty('source_address_start')] + public ?string $sourceAddressStart; + + /** + * @var ?string $sourceAddressEnd + */ + #[JsonProperty('source_address_end')] + public ?string $sourceAddressEnd; + + /** + * @var ?int $sourcePortStart + */ + #[JsonProperty('source_port_start')] + public ?int $sourcePortStart; + + /** + * @var ?int $sourcePortEnd + */ + #[JsonProperty('source_port_end')] + public ?int $sourcePortEnd; + + /** + * @var ?string $sourceAddressCidr + */ + #[JsonProperty('source_address_cidr')] + public ?string $sourceAddressCidr; + + /** + * @param array{ + * enabled?: ?bool, + * action?: ?value-of, + * comment?: ?string, + * destinationAddressStart?: ?string, + * destinationAddressEnd?: ?string, + * destinationPortStart?: ?int, + * destinationPortEnd?: ?int, + * destinationAddressCidr?: ?string, + * direction?: ?value-of, + * family?: ?value-of, + * icmpType?: ?int, + * position?: ?int, + * protocol?: ?value-of, + * sourceAddressStart?: ?string, + * sourceAddressEnd?: ?string, + * sourcePortStart?: ?int, + * sourcePortEnd?: ?int, + * sourceAddressCidr?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->enabled = $values['enabled'] ?? null; + $this->action = $values['action'] ?? null; + $this->comment = $values['comment'] ?? null; + $this->destinationAddressStart = $values['destinationAddressStart'] ?? null; + $this->destinationAddressEnd = $values['destinationAddressEnd'] ?? null; + $this->destinationPortStart = $values['destinationPortStart'] ?? null; + $this->destinationPortEnd = $values['destinationPortEnd'] ?? null; + $this->destinationAddressCidr = $values['destinationAddressCidr'] ?? null; + $this->direction = $values['direction'] ?? null; + $this->family = $values['family'] ?? null; + $this->icmpType = $values['icmpType'] ?? null; + $this->position = $values['position'] ?? null; + $this->protocol = $values['protocol'] ?? null; + $this->sourceAddressStart = $values['sourceAddressStart'] ?? null; + $this->sourceAddressEnd = $values['sourceAddressEnd'] ?? null; + $this->sourcePortStart = $values['sourcePortStart'] ?? null; + $this->sourcePortEnd = $values['sourcePortEnd'] ?? null; + $this->sourceAddressCidr = $values['sourceAddressCidr'] ?? null; + } +} diff --git a/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetLabelModify.php b/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetLabelModify.php new file mode 100644 index 00000000..b24fc98d --- /dev/null +++ b/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetLabelModify.php @@ -0,0 +1,34 @@ +key = $values['key'] ?? null; + $this->value = $values['value'] ?? null; + } +} diff --git a/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetModify.php b/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetModify.php new file mode 100644 index 00000000..9a72a6cf --- /dev/null +++ b/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetModify.php @@ -0,0 +1,60 @@ + $labels Labels + */ + #[JsonProperty('labels'), ArrayType([FirewallRulesetCreateLabel::class])] + public ?array $labels; + + /** + * @var ?bool $enabled Enabled + */ + #[JsonProperty('enabled')] + public ?bool $enabled; + + /** + * @var ?bool $defaultDnsRulesEnabled + */ + #[JsonProperty('default_dns_rules_enabled')] + public ?bool $defaultDnsRulesEnabled; + + /** + * @param array{ + * name?: ?string, + * description?: ?string, + * labels?: ?array, + * enabled?: ?bool, + * defaultDnsRulesEnabled?: ?bool, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->description = $values['description'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->enabled = $values['enabled'] ?? null; + $this->defaultDnsRulesEnabled = $values['defaultDnsRulesEnabled'] ?? null; + } +} diff --git a/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetServerFirewallRuleCreate.php b/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetServerFirewallRuleCreate.php new file mode 100644 index 00000000..34a12b62 --- /dev/null +++ b/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetServerFirewallRuleCreate.php @@ -0,0 +1,27 @@ +firewallRule = $values['firewallRule']; + } +} diff --git a/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetServerMultipleFirewallRulesCreate.php b/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetServerMultipleFirewallRulesCreate.php new file mode 100644 index 00000000..e1eec8b1 --- /dev/null +++ b/fern/sdk/src/FirewallRuleset/Requests/FirewallRulesetServerMultipleFirewallRulesCreate.php @@ -0,0 +1,27 @@ +firewallRules = $values['firewallRules'] ?? null; + } +} diff --git a/fern/sdk/src/FirewallRuleset/Requests/ListFirewallRulesetRulesRequest.php b/fern/sdk/src/FirewallRuleset/Requests/ListFirewallRulesetRulesRequest.php new file mode 100644 index 00000000..594cfb72 --- /dev/null +++ b/fern/sdk/src/FirewallRuleset/Requests/ListFirewallRulesetRulesRequest.php @@ -0,0 +1,38 @@ +limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + $this->sort = $values['sort'] ?? null; + } +} diff --git a/fern/sdk/src/FirewallRuleset/Requests/ListFirewallRulesetsRequest.php b/fern/sdk/src/FirewallRuleset/Requests/ListFirewallRulesetsRequest.php new file mode 100644 index 00000000..cb8d197a --- /dev/null +++ b/fern/sdk/src/FirewallRuleset/Requests/ListFirewallRulesetsRequest.php @@ -0,0 +1,38 @@ +limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + $this->sort = $values['sort'] ?? null; + } +} diff --git a/fern/sdk/src/FirewallRuleset/Requests/ListServerFirewallRuleRequest.php b/fern/sdk/src/FirewallRuleset/Requests/ListServerFirewallRuleRequest.php new file mode 100644 index 00000000..222f4294 --- /dev/null +++ b/fern/sdk/src/FirewallRuleset/Requests/ListServerFirewallRuleRequest.php @@ -0,0 +1,38 @@ +limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + $this->sort = $values['sort'] ?? null; + } +} diff --git a/fern/sdk/src/FirewallRuleset/Types/FirewallRulesetServerMultipleFirewallRulesCreateFirewallRules.php b/fern/sdk/src/FirewallRuleset/Types/FirewallRulesetServerMultipleFirewallRulesCreateFirewallRules.php new file mode 100644 index 00000000..1f812367 --- /dev/null +++ b/fern/sdk/src/FirewallRuleset/Types/FirewallRulesetServerMultipleFirewallRulesCreateFirewallRules.php @@ -0,0 +1,36 @@ + $firewallRule + */ + #[JsonProperty('firewall_rule'), ArrayType([FirewallRulesetServerFirewallRule::class])] + public ?array $firewallRule; + + /** + * @param array{ + * firewallRule?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->firewallRule = $values['firewallRule'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Gateway/GatewayClient.php b/fern/sdk/src/Gateway/GatewayClient.php new file mode 100644 index 00000000..952a77d9 --- /dev/null +++ b/fern/sdk/src/Gateway/GatewayClient.php @@ -0,0 +1,1748 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * List available plans. + * + * @param ListGatewayPlansRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listGatewayPlans(ListGatewayPlansRequest $request = new ListGatewayPlansRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/plans", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [GatewayPlanDetailsResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Get plan details. + * + * @param string $planName Plan identifier + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GatewayPlanDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getGatewayPlan(string $planName, ?array $options = null): GatewayPlanDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/plans/{$planName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GatewayPlanDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * List available services. + * + * @param ListGatewayServicesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listGatewayServices(ListGatewayServicesRequest $request = new ListGatewayServicesRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [GatewayServiceDetailsResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Create a new service. + * + * @param GatewayServiceCreateRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GatewayServiceDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createGatewayService(GatewayServiceCreateRequest $request, ?array $options = null): GatewayServiceDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GatewayServiceDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Get service details. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GatewayServiceDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getGatewayService(string $serviceUuid, ?array $options = null): GatewayServiceDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GatewayServiceDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Replace service configuration. + * + * @param string $serviceUuid Service UUID + * @param GatewayServiceReplaceRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GatewayServiceDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function replaceGatewayService(string $serviceUuid, GatewayServiceReplaceRequest $request, ?array $options = null): GatewayServiceDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}", + method: HttpMethod::PUT, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GatewayServiceDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing service by given {service-identifier}. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteGatewayService(string $serviceUuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modify service configuration. + * + * @param string $serviceUuid Service UUID + * @param GatewayServiceModifyRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GatewayServiceDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyGatewayService(string $serviceUuid, GatewayServiceModifyRequest $request = new GatewayServiceModifyRequest(), ?array $options = null): GatewayServiceDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GatewayServiceDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Flush NAT rules. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function flushGatewayNat(string $serviceUuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/actions/nat-flush-connections", + method: HttpMethod::PATCH, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * List available connections for service. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listGatewayConnections(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/connections", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [GatewayConnectionDetailsResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Create a new connection. + * + * @param string $serviceUuid Service UUID + * @param CreateGatewayConnectionRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GatewayConnectionDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createGatewayConnection(string $serviceUuid, CreateGatewayConnectionRequest $request, ?array $options = null): GatewayConnectionDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/connections", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GatewayConnectionDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Get connection details. + * + * @param string $serviceUuid Service UUID + * @param string $connectionUuid Connection UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GatewayConnectionDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getGatewayConnection(string $serviceUuid, string $connectionUuid, ?array $options = null): GatewayConnectionDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/connections/{$connectionUuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GatewayConnectionDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing connection by given {connection-identifier}. + * + * @param string $serviceUuid Service UUID + * @param string $connectionUuid Connection UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteGatewayConnection(string $serviceUuid, string $connectionUuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/connections/{$connectionUuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modify connection configuration. + * + * @param string $serviceUuid Service UUID + * @param string $connectionUuid Connection UUID + * @param ModifyGatewayConnectionRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GatewayConnectionDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyGatewayConnection(string $serviceUuid, string $connectionUuid, ModifyGatewayConnectionRequest $request, ?array $options = null): GatewayConnectionDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/connections/{$connectionUuid}", + method: HttpMethod::PATCH, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GatewayConnectionDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * List available tunnels for service. + * + * @param string $serviceUuid Service UUID + * @param string $connectionUuid Connection UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listGatewayTunnels(string $serviceUuid, string $connectionUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/connections/{$connectionUuid}/tunnels", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [GatewayTunnelDetailsResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Create a new tunnel. + * + * @param string $serviceUuid Service UUID + * @param string $connectionUuid Connection UUID + * @param CreateGatewayTunnelRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GatewayTunnelDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createGatewayTunnel(string $serviceUuid, string $connectionUuid, CreateGatewayTunnelRequest $request, ?array $options = null): GatewayTunnelDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/connections/{$connectionUuid}/tunnels", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GatewayTunnelDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Get tunnel details. + * + * @param string $serviceUuid Service UUID + * @param string $connectionUuid Connection UUID + * @param string $tunnelUuid Tunnel UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GatewayTunnelDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getGatewayTunnel(string $serviceUuid, string $connectionUuid, string $tunnelUuid, ?array $options = null): GatewayTunnelDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/connections/{$connectionUuid}/tunnels/{$tunnelUuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GatewayTunnelDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing tunnel by given {tunnel-identifier}. + * + * @param string $serviceUuid Service UUID + * @param string $connectionUuid Connection UUID + * @param string $tunnelUuid Tunnel UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteGatewayTunnel(string $serviceUuid, string $connectionUuid, string $tunnelUuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/connections/{$connectionUuid}/tunnels/{$tunnelUuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modify tunnel configuration. + * + * @param string $serviceUuid Service UUID + * @param string $connectionUuid Connection UUID + * @param string $tunnelUuid Tunnel UUID + * @param ModifyGatewayTunnelRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GatewayTunnelDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyGatewayTunnel(string $serviceUuid, string $connectionUuid, string $tunnelUuid, ModifyGatewayTunnelRequest $request, ?array $options = null): GatewayTunnelDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/connections/{$connectionUuid}/tunnels/{$tunnelUuid}", + method: HttpMethod::PATCH, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GatewayTunnelDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * List available service labels for service. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listGatewayServiceLabels(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/labels", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [GatewayLabelDetailsResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Create a new service label. + * + * @param string $serviceUuid Service UUID + * @param CreateGatewayServiceLabelRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createGatewayServiceLabel(string $serviceUuid, CreateGatewayServiceLabelRequest $request, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/labels", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Get service label details. + * + * @param string $serviceUuid Service UUID + * @param string $labelKey Label identifier + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GatewayLabelDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getGatewayServiceLabel(string $serviceUuid, string $labelKey, ?array $options = null): GatewayLabelDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/labels/{$labelKey}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GatewayLabelDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing service label by given {service-label-identifier}. + * + * @param string $serviceUuid Service UUID + * @param string $labelKey Label identifier + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteGatewayServiceLabel(string $serviceUuid, string $labelKey, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/labels/{$labelKey}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modify service label configuration. + * + * @param string $serviceUuid Service UUID + * @param string $labelKey Label identifier + * @param GatewayLabelModifyRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyGatewayServiceLabel(string $serviceUuid, string $labelKey, GatewayLabelModifyRequest $request = new GatewayLabelModifyRequest(), ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/labels/{$labelKey}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * List available service addresses for service. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listGatewayAddresses(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/addresses", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [GatewayAddressDetailsResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Get service address details. + * + * @param string $serviceUuid Service UUID + * @param string $addressName Address identifier + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GatewayAddressDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getGatewayAddress(string $serviceUuid, string $addressName, ?array $options = null): GatewayAddressDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/addresses/{$addressName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GatewayAddressDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modify existing service address by given {service-address-identifier}. + * + * @param string $serviceUuid Service UUID + * @param string $addressName Address identifier + * @param GatewayAddressModifyRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GatewayAddressDetailsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyGatewayAddress(string $serviceUuid, string $addressName, GatewayAddressModifyRequest $request, ?array $options = null): GatewayAddressDetailsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/addresses/{$addressName}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GatewayAddressDetailsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Release the user-provisioned Floating IP of an existing service address by given {service-address-identifier}, reverting it to a service-provisioned address while keeping the same name. + * + * @param string $serviceUuid Service UUID + * @param string $addressName Address identifier + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function releaseGatewayFloatingIp(string $serviceUuid, string $addressName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/addresses/{$addressName}/release", + method: HttpMethod::POST, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * List available service metrics for service. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GatewayServiceMetricsResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getGatewayMetrics(string $serviceUuid, ?array $options = null): GatewayServiceMetricsResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/metrics", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GatewayServiceMetricsResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Create a new service log session. + * + * @param string $serviceUuid Service UUID + * @param GatewayServiceLogSessionCreateRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GatewayServiceLogSessionCreateResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createGatewayServiceLogSession(string $serviceUuid, GatewayServiceLogSessionCreateRequest $request, ?array $options = null): GatewayServiceLogSessionCreateResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/gateway/{$serviceUuid}/logs", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GatewayServiceLogSessionCreateResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Gateway/Requests/CreateGatewayConnectionRequest.php b/fern/sdk/src/Gateway/Requests/CreateGatewayConnectionRequest.php new file mode 100644 index 00000000..af44fb4a --- /dev/null +++ b/fern/sdk/src/Gateway/Requests/CreateGatewayConnectionRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/Gateway/Requests/CreateGatewayServiceLabelRequest.php b/fern/sdk/src/Gateway/Requests/CreateGatewayServiceLabelRequest.php new file mode 100644 index 00000000..2a01f485 --- /dev/null +++ b/fern/sdk/src/Gateway/Requests/CreateGatewayServiceLabelRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/Gateway/Requests/CreateGatewayTunnelRequest.php b/fern/sdk/src/Gateway/Requests/CreateGatewayTunnelRequest.php new file mode 100644 index 00000000..25eaf366 --- /dev/null +++ b/fern/sdk/src/Gateway/Requests/CreateGatewayTunnelRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/Gateway/Requests/GatewayAddressModifyRequest.php b/fern/sdk/src/Gateway/Requests/GatewayAddressModifyRequest.php new file mode 100644 index 00000000..aecd9827 --- /dev/null +++ b/fern/sdk/src/Gateway/Requests/GatewayAddressModifyRequest.php @@ -0,0 +1,26 @@ +address = $values['address']; + } +} diff --git a/fern/sdk/src/Gateway/Requests/GatewayLabelModifyRequest.php b/fern/sdk/src/Gateway/Requests/GatewayLabelModifyRequest.php new file mode 100644 index 00000000..c8fcadc9 --- /dev/null +++ b/fern/sdk/src/Gateway/Requests/GatewayLabelModifyRequest.php @@ -0,0 +1,34 @@ +key = $values['key'] ?? null; + $this->value = $values['value'] ?? null; + } +} diff --git a/fern/sdk/src/Gateway/Requests/GatewayServiceCreateRequest.php b/fern/sdk/src/Gateway/Requests/GatewayServiceCreateRequest.php new file mode 100644 index 00000000..3ebef7c1 --- /dev/null +++ b/fern/sdk/src/Gateway/Requests/GatewayServiceCreateRequest.php @@ -0,0 +1,105 @@ +> $features Active features + */ + #[JsonProperty('features'), ArrayType(['string'])] + public array $features; + + /** + * @var array $routers Service routers + */ + #[JsonProperty('routers'), ArrayType([GatewayRouterCreateRequest::class])] + public array $routers; + + /** + * @var ?array $addresses Service addresses + */ + #[JsonProperty('addresses'), ArrayType([GatewayAddressCreateRequest::class])] + public ?array $addresses; + + /** + * @var ?array $connections Service connections + */ + #[JsonProperty('connections'), ArrayType([GatewayConnectionCreateRequest::class])] + public ?array $connections; + + /** + * @var ?array $labels Labels + */ + #[JsonProperty('labels'), ArrayType([GatewayLabelCreateRequest::class])] + public ?array $labels; + + /** + * @var value-of $configuredStatus + */ + #[JsonProperty('configured_status')] + public string $configuredStatus; + + /** + * @var ?bool $automaticTunnelInternalIpAllocation Allocate and use tunnel internal IPs automatically + */ + #[JsonProperty('automatic_tunnel_internal_ip_allocation')] + public ?bool $automaticTunnelInternalIpAllocation; + + /** + * @param array{ + * name: string, + * plan: string, + * zone: string, + * features: array>, + * routers: array, + * configuredStatus: value-of, + * addresses?: ?array, + * connections?: ?array, + * labels?: ?array, + * automaticTunnelInternalIpAllocation?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->plan = $values['plan']; + $this->zone = $values['zone']; + $this->features = $values['features']; + $this->routers = $values['routers']; + $this->addresses = $values['addresses'] ?? null; + $this->connections = $values['connections'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->configuredStatus = $values['configuredStatus']; + $this->automaticTunnelInternalIpAllocation = $values['automaticTunnelInternalIpAllocation'] ?? null; + } +} diff --git a/fern/sdk/src/Gateway/Requests/GatewayServiceLogSessionCreateRequest.php b/fern/sdk/src/Gateway/Requests/GatewayServiceLogSessionCreateRequest.php new file mode 100644 index 00000000..ccc0aa1e --- /dev/null +++ b/fern/sdk/src/Gateway/Requests/GatewayServiceLogSessionCreateRequest.php @@ -0,0 +1,27 @@ + $sessionType + */ + #[JsonProperty('session_type')] + public string $sessionType; + + /** + * @param array{ + * sessionType: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->sessionType = $values['sessionType']; + } +} diff --git a/fern/sdk/src/Gateway/Requests/GatewayServiceModifyRequest.php b/fern/sdk/src/Gateway/Requests/GatewayServiceModifyRequest.php new file mode 100644 index 00000000..a877e149 --- /dev/null +++ b/fern/sdk/src/Gateway/Requests/GatewayServiceModifyRequest.php @@ -0,0 +1,79 @@ +> $features Active features + */ + #[JsonProperty('features'), ArrayType(['string'])] + public ?array $features; + + /** + * @var ?string $plan Plan + */ + #[JsonProperty('plan')] + public ?string $plan; + + /** + * @var ?value-of $configuredStatus + */ + #[JsonProperty('configured_status')] + public ?string $configuredStatus; + + /** + * @var ?array $connections Service connections + */ + #[JsonProperty('connections'), ArrayType([GatewayConnectionModifyRequest::class])] + public ?array $connections; + + /** + * @var ?array $labels Labels + */ + #[JsonProperty('labels'), ArrayType([GatewayLabelCreateRequest::class])] + public ?array $labels; + + /** + * @var ?bool $automaticTunnelInternalIpAllocation Allocate and use tunnel internal IPs automatically + */ + #[JsonProperty('automatic_tunnel_internal_ip_allocation')] + public ?bool $automaticTunnelInternalIpAllocation; + + /** + * @param array{ + * name?: ?string, + * features?: ?array>, + * plan?: ?string, + * configuredStatus?: ?value-of, + * connections?: ?array, + * labels?: ?array, + * automaticTunnelInternalIpAllocation?: ?bool, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->features = $values['features'] ?? null; + $this->plan = $values['plan'] ?? null; + $this->configuredStatus = $values['configuredStatus'] ?? null; + $this->connections = $values['connections'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->automaticTunnelInternalIpAllocation = $values['automaticTunnelInternalIpAllocation'] ?? null; + } +} diff --git a/fern/sdk/src/Gateway/Requests/GatewayServiceReplaceRequest.php b/fern/sdk/src/Gateway/Requests/GatewayServiceReplaceRequest.php new file mode 100644 index 00000000..d6e7ee5e --- /dev/null +++ b/fern/sdk/src/Gateway/Requests/GatewayServiceReplaceRequest.php @@ -0,0 +1,69 @@ + $configuredStatus + */ + #[JsonProperty('configured_status')] + public string $configuredStatus; + + /** + * @var mixed $connections Service connections + */ + #[JsonProperty('connections')] + public mixed $connections; + + /** + * @var ?array $labels Labels + */ + #[JsonProperty('labels'), ArrayType([GatewayLabelCreateRequest::class])] + public ?array $labels; + + /** + * @var ?bool $automaticTunnelInternalIpAllocation Allocate and use tunnel internal IPs automatically + */ + #[JsonProperty('automatic_tunnel_internal_ip_allocation')] + public ?bool $automaticTunnelInternalIpAllocation; + + /** + * @param array{ + * name: string, + * configuredStatus: value-of, + * plan?: ?string, + * connections?: mixed, + * labels?: ?array, + * automaticTunnelInternalIpAllocation?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->plan = $values['plan'] ?? null; + $this->configuredStatus = $values['configuredStatus']; + $this->connections = $values['connections'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->automaticTunnelInternalIpAllocation = $values['automaticTunnelInternalIpAllocation'] ?? null; + } +} diff --git a/fern/sdk/src/Gateway/Requests/ListGatewayPlansRequest.php b/fern/sdk/src/Gateway/Requests/ListGatewayPlansRequest.php new file mode 100644 index 00000000..cee87f02 --- /dev/null +++ b/fern/sdk/src/Gateway/Requests/ListGatewayPlansRequest.php @@ -0,0 +1,31 @@ +limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + } +} diff --git a/fern/sdk/src/Gateway/Requests/ListGatewayServicesRequest.php b/fern/sdk/src/Gateway/Requests/ListGatewayServicesRequest.php new file mode 100644 index 00000000..0dc7b7bd --- /dev/null +++ b/fern/sdk/src/Gateway/Requests/ListGatewayServicesRequest.php @@ -0,0 +1,39 @@ + $sort Sort resources by field. Prefix with '-' for descending order. + */ + public ?string $sort; + + /** + * @param array{ + * limit?: ?int, + * offset?: ?int, + * sort?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + $this->sort = $values['sort'] ?? null; + } +} diff --git a/fern/sdk/src/Gateway/Requests/ModifyGatewayConnectionRequest.php b/fern/sdk/src/Gateway/Requests/ModifyGatewayConnectionRequest.php new file mode 100644 index 00000000..8441edb0 --- /dev/null +++ b/fern/sdk/src/Gateway/Requests/ModifyGatewayConnectionRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/Gateway/Requests/ModifyGatewayTunnelRequest.php b/fern/sdk/src/Gateway/Requests/ModifyGatewayTunnelRequest.php new file mode 100644 index 00000000..56224d4c --- /dev/null +++ b/fern/sdk/src/Gateway/Requests/ModifyGatewayTunnelRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/IpAddress/IpAddressClient.php b/fern/sdk/src/IpAddress/IpAddressClient.php new file mode 100644 index 00000000..d3d42193 --- /dev/null +++ b/fern/sdk/src/IpAddress/IpAddressClient.php @@ -0,0 +1,440 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Retrieves a list of IP addresses. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return IpAddressesResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listIpAddresses(?array $options = null): IpAddressesResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/ip_address", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return IpAddressesResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Adds a new IP address. + * + * @param AddIpAddressRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return IpAddressRequest + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function addIpAddress(AddIpAddressRequest $request, ?array $options = null): IpAddressRequest + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/ip_address", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return IpAddressRequest::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies attributes of multiple IP addresses in a single request. + * + * @param BulkPatchIpAddressesRequestV13 $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function bulkModifyIpAddresses(BulkPatchIpAddressesRequestV13 $request, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/ip_address/bulk", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Retrieves details of a specific IP address. + * + * @param string $address The IP address to retrieve details for. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return IpAddressResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getIpAddressDetails(string $address, ?array $options = null): IpAddressResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/ip_address/{$address}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return IpAddressResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies attributes of a specific IP address. + * + * @param string $address The IP address to modify. + * @param ModifyIpAddressRequestV10 $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return IpAddressRequest + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyIpAddress(string $address, ModifyIpAddressRequestV10 $request, ?array $options = null): IpAddressRequest + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/ip_address/{$address}", + method: HttpMethod::PUT, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return IpAddressRequest::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a specific IP address. + * + * @param string $address The IP address to delete. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteIpAddress(string $address, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/ip_address/{$address}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies attributes of a specific IP address. + * + * @param string $address The IP address to modify. + * @param PatchIpAddressRequestV13 $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return IpAddressRequest + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function patchModifyIpAddress(string $address, PatchIpAddressRequestV13 $request, ?array $options = null): IpAddressRequest + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/ip_address/{$address}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return IpAddressRequest::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/IpAddress/Requests/AddIpAddressRequest.php b/fern/sdk/src/IpAddress/Requests/AddIpAddressRequest.php new file mode 100644 index 00000000..65258cc4 --- /dev/null +++ b/fern/sdk/src/IpAddress/Requests/AddIpAddressRequest.php @@ -0,0 +1,27 @@ +ipAddress = $values['ipAddress']; + } +} diff --git a/fern/sdk/src/IpAddress/Requests/BulkPatchIpAddressesRequestV13.php b/fern/sdk/src/IpAddress/Requests/BulkPatchIpAddressesRequestV13.php new file mode 100644 index 00000000..9352d429 --- /dev/null +++ b/fern/sdk/src/IpAddress/Requests/BulkPatchIpAddressesRequestV13.php @@ -0,0 +1,28 @@ + $ipAddresses + */ + #[JsonProperty('ip_addresses'), ArrayType([BulkPatchIpAddressesRequestV13IpAddressesItem::class])] + public array $ipAddresses; + + /** + * @param array{ + * ipAddresses: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->ipAddresses = $values['ipAddresses']; + } +} diff --git a/fern/sdk/src/IpAddress/Requests/ModifyIpAddressRequestV10.php b/fern/sdk/src/IpAddress/Requests/ModifyIpAddressRequestV10.php new file mode 100644 index 00000000..2a5d650c --- /dev/null +++ b/fern/sdk/src/IpAddress/Requests/ModifyIpAddressRequestV10.php @@ -0,0 +1,27 @@ +ipAddress = $values['ipAddress']; + } +} diff --git a/fern/sdk/src/IpAddress/Requests/PatchIpAddressRequestV13.php b/fern/sdk/src/IpAddress/Requests/PatchIpAddressRequestV13.php new file mode 100644 index 00000000..5fbcab43 --- /dev/null +++ b/fern/sdk/src/IpAddress/Requests/PatchIpAddressRequestV13.php @@ -0,0 +1,27 @@ +ipAddress = $values['ipAddress']; + } +} diff --git a/fern/sdk/src/IpAddress/Types/AddIpAddressRequestIpAddress.php b/fern/sdk/src/IpAddress/Types/AddIpAddressRequestIpAddress.php new file mode 100644 index 00000000..a9da30fe --- /dev/null +++ b/fern/sdk/src/IpAddress/Types/AddIpAddressRequestIpAddress.php @@ -0,0 +1,101 @@ + $family + */ + #[JsonProperty('family')] + public string $family; + + /** + * @var ?value-of $floating + */ + #[JsonProperty('floating')] + public ?string $floating; + + /** + * @var ?string $mac + */ + #[JsonProperty('mac')] + public ?string $mac; + + /** + * @var ?string $prefix + */ + #[JsonProperty('prefix')] + public ?string $prefix; + + /** + * @var ?value-of $releasePolicy + */ + #[JsonProperty('release_policy')] + public ?string $releasePolicy; + + /** + * @var ?string $server + */ + #[JsonProperty('server')] + public ?string $server; + + /** + * @var ?string $vlanId + */ + #[JsonProperty('vlan_id')] + public ?string $vlanId; + + /** + * @var ?string $zone + */ + #[JsonProperty('zone')] + public ?string $zone; + + /** + * @param array{ + * access: string, + * family: value-of, + * floating?: ?value-of, + * mac?: ?string, + * prefix?: ?string, + * releasePolicy?: ?value-of, + * server?: ?string, + * vlanId?: ?string, + * zone?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->access = $values['access']; + $this->family = $values['family']; + $this->floating = $values['floating'] ?? null; + $this->mac = $values['mac'] ?? null; + $this->prefix = $values['prefix'] ?? null; + $this->releasePolicy = $values['releasePolicy'] ?? null; + $this->server = $values['server'] ?? null; + $this->vlanId = $values['vlanId'] ?? null; + $this->zone = $values['zone'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/IpAddress/Types/BulkPatchIpAddressesRequestV13IpAddressesItem.php b/fern/sdk/src/IpAddress/Types/BulkPatchIpAddressesRequestV13IpAddressesItem.php new file mode 100644 index 00000000..df9960f9 --- /dev/null +++ b/fern/sdk/src/IpAddress/Types/BulkPatchIpAddressesRequestV13IpAddressesItem.php @@ -0,0 +1,59 @@ + $releasePolicy + */ + #[JsonProperty('release_policy')] + public string $releasePolicy; + + /** + * @param array{ + * address: string, + * mainAccountId: int, + * delegatedToAccountId: int, + * releasePolicy: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->address = $values['address']; + $this->mainAccountId = $values['mainAccountId']; + $this->delegatedToAccountId = $values['delegatedToAccountId']; + $this->releasePolicy = $values['releasePolicy']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/IpAddress/Types/ModifyIpAddressRequestV10IpAddress.php b/fern/sdk/src/IpAddress/Types/ModifyIpAddressRequestV10IpAddress.php new file mode 100644 index 00000000..f1aebc15 --- /dev/null +++ b/fern/sdk/src/IpAddress/Types/ModifyIpAddressRequestV10IpAddress.php @@ -0,0 +1,51 @@ + $floating + */ + #[JsonProperty('floating')] + public ?string $floating; + + /** + * @var string $ptrRecord + */ + #[JsonProperty('ptr_record')] + public string $ptrRecord; + + /** + * @var ?string $vlanId + */ + #[JsonProperty('vlan_id')] + public ?string $vlanId; + + /** + * @param array{ + * ptrRecord: string, + * floating?: ?value-of, + * vlanId?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->floating = $values['floating'] ?? null; + $this->ptrRecord = $values['ptrRecord']; + $this->vlanId = $values['vlanId'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/IpAddress/Types/PatchIpAddressRequestV13IpAddress.php b/fern/sdk/src/IpAddress/Types/PatchIpAddressRequestV13IpAddress.php new file mode 100644 index 00000000..014fca77 --- /dev/null +++ b/fern/sdk/src/IpAddress/Types/PatchIpAddressRequestV13IpAddress.php @@ -0,0 +1,51 @@ + $releasePolicy + */ + #[JsonProperty('release_policy')] + public ?string $releasePolicy; + + /** + * @param array{ + * ptrRecord?: ?string, + * mac?: ?string, + * releasePolicy?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->ptrRecord = $values['ptrRecord'] ?? null; + $this->mac = $values['mac'] ?? null; + $this->releasePolicy = $values['releasePolicy'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Kubernetes/KubernetesClient.php b/fern/sdk/src/Kubernetes/KubernetesClient.php new file mode 100644 index 00000000..da4ac698 --- /dev/null +++ b/fern/sdk/src/Kubernetes/KubernetesClient.php @@ -0,0 +1,1413 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Returns a list of Kubernetes clusters. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listKubernetesClusters(?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [KubernetesCluster::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new Kubernetes cluster. + * + * @param KubernetesCluster $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return KubernetesCluster + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createKubernetesCluster(KubernetesCluster $request, ?array $options = null): KubernetesCluster + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return KubernetesCluster::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns Kubernetes cluster details by given `uuid`. + * + * @param string $uuid UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return KubernetesCluster + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getKubernetesCluster(string $uuid, ?array $options = null): KubernetesCluster + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return KubernetesCluster::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes an existing Kubernetes cluster by given `uuid`. + * + * @param string $uuid UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return KubernetesAccepted + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteKubernetesCluster(string $uuid, ?array $options = null): KubernetesAccepted + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return KubernetesAccepted::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies an existing Kubernetes cluster by given `{uuid}`. + * + * @param string $uuid UUID + * @param KubernetesClusterPatch $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return KubernetesCluster + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyKubernetesCluster(string $uuid, KubernetesClusterPatch $request, ?array $options = null): KubernetesCluster + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return KubernetesCluster::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns kubeconfig for Kubernetes cluster by given `{uuid}`. + * + * @param string $uuid UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return KubernetesClusterKubeconfig + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getKubernetesClusterKubeconfig(string $uuid, ?array $options = null): KubernetesClusterKubeconfig + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/kubeconfig", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return KubernetesClusterKubeconfig::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available versions that can be used to upgrade the cluster. + * + * @param string $uuid UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return KubernetesClusterAvailableUpgrades + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getKubernetesClusterAvailableUpgrades(string $uuid, ?array $options = null): KubernetesClusterAvailableUpgrades + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/available-upgrades", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return KubernetesClusterAvailableUpgrades::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Upgrades an existing Kubernetes cluster to specific version. + * + * @param string $uuid UUID + * @param UpgradeKubernetesClusterRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return KubernetesClusterAvailableUpgradesPost + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function upgradeKubernetesCluster(string $uuid, UpgradeKubernetesClusterRequest $request, ?array $options = null): KubernetesClusterAvailableUpgradesPost + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/available-upgrades", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return KubernetesClusterAvailableUpgradesPost::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available node groups of an existing Kubernetes cluster. Cluster is identified by given `{uuid}`. + * + * A node group is a uniform set of worker nodes attached to a cluster. + * + * @param string $uuid UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listKubernetesClusterNodeGroups(string $uuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/node-groups", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [KubernetesNodeGroup::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new node group to an existing Kubernetes cluster. Cluster is identified by given `{uuid}`. + * + * @param string $uuid UUID + * @param CreateKubernetesClusterNodeGroupRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return KubernetesNodeGroup + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createKubernetesClusterNodeGroup(string $uuid, CreateKubernetesClusterNodeGroupRequest $request, ?array $options = null): KubernetesNodeGroup + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/node-groups", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return KubernetesNodeGroup::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns node group details by given `{node_group_name}`. Cluster is identified by given `{uuid}`. + * + * @param string $uuid UUID + * @param string $name Name + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return KubernetesNodeGroupDetails + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getKubernetesClusterNodeGroup(string $uuid, string $name, ?array $options = null): KubernetesNodeGroupDetails + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/node-groups/{$name}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return KubernetesNodeGroupDetails::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes an existing node group by given Kubernetes cluster `{uuid}` and `{node_group_name}`. + * + * @param string $uuid UUID + * @param string $name Name + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return KubernetesAccepted + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteKubernetesClusterNodeGroup(string $uuid, string $name, ?array $options = null): KubernetesAccepted + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/node-groups/{$name}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return KubernetesAccepted::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies an existing node group of a cluster. Cluster is identified by given `{uuid}` and node group by `{node_group_name}`. + * + * @param string $uuid UUID + * @param string $name Name + * @param KubernetesNodeGroupPatch $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return KubernetesNodeGroup + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyKubernetesClusterNodeGroup(string $uuid, string $name, KubernetesNodeGroupPatch $request, ?array $options = null): KubernetesNodeGroup + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/node-groups/{$name}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return KubernetesNodeGroup::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a node group node from a cluster (experimental). Cluster is identified by given `{uuid}`, node group by `{name}`, and node by `{node-name}`. + * + * @param string $uuid UUID + * @param string $name Name + * @param string $nodeName Node name + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return KubernetesAccepted + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteKubernetesClusterNodeGroupNode(string $uuid, string $name, string $nodeName, ?array $options = null): KubernetesAccepted + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/node-groups/{$name}/{$nodeName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return KubernetesAccepted::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available Kubernetes cluster plans. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listKubernetesPlans(?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/plans", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [KubernetesPlan::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available Kubernetes cluster versions. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listKubernetesVersions(?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/versions", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [KubernetesVersion::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns all OIDC authentication issuer configurations for a cluster. + * + * @param string $uuid UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listClusterAuthentication(string $uuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/authentication", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [KubernetesAuthenticationIssuerConfig::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new OIDC authentication issuer configuration. The new entry is validated together with the cluster's existing entries before being applied. Fails if an entry with the same name already exists. + * + * @param string $uuid UUID + * @param CreateClusterAuthenticationRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return KubernetesAuthenticationIssuerConfig + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createClusterAuthentication(string $uuid, CreateClusterAuthenticationRequest $request, ?array $options = null): KubernetesAuthenticationIssuerConfig + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/authentication", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return KubernetesAuthenticationIssuerConfig::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Replaces the entire set of OIDC authentication issuer configurations for a cluster with the supplied JSON list of issuers. The full set is validated before being applied. An empty list clears all issuers. + * + * @param string $uuid UUID + * @param SetClusterAuthenticationRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function setClusterAuthentication(string $uuid, SetClusterAuthenticationRequest $request, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/authentication", + method: HttpMethod::PUT, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [KubernetesAuthenticationIssuerConfig::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Replaces the entire set of OIDC authentication issuer configurations for a cluster with the supplied native kube-apiserver v1 AuthenticationConfiguration YAML document. Issuers are named deterministically from their issuer URL host. The top-level `anonymous` field is not supported and any configuration that would drop data is rejected. + * + * @param string $uuid UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function importClusterAuthentication(string $uuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/authentication/import", + method: HttpMethod::PUT, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [KubernetesAuthenticationIssuerConfig::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * @param string $uuid UUID + * @param string $name Name + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return KubernetesAuthenticationIssuerConfig + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getClusterAuthentication(string $uuid, string $name, ?array $options = null): KubernetesAuthenticationIssuerConfig + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/authentication/{$name}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return KubernetesAuthenticationIssuerConfig::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Updates an existing OIDC authentication issuer configuration. The name in the path is authoritative. The updated entry is validated together with the cluster's other entries before being applied. + * + * @param string $uuid UUID + * @param string $name Name + * @param UpdateClusterAuthenticationRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return KubernetesAuthenticationIssuerConfig + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function updateClusterAuthentication(string $uuid, string $name, UpdateClusterAuthenticationRequest $request, ?array $options = null): KubernetesAuthenticationIssuerConfig + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/authentication/{$name}", + method: HttpMethod::PUT, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return KubernetesAuthenticationIssuerConfig::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Removes an OIDC authentication issuer configuration by name. + * + * @param string $uuid UUID + * @param string $name Name + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteClusterAuthentication(string $uuid, string $name, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/authentication/{$name}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a kubeconfig for the cluster whose user authenticates via the kubelogin (`kubectl oidc-login`) exec credential plugin, using the cluster's configured OIDC issuer identified by the `name` path parameter. The plugin (kubelogin) must be installed on the client. No long-lived credential is embedded. The OIDC client secret and any provider-specific kubelogin flags are not injected by the server; the returned kubeconfig includes comments describing how to add them. + * + * @param string $uuid UUID + * @param string $name Name + * @param GetKubernetesClusterOidcKubeconfigRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return KubernetesClusterKubeconfig + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getKubernetesClusterOidcKubeconfig(string $uuid, string $name, GetKubernetesClusterOidcKubeconfigRequest $request = new GetKubernetesClusterOidcKubeconfigRequest(), ?array $options = null): KubernetesClusterKubeconfig + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->audience !== null) { + $query['audience'] = $request->audience; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/kubernetes/{$uuid}/authentication/{$name}/kubeconfig", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return KubernetesClusterKubeconfig::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Kubernetes/Requests/CreateClusterAuthenticationRequest.php b/fern/sdk/src/Kubernetes/Requests/CreateClusterAuthenticationRequest.php new file mode 100644 index 00000000..f8d9c7bb --- /dev/null +++ b/fern/sdk/src/Kubernetes/Requests/CreateClusterAuthenticationRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/Kubernetes/Requests/CreateKubernetesClusterNodeGroupRequest.php b/fern/sdk/src/Kubernetes/Requests/CreateKubernetesClusterNodeGroupRequest.php new file mode 100644 index 00000000..c73ebe4c --- /dev/null +++ b/fern/sdk/src/Kubernetes/Requests/CreateKubernetesClusterNodeGroupRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/Kubernetes/Requests/GetKubernetesClusterOidcKubeconfigRequest.php b/fern/sdk/src/Kubernetes/Requests/GetKubernetesClusterOidcKubeconfigRequest.php new file mode 100644 index 00000000..8417997e --- /dev/null +++ b/fern/sdk/src/Kubernetes/Requests/GetKubernetesClusterOidcKubeconfigRequest.php @@ -0,0 +1,24 @@ +audience = $values['audience'] ?? null; + } +} diff --git a/fern/sdk/src/Kubernetes/Requests/KubernetesClusterPatch.php b/fern/sdk/src/Kubernetes/Requests/KubernetesClusterPatch.php new file mode 100644 index 00000000..34af8ee3 --- /dev/null +++ b/fern/sdk/src/Kubernetes/Requests/KubernetesClusterPatch.php @@ -0,0 +1,44 @@ + $controlPlaneIpFilter + */ + #[JsonProperty('control_plane_ip_filter'), ArrayType(['string'])] + public ?array $controlPlaneIpFilter; + + /** + * @var mixed $labels + */ + #[JsonProperty('labels')] + public mixed $labels; + + /** + * @var ?value-of $plan + */ + #[JsonProperty('plan')] + public ?string $plan; + + /** + * @param array{ + * labels: mixed, + * controlPlaneIpFilter?: ?array, + * plan?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->controlPlaneIpFilter = $values['controlPlaneIpFilter'] ?? null; + $this->labels = $values['labels']; + $this->plan = $values['plan'] ?? null; + } +} diff --git a/fern/sdk/src/Kubernetes/Requests/KubernetesNodeGroupPatch.php b/fern/sdk/src/Kubernetes/Requests/KubernetesNodeGroupPatch.php new file mode 100644 index 00000000..ef5b0f60 --- /dev/null +++ b/fern/sdk/src/Kubernetes/Requests/KubernetesNodeGroupPatch.php @@ -0,0 +1,26 @@ +count = $values['count']; + } +} diff --git a/fern/sdk/src/Kubernetes/Requests/SetClusterAuthenticationRequest.php b/fern/sdk/src/Kubernetes/Requests/SetClusterAuthenticationRequest.php new file mode 100644 index 00000000..80613c60 --- /dev/null +++ b/fern/sdk/src/Kubernetes/Requests/SetClusterAuthenticationRequest.php @@ -0,0 +1,25 @@ + $body + */ + public array $body; + + /** + * @param array{ + * body: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->body = $values['body']; + } +} diff --git a/fern/sdk/src/Kubernetes/Requests/UpdateClusterAuthenticationRequest.php b/fern/sdk/src/Kubernetes/Requests/UpdateClusterAuthenticationRequest.php new file mode 100644 index 00000000..d8847f76 --- /dev/null +++ b/fern/sdk/src/Kubernetes/Requests/UpdateClusterAuthenticationRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/Kubernetes/Requests/UpgradeKubernetesClusterRequest.php b/fern/sdk/src/Kubernetes/Requests/UpgradeKubernetesClusterRequest.php new file mode 100644 index 00000000..b8d45d62 --- /dev/null +++ b/fern/sdk/src/Kubernetes/Requests/UpgradeKubernetesClusterRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/LoadBalancerClient.php b/fern/sdk/src/LoadBalancer/LoadBalancerClient.php new file mode 100644 index 00000000..abeba6c3 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/LoadBalancerClient.php @@ -0,0 +1,4280 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Returns a list of available load balancer services. + * + * @param ListLoadBalancersRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listLoadBalancers(ListLoadBalancersRequest $request = new ListLoadBalancersRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + if ($request->label !== null) { + $query['label'] = $request->label; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerService::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new load balancer service. + * + * @param LoadBalancerServiceCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerService + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createLoadBalancer(LoadBalancerServiceCreate $request, ?array $options = null): LoadBalancerService + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerService::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns load balancer service details by given {service-uuid}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerService + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancer(string $serviceUuid, ?array $options = null): LoadBalancerService + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerService::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Replaces existing load balancer service by given {service-uuid}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param LoadBalancerServiceReplace $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerService + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function replaceLoadBalancer(string $serviceUuid, LoadBalancerServiceReplace $request, ?array $options = null): LoadBalancerService + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}", + method: HttpMethod::PUT, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerService::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing load balancer service by given {service-uuid}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteLoadBalancer(string $serviceUuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing load balancer service by given {service-uuid}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param LoadBalancerServiceModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerService + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyLoadBalancer(string $serviceUuid, LoadBalancerServiceModify $request = new LoadBalancerServiceModify(), ?array $options = null): LoadBalancerService + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerService::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available service frontends by given {service-uuid}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listLoadBalancerFrontends(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/frontends", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerFrontend::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new service frontend by given {service-uuid}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param CreateLoadBalancerFrontendRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerFrontend + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createLoadBalancerFrontend(string $serviceUuid, CreateLoadBalancerFrontendRequest $request, ?array $options = null): LoadBalancerFrontend + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/frontends", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerFrontend::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns service frontend details by given {service-uuid} and {frontend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $frontendName The unique identifier for the frontend. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerFrontend + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerFrontend(string $serviceUuid, string $frontendName, ?array $options = null): LoadBalancerFrontend + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/frontends/{$frontendName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerFrontend::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing frontend by given {service-uuid} and {frontend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $frontendName The unique identifier for the frontend. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteLoadBalancerFrontend(string $serviceUuid, string $frontendName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/frontends/{$frontendName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing service frontend by given {service-uuid} and {frontend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $frontendName The unique identifier for the frontend. + * @param LoadBalancerFrontendModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerFrontend + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyLoadBalancerFrontend(string $serviceUuid, string $frontendName, LoadBalancerFrontendModify $request = new LoadBalancerFrontendModify(), ?array $options = null): LoadBalancerFrontend + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/frontends/{$frontendName}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerFrontend::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available frontend TLS configs by given {service-uuid} and {frontend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $frontendName The unique identifier for the frontend. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listLoadBalancerFrontendTlsConfigs(string $serviceUuid, string $frontendName, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/frontends/{$frontendName}/tls-configs", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerTlsConfig::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new TLS config by given {service-uuid} and {frontend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $frontendName The unique identifier for the frontend. + * @param CreateLoadBalancerFrontendTlsConfigRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerTlsConfig + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createLoadBalancerFrontendTlsConfig(string $serviceUuid, string $frontendName, CreateLoadBalancerFrontendTlsConfigRequest $request, ?array $options = null): LoadBalancerTlsConfig + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/frontends/{$frontendName}/tls-configs", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerTlsConfig::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns frontend TLS config details by given {service-uuid}, {frontend-name}, and {tls-config-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $frontendName The unique identifier for the frontend. + * @param string $tlsConfigName The unique identifier for the TLS configuration. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerTlsConfig + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerFrontendTlsConfig(string $serviceUuid, string $frontendName, string $tlsConfigName, ?array $options = null): LoadBalancerTlsConfig + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/frontends/{$frontendName}/tls-configs/{$tlsConfigName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerTlsConfig::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing TLS config by given {service-uuid}, {frontend-name}, and {tls-config-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $frontendName The unique identifier for the frontend. + * @param string $tlsConfigName The unique identifier for the TLS configuration. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteLoadBalancerFrontendTlsConfig(string $serviceUuid, string $frontendName, string $tlsConfigName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/frontends/{$frontendName}/tls-configs/{$tlsConfigName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing TLS config by given {service-uuid}, {frontend-name}, and {tls-config-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $frontendName The unique identifier for the frontend. + * @param string $tlsConfigName The unique identifier for the TLS configuration. + * @param ModifyLoadBalancerFrontendTlsConfigRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerTlsConfig + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyLoadBalancerFrontendTlsConfig(string $serviceUuid, string $frontendName, string $tlsConfigName, ModifyLoadBalancerFrontendTlsConfigRequest $request, ?array $options = null): LoadBalancerTlsConfig + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/frontends/{$frontendName}/tls-configs/{$tlsConfigName}", + method: HttpMethod::PATCH, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerTlsConfig::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available frontend rules by given {service-uuid} and {frontend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $frontendName The unique identifier for the frontend. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listLoadBalancerRules(string $serviceUuid, string $frontendName, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/frontends/{$frontendName}/rules", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerRule::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new rule by given {service-uuid} and {frontend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $frontendName The unique identifier for the frontend. + * @param CreateLoadBalancerRuleRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerRule + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createLoadBalancerRule(string $serviceUuid, string $frontendName, CreateLoadBalancerRuleRequest $request, ?array $options = null): LoadBalancerRule + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/frontends/{$frontendName}/rules", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerRule::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns frontend rule details by given {service-uuid}, {frontend-name}, and {rule-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $frontendName The unique identifier for the frontend. + * @param string $ruleName The unique identifier for the rule. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerRule + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerRule(string $serviceUuid, string $frontendName, string $ruleName, ?array $options = null): LoadBalancerRule + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/frontends/{$frontendName}/rules/{$ruleName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerRule::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Replaces existing rule by given {service-uuid}, {frontend-name}, and {rule-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $frontendName The unique identifier for the frontend. + * @param string $ruleName The unique identifier for the rule. + * @param ReplaceLoadBalancerRuleRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerRule + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function replaceLoadBalancerRule(string $serviceUuid, string $frontendName, string $ruleName, ReplaceLoadBalancerRuleRequest $request, ?array $options = null): LoadBalancerRule + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/frontends/{$frontendName}/rules/{$ruleName}", + method: HttpMethod::PUT, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerRule::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing rule by given {service-uuid}, {frontend-name}, and {rule-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $frontendName The unique identifier for the frontend. + * @param string $ruleName The unique identifier for the rule. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteLoadBalancerRule(string $serviceUuid, string $frontendName, string $ruleName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/frontends/{$frontendName}/rules/{$ruleName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing rule by given {service-uuid}, {frontend-name}, and {rule-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $frontendName The unique identifier for the frontend. + * @param string $ruleName The unique identifier for the rule. + * @param LoadBalancerRuleModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerRule + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyLoadBalancerRule(string $serviceUuid, string $frontendName, string $ruleName, LoadBalancerRuleModify $request = new LoadBalancerRuleModify(), ?array $options = null): LoadBalancerRule + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/frontends/{$frontendName}/rules/{$ruleName}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerRule::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available service backends by given {service-uuid}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listLoadBalancerBackends(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/backends", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerBackend::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new backend by given {service-uuid}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param CreateLoadBalancerBackendRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerBackend + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createLoadBalancerBackend(string $serviceUuid, CreateLoadBalancerBackendRequest $request, ?array $options = null): LoadBalancerBackend + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/backends", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerBackend::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns service backend details by given {service-uuid} and {backend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $backendName The unique identifier for the backend. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerBackend + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerBackend(string $serviceUuid, string $backendName, ?array $options = null): LoadBalancerBackend + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/backends/{$backendName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerBackend::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing backend by given {service-uuid} and {backend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $backendName The unique identifier for the backend. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteLoadBalancerBackend(string $serviceUuid, string $backendName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/backends/{$backendName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing backend by given {service-uuid} and {backend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $backendName The unique identifier for the backend. + * @param LoadBalancerBackendModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerBackend + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyLoadBalancerBackend(string $serviceUuid, string $backendName, LoadBalancerBackendModify $request = new LoadBalancerBackendModify(), ?array $options = null): LoadBalancerBackend + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/backends/{$backendName}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerBackend::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available backend members by given {service-uuid} and {backend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $backendName The unique identifier for the backend. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listLoadBalancerMembers(string $serviceUuid, string $backendName, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/backends/{$backendName}/members", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerMember::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new member by given {service-uuid} and {backend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $backendName The unique identifier for the backend. + * @param CreateLoadBalancerMemberRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerMember + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createLoadBalancerMember(string $serviceUuid, string $backendName, CreateLoadBalancerMemberRequest $request, ?array $options = null): LoadBalancerMember + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/backends/{$backendName}/members", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerMember::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns backend member details by given {service-uuid}, {backend-name} and {member-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $backendName The unique identifier for the backend. + * @param string $memberName The unique identifier for the member. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerMember + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerMember(string $serviceUuid, string $backendName, string $memberName, ?array $options = null): LoadBalancerMember + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/backends/{$backendName}/members/{$memberName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerMember::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing member by given {service-uuid}, {backend-name} and {member-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $backendName The unique identifier for the backend. + * @param string $memberName The unique identifier for the member. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteLoadBalancerMember(string $serviceUuid, string $backendName, string $memberName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/backends/{$backendName}/members/{$memberName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing member by given {service-uuid}, {backend-name} and {member-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $backendName The unique identifier for the backend. + * @param string $memberName The unique identifier for the member. + * @param ModifyLoadBalancerMemberRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerMember + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyLoadBalancerMember(string $serviceUuid, string $backendName, string $memberName, ModifyLoadBalancerMemberRequest $request, ?array $options = null): LoadBalancerMember + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/backends/{$backendName}/members/{$memberName}", + method: HttpMethod::PATCH, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerMember::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available backend TLS configs by given {service-uuid} and {backend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $backendName The unique identifier for the backend. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listLoadBalancerBackendTlsConfigs(string $serviceUuid, string $backendName, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/backends/{$backendName}/tls-configs", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerTlsConfig::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new TLS config by given {service-uuid} and {backend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $backendName The unique identifier for the backend. + * @param CreateLoadBalancerBackendTlsConfigRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerTlsConfig + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createLoadBalancerBackendTlsConfig(string $serviceUuid, string $backendName, CreateLoadBalancerBackendTlsConfigRequest $request, ?array $options = null): LoadBalancerTlsConfig + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/backends/{$backendName}/tls-configs", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerTlsConfig::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns backend TLS config details by given {service-uuid}, {backend-name}, and {tls-config-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $backendName The unique identifier for the backend. + * @param string $tlsConfigName The unique identifier for the TLS configuration. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerTlsConfig + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerBackendTlsConfig(string $serviceUuid, string $backendName, string $tlsConfigName, ?array $options = null): LoadBalancerTlsConfig + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/backends/{$backendName}/tls-configs/{$tlsConfigName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerTlsConfig::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing TLS config by given {service-uuid}, {backend-name}, and {tls-config-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $backendName The unique identifier for the backend. + * @param string $tlsConfigName The unique identifier for the TLS configuration. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteLoadBalancerBackendTlsConfig(string $serviceUuid, string $backendName, string $tlsConfigName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/backends/{$backendName}/tls-configs/{$tlsConfigName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing TLS config by given {service-uuid}, {backend-name}, and {tls-config-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $backendName The unique identifier for the backend. + * @param string $tlsConfigName The unique identifier for the TLS configuration. + * @param ModifyLoadBalancerBackendTlsConfigRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerTlsConfig + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyLoadBalancerBackendTlsConfig(string $serviceUuid, string $backendName, string $tlsConfigName, ModifyLoadBalancerBackendTlsConfigRequest $request, ?array $options = null): LoadBalancerTlsConfig + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/backends/{$backendName}/tls-configs/{$tlsConfigName}", + method: HttpMethod::PATCH, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerTlsConfig::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing service network by given {service-uuid} and {network-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $networkName The unique identifier for the network. + * @param LoadBalancerNetworkModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerNetwork + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyLoadBalancerNetwork(string $serviceUuid, string $networkName, LoadBalancerNetworkModify $request = new LoadBalancerNetworkModify(), ?array $options = null): LoadBalancerNetwork + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/networks/{$networkName}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerNetwork::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available IP addresses by given {service-uuid}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listLoadBalancerIpAddresses(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/ip-addresses", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerIpAddress::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Attach a floating public IPv4 address to the service using the specified {service-uuid}. The number of attachable floating IPv4 addresses is limited to the number of nodes in the plan, and all addresses must be in the same zone as the service and detached. + * + * Note: Floating public IPv4 addresses have configurable release policies. When the service is deleted or an IP address is detached, addresses with the keep policy will be converted to detached floating IPs that remain available in your account. Addresses with the release policy will be automatically deleted. For more details, see IP Addresses. + * + * @param string $serviceUuid The unique identifier for the service. + * @param CreateLoadBalancerIpAddressRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerIpAddress + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createLoadBalancerIpAddress(string $serviceUuid, CreateLoadBalancerIpAddressRequest $request, ?array $options = null): LoadBalancerIpAddress + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/ip-addresses", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerIpAddress::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns IP address details by given {service-uuid} and {ip-address}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $ipAddress The unique identifier for the IP address. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerIpAddress(string $serviceUuid, string $ipAddress, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/ip-addresses/{$ipAddress}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerIpAddress::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Detach a floating public IPv4 address from the service by given {service-uuid} and {address}. + * Depending on the release policy, the customer retains the floating IP if the policy is set to keep. + * If the policy is set to release, the floating IP will be deleted. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $ipAddress The unique identifier for the IP address. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteLoadBalancerIpAddress(string $serviceUuid, string $ipAddress, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/ip-addresses/{$ipAddress}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available service domain name resolvers by given {service-uuid}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listLoadBalancerResolvers(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/resolvers", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerResolver::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new resolver by given {service-uuid}. + * + * Resolver is a DNS server usually residing in a user's private network. It's used to resolve IPs for backend members of type dynamic. + * + * @param string $serviceUuid The unique identifier for the service. + * @param CreateLoadBalancerResolverRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerResolver + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createLoadBalancerResolver(string $serviceUuid, CreateLoadBalancerResolverRequest $request, ?array $options = null): LoadBalancerResolver + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/resolvers", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerResolver::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns backend resolver details by given {service-uuid} and {resolver-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $resolverName The unique identifier for the resolver. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerResolver + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerResolver(string $serviceUuid, string $resolverName, ?array $options = null): LoadBalancerResolver + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/resolvers/{$resolverName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerResolver::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing resolver by given {service-uuid} and {resolver-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $resolverName The unique identifier for the resolver. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteLoadBalancerResolver(string $serviceUuid, string $resolverName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/resolvers/{$resolverName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing resolver by given {service-uuid} and {resolver-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $resolverName The unique identifier for the resolver. + * @param LoadBalancerResolverModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerResolver + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyLoadBalancerResolver(string $serviceUuid, string $resolverName, LoadBalancerResolverModify $request = new LoadBalancerResolverModify(), ?array $options = null): LoadBalancerResolver + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/resolvers/{$resolverName}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerResolver::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available service labels by given {service-uuid}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listLoadBalancerLabels(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/labels", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerLabelResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new label by given {service-uuid}. + * + * Labels used for service filtering. + * + * Service labels usage examples + * Below are some examples of what certain GET requests might look like. + * + * exact match: GET /1.3/load-balancer?label=env%3Dstaging + * existence: GET /1.3/load-balancer?label=env + * multiple: GET /1.3/load-balancer?label=env&label=foo%3Dbar + * + * @param string $serviceUuid The unique identifier for the service. + * @param CreateLoadBalancerLabelRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerLabelResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createLoadBalancerLabel(string $serviceUuid, CreateLoadBalancerLabelRequest $request, ?array $options = null): LoadBalancerLabelResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/labels", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerLabelResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns label details by given {service-uuid} and {label-key}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $labelKey The unique identifier for the label. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerLabelResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerLabel(string $serviceUuid, string $labelKey, ?array $options = null): LoadBalancerLabelResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/labels/{$labelKey}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerLabelResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing label by given {service-uuid} and {label-key}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $labelKey The unique identifier for the label. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteLoadBalancerLabel(string $serviceUuid, string $labelKey, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/labels/{$labelKey}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing label by given {service-uuid} and {label-key}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $labelKey The unique identifier for the label. + * @param ModifyLoadBalancerLabelRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerLabelResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyLoadBalancerLabel(string $serviceUuid, string $labelKey, ModifyLoadBalancerLabelRequest $request, ?array $options = null): LoadBalancerLabelResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/labels/{$labelKey}", + method: HttpMethod::PATCH, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerLabelResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns service metrics by given {service-uuid}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerMetrics + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerMetrics(string $serviceUuid, ?array $options = null): LoadBalancerMetrics + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/metrics", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerMetrics::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns service metric series by given {service-uuid}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerMetricsSeries(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/metrics/series", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerMetrics::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns combined frontend metric series by given {service-uuid}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param GetLoadBalancerFrontendCombinedMetricsSeriesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerFrontendCombinedMetricsSeries(string $serviceUuid, GetLoadBalancerFrontendCombinedMetricsSeriesRequest $request = new GetLoadBalancerFrontendCombinedMetricsSeriesRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/metrics/series/frontends", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerFrontendMetricsSeries::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns frontend metric series by given {service-uuid} and {frontend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $frontendName The unique identifier for the frontend. + * @param GetLoadBalancerFrontendMetricsSeriesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerFrontendMetricsSeries(string $serviceUuid, string $frontendName, GetLoadBalancerFrontendMetricsSeriesRequest $request = new GetLoadBalancerFrontendMetricsSeriesRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/metrics/series/frontends/{$frontendName}", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerFrontendMetricsSeries::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns combined backend metric series by given {service-uuid}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param GetLoadBalancerBackendCombinedMetricsSeriesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerBackendCombinedMetricsSeries(string $serviceUuid, GetLoadBalancerBackendCombinedMetricsSeriesRequest $request = new GetLoadBalancerBackendCombinedMetricsSeriesRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/metrics/series/backends", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerBackendMetricsSeries::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns backend metric series by given {service-uuid} and {backend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $backendName The unique identifier for the backend. + * @param GetLoadBalancerBackendMetricsSeriesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerBackendMetricsSeries(string $serviceUuid, string $backendName, GetLoadBalancerBackendMetricsSeriesRequest $request = new GetLoadBalancerBackendMetricsSeriesRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/metrics/series/backends/{$backendName}", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerBackendMetricsSeries::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns combined backend members metric series by given {service-uuid} and {backend-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $backendName The unique identifier for the backend. + * @param GetLoadBalancerMemberCombinedMetricsSeriesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerMemberMetricsSeriesResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerMemberCombinedMetricsSeries(string $serviceUuid, string $backendName, GetLoadBalancerMemberCombinedMetricsSeriesRequest $request = new GetLoadBalancerMemberCombinedMetricsSeriesRequest(), ?array $options = null): LoadBalancerMemberMetricsSeriesResponse + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/metrics/series/backends/{$backendName}/members", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerMemberMetricsSeriesResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns backend member metric series by given {service-uuid}, {backend-name}, and {member-name}. + * + * @param string $serviceUuid The unique identifier for the service. + * @param string $backendName The unique identifier for the backend. + * @param string $memberName The unique identifier for the member. + * @param GetLoadBalancerMemberMetricsSeriesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerMemberMetricsSeriesResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerMemberMetricsSeries(string $serviceUuid, string $backendName, string $memberName, GetLoadBalancerMemberMetricsSeriesRequest $request = new GetLoadBalancerMemberMetricsSeriesRequest(), ?array $options = null): LoadBalancerMemberMetricsSeriesResponse + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/{$serviceUuid}/metrics/series/backends/{$backendName}/members/{$memberName}", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerMemberMetricsSeriesResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available certificate bundles. + * + * @param ListLoadBalancerCertificateBundlesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listLoadBalancerCertificateBundles(ListLoadBalancerCertificateBundlesRequest $request = new ListLoadBalancerCertificateBundlesRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + if ($request->label !== null) { + $query['label'] = $request->label; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/certificate-bundles", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerCertificateBundle::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new certificate bundle. + * + * @param ( + * LoadBalancerCertificateBundleCreateZero + * |LoadBalancerCertificateBundleCreateCertificate + * |LoadBalancerCertificateBundleCreateType + * ) $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerCertificateBundle + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createLoadBalancerCertificateBundle(LoadBalancerCertificateBundleCreateZero|LoadBalancerCertificateBundleCreateCertificate|LoadBalancerCertificateBundleCreateType $request, ?array $options = null): LoadBalancerCertificateBundle + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/certificate-bundles", + method: HttpMethod::POST, + body: JsonSerializer::serializeUnion($request, new Union(LoadBalancerCertificateBundleCreateZero::class, LoadBalancerCertificateBundleCreateCertificate::class, LoadBalancerCertificateBundleCreateType::class)), + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerCertificateBundle::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns certificate bundle details by given {bundle-uuid}. + * + * @param string $bundleUuid The unique identifier for the certificate bundle. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerCertificateBundle + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerCertificateBundle(string $bundleUuid, ?array $options = null): LoadBalancerCertificateBundle + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/certificate-bundles/{$bundleUuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerCertificateBundle::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing certificate bundle by given {bundle-uuid}. + * + * @param string $bundleUuid The unique identifier for the certificate bundle. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteLoadBalancerCertificateBundle(string $bundleUuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/certificate-bundles/{$bundleUuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing a manual, dynamic or authority certificate bundle by given {bundle-uuid}. + * + * @param string $bundleUuid The unique identifier for the certificate bundle. + * @param ModifyLoadBalancerCertificateBundleRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerCertificateBundle + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyLoadBalancerCertificateBundle(string $bundleUuid, ModifyLoadBalancerCertificateBundleRequest $request, ?array $options = null): LoadBalancerCertificateBundle + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/certificate-bundles/{$bundleUuid}", + method: HttpMethod::PATCH, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerCertificateBundle::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available certificate bundle labels by given {bundle-uuid}. + * + * @param string $bundleUuid The unique identifier for the certificate bundle. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listLoadBalancerCertificateBundleLabels(string $bundleUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/certificate-bundles/{$bundleUuid}/labels", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerLabelResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new label by given {bundle-uuid}. + * + * Labels used for certificate bundles filtering. + * + * Certificate bundle labels usage examples + * Below are some examples of what certain GET requests might look like. + * + * exact match: GET /1.3/load-balancer/certificate-bundles?label=env%3Dstaging + * existence: GET /1.3/load-balancer/certificate-bundles?label=env + * multiple: GET /1.3/load-balancer/certificate-bundles?label=env&label=foo%3Dbar + * + * @param string $bundleUuid The unique identifier for the certificate bundle. + * @param CreateLoadBalancerCertificateBundleLabelRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerLabelResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createLoadBalancerCertificateBundleLabel(string $bundleUuid, CreateLoadBalancerCertificateBundleLabelRequest $request, ?array $options = null): LoadBalancerLabelResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/certificate-bundles/{$bundleUuid}/labels", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerLabelResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns label details by given {bundle-uuid} and {label-key}. + * + * @param string $bundleUuid The unique identifier for the certificate bundle. + * @param string $labelKey The unique identifier for the label. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerLabelResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerCertificateBundleLabel(string $bundleUuid, string $labelKey, ?array $options = null): LoadBalancerLabelResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/certificate-bundles/{$bundleUuid}/labels/{$labelKey}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerLabelResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing label by given {bundle-uuid} and {label-key}. + * + * @param string $bundleUuid The unique identifier for the certificate bundle. + * @param string $labelKey The unique identifier for the label. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteLoadBalancerCertificateBundleLabel(string $bundleUuid, string $labelKey, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/certificate-bundles/{$bundleUuid}/labels/{$labelKey}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing label by given {bundle-uuid} and {label-key}. + * + * @param string $bundleUuid The unique identifier for the certificate bundle. + * @param string $labelKey The unique identifier for the label. + * @param ModifyLoadBalancerCertificateBundleLabelRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerLabelResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyLoadBalancerCertificateBundleLabel(string $bundleUuid, string $labelKey, ModifyLoadBalancerCertificateBundleLabelRequest $request, ?array $options = null): LoadBalancerLabelResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/certificate-bundles/{$bundleUuid}/labels/{$labelKey}", + method: HttpMethod::PATCH, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerLabelResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns DNS challenge domain. + * + * This can be used to validate domain ownership using the ACME challenge method. To validate your domain, you need to add CNAME record to the domain provided by this API to your DNS settings. The name/host of the CNAME record should be _acme-challenge or _acme-challenge.mysubdomain if you are setting up a subdomain called mysubdomain. The target/points to of the record needs to be set to the value returned by this API. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerDnsChallengeDomainResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerDnsChallengeDomain(?array $options = null): LoadBalancerDnsChallengeDomainResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/certificate-bundles/dns-challenge-domain", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerDnsChallengeDomainResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available load balancer plans. + * + * @param ListLoadBalancerPlansRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listLoadBalancerPlans(ListLoadBalancerPlansRequest $request = new ListLoadBalancerPlansRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/plans", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [LoadBalancerPlan::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns load balancer plan details by given {plan-name}. + * + * @param string $planName The unique identifier for the plan. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return LoadBalancerPlan + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLoadBalancerPlan(string $planName, ?array $options = null): LoadBalancerPlan + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/load-balancer/plans/{$planName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return LoadBalancerPlan::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerBackendRequest.php b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerBackendRequest.php new file mode 100644 index 00000000..9b0c7afd --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerBackendRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerBackendTlsConfigRequest.php b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerBackendTlsConfigRequest.php new file mode 100644 index 00000000..55fa66db --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerBackendTlsConfigRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerCertificateBundleLabelRequest.php b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerCertificateBundleLabelRequest.php new file mode 100644 index 00000000..94d2e247 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerCertificateBundleLabelRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerFrontendRequest.php b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerFrontendRequest.php new file mode 100644 index 00000000..7ef7f7c6 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerFrontendRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerFrontendTlsConfigRequest.php b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerFrontendTlsConfigRequest.php new file mode 100644 index 00000000..e862fd93 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerFrontendTlsConfigRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerIpAddressRequest.php b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerIpAddressRequest.php new file mode 100644 index 00000000..b214a335 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerIpAddressRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerLabelRequest.php b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerLabelRequest.php new file mode 100644 index 00000000..da7f6703 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerLabelRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerMemberRequest.php b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerMemberRequest.php new file mode 100644 index 00000000..d61b0eaf --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerMemberRequest.php @@ -0,0 +1,32 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerResolverRequest.php b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerResolverRequest.php new file mode 100644 index 00000000..1276f8f2 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerResolverRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerRuleRequest.php b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerRuleRequest.php new file mode 100644 index 00000000..089cc800 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/CreateLoadBalancerRuleRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerBackendCombinedMetricsSeriesRequest.php b/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerBackendCombinedMetricsSeriesRequest.php new file mode 100644 index 00000000..82b8e7a0 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerBackendCombinedMetricsSeriesRequest.php @@ -0,0 +1,25 @@ + $sort Sort metrics by field. Prefix with '-' for descending order. + */ + public ?string $sort; + + /** + * @param array{ + * sort?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->sort = $values['sort'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerBackendMetricsSeriesRequest.php b/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerBackendMetricsSeriesRequest.php new file mode 100644 index 00000000..a510fda5 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerBackendMetricsSeriesRequest.php @@ -0,0 +1,25 @@ + $sort Sort metrics by field. Prefix with '-' for descending order. + */ + public ?string $sort; + + /** + * @param array{ + * sort?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->sort = $values['sort'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerFrontendCombinedMetricsSeriesRequest.php b/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerFrontendCombinedMetricsSeriesRequest.php new file mode 100644 index 00000000..44cc4e32 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerFrontendCombinedMetricsSeriesRequest.php @@ -0,0 +1,25 @@ + $sort Sort metrics by field. Prefix with '-' for descending order. + */ + public ?string $sort; + + /** + * @param array{ + * sort?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->sort = $values['sort'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerFrontendMetricsSeriesRequest.php b/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerFrontendMetricsSeriesRequest.php new file mode 100644 index 00000000..29c90fc5 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerFrontendMetricsSeriesRequest.php @@ -0,0 +1,25 @@ + $sort Sort metrics by field. Prefix with '-' for descending order. + */ + public ?string $sort; + + /** + * @param array{ + * sort?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->sort = $values['sort'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerMemberCombinedMetricsSeriesRequest.php b/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerMemberCombinedMetricsSeriesRequest.php new file mode 100644 index 00000000..b2b71900 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerMemberCombinedMetricsSeriesRequest.php @@ -0,0 +1,25 @@ + $sort Sort metrics by field. Prefix with '-' for descending order. + */ + public ?string $sort; + + /** + * @param array{ + * sort?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->sort = $values['sort'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerMemberMetricsSeriesRequest.php b/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerMemberMetricsSeriesRequest.php new file mode 100644 index 00000000..984167cb --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/GetLoadBalancerMemberMetricsSeriesRequest.php @@ -0,0 +1,25 @@ + $sort Sort metrics by field. Prefix with '-' for descending order. + */ + public ?string $sort; + + /** + * @param array{ + * sort?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->sort = $values['sort'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/ListLoadBalancerCertificateBundlesRequest.php b/fern/sdk/src/LoadBalancer/Requests/ListLoadBalancerCertificateBundlesRequest.php new file mode 100644 index 00000000..ad8aae23 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/ListLoadBalancerCertificateBundlesRequest.php @@ -0,0 +1,38 @@ + $label Filter resources by label. Can be provided multiple times for multiple labels. Format: 'key=value' for exact match or 'key' for existence check. + */ + public ?array $label; + + /** + * @param array{ + * limit?: ?int, + * offset?: ?int, + * label?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + $this->label = $values['label'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/ListLoadBalancerPlansRequest.php b/fern/sdk/src/LoadBalancer/Requests/ListLoadBalancerPlansRequest.php new file mode 100644 index 00000000..8ddb90e5 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/ListLoadBalancerPlansRequest.php @@ -0,0 +1,31 @@ +limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/ListLoadBalancersRequest.php b/fern/sdk/src/LoadBalancer/Requests/ListLoadBalancersRequest.php new file mode 100644 index 00000000..e4dc63b9 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/ListLoadBalancersRequest.php @@ -0,0 +1,46 @@ + $sort Sort resources by field. Prefix with '-' for descending order. + */ + public ?string $sort; + + /** + * @var ?array $label Filter resources by label. Can be provided multiple times for multiple labels. Format: 'key=value' for exact match or 'key' for existence check. + */ + public ?array $label; + + /** + * @param array{ + * limit?: ?int, + * offset?: ?int, + * sort?: ?value-of, + * label?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + $this->sort = $values['sort'] ?? null; + $this->label = $values['label'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/LoadBalancerBackendModify.php b/fern/sdk/src/LoadBalancer/Requests/LoadBalancerBackendModify.php new file mode 100644 index 00000000..8b90ea5a --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/LoadBalancerBackendModify.php @@ -0,0 +1,70 @@ + $members Backend members + */ + #[JsonProperty('members'), ArrayType([new Union(LoadBalancerMemberModifyZero::class, LoadBalancerMemberModifyOne::class)])] + public ?array $members; + + /** + * @var ?array $tlsConfigs TLS Configs + */ + #[JsonProperty('tls_configs'), ArrayType([LoadBalancerTlsConfigCreate::class])] + public ?array $tlsConfigs; + + /** + * @var ?string $resolver Resolver reference + */ + #[JsonProperty('resolver')] + public ?string $resolver; + + /** + * @var ?LoadBalancerBackendPropertiesCreate $properties + */ + #[JsonProperty('properties')] + public ?LoadBalancerBackendPropertiesCreate $properties; + + /** + * @param array{ + * name?: ?string, + * members?: ?array<( + * LoadBalancerMemberModifyZero + * |LoadBalancerMemberModifyOne + * )>, + * tlsConfigs?: ?array, + * resolver?: ?string, + * properties?: ?LoadBalancerBackendPropertiesCreate, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->members = $values['members'] ?? null; + $this->tlsConfigs = $values['tlsConfigs'] ?? null; + $this->resolver = $values['resolver'] ?? null; + $this->properties = $values['properties'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/LoadBalancerFrontendModify.php b/fern/sdk/src/LoadBalancer/Requests/LoadBalancerFrontendModify.php new file mode 100644 index 00000000..557bcd6c --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/LoadBalancerFrontendModify.php @@ -0,0 +1,88 @@ + $mode + */ + #[JsonProperty('mode')] + public ?string $mode; + + /** + * @var ?string $defaultBackend Default backend + */ + #[JsonProperty('default_backend')] + public ?string $defaultBackend; + + /** + * @var ?LoadBalancerFrontendPropertiesCreate $properties + */ + #[JsonProperty('properties')] + public ?LoadBalancerFrontendPropertiesCreate $properties; + + /** + * @var ?array $networks Network names + */ + #[JsonProperty('networks'), ArrayType([LoadBalancerFrontendNetworkCreate::class])] + public ?array $networks; + + /** + * @var ?array $tlsConfigs TLS Configs + */ + #[JsonProperty('tls_configs'), ArrayType([LoadBalancerTlsConfigCreate::class])] + public ?array $tlsConfigs; + + /** + * @var ?array $rules Rules + */ + #[JsonProperty('rules'), ArrayType([LoadBalancerRuleCreate::class])] + public ?array $rules; + + /** + * @param array{ + * name?: ?string, + * port?: ?int, + * mode?: ?value-of, + * defaultBackend?: ?string, + * properties?: ?LoadBalancerFrontendPropertiesCreate, + * networks?: ?array, + * tlsConfigs?: ?array, + * rules?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->port = $values['port'] ?? null; + $this->mode = $values['mode'] ?? null; + $this->defaultBackend = $values['defaultBackend'] ?? null; + $this->properties = $values['properties'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->tlsConfigs = $values['tlsConfigs'] ?? null; + $this->rules = $values['rules'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/LoadBalancerNetworkModify.php b/fern/sdk/src/LoadBalancer/Requests/LoadBalancerNetworkModify.php new file mode 100644 index 00000000..1f09be88 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/LoadBalancerNetworkModify.php @@ -0,0 +1,26 @@ +name = $values['name'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/LoadBalancerResolverModify.php b/fern/sdk/src/LoadBalancer/Requests/LoadBalancerResolverModify.php new file mode 100644 index 00000000..16d7d2e3 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/LoadBalancerResolverModify.php @@ -0,0 +1,75 @@ + $nameservers Nameservers + */ + #[JsonProperty('nameservers'), ArrayType(['string'])] + public ?array $nameservers; + + /** + * @var ?int $retries Number of retries on failure + */ + #[JsonProperty('retries')] + public ?int $retries; + + /** + * @var ?int $timeout Timeout for the query in seconds + */ + #[JsonProperty('timeout')] + public ?int $timeout; + + /** + * @var ?int $timeoutRetry Timeout for the query retries in seconds + */ + #[JsonProperty('timeout_retry')] + public ?int $timeoutRetry; + + /** + * @var ?int $cacheValid Time in seconds to cache valid results + */ + #[JsonProperty('cache_valid')] + public ?int $cacheValid; + + /** + * @var ?int $cacheInvalid Time in seconds to cache invalid results + */ + #[JsonProperty('cache_invalid')] + public ?int $cacheInvalid; + + /** + * @param array{ + * name?: ?string, + * nameservers?: ?array, + * retries?: ?int, + * timeout?: ?int, + * timeoutRetry?: ?int, + * cacheValid?: ?int, + * cacheInvalid?: ?int, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->nameservers = $values['nameservers'] ?? null; + $this->retries = $values['retries'] ?? null; + $this->timeout = $values['timeout'] ?? null; + $this->timeoutRetry = $values['timeoutRetry'] ?? null; + $this->cacheValid = $values['cacheValid'] ?? null; + $this->cacheInvalid = $values['cacheInvalid'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/LoadBalancerRuleModify.php b/fern/sdk/src/LoadBalancer/Requests/LoadBalancerRuleModify.php new file mode 100644 index 00000000..e622ef26 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/LoadBalancerRuleModify.php @@ -0,0 +1,137 @@ + $matchingCondition + */ + #[JsonProperty('matching_condition')] + public ?string $matchingCondition; + + /** + * @var ?array<( + * LoadBalancerMatcherCreateMatchSrcIp + * |LoadBalancerMatcherCreateMatchSrcPort + * |LoadBalancerMatcherCreateMatchBodySize + * |LoadBalancerMatcherCreateMatchCookie + * |LoadBalancerMatcherCreateMatchHeader + * |LoadBalancerMatcherCreateMatchUrlParam + * |LoadBalancerMatcherCreateMatchHttpMethod + * |LoadBalancerMatcherCreateMatchPath + * |LoadBalancerMatcherCreateMatchUrl + * |LoadBalancerMatcherCreateMatchHost + * |LoadBalancerMatcherCreateMatchUrlQuery + * |LoadBalancerMatcherCreateMatchNumMembersUp + * |LoadBalancerMatcherCreateMatchRequestHeader + * |LoadBalancerMatcherCreateMatchResponseHeader + * |LoadBalancerMatcherCreateInverse + * )> $matchers Rule matchers + */ + #[JsonProperty('matchers'), ArrayType([new Union(LoadBalancerMatcherCreateMatchSrcIp::class, LoadBalancerMatcherCreateMatchSrcPort::class, LoadBalancerMatcherCreateMatchBodySize::class, LoadBalancerMatcherCreateMatchCookie::class, LoadBalancerMatcherCreateMatchHeader::class, LoadBalancerMatcherCreateMatchUrlParam::class, LoadBalancerMatcherCreateMatchHttpMethod::class, LoadBalancerMatcherCreateMatchPath::class, LoadBalancerMatcherCreateMatchUrl::class, LoadBalancerMatcherCreateMatchHost::class, LoadBalancerMatcherCreateMatchUrlQuery::class, LoadBalancerMatcherCreateMatchNumMembersUp::class, LoadBalancerMatcherCreateMatchRequestHeader::class, LoadBalancerMatcherCreateMatchResponseHeader::class, LoadBalancerMatcherCreateInverse::class)])] + public ?array $matchers; + + /** + * @var ?array<( + * LoadBalancerActionCreateActionUseBackend + * |LoadBalancerActionCreateActionHttpReturn + * |LoadBalancerActionCreateActionHttpRedirect + * |LoadBalancerActionCreateActionTcpReject + * |LoadBalancerActionCreateActionSetForwardedHeaders + * |LoadBalancerActionCreateActionSetRequestHeader + * |LoadBalancerActionCreateActionSetResponseHeader + * |LoadBalancerActionCreateActionHttpRewritePath + * |LoadBalancerActionCreateActionHttpRewriteUri + * )> $actions Rule actions + */ + #[JsonProperty('actions'), ArrayType([new Union(LoadBalancerActionCreateActionUseBackend::class, LoadBalancerActionCreateActionHttpReturn::class, LoadBalancerActionCreateActionHttpRedirect::class, LoadBalancerActionCreateActionTcpReject::class, LoadBalancerActionCreateActionSetForwardedHeaders::class, LoadBalancerActionCreateActionSetRequestHeader::class, LoadBalancerActionCreateActionSetResponseHeader::class, LoadBalancerActionCreateActionHttpRewritePath::class, LoadBalancerActionCreateActionHttpRewriteUri::class)])] + public ?array $actions; + + /** + * @param array{ + * name?: ?string, + * priority?: ?int, + * matchingCondition?: ?value-of, + * matchers?: ?array<( + * LoadBalancerMatcherCreateMatchSrcIp + * |LoadBalancerMatcherCreateMatchSrcPort + * |LoadBalancerMatcherCreateMatchBodySize + * |LoadBalancerMatcherCreateMatchCookie + * |LoadBalancerMatcherCreateMatchHeader + * |LoadBalancerMatcherCreateMatchUrlParam + * |LoadBalancerMatcherCreateMatchHttpMethod + * |LoadBalancerMatcherCreateMatchPath + * |LoadBalancerMatcherCreateMatchUrl + * |LoadBalancerMatcherCreateMatchHost + * |LoadBalancerMatcherCreateMatchUrlQuery + * |LoadBalancerMatcherCreateMatchNumMembersUp + * |LoadBalancerMatcherCreateMatchRequestHeader + * |LoadBalancerMatcherCreateMatchResponseHeader + * |LoadBalancerMatcherCreateInverse + * )>, + * actions?: ?array<( + * LoadBalancerActionCreateActionUseBackend + * |LoadBalancerActionCreateActionHttpReturn + * |LoadBalancerActionCreateActionHttpRedirect + * |LoadBalancerActionCreateActionTcpReject + * |LoadBalancerActionCreateActionSetForwardedHeaders + * |LoadBalancerActionCreateActionSetRequestHeader + * |LoadBalancerActionCreateActionSetResponseHeader + * |LoadBalancerActionCreateActionHttpRewritePath + * |LoadBalancerActionCreateActionHttpRewriteUri + * )>, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->priority = $values['priority'] ?? null; + $this->matchingCondition = $values['matchingCondition'] ?? null; + $this->matchers = $values['matchers'] ?? null; + $this->actions = $values['actions'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/LoadBalancerServiceCreate.php b/fern/sdk/src/LoadBalancer/Requests/LoadBalancerServiceCreate.php new file mode 100644 index 00000000..73fff25f --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/LoadBalancerServiceCreate.php @@ -0,0 +1,131 @@ + $configuredStatus + */ + #[JsonProperty('configured_status')] + public string $configuredStatus; + + /** + * @var array $frontends Service frontends + */ + #[JsonProperty('frontends'), ArrayType([LoadBalancerFrontendCreate::class])] + public array $frontends; + + /** + * @var ?array $backends Service backends + */ + #[JsonProperty('backends'), ArrayType([LoadBalancerBackendCreate::class])] + public ?array $backends; + + /** + * @var ?array $resolvers Service resolvers + */ + #[JsonProperty('resolvers'), ArrayType([LoadBalancerResolverCreate::class])] + public ?array $resolvers; + + /** + * @var ?string $networkUuid Private Network UUID + */ + #[JsonProperty('network_uuid')] + public ?string $networkUuid; + + /** + * @var ?array $networks Service networks + */ + #[JsonProperty('networks'), ArrayType([LoadBalancerNetworkCreate::class])] + public ?array $networks; + + /** + * @var ?array $labels Labels + */ + #[JsonProperty('labels'), ArrayType([LoadBalancerLabelCreate::class])] + public ?array $labels; + + /** + * @var ?value-of $maintenanceDow + */ + #[JsonProperty('maintenance_dow')] + public ?string $maintenanceDow; + + /** + * @var ?string $maintenanceTime + */ + #[JsonProperty('maintenance_time')] + public ?string $maintenanceTime; + + /** + * @var ?array $ipAddresses List of IP addresses for the network + */ + #[JsonProperty('ip_addresses'), ArrayType([LoadBalancerIpAddressCreate::class])] + public ?array $ipAddresses; + + /** + * @param array{ + * name: string, + * zone: string, + * plan: string, + * configuredStatus: value-of, + * frontends: array, + * backends?: ?array, + * resolvers?: ?array, + * networkUuid?: ?string, + * networks?: ?array, + * labels?: ?array, + * maintenanceDow?: ?value-of, + * maintenanceTime?: ?string, + * ipAddresses?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->zone = $values['zone']; + $this->plan = $values['plan']; + $this->configuredStatus = $values['configuredStatus']; + $this->frontends = $values['frontends']; + $this->backends = $values['backends'] ?? null; + $this->resolvers = $values['resolvers'] ?? null; + $this->networkUuid = $values['networkUuid'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->maintenanceDow = $values['maintenanceDow'] ?? null; + $this->maintenanceTime = $values['maintenanceTime'] ?? null; + $this->ipAddresses = $values['ipAddresses'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/LoadBalancerServiceModify.php b/fern/sdk/src/LoadBalancer/Requests/LoadBalancerServiceModify.php new file mode 100644 index 00000000..1f62112c --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/LoadBalancerServiceModify.php @@ -0,0 +1,106 @@ + $configuredStatus + */ + #[JsonProperty('configured_status')] + public ?string $configuredStatus; + + /** + * @var ?array $frontends Service frontends + */ + #[JsonProperty('frontends'), ArrayType([LoadBalancerFrontendCreate::class])] + public ?array $frontends; + + /** + * @var ?array $backends Service backends + */ + #[JsonProperty('backends'), ArrayType([LoadBalancerBackendCreate::class])] + public ?array $backends; + + /** + * @var ?array $resolvers Service resolvers + */ + #[JsonProperty('resolvers'), ArrayType([LoadBalancerResolverCreate::class])] + public ?array $resolvers; + + /** + * @var ?array $labels Labels + */ + #[JsonProperty('labels'), ArrayType([LoadBalancerLabelCreate::class])] + public ?array $labels; + + /** + * @var ?value-of $maintenanceDow + */ + #[JsonProperty('maintenance_dow')] + public ?string $maintenanceDow; + + /** + * @var ?string $maintenanceTime + */ + #[JsonProperty('maintenance_time')] + public ?string $maintenanceTime; + + /** + * @var ?array $ipAddresses List of IP addresses for the network + */ + #[JsonProperty('ip_addresses'), ArrayType([LoadBalancerIpAddressCreate::class])] + public ?array $ipAddresses; + + /** + * @param array{ + * name?: ?string, + * plan?: ?string, + * configuredStatus?: ?value-of, + * frontends?: ?array, + * backends?: ?array, + * resolvers?: ?array, + * labels?: ?array, + * maintenanceDow?: ?value-of, + * maintenanceTime?: ?string, + * ipAddresses?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->plan = $values['plan'] ?? null; + $this->configuredStatus = $values['configuredStatus'] ?? null; + $this->frontends = $values['frontends'] ?? null; + $this->backends = $values['backends'] ?? null; + $this->resolvers = $values['resolvers'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->maintenanceDow = $values['maintenanceDow'] ?? null; + $this->maintenanceTime = $values['maintenanceTime'] ?? null; + $this->ipAddresses = $values['ipAddresses'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/LoadBalancerServiceReplace.php b/fern/sdk/src/LoadBalancer/Requests/LoadBalancerServiceReplace.php new file mode 100644 index 00000000..53f2c86e --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/LoadBalancerServiceReplace.php @@ -0,0 +1,106 @@ + $configuredStatus + */ + #[JsonProperty('configured_status')] + public string $configuredStatus; + + /** + * @var ?array $frontends Service frontends + */ + #[JsonProperty('frontends'), ArrayType([LoadBalancerFrontendCreate::class])] + public ?array $frontends; + + /** + * @var ?array $backends Service backends + */ + #[JsonProperty('backends'), ArrayType([LoadBalancerBackendCreate::class])] + public ?array $backends; + + /** + * @var ?array $resolvers Service resolvers + */ + #[JsonProperty('resolvers'), ArrayType([LoadBalancerResolverCreate::class])] + public ?array $resolvers; + + /** + * @var ?array $labels Labels + */ + #[JsonProperty('labels'), ArrayType([LoadBalancerLabelCreate::class])] + public ?array $labels; + + /** + * @var ?value-of $maintenanceDow + */ + #[JsonProperty('maintenance_dow')] + public ?string $maintenanceDow; + + /** + * @var ?string $maintenanceTime + */ + #[JsonProperty('maintenance_time')] + public ?string $maintenanceTime; + + /** + * @var ?array $ipAddresses List of IP addresses for the network + */ + #[JsonProperty('ip_addresses'), ArrayType([LoadBalancerIpAddressCreate::class])] + public ?array $ipAddresses; + + /** + * @param array{ + * name: string, + * plan: string, + * configuredStatus: value-of, + * frontends?: ?array, + * backends?: ?array, + * resolvers?: ?array, + * labels?: ?array, + * maintenanceDow?: ?value-of, + * maintenanceTime?: ?string, + * ipAddresses?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->plan = $values['plan']; + $this->configuredStatus = $values['configuredStatus']; + $this->frontends = $values['frontends'] ?? null; + $this->backends = $values['backends'] ?? null; + $this->resolvers = $values['resolvers'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->maintenanceDow = $values['maintenanceDow'] ?? null; + $this->maintenanceTime = $values['maintenanceTime'] ?? null; + $this->ipAddresses = $values['ipAddresses'] ?? null; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerBackendTlsConfigRequest.php b/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerBackendTlsConfigRequest.php new file mode 100644 index 00000000..76604cd7 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerBackendTlsConfigRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerCertificateBundleLabelRequest.php b/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerCertificateBundleLabelRequest.php new file mode 100644 index 00000000..f1d81602 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerCertificateBundleLabelRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerCertificateBundleRequest.php b/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerCertificateBundleRequest.php new file mode 100644 index 00000000..d50a6a24 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerCertificateBundleRequest.php @@ -0,0 +1,35 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerFrontendTlsConfigRequest.php b/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerFrontendTlsConfigRequest.php new file mode 100644 index 00000000..1f9524a9 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerFrontendTlsConfigRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerLabelRequest.php b/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerLabelRequest.php new file mode 100644 index 00000000..f5cfe203 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerLabelRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerMemberRequest.php b/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerMemberRequest.php new file mode 100644 index 00000000..d44d0070 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/ModifyLoadBalancerMemberRequest.php @@ -0,0 +1,32 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/LoadBalancer/Requests/ReplaceLoadBalancerRuleRequest.php b/fern/sdk/src/LoadBalancer/Requests/ReplaceLoadBalancerRuleRequest.php new file mode 100644 index 00000000..49971ed3 --- /dev/null +++ b/fern/sdk/src/LoadBalancer/Requests/ReplaceLoadBalancerRuleRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/Network/NetworkClient.php b/fern/sdk/src/Network/NetworkClient.php new file mode 100644 index 00000000..cd5a4b01 --- /dev/null +++ b/fern/sdk/src/Network/NetworkClient.php @@ -0,0 +1,560 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Get a list of all networks. + * + * It is also possible to filter networks with label URL parameters, e.g. + * `?label=env` or `?label=env%3Dprod`. URL parameter can be given multiple + * times to add more filters (e.g. `?label=env%3Dprod&label=v2`), where + * only networks that match all labels are returned. + * Label keys are matched case insensitively. + * + * @param ListNetworksRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Networks + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listNetworks(ListNetworksRequest $request = new ListNetworksRequest(), ?array $options = null): Networks + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->label !== null) { + $query['label'] = $request->label; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/network", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Networks::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new SDN private network that cloud servers from the same zone can be attached to. + * + * @param CreateNetworkRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Network + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createNetwork(CreateNetworkRequest $request, ?array $options = null): Network + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/network", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Network::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Retrieves a list of network interfaces. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return NetworkInterfaces + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listNetworkInterfaces(?array $options = null): NetworkInterfaces + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/network/interface", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return NetworkInterfaces::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new network interface. + * + * @param NetworkCreateInterfaceRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return NetworkInterface + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createNetworkInterface(NetworkCreateInterfaceRequest $request = new NetworkCreateInterfaceRequest(), ?array $options = null): NetworkInterface + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/network/interface", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return NetworkInterface::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Retrieves details of a specific network interface. + * + * @param string $uuid UUID of the network interface. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Network + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getNetworkInterfaceDetails(string $uuid, ?array $options = null): Network + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/network/interface/{$uuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Network::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a specific network interface. + * + * @param string $uuid UUID of the network. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteNetworkInterface(string $uuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/network/interface/{$uuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Retrieves details of a specific network. + * + * @param string $uuid UUID of the network. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Network + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getNetworkDetails(string $uuid, ?array $options = null): Network + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/network/{$uuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Network::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies the details of a specific SDN private network. The Utility and public networks cannot be modified. + * + * @param string $uuid UUID of the network. + * @param ModifyNetworkRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Network + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyNetwork(string $uuid, ModifyNetworkRequest $request, ?array $options = null): Network + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/network/{$uuid}", + method: HttpMethod::PUT, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Network::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes an SDN private network. All attached cloud servers must first be detached before SDN private networks can be deleted. Utility and public networks can only be detached from servers by [Releasing the corresponding IP addresses](https://upcloudltd.github.io/upcloud-openapi-spec/api/ip-address#delete-ip-address). + * + * @param string $uuid UUID of the network. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteNetwork(string $uuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/network/{$uuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Network/Requests/CreateNetworkRequest.php b/fern/sdk/src/Network/Requests/CreateNetworkRequest.php new file mode 100644 index 00000000..49aba2c9 --- /dev/null +++ b/fern/sdk/src/Network/Requests/CreateNetworkRequest.php @@ -0,0 +1,27 @@ +network = $values['network']; + } +} diff --git a/fern/sdk/src/Network/Requests/ListNetworksRequest.php b/fern/sdk/src/Network/Requests/ListNetworksRequest.php new file mode 100644 index 00000000..ac0c0598 --- /dev/null +++ b/fern/sdk/src/Network/Requests/ListNetworksRequest.php @@ -0,0 +1,25 @@ +label = $values['label'] ?? null; + } +} diff --git a/fern/sdk/src/Network/Requests/ModifyNetworkRequest.php b/fern/sdk/src/Network/Requests/ModifyNetworkRequest.php new file mode 100644 index 00000000..4cae8417 --- /dev/null +++ b/fern/sdk/src/Network/Requests/ModifyNetworkRequest.php @@ -0,0 +1,27 @@ +network = $values['network']; + } +} diff --git a/fern/sdk/src/Network/Requests/NetworkCreateInterfaceRequest.php b/fern/sdk/src/Network/Requests/NetworkCreateInterfaceRequest.php new file mode 100644 index 00000000..2ba9f7dd --- /dev/null +++ b/fern/sdk/src/Network/Requests/NetworkCreateInterfaceRequest.php @@ -0,0 +1,35 @@ +mainAccountId = $values['mainAccountId'] ?? null; + $this->interface = $values['interface'] ?? null; + } +} diff --git a/fern/sdk/src/Network/Types/CreateNetworkRequestNetwork.php b/fern/sdk/src/Network/Types/CreateNetworkRequestNetwork.php new file mode 100644 index 00000000..2f38fd8b --- /dev/null +++ b/fern/sdk/src/Network/Types/CreateNetworkRequestNetwork.php @@ -0,0 +1,76 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var string $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var string $zone + */ + #[JsonProperty('zone')] + public string $zone; + + /** + * @var ?string $router + */ + #[JsonProperty('router')] + public ?string $router; + + /** + * @var CreateNetworkRequestNetworkIpNetworks $ipNetworks + */ + #[JsonProperty('ip_networks')] + public CreateNetworkRequestNetworkIpNetworks $ipNetworks; + + /** + * @var ?NetworkLabels $labels + */ + #[JsonProperty('labels')] + public ?NetworkLabels $labels; + + /** + * @param array{ + * type: value-of, + * name: string, + * zone: string, + * ipNetworks: CreateNetworkRequestNetworkIpNetworks, + * router?: ?string, + * labels?: ?NetworkLabels, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->name = $values['name']; + $this->zone = $values['zone']; + $this->router = $values['router'] ?? null; + $this->ipNetworks = $values['ipNetworks']; + $this->labels = $values['labels'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Network/Types/CreateNetworkRequestNetworkIpNetworks.php b/fern/sdk/src/Network/Types/CreateNetworkRequestNetworkIpNetworks.php new file mode 100644 index 00000000..88ca99bb --- /dev/null +++ b/fern/sdk/src/Network/Types/CreateNetworkRequestNetworkIpNetworks.php @@ -0,0 +1,35 @@ + $ipNetwork + */ + #[JsonProperty('ip_network'), ArrayType([CreateNetworkRequestNetworkIpNetworksIpNetworkItem::class])] + public array $ipNetwork; + + /** + * @param array{ + * ipNetwork: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->ipNetwork = $values['ipNetwork']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Network/Types/CreateNetworkRequestNetworkIpNetworksIpNetworkItem.php b/fern/sdk/src/Network/Types/CreateNetworkRequestNetworkIpNetworksIpNetworkItem.php new file mode 100644 index 00000000..572e31a0 --- /dev/null +++ b/fern/sdk/src/Network/Types/CreateNetworkRequestNetworkIpNetworksIpNetworkItem.php @@ -0,0 +1,101 @@ + $family + */ + #[JsonProperty('family')] + public string $family; + + /** + * @var string $address + */ + #[JsonProperty('address')] + public string $address; + + /** + * @var ?string $gateway + */ + #[JsonProperty('gateway')] + public ?string $gateway; + + /** + * @var value-of $dhcp + */ + #[JsonProperty('dhcp')] + public string $dhcp; + + /** + * @var ?value-of $dhcpDefaultRoute + */ + #[JsonProperty('dhcp_default_route')] + public ?string $dhcpDefaultRoute; + + /** + * @var ?array $dhcpDns + */ + #[JsonProperty('dhcp_dns'), ArrayType(['string'])] + public ?array $dhcpDns; + + /** + * @var ?array $dhcpRoutes + */ + #[JsonProperty('dhcp_routes'), ArrayType(['string'])] + public ?array $dhcpRoutes; + + /** + * @var ?string $dhcpBootfileUrl + */ + #[JsonProperty('dhcp_bootfile_url')] + public ?string $dhcpBootfileUrl; + + /** + * @var ?CreateNetworkRequestNetworkIpNetworksIpNetworkItemDhcpRoutesConfiguration $dhcpRoutesConfiguration + */ + #[JsonProperty('dhcp_routes_configuration')] + public ?CreateNetworkRequestNetworkIpNetworksIpNetworkItemDhcpRoutesConfiguration $dhcpRoutesConfiguration; + + /** + * @param array{ + * family: value-of, + * address: string, + * dhcp: value-of, + * gateway?: ?string, + * dhcpDefaultRoute?: ?value-of, + * dhcpDns?: ?array, + * dhcpRoutes?: ?array, + * dhcpBootfileUrl?: ?string, + * dhcpRoutesConfiguration?: ?CreateNetworkRequestNetworkIpNetworksIpNetworkItemDhcpRoutesConfiguration, + * } $values + */ + public function __construct( + array $values, + ) { + $this->family = $values['family']; + $this->address = $values['address']; + $this->gateway = $values['gateway'] ?? null; + $this->dhcp = $values['dhcp']; + $this->dhcpDefaultRoute = $values['dhcpDefaultRoute'] ?? null; + $this->dhcpDns = $values['dhcpDns'] ?? null; + $this->dhcpRoutes = $values['dhcpRoutes'] ?? null; + $this->dhcpBootfileUrl = $values['dhcpBootfileUrl'] ?? null; + $this->dhcpRoutesConfiguration = $values['dhcpRoutesConfiguration'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Network/Types/CreateNetworkRequestNetworkIpNetworksIpNetworkItemDhcpRoutesConfiguration.php b/fern/sdk/src/Network/Types/CreateNetworkRequestNetworkIpNetworksIpNetworkItemDhcpRoutesConfiguration.php new file mode 100644 index 00000000..4171d123 --- /dev/null +++ b/fern/sdk/src/Network/Types/CreateNetworkRequestNetworkIpNetworksIpNetworkItemDhcpRoutesConfiguration.php @@ -0,0 +1,34 @@ +effectiveRoutesAutoPopulation = $values['effectiveRoutesAutoPopulation'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Network/Types/CreateNetworkRequestNetworkIpNetworksIpNetworkItemDhcpRoutesConfigurationEffectiveRoutesAutoPopulation.php b/fern/sdk/src/Network/Types/CreateNetworkRequestNetworkIpNetworksIpNetworkItemDhcpRoutesConfigurationEffectiveRoutesAutoPopulation.php new file mode 100644 index 00000000..c0ba1196 --- /dev/null +++ b/fern/sdk/src/Network/Types/CreateNetworkRequestNetworkIpNetworksIpNetworkItemDhcpRoutesConfigurationEffectiveRoutesAutoPopulation.php @@ -0,0 +1,60 @@ + $enabled + */ + #[JsonProperty('enabled')] + public ?string $enabled; + + /** + * @var ?array $excludeBySource + */ + #[JsonProperty('exclude_by_source'), ArrayType(['string'])] + public ?array $excludeBySource; + + /** + * @var ?array $filterByDestination + */ + #[JsonProperty('filter_by_destination'), ArrayType(['string'])] + public ?array $filterByDestination; + + /** + * @var ?array $filterByRouteType + */ + #[JsonProperty('filter_by_route_type'), ArrayType(['string'])] + public ?array $filterByRouteType; + + /** + * @param array{ + * enabled?: ?value-of, + * excludeBySource?: ?array, + * filterByDestination?: ?array, + * filterByRouteType?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->enabled = $values['enabled'] ?? null; + $this->excludeBySource = $values['excludeBySource'] ?? null; + $this->filterByDestination = $values['filterByDestination'] ?? null; + $this->filterByRouteType = $values['filterByRouteType'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Network/Types/ModifyNetworkRequestNetwork.php b/fern/sdk/src/Network/Types/ModifyNetworkRequestNetwork.php new file mode 100644 index 00000000..6eece8b1 --- /dev/null +++ b/fern/sdk/src/Network/Types/ModifyNetworkRequestNetwork.php @@ -0,0 +1,118 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var string $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var string $zone + */ + #[JsonProperty('zone')] + public string $zone; + + /** + * @var NetworkTags $tags + */ + #[JsonProperty('tags')] + public NetworkTags $tags; + + /** + * @var NetworkLabels $labels + */ + #[JsonProperty('labels')] + public NetworkLabels $labels; + + /** + * @var string $router + */ + #[JsonProperty('router')] + public string $router; + + /** + * @var int $grtExport + */ + #[JsonProperty('grt_export')] + public int $grtExport; + + /** + * @var string $parentNetwork + */ + #[JsonProperty('parent_network')] + public string $parentNetwork; + + /** + * @var ModifyNetworkRequestNetworkIpNetworks $ipNetworks + */ + #[JsonProperty('ip_networks')] + public ModifyNetworkRequestNetworkIpNetworks $ipNetworks; + + /** + * @var value-of $networkFeatures + */ + #[JsonProperty('network_features')] + public string $networkFeatures; + + /** + * @var int $mainAccountId + */ + #[JsonProperty('main_account_id')] + public int $mainAccountId; + + /** + * @param array{ + * type: value-of, + * name: string, + * zone: string, + * tags: NetworkTags, + * labels: NetworkLabels, + * router: string, + * grtExport: int, + * parentNetwork: string, + * ipNetworks: ModifyNetworkRequestNetworkIpNetworks, + * networkFeatures: value-of, + * mainAccountId: int, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->name = $values['name']; + $this->zone = $values['zone']; + $this->tags = $values['tags']; + $this->labels = $values['labels']; + $this->router = $values['router']; + $this->grtExport = $values['grtExport']; + $this->parentNetwork = $values['parentNetwork']; + $this->ipNetworks = $values['ipNetworks']; + $this->networkFeatures = $values['networkFeatures']; + $this->mainAccountId = $values['mainAccountId']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Network/Types/ModifyNetworkRequestNetworkIpNetworks.php b/fern/sdk/src/Network/Types/ModifyNetworkRequestNetworkIpNetworks.php new file mode 100644 index 00000000..9577d14b --- /dev/null +++ b/fern/sdk/src/Network/Types/ModifyNetworkRequestNetworkIpNetworks.php @@ -0,0 +1,35 @@ + $ipNetwork + */ + #[JsonProperty('ip_network'), ArrayType([ModifyNetworkRequestNetworkIpNetworksIpNetworkItem::class])] + public array $ipNetwork; + + /** + * @param array{ + * ipNetwork: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->ipNetwork = $values['ipNetwork']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Network/Types/ModifyNetworkRequestNetworkIpNetworksIpNetworkItem.php b/fern/sdk/src/Network/Types/ModifyNetworkRequestNetworkIpNetworksIpNetworkItem.php new file mode 100644 index 00000000..6f77b413 --- /dev/null +++ b/fern/sdk/src/Network/Types/ModifyNetworkRequestNetworkIpNetworksIpNetworkItem.php @@ -0,0 +1,92 @@ + $family + */ + #[JsonProperty('family')] + public string $family; + + /** + * @var string $address + */ + #[JsonProperty('address')] + public string $address; + + /** + * @var ?string $gateway + */ + #[JsonProperty('gateway')] + public ?string $gateway; + + /** + * @var ?string $dhcp + */ + #[JsonProperty('dhcp')] + public ?string $dhcp; + + /** + * @var ?string $dhcpDefaultRoute + */ + #[JsonProperty('dhcp_default_route')] + public ?string $dhcpDefaultRoute; + + /** + * @var ?array $dhcpDns + */ + #[JsonProperty('dhcp_dns'), ArrayType(['string'])] + public ?array $dhcpDns; + + /** + * @var ?array $dhcpRoutes + */ + #[JsonProperty('dhcp_routes'), ArrayType(['string'])] + public ?array $dhcpRoutes; + + /** + * @var ?string $dhcpBootfileUrl + */ + #[JsonProperty('dhcp_bootfile_url')] + public ?string $dhcpBootfileUrl; + + /** + * @param array{ + * family: value-of, + * address: string, + * gateway?: ?string, + * dhcp?: ?string, + * dhcpDefaultRoute?: ?string, + * dhcpDns?: ?array, + * dhcpRoutes?: ?array, + * dhcpBootfileUrl?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->family = $values['family']; + $this->address = $values['address']; + $this->gateway = $values['gateway'] ?? null; + $this->dhcp = $values['dhcp'] ?? null; + $this->dhcpDefaultRoute = $values['dhcpDefaultRoute'] ?? null; + $this->dhcpDns = $values['dhcpDns'] ?? null; + $this->dhcpRoutes = $values['dhcpRoutes'] ?? null; + $this->dhcpBootfileUrl = $values['dhcpBootfileUrl'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Network/Types/NetworkCreateInterfaceRequestInterface.php b/fern/sdk/src/Network/Types/NetworkCreateInterfaceRequestInterface.php new file mode 100644 index 00000000..68581e2c --- /dev/null +++ b/fern/sdk/src/Network/Types/NetworkCreateInterfaceRequestInterface.php @@ -0,0 +1,69 @@ + $bootable + */ + #[JsonProperty('bootable')] + public string $bootable; + + /** + * @var string $network + */ + #[JsonProperty('network')] + public string $network; + + /** + * @var value-of $sourceIpFiltering + */ + #[JsonProperty('source_ip_filtering')] + public string $sourceIpFiltering; + + /** + * @var value-of $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?array $labels + */ + #[JsonProperty('labels'), ArrayType([NetworkCreateInterfaceRequestInterfaceLabelsItem::class])] + public ?array $labels; + + /** + * @param array{ + * bootable: value-of, + * network: string, + * sourceIpFiltering: value-of, + * type: value-of, + * labels?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->bootable = $values['bootable']; + $this->network = $values['network']; + $this->sourceIpFiltering = $values['sourceIpFiltering']; + $this->type = $values['type']; + $this->labels = $values['labels'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Network/Types/NetworkCreateInterfaceRequestInterfaceLabelsItem.php b/fern/sdk/src/Network/Types/NetworkCreateInterfaceRequestInterfaceLabelsItem.php new file mode 100644 index 00000000..5934af43 --- /dev/null +++ b/fern/sdk/src/Network/Types/NetworkCreateInterfaceRequestInterfaceLabelsItem.php @@ -0,0 +1,51 @@ + $visible + */ + #[JsonProperty('visible')] + public string $visible; + + /** + * @param array{ + * key: string, + * value: string, + * visible: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->key = $values['key']; + $this->value = $values['value']; + $this->visible = $values['visible']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/NetworkPeering/NetworkPeeringClient.php b/fern/sdk/src/NetworkPeering/NetworkPeeringClient.php new file mode 100644 index 00000000..2c507b33 --- /dev/null +++ b/fern/sdk/src/NetworkPeering/NetworkPeeringClient.php @@ -0,0 +1,360 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Get a list of all peerings within the current account. Only peerings that refer to a network that the current + * account has access are returned. + * + * It is also possible to filter network peering with label URL parameters, e.g. + * `?label=env` or `?label=env%3Dprod`. The URL parameter can be given multiple + * times to add more filters (e.g. `?label=env%3Dprod&label=v2`), where + * only network peering that match all labels are returned. + * Label keys are matched case insensitively. + * + * @param ListNetworkPeeringsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return NetworkPeerings + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listNetworkPeerings(ListNetworkPeeringsRequest $request = new ListNetworkPeeringsRequest(), ?array $options = null): NetworkPeerings + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->uuid !== null) { + $query['uuid'] = $request->uuid; + } + if ($request->networkUuidLocal !== null) { + $query['network_uuid_local'] = $request->networkUuidLocal; + } + if ($request->networkUuidPeer !== null) { + $query['network_uuid_peer'] = $request->networkUuidPeer; + } + if ($request->label !== null) { + $query['label'] = $request->label; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/network-peering", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return NetworkPeerings::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Network peerings are used to enable traffic between two networks that can be on different main accounts. + * The peering must be established both ways before it's considered as active. Peering is only supported between networks + * of type `private`. + * + * **Note**: you should only create peering between accounts and networks you trust. There is no limits on what traffic + * can flow. The server firewall **has no effect** for `private` type networks. + * + * It is required that both networks have a *Router* attached to the network. + * + * @param NetworkPeeringCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return NetworkPeering + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createNetworkPeering(NetworkPeeringCreate $request, ?array $options = null): NetworkPeering + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/network-peering", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return NetworkPeering::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns the state of an existing network peering. + * + * Note that the `peer_network` field only contains the network details if the peering has been defined by both accounts. + * + * @param string $peeringUuid The network peering identifier. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return NetworkPeering + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getNetworkPeering(string $peeringUuid, ?array $options = null): NetworkPeering + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/network-peering/{$peeringUuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return NetworkPeering::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a network peering. It is required that the peering is in `disabled` state before delete is possible. + * + * @param string $peeringUuid The network peering identifier. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteNetworkPeering(string $peeringUuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/network-peering/{$peeringUuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies attributes of an existing network peering. + * + * @param string $peeringUuid The network peering identifier. + * @param NetworkPeeringModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return NetworkPeering + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyNetworkPeering(string $peeringUuid, NetworkPeeringModify $request = new NetworkPeeringModify(), ?array $options = null): NetworkPeering + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/network-peering/{$peeringUuid}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return NetworkPeering::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/NetworkPeering/Requests/ListNetworkPeeringsRequest.php b/fern/sdk/src/NetworkPeering/Requests/ListNetworkPeeringsRequest.php new file mode 100644 index 00000000..895ec6ee --- /dev/null +++ b/fern/sdk/src/NetworkPeering/Requests/ListNetworkPeeringsRequest.php @@ -0,0 +1,45 @@ +uuid = $values['uuid'] ?? null; + $this->networkUuidLocal = $values['networkUuidLocal'] ?? null; + $this->networkUuidPeer = $values['networkUuidPeer'] ?? null; + $this->label = $values['label'] ?? null; + } +} diff --git a/fern/sdk/src/NetworkPeering/Requests/NetworkPeeringCreate.php b/fern/sdk/src/NetworkPeering/Requests/NetworkPeeringCreate.php new file mode 100644 index 00000000..97ecd9ec --- /dev/null +++ b/fern/sdk/src/NetworkPeering/Requests/NetworkPeeringCreate.php @@ -0,0 +1,53 @@ + $configuredStatus + */ + #[JsonProperty('configured_status')] + public ?string $configuredStatus; + + /** + * @var string $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var NetworkPeeringCreateNetwork $network Describes the local side of the peering + */ + #[JsonProperty('network')] + public NetworkPeeringCreateNetwork $network; + + /** + * @var NetworkPeeringCreatePeerNetwork $peerNetwork Describes the peer side of the peering + */ + #[JsonProperty('peer_network')] + public NetworkPeeringCreatePeerNetwork $peerNetwork; + + /** + * @param array{ + * name: string, + * network: NetworkPeeringCreateNetwork, + * peerNetwork: NetworkPeeringCreatePeerNetwork, + * configuredStatus?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->configuredStatus = $values['configuredStatus'] ?? null; + $this->name = $values['name']; + $this->network = $values['network']; + $this->peerNetwork = $values['peerNetwork']; + } +} diff --git a/fern/sdk/src/NetworkPeering/Requests/NetworkPeeringModify.php b/fern/sdk/src/NetworkPeering/Requests/NetworkPeeringModify.php new file mode 100644 index 00000000..6d85ea9b --- /dev/null +++ b/fern/sdk/src/NetworkPeering/Requests/NetworkPeeringModify.php @@ -0,0 +1,35 @@ + $configuredStatus + */ + #[JsonProperty('configured_status')] + public ?string $configuredStatus; + + /** + * @var ?string $name + */ + #[JsonProperty('name')] + public ?string $name; + + /** + * @param array{ + * configuredStatus?: ?value-of, + * name?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->configuredStatus = $values['configuredStatus'] ?? null; + $this->name = $values['name'] ?? null; + } +} diff --git a/fern/sdk/src/NetworkPeering/Types/NetworkPeeringCreateConfiguredStatus.php b/fern/sdk/src/NetworkPeering/Types/NetworkPeeringCreateConfiguredStatus.php new file mode 100644 index 00000000..5eb884e8 --- /dev/null +++ b/fern/sdk/src/NetworkPeering/Types/NetworkPeeringCreateConfiguredStatus.php @@ -0,0 +1,9 @@ +uuid = $values['uuid']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/NetworkPeering/Types/NetworkPeeringCreatePeerNetwork.php b/fern/sdk/src/NetworkPeering/Types/NetworkPeeringCreatePeerNetwork.php new file mode 100644 index 00000000..10aaa8df --- /dev/null +++ b/fern/sdk/src/NetworkPeering/Types/NetworkPeeringCreatePeerNetwork.php @@ -0,0 +1,37 @@ +uuid = $values['uuid']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/NetworkPeering/Types/NetworkPeeringModifyConfiguredStatus.php b/fern/sdk/src/NetworkPeering/Types/NetworkPeeringModifyConfiguredStatus.php new file mode 100644 index 00000000..351d7ecb --- /dev/null +++ b/fern/sdk/src/NetworkPeering/Types/NetworkPeeringModifyConfiguredStatus.php @@ -0,0 +1,9 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Returns a list of object storage services. + * + * @param ListObjectStoragesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorages(ListObjectStoragesRequest $request = new ListObjectStoragesRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2ServiceDetailResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new object storage service. + * + * @param ObjectStorage2ServiceCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2ServiceDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createObjectStorage(ObjectStorage2ServiceCreate $request, ?array $options = null): ObjectStorage2ServiceDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2ServiceDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns object storage service details by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2ServiceDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStorage(string $serviceUuid, ?array $options = null): ObjectStorage2ServiceDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2ServiceDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Replaces existing object storage service by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ObjectStorage2ServiceReplace $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2ServiceDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function replaceObjectStorage(string $serviceUuid, ObjectStorage2ServiceReplace $request, ?array $options = null): ObjectStorage2ServiceDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}", + method: HttpMethod::PUT, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2ServiceDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing object storage service by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param DeleteObjectStorageRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorage(string $serviceUuid, DeleteObjectStorageRequest $request = new DeleteObjectStorageRequest(), ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->force !== null) { + $query['force'] = $request->force; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}", + method: HttpMethod::DELETE, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing object storage service by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ObjectStorage2ServiceModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2ServiceDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyObjectStorage(string $serviceUuid, ObjectStorage2ServiceModify $request = new ObjectStorage2ServiceModify(), ?array $options = null): ObjectStorage2ServiceDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2ServiceDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available service networks by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageNetworks(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/networks", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2NetworkDetailResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new service network by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param CreateObjectStorageNetworkRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2NetworkDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createObjectStorageNetwork(string $serviceUuid, CreateObjectStorageNetworkRequest $request, ?array $options = null): ObjectStorage2NetworkDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/networks", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2NetworkDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns service network details by given {service_uuid} and {network_name}. + * + * @param string $serviceUuid Service UUID + * @param string $networkName The name of the network. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2NetworkDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStorageNetwork(string $serviceUuid, string $networkName, ?array $options = null): ObjectStorage2NetworkDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/networks/{$networkName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2NetworkDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing network by given {service_uuid} and {network_name}. + * + * @param string $serviceUuid Service UUID + * @param string $networkName The name of the network. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorageNetwork(string $serviceUuid, string $networkName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/networks/{$networkName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of custom domains attached to a service by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageCustomDomains(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/custom-domains", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2CustomDomainDetailResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Attaches a new custom domain to the service identified by {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param AttachObjectStorageCustomDomainRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2CustomDomainDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function attachObjectStorageCustomDomain(string $serviceUuid, AttachObjectStorageCustomDomainRequest $request, ?array $options = null): ObjectStorage2CustomDomainDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/custom-domains", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2CustomDomainDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns custom domain details by given {service_uuid} and {domain_name}. + * + * @param string $serviceUuid Service UUID + * @param string $customDomainName The domain name. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2CustomDomainDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStorageCustomDomain(string $serviceUuid, string $customDomainName, ?array $options = null): ObjectStorage2CustomDomainDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/custom-domains/{$customDomainName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2CustomDomainDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing custom domain by given {service_uuid} and {domain_name}. + * + * @param string $serviceUuid Service UUID + * @param string $customDomainName The domain name. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorageCustomDomain(string $serviceUuid, string $customDomainName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/custom-domains/{$customDomainName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing custom domain by given {service_uuid} and {domain_name}. + * + * @param string $serviceUuid Service UUID + * @param string $customDomainName The domain name. + * @param ObjectStorage2CustomDomainModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2CustomDomainDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyObjectStorageCustomDomain(string $serviceUuid, string $customDomainName, ObjectStorage2CustomDomainModify $request = new ObjectStorage2CustomDomainModify(), ?array $options = null): ObjectStorage2CustomDomainDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/custom-domains/{$customDomainName}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2CustomDomainDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available managed object storage regions. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageRegions(?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/regions", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2RegionDetailResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns object storage region details by given {name}. + * + * @param string $regionName The name of the region. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2RegionDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStorageRegion(string $regionName, ?array $options = null): ObjectStorage2RegionDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/regions/{$regionName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2RegionDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns object storage metrics by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2MetricsUsageResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStorageMetrics(string $serviceUuid, ?array $options = null): ObjectStorage2MetricsUsageResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/metrics", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2MetricsUsageResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns metrics for buckets within a service. + * + * @param string $serviceUuid Service UUID + * @param ListObjectStorageBucketMetricsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageBucketMetrics(string $serviceUuid, ListObjectStorageBucketMetricsRequest $request = new ListObjectStorageBucketMetricsRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/buckets", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2BucketDetailResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new service bucket by the given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ObjectStorage2BucketCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2BucketDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createObjectStorageBucket(string $serviceUuid, ObjectStorage2BucketCreate $request, ?array $options = null): ObjectStorage2BucketDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/buckets", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2BucketDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes an existing bucket by given {service_uuid} and {bucket_name}. This API call will remove all objects from the bucket permanently and cannot be reversed. + * + * @param string $serviceUuid Service UUID + * @param string $bucketName The name of the bucket. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorageBucket(string $serviceUuid, string $bucketName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/buckets/{$bucketName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns Object Storage instance metrics series by a given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ListObjectStorageMetricsSeriesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageMetricsSeries(string $serviceUuid, ListObjectStorageMetricsSeriesRequest $request = new ListObjectStorageMetricsSeriesRequest(), ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->from !== null) { + $query['from'] = JsonSerializer::serializeDateTime($request->from); + } + if ($request->to !== null) { + $query['to'] = JsonSerializer::serializeDateTime($request->to); + } + if ($request->interval !== null) { + $query['interval'] = $request->interval; + } + if ($request->sort !== null) { + $query['sort'] = $request->sort; + } + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/metrics/series", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2MetricsSeriesListResponseItem::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available service labels by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageLabels(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/labels", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2LabelDetailResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new label by given {service_uuid}. Labels are used for service filtering. + * + * @param string $serviceUuid Service UUID + * @param CreateObjectStorageLabelRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2LabelDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createObjectStorageLabel(string $serviceUuid, CreateObjectStorageLabelRequest $request, ?array $options = null): ObjectStorage2LabelDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/labels", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2LabelDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns label details by given {service_uuid} and {key}. + * + * @param string $serviceUuid Service UUID + * @param string $labelKey The key of the label. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2LabelDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStorageLabel(string $serviceUuid, string $labelKey, ?array $options = null): ObjectStorage2LabelDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/labels/{$labelKey}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2LabelDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing label by given {service_uuid} and {key}. + * + * @param string $serviceUuid Service UUID + * @param string $labelKey The key of the label. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorageLabel(string $serviceUuid, string $labelKey, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/labels/{$labelKey}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies existing label by given {service_uuid} and {key}. + * + * @param string $serviceUuid Service UUID + * @param string $labelKey The key of the label. + * @param ObjectStorage2LabelModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2LabelDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyObjectStorageLabel(string $serviceUuid, string $labelKey, ObjectStorage2LabelModify $request = new ObjectStorage2LabelModify(), ?array $options = null): ObjectStorage2LabelDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/labels/{$labelKey}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2LabelDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns all static website configurations for a service along with available domains. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageStaticWebsites(string $serviceUuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/static-websites", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new static website hosting configuration for a domain. + * + * @param string $serviceUuid Service UUID + * @param CreateObjectStorageStaticWebsiteRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2StaticWebsiteConfig + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createObjectStorageStaticWebsite(string $serviceUuid, CreateObjectStorageStaticWebsiteRequest $request, ?array $options = null): ObjectStorage2StaticWebsiteConfig + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/static-websites", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2StaticWebsiteConfig::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a static website configuration for a specific domain. + * + * @param string $serviceUuid Service UUID + * @param string $customDomainName The domain name. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2StaticWebsiteConfig + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStorageStaticWebsite(string $serviceUuid, string $customDomainName, ?array $options = null): ObjectStorage2StaticWebsiteConfig + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/static-websites/{$customDomainName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2StaticWebsiteConfig::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a static website configuration. + * + * @param string $serviceUuid Service UUID + * @param string $customDomainName The domain name. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorageStaticWebsite(string $serviceUuid, string $customDomainName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/static-websites/{$customDomainName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Updates an existing static website configuration. + * + * @param string $serviceUuid Service UUID + * @param string $customDomainName The domain name. + * @param ObjectStorage2StaticWebsiteConfigModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2StaticWebsiteConfig + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyObjectStorageStaticWebsite(string $serviceUuid, string $customDomainName, ObjectStorage2StaticWebsiteConfigModify $request = new ObjectStorage2StaticWebsiteConfigModify(), ?array $options = null): ObjectStorage2StaticWebsiteConfig + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/static-websites/{$customDomainName}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2StaticWebsiteConfig::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns all domains associated with this service (public endpoint, private endpoint, custom domains) along with their static website hosting status. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2ServiceDomains + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageDomains(string $serviceUuid, ?array $options = null): ObjectStorage2ServiceDomains + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/domains", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2ServiceDomains::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available service users by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageUsers(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2UserDetailResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new service user by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ObjectStorage2UserCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2UserDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createObjectStorageUser(string $serviceUuid, ObjectStorage2UserCreate $request, ?array $options = null): ObjectStorage2UserDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2UserDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns service user details by given {service_uuid} and {username}. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2UserDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStorageUser(string $serviceUuid, string $username, ?array $options = null): ObjectStorage2UserDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2UserDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing user by given {service_uuid} and {username}. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorageUser(string $serviceUuid, string $username, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available access keys for a user. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageAccessKeys(string $serviceUuid, string $username, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/access-keys", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2AccessKeyDetailResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new access key by given {service_uuid} and {username}. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2CreateAccessKeyResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createObjectStorageAccessKey(string $serviceUuid, string $username, ?array $options = null): ObjectStorage2CreateAccessKeyResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/access-keys", + method: HttpMethod::POST, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2CreateAccessKeyResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns access key details by given {service_uuid}, {username}, and {access-key-id}. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param string $accessKeyId The ID of the access key. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2AccessKeyDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStorageAccessKeyDetails(string $serviceUuid, string $username, string $accessKeyId, ?array $options = null): ObjectStorage2AccessKeyDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/access-keys/{$accessKeyId}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2AccessKeyDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing access key by given {service_uuid}, {username}, and {access-key-id}. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param string $accessKeyId The ID of the access key. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorageAccessKey(string $serviceUuid, string $username, string $accessKeyId, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/access-keys/{$accessKeyId}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies access key details. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param string $accessKeyId The ID of the access key. + * @param ObjectStorage2AccessKeyModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2AccessKeyDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyObjectStorageAccessKeyDetails(string $serviceUuid, string $username, string $accessKeyId, ObjectStorage2AccessKeyModify $request = new ObjectStorage2AccessKeyModify(), ?array $options = null): ObjectStorage2AccessKeyDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/access-keys/{$accessKeyId}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2AccessKeyDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of attached user policies for a user. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageAttachedUserPolicies(string $serviceUuid, string $username, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/policies", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2PolicyAttachmentResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Attach a policy to a user. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param AttachObjectStorageUserPolicyRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function attachObjectStorageUserPolicy(string $serviceUuid, string $username, AttachObjectStorageUserPolicyRequest $request, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/policies", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Detach a policy from a user. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param string $nestedName The name of the policy to detach. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function detachObjectStorageUserPolicy(string $serviceUuid, string $username, string $nestedName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/policies/{$nestedName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Get the user inline policy by the given {service_uuid}, {username} and {policy_name}. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param string $userPolicyName The name of the inline policy. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2InlinePolicyResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStorageUserInlinePolicy(string $serviceUuid, string $username, string $userPolicyName, ?array $options = null): ObjectStorage2InlinePolicyResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/inline-policies/{$userPolicyName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2InlinePolicyResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes the user inline policy by the given {service_uuid}, {username}, and {policy_name}. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param string $userPolicyName The name of the inline policy. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorageUserInlinePolicy(string $serviceUuid, string $username, string $userPolicyName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/inline-policies/{$userPolicyName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Lists the user inline policies by the given {service_uuid}, and {username}. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageUserInlinePolicies(string $serviceUuid, string $username, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/inline-policies", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2InlinePolicyResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a user inline policy by the given {service_uuid}, and {username}. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param CreateObjectStorageUserInlinePolicyRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2InlinePolicyResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createObjectStorageUserInlinePolicy(string $serviceUuid, string $username, CreateObjectStorageUserInlinePolicyRequest $request, ?array $options = null): ObjectStorage2InlinePolicyResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/inline-policies", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2InlinePolicyResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a user's tags by the given {service_uuid}, and {username}. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStorageUserTags(string $serviceUuid, string $username, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/tags", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2TagListResponseItem::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Replaces a user's tags by the given {service_uuid}, and {username}. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param ReplaceObjectStorageUserTagsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function replaceObjectStorageUserTags(string $serviceUuid, string $username, ReplaceObjectStorageUserTagsRequest $request, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/tags", + method: HttpMethod::PUT, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2TagListResponseItem::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a user's tag by the given {service_uuid}, {username}, and {tag_key}. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param string $userTagKey The key of the user tag. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorageUserTag(string $serviceUuid, string $username, string $userTagKey, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/tags/{$userTagKey}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a user's permissions boundary by the given {service_uuid}, and {username}. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param CreateObjectStorageUserPermissionsBoundaryRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return string + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createObjectStorageUserPermissionsBoundary(string $serviceUuid, string $username, CreateObjectStorageUserPermissionsBoundaryRequest $request, ?array $options = null): string + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/permissions-boundary", + method: HttpMethod::PUT, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeString($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a user's permissions boundary by the given {service_uuid}, and {username}. + * + * @param string $serviceUuid Service UUID + * @param string $username The name of the user. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorageUserPermissionsBoundary(string $serviceUuid, string $username, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/users/{$username}/permissions-boundary", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Lists policy versions given by {service_uuid}, and {policy_name}. + * + * @param string $serviceUuid Service UUID + * @param string $policyName The name of the policy. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStoragePolicyVersions(string $serviceUuid, string $policyName, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/policies/{$policyName}/versions", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2PolicyVersionResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a policy version by the given {service_uuid}, and {policy_name}. + * + * @param string $serviceUuid Service UUID + * @param string $policyName The name of the policy. + * @param ObjectStorage2PolicyVersionCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2PolicyVersionResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createObjectStoragePolicyVersion(string $serviceUuid, string $policyName, ObjectStorage2PolicyVersionCreate $request, ?array $options = null): ObjectStorage2PolicyVersionResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/policies/{$policyName}/versions", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2PolicyVersionResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Get a single policy version by the given {service_uuid}, {policy_name}, and {policy_version}. + * + * @param string $serviceUuid Service UUID + * @param string $policyName The name of the policy. + * @param string $policyVersion The version identifier of the policy. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2PolicyVersionResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStoragePolicyVersion(string $serviceUuid, string $policyName, string $policyVersion, ?array $options = null): ObjectStorage2PolicyVersionResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/policies/{$policyName}/versions/{$policyVersion}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2PolicyVersionResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a policy version by the given {service_uuid}, {policy_name}, and {policy_version}. + * + * @param string $serviceUuid Service UUID + * @param string $policyName The name of the policy. + * @param string $policyVersion The version identifier of the policy. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStoragePolicyVersion(string $serviceUuid, string $policyName, string $policyVersion, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/policies/{$policyName}/versions/{$policyVersion}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns service policy details by given {service_uuid} and {policy_name}. + * + * @param string $serviceUuid Service UUID + * @param string $policyName The name of the policy. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2PolicyDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStoragePolicy(string $serviceUuid, string $policyName, ?array $options = null): ObjectStorage2PolicyDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/policies/{$policyName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2PolicyDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes existing policy by given {service_uuid} and {policy_name}. + * + * @param string $serviceUuid Service UUID + * @param string $policyName The name of the policy. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStoragePolicy(string $serviceUuid, string $policyName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/policies/{$policyName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Sets the default version for a policy. Note: This is mapped from ModifyPolicyVersion handler. + * + * @param string $serviceUuid Service UUID + * @param string $policyName The name of the policy. + * @param ObjectStorage2PolicySetDefaultVersion $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2PolicyDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function setObjectStorageDefaultPolicyVersion(string $serviceUuid, string $policyName, ObjectStorage2PolicySetDefaultVersion $request, ?array $options = null): ObjectStorage2PolicyDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/policies/{$policyName}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2PolicyDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available service policies by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStoragePolicies(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/policies", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2PolicyDetailResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new service policy by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ObjectStorage2PolicyCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2PolicyDetailResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createObjectStoragePolicy(string $serviceUuid, ObjectStorage2PolicyCreate $request, ?array $options = null): ObjectStorage2PolicyDetailResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/policies", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2PolicyDetailResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Lists IAM policies attached to a group. + * + * @param string $serviceUuid Service UUID + * @param string $groupName The name of the group. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageIamGroupPolicies(string $serviceUuid, string $groupName, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/groups/{$groupName}/policies", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2PolicyAttachmentResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Attaches a policy to a group. + * + * @param string $serviceUuid Service UUID + * @param string $groupName The name of the group. + * @param AttachObjectStorageIamGroupPolicyRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function attachObjectStorageIamGroupPolicy(string $serviceUuid, string $groupName, AttachObjectStorageIamGroupPolicyRequest $request, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/groups/{$groupName}/policies", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Detaches a policy from a group. + * + * @param string $serviceUuid Service UUID + * @param string $groupName The name of the group. + * @param string $policyName The name of the policy. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function detachObjectStorageIamGroupPolicy(string $serviceUuid, string $groupName, string $policyName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/groups/{$groupName}/policies/{$policyName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of available service groups by given {service_uuid}. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageGroups(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/groups", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2GroupResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates an iam group. + * + * @param string $serviceUuid Service UUID + * @param ObjectStorage2GroupCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2GroupResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createObjectStorageGroup(string $serviceUuid, ObjectStorage2GroupCreate $request, ?array $options = null): ObjectStorage2GroupResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/groups", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2GroupResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Get a single group identified by {service_uuid}, and {group_name}. + * + * @param string $serviceUuid Service UUID + * @param string $groupName The name of the group. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2GroupResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStorageGroup(string $serviceUuid, string $groupName, ?array $options = null): ObjectStorage2GroupResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/groups/{$groupName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2GroupResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a group identified by {group_name}. + * + * @param string $serviceUuid Service UUID + * @param string $groupName The name of the group. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorageGroup(string $serviceUuid, string $groupName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/groups/{$groupName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Attaches an iam user to a group identified by {group_name}, and {username}. + * + * @param string $serviceUuid Service UUID + * @param string $groupName The name of the group. + * @param string $username The name of the user. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function attachObjectStorageUserToGroup(string $serviceUuid, string $groupName, string $username, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/groups/{$groupName}/users/{$username}", + method: HttpMethod::POST, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Removes an iam user from the group identified by {group_name}, and {username}. + * + * @param string $serviceUuid Service UUID + * @param string $groupName The name of the group. + * @param string $username The name of the user. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function removeObjectStorageUserFromGroup(string $serviceUuid, string $groupName, string $username, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/groups/{$groupName}/users/{$username}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Lists the group inline policies by the given {service_uuid}, and {group_name}. + * + * @param string $serviceUuid Service UUID + * @param string $groupName The name of the group. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageGroupInlinePolicies(string $serviceUuid, string $groupName, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/groups/{$groupName}/inline-policies", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2InlinePolicyResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a group inline policy by the given {service_uuid}, and {group_name}. + * + * @param string $serviceUuid Service UUID + * @param string $groupName The name of the group. + * @param CreateObjectStorageGroupInlinePolicyRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2InlinePolicyResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createObjectStorageGroupInlinePolicy(string $serviceUuid, string $groupName, CreateObjectStorageGroupInlinePolicyRequest $request, ?array $options = null): ObjectStorage2InlinePolicyResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/groups/{$groupName}/inline-policies", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2InlinePolicyResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Get the group inline policy by the given {service_uuid}, {group_name} and {policy_name}. + * + * @param string $serviceUuid Service UUID + * @param string $groupName The name of the group. + * @param string $groupPolicyName The name of the inline policy. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2InlinePolicyResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStorageGroupInlinePolicy(string $serviceUuid, string $groupName, string $groupPolicyName, ?array $options = null): ObjectStorage2InlinePolicyResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/groups/{$groupName}/inline-policies/{$groupPolicyName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2InlinePolicyResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes the group inline policy by the given {service_uuid}, {group_name}, and {policy_name}. + * + * @param string $serviceUuid Service UUID + * @param string $groupName The name of the group. + * @param string $groupPolicyName The name of the inline policy. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorageGroupInlinePolicy(string $serviceUuid, string $groupName, string $groupPolicyName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/groups/{$groupName}/inline-policies/{$groupPolicyName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Lists the roles. + * + * @param string $serviceUuid Service UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageRoles(string $serviceUuid, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2RoleResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a service IAM role. + * + * @param string $serviceUuid Service UUID + * @param ObjectStorage2RoleCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2RoleResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createObjectStorageRole(string $serviceUuid, ObjectStorage2RoleCreate $request, ?array $options = null): ObjectStorage2RoleResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2RoleResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Get a single role identified by {service_uuid}, and {role_name}. + * + * @param string $serviceUuid Service UUID + * @param string $roleName The name of the role. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2RoleResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStorageRole(string $serviceUuid, string $roleName, ?array $options = null): ObjectStorage2RoleResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles/{$roleName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2RoleResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a service's IAM role. + * + * @param string $serviceUuid Service UUID + * @param string $roleName The name of the role. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorageRole(string $serviceUuid, string $roleName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles/{$roleName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Updates a service's IAM role. + * + * @param string $serviceUuid Service UUID + * @param string $roleName The name of the role. + * @param ObjectStorage2RoleUpdate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2RoleResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function updateObjectStorageRole(string $serviceUuid, string $roleName, ObjectStorage2RoleUpdate $request = new ObjectStorage2RoleUpdate(), ?array $options = null): ObjectStorage2RoleResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles/{$roleName}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2RoleResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a list of role inline policies by the given {service_uuid}, and {role_name}. + * + * @param string $serviceUuid Service UUID + * @param string $roleName The name of the role. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageRoleInlinePolicies(string $serviceUuid, string $roleName, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles/{$roleName}/inline-policies", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2InlinePolicyResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a role inline policy by the given {service_uuid}, and {role_name}. + * + * @param string $serviceUuid Service UUID + * @param string $roleName The name of the role. + * @param CreateObjectStorageRoleInlinePolicyRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2InlinePolicyResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createObjectStorageRoleInlinePolicy(string $serviceUuid, string $roleName, CreateObjectStorageRoleInlinePolicyRequest $request, ?array $options = null): ObjectStorage2InlinePolicyResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles/{$roleName}/inline-policies", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2InlinePolicyResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a role's inline policy by the given {service_uuid}, {role_name}, and {policy_name}. + * + * @param string $serviceUuid Service UUID + * @param string $roleName The name of the role. + * @param string $rolePolicyName The name of the inline policy. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2InlinePolicyResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStorageRoleInlinePolicy(string $serviceUuid, string $roleName, string $rolePolicyName, ?array $options = null): ObjectStorage2InlinePolicyResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles/{$roleName}/inline-policies/{$rolePolicyName}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2InlinePolicyResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Delete a role inline policy by the given {service_uuid}, {role_name} and {policy_name}. + * + * @param string $serviceUuid Service UUID + * @param string $roleName The name of the role. + * @param string $rolePolicyName The name of the inline policy. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorageRoleInlinePolicy(string $serviceUuid, string $roleName, string $rolePolicyName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles/{$roleName}/inline-policies/{$rolePolicyName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a role policy's permissions boundary by the given {service_uuid}, and {role_name}. + * + * @param string $serviceUuid Service UUID + * @param string $roleName The name of the role. + * @param CreateObjectStorageRolePermissionsBoundaryRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return string + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createObjectStorageRolePermissionsBoundary(string $serviceUuid, string $roleName, CreateObjectStorageRolePermissionsBoundaryRequest $request, ?array $options = null): string + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles/{$roleName}/permissions-boundary", + method: HttpMethod::PUT, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeString($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a role permissions boundary by the given {service_uuid}, and {role_name}. + * + * @param string $serviceUuid Service UUID + * @param string $roleName The name of the role. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorageRolePermissionsBoundary(string $serviceUuid, string $roleName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles/{$roleName}/permissions-boundary", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Assume a role policy by the given {service_uuid}, and {role_name}. + * + * @param string $serviceUuid Service UUID + * @param string $roleName The name of the role. + * @param ObjectStorage2AssumeRolePolicyRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ObjectStorage2AssumeRolePolicyResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function assumeObjectStorageRolePolicy(string $serviceUuid, string $roleName, ObjectStorage2AssumeRolePolicyRequest $request, ?array $options = null): ObjectStorage2AssumeRolePolicyResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles/{$roleName}/assume-role-policy", + method: HttpMethod::PUT, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ObjectStorage2AssumeRolePolicyResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Lists all policies attached to a service's IAM role. + * + * @param string $serviceUuid Service UUID + * @param string $roleName The name of the role. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listObjectStorageAttachedRolePolicies(string $serviceUuid, string $roleName, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles/{$roleName}/policies", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2PolicyAttachmentResponse::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Attaches a policy to a service's IAM role. + * + * @param string $serviceUuid Service UUID + * @param string $roleName The name of the role. + * @param AttachObjectStoragePolicyToRoleRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function attachObjectStoragePolicyToRole(string $serviceUuid, string $roleName, AttachObjectStoragePolicyToRoleRequest $request, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles/{$roleName}/policies", + method: HttpMethod::POST, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Detaches a policy from a service's IAM role. + * + * @param string $serviceUuid Service UUID + * @param string $roleName The name of the role. + * @param string $rolePolicyName The name of the inline policy. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function detachObjectStoragePolicyFromRole(string $serviceUuid, string $roleName, string $rolePolicyName, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles/{$roleName}/policies/{$rolePolicyName}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns a role's tags by the given {service_uuid}, and {role_name}. + * + * @param string $serviceUuid Service UUID + * @param string $roleName The name of the role. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getObjectStorageRoleTags(string $serviceUuid, string $roleName, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles/{$roleName}/tags", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2TagListResponseItem::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Replaces a role's tags by the given {service_uuid}, and {role_name}. + * + * @param string $serviceUuid Service UUID + * @param string $roleName The name of the role. + * @param ReplaceObjectStorageRoleTagsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function replaceObjectStorageRoleTags(string $serviceUuid, string $roleName, ReplaceObjectStorageRoleTagsRequest $request, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles/{$roleName}/tags", + method: HttpMethod::PUT, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ObjectStorage2TagListResponseItem::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a role's tag by the given {service_uuid}, {role_name}, and {tag_key}. + * + * @param string $serviceUuid Service UUID + * @param string $roleName The name of the role. + * @param string $roleTagKey The key of the role tag. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteObjectStorageRoleTag(string $serviceUuid, string $roleName, string $roleTagKey, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/object-storage-2/{$serviceUuid}/roles/{$roleName}/tags/{$roleTagKey}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/AttachObjectStorageCustomDomainRequest.php b/fern/sdk/src/ObjectStorage2/Requests/AttachObjectStorageCustomDomainRequest.php new file mode 100644 index 00000000..1cc562ec --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/AttachObjectStorageCustomDomainRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/AttachObjectStorageIamGroupPolicyRequest.php b/fern/sdk/src/ObjectStorage2/Requests/AttachObjectStorageIamGroupPolicyRequest.php new file mode 100644 index 00000000..524216e0 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/AttachObjectStorageIamGroupPolicyRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/AttachObjectStoragePolicyToRoleRequest.php b/fern/sdk/src/ObjectStorage2/Requests/AttachObjectStoragePolicyToRoleRequest.php new file mode 100644 index 00000000..bc31e786 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/AttachObjectStoragePolicyToRoleRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/AttachObjectStorageUserPolicyRequest.php b/fern/sdk/src/ObjectStorage2/Requests/AttachObjectStorageUserPolicyRequest.php new file mode 100644 index 00000000..eab335da --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/AttachObjectStorageUserPolicyRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageGroupInlinePolicyRequest.php b/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageGroupInlinePolicyRequest.php new file mode 100644 index 00000000..36b5f6f5 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageGroupInlinePolicyRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageLabelRequest.php b/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageLabelRequest.php new file mode 100644 index 00000000..cb4b9e01 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageLabelRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageNetworkRequest.php b/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageNetworkRequest.php new file mode 100644 index 00000000..b9fce1da --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageNetworkRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageRoleInlinePolicyRequest.php b/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageRoleInlinePolicyRequest.php new file mode 100644 index 00000000..db887d13 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageRoleInlinePolicyRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageRolePermissionsBoundaryRequest.php b/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageRolePermissionsBoundaryRequest.php new file mode 100644 index 00000000..96bafc5b --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageRolePermissionsBoundaryRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageStaticWebsiteRequest.php b/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageStaticWebsiteRequest.php new file mode 100644 index 00000000..cb0a02f7 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageStaticWebsiteRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageUserInlinePolicyRequest.php b/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageUserInlinePolicyRequest.php new file mode 100644 index 00000000..2e96edb2 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageUserInlinePolicyRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageUserPermissionsBoundaryRequest.php b/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageUserPermissionsBoundaryRequest.php new file mode 100644 index 00000000..425c6989 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/CreateObjectStorageUserPermissionsBoundaryRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/DeleteObjectStorageRequest.php b/fern/sdk/src/ObjectStorage2/Requests/DeleteObjectStorageRequest.php new file mode 100644 index 00000000..522850dc --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/DeleteObjectStorageRequest.php @@ -0,0 +1,24 @@ +force = $values['force'] ?? null; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ListObjectStorageBucketMetricsRequest.php b/fern/sdk/src/ObjectStorage2/Requests/ListObjectStorageBucketMetricsRequest.php new file mode 100644 index 00000000..253895ad --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ListObjectStorageBucketMetricsRequest.php @@ -0,0 +1,31 @@ +limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ListObjectStorageMetricsSeriesRequest.php b/fern/sdk/src/ObjectStorage2/Requests/ListObjectStorageMetricsSeriesRequest.php new file mode 100644 index 00000000..c92f4849 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ListObjectStorageMetricsSeriesRequest.php @@ -0,0 +1,61 @@ + $sort Order of returned results. + */ + public ?string $sort; + + /** + * @var ?int $limit Number of entries to receive at most. + */ + public ?int $limit; + + /** + * @var ?int $offset Offset for retrieved results. + */ + public ?int $offset; + + /** + * @param array{ + * from?: ?DateTime, + * to?: ?DateTime, + * interval?: ?string, + * sort?: ?value-of, + * limit?: ?int, + * offset?: ?int, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->from = $values['from'] ?? null; + $this->to = $values['to'] ?? null; + $this->interval = $values['interval'] ?? null; + $this->sort = $values['sort'] ?? null; + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ListObjectStoragesRequest.php b/fern/sdk/src/ObjectStorage2/Requests/ListObjectStoragesRequest.php new file mode 100644 index 00000000..9388a2b2 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ListObjectStoragesRequest.php @@ -0,0 +1,39 @@ + $sort Order of returned results. + */ + public ?string $sort; + + /** + * @param array{ + * limit?: ?int, + * offset?: ?int, + * sort?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + $this->sort = $values['sort'] ?? null; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2AccessKeyModify.php b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2AccessKeyModify.php new file mode 100644 index 00000000..c8074a6e --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2AccessKeyModify.php @@ -0,0 +1,27 @@ + $status Indicates if the key is active or inactive. + */ + #[JsonProperty('status')] + public ?string $status; + + /** + * @param array{ + * status?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->status = $values['status'] ?? null; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2AssumeRolePolicyRequest.php b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2AssumeRolePolicyRequest.php new file mode 100644 index 00000000..41a174ea --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2AssumeRolePolicyRequest.php @@ -0,0 +1,26 @@ +document = $values['document']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2BucketCreate.php b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2BucketCreate.php new file mode 100644 index 00000000..d0df5baf --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2BucketCreate.php @@ -0,0 +1,26 @@ +name = $values['name']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2CustomDomainModify.php b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2CustomDomainModify.php new file mode 100644 index 00000000..7e3413b3 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2CustomDomainModify.php @@ -0,0 +1,35 @@ + $type Type of the custom domain. + */ + #[JsonProperty('type')] + public ?string $type; + + /** + * @var ?string $domainName New modified custom domain. Supports both apex domains (example.com) and subdomains (objects.example.com). + */ + #[JsonProperty('domain_name')] + public ?string $domainName; + + /** + * @param array{ + * type?: ?value-of, + * domainName?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->type = $values['type'] ?? null; + $this->domainName = $values['domainName'] ?? null; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2GroupCreate.php b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2GroupCreate.php new file mode 100644 index 00000000..196e5d1e --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2GroupCreate.php @@ -0,0 +1,26 @@ +name = $values['name']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2LabelModify.php b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2LabelModify.php new file mode 100644 index 00000000..4302cbda --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2LabelModify.php @@ -0,0 +1,34 @@ +key = $values['key'] ?? null; + $this->value = $values['value'] ?? null; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2PolicyCreate.php b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2PolicyCreate.php new file mode 100644 index 00000000..76fabf41 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2PolicyCreate.php @@ -0,0 +1,42 @@ +name = $values['name']; + $this->description = $values['description'] ?? null; + $this->document = $values['document']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2PolicySetDefaultVersion.php b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2PolicySetDefaultVersion.php new file mode 100644 index 00000000..d46a4002 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2PolicySetDefaultVersion.php @@ -0,0 +1,26 @@ +versionId = $values['versionId']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2PolicyVersionCreate.php b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2PolicyVersionCreate.php new file mode 100644 index 00000000..022830ae --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2PolicyVersionCreate.php @@ -0,0 +1,34 @@ +document = $values['document']; + $this->isDefault = $values['isDefault']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2RoleCreate.php b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2RoleCreate.php new file mode 100644 index 00000000..991801a4 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2RoleCreate.php @@ -0,0 +1,68 @@ + $tags Tags to attach to the role (max 50). + */ + #[JsonProperty('tags'), ArrayType([ObjectStorage2RoleTag::class])] + public ?array $tags; + + /** + * @param array{ + * name: string, + * assumeRolePolicyDocument: string, + * description?: ?string, + * maxSessionDuration?: ?int, + * permissionsBoundary?: ?string, + * tags?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->assumeRolePolicyDocument = $values['assumeRolePolicyDocument']; + $this->description = $values['description'] ?? null; + $this->maxSessionDuration = $values['maxSessionDuration'] ?? null; + $this->permissionsBoundary = $values['permissionsBoundary'] ?? null; + $this->tags = $values['tags'] ?? null; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2RoleUpdate.php b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2RoleUpdate.php new file mode 100644 index 00000000..2196e361 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2RoleUpdate.php @@ -0,0 +1,34 @@ +description = $values['description'] ?? null; + $this->maxSessionDuration = $values['maxSessionDuration'] ?? null; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2ServiceCreate.php b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2ServiceCreate.php new file mode 100644 index 00000000..9ede64e0 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2ServiceCreate.php @@ -0,0 +1,88 @@ + $configuredStatus + */ + #[JsonProperty('configured_status')] + public string $configuredStatus; + + /** + * @var ?array $networks Networks to attach to the service. Private networks must reside in the same region as the object storage. + */ + #[JsonProperty('networks'), ArrayType([ObjectStorage2NetworkCreate::class])] + public ?array $networks; + + /** + * @var ?array $customDomains Custom domains to attach to the service. + */ + #[JsonProperty('custom_domains'), ArrayType([ObjectStorage2CustomDomainCreate::class])] + public ?array $customDomains; + + /** + * @var ?array $labels Labels for classifying the service. + */ + #[JsonProperty('labels'), ArrayType([ObjectStorage2LabelCreate::class])] + public ?array $labels; + + /** + * @var ?ObjectStorage2PropertiesCreate $properties + */ + #[JsonProperty('properties')] + public ?ObjectStorage2PropertiesCreate $properties; + + /** + * @var ?bool $terminationProtection Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first. + */ + #[JsonProperty('termination_protection')] + public ?bool $terminationProtection; + + /** + * @param array{ + * name: string, + * region: string, + * configuredStatus: value-of, + * networks?: ?array, + * customDomains?: ?array, + * labels?: ?array, + * properties?: ?ObjectStorage2PropertiesCreate, + * terminationProtection?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->region = $values['region']; + $this->configuredStatus = $values['configuredStatus']; + $this->networks = $values['networks'] ?? null; + $this->customDomains = $values['customDomains'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->properties = $values['properties'] ?? null; + $this->terminationProtection = $values['terminationProtection'] ?? null; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2ServiceModify.php b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2ServiceModify.php new file mode 100644 index 00000000..ff7d0281 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2ServiceModify.php @@ -0,0 +1,89 @@ + $configuredStatus + */ + #[JsonProperty('configured_status')] + public ?string $configuredStatus; + + /** + * @var ?array $networks + */ + #[JsonProperty('networks'), ArrayType([ObjectStorage2NetworkCreate::class])] + public ?array $networks; + + /** + * @var ?array $customDomains + */ + #[JsonProperty('custom_domains'), ArrayType([ObjectStorage2CustomDomainCreate::class])] + public ?array $customDomains; + + /** + * @var ?array $staticWebsites Static website configurations for this service. Array replaces all existing configurations. + */ + #[JsonProperty('static_websites'), ArrayType([ObjectStorage2StaticWebsiteConfigCreate::class])] + public ?array $staticWebsites; + + /** + * @var ?array $labels + */ + #[JsonProperty('labels'), ArrayType([ObjectStorage2LabelCreate::class])] + public ?array $labels; + + /** + * @var ?ObjectStorage2PropertiesCreate $properties + */ + #[JsonProperty('properties')] + public ?ObjectStorage2PropertiesCreate $properties; + + /** + * @var ?bool $terminationProtection Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first. + */ + #[JsonProperty('termination_protection')] + public ?bool $terminationProtection; + + /** + * @param array{ + * name?: ?string, + * configuredStatus?: ?value-of, + * networks?: ?array, + * customDomains?: ?array, + * staticWebsites?: ?array, + * labels?: ?array, + * properties?: ?ObjectStorage2PropertiesCreate, + * terminationProtection?: ?bool, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->configuredStatus = $values['configuredStatus'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->customDomains = $values['customDomains'] ?? null; + $this->staticWebsites = $values['staticWebsites'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->properties = $values['properties'] ?? null; + $this->terminationProtection = $values['terminationProtection'] ?? null; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2ServiceReplace.php b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2ServiceReplace.php new file mode 100644 index 00000000..b230d327 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2ServiceReplace.php @@ -0,0 +1,89 @@ + $configuredStatus + */ + #[JsonProperty('configured_status')] + public string $configuredStatus; + + /** + * @var ?bool $terminationProtection Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first. + */ + #[JsonProperty('termination_protection')] + public ?bool $terminationProtection; + + /** + * @var ?array $networks + */ + #[JsonProperty('networks'), ArrayType([ObjectStorage2NetworkCreate::class])] + public ?array $networks; + + /** + * @var ?array $customDomains + */ + #[JsonProperty('custom_domains'), ArrayType([ObjectStorage2CustomDomainCreate::class])] + public ?array $customDomains; + + /** + * @var ?array $staticWebsites Static website configurations for this service. Array replaces all existing configurations. + */ + #[JsonProperty('static_websites'), ArrayType([ObjectStorage2StaticWebsiteConfigCreate::class])] + public ?array $staticWebsites; + + /** + * @var ?array $labels + */ + #[JsonProperty('labels'), ArrayType([ObjectStorage2LabelCreate::class])] + public ?array $labels; + + /** + * @var ?ObjectStorage2PropertiesCreate $properties + */ + #[JsonProperty('properties')] + public ?ObjectStorage2PropertiesCreate $properties; + + /** + * @param array{ + * name: string, + * configuredStatus: value-of, + * terminationProtection?: ?bool, + * networks?: ?array, + * customDomains?: ?array, + * staticWebsites?: ?array, + * labels?: ?array, + * properties?: ?ObjectStorage2PropertiesCreate, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->configuredStatus = $values['configuredStatus']; + $this->terminationProtection = $values['terminationProtection'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->customDomains = $values['customDomains'] ?? null; + $this->staticWebsites = $values['staticWebsites'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->properties = $values['properties'] ?? null; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2StaticWebsiteConfigModify.php b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2StaticWebsiteConfigModify.php new file mode 100644 index 00000000..6a538d93 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2StaticWebsiteConfigModify.php @@ -0,0 +1,67 @@ + $errorPages Custom error page configurations for specific HTTP status codes or ranges. Replaces the entire set when provided. + */ + #[JsonProperty('error_pages'), ArrayType(['mixed'])] + public ?array $errorPages; + + /** + * @param array{ + * bucketName?: ?string, + * bucketPrefix?: ?string, + * indexDocument?: ?string, + * spaMode?: ?bool, + * enabled?: ?bool, + * errorPages?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->bucketName = $values['bucketName'] ?? null; + $this->bucketPrefix = $values['bucketPrefix'] ?? null; + $this->indexDocument = $values['indexDocument'] ?? null; + $this->spaMode = $values['spaMode'] ?? null; + $this->enabled = $values['enabled'] ?? null; + $this->errorPages = $values['errorPages'] ?? null; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2UserCreate.php b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2UserCreate.php new file mode 100644 index 00000000..5c325e94 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ObjectStorage2UserCreate.php @@ -0,0 +1,26 @@ +username = $values['username']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ReplaceObjectStorageRoleTagsRequest.php b/fern/sdk/src/ObjectStorage2/Requests/ReplaceObjectStorageRoleTagsRequest.php new file mode 100644 index 00000000..8af1cb1c --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ReplaceObjectStorageRoleTagsRequest.php @@ -0,0 +1,25 @@ + $body + */ + public array $body; + + /** + * @param array{ + * body: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->body = $values['body']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Requests/ReplaceObjectStorageUserTagsRequest.php b/fern/sdk/src/ObjectStorage2/Requests/ReplaceObjectStorageUserTagsRequest.php new file mode 100644 index 00000000..b1657b10 --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Requests/ReplaceObjectStorageUserTagsRequest.php @@ -0,0 +1,25 @@ + $body + */ + public array $body; + + /** + * @param array{ + * body: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->body = $values['body']; + } +} diff --git a/fern/sdk/src/ObjectStorage2/Types/ObjectStorage2AccessKeyModifyStatus.php b/fern/sdk/src/ObjectStorage2/Types/ObjectStorage2AccessKeyModifyStatus.php new file mode 100644 index 00000000..05f5edac --- /dev/null +++ b/fern/sdk/src/ObjectStorage2/Types/ObjectStorage2AccessKeyModifyStatus.php @@ -0,0 +1,9 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Returns list of accounts associated with the partner. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listPartnerAccounts(?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/partner/accounts", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [PartnerAccount::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates new UpCloud account that will be linked to partner's existing invoicing. + * + * @param PartnerCreateAccount $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return PartnerAccount + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createPartnerAccount(PartnerCreateAccount $request, ?array $options = null): PartnerAccount + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/partner/accounts", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return PartnerAccount::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Partner/Requests/PartnerCreateAccount.php b/fern/sdk/src/Partner/Requests/PartnerCreateAccount.php new file mode 100644 index 00000000..1ed1dea2 --- /dev/null +++ b/fern/sdk/src/Partner/Requests/PartnerCreateAccount.php @@ -0,0 +1,43 @@ +username = $values['username']; + $this->password = $values['password']; + $this->contactDetails = $values['contactDetails'] ?? null; + } +} diff --git a/fern/sdk/src/Partner/Types/PartnerCreateAccountContactDetails.php b/fern/sdk/src/Partner/Types/PartnerCreateAccountContactDetails.php new file mode 100644 index 00000000..c1ca1dc0 --- /dev/null +++ b/fern/sdk/src/Partner/Types/PartnerCreateAccountContactDetails.php @@ -0,0 +1,114 @@ +address = $values['address'] ?? null; + $this->city = $values['city'] ?? null; + $this->company = $values['company'] ?? null; + $this->country = $values['country']; + $this->email = $values['email']; + $this->firstName = $values['firstName']; + $this->lastName = $values['lastName']; + $this->phone = $values['phone']; + $this->postalCode = $values['postalCode'] ?? null; + $this->state = $values['state'] ?? null; + $this->vatNumber = $values['vatNumber'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Permission/PermissionClient.php b/fern/sdk/src/Permission/PermissionClient.php new file mode 100644 index 00000000..7fd93ecb --- /dev/null +++ b/fern/sdk/src/Permission/PermissionClient.php @@ -0,0 +1,387 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Retrieves a list of permissions for sub-accounts to access resources owned by the main account. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Permissions + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listPermissions(?array $options = null): Permissions + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/permission", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Permissions::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Replaces the entire set of permissions for sub-accounts to access resources owned by the main account. + * + * @param Permission $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Permissions + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function replacePermissions(Permission $request, ?array $options = null): Permissions + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/permission", + method: HttpMethod::PUT, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Permissions::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Grants a permission for a sub-account to access a resource owned by the main account. + * + * @param GrantPermissionRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Permission + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function grantPermission(GrantPermissionRequest $request, ?array $options = null): Permission + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->skipTargetCheck !== null) { + $query['skip_target_check'] = $request->skipTargetCheck; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/permission/grant", + method: HttpMethod::POST, + query: $query, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Permission::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Revokes a permission for a sub-account to access a resource owned by the main account. + * + * @param Permission $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function revokePermission(Permission $request, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/permission/revoke", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Revokes all permissions for sub-accounts to access a specific resource owned by the main account. + * + * @param string $targetType The type of the target resource (e.g., "server", "storage"). + * @param string $targetIdentifier The identifier of the target resource. + * @param RevokeAllPermissionsByTargetRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function revokeAllPermissionsByTarget(string $targetType, string $targetIdentifier, RevokeAllPermissionsByTargetRequest $request = new RevokeAllPermissionsByTargetRequest(), ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->mainAccountId !== null) { + $query['main_account_id'] = $request->mainAccountId; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/permission/revoke-all-from-target/{$targetType}/{$targetIdentifier}", + method: HttpMethod::POST, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Revokes all permissions for a specific sub-account to access any resources owned by the main account. + * + * @param string $user The username of the sub-account. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function revokeAllPermissionsByUser(string $user, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/permission/revoke-all-from-user/{$user}", + method: HttpMethod::POST, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Permission/Requests/GrantPermissionRequest.php b/fern/sdk/src/Permission/Requests/GrantPermissionRequest.php new file mode 100644 index 00000000..96e3be11 --- /dev/null +++ b/fern/sdk/src/Permission/Requests/GrantPermissionRequest.php @@ -0,0 +1,32 @@ +skipTargetCheck = $values['skipTargetCheck'] ?? null; + $this->body = $values['body']; + } +} diff --git a/fern/sdk/src/Permission/Requests/RevokeAllPermissionsByTargetRequest.php b/fern/sdk/src/Permission/Requests/RevokeAllPermissionsByTargetRequest.php new file mode 100644 index 00000000..8a8eb7d1 --- /dev/null +++ b/fern/sdk/src/Permission/Requests/RevokeAllPermissionsByTargetRequest.php @@ -0,0 +1,24 @@ +mainAccountId = $values['mainAccountId'] ?? null; + } +} diff --git a/fern/sdk/src/Plan/PlanClient.php b/fern/sdk/src/Plan/PlanClient.php new file mode 100644 index 00000000..adc1a2d7 --- /dev/null +++ b/fern/sdk/src/Plan/PlanClient.php @@ -0,0 +1,108 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Returns a list of available plans. All plans are available in all zones but pricing may differ. See _List prices_ for how to obtain current price list. + * + * In addition to listed plans, server can be freely configured with "custom" plan which allows freely scalable CPU cores, memory amount and storage resources. __Note!__ Custom plans are available for new customers through contact with sales. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Plan + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listPlans(?array $options = null): Plan + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/plan", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Plan::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Price/PriceClient.php b/fern/sdk/src/Price/PriceClient.php new file mode 100644 index 00000000..095848d4 --- /dev/null +++ b/fern/sdk/src/Price/PriceClient.php @@ -0,0 +1,113 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Returns a price list. + * + * @param GetPriceRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Prices + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getPrice(GetPriceRequest $request = new GetPriceRequest(), ?array $options = null): Prices + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->zone !== null) { + $query['zone'] = $request->zone; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/price", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Prices::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Price/Requests/GetPriceRequest.php b/fern/sdk/src/Price/Requests/GetPriceRequest.php new file mode 100644 index 00000000..ac3c6ca2 --- /dev/null +++ b/fern/sdk/src/Price/Requests/GetPriceRequest.php @@ -0,0 +1,24 @@ +zone = $values['zone'] ?? null; + } +} diff --git a/fern/sdk/src/Router/Requests/ListRoutersRequest.php b/fern/sdk/src/Router/Requests/ListRoutersRequest.php new file mode 100644 index 00000000..c60b6acf --- /dev/null +++ b/fern/sdk/src/Router/Requests/ListRoutersRequest.php @@ -0,0 +1,25 @@ +label = $values['label'] ?? null; + } +} diff --git a/fern/sdk/src/Router/Requests/RouterCreate.php b/fern/sdk/src/Router/Requests/RouterCreate.php new file mode 100644 index 00000000..31cecc2a --- /dev/null +++ b/fern/sdk/src/Router/Requests/RouterCreate.php @@ -0,0 +1,27 @@ +router = $values['router']; + } +} diff --git a/fern/sdk/src/Router/Requests/RouterModify.php b/fern/sdk/src/Router/Requests/RouterModify.php new file mode 100644 index 00000000..ca25da72 --- /dev/null +++ b/fern/sdk/src/Router/Requests/RouterModify.php @@ -0,0 +1,27 @@ +routerModifyRouter = $values['routerModifyRouter']; + } +} diff --git a/fern/sdk/src/Router/RouterClient.php b/fern/sdk/src/Router/RouterClient.php new file mode 100644 index 00000000..fcbba3cf --- /dev/null +++ b/fern/sdk/src/Router/RouterClient.php @@ -0,0 +1,344 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Returns a list of all available routers associated with the current account. + * + * It is also possible to filter routers with label URL parameters, e.g. + * `?label=env` or `?label=env%3Dprod`. URL parameter can be given multiple + * times to add more filters (e.g. `?label=env%3Dprod&label=v2`), where + * only routers that match all labels are returned. + * Label keys are matched case insensitively. + * + * @param ListRoutersRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Routers + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listRouters(ListRoutersRequest $request = new ListRoutersRequest(), ?array $options = null): Routers + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->label !== null) { + $query['label'] = $request->label; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/router", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Routers::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new router. + * Routers can be used to connect multiple Private Networks. Cloud Servers on any attached network can communicate + * directly with each other. + * + * @param RouterCreate $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Router + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createRouter(RouterCreate $request, ?array $options = null): Router + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/router", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Router::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Retrieves details of a specific router. + * + * @param string $router The router identifier. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Router + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getRouter(string $router, ?array $options = null): Router + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/router/{$router}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Router::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a specific router. + * + * @param string $router The router identifier. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteRouter(string $router, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/router/{$router}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies attributes of a specific router. + * Modifications to static routes of type `service` will be ignored. + * + * @param string $router The router identifier. + * @param RouterModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Router + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyRouter(string $router, RouterModify $request, ?array $options = null): Router + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/router/{$router}", + method: HttpMethod::PATCH, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Router::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Router/Types/RouterCreateRouter.php b/fern/sdk/src/Router/Types/RouterCreateRouter.php new file mode 100644 index 00000000..aa1dd666 --- /dev/null +++ b/fern/sdk/src/Router/Types/RouterCreateRouter.php @@ -0,0 +1,52 @@ + $staticRoutes Static routes that will be added to the routing table of the SDN router + */ + #[JsonProperty('static_routes'), ArrayType([RouterCreateRouterStaticRoutesItem::class])] + public ?array $staticRoutes; + + /** + * @var ?array $labels + */ + #[JsonProperty('labels'), ArrayType([RouterLabel::class])] + public ?array $labels; + + /** + * @param array{ + * name: string, + * staticRoutes?: ?array, + * labels?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->staticRoutes = $values['staticRoutes'] ?? null; + $this->labels = $values['labels'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Router/Types/RouterCreateRouterStaticRoutesItem.php b/fern/sdk/src/Router/Types/RouterCreateRouterStaticRoutesItem.php new file mode 100644 index 00000000..00c29768 --- /dev/null +++ b/fern/sdk/src/Router/Types/RouterCreateRouterStaticRoutesItem.php @@ -0,0 +1,56 @@ + + * ) $nexthop + */ + #[JsonProperty('nexthop')] + public string $nexthop; + + /** + * @var string $route + */ + #[JsonProperty('route')] + public string $route; + + /** + * @param array{ + * nexthop: ( + * string + * |value-of + * ), + * route: string, + * name?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name'] ?? null; + $this->nexthop = $values['nexthop']; + $this->route = $values['route']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Router/Types/RouterCreateRouterStaticRoutesItemNexthopOne.php b/fern/sdk/src/Router/Types/RouterCreateRouterStaticRoutesItemNexthopOne.php new file mode 100644 index 00000000..f9613efb --- /dev/null +++ b/fern/sdk/src/Router/Types/RouterCreateRouterStaticRoutesItemNexthopOne.php @@ -0,0 +1,8 @@ + $staticRoutes Static routes that will be added to the routing table of the SDN router + */ + #[JsonProperty('static_routes'), ArrayType([RouterModifyRouterStaticRoutesItem::class])] + public ?array $staticRoutes; + + /** + * @var ?array $labels + */ + #[JsonProperty('labels'), ArrayType([RouterLabel::class])] + public ?array $labels; + + /** + * @param array{ + * name?: ?string, + * staticRoutes?: ?array, + * labels?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->staticRoutes = $values['staticRoutes'] ?? null; + $this->labels = $values['labels'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Router/Types/RouterModifyRouterStaticRoutesItem.php b/fern/sdk/src/Router/Types/RouterModifyRouterStaticRoutesItem.php new file mode 100644 index 00000000..1ff782d8 --- /dev/null +++ b/fern/sdk/src/Router/Types/RouterModifyRouterStaticRoutesItem.php @@ -0,0 +1,56 @@ + + * ) $nexthop + */ + #[JsonProperty('nexthop')] + public string $nexthop; + + /** + * @var string $route + */ + #[JsonProperty('route')] + public string $route; + + /** + * @param array{ + * nexthop: ( + * string + * |value-of + * ), + * route: string, + * name?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name'] ?? null; + $this->nexthop = $values['nexthop']; + $this->route = $values['route']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Router/Types/RouterModifyRouterStaticRoutesItemNexthopOne.php b/fern/sdk/src/Router/Types/RouterModifyRouterStaticRoutesItemNexthopOne.php new file mode 100644 index 00000000..8c917789 --- /dev/null +++ b/fern/sdk/src/Router/Types/RouterModifyRouterStaticRoutesItemNexthopOne.php @@ -0,0 +1,8 @@ +server = $values['server']; + } +} diff --git a/fern/sdk/src/Server/Requests/DeleteServerRequest.php b/fern/sdk/src/Server/Requests/DeleteServerRequest.php new file mode 100644 index 00000000..679ff2f7 --- /dev/null +++ b/fern/sdk/src/Server/Requests/DeleteServerRequest.php @@ -0,0 +1,33 @@ + $storages Whether to delete attached storage devices. + */ + public ?string $storages; + + /** + * @var ?value-of $backups How to handle backups when deleting storage devices. The delete value is valid only when storages is set to a truthy value. + */ + public ?string $backups; + + /** + * @param array{ + * storages?: ?value-of, + * backups?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->storages = $values['storages'] ?? null; + $this->backups = $values['backups'] ?? null; + } +} diff --git a/fern/sdk/src/Server/Requests/ListServersRequest.php b/fern/sdk/src/Server/Requests/ListServersRequest.php new file mode 100644 index 00000000..d8ae5323 --- /dev/null +++ b/fern/sdk/src/Server/Requests/ListServersRequest.php @@ -0,0 +1,97 @@ + $state Filter by the current Cloud Server state. + */ + public ?string $state; + + /** + * @var ?string $tag Filter by tag name. Separate names with commas to match any tag or colons to require all tags. + */ + public ?string $tag; + + /** + * @var ?string $search Search UUIDs, titles, hostnames, zones, zone descriptions, IP addresses, tags, and template names. + */ + public ?string $search; + + /** + * @var ?value-of $sortBy Field to sort by. + */ + public ?string $sortBy; + + /** + * @var ?value-of $orderBy Sort direction. Only applied when sort_by is specified. + */ + public ?string $orderBy; + + /** + * @var ?int $limit Maximum number of Cloud Servers to return. + */ + public ?int $limit; + + /** + * @var ?int $offset Number of Cloud Servers to skip. + */ + public ?int $offset; + + /** + * @param array{ + * label?: ?string, + * uuid?: ?string, + * host?: ?int, + * device?: ?string, + * state?: ?value-of, + * tag?: ?string, + * search?: ?string, + * sortBy?: ?value-of, + * orderBy?: ?value-of, + * limit?: ?int, + * offset?: ?int, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->label = $values['label'] ?? null; + $this->uuid = $values['uuid'] ?? null; + $this->host = $values['host'] ?? null; + $this->device = $values['device'] ?? null; + $this->state = $values['state'] ?? null; + $this->tag = $values['tag'] ?? null; + $this->search = $values['search'] ?? null; + $this->sortBy = $values['sortBy'] ?? null; + $this->orderBy = $values['orderBy'] ?? null; + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + } +} diff --git a/fern/sdk/src/Server/Requests/ModifyServer.php b/fern/sdk/src/Server/Requests/ModifyServer.php new file mode 100644 index 00000000..6a1a5fe9 --- /dev/null +++ b/fern/sdk/src/Server/Requests/ModifyServer.php @@ -0,0 +1,27 @@ +server = $values['server']; + } +} diff --git a/fern/sdk/src/Server/Requests/RelocateServer.php b/fern/sdk/src/Server/Requests/RelocateServer.php new file mode 100644 index 00000000..7d2e09f4 --- /dev/null +++ b/fern/sdk/src/Server/Requests/RelocateServer.php @@ -0,0 +1,26 @@ +zone = $values['zone']; + } +} diff --git a/fern/sdk/src/Server/Requests/RestartServer.php b/fern/sdk/src/Server/Requests/RestartServer.php new file mode 100644 index 00000000..68f14505 --- /dev/null +++ b/fern/sdk/src/Server/Requests/RestartServer.php @@ -0,0 +1,34 @@ +restartServer = $values['restartServer']; + } +} diff --git a/fern/sdk/src/Server/Requests/ServerAddInterface.php b/fern/sdk/src/Server/Requests/ServerAddInterface.php new file mode 100644 index 00000000..8dcc8272 --- /dev/null +++ b/fern/sdk/src/Server/Requests/ServerAddInterface.php @@ -0,0 +1,27 @@ +interface = $values['interface']; + } +} diff --git a/fern/sdk/src/Server/Requests/ServerAddIpAddress.php b/fern/sdk/src/Server/Requests/ServerAddIpAddress.php new file mode 100644 index 00000000..d2a03867 --- /dev/null +++ b/fern/sdk/src/Server/Requests/ServerAddIpAddress.php @@ -0,0 +1,35 @@ + $force Move the address from another interface when that interface can retain its required minimum number of addresses + */ + public ?string $force; + + /** + * @var ServerAddIpAddressIpAddress $ipAddress + */ + #[JsonProperty('ip_address')] + public ServerAddIpAddressIpAddress $ipAddress; + + /** + * @param array{ + * ipAddress: ServerAddIpAddressIpAddress, + * force?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->force = $values['force'] ?? null; + $this->ipAddress = $values['ipAddress']; + } +} diff --git a/fern/sdk/src/Server/Requests/ServerAttachPrivateFirewallRuleset.php b/fern/sdk/src/Server/Requests/ServerAttachPrivateFirewallRuleset.php new file mode 100644 index 00000000..0934d411 --- /dev/null +++ b/fern/sdk/src/Server/Requests/ServerAttachPrivateFirewallRuleset.php @@ -0,0 +1,27 @@ +firewallRuleset = $values['firewallRuleset']; + } +} diff --git a/fern/sdk/src/Server/Requests/ServerAttachStorage.php b/fern/sdk/src/Server/Requests/ServerAttachStorage.php new file mode 100644 index 00000000..7ec4019e --- /dev/null +++ b/fern/sdk/src/Server/Requests/ServerAttachStorage.php @@ -0,0 +1,27 @@ +storageDevice = $values['storageDevice']; + } +} diff --git a/fern/sdk/src/Server/Requests/ServerCreateFirewallRule.php b/fern/sdk/src/Server/Requests/ServerCreateFirewallRule.php new file mode 100644 index 00000000..d51164d7 --- /dev/null +++ b/fern/sdk/src/Server/Requests/ServerCreateFirewallRule.php @@ -0,0 +1,27 @@ +firewallRule = $values['firewallRule']; + } +} diff --git a/fern/sdk/src/Server/Requests/ServerDetachPrivateFirewallRuleset.php b/fern/sdk/src/Server/Requests/ServerDetachPrivateFirewallRuleset.php new file mode 100644 index 00000000..1c2d9190 --- /dev/null +++ b/fern/sdk/src/Server/Requests/ServerDetachPrivateFirewallRuleset.php @@ -0,0 +1,27 @@ +firewallRuleset = $values['firewallRuleset']; + } +} diff --git a/fern/sdk/src/Server/Requests/ServerDetachStorage.php b/fern/sdk/src/Server/Requests/ServerDetachStorage.php new file mode 100644 index 00000000..29d5e725 --- /dev/null +++ b/fern/sdk/src/Server/Requests/ServerDetachStorage.php @@ -0,0 +1,26 @@ +storageDevice = $values['storageDevice']; + } +} diff --git a/fern/sdk/src/Server/Requests/ServerLoadCdrom.php b/fern/sdk/src/Server/Requests/ServerLoadCdrom.php new file mode 100644 index 00000000..5736cb76 --- /dev/null +++ b/fern/sdk/src/Server/Requests/ServerLoadCdrom.php @@ -0,0 +1,27 @@ +storageDevice = $values['storageDevice']; + } +} diff --git a/fern/sdk/src/Server/Requests/ServerModifyInterface.php b/fern/sdk/src/Server/Requests/ServerModifyInterface.php new file mode 100644 index 00000000..7104eb01 --- /dev/null +++ b/fern/sdk/src/Server/Requests/ServerModifyInterface.php @@ -0,0 +1,27 @@ +interface = $values['interface']; + } +} diff --git a/fern/sdk/src/Server/Requests/ServerRebuild.php b/fern/sdk/src/Server/Requests/ServerRebuild.php new file mode 100644 index 00000000..30ee0f86 --- /dev/null +++ b/fern/sdk/src/Server/Requests/ServerRebuild.php @@ -0,0 +1,27 @@ +serverRebuild = $values['serverRebuild']; + } +} diff --git a/fern/sdk/src/Server/Requests/ServerUpdateFirewallRules.php b/fern/sdk/src/Server/Requests/ServerUpdateFirewallRules.php new file mode 100644 index 00000000..c139de97 --- /dev/null +++ b/fern/sdk/src/Server/Requests/ServerUpdateFirewallRules.php @@ -0,0 +1,27 @@ +firewallRules = $values['firewallRules']; + } +} diff --git a/fern/sdk/src/Server/Requests/StartServer.php b/fern/sdk/src/Server/Requests/StartServer.php new file mode 100644 index 00000000..599ddcc8 --- /dev/null +++ b/fern/sdk/src/Server/Requests/StartServer.php @@ -0,0 +1,27 @@ +server = $values['server']; + } +} diff --git a/fern/sdk/src/Server/Requests/StopServer.php b/fern/sdk/src/Server/Requests/StopServer.php new file mode 100644 index 00000000..cbcbd8f9 --- /dev/null +++ b/fern/sdk/src/Server/Requests/StopServer.php @@ -0,0 +1,27 @@ +stopServer = $values['stopServer']; + } +} diff --git a/fern/sdk/src/Server/ServerClient.php b/fern/sdk/src/Server/ServerClient.php new file mode 100644 index 00000000..0de2a5e0 --- /dev/null +++ b/fern/sdk/src/Server/ServerClient.php @@ -0,0 +1,2422 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Returns the most relevant information for Cloud Servers associated with the current account. + * + * @param ListServersRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return GetServerList + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listServers(ListServersRequest $request = new ListServersRequest(), ?array $options = null): GetServerList + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->label !== null) { + $query['label'] = $request->label; + } + if ($request->uuid !== null) { + $query['uuid'] = $request->uuid; + } + if ($request->host !== null) { + $query['host'] = $request->host; + } + if ($request->device !== null) { + $query['device'] = $request->device; + } + if ($request->state !== null) { + $query['state'] = $request->state; + } + if ($request->tag !== null) { + $query['tag'] = $request->tag; + } + if ($request->search !== null) { + $query['search'] = $request->search; + } + if ($request->sortBy !== null) { + $query['sort_by'] = $request->sortBy; + } + if ($request->orderBy !== null) { + $query['order_by'] = $request->orderBy; + } + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return GetServerList::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new Cloud Server + * + * @param CreateServer $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return CreateServerResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createServer(CreateServer $request, ?array $options = null): CreateServerResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return CreateServerResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Return Cloud Servers visible to the authenticated account that are related to a private firewall ruleset, including each Cloud Server's private ruleset relationships. + * + * @param string $rulesetUuid Firewall ruleset UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return FirewallRulesetRelatedServers + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listFirewallRulesetRelationships(string $rulesetUuid, ?array $options = null): FirewallRulesetRelatedServers + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/firewall_ruleset_relationships/private/{$rulesetUuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return FirewallRulesetRelatedServers::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns the unique label key-value pairs used by Cloud Servers accessible to the current account. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getLabels(?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/labels", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, [ServerLabel::class]); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns detailed information about a Cloud Server. + * + * @param string $uuid Cloud Server UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Server + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getServer(string $uuid, ?array $options = null): Server + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Server::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies an existing Cloud Server configuration. + * + * @param string $uuid Cloud Server UUID + * @param ModifyServer $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Server + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyServer(string $uuid, ModifyServer $request, ?array $options = null): Server + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}", + method: HttpMethod::PUT, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Server::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a stopped Cloud Server and releases its IP addresses. Deleting backups requires deleting the associated storage devices. + * + * @param string $uuid Cloud Server UUID + * @param DeleteServerRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteServer(string $uuid, DeleteServerRequest $request = new DeleteServerRequest(), ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->storages !== null) { + $query['storages'] = $request->storages; + } + if ($request->backups !== null) { + $query['backups'] = $request->backups; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}", + method: HttpMethod::DELETE, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Attach a private, stateful firewall ruleset to a Cloud Server. The latest ruleset version is selected and applied to private network interfaces. + * + * @param string $uuid Cloud Server UUID + * @param ServerAttachPrivateFirewallRuleset $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerFirewallRulesetRelationship + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function attachPrivateFirewallRuleset(string $uuid, ServerAttachPrivateFirewallRuleset $request, ?array $options = null): ServerFirewallRulesetRelationship + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/attach_firewall_ruleset/private", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerFirewallRulesetRelationship::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Cancels an operation while the Cloud Server is in maintenance state. + * + * @param string $uuid Cloud Server UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function cancelServerOperation(string $uuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/cancel", + method: HttpMethod::POST, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Eject the storage from the Cloud Server's attached CD-ROM device. + * + * @param string $uuid Cloud Server UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Server + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function ejectCdrom(string $uuid, ?array $options = null): Server + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/cdrom/eject", + method: HttpMethod::POST, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Server::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Load a storage of type normal or cdrom into the Cloud Server's attached CD-ROM device. If media is already loaded, it is ejected first. + * + * @param string $uuid Cloud Server UUID + * @param ServerLoadCdrom $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Server + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function loadCdrom(string $uuid, ServerLoadCdrom $request, ?array $options = null): Server + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/cdrom/load", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Server::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Detach a private firewall ruleset from a Cloud Server and reapply private-interface firewall rules. + * + * @param string $uuid Cloud Server UUID + * @param ServerDetachPrivateFirewallRuleset $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerFirewallRulesetRelationship + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function detachPrivateFirewallRuleset(string $uuid, ServerDetachPrivateFirewallRuleset $request, ?array $options = null): ServerFirewallRulesetRelationship + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/detach_firewall_ruleset/private", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerFirewallRulesetRelationship::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Return the Cloud Server firewall rules in evaluation order. Changes to firewall rules can take 1-2 minutes to take effect. + * + * @param string $uuid Cloud Server UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerFirewallRules + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listFirewallRules(string $uuid, ?array $options = null): ServerFirewallRules + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/firewall_rule", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerFirewallRules::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Create a firewall rule. Rules are evaluated in position order; if position is omitted, the rule is appended. Changes can take 1-2 minutes to take effect. + * + * @param string $uuid Cloud Server UUID + * @param ServerCreateFirewallRule $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerFirewallRule + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createFirewallRule(string $uuid, ServerCreateFirewallRule $request, ?array $options = null): ServerFirewallRule + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/firewall_rule", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerFirewallRule::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Replace the Cloud Server's complete firewall rule chain. Array order determines rule positions. Changes can take 1-2 minutes to take effect. + * + * @param string $uuid Cloud Server UUID + * @param ServerUpdateFirewallRules $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function updateFirewallRules(string $uuid, ServerUpdateFirewallRules $request, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/firewall_rule", + method: HttpMethod::PUT, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Return the firewall rule at the specified one-based position in the Cloud Server rule chain. + * + * @param string $uuid Cloud Server UUID + * @param int $position Firewall rule position + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerFirewallRule + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getFirewallRule(string $uuid, int $position, ?array $options = null): ServerFirewallRule + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/firewall_rule/{$position}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerFirewallRule::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Delete the firewall rule at the specified one-based position. Remaining rules are renumbered. Changes can take 1-2 minutes to take effect. + * + * @param string $uuid Cloud Server UUID + * @param int $position Firewall rule position + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteFirewallRule(string $uuid, int $position, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/firewall_rule/{$position}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Return all private firewall ruleset relationships configured for a Cloud Server. + * + * @param string $uuid Cloud Server UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerFirewallRulesetRelationships + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listPrivateFirewallRulesetRelationships(string $uuid, ?array $options = null): ServerFirewallRulesetRelationships + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/firewall_ruleset_relationships/private", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerFirewallRulesetRelationships::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns GPUs attached to a Cloud Server. + * + * @param string $uuid Cloud Server UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerGpus + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listServerGpUs(string $uuid, ?array $options = null): ServerGpus + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/gpus", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerGpus::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Return all network interfaces and IP addresses configured for a Cloud Server. + * + * @param string $uuid Cloud Server UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerNetworkingResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getServerNetworking(string $uuid, ?array $options = null): ServerNetworkingResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/networking", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerNetworkingResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Add a network interface to a stopped Cloud Server. A private interface must identify the SDN network to attach. The combined limit of network interfaces and storage devices is 24. + * + * @param string $uuid Cloud Server UUID + * @param ServerAddInterface $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerInterfaceResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function addServerInterface(string $uuid, ServerAddInterface $request, ?array $options = null): ServerInterfaceResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/networking/interface", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerInterfaceResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modify the IP addresses, source IP filtering, boot setting, or index of a network interface on a stopped Cloud Server. Changing the interface network or type is not supported. + * + * @param string $uuid Cloud Server UUID + * @param int $index Network interface index + * @param ServerModifyInterface $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerInterfaceResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyServerInterface(string $uuid, int $index, ServerModifyInterface $request, ?array $options = null): ServerInterfaceResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/networking/interface/{$index}", + method: HttpMethod::PUT, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerInterfaceResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Delete a network interface from a stopped Cloud Server. IP addresses attached to the interface are released according to their release policies. + * + * @param string $uuid Cloud Server UUID + * @param int $index Network interface index + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteServerInterface(string $uuid, int $index, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/networking/interface/{$index}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Add an IPv4 or IPv6 address to a private network interface. The interface cannot contain addresses from both families and can have at most five addresses. + * + * @param string $uuid Cloud Server UUID + * @param int $index Network interface index + * @param ServerAddIpAddress $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerIpAddressInterfaceResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function addServerInterfaceIpAddress(string $uuid, int $index, ServerAddIpAddress $request, ?array $options = null): ServerIpAddressInterfaceResponse + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->force !== null) { + $query['force'] = $request->force; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/networking/interface/{$index}/ip_address", + method: HttpMethod::POST, + query: $query, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerIpAddressInterfaceResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Delete an IP address from a private network interface. At least one IP address must remain attached to the interface. + * + * @param string $uuid Cloud Server UUID + * @param int $index Network interface index + * @param string $ip IP address to delete + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteServerInterfaceIpAddress(string $uuid, int $index, string $ip, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/networking/interface/{$index}/ip_address/{$ip}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Reinstalls a stopped Cloud Server from a public template. + * + * @param string $uuid Cloud Server UUID + * @param ServerRebuild $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Server + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function rebuildServer(string $uuid, ServerRebuild $request, ?array $options = null): Server + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/rebuild", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Server::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Relocates a stopped Cloud Server to another zone in the same physical location (datacenter). + * + * @param string $uuid Cloud Server UUID + * @param RelocateServer $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Server + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function relocateServer(string $uuid, RelocateServer $request, ?array $options = null): Server + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/relocate", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Server::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns remote access settings and VNC connection details for a Cloud Server. + * + * @param string $uuid Cloud Server UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerRemoteAccessDetails + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getRemoteAccessDetails(string $uuid, ?array $options = null): ServerRemoteAccessDetails + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/remote_access_details", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerRemoteAccessDetails::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Stops and starts a Cloud Server in started state. + * + * @param string $uuid Cloud Server UUID + * @param RestartServer $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Server + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function restartServer(string $uuid, RestartServer $request, ?array $options = null): Server + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/restart", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Server::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Starts a Cloud Server in stopped state. + * + * @param string $uuid Cloud Server UUID + * @param StartServer $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Server + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function startServer(string $uuid, StartServer $request, ?array $options = null): Server + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/start", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Server::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns CPU usage statistics for all supported periods. + * + * @param string $uuid Cloud Server UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerCpuStats + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getCpuStats(string $uuid, ?array $options = null): ServerCpuStats + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/stats/cpu", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerCpuStats::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns CPU usage statistics for the selected period. + * + * @param string $uuid Cloud Server UUID + * @param value-of $period Statistics period. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerCpuStats + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getCpuStatsByPeriod(string $uuid, string $period, ?array $options = null): ServerCpuStats + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/stats/cpu/{$period}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerCpuStats::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns aggregate disk read and write statistics for all supported periods. + * + * @param string $uuid Cloud Server UUID + * @param value-of $type Measure disk activity as transferred bytes or I/O requests. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerDiskStats + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDiskStats(string $uuid, string $type, ?array $options = null): ServerDiskStats + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/stats/disk/{$type}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerDiskStats::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns aggregate disk read and write statistics for the selected period. + * + * @param string $uuid Cloud Server UUID + * @param value-of $type Measure disk activity as transferred bytes or I/O requests. + * @param value-of $period Statistics period. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerDiskStats + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getDiskStatsByPeriod(string $uuid, string $type, string $period, ?array $options = null): ServerDiskStats + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/stats/disk/{$type}/{$period}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerDiskStats::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns aggregate inbound and outbound network statistics for all interfaces and periods. + * + * @param string $uuid Cloud Server UUID + * @param value-of $type Measure network activity as transferred bytes or packets. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerNetworkStats + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getNetworkStats(string $uuid, string $type, ?array $options = null): ServerNetworkStats + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/stats/network/{$type}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerNetworkStats::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns inbound and outbound network statistics for the selected network type and all periods. + * + * @param string $uuid Cloud Server UUID + * @param value-of $type Measure network activity as transferred bytes or packets. + * @param value-of $network Network access type to aggregate. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerNetworkStats + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getNetworkStatsByNetwork(string $uuid, string $type, string $network, ?array $options = null): ServerNetworkStats + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/stats/network/{$type}/{$network}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerNetworkStats::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns inbound and outbound network statistics for the selected network type and period. + * + * @param string $uuid Cloud Server UUID + * @param value-of $type Measure network activity as transferred bytes or packets. + * @param value-of $network Network access type to aggregate. + * @param value-of $period Statistics period. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerNetworkStats + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getNetworkStatsByNetworkAndPeriod(string $uuid, string $type, string $network, string $period, ?array $options = null): ServerNetworkStats + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/stats/network/{$type}/{$network}/{$period}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerNetworkStats::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Stops a Cloud Server in started state. + * + * @param string $uuid Cloud Server UUID + * @param StopServer $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Server + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function stopServer(string $uuid, StopServer $request, ?array $options = null): Server + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/stop", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Server::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Attach a storage resource as a disk or CD-ROM device to a Cloud Server. SCSI and virtio disks can be attached while the Cloud Server is started; IDE and CD-ROM devices require a stopped Cloud Server. An empty CD-ROM device can be attached without specifying a storage resource. + * + * @param string $uuid Cloud Server UUID + * @param ServerAttachStorage $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Server + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function attachStorageDevice(string $uuid, ServerAttachStorage $request, ?array $options = null): Server + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/storage/attach", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Server::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Detach a storage device identified by its device address or storage resource UUID. IDE and CD-ROM devices cannot be detached while the Cloud Server is started. + * + * @param string $uuid Cloud Server UUID + * @param ServerDetachStorage $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Server + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function detachStorageDevice(string $uuid, ServerDetachStorage $request, ?array $options = null): Server + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/storage/detach", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Server::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns VNC connection details and remote access settings for a Cloud Server. + * + * @param string $uuid Cloud Server UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerRemoteAccessDetails + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getVncDetails(string $uuid, ?array $options = null): ServerRemoteAccessDetails + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server/{$uuid}/vnc_details", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerRemoteAccessDetails::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Server/Types/CreateServerServer.php b/fern/sdk/src/Server/Types/CreateServerServer.php new file mode 100644 index 00000000..8400b03a --- /dev/null +++ b/fern/sdk/src/Server/Types/CreateServerServer.php @@ -0,0 +1,261 @@ + $firewall + */ + #[JsonProperty('firewall')] + public ?string $firewall; + + /** + * @var ?int $host + */ + #[JsonProperty('host')] + public ?int $host; + + /** + * @var string $hostname + */ + #[JsonProperty('hostname')] + public string $hostname; + + /** + * @var ?ServerIpAddresses $ipAddresses + */ + #[JsonProperty('ip_addresses')] + public ?ServerIpAddresses $ipAddresses; + + /** + * @var ?ServerLabels $labels + */ + #[JsonProperty('labels')] + public ?ServerLabels $labels; + + /** + * @var ?ServerLoginUser $loginUser + */ + #[JsonProperty('login_user')] + public ?ServerLoginUser $loginUser; + + /** + * @var ?int $memoryAmount + */ + #[JsonProperty('memory_amount')] + public ?int $memoryAmount; + + /** + * @var ?ServerCreateNetworking $networking + */ + #[JsonProperty('networking')] + public ?ServerCreateNetworking $networking; + + /** + * @var ?value-of $nicModel + */ + #[JsonProperty('nic_model')] + public ?string $nicModel; + + /** + * @var ?string $passwordDelivery + */ + #[JsonProperty('password_delivery')] + public ?string $passwordDelivery; + + /** + * @var ?string $plan + */ + #[JsonProperty('plan')] + public ?string $plan; + + /** + * @var ?string $serverGroup + */ + #[JsonProperty('server_group')] + public ?string $serverGroup; + + /** + * @var ?string $simpleBackup + */ + #[JsonProperty('simple_backup')] + public ?string $simpleBackup; + + /** + * @var ?value-of $metadata + */ + #[JsonProperty('metadata')] + public ?string $metadata; + + /** + * @var ?ServerCreateDevices $devices + */ + #[JsonProperty('devices')] + public ?ServerCreateDevices $devices; + + /** + * @var ?value-of $remoteAccessEnabled + */ + #[JsonProperty('remote_access_enabled')] + public ?string $remoteAccessEnabled; + + /** + * @var ?string $remoteAccessPassword + */ + #[JsonProperty('remote_access_password')] + public ?string $remoteAccessPassword; + + /** + * @var ?value-of $remoteAccessType + */ + #[JsonProperty('remote_access_type')] + public ?string $remoteAccessType; + + /** + * @var ServerStorageDevices $storageDevices + */ + #[JsonProperty('storage_devices')] + public ServerStorageDevices $storageDevices; + + /** + * @var ?string $timezone + */ + #[JsonProperty('timezone')] + public ?string $timezone; + + /** + * @var string $title + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var ?string $userData + */ + #[JsonProperty('user_data')] + public ?string $userData; + + /** + * @var ?string $videoModel + */ + #[JsonProperty('video_model')] + public ?string $videoModel; + + /** + * @var ?string $vncKeymap + */ + #[JsonProperty('vnc_keymap')] + public ?string $vncKeymap; + + /** + * @var string $zone + */ + #[JsonProperty('zone')] + public string $zone; + + /** + * @param array{ + * hostname: string, + * storageDevices: ServerStorageDevices, + * title: string, + * zone: string, + * avoidHost?: ?int, + * bootOrder?: ?string, + * coreNumber?: ?int, + * firewall?: ?value-of, + * host?: ?int, + * ipAddresses?: ?ServerIpAddresses, + * labels?: ?ServerLabels, + * loginUser?: ?ServerLoginUser, + * memoryAmount?: ?int, + * networking?: ?ServerCreateNetworking, + * nicModel?: ?value-of, + * passwordDelivery?: ?string, + * plan?: ?string, + * serverGroup?: ?string, + * simpleBackup?: ?string, + * metadata?: ?value-of, + * devices?: ?ServerCreateDevices, + * remoteAccessEnabled?: ?value-of, + * remoteAccessPassword?: ?string, + * remoteAccessType?: ?value-of, + * timezone?: ?string, + * userData?: ?string, + * videoModel?: ?string, + * vncKeymap?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->avoidHost = $values['avoidHost'] ?? null; + $this->bootOrder = $values['bootOrder'] ?? null; + $this->coreNumber = $values['coreNumber'] ?? null; + $this->firewall = $values['firewall'] ?? null; + $this->host = $values['host'] ?? null; + $this->hostname = $values['hostname']; + $this->ipAddresses = $values['ipAddresses'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->loginUser = $values['loginUser'] ?? null; + $this->memoryAmount = $values['memoryAmount'] ?? null; + $this->networking = $values['networking'] ?? null; + $this->nicModel = $values['nicModel'] ?? null; + $this->passwordDelivery = $values['passwordDelivery'] ?? null; + $this->plan = $values['plan'] ?? null; + $this->serverGroup = $values['serverGroup'] ?? null; + $this->simpleBackup = $values['simpleBackup'] ?? null; + $this->metadata = $values['metadata'] ?? null; + $this->devices = $values['devices'] ?? null; + $this->remoteAccessEnabled = $values['remoteAccessEnabled'] ?? null; + $this->remoteAccessPassword = $values['remoteAccessPassword'] ?? null; + $this->remoteAccessType = $values['remoteAccessType'] ?? null; + $this->storageDevices = $values['storageDevices']; + $this->timezone = $values['timezone'] ?? null; + $this->title = $values['title']; + $this->userData = $values['userData'] ?? null; + $this->videoModel = $values['videoModel'] ?? null; + $this->vncKeymap = $values['vncKeymap'] ?? null; + $this->zone = $values['zone']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/DeleteServerRequestBackups.php b/fern/sdk/src/Server/Types/DeleteServerRequestBackups.php new file mode 100644 index 00000000..38b2245b --- /dev/null +++ b/fern/sdk/src/Server/Types/DeleteServerRequestBackups.php @@ -0,0 +1,10 @@ + $firewall + */ + #[JsonProperty('firewall')] + public ?string $firewall; + + /** + * @var ?value-of $firewallPrivate + */ + #[JsonProperty('firewall_private')] + public ?string $firewallPrivate; + + /** + * @var ?value-of $firewallPrivateDefaultIncomingAction + */ + #[JsonProperty('firewall_private_default_incoming_action')] + public ?string $firewallPrivateDefaultIncomingAction; + + /** + * @var ?value-of $firewallPrivateDefaultOutgoingAction + */ + #[JsonProperty('firewall_private_default_outgoing_action')] + public ?string $firewallPrivateDefaultOutgoingAction; + + /** + * @var ?value-of $firewallPublicDefaultIncomingAction + */ + #[JsonProperty('firewall_public_default_incoming_action')] + public ?string $firewallPublicDefaultIncomingAction; + + /** + * @var ?value-of $firewallPublicDefaultOutgoingAction + */ + #[JsonProperty('firewall_public_default_outgoing_action')] + public ?string $firewallPublicDefaultOutgoingAction; + + /** + * @var ?string $hostname + */ + #[JsonProperty('hostname')] + public ?string $hostname; + + /** + * @var ?ServerLabels $labels + */ + #[JsonProperty('labels')] + public ?ServerLabels $labels; + + /** + * @var ?int $memoryAmount + */ + #[JsonProperty('memory_amount')] + public ?int $memoryAmount; + + /** + * @var ?value-of $metadata + */ + #[JsonProperty('metadata')] + public ?string $metadata; + + /** + * @var ?value-of $nicModel + */ + #[JsonProperty('nic_model')] + public ?string $nicModel; + + /** + * @var ?string $plan + */ + #[JsonProperty('plan')] + public ?string $plan; + + /** + * @var ?value-of $remoteAccessEnabled + */ + #[JsonProperty('remote_access_enabled')] + public ?string $remoteAccessEnabled; + + /** + * @var ?string $remoteAccessPassword + */ + #[JsonProperty('remote_access_password')] + public ?string $remoteAccessPassword; + + /** + * @var ?value-of $remoteAccessType + */ + #[JsonProperty('remote_access_type')] + public ?string $remoteAccessType; + + /** + * @var ?string $simpleBackup + */ + #[JsonProperty('simple_backup')] + public ?string $simpleBackup; + + /** + * @var ?string $timezone + */ + #[JsonProperty('timezone')] + public ?string $timezone; + + /** + * @var ?string $title + */ + #[JsonProperty('title')] + public ?string $title; + + /** + * @var ?string $videoModel + */ + #[JsonProperty('video_model')] + public ?string $videoModel; + + /** + * @var ?string $vncKeymap + */ + #[JsonProperty('vnc_keymap')] + public ?string $vncKeymap; + + /** + * @param array{ + * bootOrder?: ?string, + * coreNumber?: ?int, + * firewall?: ?value-of, + * firewallPrivate?: ?value-of, + * firewallPrivateDefaultIncomingAction?: ?value-of, + * firewallPrivateDefaultOutgoingAction?: ?value-of, + * firewallPublicDefaultIncomingAction?: ?value-of, + * firewallPublicDefaultOutgoingAction?: ?value-of, + * hostname?: ?string, + * labels?: ?ServerLabels, + * memoryAmount?: ?int, + * metadata?: ?value-of, + * nicModel?: ?value-of, + * plan?: ?string, + * remoteAccessEnabled?: ?value-of, + * remoteAccessPassword?: ?string, + * remoteAccessType?: ?value-of, + * simpleBackup?: ?string, + * timezone?: ?string, + * title?: ?string, + * videoModel?: ?string, + * vncKeymap?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->bootOrder = $values['bootOrder'] ?? null; + $this->coreNumber = $values['coreNumber'] ?? null; + $this->firewall = $values['firewall'] ?? null; + $this->firewallPrivate = $values['firewallPrivate'] ?? null; + $this->firewallPrivateDefaultIncomingAction = $values['firewallPrivateDefaultIncomingAction'] ?? null; + $this->firewallPrivateDefaultOutgoingAction = $values['firewallPrivateDefaultOutgoingAction'] ?? null; + $this->firewallPublicDefaultIncomingAction = $values['firewallPublicDefaultIncomingAction'] ?? null; + $this->firewallPublicDefaultOutgoingAction = $values['firewallPublicDefaultOutgoingAction'] ?? null; + $this->hostname = $values['hostname'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->memoryAmount = $values['memoryAmount'] ?? null; + $this->metadata = $values['metadata'] ?? null; + $this->nicModel = $values['nicModel'] ?? null; + $this->plan = $values['plan'] ?? null; + $this->remoteAccessEnabled = $values['remoteAccessEnabled'] ?? null; + $this->remoteAccessPassword = $values['remoteAccessPassword'] ?? null; + $this->remoteAccessType = $values['remoteAccessType'] ?? null; + $this->simpleBackup = $values['simpleBackup'] ?? null; + $this->timezone = $values['timezone'] ?? null; + $this->title = $values['title'] ?? null; + $this->videoModel = $values['videoModel'] ?? null; + $this->vncKeymap = $values['vncKeymap'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/ModifyServerServerFirewallPrivateDefaultIncomingAction.php b/fern/sdk/src/Server/Types/ModifyServerServerFirewallPrivateDefaultIncomingAction.php new file mode 100644 index 00000000..acbc45b0 --- /dev/null +++ b/fern/sdk/src/Server/Types/ModifyServerServerFirewallPrivateDefaultIncomingAction.php @@ -0,0 +1,9 @@ + $stopType + */ + #[JsonProperty('stop_type')] + public string $stopType; + + /** + * @param array{ + * stopType: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->stopType = $values['stopType']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/RestartServerRestartServerStopTypeStopType.php b/fern/sdk/src/Server/Types/RestartServerRestartServerStopTypeStopType.php new file mode 100644 index 00000000..24d07bd5 --- /dev/null +++ b/fern/sdk/src/Server/Types/RestartServerRestartServerStopTypeStopType.php @@ -0,0 +1,8 @@ + $bootable + */ + #[JsonProperty('bootable')] + public ?string $bootable; + + /** + * @var ?int $index Interface index; the next available index is used when omitted + */ + #[JsonProperty('index')] + public ?int $index; + + /** + * @var ServerAddInterfaceInterfaceIpAddresses $ipAddresses IP addresses to attach to the interface + */ + #[JsonProperty('ip_addresses')] + public ServerAddInterfaceInterfaceIpAddresses $ipAddresses; + + /** + * @var ?string $network + */ + #[JsonProperty('network')] + public ?string $network; + + /** + * @var ?value-of $sourceIpFiltering + */ + #[JsonProperty('source_ip_filtering')] + public ?string $sourceIpFiltering; + + /** + * @var value-of $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @param array{ + * ipAddresses: ServerAddInterfaceInterfaceIpAddresses, + * type: value-of, + * bootable?: ?value-of, + * index?: ?int, + * network?: ?string, + * sourceIpFiltering?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->bootable = $values['bootable'] ?? null; + $this->index = $values['index'] ?? null; + $this->ipAddresses = $values['ipAddresses']; + $this->network = $values['network'] ?? null; + $this->sourceIpFiltering = $values['sourceIpFiltering'] ?? null; + $this->type = $values['type']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/ServerAddInterfaceInterfaceIpAddresses.php b/fern/sdk/src/Server/Types/ServerAddInterfaceInterfaceIpAddresses.php new file mode 100644 index 00000000..19ddc78a --- /dev/null +++ b/fern/sdk/src/Server/Types/ServerAddInterfaceInterfaceIpAddresses.php @@ -0,0 +1,38 @@ + $ipAddress + */ + #[JsonProperty('ip_address'), ArrayType([ServerAddInterfaceInterfaceIpAddressesIpAddressItem::class])] + public array $ipAddress; + + /** + * @param array{ + * ipAddress: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->ipAddress = $values['ipAddress']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/ServerAddInterfaceInterfaceIpAddressesIpAddressItem.php b/fern/sdk/src/Server/Types/ServerAddInterfaceInterfaceIpAddressesIpAddressItem.php new file mode 100644 index 00000000..c948017f --- /dev/null +++ b/fern/sdk/src/Server/Types/ServerAddInterfaceInterfaceIpAddressesIpAddressItem.php @@ -0,0 +1,61 @@ + $dhcpProvided + */ + #[JsonProperty('dhcp_provided')] + public ?string $dhcpProvided; + + /** + * @var value-of $family + */ + #[JsonProperty('family')] + public string $family; + + /** + * @var ?value-of $releasePolicy + */ + #[JsonProperty('release_policy')] + public ?string $releasePolicy; + + /** + * @param array{ + * family: value-of, + * address?: ?string, + * dhcpProvided?: ?value-of, + * releasePolicy?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->address = $values['address'] ?? null; + $this->dhcpProvided = $values['dhcpProvided'] ?? null; + $this->family = $values['family']; + $this->releasePolicy = $values['releasePolicy'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/ServerAddIpAddressIpAddress.php b/fern/sdk/src/Server/Types/ServerAddIpAddressIpAddress.php new file mode 100644 index 00000000..57276f58 --- /dev/null +++ b/fern/sdk/src/Server/Types/ServerAddIpAddressIpAddress.php @@ -0,0 +1,43 @@ + $family + */ + #[JsonProperty('family')] + public string $family; + + /** + * @param array{ + * family: value-of, + * address?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->address = $values['address'] ?? null; + $this->family = $values['family']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/ServerAttachPrivateFirewallRulesetFirewallRuleset.php b/fern/sdk/src/Server/Types/ServerAttachPrivateFirewallRulesetFirewallRuleset.php new file mode 100644 index 00000000..fb5d2698 --- /dev/null +++ b/fern/sdk/src/Server/Types/ServerAttachPrivateFirewallRulesetFirewallRuleset.php @@ -0,0 +1,37 @@ +firewallRulesetUuid = $values['firewallRulesetUuid']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/ServerAttachStorageStorageDevice.php b/fern/sdk/src/Server/Types/ServerAttachStorageStorageDevice.php new file mode 100644 index 00000000..8795f4f6 --- /dev/null +++ b/fern/sdk/src/Server/Types/ServerAttachStorageStorageDevice.php @@ -0,0 +1,61 @@ + $type Type of device to attach. + */ + #[JsonProperty('type')] + public ?string $type; + + /** + * @param array{ + * address?: ?string, + * bootDisk?: ?int, + * storage?: ?string, + * type?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->address = $values['address'] ?? null; + $this->bootDisk = $values['bootDisk'] ?? null; + $this->storage = $values['storage'] ?? null; + $this->type = $values['type'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/ServerAttachStorageStorageDeviceType.php b/fern/sdk/src/Server/Types/ServerAttachStorageStorageDeviceType.php new file mode 100644 index 00000000..54a2a46a --- /dev/null +++ b/fern/sdk/src/Server/Types/ServerAttachStorageStorageDeviceType.php @@ -0,0 +1,9 @@ + $action Action taken when the rule matches. + */ + #[JsonProperty('action')] + public string $action; + + /** + * @var ?string $comment Free-form rule description. + */ + #[JsonProperty('comment')] + public ?string $comment; + + /** + * @var ?string $destinationAddressEnd Last destination IP address in the range. Must be specified with destination_address_start. + */ + #[JsonProperty('destination_address_end')] + public ?string $destinationAddressEnd; + + /** + * @var ?string $destinationAddressStart First destination IP address in the range. Must be specified with destination_address_end. + */ + #[JsonProperty('destination_address_start')] + public ?string $destinationAddressStart; + + /** + * @var ?string $destinationPortEnd + */ + #[JsonProperty('destination_port_end')] + public ?string $destinationPortEnd; + + /** + * @var ?string $destinationPortStart + */ + #[JsonProperty('destination_port_start')] + public ?string $destinationPortStart; + + /** + * @var value-of $direction Traffic direction to which the rule applies. + */ + #[JsonProperty('direction')] + public string $direction; + + /** + * @var ?value-of $family IP address family. Required when protocol, addresses, ports, or ICMP type are specified. + */ + #[JsonProperty('family')] + public ?string $family; + + /** + * @var ?string $icmpType + */ + #[JsonProperty('icmp_type')] + public ?string $icmpType; + + /** + * @var ?string $position Position at which to insert the rule. Rules at and after this position are shifted down. If omitted or greater than the current rule count, the rule is appended. + */ + #[JsonProperty('position')] + public ?string $position; + + /** + * @var ?value-of $protocol Network protocol to match. + */ + #[JsonProperty('protocol')] + public ?string $protocol; + + /** + * @var ?string $sourceAddressEnd Last source IP address in the range. Must be specified with source_address_start. + */ + #[JsonProperty('source_address_end')] + public ?string $sourceAddressEnd; + + /** + * @var ?string $sourceAddressStart First source IP address in the range. Must be specified with source_address_end. + */ + #[JsonProperty('source_address_start')] + public ?string $sourceAddressStart; + + /** + * @var ?string $sourcePortEnd + */ + #[JsonProperty('source_port_end')] + public ?string $sourcePortEnd; + + /** + * @var ?string $sourcePortStart + */ + #[JsonProperty('source_port_start')] + public ?string $sourcePortStart; + + /** + * @param array{ + * action: value-of, + * direction: value-of, + * comment?: ?string, + * destinationAddressEnd?: ?string, + * destinationAddressStart?: ?string, + * destinationPortEnd?: ?string, + * destinationPortStart?: ?string, + * family?: ?value-of, + * icmpType?: ?string, + * position?: ?string, + * protocol?: ?value-of, + * sourceAddressEnd?: ?string, + * sourceAddressStart?: ?string, + * sourcePortEnd?: ?string, + * sourcePortStart?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->action = $values['action']; + $this->comment = $values['comment'] ?? null; + $this->destinationAddressEnd = $values['destinationAddressEnd'] ?? null; + $this->destinationAddressStart = $values['destinationAddressStart'] ?? null; + $this->destinationPortEnd = $values['destinationPortEnd'] ?? null; + $this->destinationPortStart = $values['destinationPortStart'] ?? null; + $this->direction = $values['direction']; + $this->family = $values['family'] ?? null; + $this->icmpType = $values['icmpType'] ?? null; + $this->position = $values['position'] ?? null; + $this->protocol = $values['protocol'] ?? null; + $this->sourceAddressEnd = $values['sourceAddressEnd'] ?? null; + $this->sourceAddressStart = $values['sourceAddressStart'] ?? null; + $this->sourcePortEnd = $values['sourcePortEnd'] ?? null; + $this->sourcePortStart = $values['sourcePortStart'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/ServerCreateFirewallRuleFirewallRuleAction.php b/fern/sdk/src/Server/Types/ServerCreateFirewallRuleFirewallRuleAction.php new file mode 100644 index 00000000..2344d1b4 --- /dev/null +++ b/fern/sdk/src/Server/Types/ServerCreateFirewallRuleFirewallRuleAction.php @@ -0,0 +1,9 @@ +firewallRulesetUuid = $values['firewallRulesetUuid']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/ServerLoadCdromStorageDevice.php b/fern/sdk/src/Server/Types/ServerLoadCdromStorageDevice.php new file mode 100644 index 00000000..dd6b7a02 --- /dev/null +++ b/fern/sdk/src/Server/Types/ServerLoadCdromStorageDevice.php @@ -0,0 +1,37 @@ +storage = $values['storage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/ServerModifyInterfaceInterface.php b/fern/sdk/src/Server/Types/ServerModifyInterfaceInterface.php new file mode 100644 index 00000000..d5bcadb3 --- /dev/null +++ b/fern/sdk/src/Server/Types/ServerModifyInterfaceInterface.php @@ -0,0 +1,59 @@ + $bootable + */ + #[JsonProperty('bootable')] + public ?string $bootable; + + /** + * @var ?int $index New index for the interface; defaults to the index in the request path + */ + #[JsonProperty('index')] + public ?int $index; + + /** + * @var ?ServerModifyInterfaceInterfaceIpAddresses $ipAddresses Complete replacement list of IP addresses for the interface + */ + #[JsonProperty('ip_addresses')] + public ?ServerModifyInterfaceInterfaceIpAddresses $ipAddresses; + + /** + * @var ?value-of $sourceIpFiltering + */ + #[JsonProperty('source_ip_filtering')] + public ?string $sourceIpFiltering; + + /** + * @param array{ + * bootable?: ?value-of, + * index?: ?int, + * ipAddresses?: ?ServerModifyInterfaceInterfaceIpAddresses, + * sourceIpFiltering?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->bootable = $values['bootable'] ?? null; + $this->index = $values['index'] ?? null; + $this->ipAddresses = $values['ipAddresses'] ?? null; + $this->sourceIpFiltering = $values['sourceIpFiltering'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/ServerModifyInterfaceInterfaceIpAddresses.php b/fern/sdk/src/Server/Types/ServerModifyInterfaceInterfaceIpAddresses.php new file mode 100644 index 00000000..59a2386c --- /dev/null +++ b/fern/sdk/src/Server/Types/ServerModifyInterfaceInterfaceIpAddresses.php @@ -0,0 +1,38 @@ + $ipAddress + */ + #[JsonProperty('ip_address'), ArrayType([ServerModifyInterfaceInterfaceIpAddressesIpAddressItem::class])] + public array $ipAddress; + + /** + * @param array{ + * ipAddress: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->ipAddress = $values['ipAddress']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/ServerModifyInterfaceInterfaceIpAddressesIpAddressItem.php b/fern/sdk/src/Server/Types/ServerModifyInterfaceInterfaceIpAddressesIpAddressItem.php new file mode 100644 index 00000000..835c2244 --- /dev/null +++ b/fern/sdk/src/Server/Types/ServerModifyInterfaceInterfaceIpAddressesIpAddressItem.php @@ -0,0 +1,52 @@ + $dhcpProvided + */ + #[JsonProperty('dhcp_provided')] + public ?string $dhcpProvided; + + /** + * @var value-of $family + */ + #[JsonProperty('family')] + public string $family; + + /** + * @param array{ + * family: value-of, + * address?: ?string, + * dhcpProvided?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->address = $values['address'] ?? null; + $this->dhcpProvided = $values['dhcpProvided'] ?? null; + $this->family = $values['family']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/ServerRebuildServerRebuild.php b/fern/sdk/src/Server/Types/ServerRebuildServerRebuild.php new file mode 100644 index 00000000..b89d40d7 --- /dev/null +++ b/fern/sdk/src/Server/Types/ServerRebuildServerRebuild.php @@ -0,0 +1,91 @@ + $deleteDetachedDisk + */ + #[JsonProperty('delete_detached_disk')] + public ?string $deleteDetachedDisk; + + /** + * @var ?string $detachDisk UUID of the storage to detach before rebuilding. + */ + #[JsonProperty('detach_disk')] + public ?string $detachDisk; + + /** + * @var ?value-of $encrypted + */ + #[JsonProperty('encrypted')] + public ?string $encrypted; + + /** + * @var ?ServerRebuildServerRebuildLoginUser $loginUser + */ + #[JsonProperty('login_user')] + public ?ServerRebuildServerRebuildLoginUser $loginUser; + + /** + * @var ?value-of $passwordDelivery One-time password delivery method. + */ + #[JsonProperty('password_delivery')] + public ?string $passwordDelivery; + + /** + * @var ?string $storageTitle Title of the new system storage. + */ + #[JsonProperty('storage_title')] + public ?string $storageTitle; + + /** + * @var ?string $userData User data supplied to cloud-init. + */ + #[JsonProperty('user_data')] + public ?string $userData; + + /** + * @param array{ + * cloneSource: string, + * deleteDetachedDisk?: ?value-of, + * detachDisk?: ?string, + * encrypted?: ?value-of, + * loginUser?: ?ServerRebuildServerRebuildLoginUser, + * passwordDelivery?: ?value-of, + * storageTitle?: ?string, + * userData?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->cloneSource = $values['cloneSource']; + $this->deleteDetachedDisk = $values['deleteDetachedDisk'] ?? null; + $this->detachDisk = $values['detachDisk'] ?? null; + $this->encrypted = $values['encrypted'] ?? null; + $this->loginUser = $values['loginUser'] ?? null; + $this->passwordDelivery = $values['passwordDelivery'] ?? null; + $this->storageTitle = $values['storageTitle'] ?? null; + $this->userData = $values['userData'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/ServerRebuildServerRebuildLoginUser.php b/fern/sdk/src/Server/Types/ServerRebuildServerRebuildLoginUser.php new file mode 100644 index 00000000..bdf3d7dc --- /dev/null +++ b/fern/sdk/src/Server/Types/ServerRebuildServerRebuildLoginUser.php @@ -0,0 +1,51 @@ + $createPassword + */ + #[JsonProperty('create_password')] + public ?string $createPassword; + + /** + * @var ?ServerRebuildServerRebuildLoginUserSshKeys $sshKeys + */ + #[JsonProperty('ssh_keys')] + public ?ServerRebuildServerRebuildLoginUserSshKeys $sshKeys; + + /** + * @var ?string $username Login username. + */ + #[JsonProperty('username')] + public ?string $username; + + /** + * @param array{ + * createPassword?: ?value-of, + * sshKeys?: ?ServerRebuildServerRebuildLoginUserSshKeys, + * username?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->createPassword = $values['createPassword'] ?? null; + $this->sshKeys = $values['sshKeys'] ?? null; + $this->username = $values['username'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/ServerRebuildServerRebuildLoginUserSshKeys.php b/fern/sdk/src/Server/Types/ServerRebuildServerRebuildLoginUserSshKeys.php new file mode 100644 index 00000000..32ec46f5 --- /dev/null +++ b/fern/sdk/src/Server/Types/ServerRebuildServerRebuildLoginUserSshKeys.php @@ -0,0 +1,35 @@ + $sshKey SSH public keys in OpenSSH format. + */ + #[JsonProperty('ssh_key'), ArrayType(['string'])] + public array $sshKey; + + /** + * @param array{ + * sshKey: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->sshKey = $values['sshKey']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/ServerRebuildServerRebuildPasswordDelivery.php b/fern/sdk/src/Server/Types/ServerRebuildServerRebuildPasswordDelivery.php new file mode 100644 index 00000000..b7c1157d --- /dev/null +++ b/fern/sdk/src/Server/Types/ServerRebuildServerRebuildPasswordDelivery.php @@ -0,0 +1,10 @@ + $firewallRule Ordered firewall rules. Supplying an empty array removes all rules. + */ + #[JsonProperty('firewall_rule'), ArrayType([ServerFirewallRuleItem::class])] + public array $firewallRule; + + /** + * @param array{ + * firewallRule: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->firewallRule = $values['firewallRule']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/StartServerServer.php b/fern/sdk/src/Server/Types/StartServerServer.php new file mode 100644 index 00000000..0f9846a5 --- /dev/null +++ b/fern/sdk/src/Server/Types/StartServerServer.php @@ -0,0 +1,58 @@ + $startType Whether to wait for the Cloud Server to start. + */ + #[JsonProperty('start_type')] + public ?string $startType; + + /** + * @param array{ + * avoidHost?: ?int, + * host?: ?int, + * reason?: ?string, + * startType?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->avoidHost = $values['avoidHost'] ?? null; + $this->host = $values['host'] ?? null; + $this->reason = $values['reason'] ?? null; + $this->startType = $values['startType'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/StartServerServerStartType.php b/fern/sdk/src/Server/Types/StartServerServerStartType.php new file mode 100644 index 00000000..d511fe11 --- /dev/null +++ b/fern/sdk/src/Server/Types/StartServerServerStartType.php @@ -0,0 +1,9 @@ + $stopType Type of stop operation. + */ + #[JsonProperty('stop_type')] + public ?string $stopType; + + /** + * @var ?string $timeout Soft-stop timeout in seconds. + */ + #[JsonProperty('timeout')] + public ?string $timeout; + + /** + * @param array{ + * reason?: ?string, + * stopType?: ?value-of, + * timeout?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->reason = $values['reason'] ?? null; + $this->stopType = $values['stopType'] ?? null; + $this->timeout = $values['timeout'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Server/Types/StopServerStopServerStopType.php b/fern/sdk/src/Server/Types/StopServerStopServerStopType.php new file mode 100644 index 00000000..1298ad39 --- /dev/null +++ b/fern/sdk/src/Server/Types/StopServerStopServerStopType.php @@ -0,0 +1,9 @@ +label = $values['label'] ?? null; + } +} diff --git a/fern/sdk/src/ServerGroup/Requests/ModifyServerGroupRequest.php b/fern/sdk/src/ServerGroup/Requests/ModifyServerGroupRequest.php new file mode 100644 index 00000000..7b2f34c6 --- /dev/null +++ b/fern/sdk/src/ServerGroup/Requests/ModifyServerGroupRequest.php @@ -0,0 +1,25 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/ServerGroup/Requests/ServerGroupServerAdd.php b/fern/sdk/src/ServerGroup/Requests/ServerGroupServerAdd.php new file mode 100644 index 00000000..d2f8e410 --- /dev/null +++ b/fern/sdk/src/ServerGroup/Requests/ServerGroupServerAdd.php @@ -0,0 +1,27 @@ +server = $values['server']; + } +} diff --git a/fern/sdk/src/ServerGroup/ServerGroupClient.php b/fern/sdk/src/ServerGroup/ServerGroupClient.php new file mode 100644 index 00000000..4f9fb7b8 --- /dev/null +++ b/fern/sdk/src/ServerGroup/ServerGroupClient.php @@ -0,0 +1,497 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Retrieves a list of server groups. + * + * @param ListServerGroupsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerGroups + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listServerGroups(ListServerGroupsRequest $request = new ListServerGroupsRequest(), ?array $options = null): ServerGroups + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->label !== null) { + $query['label'] = $request->label; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server-group", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerGroups::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new server group. + * + * @param ServerGroupModify $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerGroup + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createServerGroup(ServerGroupModify $request, ?array $options = null): ServerGroup + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server-group", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerGroup::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Retrieves details of a specific server group. + * + * @param string $uuid The UUID of the server group to retrieve. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerGroup + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getServerGroup(string $uuid, ?array $options = null): ServerGroup + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server-group/{$uuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerGroup::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a specific server group. + * + * @param string $uuid The UUID of the server group to delete. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteServerGroup(string $uuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server-group/{$uuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies an existing server group. + * + * @param string $uuid The UUID of the server group to modify. + * @param ModifyServerGroupRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerGroup + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyServerGroup(string $uuid, ModifyServerGroupRequest $request, ?array $options = null): ServerGroup + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server-group/{$uuid}", + method: HttpMethod::PATCH, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerGroup::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Retrieves a list of servers that are members of a specific server group. + * + * @param string $uuid The UUID of the server group whose members are to be listed. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerGroupServers + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listServerGroupMembers(string $uuid, ?array $options = null): ServerGroupServers + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server-group/{$uuid}/servers", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerGroupServers::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Adds a server to a specific server group. + * + * @param string $uuid The UUID of the server group to which the server will be added. + * @param ServerGroupServerAdd $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function addServerToGroup(string $uuid, ServerGroupServerAdd $request, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server-group/{$uuid}/servers", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Removes a server from a specific server group. + * + * @param string $uuid The UUID of the server group from which the server will be removed. + * @param string $serverUuid The UUID of the server to remove from the group. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function removeServerFromGroup(string $uuid, string $serverUuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server-group/{$uuid}/servers/{$serverUuid}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/ServerGroup/Types/ServerGroupServerAddServer.php b/fern/sdk/src/ServerGroup/Types/ServerGroupServerAddServer.php new file mode 100644 index 00000000..451f08f1 --- /dev/null +++ b/fern/sdk/src/ServerGroup/Types/ServerGroupServerAddServer.php @@ -0,0 +1,34 @@ +uuid = $values['uuid']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/ServerSize/ServerSizeClient.php b/fern/sdk/src/ServerSize/ServerSizeClient.php new file mode 100644 index 00000000..0d48c6dc --- /dev/null +++ b/fern/sdk/src/ServerSize/ServerSizeClient.php @@ -0,0 +1,161 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Retrieves a list of available server sizes (combinations of memory and CPU cores). + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerSizes + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listServerSizes(?array $options = null): ServerSizes + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server_size", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerSizes::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Retrieves the minimum and maximum limits for server sizes, including any zone-specific limits for private zones. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ServerSizeLimits + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getServerSizeLimits(?array $options = null): ServerSizeLimits + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/server_size/limits", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ServerSizeLimits::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Storage/Requests/AttachStorageRequest.php b/fern/sdk/src/Storage/Requests/AttachStorageRequest.php new file mode 100644 index 00000000..6b5a9f14 --- /dev/null +++ b/fern/sdk/src/Storage/Requests/AttachStorageRequest.php @@ -0,0 +1,27 @@ +storageDevice = $values['storageDevice']; + } +} diff --git a/fern/sdk/src/Storage/Requests/CloneStorageRequest.php b/fern/sdk/src/Storage/Requests/CloneStorageRequest.php new file mode 100644 index 00000000..38d439eb --- /dev/null +++ b/fern/sdk/src/Storage/Requests/CloneStorageRequest.php @@ -0,0 +1,27 @@ +storage = $values['storage']; + } +} diff --git a/fern/sdk/src/Storage/Requests/CreateStorageBackupRequest.php b/fern/sdk/src/Storage/Requests/CreateStorageBackupRequest.php new file mode 100644 index 00000000..6d877265 --- /dev/null +++ b/fern/sdk/src/Storage/Requests/CreateStorageBackupRequest.php @@ -0,0 +1,27 @@ +storage = $values['storage']; + } +} diff --git a/fern/sdk/src/Storage/Requests/CreateStorageImportRequest.php b/fern/sdk/src/Storage/Requests/CreateStorageImportRequest.php new file mode 100644 index 00000000..b43e8b2d --- /dev/null +++ b/fern/sdk/src/Storage/Requests/CreateStorageImportRequest.php @@ -0,0 +1,27 @@ +storageImport = $values['storageImport']; + } +} diff --git a/fern/sdk/src/Storage/Requests/CreateStorageRequest.php b/fern/sdk/src/Storage/Requests/CreateStorageRequest.php new file mode 100644 index 00000000..71f04f4f --- /dev/null +++ b/fern/sdk/src/Storage/Requests/CreateStorageRequest.php @@ -0,0 +1,27 @@ +storage = $values['storage']; + } +} diff --git a/fern/sdk/src/Storage/Requests/CreateStorageTemplateRequest.php b/fern/sdk/src/Storage/Requests/CreateStorageTemplateRequest.php new file mode 100644 index 00000000..8d5d4950 --- /dev/null +++ b/fern/sdk/src/Storage/Requests/CreateStorageTemplateRequest.php @@ -0,0 +1,27 @@ +storage = $values['storage']; + } +} diff --git a/fern/sdk/src/Storage/Requests/DeleteStorageRequest.php b/fern/sdk/src/Storage/Requests/DeleteStorageRequest.php new file mode 100644 index 00000000..a4e7eba3 --- /dev/null +++ b/fern/sdk/src/Storage/Requests/DeleteStorageRequest.php @@ -0,0 +1,25 @@ + $backups Policy for handling backups when deleting a storage resource. Defaults to `keep`. Allowed values: keep, delete, keep_latest + */ + public ?string $backups; + + /** + * @param array{ + * backups?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->backups = $values['backups'] ?? null; + } +} diff --git a/fern/sdk/src/Storage/Requests/GetStorageListByBackupRequest.php b/fern/sdk/src/Storage/Requests/GetStorageListByBackupRequest.php new file mode 100644 index 00000000..0e335179 --- /dev/null +++ b/fern/sdk/src/Storage/Requests/GetStorageListByBackupRequest.php @@ -0,0 +1,61 @@ + $sortBy Field by which to sort the results. + */ + public ?string $sortBy; + + /** + * @var ?value-of $orderBy Sort direction. Used only when `sort_by` is specified. + */ + public ?string $orderBy; + + /** + * @var ?int $limit Maximum number of storage resources to return. + */ + public ?int $limit; + + /** + * @var ?int $offset Number of storage resources to skip before returning results. + */ + public ?int $offset; + + /** + * @param array{ + * label?: ?string, + * search?: ?string, + * sortBy?: ?value-of, + * orderBy?: ?value-of, + * limit?: ?int, + * offset?: ?int, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->label = $values['label'] ?? null; + $this->search = $values['search'] ?? null; + $this->sortBy = $values['sortBy'] ?? null; + $this->orderBy = $values['orderBy'] ?? null; + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + } +} diff --git a/fern/sdk/src/Storage/Requests/GetStorageListByCdromRequest.php b/fern/sdk/src/Storage/Requests/GetStorageListByCdromRequest.php new file mode 100644 index 00000000..1b04e391 --- /dev/null +++ b/fern/sdk/src/Storage/Requests/GetStorageListByCdromRequest.php @@ -0,0 +1,61 @@ + $sortBy Field by which to sort the results. + */ + public ?string $sortBy; + + /** + * @var ?value-of $orderBy Sort direction. Used only when `sort_by` is specified. + */ + public ?string $orderBy; + + /** + * @var ?int $limit Maximum number of storage resources to return. + */ + public ?int $limit; + + /** + * @var ?int $offset Number of storage resources to skip before returning results. + */ + public ?int $offset; + + /** + * @param array{ + * label?: ?string, + * search?: ?string, + * sortBy?: ?value-of, + * orderBy?: ?value-of, + * limit?: ?int, + * offset?: ?int, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->label = $values['label'] ?? null; + $this->search = $values['search'] ?? null; + $this->sortBy = $values['sortBy'] ?? null; + $this->orderBy = $values['orderBy'] ?? null; + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + } +} diff --git a/fern/sdk/src/Storage/Requests/GetStorageListByNormalRequest.php b/fern/sdk/src/Storage/Requests/GetStorageListByNormalRequest.php new file mode 100644 index 00000000..3421de1d --- /dev/null +++ b/fern/sdk/src/Storage/Requests/GetStorageListByNormalRequest.php @@ -0,0 +1,61 @@ + $sortBy Field by which to sort the results. + */ + public ?string $sortBy; + + /** + * @var ?value-of $orderBy Sort direction. Used only when `sort_by` is specified. + */ + public ?string $orderBy; + + /** + * @var ?int $limit Maximum number of storage resources to return. + */ + public ?int $limit; + + /** + * @var ?int $offset Number of storage resources to skip before returning results. + */ + public ?int $offset; + + /** + * @param array{ + * label?: ?string, + * search?: ?string, + * sortBy?: ?value-of, + * orderBy?: ?value-of, + * limit?: ?int, + * offset?: ?int, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->label = $values['label'] ?? null; + $this->search = $values['search'] ?? null; + $this->sortBy = $values['sortBy'] ?? null; + $this->orderBy = $values['orderBy'] ?? null; + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + } +} diff --git a/fern/sdk/src/Storage/Requests/GetStorageListByPrivateAccessRequest.php b/fern/sdk/src/Storage/Requests/GetStorageListByPrivateAccessRequest.php new file mode 100644 index 00000000..bf5601f0 --- /dev/null +++ b/fern/sdk/src/Storage/Requests/GetStorageListByPrivateAccessRequest.php @@ -0,0 +1,61 @@ + $sortBy Field by which to sort the results. + */ + public ?string $sortBy; + + /** + * @var ?value-of $orderBy Sort direction. Used only when `sort_by` is specified. + */ + public ?string $orderBy; + + /** + * @var ?int $limit Maximum number of storage resources to return. + */ + public ?int $limit; + + /** + * @var ?int $offset Number of storage resources to skip before returning results. + */ + public ?int $offset; + + /** + * @param array{ + * label?: ?string, + * search?: ?string, + * sortBy?: ?value-of, + * orderBy?: ?value-of, + * limit?: ?int, + * offset?: ?int, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->label = $values['label'] ?? null; + $this->search = $values['search'] ?? null; + $this->sortBy = $values['sortBy'] ?? null; + $this->orderBy = $values['orderBy'] ?? null; + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + } +} diff --git a/fern/sdk/src/Storage/Requests/GetStorageListByPublicAccessRequest.php b/fern/sdk/src/Storage/Requests/GetStorageListByPublicAccessRequest.php new file mode 100644 index 00000000..5345c022 --- /dev/null +++ b/fern/sdk/src/Storage/Requests/GetStorageListByPublicAccessRequest.php @@ -0,0 +1,61 @@ + $sortBy Field by which to sort the results. + */ + public ?string $sortBy; + + /** + * @var ?value-of $orderBy Sort direction. Used only when `sort_by` is specified. + */ + public ?string $orderBy; + + /** + * @var ?int $limit Maximum number of storage resources to return. + */ + public ?int $limit; + + /** + * @var ?int $offset Number of storage resources to skip before returning results. + */ + public ?int $offset; + + /** + * @param array{ + * label?: ?string, + * search?: ?string, + * sortBy?: ?value-of, + * orderBy?: ?value-of, + * limit?: ?int, + * offset?: ?int, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->label = $values['label'] ?? null; + $this->search = $values['search'] ?? null; + $this->sortBy = $values['sortBy'] ?? null; + $this->orderBy = $values['orderBy'] ?? null; + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + } +} diff --git a/fern/sdk/src/Storage/Requests/GetStorageListByTemplateRequest.php b/fern/sdk/src/Storage/Requests/GetStorageListByTemplateRequest.php new file mode 100644 index 00000000..b7c0a3f8 --- /dev/null +++ b/fern/sdk/src/Storage/Requests/GetStorageListByTemplateRequest.php @@ -0,0 +1,61 @@ + $sortBy Field by which to sort the results. + */ + public ?string $sortBy; + + /** + * @var ?value-of $orderBy Sort direction. Used only when `sort_by` is specified. + */ + public ?string $orderBy; + + /** + * @var ?int $limit Maximum number of storage resources to return. + */ + public ?int $limit; + + /** + * @var ?int $offset Number of storage resources to skip before returning results. + */ + public ?int $offset; + + /** + * @param array{ + * label?: ?string, + * search?: ?string, + * sortBy?: ?value-of, + * orderBy?: ?value-of, + * limit?: ?int, + * offset?: ?int, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->label = $values['label'] ?? null; + $this->search = $values['search'] ?? null; + $this->sortBy = $values['sortBy'] ?? null; + $this->orderBy = $values['orderBy'] ?? null; + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + } +} diff --git a/fern/sdk/src/Storage/Requests/GetStorageListByTypeAndAccessRequest.php b/fern/sdk/src/Storage/Requests/GetStorageListByTypeAndAccessRequest.php new file mode 100644 index 00000000..8e273d72 --- /dev/null +++ b/fern/sdk/src/Storage/Requests/GetStorageListByTypeAndAccessRequest.php @@ -0,0 +1,61 @@ + $sortBy Field by which to sort the results. + */ + public ?string $sortBy; + + /** + * @var ?value-of $orderBy Sort direction. Used only when `sort_by` is specified. + */ + public ?string $orderBy; + + /** + * @var ?int $limit Maximum number of storage resources to return. + */ + public ?int $limit; + + /** + * @var ?int $offset Number of storage resources to skip before returning results. + */ + public ?int $offset; + + /** + * @param array{ + * label?: ?string, + * search?: ?string, + * sortBy?: ?value-of, + * orderBy?: ?value-of, + * limit?: ?int, + * offset?: ?int, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->label = $values['label'] ?? null; + $this->search = $values['search'] ?? null; + $this->sortBy = $values['sortBy'] ?? null; + $this->orderBy = $values['orderBy'] ?? null; + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + } +} diff --git a/fern/sdk/src/Storage/Requests/GetStorageListRequest.php b/fern/sdk/src/Storage/Requests/GetStorageListRequest.php new file mode 100644 index 00000000..f5f0c420 --- /dev/null +++ b/fern/sdk/src/Storage/Requests/GetStorageListRequest.php @@ -0,0 +1,61 @@ + $sortBy Field by which to sort the results. + */ + public ?string $sortBy; + + /** + * @var ?value-of $orderBy Sort direction. Used only when `sort_by` is specified. + */ + public ?string $orderBy; + + /** + * @var ?int $limit Maximum number of storage resources to return. + */ + public ?int $limit; + + /** + * @var ?int $offset Number of storage resources to skip before returning results. + */ + public ?int $offset; + + /** + * @param array{ + * label?: ?string, + * search?: ?string, + * sortBy?: ?value-of, + * orderBy?: ?value-of, + * limit?: ?int, + * offset?: ?int, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->label = $values['label'] ?? null; + $this->search = $values['search'] ?? null; + $this->sortBy = $values['sortBy'] ?? null; + $this->orderBy = $values['orderBy'] ?? null; + $this->limit = $values['limit'] ?? null; + $this->offset = $values['offset'] ?? null; + } +} diff --git a/fern/sdk/src/Storage/Requests/ModifyStorageBody.php b/fern/sdk/src/Storage/Requests/ModifyStorageBody.php new file mode 100644 index 00000000..fa788471 --- /dev/null +++ b/fern/sdk/src/Storage/Requests/ModifyStorageBody.php @@ -0,0 +1,27 @@ +storage = $values['storage']; + } +} diff --git a/fern/sdk/src/Storage/StorageClient.php b/fern/sdk/src/Storage/StorageClient.php new file mode 100644 index 00000000..a51221bd --- /dev/null +++ b/fern/sdk/src/Storage/StorageClient.php @@ -0,0 +1,1669 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Returns all storage resources accessible to the account. The results can be filtered by labels or a title and UUID search, sorted, and paginated. + * + * @param GetStorageListRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Storages + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getStorageList(GetStorageListRequest $request = new GetStorageListRequest(), ?array $options = null): Storages + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->label !== null) { + $query['label'] = $request->label; + } + if ($request->search !== null) { + $query['search'] = $request->search; + } + if ($request->sortBy !== null) { + $query['sort_by'] = $request->sortBy; + } + if ($request->orderBy !== null) { + $query['order_by'] = $request->orderBy; + } + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Storages::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a block storage resource in a specific zone. The new block storage is not attached to a Cloud Server. + * + * @param CreateStorageRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return CreateStorageResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createStorage(CreateStorageRequest $request, ?array $options = null): CreateStorageResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return CreateStorageResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns accessible storage resources whose type is `backup`. + * + * @param GetStorageListByBackupRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Storages + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getStorageListByBackup(GetStorageListByBackupRequest $request = new GetStorageListByBackupRequest(), ?array $options = null): Storages + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->label !== null) { + $query['label'] = $request->label; + } + if ($request->search !== null) { + $query['search'] = $request->search; + } + if ($request->sortBy !== null) { + $query['sort_by'] = $request->sortBy; + } + if ($request->orderBy !== null) { + $query['order_by'] = $request->orderBy; + } + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/backup", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Storages::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns accessible storage resources whose type is `cdrom`. + * + * @param GetStorageListByCdromRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Storages + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getStorageListByCdrom(GetStorageListByCdromRequest $request = new GetStorageListByCdromRequest(), ?array $options = null): Storages + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->label !== null) { + $query['label'] = $request->label; + } + if ($request->search !== null) { + $query['search'] = $request->search; + } + if ($request->sortBy !== null) { + $query['sort_by'] = $request->sortBy; + } + if ($request->orderBy !== null) { + $query['order_by'] = $request->orderBy; + } + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/cdrom", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Storages::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns the public templates and CD-ROM images that the account has marked as favorites. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Storages + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getFavoriteStorageList(?array $options = null): Storages + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/favorite", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Storages::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns accessible Block Storage resources whose type is `normal`. + * + * @param GetStorageListByNormalRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Storages + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getStorageListByNormal(GetStorageListByNormalRequest $request = new GetStorageListByNormalRequest(), ?array $options = null): Storages + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->label !== null) { + $query['label'] = $request->label; + } + if ($request->search !== null) { + $query['search'] = $request->search; + } + if ($request->sortBy !== null) { + $query['sort_by'] = $request->sortBy; + } + if ($request->orderBy !== null) { + $query['order_by'] = $request->orderBy; + } + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/normal", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Storages::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns accessible storage resources whose access type is `private`. + * + * @param GetStorageListByPrivateAccessRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Storages + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getStorageListByPrivateAccess(GetStorageListByPrivateAccessRequest $request = new GetStorageListByPrivateAccessRequest(), ?array $options = null): Storages + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->label !== null) { + $query['label'] = $request->label; + } + if ($request->search !== null) { + $query['search'] = $request->search; + } + if ($request->sortBy !== null) { + $query['sort_by'] = $request->sortBy; + } + if ($request->orderBy !== null) { + $query['order_by'] = $request->orderBy; + } + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/private", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Storages::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns accessible storage resources whose access type is `public`. + * + * @param GetStorageListByPublicAccessRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Storages + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getStorageListByPublicAccess(GetStorageListByPublicAccessRequest $request = new GetStorageListByPublicAccessRequest(), ?array $options = null): Storages + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->label !== null) { + $query['label'] = $request->label; + } + if ($request->search !== null) { + $query['search'] = $request->search; + } + if ($request->sortBy !== null) { + $query['sort_by'] = $request->sortBy; + } + if ($request->orderBy !== null) { + $query['order_by'] = $request->orderBy; + } + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/public", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Storages::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns accessible storage resources whose type is `template`. + * + * @param GetStorageListByTemplateRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Storages + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getStorageListByTemplate(GetStorageListByTemplateRequest $request = new GetStorageListByTemplateRequest(), ?array $options = null): Storages + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->label !== null) { + $query['label'] = $request->label; + } + if ($request->search !== null) { + $query['search'] = $request->search; + } + if ($request->sortBy !== null) { + $query['sort_by'] = $request->sortBy; + } + if ($request->orderBy !== null) { + $query['order_by'] = $request->orderBy; + } + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/template", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Storages::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns accessible storage resources matching both the requested storage type and access type. + * + * @param value-of $type Storage resource type to return. + * @param value-of $access Storage resource access type to return. + * @param GetStorageListByTypeAndAccessRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Storages + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getStorageListByTypeAndAccess(string $type, string $access, GetStorageListByTypeAndAccessRequest $request = new GetStorageListByTypeAndAccessRequest(), ?array $options = null): Storages + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->label !== null) { + $query['label'] = $request->label; + } + if ($request->search !== null) { + $query['search'] = $request->search; + } + if ($request->sortBy !== null) { + $query['sort_by'] = $request->sortBy; + } + if ($request->orderBy !== null) { + $query['order_by'] = $request->orderBy; + } + if ($request->limit !== null) { + $query['limit'] = $request->limit; + } + if ($request->offset !== null) { + $query['offset'] = $request->offset; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$type}/{$access}", + method: HttpMethod::GET, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Storages::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns detailed information about a storage resource, including its current state, attachments, labels, and backup configuration when applicable. + * + * @param string $uuid Storage resource UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Storage + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getStorageInfo(string $uuid, ?array $options = null): Storage + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$uuid}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Storage::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Modifies a block storage title, labels, automatic backup rule, or size. A new size must be greater than the current size. Set `filesystem_resize` to `yes` to also resize the last partition and its supported filesystem after increasing the block storage size. + * + * @param string $uuid Block storage UUID + * @param ModifyStorageBody $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ModifyStorageResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyStorage(string $uuid, ModifyStorageBody $request, ?array $options = null): ModifyStorageResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$uuid}", + method: HttpMethod::PUT, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ModifyStorageResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Schedules an unattached private storage resource for deletion. Associated backups are kept by default unless another backup policy is selected. + * + * @param string $uuid Storage resource UUID + * @param DeleteStorageRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteStorage(string $uuid, DeleteStorageRequest $request = new DeleteStorageRequest(), ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->backups !== null) { + $query['backups'] = $request->backups; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$uuid}", + method: HttpMethod::DELETE, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Attaches the storage resource to a Cloud Server in the same zone. The device defaults to a disk at the next available address. IDE and CD-ROM devices can be attached only while the Cloud Server is stopped; SCSI and VirtIO disks can also be attached while it is running. + * + * @param string $uuid Storage resource UUID + * @param AttachStorageRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return AttachStorageResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function attachStorageToServer(string $uuid, AttachStorageRequest $request, ?array $options = null): AttachStorageResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$uuid}/attach", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return AttachStorageResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a point-in-time backup of private normal block storage. The operation is asynchronous: the source block storage is `backuping` while the backup is created, and the returned backup remains in `maintenance` until it is ready. + * + * @param string $uuid Block storage UUID + * @param CreateStorageBackupRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return CreateStorageBackupResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createOnDemandBackup(string $uuid, CreateStorageBackupRequest $request, ?array $options = null): CreateStorageBackupResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$uuid}/backup", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return CreateStorageBackupResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Requests cancellation of an interruptible operation on block storage in the `maintenance` state. For a running clone, cancellation removes the incomplete copy and returns the source block storage to the `online` state. + * + * @param string $uuid Block storage UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function cancelStorageOperation(string $uuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$uuid}/cancel", + method: HttpMethod::POST, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a Block Storage copy of a storage resource. Cloning is asynchronous: the returned block storage remains in the `maintenance` state until the operation completes and can be monitored with the storage resource details endpoint. + * + * @param string $uuid Storage resource UUID + * @param CloneStorageRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return CreateStorageResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function cloneStorage(string $uuid, CloneStorageRequest $request, ?array $options = null): CreateStorageResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$uuid}/clone", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return CreateStorageResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Detaches the storage resource from its attached Cloud Server. IDE and CD-ROM devices can be detached only while the Cloud Server is stopped; SCSI and VirtIO disks can also be detached while it is running. If the storage resource is already detached, it is returned unchanged. + * + * @param string $uuid Storage resource UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return DetachStorageResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function detachStorageFromServer(string $uuid, ?array $options = null): DetachStorageResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$uuid}/detach", + method: HttpMethod::POST, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return DetachStorageResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Adds an accessible storage resource to the account's favorites. The operation succeeds if the storage resource is already a favorite. + * + * @param string $uuid Storage resource UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function addStorageToFavorites(string $uuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$uuid}/favorite", + method: HttpMethod::POST, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Removes an accessible storage resource from the account's favorites. The operation succeeds if the storage resource is not a favorite. + * + * @param string $uuid Storage resource UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function removeStorageFromFavorites(string $uuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$uuid}/favorite", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns details of the latest import task for a storage resource, including its state, transferred byte counts, checksums, and any error information. + * + * @param string $uuid Storage resource UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return StorageImportResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getStorageImportDetails(string $uuid, ?array $options = null): StorageImportResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$uuid}/import", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return StorageImportResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates an asynchronous task that imports a raw disk image into existing Block Storage from an HTTP URL or a temporary direct-upload URL. Attached Cloud Servers must be stopped. + * + * @param string $uuid Storage resource UUID + * @param CreateStorageImportRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return StorageImportResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createStorageImport(string $uuid, CreateStorageImportRequest $request, ?array $options = null): StorageImportResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$uuid}/import", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return StorageImportResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Requests cancellation of an ongoing storage import. The task enters the `cancelling` state while imported data is rolled back when necessary. + * + * @param string $uuid Storage resource UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return StorageImportResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function cancelStorageImport(string $uuid, ?array $options = null): StorageImportResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$uuid}/import/cancel", + method: HttpMethod::POST, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return StorageImportResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Resizes the last partition and its supported filesystem to use the block storage capacity already available. A backup is created before the operation and returned on success. Increase the block storage capacity first with the modify block storage endpoint. + * + * @param string $uuid Block storage UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ResizeStorageResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function resizeStorage(string $uuid, ?array $options = null): ResizeStorageResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$uuid}/resize", + method: HttpMethod::POST, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ResizeStorageResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Starts restoring the backup identified by `uuid` to its origin block storage. If the origin block storage is attached to a Cloud Server, the Cloud Server must be stopped. + * + * @param string $uuid Backup UUID + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function restoreStorageFromBackup(string $uuid, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$uuid}/restore", + method: HttpMethod::POST, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a private template from private normal block storage. The operation is asynchronous: the returned template remains in `maintenance` until it is ready. Deployments from the template use the source block storage tier. + * + * @param string $uuid Block storage UUID + * @param CreateStorageTemplateRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return CreateStorageTemplateResponse + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createTemplateFromStorage(string $uuid, CreateStorageTemplateRequest $request, ?array $options = null): CreateStorageTemplateResponse + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/storage/{$uuid}/templatize", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return CreateStorageTemplateResponse::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Storage/Types/AttachStorageRequestStorageDevice.php b/fern/sdk/src/Storage/Types/AttachStorageRequestStorageDevice.php new file mode 100644 index 00000000..77a756b7 --- /dev/null +++ b/fern/sdk/src/Storage/Types/AttachStorageRequestStorageDevice.php @@ -0,0 +1,61 @@ + $type Type of the attached device. Defaults to `disk`. + */ + #[JsonProperty('type')] + public ?string $type; + + /** + * @var ?value-of $bootDisk Whether the device is used as the boot disk unless overridden by the Cloud Server boot order. Defaults to `0`. + */ + #[JsonProperty('boot_disk')] + public ?string $bootDisk; + + /** + * @param array{ + * server: string, + * address?: ?string, + * type?: ?value-of, + * bootDisk?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->server = $values['server']; + $this->address = $values['address'] ?? null; + $this->type = $values['type'] ?? null; + $this->bootDisk = $values['bootDisk'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Storage/Types/AttachStorageRequestStorageDeviceBootDisk.php b/fern/sdk/src/Storage/Types/AttachStorageRequestStorageDeviceBootDisk.php new file mode 100644 index 00000000..544c0173 --- /dev/null +++ b/fern/sdk/src/Storage/Types/AttachStorageRequestStorageDeviceBootDisk.php @@ -0,0 +1,9 @@ + $encrypted + */ + #[JsonProperty('encrypted')] + public ?string $encrypted; + + /** + * @var ?value-of $tier + */ + #[JsonProperty('tier')] + public ?string $tier; + + /** + * @var string $title + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var string $zone + */ + #[JsonProperty('zone')] + public string $zone; + + /** + * @param array{ + * title: string, + * zone: string, + * encrypted?: ?value-of, + * tier?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->encrypted = $values['encrypted'] ?? null; + $this->tier = $values['tier'] ?? null; + $this->title = $values['title']; + $this->zone = $values['zone']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Storage/Types/CreateStorageBackupRequestStorage.php b/fern/sdk/src/Storage/Types/CreateStorageBackupRequestStorage.php new file mode 100644 index 00000000..4bcf9e04 --- /dev/null +++ b/fern/sdk/src/Storage/Types/CreateStorageBackupRequestStorage.php @@ -0,0 +1,37 @@ +title = $values['title']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Storage/Types/CreateStorageImportRequestStorageImport.php b/fern/sdk/src/Storage/Types/CreateStorageImportRequestStorageImport.php new file mode 100644 index 00000000..41f7fc58 --- /dev/null +++ b/fern/sdk/src/Storage/Types/CreateStorageImportRequestStorageImport.php @@ -0,0 +1,45 @@ + $source Import mode. Use `http_import` to download an image or `direct_upload` to receive a temporary upload URL. + */ + #[JsonProperty('source')] + public string $source; + + /** + * @var ?string $sourceLocation Publicly reachable HTTP or HTTPS URL of the image. Required for `http_import`. + */ + #[JsonProperty('source_location')] + public ?string $sourceLocation; + + /** + * @param array{ + * source: value-of, + * sourceLocation?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->source = $values['source']; + $this->sourceLocation = $values['sourceLocation'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Storage/Types/CreateStorageImportRequestStorageImportSource.php b/fern/sdk/src/Storage/Types/CreateStorageImportRequestStorageImportSource.php new file mode 100644 index 00000000..820eb20e --- /dev/null +++ b/fern/sdk/src/Storage/Types/CreateStorageImportRequestStorageImportSource.php @@ -0,0 +1,9 @@ + + * )|null $backupRule Schedule for automatic backups. An empty object disables automatic backups. + */ + #[JsonProperty('backup_rule'), Union(StorageBackupRule::class, ['string' => 'mixed'], 'null')] + public StorageBackupRule|array|null $backupRule; + + /** + * @var ?value-of $encrypted + */ + #[JsonProperty('encrypted')] + public ?string $encrypted; + + /** + * @var ?array $labels Labels describing and classifying the block storage. Each label contains a key and a value. + */ + #[JsonProperty('labels'), ArrayType([StorageLabel::class])] + public ?array $labels; + + /** + * @var ( + * int + * |string + * ) $size Size of the block storage in gigabytes, from 1 through 4096 subject to the account's block storage limits. + */ + #[JsonProperty('size'), Union('integer', 'string')] + public int|string $size; + + /** + * @var ?value-of $tier + */ + #[JsonProperty('tier')] + public ?string $tier; + + /** + * @var string $title A short, informational description of the block storage. + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var string $zone + */ + #[JsonProperty('zone')] + public string $zone; + + /** + * @param array{ + * size: ( + * int + * |string + * ), + * title: string, + * zone: string, + * backupRule?: ( + * StorageBackupRule + * |array + * )|null, + * encrypted?: ?value-of, + * labels?: ?array, + * tier?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->backupRule = $values['backupRule'] ?? null; + $this->encrypted = $values['encrypted'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->size = $values['size']; + $this->tier = $values['tier'] ?? null; + $this->title = $values['title']; + $this->zone = $values['zone']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Storage/Types/CreateStorageTemplateRequestStorage.php b/fern/sdk/src/Storage/Types/CreateStorageTemplateRequestStorage.php new file mode 100644 index 00000000..d46de11a --- /dev/null +++ b/fern/sdk/src/Storage/Types/CreateStorageTemplateRequestStorage.php @@ -0,0 +1,37 @@ +title = $values['title']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Storage/Types/DeleteStorageRequestBackups.php b/fern/sdk/src/Storage/Types/DeleteStorageRequestBackups.php new file mode 100644 index 00000000..7b1d832e --- /dev/null +++ b/fern/sdk/src/Storage/Types/DeleteStorageRequestBackups.php @@ -0,0 +1,10 @@ + + * )|null $backupRule Schedule for automatic backups of the block storage. An empty object removes the configured schedule. + */ + #[JsonProperty('backup_rule'), Union(StorageBackupRule::class, ['string' => 'mixed'], 'null')] + public StorageBackupRule|array|null $backupRule; + + /** + * @var ?value-of $filesystemResize Set to `yes` when increasing `size` to also resize the last partition and its supported filesystem. The attached Cloud Server, if any, must be stopped. + */ + #[JsonProperty('filesystem_resize')] + public ?string $filesystemResize; + + /** + * @var ?array $labels Labels describing and classifying the block storage. Each label contains a key and a value. + */ + #[JsonProperty('labels'), ArrayType([StorageLabel::class])] + public ?array $labels; + + /** + * @var ( + * int + * |string + * )|null $size New block storage size in gigabytes, from 1 through 4096 subject to the account's block storage limits. The new size must be greater than the current size. + */ + #[JsonProperty('size'), Union('integer', 'string', 'null')] + public int|string|null $size; + + /** + * @var ?string $title A short, informational description of the block storage. + */ + #[JsonProperty('title')] + public ?string $title; + + /** + * @param array{ + * backupRule?: ( + * StorageBackupRule + * |array + * )|null, + * filesystemResize?: ?value-of, + * labels?: ?array, + * size?: ( + * int + * |string + * )|null, + * title?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->backupRule = $values['backupRule'] ?? null; + $this->filesystemResize = $values['filesystemResize'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->size = $values['size'] ?? null; + $this->title = $values['title'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Storage/Types/ModifyStorageBodyStorageFilesystemResize.php b/fern/sdk/src/Storage/Types/ModifyStorageBodyStorageFilesystemResize.php new file mode 100644 index 00000000..7b08c276 --- /dev/null +++ b/fern/sdk/src/Storage/Types/ModifyStorageBodyStorageFilesystemResize.php @@ -0,0 +1,9 @@ +body = $values['body']; + } +} diff --git a/fern/sdk/src/Tag/TagClient.php b/fern/sdk/src/Tag/TagClient.php new file mode 100644 index 00000000..5e3ef198 --- /dev/null +++ b/fern/sdk/src/Tag/TagClient.php @@ -0,0 +1,327 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Returns all existing tags with their properties and servers tagged. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Tags + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listTags(?array $options = null): Tags + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/tag", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Tags::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Creates a new tag. Existing servers can be tagged in same request. + * + * @param Tag $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Tag + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function createTag(Tag $request, ?array $options = null): Tag + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/tag", + method: HttpMethod::POST, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Tag::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Returns details for a specific tag. + * + * @param string $name Tag name + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Tag + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function getTag(string $name, ?array $options = null): Tag + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/tag/{$name}", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Tag::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Changes attributes of an existing tag + * + * @param string $name Tag name + * @param ModifyTagRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Tag + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function modifyTag(string $name, ModifyTagRequest $request, ?array $options = null): Tag + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/tag/{$name}", + method: HttpMethod::PUT, + body: $request->body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Tag::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Deletes a specific tag. + * + * @param string $name Tag name + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function deleteTag(string $name, ?array $options = null): void + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/tag/{$name}", + method: HttpMethod::DELETE, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return; + } + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Timezone/TimezoneClient.php b/fern/sdk/src/Timezone/TimezoneClient.php new file mode 100644 index 00000000..6b9f44c0 --- /dev/null +++ b/fern/sdk/src/Timezone/TimezoneClient.php @@ -0,0 +1,106 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Retrieves a list of supported timezones. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Timezones + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listTimezones(?array $options = null): Timezones + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/timezone", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Timezones::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Traits/DatabaseServiceTaskBaseResponse.php b/fern/sdk/src/Traits/DatabaseServiceTaskBaseResponse.php new file mode 100644 index 00000000..29097a4f --- /dev/null +++ b/fern/sdk/src/Traits/DatabaseServiceTaskBaseResponse.php @@ -0,0 +1,85 @@ +> $resultCodes + * @property ?string $ignoreDbs + * @property ?string $operation + * @property ?bool $success + * @property ?string $method + * @property ?string $sourcePgVersion + * @property ?string $targetPgVersion + * @property ?string $id + */ +trait DatabaseServiceTaskBaseResponse +{ + /** + * @var ?DateTime $createTime The time when the service task was created + */ + #[JsonProperty('create_time'), Date(Date::TYPE_DATETIME)] + public ?DateTime $createTime; + + /** + * @var ?string $result Optional result message + */ + #[JsonProperty('result')] + public ?string $result; + + /** + * @var ?array> $resultCodes Optional list of result codes as key-value maps + */ + #[JsonProperty('result_codes'), ArrayType([['string' => 'string']])] + public ?array $resultCodes; + + /** + * @var ?string $ignoreDbs Optional list of databases to ignore + */ + #[JsonProperty('ignore_dbs')] + public ?string $ignoreDbs; + + /** + * @var ?string $operation The operation being performed + */ + #[JsonProperty('operation')] + public ?string $operation; + + /** + * @var ?bool $success Indicates if the operation was successful + */ + #[JsonProperty('success')] + public ?bool $success; + + /** + * @var ?string $method Optional method used for the operation + */ + #[JsonProperty('method')] + public ?string $method; + + /** + * @var ?string $sourcePgVersion Optional source PostgreSQL version + */ + #[JsonProperty('source_pg_version')] + public ?string $sourcePgVersion; + + /** + * @var ?string $targetPgVersion Optional target PostgreSQL version + */ + #[JsonProperty('target_pg_version')] + public ?string $targetPgVersion; + + /** + * @var ?string $id Optional identifier for the task + */ + #[JsonProperty('id')] + public ?string $id; +} diff --git a/fern/sdk/src/Traits/LoadBalancerAvgTimeMetricsResponse.php b/fern/sdk/src/Traits/LoadBalancerAvgTimeMetricsResponse.php new file mode 100644 index 00000000..398d11a1 --- /dev/null +++ b/fern/sdk/src/Traits/LoadBalancerAvgTimeMetricsResponse.php @@ -0,0 +1,40 @@ + $method + * @property int $value + * @property ?int $rangeStart + * @property ?int $rangeEnd + */ +trait LoadBalancerMatchIntResponse +{ + /** + * @var value-of $method Comparison method used to evaluate the integer value. + */ + #[JsonProperty('method')] + public string $method; + + /** + * @var int $value Integer value to compare against using the specified comparison method. + */ + #[JsonProperty('value')] + public int $value; + + /** + * @var ?int $rangeStart Starting value of the range for range-based integer matching. + */ + #[JsonProperty('range_start')] + public ?int $rangeStart; + + /** + * @var ?int $rangeEnd Ending value of the range for range-based integer matching. + */ + #[JsonProperty('range_end')] + public ?int $rangeEnd; +} diff --git a/fern/sdk/src/Traits/LoadBalancerMatchStringResponse.php b/fern/sdk/src/Traits/LoadBalancerMatchStringResponse.php new file mode 100644 index 00000000..20956e44 --- /dev/null +++ b/fern/sdk/src/Traits/LoadBalancerMatchStringResponse.php @@ -0,0 +1,34 @@ + $method + * @property ?string $value + * @property ?bool $ignoreCase + */ +trait LoadBalancerMatchStringResponse +{ + /** + * @var ?value-of $method String comparison method used to evaluate the match condition. + */ + #[JsonProperty('method')] + public ?string $method; + + /** + * @var ?string $value String value or pattern to match against using the specified comparison method. + */ + #[JsonProperty('value')] + public ?string $value; + + /** + * @var ?bool $ignoreCase Indicates whether the string comparison should be case-insensitive. + */ + #[JsonProperty('ignore_case')] + public ?bool $ignoreCase; +} diff --git a/fern/sdk/src/Traits/LoadBalancerRequestMetricsResponse.php b/fern/sdk/src/Traits/LoadBalancerRequestMetricsResponse.php new file mode 100644 index 00000000..e8a818b4 --- /dev/null +++ b/fern/sdk/src/Traits/LoadBalancerRequestMetricsResponse.php @@ -0,0 +1,33 @@ +account = $values['account']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountBillingSummary.php b/fern/sdk/src/Types/AccountBillingSummary.php new file mode 100644 index 00000000..133b9287 --- /dev/null +++ b/fern/sdk/src/Types/AccountBillingSummary.php @@ -0,0 +1,45 @@ +currency = $values['currency'] ?? null; + $this->totalAmount = $values['totalAmount'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountBillingSummaryResponse.php b/fern/sdk/src/Types/AccountBillingSummaryResponse.php new file mode 100644 index 00000000..88dab17b --- /dev/null +++ b/fern/sdk/src/Types/AccountBillingSummaryResponse.php @@ -0,0 +1,37 @@ +billing = $values['billing']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountBooleanYesno.php b/fern/sdk/src/Types/AccountBooleanYesno.php new file mode 100644 index 00000000..31b4d64a --- /dev/null +++ b/fern/sdk/src/Types/AccountBooleanYesno.php @@ -0,0 +1,9 @@ +signingStatus = $values['signingStatus'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountCreateMsLmaSigningLinkResponseSigningStatus.php b/fern/sdk/src/Types/AccountCreateMsLmaSigningLinkResponseSigningStatus.php new file mode 100644 index 00000000..02798416 --- /dev/null +++ b/fern/sdk/src/Types/AccountCreateMsLmaSigningLinkResponseSigningStatus.php @@ -0,0 +1,68 @@ + $state + */ + #[JsonProperty('state')] + public string $state; + + /** + * @param array{ + * id: string, + * initiated: DateTime, + * signedAt: DateTime, + * signingLink: string, + * state: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->id = $values['id']; + $this->initiated = $values['initiated']; + $this->signedAt = $values['signedAt']; + $this->signingLink = $values['signingLink']; + $this->state = $values['state']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountCreateMsLmaSigningLinkResponseSigningStatusState.php b/fern/sdk/src/Types/AccountCreateMsLmaSigningLinkResponseSigningStatusState.php new file mode 100644 index 00000000..df2084fb --- /dev/null +++ b/fern/sdk/src/Types/AccountCreateMsLmaSigningLinkResponseSigningStatusState.php @@ -0,0 +1,11 @@ +accountCredits = $values['accountCredits']; + $this->accountFreeCredits = $values['accountFreeCredits']; + $this->totalCredits = $values['totalCredits']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountCreditsBreakdownAccountCredits.php b/fern/sdk/src/Types/AccountCreditsBreakdownAccountCredits.php new file mode 100644 index 00000000..60907a52 --- /dev/null +++ b/fern/sdk/src/Types/AccountCreditsBreakdownAccountCredits.php @@ -0,0 +1,53 @@ +debtCredits = $values['debtCredits']; + $this->maxDebt = $values['maxDebt']; + $this->paidCredits = $values['paidCredits']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountCreditsBreakdownAccountFreeCredits.php b/fern/sdk/src/Types/AccountCreditsBreakdownAccountFreeCredits.php new file mode 100644 index 00000000..5d03c7c0 --- /dev/null +++ b/fern/sdk/src/Types/AccountCreditsBreakdownAccountFreeCredits.php @@ -0,0 +1,38 @@ + $breakdown List of individual free credit grants. + */ + #[JsonProperty('breakdown'), ArrayType([AccountCreditsBreakdownAccountFreeCreditsBreakdownItem::class])] + public array $breakdown; + + /** + * @param array{ + * breakdown: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->breakdown = $values['breakdown']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountCreditsBreakdownAccountFreeCreditsBreakdownItem.php b/fern/sdk/src/Types/AccountCreditsBreakdownAccountFreeCreditsBreakdownItem.php new file mode 100644 index 00000000..99947c43 --- /dev/null +++ b/fern/sdk/src/Types/AccountCreditsBreakdownAccountFreeCreditsBreakdownItem.php @@ -0,0 +1,52 @@ +freeCreditType = $values['freeCreditType']; + $this->freeCredits = $values['freeCredits']; + $this->freeCreditsExpire = $values['freeCreditsExpire'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountCurrentNetworkUsage.php b/fern/sdk/src/Types/AccountCurrentNetworkUsage.php new file mode 100644 index 00000000..cc9aa7fa --- /dev/null +++ b/fern/sdk/src/Types/AccountCurrentNetworkUsage.php @@ -0,0 +1,37 @@ +stats = $values['stats']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountCurrentNetworkUsageStats.php b/fern/sdk/src/Types/AccountCurrentNetworkUsageStats.php new file mode 100644 index 00000000..a45049e8 --- /dev/null +++ b/fern/sdk/src/Types/AccountCurrentNetworkUsageStats.php @@ -0,0 +1,34 @@ +currentNetworkUsage = $values['currentNetworkUsage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountCurrentNetworkUsageStatsCurrentNetworkUsage.php b/fern/sdk/src/Types/AccountCurrentNetworkUsageStatsCurrentNetworkUsage.php new file mode 100644 index 00000000..916155f9 --- /dev/null +++ b/fern/sdk/src/Types/AccountCurrentNetworkUsageStatsCurrentNetworkUsage.php @@ -0,0 +1,68 @@ +updated = $values['updated']; + $this->accumulatedQuotaBytes = $values['accumulatedQuotaBytes']; + $this->totalSentBytes = $values['totalSentBytes']; + $this->hourlyQuotaIncreaseBytes = $values['hourlyQuotaIncreaseBytes']; + $this->projectedMonthlyQuotaBytes = $values['projectedMonthlyQuotaBytes']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountDetails.php b/fern/sdk/src/Types/AccountDetails.php new file mode 100644 index 00000000..a62c1671 --- /dev/null +++ b/fern/sdk/src/Types/AccountDetails.php @@ -0,0 +1,69 @@ +resourceLimits = $values['resourceLimits']; + $this->username = $values['username']; + $this->credits = $values['credits'] ?? null; + $this->creditsBreakdown = $values['creditsBreakdown'] ?? null; + $this->trialMode = $values['trialMode'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountError.php b/fern/sdk/src/Types/AccountError.php new file mode 100644 index 00000000..8e289b9d --- /dev/null +++ b/fern/sdk/src/Types/AccountError.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountErrorError.php b/fern/sdk/src/Types/AccountErrorError.php new file mode 100644 index 00000000..247a4563 --- /dev/null +++ b/fern/sdk/src/Types/AccountErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountLabel.php b/fern/sdk/src/Types/AccountLabel.php new file mode 100644 index 00000000..80907dbf --- /dev/null +++ b/fern/sdk/src/Types/AccountLabel.php @@ -0,0 +1,45 @@ +key = $values['key']; + $this->value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountNetworkUsage.php b/fern/sdk/src/Types/AccountNetworkUsage.php new file mode 100644 index 00000000..8b1a97d9 --- /dev/null +++ b/fern/sdk/src/Types/AccountNetworkUsage.php @@ -0,0 +1,37 @@ +stats = $values['stats']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountNetworkUsageStats.php b/fern/sdk/src/Types/AccountNetworkUsageStats.php new file mode 100644 index 00000000..d524585b --- /dev/null +++ b/fern/sdk/src/Types/AccountNetworkUsageStats.php @@ -0,0 +1,35 @@ + $stat + */ + #[JsonProperty('stat'), ArrayType([AccountNetworkUsageStatsStatItem::class])] + public array $stat; + + /** + * @param array{ + * stat: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->stat = $values['stat']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountNetworkUsageStatsStatItem.php b/fern/sdk/src/Types/AccountNetworkUsageStatsStatItem.php new file mode 100644 index 00000000..3ac6307c --- /dev/null +++ b/fern/sdk/src/Types/AccountNetworkUsageStatsStatItem.php @@ -0,0 +1,76 @@ +startTime = $values['startTime']; + $this->sentBytes = $values['sentBytes']; + $this->totalSentBytes = $values['totalSentBytes']; + $this->accumulatedQuotaBytes = $values['accumulatedQuotaBytes']; + $this->projectedMonthlyQuotaBytes = $values['projectedMonthlyQuotaBytes']; + $this->quotaIncreaseBytes = $values['quotaIncreaseBytes']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountResourceBillingSummaryResponse.php b/fern/sdk/src/Types/AccountResourceBillingSummaryResponse.php new file mode 100644 index 00000000..c6bc34c8 --- /dev/null +++ b/fern/sdk/src/Types/AccountResourceBillingSummaryResponse.php @@ -0,0 +1,37 @@ +billing = $values['billing']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountResourceBillingSummaryResponseBilling.php b/fern/sdk/src/Types/AccountResourceBillingSummaryResponseBilling.php new file mode 100644 index 00000000..e7719c45 --- /dev/null +++ b/fern/sdk/src/Types/AccountResourceBillingSummaryResponseBilling.php @@ -0,0 +1,59 @@ + $dailySums + */ + #[JsonProperty('daily_sums'), ArrayType(['string' => 'float'])] + public ?array $dailySums; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @var ?float $totalAmount + */ + #[JsonProperty('total_amount')] + public ?float $totalAmount; + + /** + * @param array{ + * currency?: ?string, + * dailySums?: ?array, + * details?: ?array, + * totalAmount?: ?float, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->currency = $values['currency'] ?? null; + $this->dailySums = $values['dailySums'] ?? null; + $this->details = $values['details'] ?? null; + $this->totalAmount = $values['totalAmount'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountResourceLimits.php b/fern/sdk/src/Types/AccountResourceLimits.php new file mode 100644 index 00000000..35aa72e1 --- /dev/null +++ b/fern/sdk/src/Types/AccountResourceLimits.php @@ -0,0 +1,277 @@ +managedDatabases = $values['managedDatabases'] ?? null; + $this->networkPeerings = $values['networkPeerings'] ?? null; + $this->fileStorages = $values['fileStorages'] ?? null; + $this->managedContainerRegistries = $values['managedContainerRegistries'] ?? null; + $this->managedKubernetes = $values['managedKubernetes'] ?? null; + $this->tags = $values['tags'] ?? null; + $this->cores = $values['cores'] ?? null; + $this->cloudServerDev1Xcpu1Gb10GbPlans = $values['cloudServerDev1Xcpu1Gb10GbPlans'] ?? null; + $this->cloudServerDev1Xcpu1GbPlans = $values['cloudServerDev1Xcpu1GbPlans'] ?? null; + $this->storageHdd = $values['storageHdd'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->networkGatewaysEssentials = $values['networkGatewaysEssentials'] ?? null; + $this->networkGateways = $values['networkGateways'] ?? null; + $this->storageSsd = $values['storageSsd'] ?? null; + $this->loadBalancersEssentials = $values['loadBalancersEssentials'] ?? null; + $this->loadBalancers = $values['loadBalancers'] ?? null; + $this->gpus = $values['gpus'] ?? null; + $this->detachedInterfaces = $values['detachedInterfaces'] ?? null; + $this->detachedFloatingIps = $values['detachedFloatingIps'] ?? null; + $this->managedObjectStorages = $values['managedObjectStorages'] ?? null; + $this->memory = $values['memory'] ?? null; + $this->ntpExcessGib = $values['ntpExcessGib'] ?? null; + $this->publicIpv4 = $values['publicIpv4'] ?? null; + $this->publicIpv6 = $values['publicIpv6'] ?? null; + $this->routers = $values['routers'] ?? null; + $this->storageMaxiops = $values['storageMaxiops'] ?? null; + $this->storageStandard = $values['storageStandard'] ?? null; + $this->storageTotal = $values['storageTotal'] ?? null; + $this->type = $values['type'] ?? null; + $this->required = $values['required'] ?? null; + $this->additionalProperties = $values['additionalProperties'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountResourceNetworkUsage.php b/fern/sdk/src/Types/AccountResourceNetworkUsage.php new file mode 100644 index 00000000..f177771c --- /dev/null +++ b/fern/sdk/src/Types/AccountResourceNetworkUsage.php @@ -0,0 +1,37 @@ +stats = $values['stats']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountResourceNetworkUsageStats.php b/fern/sdk/src/Types/AccountResourceNetworkUsageStats.php new file mode 100644 index 00000000..0bfde0c5 --- /dev/null +++ b/fern/sdk/src/Types/AccountResourceNetworkUsageStats.php @@ -0,0 +1,35 @@ + $stat + */ + #[JsonProperty('stat'), ArrayType([AccountResourceNetworkUsageStatsStatItem::class])] + public array $stat; + + /** + * @param array{ + * stat: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->stat = $values['stat']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountResourceNetworkUsageStatsStatItem.php b/fern/sdk/src/Types/AccountResourceNetworkUsageStatsStatItem.php new file mode 100644 index 00000000..97d71405 --- /dev/null +++ b/fern/sdk/src/Types/AccountResourceNetworkUsageStatsStatItem.php @@ -0,0 +1,68 @@ + $service + */ + #[JsonProperty('service')] + public string $service; + + /** + * @var string $zone + */ + #[JsonProperty('zone')] + public string $zone; + + /** + * @var DateTime $startTime + */ + #[JsonProperty('start_time'), Date(Date::TYPE_DATETIME)] + public DateTime $startTime; + + /** + * @var ?int $sentBytes + */ + #[JsonProperty('sent_bytes')] + public ?int $sentBytes; + + /** + * @param array{ + * resourceId: string, + * service: value-of, + * zone: string, + * startTime: DateTime, + * sentBytes?: ?int, + * } $values + */ + public function __construct( + array $values, + ) { + $this->resourceId = $values['resourceId']; + $this->service = $values['service']; + $this->zone = $values['zone']; + $this->startTime = $values['startTime']; + $this->sentBytes = $values['sentBytes'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountResourceNetworkUsageType.php b/fern/sdk/src/Types/AccountResourceNetworkUsageType.php new file mode 100644 index 00000000..c37015c5 --- /dev/null +++ b/fern/sdk/src/Types/AccountResourceNetworkUsageType.php @@ -0,0 +1,18 @@ +expiresAt = $values['expiresAt'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountTokensCreateTokenRequestExpiresIn.php b/fern/sdk/src/Types/AccountTokensCreateTokenRequestExpiresIn.php new file mode 100644 index 00000000..ec7ad2c8 --- /dev/null +++ b/fern/sdk/src/Types/AccountTokensCreateTokenRequestExpiresIn.php @@ -0,0 +1,34 @@ +expiresIn = $values['expiresIn'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountTokensGetTokenResponse.php b/fern/sdk/src/Types/AccountTokensGetTokenResponse.php new file mode 100644 index 00000000..b1d6e001 --- /dev/null +++ b/fern/sdk/src/Types/AccountTokensGetTokenResponse.php @@ -0,0 +1,96 @@ + $allowedIpRanges List of IP ranges that are allowed to authenticate with the token. Empty list denies access from everywhere. If unset, the default list will be the IP filters of the account. If no IP filters are defined for the account either, the default will be ["0.0.0.0/0", "::/0"], i.e. allow from any address. + */ + #[JsonProperty('allowed_ip_ranges'), ArrayType(['string'])] + public ?array $allowedIpRanges; + + /** + * @param array{ + * id?: ?string, + * name?: ?string, + * createdAt?: ?DateTime, + * expiresAt?: ?DateTime, + * lastUsedAt?: ?DateTime, + * canCreateTokens?: ?bool, + * gui?: ?bool, + * allowedIpRanges?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->id = $values['id'] ?? null; + $this->name = $values['name'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->expiresAt = $values['expiresAt'] ?? null; + $this->lastUsedAt = $values['lastUsedAt'] ?? null; + $this->canCreateTokens = $values['canCreateTokens'] ?? null; + $this->gui = $values['gui'] ?? null; + $this->allowedIpRanges = $values['allowedIpRanges'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountTokensProblem.php b/fern/sdk/src/Types/AccountTokensProblem.php new file mode 100644 index 00000000..91d1a203 --- /dev/null +++ b/fern/sdk/src/Types/AccountTokensProblem.php @@ -0,0 +1,78 @@ + $invalidParams + */ + #[JsonProperty('invalid_params'), ArrayType([AccountTokensProblemInvalidParamsItem::class])] + public ?array $invalidParams; + + /** + * @var ?string $correlationId A unique identifier for the request. This identifier is generated by the server and can be used to track the request in the server logs. It is useful for debugging and support purposes. + */ + #[JsonProperty('correlation_id')] + public ?string $correlationId; + + /** + * @param array{ + * type: string, + * title: string, + * status: int, + * detail?: ?string, + * invalidParams?: ?array, + * correlationId?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->title = $values['title']; + $this->detail = $values['detail'] ?? null; + $this->status = $values['status']; + $this->invalidParams = $values['invalidParams'] ?? null; + $this->correlationId = $values['correlationId'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountTokensProblem400.php b/fern/sdk/src/Types/AccountTokensProblem400.php new file mode 100644 index 00000000..9daa013e --- /dev/null +++ b/fern/sdk/src/Types/AccountTokensProblem400.php @@ -0,0 +1,78 @@ + $type A URI reference that uniquely identifies the problem type only in the context of the provided API. It is neither recommended to be dereferenceable and point to a human-readable documentation nor globally unique for the problem type. + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var string $title A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var ?string $detail A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. + */ + #[JsonProperty('detail')] + public ?string $detail; + + /** + * @var int $status The HTTP status code generated by the origin server for this occurrence of the problem. + */ + #[JsonProperty('status')] + public int $status; + + /** + * @var ?array $invalidParams + */ + #[JsonProperty('invalid_params'), ArrayType([AccountTokensProblem400InvalidParamsItem::class])] + public ?array $invalidParams; + + /** + * @var ?string $correlationId A unique identifier for the request. This identifier is generated by the server and can be used to track the request in the server logs. It is useful for debugging and support purposes. + */ + #[JsonProperty('correlation_id')] + public ?string $correlationId; + + /** + * @param array{ + * type: value-of, + * title: string, + * status: int, + * detail?: ?string, + * invalidParams?: ?array, + * correlationId?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->title = $values['title']; + $this->detail = $values['detail'] ?? null; + $this->status = $values['status']; + $this->invalidParams = $values['invalidParams'] ?? null; + $this->correlationId = $values['correlationId'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountTokensProblem400InvalidParamsItem.php b/fern/sdk/src/Types/AccountTokensProblem400InvalidParamsItem.php new file mode 100644 index 00000000..582d3bff --- /dev/null +++ b/fern/sdk/src/Types/AccountTokensProblem400InvalidParamsItem.php @@ -0,0 +1,42 @@ +name = $values['name']; + $this->reason = $values['reason']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountTokensProblem400Type.php b/fern/sdk/src/Types/AccountTokensProblem400Type.php new file mode 100644 index 00000000..7997575c --- /dev/null +++ b/fern/sdk/src/Types/AccountTokensProblem400Type.php @@ -0,0 +1,8 @@ + $type A URI reference that uniquely identifies the problem type only in the context of the provided API. It is neither recommended to be dereferenceable and point to a human-readable documentation nor globally unique for the problem type. + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var string $title A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var ?string $detail A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. + */ + #[JsonProperty('detail')] + public ?string $detail; + + /** + * @var int $status The HTTP status code generated by the origin server for this occurrence of the problem. + */ + #[JsonProperty('status')] + public int $status; + + /** + * @var ?array $invalidParams + */ + #[JsonProperty('invalid_params'), ArrayType([AccountTokensProblem401InvalidParamsItem::class])] + public ?array $invalidParams; + + /** + * @var ?string $correlationId A unique identifier for the request. This identifier is generated by the server and can be used to track the request in the server logs. It is useful for debugging and support purposes. + */ + #[JsonProperty('correlation_id')] + public ?string $correlationId; + + /** + * @param array{ + * type: value-of, + * title: string, + * status: int, + * detail?: ?string, + * invalidParams?: ?array, + * correlationId?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->title = $values['title']; + $this->detail = $values['detail'] ?? null; + $this->status = $values['status']; + $this->invalidParams = $values['invalidParams'] ?? null; + $this->correlationId = $values['correlationId'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountTokensProblem401InvalidParamsItem.php b/fern/sdk/src/Types/AccountTokensProblem401InvalidParamsItem.php new file mode 100644 index 00000000..c76bb0ab --- /dev/null +++ b/fern/sdk/src/Types/AccountTokensProblem401InvalidParamsItem.php @@ -0,0 +1,42 @@ +name = $values['name']; + $this->reason = $values['reason']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountTokensProblem401Type.php b/fern/sdk/src/Types/AccountTokensProblem401Type.php new file mode 100644 index 00000000..5a469e5e --- /dev/null +++ b/fern/sdk/src/Types/AccountTokensProblem401Type.php @@ -0,0 +1,8 @@ + $type A URI reference that uniquely identifies the problem type only in the context of the provided API. It is neither recommended to be dereferenceable and point to a human-readable documentation nor globally unique for the problem type. + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var string $title A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var ?string $detail A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. + */ + #[JsonProperty('detail')] + public ?string $detail; + + /** + * @var int $status The HTTP status code generated by the origin server for this occurrence of the problem. + */ + #[JsonProperty('status')] + public int $status; + + /** + * @var ?array $invalidParams + */ + #[JsonProperty('invalid_params'), ArrayType([AccountTokensProblem403InvalidParamsItem::class])] + public ?array $invalidParams; + + /** + * @var ?string $correlationId A unique identifier for the request. This identifier is generated by the server and can be used to track the request in the server logs. It is useful for debugging and support purposes. + */ + #[JsonProperty('correlation_id')] + public ?string $correlationId; + + /** + * @param array{ + * type: value-of, + * title: string, + * status: int, + * detail?: ?string, + * invalidParams?: ?array, + * correlationId?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->title = $values['title']; + $this->detail = $values['detail'] ?? null; + $this->status = $values['status']; + $this->invalidParams = $values['invalidParams'] ?? null; + $this->correlationId = $values['correlationId'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountTokensProblem403InvalidParamsItem.php b/fern/sdk/src/Types/AccountTokensProblem403InvalidParamsItem.php new file mode 100644 index 00000000..48498a07 --- /dev/null +++ b/fern/sdk/src/Types/AccountTokensProblem403InvalidParamsItem.php @@ -0,0 +1,42 @@ +name = $values['name']; + $this->reason = $values['reason']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountTokensProblem403Type.php b/fern/sdk/src/Types/AccountTokensProblem403Type.php new file mode 100644 index 00000000..045d2254 --- /dev/null +++ b/fern/sdk/src/Types/AccountTokensProblem403Type.php @@ -0,0 +1,8 @@ + $type A URI reference that uniquely identifies the problem type only in the context of the provided API. It is neither recommended to be dereferenceable and point to a human-readable documentation nor globally unique for the problem type. + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var string $title A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var ?string $detail A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. + */ + #[JsonProperty('detail')] + public ?string $detail; + + /** + * @var int $status The HTTP status code generated by the origin server for this occurrence of the problem. + */ + #[JsonProperty('status')] + public int $status; + + /** + * @var ?array $invalidParams + */ + #[JsonProperty('invalid_params'), ArrayType([AccountTokensProblem404InvalidParamsItem::class])] + public ?array $invalidParams; + + /** + * @var ?string $correlationId A unique identifier for the request. This identifier is generated by the server and can be used to track the request in the server logs. It is useful for debugging and support purposes. + */ + #[JsonProperty('correlation_id')] + public ?string $correlationId; + + /** + * @param array{ + * type: value-of, + * title: string, + * status: int, + * detail?: ?string, + * invalidParams?: ?array, + * correlationId?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->title = $values['title']; + $this->detail = $values['detail'] ?? null; + $this->status = $values['status']; + $this->invalidParams = $values['invalidParams'] ?? null; + $this->correlationId = $values['correlationId'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountTokensProblem404InvalidParamsItem.php b/fern/sdk/src/Types/AccountTokensProblem404InvalidParamsItem.php new file mode 100644 index 00000000..20947d93 --- /dev/null +++ b/fern/sdk/src/Types/AccountTokensProblem404InvalidParamsItem.php @@ -0,0 +1,42 @@ +name = $values['name']; + $this->reason = $values['reason']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountTokensProblem404Type.php b/fern/sdk/src/Types/AccountTokensProblem404Type.php new file mode 100644 index 00000000..318f50bd --- /dev/null +++ b/fern/sdk/src/Types/AccountTokensProblem404Type.php @@ -0,0 +1,8 @@ + $type A URI reference that uniquely identifies the problem type only in the context of the provided API. It is neither recommended to be dereferenceable and point to a human-readable documentation nor globally unique for the problem type. + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var string $title A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var ?string $detail A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized. + */ + #[JsonProperty('detail')] + public ?string $detail; + + /** + * @var int $status The HTTP status code generated by the origin server for this occurrence of the problem. + */ + #[JsonProperty('status')] + public int $status; + + /** + * @var ?array $invalidParams + */ + #[JsonProperty('invalid_params'), ArrayType([AccountTokensProblem409InvalidParamsItem::class])] + public ?array $invalidParams; + + /** + * @var ?string $correlationId A unique identifier for the request. This identifier is generated by the server and can be used to track the request in the server logs. It is useful for debugging and support purposes. + */ + #[JsonProperty('correlation_id')] + public ?string $correlationId; + + /** + * @param array{ + * type: value-of, + * title: string, + * status: int, + * detail?: ?string, + * invalidParams?: ?array, + * correlationId?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->title = $values['title']; + $this->detail = $values['detail'] ?? null; + $this->status = $values['status']; + $this->invalidParams = $values['invalidParams'] ?? null; + $this->correlationId = $values['correlationId'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountTokensProblem409InvalidParamsItem.php b/fern/sdk/src/Types/AccountTokensProblem409InvalidParamsItem.php new file mode 100644 index 00000000..22f86675 --- /dev/null +++ b/fern/sdk/src/Types/AccountTokensProblem409InvalidParamsItem.php @@ -0,0 +1,42 @@ +name = $values['name']; + $this->reason = $values['reason']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountTokensProblem409Type.php b/fern/sdk/src/Types/AccountTokensProblem409Type.php new file mode 100644 index 00000000..2bad0649 --- /dev/null +++ b/fern/sdk/src/Types/AccountTokensProblem409Type.php @@ -0,0 +1,8 @@ +name = $values['name']; + $this->reason = $values['reason']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountTokensToken.php b/fern/sdk/src/Types/AccountTokensToken.php new file mode 100644 index 00000000..41ce6d04 --- /dev/null +++ b/fern/sdk/src/Types/AccountTokensToken.php @@ -0,0 +1,96 @@ + $allowedIpRanges List of IP ranges that are allowed to authenticate with the token. Empty list denies access from everywhere. If unset, the default list will be the IP filters of the account. If no IP filters are defined for the account either, the default will be ["0.0.0.0/0", "::/0"], i.e. allow from any address. + */ + #[JsonProperty('allowed_ip_ranges'), ArrayType(['string'])] + public ?array $allowedIpRanges; + + /** + * @param array{ + * id?: ?string, + * name?: ?string, + * createdAt?: ?DateTime, + * expiresAt?: ?DateTime, + * lastUsedAt?: ?DateTime, + * canCreateTokens?: ?bool, + * gui?: ?bool, + * allowedIpRanges?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->id = $values['id'] ?? null; + $this->name = $values['name'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->expiresAt = $values['expiresAt'] ?? null; + $this->lastUsedAt = $values['lastUsedAt'] ?? null; + $this->canCreateTokens = $values['canCreateTokens'] ?? null; + $this->gui = $values['gui'] ?? null; + $this->allowedIpRanges = $values['allowedIpRanges'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountUsageAccumulateParameter.php b/fern/sdk/src/Types/AccountUsageAccumulateParameter.php new file mode 100644 index 00000000..f1ca8a70 --- /dev/null +++ b/fern/sdk/src/Types/AccountUsageAccumulateParameter.php @@ -0,0 +1,9 @@ +accounts = $values['accounts']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountsAccounts.php b/fern/sdk/src/Types/AccountsAccounts.php new file mode 100644 index 00000000..cfcc2e13 --- /dev/null +++ b/fern/sdk/src/Types/AccountsAccounts.php @@ -0,0 +1,35 @@ + $account + */ + #[JsonProperty('account'), ArrayType([AccountsAccountsAccountItem::class])] + public array $account; + + /** + * @param array{ + * account: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->account = $values['account']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountsAccountsAccountItem.php b/fern/sdk/src/Types/AccountsAccountsAccountItem.php new file mode 100644 index 00000000..b8f0b169 --- /dev/null +++ b/fern/sdk/src/Types/AccountsAccountsAccountItem.php @@ -0,0 +1,59 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var string $username + */ + #[JsonProperty('username')] + public string $username; + + /** + * @var AccountsAccountsAccountItemRoles $roles + */ + #[JsonProperty('roles')] + public AccountsAccountsAccountItemRoles $roles; + + /** + * @var array $labels + */ + #[JsonProperty('labels'), ArrayType([AccountLabel::class])] + public array $labels; + + /** + * @param array{ + * type: value-of, + * username: string, + * roles: AccountsAccountsAccountItemRoles, + * labels: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->username = $values['username']; + $this->roles = $values['roles']; + $this->labels = $values['labels']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountsAccountsAccountItemRoles.php b/fern/sdk/src/Types/AccountsAccountsAccountItemRoles.php new file mode 100644 index 00000000..c17a62aa --- /dev/null +++ b/fern/sdk/src/Types/AccountsAccountsAccountItemRoles.php @@ -0,0 +1,35 @@ + $role + */ + #[JsonProperty('role'), ArrayType(['string'])] + public array $role; + + /** + * @param array{ + * role: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->role = $values['role']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AccountsAccountsAccountItemType.php b/fern/sdk/src/Types/AccountsAccountsAccountItemType.php new file mode 100644 index 00000000..69a0dd75 --- /dev/null +++ b/fern/sdk/src/Types/AccountsAccountsAccountItemType.php @@ -0,0 +1,9 @@ +storage = $values['storage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AuditLogsActionsParameterItem.php b/fern/sdk/src/Types/AuditLogsActionsParameterItem.php new file mode 100644 index 00000000..a71dd817 --- /dev/null +++ b/fern/sdk/src/Types/AuditLogsActionsParameterItem.php @@ -0,0 +1,25 @@ + $resourceType Type of resource affected + */ + #[JsonProperty('resource_type')] + public string $resourceType; + + /** + * @var ?string $resourceSubType Subtype of resource affected (e.g., 'session-api-token') + */ + #[JsonProperty('resource_sub_type')] + public ?string $resourceSubType; + + /** + * @var value-of $action Action performed + */ + #[JsonProperty('action')] + public string $action; + + /** + * @var value-of $origin Origin of the request + */ + #[JsonProperty('origin')] + public string $origin; + + /** + * @var string $accountUsername Username that performed the action + */ + #[JsonProperty('account_username')] + public string $accountUsername; + + /** + * @var ?string $ipAddress IP address of the request origin (IPv4 or IPv6). May be masked for internal UpCloud services. + */ + #[JsonProperty('ip_address')] + public ?string $ipAddress; + + /** + * @var ?string $resourceId ID of the affected resource. May be hidden for sensitive resources like auth and account. + */ + #[JsonProperty('resource_id')] + public ?string $resourceId; + + /** + * @var ?array $currentState Current state of the resource after the action (only present for create/update actions). Structure varies by resource_type. + */ + #[JsonProperty('current_state'), ArrayType(['string' => 'mixed'])] + public ?array $currentState; + + /** + * @var ?array $previousState Previous state of the resource before the action (only present for update/delete actions). Structure varies by resource_type. + */ + #[JsonProperty('previous_state'), ArrayType(['string' => 'mixed'])] + public ?array $previousState; + + /** + * @param array{ + * time: DateTime, + * authType: string, + * cloudEventId: string, + * upcloudCorrelationId: string, + * resourceType: value-of, + * action: value-of, + * origin: value-of, + * accountUsername: string, + * resourceSubType?: ?string, + * ipAddress?: ?string, + * resourceId?: ?string, + * currentState?: ?array, + * previousState?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->time = $values['time']; + $this->authType = $values['authType']; + $this->cloudEventId = $values['cloudEventId']; + $this->upcloudCorrelationId = $values['upcloudCorrelationId']; + $this->resourceType = $values['resourceType']; + $this->resourceSubType = $values['resourceSubType'] ?? null; + $this->action = $values['action']; + $this->origin = $values['origin']; + $this->accountUsername = $values['accountUsername']; + $this->ipAddress = $values['ipAddress'] ?? null; + $this->resourceId = $values['resourceId'] ?? null; + $this->currentState = $values['currentState'] ?? null; + $this->previousState = $values['previousState'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AuditLogsAuditLogAction.php b/fern/sdk/src/Types/AuditLogsAuditLogAction.php new file mode 100644 index 00000000..0860ce77 --- /dev/null +++ b/fern/sdk/src/Types/AuditLogsAuditLogAction.php @@ -0,0 +1,25 @@ + $invalidParams + */ + #[JsonProperty('invalid_params'), ArrayType([AuditLogsErrorResponseInvalidParamsItem::class])] + public ?array $invalidParams; + + /** + * @var ?string $correlationId A unique identifier for the request. This identifier is generated by the server and can be used to track the request in the server logs. It is useful for debugging and support purposes. + */ + #[JsonProperty('correlation_id')] + public ?string $correlationId; + + /** + * @param array{ + * type: string, + * title: string, + * status: int, + * detail?: ?string, + * invalidParams?: ?array, + * correlationId?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->title = $values['title']; + $this->detail = $values['detail'] ?? null; + $this->status = $values['status']; + $this->invalidParams = $values['invalidParams'] ?? null; + $this->correlationId = $values['correlationId'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AuditLogsErrorResponseInvalidParamsItem.php b/fern/sdk/src/Types/AuditLogsErrorResponseInvalidParamsItem.php new file mode 100644 index 00000000..381ce480 --- /dev/null +++ b/fern/sdk/src/Types/AuditLogsErrorResponseInvalidParamsItem.php @@ -0,0 +1,42 @@ +name = $values['name']; + $this->reason = $values['reason']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AuditLogsFilterOptionsResponse.php b/fern/sdk/src/Types/AuditLogsFilterOptionsResponse.php new file mode 100644 index 00000000..2bf6a2ba --- /dev/null +++ b/fern/sdk/src/Types/AuditLogsFilterOptionsResponse.php @@ -0,0 +1,54 @@ +> $resourceTypes List of available resource types + */ + #[JsonProperty('resource_types'), ArrayType(['string'])] + public array $resourceTypes; + + /** + * @var array> $actions List of available actions + */ + #[JsonProperty('actions'), ArrayType(['string'])] + public array $actions; + + /** + * @var array> $origins List of available origins + */ + #[JsonProperty('origins'), ArrayType(['string'])] + public array $origins; + + /** + * @param array{ + * resourceTypes: array>, + * actions: array>, + * origins: array>, + * } $values + */ + public function __construct( + array $values, + ) { + $this->resourceTypes = $values['resourceTypes']; + $this->actions = $values['actions']; + $this->origins = $values['origins']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/AuditLogsFilterOptionsResponseActionsItem.php b/fern/sdk/src/Types/AuditLogsFilterOptionsResponseActionsItem.php new file mode 100644 index 00000000..d8933528 --- /dev/null +++ b/fern/sdk/src/Types/AuditLogsFilterOptionsResponseActionsItem.php @@ -0,0 +1,25 @@ + $auditLogs List of audit log events + */ + #[JsonProperty('audit_logs'), ArrayType([AuditLogsAuditLog::class])] + public array $auditLogs; + + /** + * @param array{ + * auditLogs: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->auditLogs = $values['auditLogs']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/CreateServerResponse.php b/fern/sdk/src/Types/CreateServerResponse.php new file mode 100644 index 00000000..26210b4b --- /dev/null +++ b/fern/sdk/src/Types/CreateServerResponse.php @@ -0,0 +1,37 @@ +server = $values['server']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/CreateStorageBackupResponse.php b/fern/sdk/src/Types/CreateStorageBackupResponse.php new file mode 100644 index 00000000..6375a8e5 --- /dev/null +++ b/fern/sdk/src/Types/CreateStorageBackupResponse.php @@ -0,0 +1,37 @@ +storage = $values['storage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/CreateStorageResponse.php b/fern/sdk/src/Types/CreateStorageResponse.php new file mode 100644 index 00000000..5be6dea0 --- /dev/null +++ b/fern/sdk/src/Types/CreateStorageResponse.php @@ -0,0 +1,37 @@ +storage = $values['storage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/CreateStorageTemplateResponse.php b/fern/sdk/src/Types/CreateStorageTemplateResponse.php new file mode 100644 index 00000000..c1db5d9c --- /dev/null +++ b/fern/sdk/src/Types/CreateStorageTemplateResponse.php @@ -0,0 +1,37 @@ +storage = $values['storage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/CurrencyCurrencies.php b/fern/sdk/src/Types/CurrencyCurrencies.php new file mode 100644 index 00000000..b53df5be --- /dev/null +++ b/fern/sdk/src/Types/CurrencyCurrencies.php @@ -0,0 +1,37 @@ +currencies = $values['currencies']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/CurrencyCurrenciesCurrencies.php b/fern/sdk/src/Types/CurrencyCurrenciesCurrencies.php new file mode 100644 index 00000000..fd359fa5 --- /dev/null +++ b/fern/sdk/src/Types/CurrencyCurrenciesCurrencies.php @@ -0,0 +1,38 @@ + $currency List of supported currency rate entries. + */ + #[JsonProperty('currency'), ArrayType([CurrencyCurrenciesCurrenciesCurrencyItem::class])] + public array $currency; + + /** + * @param array{ + * currency: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->currency = $values['currency']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/CurrencyCurrenciesCurrenciesCurrencyItem.php b/fern/sdk/src/Types/CurrencyCurrenciesCurrenciesCurrencyItem.php new file mode 100644 index 00000000..0344b74d --- /dev/null +++ b/fern/sdk/src/Types/CurrencyCurrenciesCurrenciesCurrencyItem.php @@ -0,0 +1,52 @@ +code = $values['code']; + $this->rate = $values['rate']; + $this->updated = $values['updated']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/CurrencyError.php b/fern/sdk/src/Types/CurrencyError.php new file mode 100644 index 00000000..ca8b947a --- /dev/null +++ b/fern/sdk/src/Types/CurrencyError.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/CurrencyErrorError.php b/fern/sdk/src/Types/CurrencyErrorError.php new file mode 100644 index 00000000..64786a60 --- /dev/null +++ b/fern/sdk/src/Types/CurrencyErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseAccessControlSettingsResponse.php b/fern/sdk/src/Types/DatabaseAccessControlSettingsResponse.php new file mode 100644 index 00000000..a05d45ec --- /dev/null +++ b/fern/sdk/src/Types/DatabaseAccessControlSettingsResponse.php @@ -0,0 +1,45 @@ +accessControl = $values['accessControl'] ?? null; + $this->extendedAccessControl = $values['extendedAccessControl'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseAccountCaResponse.php b/fern/sdk/src/Types/DatabaseAccountCaResponse.php new file mode 100644 index 00000000..6d740306 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseAccountCaResponse.php @@ -0,0 +1,37 @@ +certificate = $values['certificate'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseAclResponse.php b/fern/sdk/src/Types/DatabaseAclResponse.php new file mode 100644 index 00000000..b1e79881 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseAclResponse.php @@ -0,0 +1,61 @@ +id = $values['id'] ?? null; + $this->permission = $values['permission'] ?? null; + $this->topic = $values['topic'] ?? null; + $this->username = $values['username'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseAvailableExtensionsResponseItem.php b/fern/sdk/src/Types/DatabaseAvailableExtensionsResponseItem.php new file mode 100644 index 00000000..863fec10 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseAvailableExtensionsResponseItem.php @@ -0,0 +1,51 @@ + $versions List of available versions for this extension + */ + #[JsonProperty('versions'), ArrayType(['string'])] + public array $versions; + + /** + * @param array{ + * defaultVersion: string, + * name: string, + * versions: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->defaultVersion = $values['defaultVersion']; + $this->name = $values['name']; + $this->versions = $values['versions']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseBackupConfigOpenSearchResponse.php b/fern/sdk/src/Types/DatabaseBackupConfigOpenSearchResponse.php new file mode 100644 index 00000000..c24fd46e --- /dev/null +++ b/fern/sdk/src/Types/DatabaseBackupConfigOpenSearchResponse.php @@ -0,0 +1,69 @@ +frequentIntervalMinutes = $values['frequentIntervalMinutes'] ?? null; + $this->frequentOldestAgeMinutes = $values['frequentOldestAgeMinutes'] ?? null; + $this->infrequentIntervalMinutes = $values['infrequentIntervalMinutes'] ?? null; + $this->infrequentOldestAgeMinutes = $values['infrequentOldestAgeMinutes'] ?? null; + $this->recoveryMode = $values['recoveryMode'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseBackupConfigResponse.php b/fern/sdk/src/Types/DatabaseBackupConfigResponse.php new file mode 100644 index 00000000..6d1173fe --- /dev/null +++ b/fern/sdk/src/Types/DatabaseBackupConfigResponse.php @@ -0,0 +1,53 @@ +interval = $values['interval'] ?? null; + $this->maxCount = $values['maxCount'] ?? null; + $this->recoveryMode = $values['recoveryMode'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseBackupResponse.php b/fern/sdk/src/Types/DatabaseBackupResponse.php new file mode 100644 index 00000000..b198aff7 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseBackupResponse.php @@ -0,0 +1,55 @@ +backupName = $values['backupName'] ?? null; + $this->backupTime = $values['backupTime'] ?? null; + $this->dataSize = $values['dataSize'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseConnectionPoolResponse.php b/fern/sdk/src/Types/DatabaseConnectionPoolResponse.php new file mode 100644 index 00000000..7467a1b4 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseConnectionPoolResponse.php @@ -0,0 +1,77 @@ +connectionUri = $values['connectionUri'] ?? null; + $this->database = $values['database'] ?? null; + $this->poolMode = $values['poolMode'] ?? null; + $this->poolName = $values['poolName'] ?? null; + $this->poolSize = $values['poolSize'] ?? null; + $this->username = $values['username'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseCurrentSessionsResponse.php b/fern/sdk/src/Types/DatabaseCurrentSessionsResponse.php new file mode 100644 index 00000000..1b50683a --- /dev/null +++ b/fern/sdk/src/Types/DatabaseCurrentSessionsResponse.php @@ -0,0 +1,62 @@ + $pg + */ + #[JsonProperty('pg'), ArrayType([DatabasePgCurrentSessionResponse::class])] + public ?array $pg; + + /** + * @var ?array $mysql + */ + #[JsonProperty('mysql'), ArrayType([DatabaseMysqlCurrentSessionResponse::class])] + public ?array $mysql; + + /** + * @var ?array $redis + */ + #[JsonProperty('redis'), ArrayType([DatabaseRedisValkeyCurrentSessionResponse::class])] + public ?array $redis; + + /** + * @var ?array $valkey + */ + #[JsonProperty('valkey'), ArrayType([DatabaseRedisValkeyCurrentSessionResponse::class])] + public ?array $valkey; + + /** + * @param array{ + * pg?: ?array, + * mysql?: ?array, + * redis?: ?array, + * valkey?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->pg = $values['pg'] ?? null; + $this->mysql = $values['mysql'] ?? null; + $this->redis = $values['redis'] ?? null; + $this->valkey = $values['valkey'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseDependencyResponse.php b/fern/sdk/src/Types/DatabaseDependencyResponse.php new file mode 100644 index 00000000..fc923db2 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseDependencyResponse.php @@ -0,0 +1,38 @@ + $required List of required properties when this dependency is present + */ + #[JsonProperty('required'), ArrayType(['string'])] + public ?array $required; + + /** + * @param array{ + * required?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->required = $values['required'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseErrorResponse.php b/fern/sdk/src/Types/DatabaseErrorResponse.php new file mode 100644 index 00000000..db3e4e70 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseErrorResponse.php @@ -0,0 +1,37 @@ +error = $values['error'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseErrorResponseError.php b/fern/sdk/src/Types/DatabaseErrorResponseError.php new file mode 100644 index 00000000..67358db7 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseErrorResponseError.php @@ -0,0 +1,42 @@ +errorMessage = $values['errorMessage']; + $this->errorCode = $values['errorCode']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseIndexResponse.php b/fern/sdk/src/Types/DatabaseIndexResponse.php new file mode 100644 index 00000000..713931e3 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseIndexResponse.php @@ -0,0 +1,103 @@ +createTime = $values['createTime'] ?? null; + $this->docs = $values['docs'] ?? null; + $this->health = $values['health'] ?? null; + $this->indexName = $values['indexName'] ?? null; + $this->numberOfReplicas = $values['numberOfReplicas'] ?? null; + $this->numberOfShards = $values['numberOfShards'] ?? null; + $this->readOnlyAllowDelete = $values['readOnlyAllowDelete'] ?? null; + $this->size = $values['size'] ?? null; + $this->status = $values['status'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseIntegrationEndpoint.php b/fern/sdk/src/Types/DatabaseIntegrationEndpoint.php new file mode 100644 index 00000000..103a8dd8 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseIntegrationEndpoint.php @@ -0,0 +1,10 @@ + $properties A key-value map of properties specific to the integration endpoint type. + */ + #[JsonProperty('properties'), ArrayType(['string' => 'mixed'])] + public ?array $properties; + + /** + * @param array{ + * uuid?: ?string, + * name?: ?string, + * type?: ?string, + * properties?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->uuid = $values['uuid'] ?? null; + $this->name = $values['name'] ?? null; + $this->type = $values['type'] ?? null; + $this->properties = $values['properties'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseIntegrationNodeStateResponse.php b/fern/sdk/src/Types/DatabaseIntegrationNodeStateResponse.php new file mode 100644 index 00000000..413465e2 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseIntegrationNodeStateResponse.php @@ -0,0 +1,62 @@ + $errors A list of errors encountered by the node + */ + #[JsonProperty('errors'), ArrayType(['mixed'])] + public ?array $errors; + + /** + * @var ?string $likelyErrorCause The likely cause of the error + */ + #[JsonProperty('likely_error_cause')] + public ?string $likelyErrorCause; + + /** + * @param array{ + * name?: ?string, + * status?: ?string, + * errors?: ?array, + * likelyErrorCause?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->status = $values['status'] ?? null; + $this->errors = $values['errors'] ?? null; + $this->likelyErrorCause = $values['likelyErrorCause'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseLabelCreate.php b/fern/sdk/src/Types/DatabaseLabelCreate.php new file mode 100644 index 00000000..b3ea606b --- /dev/null +++ b/fern/sdk/src/Types/DatabaseLabelCreate.php @@ -0,0 +1,45 @@ +key = $values['key']; + $this->value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseLabelInformationResponse.php b/fern/sdk/src/Types/DatabaseLabelInformationResponse.php new file mode 100644 index 00000000..4e507199 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseLabelInformationResponse.php @@ -0,0 +1,45 @@ +key = $values['key'] ?? null; + $this->value = $values['value'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseLabelResponse.php b/fern/sdk/src/Types/DatabaseLabelResponse.php new file mode 100644 index 00000000..c7fc4fcc --- /dev/null +++ b/fern/sdk/src/Types/DatabaseLabelResponse.php @@ -0,0 +1,45 @@ +key = $values['key'] ?? null; + $this->value = $values['value'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseLogEntryResponse.php b/fern/sdk/src/Types/DatabaseLogEntryResponse.php new file mode 100644 index 00000000..fe5946bb --- /dev/null +++ b/fern/sdk/src/Types/DatabaseLogEntryResponse.php @@ -0,0 +1,63 @@ +hostname = $values['hostname'] ?? null; + $this->msg = $values['msg'] ?? null; + $this->time = $values['time'] ?? null; + $this->service = $values['service'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseLogListResponse.php b/fern/sdk/src/Types/DatabaseLogListResponse.php new file mode 100644 index 00000000..edbba32f --- /dev/null +++ b/fern/sdk/src/Types/DatabaseLogListResponse.php @@ -0,0 +1,54 @@ + $logs Array of log entries from UpCloud services. + */ + #[JsonProperty('logs'), ArrayType([DatabaseLogEntryResponse::class])] + public ?array $logs; + + /** + * @param array{ + * firstLogOffset?: ?string, + * offset?: ?string, + * logs?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->firstLogOffset = $values['firstLogOffset'] ?? null; + $this->offset = $values['offset'] ?? null; + $this->logs = $values['logs'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseMaintenanceDow.php b/fern/sdk/src/Types/DatabaseMaintenanceDow.php new file mode 100644 index 00000000..17ff4a56 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseMaintenanceDow.php @@ -0,0 +1,14 @@ +deadline = $values['deadline'] ?? null; + $this->description = $values['description'] ?? null; + $this->startAfter = $values['startAfter'] ?? null; + $this->startAt = $values['startAt'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseMaintenanceWindowResponse.php b/fern/sdk/src/Types/DatabaseMaintenanceWindowResponse.php new file mode 100644 index 00000000..2cd81f35 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseMaintenanceWindowResponse.php @@ -0,0 +1,54 @@ + $pendingUpdates List of updates pending during this maintenance window. + */ + #[JsonProperty('pending_updates'), ArrayType([DatabaseMaintenancePendingUpdatesResponse::class])] + public ?array $pendingUpdates; + + /** + * @param array{ + * dow?: ?string, + * time?: ?string, + * pendingUpdates?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->dow = $values['dow'] ?? null; + $this->time = $values['time'] ?? null; + $this->pendingUpdates = $values['pendingUpdates'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseMetricsColumnHeaderResponse.php b/fern/sdk/src/Types/DatabaseMetricsColumnHeaderResponse.php new file mode 100644 index 00000000..df4f445b --- /dev/null +++ b/fern/sdk/src/Types/DatabaseMetricsColumnHeaderResponse.php @@ -0,0 +1,45 @@ +label = $values['label'] ?? null; + $this->type = $values['type'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseMetricsDataResponse.php b/fern/sdk/src/Types/DatabaseMetricsDataResponse.php new file mode 100644 index 00000000..b934fcb0 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseMetricsDataResponse.php @@ -0,0 +1,46 @@ + $cols + */ + #[JsonProperty('cols'), ArrayType([DatabaseMetricsColumnHeaderResponse::class])] + public ?array $cols; + + /** + * @var ?array> $rows + */ + #[JsonProperty('rows'), ArrayType([['mixed']])] + public ?array $rows; + + /** + * @param array{ + * cols?: ?array, + * rows?: ?array>, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->cols = $values['cols'] ?? null; + $this->rows = $values['rows'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseMetricsItemResponse.php b/fern/sdk/src/Types/DatabaseMetricsItemResponse.php new file mode 100644 index 00000000..11957f59 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseMetricsItemResponse.php @@ -0,0 +1,45 @@ +data = $values['data'] ?? null; + $this->hints = $values['hints'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseMetricsItemResponseHints.php b/fern/sdk/src/Types/DatabaseMetricsItemResponseHints.php new file mode 100644 index 00000000..8b1aeed0 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseMetricsItemResponseHints.php @@ -0,0 +1,37 @@ +title = $values['title'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseMigrationStatusDetailsResponse.php b/fern/sdk/src/Types/DatabaseMigrationStatusDetailsResponse.php new file mode 100644 index 00000000..18a86832 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseMigrationStatusDetailsResponse.php @@ -0,0 +1,61 @@ +error = $values['error'] ?? null; + $this->dbname = $values['dbname'] ?? null; + $this->method = $values['method'] ?? null; + $this->status = $values['status'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseMysqlCurrentSessionResponse.php b/fern/sdk/src/Types/DatabaseMysqlCurrentSessionResponse.php new file mode 100644 index 00000000..e910b0e3 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseMysqlCurrentSessionResponse.php @@ -0,0 +1,93 @@ +applicationName = $values['applicationName'] ?? null; + $this->clientAddr = $values['clientAddr'] ?? null; + $this->datname = $values['datname'] ?? null; + $this->id = $values['id'] ?? null; + $this->query = $values['query'] ?? null; + $this->queryDuration = $values['queryDuration'] ?? null; + $this->state = $values['state'] ?? null; + $this->usename = $values['usename'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseNetworkCreate.php b/fern/sdk/src/Types/DatabaseNetworkCreate.php new file mode 100644 index 00000000..3c55717b --- /dev/null +++ b/fern/sdk/src/Types/DatabaseNetworkCreate.php @@ -0,0 +1,61 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var value-of $family + */ + #[JsonProperty('family')] + public string $family; + + /** + * @param array{ + * name: string, + * type: value-of, + * family: value-of, + * uuid?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->uuid = $values['uuid'] ?? null; + $this->name = $values['name']; + $this->type = $values['type']; + $this->family = $values['family']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseNetworkFamily.php b/fern/sdk/src/Types/DatabaseNetworkFamily.php new file mode 100644 index 00000000..b1b77109 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseNetworkFamily.php @@ -0,0 +1,9 @@ + $family Address family (e.g., IPv4, IPv6) + */ + #[JsonProperty('family')] + public ?string $family; + + /** + * @var ?value-of $type Type of network (e.g., private, public) + */ + #[JsonProperty('type')] + public ?string $type; + + /** + * @var ?DateTime $createTime Timestamp when the network was created + */ + #[JsonProperty('create_time'), Date(Date::TYPE_DATETIME)] + public ?DateTime $createTime; + + /** + * @var ?DateTime $updateTime Timestamp when the network was last updated + */ + #[JsonProperty('update_time'), Date(Date::TYPE_DATETIME)] + public ?DateTime $updateTime; + + /** + * @param array{ + * uuid?: ?string, + * name?: ?string, + * family?: ?value-of, + * type?: ?value-of, + * createTime?: ?DateTime, + * updateTime?: ?DateTime, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->uuid = $values['uuid'] ?? null; + $this->name = $values['name'] ?? null; + $this->family = $values['family'] ?? null; + $this->type = $values['type'] ?? null; + $this->createTime = $values['createTime'] ?? null; + $this->updateTime = $values['updateTime'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseNetworkInformationDetailsResponseFamily.php b/fern/sdk/src/Types/DatabaseNetworkInformationDetailsResponseFamily.php new file mode 100644 index 00000000..6197dc13 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseNetworkInformationDetailsResponseFamily.php @@ -0,0 +1,9 @@ +completed = $values['completed'] ?? null; + $this->current = $values['current'] ?? null; + $this->max = $values['max'] ?? null; + $this->min = $values['min'] ?? null; + $this->phase = $values['phase'] ?? null; + $this->unit = $values['unit'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseNodeStateResponse.php b/fern/sdk/src/Types/DatabaseNodeStateResponse.php new file mode 100644 index 00000000..4195f5b5 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseNodeStateResponse.php @@ -0,0 +1,62 @@ + $progressUpdates + */ + #[JsonProperty('progress_updates'), ArrayType([DatabaseNodeProgressUpdateResponse::class])] + public ?array $progressUpdates; + + /** + * @param array{ + * name?: ?string, + * role?: ?string, + * state?: ?string, + * progressUpdates?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->role = $values['role'] ?? null; + $this->state = $values['state'] ?? null; + $this->progressUpdates = $values['progressUpdates'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseOpenSearchAccessControlResponse.php b/fern/sdk/src/Types/DatabaseOpenSearchAccessControlResponse.php new file mode 100644 index 00000000..292e7a78 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseOpenSearchAccessControlResponse.php @@ -0,0 +1,38 @@ + $rules + */ + #[JsonProperty('rules'), ArrayType([DatabaseOpenSearchAccessControlRuleResponse::class])] + public ?array $rules; + + /** + * @param array{ + * rules?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->rules = $values['rules'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseOpenSearchAccessControlRuleResponse.php b/fern/sdk/src/Types/DatabaseOpenSearchAccessControlRuleResponse.php new file mode 100644 index 00000000..b563d8f0 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseOpenSearchAccessControlRuleResponse.php @@ -0,0 +1,45 @@ +index = $values['index'] ?? null; + $this->permission = $values['permission'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseOpenSearchSecurityPluginStatusResponse.php b/fern/sdk/src/Types/DatabaseOpenSearchSecurityPluginStatusResponse.php new file mode 100644 index 00000000..58b82ffe --- /dev/null +++ b/fern/sdk/src/Types/DatabaseOpenSearchSecurityPluginStatusResponse.php @@ -0,0 +1,53 @@ +securityPluginAdminEnabled = $values['securityPluginAdminEnabled'] ?? null; + $this->securityPluginAvailable = $values['securityPluginAvailable'] ?? null; + $this->securityPluginEnabled = $values['securityPluginEnabled'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePeeringStatusResponse.php b/fern/sdk/src/Types/DatabasePeeringStatusResponse.php new file mode 100644 index 00000000..605bac2d --- /dev/null +++ b/fern/sdk/src/Types/DatabasePeeringStatusResponse.php @@ -0,0 +1,71 @@ +createTime = $values['createTime'] ?? null; + $this->updateTime = $values['updateTime'] ?? null; + $this->networkPeer = $values['networkPeer'] ?? null; + $this->state = $values['state'] ?? null; + $this->stateInfo = $values['stateInfo'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePgAccessControlResponse.php b/fern/sdk/src/Types/DatabasePgAccessControlResponse.php new file mode 100644 index 00000000..0da1f9c8 --- /dev/null +++ b/fern/sdk/src/Types/DatabasePgAccessControlResponse.php @@ -0,0 +1,37 @@ +allowReplication = $values['allowReplication'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePgAvailableExtensionsResponseItem.php b/fern/sdk/src/Types/DatabasePgAvailableExtensionsResponseItem.php new file mode 100644 index 00000000..5a15da0f --- /dev/null +++ b/fern/sdk/src/Types/DatabasePgAvailableExtensionsResponseItem.php @@ -0,0 +1,43 @@ + $extensions List of available extensions for this PostgreSQL version + */ + #[JsonProperty('extensions'), ArrayType([DatabasePgAvailableExtensionsResponseItemExtensionsItem::class])] + public array $extensions; + + /** + * @param array{ + * version: string, + * extensions: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->version = $values['version']; + $this->extensions = $values['extensions']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePgAvailableExtensionsResponseItemExtensionsItem.php b/fern/sdk/src/Types/DatabasePgAvailableExtensionsResponseItemExtensionsItem.php new file mode 100644 index 00000000..6f4e8542 --- /dev/null +++ b/fern/sdk/src/Types/DatabasePgAvailableExtensionsResponseItemExtensionsItem.php @@ -0,0 +1,51 @@ + $versions List of available versions for this extension + */ + #[JsonProperty('versions'), ArrayType(['string'])] + public array $versions; + + /** + * @param array{ + * defaultVersion: string, + * name: string, + * versions: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->defaultVersion = $values['defaultVersion']; + $this->name = $values['name']; + $this->versions = $values['versions']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePgCurrentSessionResponse.php b/fern/sdk/src/Types/DatabasePgCurrentSessionResponse.php new file mode 100644 index 00000000..7253d6bc --- /dev/null +++ b/fern/sdk/src/Types/DatabasePgCurrentSessionResponse.php @@ -0,0 +1,199 @@ +applicationName = $values['applicationName'] ?? null; + $this->backendStart = $values['backendStart'] ?? null; + $this->backendType = $values['backendType'] ?? null; + $this->backendXid = $values['backendXid'] ?? null; + $this->backendXmin = $values['backendXmin'] ?? null; + $this->clientAddr = $values['clientAddr'] ?? null; + $this->clientHostname = $values['clientHostname'] ?? null; + $this->clientPort = $values['clientPort'] ?? null; + $this->datid = $values['datid'] ?? null; + $this->datname = $values['datname'] ?? null; + $this->id = $values['id'] ?? null; + $this->query = $values['query'] ?? null; + $this->queryDuration = $values['queryDuration'] ?? null; + $this->queryStart = $values['queryStart'] ?? null; + $this->state = $values['state'] ?? null; + $this->stateChange = $values['stateChange'] ?? null; + $this->usename = $values['usename'] ?? null; + $this->usesysid = $values['usesysid'] ?? null; + $this->waitEvent = $values['waitEvent'] ?? null; + $this->waitEventType = $values['waitEventType'] ?? null; + $this->xactStart = $values['xactStart'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePlanComponentsResponse.php b/fern/sdk/src/Types/DatabasePlanComponentsResponse.php new file mode 100644 index 00000000..d33a96c9 --- /dev/null +++ b/fern/sdk/src/Types/DatabasePlanComponentsResponse.php @@ -0,0 +1,53 @@ +compute = $values['compute'] ?? null; + $this->storage = $values['storage'] ?? null; + $this->backups = $values['backups'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePlanComponentsResponseBackups.php b/fern/sdk/src/Types/DatabasePlanComponentsResponseBackups.php new file mode 100644 index 00000000..1801d602 --- /dev/null +++ b/fern/sdk/src/Types/DatabasePlanComponentsResponseBackups.php @@ -0,0 +1,61 @@ + $name Backup tier name for tiered plans. Omitted when the plan retention does not map to a named tier. + */ + #[JsonProperty('name')] + public ?string $name; + + /** + * @var ?int $retentionDays Backup retention in days + */ + #[JsonProperty('retention_days')] + public ?int $retentionDays; + + /** + * @var ?DatabasePlanComponentsResponseBackupsFrequent $frequent Frequent backup window, OpenSearch only + */ + #[JsonProperty('frequent')] + public ?DatabasePlanComponentsResponseBackupsFrequent $frequent; + + /** + * @var ?DatabasePlanComponentsResponseBackupsInfrequent $infrequent Infrequent backup window, OpenSearch only + */ + #[JsonProperty('infrequent')] + public ?DatabasePlanComponentsResponseBackupsInfrequent $infrequent; + + /** + * @param array{ + * name?: ?value-of, + * retentionDays?: ?int, + * frequent?: ?DatabasePlanComponentsResponseBackupsFrequent, + * infrequent?: ?DatabasePlanComponentsResponseBackupsInfrequent, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->retentionDays = $values['retentionDays'] ?? null; + $this->frequent = $values['frequent'] ?? null; + $this->infrequent = $values['infrequent'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePlanComponentsResponseBackupsFrequent.php b/fern/sdk/src/Types/DatabasePlanComponentsResponseBackupsFrequent.php new file mode 100644 index 00000000..1e559a67 --- /dev/null +++ b/fern/sdk/src/Types/DatabasePlanComponentsResponseBackupsFrequent.php @@ -0,0 +1,45 @@ +intervalMinutes = $values['intervalMinutes'] ?? null; + $this->retentionDays = $values['retentionDays'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePlanComponentsResponseBackupsInfrequent.php b/fern/sdk/src/Types/DatabasePlanComponentsResponseBackupsInfrequent.php new file mode 100644 index 00000000..db8a466f --- /dev/null +++ b/fern/sdk/src/Types/DatabasePlanComponentsResponseBackupsInfrequent.php @@ -0,0 +1,45 @@ +intervalMinutes = $values['intervalMinutes'] ?? null; + $this->retentionDays = $values['retentionDays'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePlanComponentsResponseBackupsName.php b/fern/sdk/src/Types/DatabasePlanComponentsResponseBackupsName.php new file mode 100644 index 00000000..c7d98b34 --- /dev/null +++ b/fern/sdk/src/Types/DatabasePlanComponentsResponseBackupsName.php @@ -0,0 +1,10 @@ + $family Compute family for tiered plans. Omitted for classic plans. + */ + #[JsonProperty('family')] + public ?string $family; + + /** + * @var ?int $nodeCount Number of nodes + */ + #[JsonProperty('node_count')] + public ?int $nodeCount; + + /** + * @var ?int $cpu CPU cores per node + */ + #[JsonProperty('cpu')] + public ?int $cpu; + + /** + * @var ?int $memoryGb Memory per node in GB + */ + #[JsonProperty('memory_gb')] + public ?int $memoryGb; + + /** + * @param array{ + * name?: ?string, + * family?: ?value-of, + * nodeCount?: ?int, + * cpu?: ?int, + * memoryGb?: ?int, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->family = $values['family'] ?? null; + $this->nodeCount = $values['nodeCount'] ?? null; + $this->cpu = $values['cpu'] ?? null; + $this->memoryGb = $values['memoryGb'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePlanComponentsResponseComputeFamily.php b/fern/sdk/src/Types/DatabasePlanComponentsResponseComputeFamily.php new file mode 100644 index 00000000..ba675bfe --- /dev/null +++ b/fern/sdk/src/Types/DatabasePlanComponentsResponseComputeFamily.php @@ -0,0 +1,10 @@ +includedGib = $values['includedGib'] ?? null; + $this->dynamicStorageSupported = $values['dynamicStorageSupported'] ?? null; + $this->additionalGib = $values['additionalGib'] ?? null; + $this->totalGib = $values['totalGib'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePlansResponse.php b/fern/sdk/src/Types/DatabasePlansResponse.php new file mode 100644 index 00000000..c131b6a5 --- /dev/null +++ b/fern/sdk/src/Types/DatabasePlansResponse.php @@ -0,0 +1,38 @@ + $serviceTypes Available service types that offer componentised plans. + */ + #[JsonProperty('service_types'), ArrayType([DatabasePlansResponseServiceTypesItem::class])] + public array $serviceTypes; + + /** + * @param array{ + * serviceTypes: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->serviceTypes = $values['serviceTypes']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePlansResponseServiceTypesItem.php b/fern/sdk/src/Types/DatabasePlansResponseServiceTypesItem.php new file mode 100644 index 00000000..ab4dd793 --- /dev/null +++ b/fern/sdk/src/Types/DatabasePlansResponseServiceTypesItem.php @@ -0,0 +1,83 @@ + $type Service type identifier. + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?string $latestVersion Latest available major version for this service type. Omitted when not applicable. + */ + #[JsonProperty('latest_version')] + public ?string $latestVersion; + + /** + * @var bool $componentised Always true for entries in this response; kept as an explicit indicator of componentised plans. + */ + #[JsonProperty('componentised')] + public bool $componentised; + + /** + * @var array $zones Zones where this service type is available. + */ + #[JsonProperty('zones'), ArrayType(['string'])] + public array $zones; + + /** + * @var ?array> $backupTiers Backup tiers offered across this service type's plans. Omitted when the service type exposes no named backup tiers. + */ + #[JsonProperty('backup_tiers'), ArrayType(['string'])] + public ?array $backupTiers; + + /** + * @var array $nodeCounts Distinct node counts offered across this service type's plans. + */ + #[JsonProperty('node_counts'), ArrayType(['integer'])] + public array $nodeCounts; + + /** + * @var array $computeShapes Distinct compute shapes offered for this service type. + */ + #[JsonProperty('compute_shapes'), ArrayType([DatabasePlansResponseServiceTypesItemComputeShapesItem::class])] + public array $computeShapes; + + /** + * @param array{ + * type: value-of, + * componentised: bool, + * zones: array, + * nodeCounts: array, + * computeShapes: array, + * latestVersion?: ?string, + * backupTiers?: ?array>, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->latestVersion = $values['latestVersion'] ?? null; + $this->componentised = $values['componentised']; + $this->zones = $values['zones']; + $this->backupTiers = $values['backupTiers'] ?? null; + $this->nodeCounts = $values['nodeCounts']; + $this->computeShapes = $values['computeShapes']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemBackupTiersItem.php b/fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemBackupTiersItem.php new file mode 100644 index 00000000..83945836 --- /dev/null +++ b/fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemBackupTiersItem.php @@ -0,0 +1,10 @@ + $family Compute family. + */ + #[JsonProperty('family')] + public string $family; + + /** + * @var int $cpu CPU cores per node. + */ + #[JsonProperty('cpu')] + public int $cpu; + + /** + * @var int $memoryGb Memory per node in GB. + */ + #[JsonProperty('memory_gb')] + public int $memoryGb; + + /** + * @var bool $dynamicStorageSupported Whether the storage total can be scaled beyond the base storage via dynamic storage. + */ + #[JsonProperty('dynamic_storage_supported')] + public bool $dynamicStorageSupported; + + /** + * @var array $nodeCounts Node counts available for this compute shape. + */ + #[JsonProperty('node_counts'), ArrayType(['integer'])] + public array $nodeCounts; + + /** + * @var ?array> $backups Backup tiers available for this compute shape. Omitted when the shape exposes no named backup tiers. + */ + #[JsonProperty('backups'), ArrayType(['string'])] + public ?array $backups; + + /** + * @var ?DatabasePlansResponseServiceTypesItemComputeShapesItemStorage $storage Storage choices for this compute shape: the distinct base sizes with the total each scales to, plus the shared dynamic-storage rules. Null for shapes without customer storage. + */ + #[JsonProperty('storage')] + public ?DatabasePlansResponseServiceTypesItemComputeShapesItemStorage $storage; + + /** + * @param array{ + * compute: string, + * family: value-of, + * cpu: int, + * memoryGb: int, + * dynamicStorageSupported: bool, + * nodeCounts: array, + * backups?: ?array>, + * storage?: ?DatabasePlansResponseServiceTypesItemComputeShapesItemStorage, + * } $values + */ + public function __construct( + array $values, + ) { + $this->compute = $values['compute']; + $this->family = $values['family']; + $this->cpu = $values['cpu']; + $this->memoryGb = $values['memoryGb']; + $this->dynamicStorageSupported = $values['dynamicStorageSupported']; + $this->nodeCounts = $values['nodeCounts']; + $this->backups = $values['backups'] ?? null; + $this->storage = $values['storage'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemComputeShapesItemBackupsItem.php b/fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemComputeShapesItemBackupsItem.php new file mode 100644 index 00000000..1ab389f6 --- /dev/null +++ b/fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemComputeShapesItemBackupsItem.php @@ -0,0 +1,10 @@ + $options Base-storage options offered for this compute shape. + */ + #[JsonProperty('options'), ArrayType([DatabasePlansResponseServiceTypesItemComputeShapesItemStorageOptionsItem::class])] + public array $options; + + /** + * @param array{ + * stepGib: int, + * dynamicMaxMultiplier: int, + * options: array, + * totalCapGib?: ?int, + * } $values + */ + public function __construct( + array $values, + ) { + $this->stepGib = $values['stepGib']; + $this->dynamicMaxMultiplier = $values['dynamicMaxMultiplier']; + $this->totalCapGib = $values['totalCapGib'] ?? null; + $this->options = $values['options']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemComputeShapesItemStorageOptionsItem.php b/fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemComputeShapesItemStorageOptionsItem.php new file mode 100644 index 00000000..f894b4c8 --- /dev/null +++ b/fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemComputeShapesItemStorageOptionsItem.php @@ -0,0 +1,42 @@ +baseGib = $values['baseGib']; + $this->maxGib = $values['maxGib']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemType.php b/fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemType.php new file mode 100644 index 00000000..6520f2e2 --- /dev/null +++ b/fern/sdk/src/Types/DatabasePlansResponseServiceTypesItemType.php @@ -0,0 +1,9 @@ +createTime = $values['createTime'] ?? null; + $this->event = $values['event'] ?? null; + $this->uuid = $values['uuid'] ?? null; + $this->title = $values['title'] ?? null; + $this->serviceType = $values['serviceType'] ?? null; + $this->severity = $values['severity'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabasePropertySchemaResponse.php b/fern/sdk/src/Types/DatabasePropertySchemaResponse.php new file mode 100644 index 00000000..63d94c3c --- /dev/null +++ b/fern/sdk/src/Types/DatabasePropertySchemaResponse.php @@ -0,0 +1,198 @@ + $default Any valid JSON value is allowed here + */ + #[JsonProperty('default'), ArrayType(['string' => 'mixed'])] + public ?array $default; + + /** + * @var ?array $example Any valid JSON value is allowed here + */ + #[JsonProperty('example'), ArrayType(['string' => 'mixed'])] + public ?array $example; + + /** + * @var ?int $maxLength Maximum length for the property schema + */ + #[JsonProperty('maxLength')] + public ?int $maxLength; + + /** + * @var ?int $minLength Minimum length for the property schema + */ + #[JsonProperty('minLength')] + public ?int $minLength; + + /** + * @var ?string $pattern Allowed patterns for the property + */ + #[JsonProperty('pattern')] + public ?string $pattern; + + /** + * @var ?string $title Human-readable title for the property + */ + #[JsonProperty('title')] + public ?string $title; + + /** + * @var ?string $type Data type of the property + */ + #[JsonProperty('type')] + public ?string $type; + + /** + * @var ?string $userError User-friendly error message + */ + #[JsonProperty('user_error')] + public ?string $userError; + + /** + * @var ?DatabasePropertySchemaResponse $items + */ + #[JsonProperty('items')] + public ?DatabasePropertySchemaResponse $items; + + /** + * @var ?array $properties Properties for object type + */ + #[JsonProperty('properties'), ArrayType(['string' => DatabasePropertySchemaResponse::class])] + public ?array $properties; + + /** + * @var ?array $dependencies Property dependency collection + */ + #[JsonProperty('dependencies'), ArrayType(['string' => DatabaseDependencyResponse::class])] + public ?array $dependencies; + + /** + * @var ?array $required List of required properties + */ + #[JsonProperty('required'), ArrayType(['string'])] + public ?array $required; + + /** + * @var ?int $maxItems Maximum number of items for arrays + */ + #[JsonProperty('maxItems')] + public ?int $maxItems; + + /** + * @var ?string $description Description of the property + */ + #[JsonProperty('description')] + public ?string $description; + + /** + * @var ?array> $minimum Minimum values for numeric properties + */ + #[JsonProperty('minimum'), ArrayType([['string' => 'mixed']])] + public ?array $minimum; + + /** + * @var ?array> $maximum Maximum values for numeric properties + */ + #[JsonProperty('maximum'), ArrayType([['string' => 'mixed']])] + public ?array $maximum; + + /** + * @var ?array $enum Enumeration of allowed values + */ + #[JsonProperty('enum'), ArrayType(['mixed'])] + public ?array $enum; + + /** + * @var ?bool $additionalProperties Whether additional properties are allowed + */ + #[JsonProperty('additionalProperties')] + public ?bool $additionalProperties; + + /** + * @param array{ + * schema?: ?string, + * id?: ?string, + * createOnly?: ?bool, + * default?: ?array, + * example?: ?array, + * maxLength?: ?int, + * minLength?: ?int, + * pattern?: ?string, + * title?: ?string, + * type?: ?string, + * userError?: ?string, + * items?: ?DatabasePropertySchemaResponse, + * properties?: ?array, + * dependencies?: ?array, + * required?: ?array, + * maxItems?: ?int, + * description?: ?string, + * minimum?: ?array>, + * maximum?: ?array>, + * enum?: ?array, + * additionalProperties?: ?bool, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->schema = $values['schema'] ?? null; + $this->id = $values['id'] ?? null; + $this->createOnly = $values['createOnly'] ?? null; + $this->default = $values['default'] ?? null; + $this->example = $values['example'] ?? null; + $this->maxLength = $values['maxLength'] ?? null; + $this->minLength = $values['minLength'] ?? null; + $this->pattern = $values['pattern'] ?? null; + $this->title = $values['title'] ?? null; + $this->type = $values['type'] ?? null; + $this->userError = $values['userError'] ?? null; + $this->items = $values['items'] ?? null; + $this->properties = $values['properties'] ?? null; + $this->dependencies = $values['dependencies'] ?? null; + $this->required = $values['required'] ?? null; + $this->maxItems = $values['maxItems'] ?? null; + $this->description = $values['description'] ?? null; + $this->minimum = $values['minimum'] ?? null; + $this->maximum = $values['maximum'] ?? null; + $this->enum = $values['enum'] ?? null; + $this->additionalProperties = $values['additionalProperties'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseQueryParamSort.php b/fern/sdk/src/Types/DatabaseQueryParamSort.php new file mode 100644 index 00000000..1a323375 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseQueryParamSort.php @@ -0,0 +1,11 @@ +avgTimerWait = $values['avgTimerWait'] ?? null; + $this->countStar = $values['countStar'] ?? null; + $this->digest = $values['digest'] ?? null; + $this->digestText = $values['digestText'] ?? null; + $this->firstSeen = $values['firstSeen'] ?? null; + $this->lastSeen = $values['lastSeen'] ?? null; + $this->maxTimerWait = $values['maxTimerWait'] ?? null; + $this->minTimerWait = $values['minTimerWait'] ?? null; + $this->quantile95 = $values['quantile95'] ?? null; + $this->quantile99 = $values['quantile99'] ?? null; + $this->quantile999 = $values['quantile999'] ?? null; + $this->querySampleSeen = $values['querySampleSeen'] ?? null; + $this->querySampleText = $values['querySampleText'] ?? null; + $this->querySampleTimerWait = $values['querySampleTimerWait'] ?? null; + $this->schemaName = $values['schemaName'] ?? null; + $this->sumCreatedTmpDiskTables = $values['sumCreatedTmpDiskTables'] ?? null; + $this->sumCreatedTmpTables = $values['sumCreatedTmpTables'] ?? null; + $this->sumErrors = $values['sumErrors'] ?? null; + $this->sumLockTime = $values['sumLockTime'] ?? null; + $this->sumNoGoodIndexUsed = $values['sumNoGoodIndexUsed'] ?? null; + $this->sumNoIndexUsed = $values['sumNoIndexUsed'] ?? null; + $this->sumRowsAffected = $values['sumRowsAffected'] ?? null; + $this->sumRowsExamined = $values['sumRowsExamined'] ?? null; + $this->sumRowsSent = $values['sumRowsSent'] ?? null; + $this->sumSelectFullJoin = $values['sumSelectFullJoin'] ?? null; + $this->sumSelectFullRangeJoin = $values['sumSelectFullRangeJoin'] ?? null; + $this->sumSelectRange = $values['sumSelectRange'] ?? null; + $this->sumSelectRangeCheck = $values['sumSelectRangeCheck'] ?? null; + $this->sumSelectScan = $values['sumSelectScan'] ?? null; + $this->sumSortMergePasses = $values['sumSortMergePasses'] ?? null; + $this->sumSortRange = $values['sumSortRange'] ?? null; + $this->sumSortRows = $values['sumSortRows'] ?? null; + $this->sumSortScan = $values['sumSortScan'] ?? null; + $this->sumTimerWait = $values['sumTimerWait'] ?? null; + $this->sumWarnings = $values['sumWarnings'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseQueryStatisticsPgResponse.php b/fern/sdk/src/Types/DatabaseQueryStatisticsPgResponse.php new file mode 100644 index 00000000..54ecaa0b --- /dev/null +++ b/fern/sdk/src/Types/DatabaseQueryStatisticsPgResponse.php @@ -0,0 +1,205 @@ +blkReadTime = $values['blkReadTime'] ?? null; + $this->blkWriteTime = $values['blkWriteTime'] ?? null; + $this->calls = $values['calls'] ?? null; + $this->databaseName = $values['databaseName'] ?? null; + $this->localBlksDirtied = $values['localBlksDirtied'] ?? null; + $this->localBlksHit = $values['localBlksHit'] ?? null; + $this->localBlksRead = $values['localBlksRead'] ?? null; + $this->localBlksWritten = $values['localBlksWritten'] ?? null; + $this->maxTime = $values['maxTime'] ?? null; + $this->meanTime = $values['meanTime'] ?? null; + $this->minTime = $values['minTime'] ?? null; + $this->query = $values['query'] ?? null; + $this->rows = $values['rows'] ?? null; + $this->sharedBlksDirtied = $values['sharedBlksDirtied'] ?? null; + $this->sharedBlksHit = $values['sharedBlksHit'] ?? null; + $this->sharedBlksRead = $values['sharedBlksRead'] ?? null; + $this->sharedBlksWritten = $values['sharedBlksWritten'] ?? null; + $this->stddevTime = $values['stddevTime'] ?? null; + $this->tempBlksRead = $values['tempBlksRead'] ?? null; + $this->tempBlksWritten = $values['tempBlksWritten'] ?? null; + $this->totalTime = $values['totalTime'] ?? null; + $this->userName = $values['userName'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseQueryStatisticsResponse.php b/fern/sdk/src/Types/DatabaseQueryStatisticsResponse.php new file mode 100644 index 00000000..9c9018b9 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseQueryStatisticsResponse.php @@ -0,0 +1,46 @@ + $mysql + */ + #[JsonProperty('mysql'), ArrayType([DatabaseQueryStatisticsMysqlResponse::class])] + public ?array $mysql; + + /** + * @var ?array $pg + */ + #[JsonProperty('pg'), ArrayType([DatabaseQueryStatisticsPgResponse::class])] + public ?array $pg; + + /** + * @param array{ + * mysql?: ?array, + * pg?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->mysql = $values['mysql'] ?? null; + $this->pg = $values['pg'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseRedisAccessControlResponse.php b/fern/sdk/src/Types/DatabaseRedisAccessControlResponse.php new file mode 100644 index 00000000..514d8618 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseRedisAccessControlResponse.php @@ -0,0 +1,62 @@ + $categories List of command categories the user has access to. + */ + #[JsonProperty('categories'), ArrayType(['string'])] + public ?array $categories; + + /** + * @var ?array $channels List of Pub/Sub channels the user has access to. + */ + #[JsonProperty('channels'), ArrayType(['string'])] + public ?array $channels; + + /** + * @var ?array $commands List of specific commands the user has access to. + */ + #[JsonProperty('commands'), ArrayType(['string'])] + public ?array $commands; + + /** + * @var ?array $keys List of key patterns the user has access to. + */ + #[JsonProperty('keys'), ArrayType(['string'])] + public ?array $keys; + + /** + * @param array{ + * categories?: ?array, + * channels?: ?array, + * commands?: ?array, + * keys?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->categories = $values['categories'] ?? null; + $this->channels = $values['channels'] ?? null; + $this->commands = $values['commands'] ?? null; + $this->keys = $values['keys'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseRedisValkeyCurrentSessionResponse.php b/fern/sdk/src/Types/DatabaseRedisValkeyCurrentSessionResponse.php new file mode 100644 index 00000000..52248b68 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseRedisValkeyCurrentSessionResponse.php @@ -0,0 +1,166 @@ + $flags List of flags describing the client connection. + */ + #[JsonProperty('flags'), ArrayType(['string'])] + public ?array $flags; + + /** + * @var ?string $flagsRaw Client connection flags (raw string). + */ + #[JsonProperty('flags_raw')] + public ?string $flagsRaw; + + /** + * @var ?string $id Process ID of this session. + */ + #[JsonProperty('id')] + public ?string $id; + + /** + * @var ?int $multiExecCommands Number of commands in a MULTI/EXEC context. + */ + #[JsonProperty('multi_exec_commands')] + public ?int $multiExecCommands; + + /** + * @var ?int $outputBuffer Output buffer length. + */ + #[JsonProperty('output_buffer')] + public ?int $outputBuffer; + + /** + * @var ?int $outputBufferMemory Output buffer memory usage. + */ + #[JsonProperty('output_buffer_memory')] + public ?int $outputBufferMemory; + + /** + * @var ?int $outputListLength Output list length (replies queued when buffer is full). + */ + #[JsonProperty('output_list_length')] + public ?int $outputListLength; + + /** + * @var ?string $query The last executed command. + */ + #[JsonProperty('query')] + public ?string $query; + + /** + * @var ?int $queryBuffer Query buffer length (0 means no query pending). + */ + #[JsonProperty('query_buffer')] + public ?int $queryBuffer; + + /** + * @var ?int $queryBufferFree Free space of the query buffer (0 means the buffer is full). + */ + #[JsonProperty('query_buffer_free')] + public ?int $queryBufferFree; + + /** + * @param array{ + * activeChannelSubscriptions?: ?int, + * activeDatabase?: ?string, + * activePatternMatchingChannelSubscriptions?: ?int, + * applicationName?: ?string, + * clientAddr?: ?string, + * connectionAge?: ?int, + * connectionIdle?: ?int, + * flags?: ?array, + * flagsRaw?: ?string, + * id?: ?string, + * multiExecCommands?: ?int, + * outputBuffer?: ?int, + * outputBufferMemory?: ?int, + * outputListLength?: ?int, + * query?: ?string, + * queryBuffer?: ?int, + * queryBufferFree?: ?int, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->activeChannelSubscriptions = $values['activeChannelSubscriptions'] ?? null; + $this->activeDatabase = $values['activeDatabase'] ?? null; + $this->activePatternMatchingChannelSubscriptions = $values['activePatternMatchingChannelSubscriptions'] ?? null; + $this->applicationName = $values['applicationName'] ?? null; + $this->clientAddr = $values['clientAddr'] ?? null; + $this->connectionAge = $values['connectionAge'] ?? null; + $this->connectionIdle = $values['connectionIdle'] ?? null; + $this->flags = $values['flags'] ?? null; + $this->flagsRaw = $values['flagsRaw'] ?? null; + $this->id = $values['id'] ?? null; + $this->multiExecCommands = $values['multiExecCommands'] ?? null; + $this->outputBuffer = $values['outputBuffer'] ?? null; + $this->outputBufferMemory = $values['outputBufferMemory'] ?? null; + $this->outputListLength = $values['outputListLength'] ?? null; + $this->query = $values['query'] ?? null; + $this->queryBuffer = $values['queryBuffer'] ?? null; + $this->queryBufferFree = $values['queryBufferFree'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceAlertResponse.php b/fern/sdk/src/Types/DatabaseServiceAlertResponse.php new file mode 100644 index 00000000..38ebf74b --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceAlertResponse.php @@ -0,0 +1,63 @@ +createTime = $values['createTime'] ?? null; + $this->event = $values['event'] ?? null; + $this->serviceType = $values['serviceType'] ?? null; + $this->severity = $values['severity'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceCloneMysql.php b/fern/sdk/src/Types/DatabaseServiceCloneMysql.php new file mode 100644 index 00000000..94cb255e --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceCloneMysql.php @@ -0,0 +1,168 @@ + $planBackups Plan selection: backup tier. PostgreSQL and MySQL tiered plans only. + */ + #[JsonProperty('plan_backups')] + public ?string $planBackups; + + /** + * @var ?string $title + */ + #[JsonProperty('title')] + public ?string $title; + + /** + * @var ?DateTime $cloneTime Clone time + */ + #[JsonProperty('clone_time'), Date(Date::TYPE_DATETIME)] + public ?DateTime $cloneTime; + + /** + * @var ?string $backupName Backup name + */ + #[JsonProperty('backup_name')] + public ?string $backupName; + + /** + * @var ?string $setServiceUuid Title + */ + #[JsonProperty('set_service_uuid')] + public ?string $setServiceUuid; + + /** + * @var ?string $zone Zone + */ + #[JsonProperty('zone')] + public ?string $zone; + + /** + * @var ?bool $terminationProtection Termination protection + */ + #[JsonProperty('termination_protection')] + public ?bool $terminationProtection; + + /** + * @var ?DatabaseServiceCloneMysqlMaintenance $maintenance Maintenance + */ + #[JsonProperty('maintenance')] + public ?DatabaseServiceCloneMysqlMaintenance $maintenance; + + /** + * @var ?array $networks Networks + */ + #[JsonProperty('networks'), ArrayType([DatabaseNetworkCreate::class])] + public ?array $networks; + + /** + * @var ?array $labels Labels + */ + #[JsonProperty('labels'), ArrayType([DatabaseLabelCreate::class])] + public ?array $labels; + + /** + * @var ?int $additionalDiskSpaceGib Additional disk space in GiB. Legacy plans only: componentised (rdb.*) plans set storage as a total via plan_storage_gib or the plan name. + */ + #[JsonProperty('additional_disk_space_gib')] + public ?int $additionalDiskSpaceGib; + + /** + * @var ?DatabaseServicePropertiesMysql $properties + */ + #[JsonProperty('properties')] + public ?DatabaseServicePropertiesMysql $properties; + + /** + * @param array{ + * hostnamePrefix: string, + * plan?: ?string, + * planCompute?: ?string, + * planNodeCount?: ?int, + * planStorageGib?: ?int, + * planBackups?: ?value-of, + * title?: ?string, + * cloneTime?: ?DateTime, + * backupName?: ?string, + * setServiceUuid?: ?string, + * zone?: ?string, + * terminationProtection?: ?bool, + * maintenance?: ?DatabaseServiceCloneMysqlMaintenance, + * networks?: ?array, + * labels?: ?array, + * additionalDiskSpaceGib?: ?int, + * properties?: ?DatabaseServicePropertiesMysql, + * } $values + */ + public function __construct( + array $values, + ) { + $this->hostnamePrefix = $values['hostnamePrefix']; + $this->plan = $values['plan'] ?? null; + $this->planCompute = $values['planCompute'] ?? null; + $this->planNodeCount = $values['planNodeCount'] ?? null; + $this->planStorageGib = $values['planStorageGib'] ?? null; + $this->planBackups = $values['planBackups'] ?? null; + $this->title = $values['title'] ?? null; + $this->cloneTime = $values['cloneTime'] ?? null; + $this->backupName = $values['backupName'] ?? null; + $this->setServiceUuid = $values['setServiceUuid'] ?? null; + $this->zone = $values['zone'] ?? null; + $this->terminationProtection = $values['terminationProtection'] ?? null; + $this->maintenance = $values['maintenance'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->additionalDiskSpaceGib = $values['additionalDiskSpaceGib'] ?? null; + $this->properties = $values['properties'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceCloneMysqlMaintenance.php b/fern/sdk/src/Types/DatabaseServiceCloneMysqlMaintenance.php new file mode 100644 index 00000000..e0a364e7 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceCloneMysqlMaintenance.php @@ -0,0 +1,45 @@ + $dow + */ + #[JsonProperty('dow')] + public string $dow; + + /** + * @var string $time + */ + #[JsonProperty('time')] + public string $time; + + /** + * @param array{ + * dow: value-of, + * time: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->dow = $values['dow']; + $this->time = $values['time']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceCloneMysqlPlanBackups.php b/fern/sdk/src/Types/DatabaseServiceCloneMysqlPlanBackups.php new file mode 100644 index 00000000..fe57a3f4 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceCloneMysqlPlanBackups.php @@ -0,0 +1,10 @@ + $planBackups Plan selection: backup tier. PostgreSQL and MySQL tiered plans only. + */ + #[JsonProperty('plan_backups')] + public ?string $planBackups; + + /** + * @var ?string $title + */ + #[JsonProperty('title')] + public ?string $title; + + /** + * @var ?DateTime $cloneTime Clone time + */ + #[JsonProperty('clone_time'), Date(Date::TYPE_DATETIME)] + public ?DateTime $cloneTime; + + /** + * @var ?string $backupName Backup name + */ + #[JsonProperty('backup_name')] + public ?string $backupName; + + /** + * @var ?string $setServiceUuid Title + */ + #[JsonProperty('set_service_uuid')] + public ?string $setServiceUuid; + + /** + * @var ?string $zone Zone + */ + #[JsonProperty('zone')] + public ?string $zone; + + /** + * @var ?bool $terminationProtection Termination protection + */ + #[JsonProperty('termination_protection')] + public ?bool $terminationProtection; + + /** + * @var ?DatabaseServiceCloneOpensearchMaintenance $maintenance Maintenance + */ + #[JsonProperty('maintenance')] + public ?DatabaseServiceCloneOpensearchMaintenance $maintenance; + + /** + * @var ?array $networks Networks + */ + #[JsonProperty('networks'), ArrayType([DatabaseNetworkCreate::class])] + public ?array $networks; + + /** + * @var ?array $labels Labels + */ + #[JsonProperty('labels'), ArrayType([DatabaseLabelCreate::class])] + public ?array $labels; + + /** + * @var ?int $additionalDiskSpaceGib Additional disk space in GiB + */ + #[JsonProperty('additional_disk_space_gib')] + public ?int $additionalDiskSpaceGib; + + /** + * @var ?DatabaseServicePropertiesOpensearch $properties + */ + #[JsonProperty('properties')] + public ?DatabaseServicePropertiesOpensearch $properties; + + /** + * @param array{ + * hostnamePrefix: string, + * plan?: ?string, + * planCompute?: ?string, + * planNodeCount?: ?int, + * planStorageGib?: ?int, + * planBackups?: ?value-of, + * title?: ?string, + * cloneTime?: ?DateTime, + * backupName?: ?string, + * setServiceUuid?: ?string, + * zone?: ?string, + * terminationProtection?: ?bool, + * maintenance?: ?DatabaseServiceCloneOpensearchMaintenance, + * networks?: ?array, + * labels?: ?array, + * additionalDiskSpaceGib?: ?int, + * properties?: ?DatabaseServicePropertiesOpensearch, + * } $values + */ + public function __construct( + array $values, + ) { + $this->hostnamePrefix = $values['hostnamePrefix']; + $this->plan = $values['plan'] ?? null; + $this->planCompute = $values['planCompute'] ?? null; + $this->planNodeCount = $values['planNodeCount'] ?? null; + $this->planStorageGib = $values['planStorageGib'] ?? null; + $this->planBackups = $values['planBackups'] ?? null; + $this->title = $values['title'] ?? null; + $this->cloneTime = $values['cloneTime'] ?? null; + $this->backupName = $values['backupName'] ?? null; + $this->setServiceUuid = $values['setServiceUuid'] ?? null; + $this->zone = $values['zone'] ?? null; + $this->terminationProtection = $values['terminationProtection'] ?? null; + $this->maintenance = $values['maintenance'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->additionalDiskSpaceGib = $values['additionalDiskSpaceGib'] ?? null; + $this->properties = $values['properties'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceCloneOpensearchMaintenance.php b/fern/sdk/src/Types/DatabaseServiceCloneOpensearchMaintenance.php new file mode 100644 index 00000000..4834d152 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceCloneOpensearchMaintenance.php @@ -0,0 +1,45 @@ + $dow + */ + #[JsonProperty('dow')] + public string $dow; + + /** + * @var string $time + */ + #[JsonProperty('time')] + public string $time; + + /** + * @param array{ + * dow: value-of, + * time: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->dow = $values['dow']; + $this->time = $values['time']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceCloneOpensearchPlanBackups.php b/fern/sdk/src/Types/DatabaseServiceCloneOpensearchPlanBackups.php new file mode 100644 index 00000000..79f3fd26 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceCloneOpensearchPlanBackups.php @@ -0,0 +1,10 @@ + $planBackups Plan selection: backup tier. PostgreSQL and MySQL tiered plans only. + */ + #[JsonProperty('plan_backups')] + public ?string $planBackups; + + /** + * @var ?string $title + */ + #[JsonProperty('title')] + public ?string $title; + + /** + * @var ?DateTime $cloneTime Clone time + */ + #[JsonProperty('clone_time'), Date(Date::TYPE_DATETIME)] + public ?DateTime $cloneTime; + + /** + * @var ?string $backupName Backup name + */ + #[JsonProperty('backup_name')] + public ?string $backupName; + + /** + * @var ?string $setServiceUuid Title + */ + #[JsonProperty('set_service_uuid')] + public ?string $setServiceUuid; + + /** + * @var ?string $zone Zone + */ + #[JsonProperty('zone')] + public ?string $zone; + + /** + * @var ?bool $terminationProtection Termination protection + */ + #[JsonProperty('termination_protection')] + public ?bool $terminationProtection; + + /** + * @var ?DatabaseServiceClonePgMaintenance $maintenance Maintenance + */ + #[JsonProperty('maintenance')] + public ?DatabaseServiceClonePgMaintenance $maintenance; + + /** + * @var ?array $networks + */ + #[JsonProperty('networks'), ArrayType([DatabaseNetworkCreate::class])] + public ?array $networks; + + /** + * @var ?array $labels Labels + */ + #[JsonProperty('labels'), ArrayType([DatabaseLabelCreate::class])] + public ?array $labels; + + /** + * @var ?int $additionalDiskSpaceGib Additional disk space in GiB. Legacy plans only: componentised (rdb.*) plans set storage as a total via plan_storage_gib or the plan name. + */ + #[JsonProperty('additional_disk_space_gib')] + public ?int $additionalDiskSpaceGib; + + /** + * @var ?DatabaseServicePropertiesPg $properties + */ + #[JsonProperty('properties')] + public ?DatabaseServicePropertiesPg $properties; + + /** + * @param array{ + * hostnamePrefix: string, + * plan?: ?string, + * planCompute?: ?string, + * planNodeCount?: ?int, + * planStorageGib?: ?int, + * planBackups?: ?value-of, + * title?: ?string, + * cloneTime?: ?DateTime, + * backupName?: ?string, + * setServiceUuid?: ?string, + * zone?: ?string, + * terminationProtection?: ?bool, + * maintenance?: ?DatabaseServiceClonePgMaintenance, + * networks?: ?array, + * labels?: ?array, + * additionalDiskSpaceGib?: ?int, + * properties?: ?DatabaseServicePropertiesPg, + * } $values + */ + public function __construct( + array $values, + ) { + $this->hostnamePrefix = $values['hostnamePrefix']; + $this->plan = $values['plan'] ?? null; + $this->planCompute = $values['planCompute'] ?? null; + $this->planNodeCount = $values['planNodeCount'] ?? null; + $this->planStorageGib = $values['planStorageGib'] ?? null; + $this->planBackups = $values['planBackups'] ?? null; + $this->title = $values['title'] ?? null; + $this->cloneTime = $values['cloneTime'] ?? null; + $this->backupName = $values['backupName'] ?? null; + $this->setServiceUuid = $values['setServiceUuid'] ?? null; + $this->zone = $values['zone'] ?? null; + $this->terminationProtection = $values['terminationProtection'] ?? null; + $this->maintenance = $values['maintenance'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->additionalDiskSpaceGib = $values['additionalDiskSpaceGib'] ?? null; + $this->properties = $values['properties'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceClonePgMaintenance.php b/fern/sdk/src/Types/DatabaseServiceClonePgMaintenance.php new file mode 100644 index 00000000..1d0366d2 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceClonePgMaintenance.php @@ -0,0 +1,45 @@ + $dow + */ + #[JsonProperty('dow')] + public string $dow; + + /** + * @var string $time + */ + #[JsonProperty('time')] + public string $time; + + /** + * @param array{ + * dow: value-of, + * time: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->dow = $values['dow']; + $this->time = $values['time']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceClonePgPlanBackups.php b/fern/sdk/src/Types/DatabaseServiceClonePgPlanBackups.php new file mode 100644 index 00000000..611b4afa --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceClonePgPlanBackups.php @@ -0,0 +1,10 @@ + $planBackups Plan selection: backup tier. PostgreSQL and MySQL tiered plans only. + */ + #[JsonProperty('plan_backups')] + public ?string $planBackups; + + /** + * @var ?string $title + */ + #[JsonProperty('title')] + public ?string $title; + + /** + * @var ?DateTime $cloneTime Clone time + */ + #[JsonProperty('clone_time'), Date(Date::TYPE_DATETIME)] + public ?DateTime $cloneTime; + + /** + * @var ?string $backupName Backup name + */ + #[JsonProperty('backup_name')] + public ?string $backupName; + + /** + * @var ?string $setServiceUuid Title + */ + #[JsonProperty('set_service_uuid')] + public ?string $setServiceUuid; + + /** + * @var ?string $zone Zone + */ + #[JsonProperty('zone')] + public ?string $zone; + + /** + * @var ?bool $terminationProtection Termination protection + */ + #[JsonProperty('termination_protection')] + public ?bool $terminationProtection; + + /** + * @var ?DatabaseServiceCloneRedisMaintenance $maintenance Maintenance + */ + #[JsonProperty('maintenance')] + public ?DatabaseServiceCloneRedisMaintenance $maintenance; + + /** + * @var ?array $networks + */ + #[JsonProperty('networks'), ArrayType([DatabaseNetworkCreate::class])] + public ?array $networks; + + /** + * @var ?array $labels Labels + */ + #[JsonProperty('labels'), ArrayType([DatabaseLabelCreate::class])] + public ?array $labels; + + /** + * @var ?DatabaseServicePropertiesRedis $properties + */ + #[JsonProperty('properties')] + public ?DatabaseServicePropertiesRedis $properties; + + /** + * @param array{ + * hostnamePrefix: string, + * plan?: ?string, + * planCompute?: ?string, + * planNodeCount?: ?int, + * planStorageGib?: ?int, + * planBackups?: ?value-of, + * title?: ?string, + * cloneTime?: ?DateTime, + * backupName?: ?string, + * setServiceUuid?: ?string, + * zone?: ?string, + * terminationProtection?: ?bool, + * maintenance?: ?DatabaseServiceCloneRedisMaintenance, + * networks?: ?array, + * labels?: ?array, + * properties?: ?DatabaseServicePropertiesRedis, + * } $values + */ + public function __construct( + array $values, + ) { + $this->hostnamePrefix = $values['hostnamePrefix']; + $this->plan = $values['plan'] ?? null; + $this->planCompute = $values['planCompute'] ?? null; + $this->planNodeCount = $values['planNodeCount'] ?? null; + $this->planStorageGib = $values['planStorageGib'] ?? null; + $this->planBackups = $values['planBackups'] ?? null; + $this->title = $values['title'] ?? null; + $this->cloneTime = $values['cloneTime'] ?? null; + $this->backupName = $values['backupName'] ?? null; + $this->setServiceUuid = $values['setServiceUuid'] ?? null; + $this->zone = $values['zone'] ?? null; + $this->terminationProtection = $values['terminationProtection'] ?? null; + $this->maintenance = $values['maintenance'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->properties = $values['properties'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceCloneRedisMaintenance.php b/fern/sdk/src/Types/DatabaseServiceCloneRedisMaintenance.php new file mode 100644 index 00000000..9c66ee46 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceCloneRedisMaintenance.php @@ -0,0 +1,45 @@ + $dow + */ + #[JsonProperty('dow')] + public string $dow; + + /** + * @var string $time + */ + #[JsonProperty('time')] + public string $time; + + /** + * @param array{ + * dow: value-of, + * time: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->dow = $values['dow']; + $this->time = $values['time']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceCloneRedisPlanBackups.php b/fern/sdk/src/Types/DatabaseServiceCloneRedisPlanBackups.php new file mode 100644 index 00000000..f2d815cd --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceCloneRedisPlanBackups.php @@ -0,0 +1,10 @@ + $planBackups Plan selection: backup tier. PostgreSQL and MySQL tiered plans only. + */ + #[JsonProperty('plan_backups')] + public ?string $planBackups; + + /** + * @var ?string $title + */ + #[JsonProperty('title')] + public ?string $title; + + /** + * @var ?DateTime $cloneTime Clone time + */ + #[JsonProperty('clone_time'), Date(Date::TYPE_DATETIME)] + public ?DateTime $cloneTime; + + /** + * @var ?string $backupName Backup name + */ + #[JsonProperty('backup_name')] + public ?string $backupName; + + /** + * @var ?string $setServiceUuid Title + */ + #[JsonProperty('set_service_uuid')] + public ?string $setServiceUuid; + + /** + * @var ?string $zone Zone + */ + #[JsonProperty('zone')] + public ?string $zone; + + /** + * @var ?bool $terminationProtection Termination protection + */ + #[JsonProperty('termination_protection')] + public ?bool $terminationProtection; + + /** + * @var ?DatabaseServiceCloneValkeyMaintenance $maintenance Maintenance + */ + #[JsonProperty('maintenance')] + public ?DatabaseServiceCloneValkeyMaintenance $maintenance; + + /** + * @var ?array $networks + */ + #[JsonProperty('networks'), ArrayType([DatabaseNetworkCreate::class])] + public ?array $networks; + + /** + * @var ?array $labels Labels + */ + #[JsonProperty('labels'), ArrayType([DatabaseLabelCreate::class])] + public ?array $labels; + + /** + * @var ?DatabaseServicePropertiesValkey $properties + */ + #[JsonProperty('properties')] + public ?DatabaseServicePropertiesValkey $properties; + + /** + * @param array{ + * hostnamePrefix: string, + * plan?: ?string, + * planCompute?: ?string, + * planNodeCount?: ?int, + * planStorageGib?: ?int, + * planBackups?: ?value-of, + * title?: ?string, + * cloneTime?: ?DateTime, + * backupName?: ?string, + * setServiceUuid?: ?string, + * zone?: ?string, + * terminationProtection?: ?bool, + * maintenance?: ?DatabaseServiceCloneValkeyMaintenance, + * networks?: ?array, + * labels?: ?array, + * properties?: ?DatabaseServicePropertiesValkey, + * } $values + */ + public function __construct( + array $values, + ) { + $this->hostnamePrefix = $values['hostnamePrefix']; + $this->plan = $values['plan'] ?? null; + $this->planCompute = $values['planCompute'] ?? null; + $this->planNodeCount = $values['planNodeCount'] ?? null; + $this->planStorageGib = $values['planStorageGib'] ?? null; + $this->planBackups = $values['planBackups'] ?? null; + $this->title = $values['title'] ?? null; + $this->cloneTime = $values['cloneTime'] ?? null; + $this->backupName = $values['backupName'] ?? null; + $this->setServiceUuid = $values['setServiceUuid'] ?? null; + $this->zone = $values['zone'] ?? null; + $this->terminationProtection = $values['terminationProtection'] ?? null; + $this->maintenance = $values['maintenance'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->properties = $values['properties'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceCloneValkeyMaintenance.php b/fern/sdk/src/Types/DatabaseServiceCloneValkeyMaintenance.php new file mode 100644 index 00000000..463574e2 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceCloneValkeyMaintenance.php @@ -0,0 +1,45 @@ + $dow + */ + #[JsonProperty('dow')] + public string $dow; + + /** + * @var string $time + */ + #[JsonProperty('time')] + public string $time; + + /** + * @param array{ + * dow: value-of, + * time: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->dow = $values['dow']; + $this->time = $values['time']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceCloneValkeyPlanBackups.php b/fern/sdk/src/Types/DatabaseServiceCloneValkeyPlanBackups.php new file mode 100644 index 00000000..d767dc96 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceCloneValkeyPlanBackups.php @@ -0,0 +1,10 @@ +component = $values['component'] ?? null; + $this->host = $values['host'] ?? null; + $this->port = $values['port'] ?? null; + $this->route = $values['route'] ?? null; + $this->usage = $values['usage'] ?? null; + $this->ssl = $values['ssl'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceInformationResponse.php b/fern/sdk/src/Types/DatabaseServiceInformationResponse.php new file mode 100644 index 00000000..ba5223c6 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceInformationResponse.php @@ -0,0 +1,272 @@ + $stateError A map of errors related to the service state. + */ + #[JsonProperty('state_error'), ArrayType(['string' => 'string'])] + public ?array $stateError; + + /** + * @var ?bool $powered Indicates whether the service is powered on. + */ + #[JsonProperty('powered')] + public ?bool $powered; + + /** + * @var ?bool $terminationProtection Indicates whether termination protection is enabled for the service. + */ + #[JsonProperty('termination_protection')] + public ?bool $terminationProtection; + + /** + * @var ?int $nodeCount The number of nodes in the service. + */ + #[JsonProperty('node_count')] + public ?int $nodeCount; + + /** + * @var ?DateTime $createTime The time when the service was created. + */ + #[JsonProperty('create_time'), Date(Date::TYPE_DATETIME)] + public ?DateTime $createTime; + + /** + * @var ?DateTime $updateTime The time when the service was last updated. + */ + #[JsonProperty('update_time'), Date(Date::TYPE_DATETIME)] + public ?DateTime $updateTime; + + /** + * @var ?string $serviceUri The URI for accessing the service. + */ + #[JsonProperty('service_uri')] + public ?string $serviceUri; + + /** + * @var ?array $serviceUriParams A map of connection parameters for the service. + */ + #[JsonProperty('service_uri_params'), ArrayType(['string' => 'mixed'])] + public ?array $serviceUriParams; + + /** + * @var ?DatabaseMaintenanceWindowResponse $maintenance + */ + #[JsonProperty('maintenance')] + public ?DatabaseMaintenanceWindowResponse $maintenance; + + /** + * @var ?array $metadata A map of metadata key-value pairs for the service. + */ + #[JsonProperty('metadata'), ArrayType(['string' => 'mixed'])] + public ?array $metadata; + + /** + * @var ?array $properties A map of additional properties for the service. + */ + #[JsonProperty('properties'), ArrayType(['string' => 'mixed'])] + public ?array $properties; + + /** + * @var ?array $networks List of network information details associated with the service. + */ + #[JsonProperty('networks'), ArrayType([DatabaseNetworkInformationDetailsResponse::class])] + public ?array $networks; + + /** + * @var ?array $nodeStates The states of individual nodes in the service. + */ + #[JsonProperty('node_states'), ArrayType([DatabaseNodeStateResponse::class])] + public ?array $nodeStates; + + /** + * @var ?array $labels List of label information associated with the service. + */ + #[JsonProperty('labels'), ArrayType([DatabaseLabelInformationResponse::class])] + public ?array $labels; + + /** + * @var ?array $backups List of backups associated with the service. + */ + #[JsonProperty('backups'), ArrayType([DatabaseBackupResponse::class])] + public ?array $backups; + + /** + * @var ?array $components List of service components associated with the service. + */ + #[JsonProperty('components'), ArrayType([DatabaseServiceComponentResponse::class])] + public ?array $components; + + /** + * @var ?array $connectionPools List of connection pools associated with the service. + */ + #[JsonProperty('connection_pools'), ArrayType([DatabaseConnectionPoolResponse::class])] + public ?array $connectionPools; + + /** + * @var ?array $users List of users associated with the service. + */ + #[JsonProperty('users'), ArrayType([DatabaseUserResponse::class])] + public ?array $users; + + /** + * @var ?array $databases + */ + #[JsonProperty('databases'), ArrayType([LogicalDatabaseResponse::class])] + public ?array $databases; + + /** + * @var ?array $acls List of ACLs associated with the service. + */ + #[JsonProperty('acls'), ArrayType([DatabaseAclResponse::class])] + public ?array $acls; + + /** + * @var ?array $serviceIntegrations List of service integrations associated with the service. + */ + #[JsonProperty('service_integrations'), ArrayType([DatabaseServiceIntegrationResponse::class])] + public ?array $serviceIntegrations; + + /** + * @param array{ + * uuid?: ?string, + * zone?: ?string, + * name?: ?string, + * title?: ?string, + * type?: ?string, + * plan?: ?string, + * planComponents?: ?DatabasePlanComponentsResponse, + * additionalDiskSpaceGib?: ?int, + * state?: ?string, + * stateError?: ?array, + * powered?: ?bool, + * terminationProtection?: ?bool, + * nodeCount?: ?int, + * createTime?: ?DateTime, + * updateTime?: ?DateTime, + * serviceUri?: ?string, + * serviceUriParams?: ?array, + * maintenance?: ?DatabaseMaintenanceWindowResponse, + * metadata?: ?array, + * properties?: ?array, + * networks?: ?array, + * nodeStates?: ?array, + * labels?: ?array, + * backups?: ?array, + * components?: ?array, + * connectionPools?: ?array, + * users?: ?array, + * databases?: ?array, + * acls?: ?array, + * serviceIntegrations?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->uuid = $values['uuid'] ?? null; + $this->zone = $values['zone'] ?? null; + $this->name = $values['name'] ?? null; + $this->title = $values['title'] ?? null; + $this->type = $values['type'] ?? null; + $this->plan = $values['plan'] ?? null; + $this->planComponents = $values['planComponents'] ?? null; + $this->additionalDiskSpaceGib = $values['additionalDiskSpaceGib'] ?? null; + $this->state = $values['state'] ?? null; + $this->stateError = $values['stateError'] ?? null; + $this->powered = $values['powered'] ?? null; + $this->terminationProtection = $values['terminationProtection'] ?? null; + $this->nodeCount = $values['nodeCount'] ?? null; + $this->createTime = $values['createTime'] ?? null; + $this->updateTime = $values['updateTime'] ?? null; + $this->serviceUri = $values['serviceUri'] ?? null; + $this->serviceUriParams = $values['serviceUriParams'] ?? null; + $this->maintenance = $values['maintenance'] ?? null; + $this->metadata = $values['metadata'] ?? null; + $this->properties = $values['properties'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->nodeStates = $values['nodeStates'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->backups = $values['backups'] ?? null; + $this->components = $values['components'] ?? null; + $this->connectionPools = $values['connectionPools'] ?? null; + $this->users = $values['users'] ?? null; + $this->databases = $values['databases'] ?? null; + $this->acls = $values['acls'] ?? null; + $this->serviceIntegrations = $values['serviceIntegrations'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceIntegration.php b/fern/sdk/src/Types/DatabaseServiceIntegration.php new file mode 100644 index 00000000..af4d9e58 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceIntegration.php @@ -0,0 +1,10 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?string $destinationUuid The UUID of the destination where the service integration will send data. + */ + #[JsonProperty('destination_uuid')] + public ?string $destinationUuid; + + /** + * @var ?array $properties + */ + #[JsonProperty('properties'), ArrayType(['string' => 'mixed'])] + public ?array $properties; + + /** + * @param array{ + * type: value-of, + * destinationUuid?: ?string, + * properties?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->destinationUuid = $values['destinationUuid'] ?? null; + $this->properties = $values['properties'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceIntegrationResponse.php b/fern/sdk/src/Types/DatabaseServiceIntegrationResponse.php new file mode 100644 index 00000000..94aaa393 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceIntegrationResponse.php @@ -0,0 +1,110 @@ + $stateError A list of errors related to the service integration state. + */ + #[JsonProperty('state_error'), ArrayType(['mixed'])] + public ?array $stateError; + + /** + * @var ?array $nodeStates The states of individual nodes in the service integration. + */ + #[JsonProperty('node_states'), ArrayType([DatabaseIntegrationNodeStateResponse::class])] + public ?array $nodeStates; + + /** + * @var ?array $properties A map of additional properties for the service integration. + */ + #[JsonProperty('properties'), ArrayType(['string' => 'mixed'])] + public ?array $properties; + + /** + * @param array{ + * uuid?: ?string, + * type?: ?string, + * sourceName?: ?string, + * sourceUuid?: ?string, + * destinationName?: ?string, + * destinationUuid?: ?string, + * state?: ?string, + * stateError?: ?array, + * nodeStates?: ?array, + * properties?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->uuid = $values['uuid'] ?? null; + $this->type = $values['type'] ?? null; + $this->sourceName = $values['sourceName'] ?? null; + $this->sourceUuid = $values['sourceUuid'] ?? null; + $this->destinationName = $values['destinationName'] ?? null; + $this->destinationUuid = $values['destinationUuid'] ?? null; + $this->state = $values['state'] ?? null; + $this->stateError = $values['stateError'] ?? null; + $this->nodeStates = $values['nodeStates'] ?? null; + $this->properties = $values['properties'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceMigrationStatusResponse.php b/fern/sdk/src/Types/DatabaseServiceMigrationStatusResponse.php new file mode 100644 index 00000000..aa830b21 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceMigrationStatusResponse.php @@ -0,0 +1,78 @@ + $databases + */ + #[JsonProperty('databases'), ArrayType([DatabaseMigrationStatusDetailsResponse::class])] + public ?array $databases; + + /** + * @param array{ + * error?: ?string, + * method?: ?string, + * secondsBehindMaster?: ?int, + * sourceActive?: ?bool, + * status?: ?string, + * databases?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->error = $values['error'] ?? null; + $this->method = $values['method'] ?? null; + $this->secondsBehindMaster = $values['secondsBehindMaster'] ?? null; + $this->sourceActive = $values['sourceActive'] ?? null; + $this->status = $values['status'] ?? null; + $this->databases = $values['databases'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceNetworkDetailsResponse.php b/fern/sdk/src/Types/DatabaseServiceNetworkDetailsResponse.php new file mode 100644 index 00000000..41506eff --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceNetworkDetailsResponse.php @@ -0,0 +1,64 @@ + $networkPeerings + */ + #[JsonProperty('network_peerings'), ArrayType([DatabasePeeringStatusResponse::class])] + public ?array $networkPeerings; + + /** + * @param array{ + * createTime?: ?DateTime, + * updateTime?: ?DateTime, + * state?: ?string, + * networkPeerings?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->createTime = $values['createTime'] ?? null; + $this->updateTime = $values['updateTime'] ?? null; + $this->state = $values['state'] ?? null; + $this->networkPeerings = $values['networkPeerings'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePlanResponse.php b/fern/sdk/src/Types/DatabaseServicePlanResponse.php new file mode 100644 index 00000000..03571cc9 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePlanResponse.php @@ -0,0 +1,133 @@ +backupConfig = $values['backupConfig'] ?? null; + $this->backupConfigPg = $values['backupConfigPg'] ?? null; + $this->backupConfigMysql = $values['backupConfigMysql'] ?? null; + $this->backupConfigRedis = $values['backupConfigRedis'] ?? null; + $this->backupConfigValkey = $values['backupConfigValkey'] ?? null; + $this->backupConfigOpensearch = $values['backupConfigOpensearch'] ?? null; + $this->nodeCount = $values['nodeCount'] ?? null; + $this->zones = $values['zones'] ?? null; + $this->plan = $values['plan'] ?? null; + $this->coreNumber = $values['coreNumber'] ?? null; + $this->storageSize = $values['storageSize'] ?? null; + $this->memoryAmount = $values['memoryAmount'] ?? null; + $this->components = $values['components'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePlanResponseZones.php b/fern/sdk/src/Types/DatabaseServicePlanResponseZones.php new file mode 100644 index 00000000..f688df90 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePlanResponseZones.php @@ -0,0 +1,35 @@ + $zone + */ + #[JsonProperty('zone'), ArrayType([DatabaseZoneInfoResponse::class])] + public ?array $zone; + + /** + * @param array{ + * zone?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->zone = $values['zone'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesMysql.php b/fern/sdk/src/Types/DatabaseServicePropertiesMysql.php new file mode 100644 index 00000000..e1b22c8c --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesMysql.php @@ -0,0 +1,574 @@ + $internalTmpMemStorageEngine The storage engine for in-memory internal temporary tables. + */ + #[JsonProperty('internal_tmp_mem_storage_engine')] + public ?string $internalTmpMemStorageEngine; + + /** + * @var ?array $ipFilter Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16' + */ + #[JsonProperty('ip_filter'), ArrayType(['string'])] + public ?array $ipFilter; + + /** + * @var ?value-of $logOutput The slow log output destination when slow_query_log is ON. To enable MySQL AI Insights, choose INSIGHTS. To use MySQL AI Insights and the mysql.slow_log table at the same time, choose INSIGHTS,TABLE. To only use the mysql.slow_log table, choose TABLE. To silence slow logs, choose NONE. + */ + #[JsonProperty('log_output')] + public ?string $logOutput; + + /** + * @var ?float $longQueryTime The slow_query_logs work as SQL statements that take more than long_query_time seconds to execute. + */ + #[JsonProperty('long_query_time')] + public ?float $longQueryTime; + + /** + * @var ?int $lowerCaseTableNames Sets how table and database names are stored and compared. 0 = case-sensitive (default), 1 = names stored lowercase, comparisons are case-insensitive. This option can only be set when creating the service and cannot be changed later. See https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html for details. + */ + #[JsonProperty('lower_case_table_names')] + public ?int $lowerCaseTableNames; + + /** + * @var ?int $maxAllowedPacket Size of the largest message in bytes that can be received by the server. Default is 67108864 (64M). Statements and rows larger than this are rejected with a packet too large error. + */ + #[JsonProperty('max_allowed_packet')] + public ?int $maxAllowedPacket; + + /** + * @var ?int $maxConnections The maximum permitted number of simultaneous client connections. Lower this to reserve memory for other work. The value cannot exceed the limit provided by your service plan. Upgrading the plan does not raise a value you have set explicitly, so increase it yourself after an upgrade. + */ + #[JsonProperty('max_connections')] + public ?int $maxConnections; + + /** + * @var ?int $maxExecutionTime Execution timeout in milliseconds for read-only top-level SELECT statements. 0 (the default) means no timeout. + */ + #[JsonProperty('max_execution_time')] + public ?int $maxExecutionTime; + + /** + * @var ?int $maxHeapTableSize Limits the size of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M) + */ + #[JsonProperty('max_heap_table_size')] + public ?int $maxHeapTableSize; + + /** + * @var ?int $maxSeeksForKey Limit on the assumed maximum number of index seeks when looking up rows based on a key. Lowering this value causes the optimizer to prefer index lookups over table scans. + */ + #[JsonProperty('max_seeks_for_key')] + public ?int $maxSeeksForKey; + + /** + * @var ?int $maxUserConnections The maximum number of simultaneous connections permitted to any single user account. 0, the default, means no per-account limit. Any other value must be at least 10 below max_connections, so that monitoring and your own admin sessions can still connect when an application saturates its own limit. UpCloud's replication and management connections are unaffected however low you set this. + */ + #[JsonProperty('max_user_connections')] + public ?int $maxUserConnections; + + /** + * @var ?DatabaseServicePropertiesMysqlMigration $migration + */ + #[JsonProperty('migration')] + public ?DatabaseServicePropertiesMysqlMigration $migration; + + /** + * @var ?DatabaseServicePropertiesMysqlMysqlIncrementalBackup $mysqlIncrementalBackup + */ + #[JsonProperty('mysql_incremental_backup')] + public ?DatabaseServicePropertiesMysqlMysqlIncrementalBackup $mysqlIncrementalBackup; + + /** + * @var ?int $netBufferLength Start sizes of connection buffer and result buffer. Default is 16384 (16K). Changing this parameter will lead to a restart of the MySQL service. + */ + #[JsonProperty('net_buffer_length')] + public ?int $netBufferLength; + + /** + * @var ?int $netReadTimeout The number of seconds to wait for more data from a connection before aborting the read. + */ + #[JsonProperty('net_read_timeout')] + public ?int $netReadTimeout; + + /** + * @var ?int $netWriteTimeout The number of seconds to wait for a block to be written to a connection before aborting the write. + */ + #[JsonProperty('net_write_timeout')] + public ?int $netWriteTimeout; + + /** + * @var ?int $optimizerPruneLevel Controls the heuristics applied during query optimization to prune less-promising partial plans from the optimizer search space. 0 disables heuristics (exhaustive search); 1 prunes plans based on the number of rows retrieved. + */ + #[JsonProperty('optimizer_prune_level')] + public ?int $optimizerPruneLevel; + + /** + * @var ?int $optimizerSearchDepth Maximum depth of search performed by the query optimizer when choosing a join order. Larger values produce better plans for joins over many tables but take longer to compile; 0 lets the optimizer choose the depth automatically. + */ + #[JsonProperty('optimizer_search_depth')] + public ?int $optimizerSearchDepth; + + /** + * @var ?string $optimizerSwitch Comma-separated list of optimizer flag assignments in the form flag=on|off|default, or the single value 'default' to reset all flags. Flags not listed keep their current values. Controls query optimizer behaviors such as index merge, hash join and semijoin strategies. + */ + #[JsonProperty('optimizer_switch')] + public ?string $optimizerSwitch; + + /** + * @var ?int $performanceSchemaEventsStatementsHistorySize The number of rows per thread in the events_statements_history table. Changing this parameter will lead to a restart of the MySQL service. + */ + #[JsonProperty('performance_schema_events_statements_history_size')] + public ?int $performanceSchemaEventsStatementsHistorySize; + + /** + * @var ?bool $publicAccess Allow access to the service from the public Internet + */ + #[JsonProperty('public_access')] + public ?bool $publicAccess; + + /** + * @var ?bool $publicAccessPrometheus Allow access to Prometheus metrics from the public Internet + */ + #[JsonProperty('public_access_prometheus')] + public ?bool $publicAccessPrometheus; + + /** + * @var ?int $relayLogSpaceLimit The maximum amount of space in bytes to use for all relay logs while replicating from an external migration source. When the limit is reached, the replication I/O thread stops fetching relay log events until the SQL thread has caught up. Raise this to give a large migration a bigger relay-log budget; ensure the service disk is sized accordingly. The setting applies only on the node replicating from the external source; standby nodes always use the UpCloud-managed default (the smaller of 5 GiB and 30% of the service disk), which is also used when this option is left unset. Changing this parameter will lead to a restart of the MySQL service. + */ + #[JsonProperty('relay_log_space_limit')] + public ?int $relayLogSpaceLimit; + + /** + * @var ?bool $serviceLog Store logs for the service so that they are available in the HTTP API and console. + */ + #[JsonProperty('service_log')] + public ?bool $serviceLog; + + /** + * @var ?bool $slowQueryLog Slow query log enables capturing of slow queries. Setting slow_query_log to false also truncates the mysql.slow_log table. + */ + #[JsonProperty('slow_query_log')] + public ?bool $slowQueryLog; + + /** + * @var ?int $sortBufferSize Sort buffer size in bytes for ORDER BY optimization. Default is 262144 (256K). Requests above 2% of the RAM provided by your service plan are rejected, because the buffer is allocated per session and its cost multiplies with the connection count. + */ + #[JsonProperty('sort_buffer_size')] + public ?int $sortBufferSize; + + /** + * @var ?string $sqlMode Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field UpCloud default SQL mode (strict, SQL standard compliant) will be assigned. + */ + #[JsonProperty('sql_mode')] + public ?string $sqlMode; + + /** + * @var ?bool $sqlRequirePrimaryKey Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them. + */ + #[JsonProperty('sql_require_primary_key')] + public ?bool $sqlRequirePrimaryKey; + + /** + * @var ?int $tmpTableSize Limits the size of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M) + */ + #[JsonProperty('tmp_table_size')] + public ?int $tmpTableSize; + + /** + * @var ?value-of $version + */ + #[JsonProperty('version')] + public ?string $version; + + /** + * @var ?int $waitTimeout The number of seconds the server waits for activity on a noninteractive connection before closing it. Requests to set this below 30 are rejected, because a shorter timeout closes your own idle connections between statements. + */ + #[JsonProperty('wait_timeout')] + public ?int $waitTimeout; + + /** + * @var ?bool $windowingUseHighPrecision Whether window functions are computed to high precision. Disabling this trades exactness for speed in window function evaluation. + */ + #[JsonProperty('windowing_use_high_precision')] + public ?bool $windowingUseHighPrecision; + + /** + * @param array{ + * adminPassword?: ?string, + * adminUsername?: ?string, + * automaticSpPrivileges?: ?bool, + * automaticUtilityNetworkIpFilter?: ?bool, + * backupHour?: ?int, + * backupMinute?: ?int, + * binlogRetentionPeriod?: ?int, + * connectTimeout?: ?int, + * defaultTimeZone?: ?string, + * divPrecisionIncrement?: ?int, + * endMarkersInJson?: ?bool, + * eqRangeIndexDiveLimit?: ?int, + * groupConcatMaxLen?: ?int, + * informationSchemaStatsExpiry?: ?int, + * innodbAdaptiveHashIndex?: ?bool, + * innodbChangeBufferMaxSize?: ?int, + * innodbFlushNeighbors?: ?int, + * innodbFtEnableStopword?: ?bool, + * innodbFtMaxTokenSize?: ?int, + * innodbFtMinTokenSize?: ?int, + * innodbFtNumWordOptimize?: ?int, + * innodbFtResultCacheLimit?: ?int, + * innodbFtServerStopwordTable?: ?string, + * innodbFtUserStopwordTable?: ?string, + * innodbIoCapacity?: ?int, + * innodbIoCapacityMax?: ?int, + * innodbLockWaitTimeout?: ?int, + * innodbLogBufferSize?: ?int, + * innodbOnlineAlterLogMaxSize?: ?int, + * innodbOptimizeFulltextOnly?: ?bool, + * innodbPrintAllDeadlocks?: ?bool, + * innodbReadIoThreads?: ?int, + * innodbRollbackOnTimeout?: ?bool, + * innodbThreadConcurrency?: ?int, + * innodbWriteIoThreads?: ?int, + * interactiveTimeout?: ?int, + * internalTmpMemStorageEngine?: ?value-of, + * ipFilter?: ?array, + * logOutput?: ?value-of, + * longQueryTime?: ?float, + * lowerCaseTableNames?: ?int, + * maxAllowedPacket?: ?int, + * maxConnections?: ?int, + * maxExecutionTime?: ?int, + * maxHeapTableSize?: ?int, + * maxSeeksForKey?: ?int, + * maxUserConnections?: ?int, + * migration?: ?DatabaseServicePropertiesMysqlMigration, + * mysqlIncrementalBackup?: ?DatabaseServicePropertiesMysqlMysqlIncrementalBackup, + * netBufferLength?: ?int, + * netReadTimeout?: ?int, + * netWriteTimeout?: ?int, + * optimizerPruneLevel?: ?int, + * optimizerSearchDepth?: ?int, + * optimizerSwitch?: ?string, + * performanceSchemaEventsStatementsHistorySize?: ?int, + * publicAccess?: ?bool, + * publicAccessPrometheus?: ?bool, + * relayLogSpaceLimit?: ?int, + * serviceLog?: ?bool, + * slowQueryLog?: ?bool, + * sortBufferSize?: ?int, + * sqlMode?: ?string, + * sqlRequirePrimaryKey?: ?bool, + * tmpTableSize?: ?int, + * version?: ?value-of, + * waitTimeout?: ?int, + * windowingUseHighPrecision?: ?bool, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->adminPassword = $values['adminPassword'] ?? null; + $this->adminUsername = $values['adminUsername'] ?? null; + $this->automaticSpPrivileges = $values['automaticSpPrivileges'] ?? null; + $this->automaticUtilityNetworkIpFilter = $values['automaticUtilityNetworkIpFilter'] ?? null; + $this->backupHour = $values['backupHour'] ?? null; + $this->backupMinute = $values['backupMinute'] ?? null; + $this->binlogRetentionPeriod = $values['binlogRetentionPeriod'] ?? null; + $this->connectTimeout = $values['connectTimeout'] ?? null; + $this->defaultTimeZone = $values['defaultTimeZone'] ?? null; + $this->divPrecisionIncrement = $values['divPrecisionIncrement'] ?? null; + $this->endMarkersInJson = $values['endMarkersInJson'] ?? null; + $this->eqRangeIndexDiveLimit = $values['eqRangeIndexDiveLimit'] ?? null; + $this->groupConcatMaxLen = $values['groupConcatMaxLen'] ?? null; + $this->informationSchemaStatsExpiry = $values['informationSchemaStatsExpiry'] ?? null; + $this->innodbAdaptiveHashIndex = $values['innodbAdaptiveHashIndex'] ?? null; + $this->innodbChangeBufferMaxSize = $values['innodbChangeBufferMaxSize'] ?? null; + $this->innodbFlushNeighbors = $values['innodbFlushNeighbors'] ?? null; + $this->innodbFtEnableStopword = $values['innodbFtEnableStopword'] ?? null; + $this->innodbFtMaxTokenSize = $values['innodbFtMaxTokenSize'] ?? null; + $this->innodbFtMinTokenSize = $values['innodbFtMinTokenSize'] ?? null; + $this->innodbFtNumWordOptimize = $values['innodbFtNumWordOptimize'] ?? null; + $this->innodbFtResultCacheLimit = $values['innodbFtResultCacheLimit'] ?? null; + $this->innodbFtServerStopwordTable = $values['innodbFtServerStopwordTable'] ?? null; + $this->innodbFtUserStopwordTable = $values['innodbFtUserStopwordTable'] ?? null; + $this->innodbIoCapacity = $values['innodbIoCapacity'] ?? null; + $this->innodbIoCapacityMax = $values['innodbIoCapacityMax'] ?? null; + $this->innodbLockWaitTimeout = $values['innodbLockWaitTimeout'] ?? null; + $this->innodbLogBufferSize = $values['innodbLogBufferSize'] ?? null; + $this->innodbOnlineAlterLogMaxSize = $values['innodbOnlineAlterLogMaxSize'] ?? null; + $this->innodbOptimizeFulltextOnly = $values['innodbOptimizeFulltextOnly'] ?? null; + $this->innodbPrintAllDeadlocks = $values['innodbPrintAllDeadlocks'] ?? null; + $this->innodbReadIoThreads = $values['innodbReadIoThreads'] ?? null; + $this->innodbRollbackOnTimeout = $values['innodbRollbackOnTimeout'] ?? null; + $this->innodbThreadConcurrency = $values['innodbThreadConcurrency'] ?? null; + $this->innodbWriteIoThreads = $values['innodbWriteIoThreads'] ?? null; + $this->interactiveTimeout = $values['interactiveTimeout'] ?? null; + $this->internalTmpMemStorageEngine = $values['internalTmpMemStorageEngine'] ?? null; + $this->ipFilter = $values['ipFilter'] ?? null; + $this->logOutput = $values['logOutput'] ?? null; + $this->longQueryTime = $values['longQueryTime'] ?? null; + $this->lowerCaseTableNames = $values['lowerCaseTableNames'] ?? null; + $this->maxAllowedPacket = $values['maxAllowedPacket'] ?? null; + $this->maxConnections = $values['maxConnections'] ?? null; + $this->maxExecutionTime = $values['maxExecutionTime'] ?? null; + $this->maxHeapTableSize = $values['maxHeapTableSize'] ?? null; + $this->maxSeeksForKey = $values['maxSeeksForKey'] ?? null; + $this->maxUserConnections = $values['maxUserConnections'] ?? null; + $this->migration = $values['migration'] ?? null; + $this->mysqlIncrementalBackup = $values['mysqlIncrementalBackup'] ?? null; + $this->netBufferLength = $values['netBufferLength'] ?? null; + $this->netReadTimeout = $values['netReadTimeout'] ?? null; + $this->netWriteTimeout = $values['netWriteTimeout'] ?? null; + $this->optimizerPruneLevel = $values['optimizerPruneLevel'] ?? null; + $this->optimizerSearchDepth = $values['optimizerSearchDepth'] ?? null; + $this->optimizerSwitch = $values['optimizerSwitch'] ?? null; + $this->performanceSchemaEventsStatementsHistorySize = $values['performanceSchemaEventsStatementsHistorySize'] ?? null; + $this->publicAccess = $values['publicAccess'] ?? null; + $this->publicAccessPrometheus = $values['publicAccessPrometheus'] ?? null; + $this->relayLogSpaceLimit = $values['relayLogSpaceLimit'] ?? null; + $this->serviceLog = $values['serviceLog'] ?? null; + $this->slowQueryLog = $values['slowQueryLog'] ?? null; + $this->sortBufferSize = $values['sortBufferSize'] ?? null; + $this->sqlMode = $values['sqlMode'] ?? null; + $this->sqlRequirePrimaryKey = $values['sqlRequirePrimaryKey'] ?? null; + $this->tmpTableSize = $values['tmpTableSize'] ?? null; + $this->version = $values['version'] ?? null; + $this->waitTimeout = $values['waitTimeout'] ?? null; + $this->windowingUseHighPrecision = $values['windowingUseHighPrecision'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesMysqlInternalTmpMemStorageEngine.php b/fern/sdk/src/Types/DatabaseServicePropertiesMysqlInternalTmpMemStorageEngine.php new file mode 100644 index 00000000..3ab48fd1 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesMysqlInternalTmpMemStorageEngine.php @@ -0,0 +1,9 @@ + $dumpTool Experimental! Tool to use for database dump and restore during migration. Default: mysqldump + */ + #[JsonProperty('dump_tool')] + public ?string $dumpTool; + + /** + * @var string $host + */ + #[JsonProperty('host')] + public string $host; + + /** + * @var ?string $ignoreDbs + */ + #[JsonProperty('ignore_dbs')] + public ?string $ignoreDbs; + + /** + * @var ?string $ignoreRoles + */ + #[JsonProperty('ignore_roles')] + public ?string $ignoreRoles; + + /** + * @var ?value-of $method + */ + #[JsonProperty('method')] + public ?string $method; + + /** + * @var ?string $password + */ + #[JsonProperty('password')] + public ?string $password; + + /** + * @var int $port + */ + #[JsonProperty('port')] + public int $port; + + /** + * @var ?bool $reestablishReplication + */ + #[JsonProperty('reestablish_replication')] + public ?bool $reestablishReplication; + + /** + * @var ?bool $ssl + */ + #[JsonProperty('ssl')] + public ?bool $ssl; + + /** + * @var ?string $username + */ + #[JsonProperty('username')] + public ?string $username; + + /** + * @param array{ + * host: string, + * port: int, + * dbname?: ?string, + * dumpTool?: ?value-of, + * ignoreDbs?: ?string, + * ignoreRoles?: ?string, + * method?: ?value-of, + * password?: ?string, + * reestablishReplication?: ?bool, + * ssl?: ?bool, + * username?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->dbname = $values['dbname'] ?? null; + $this->dumpTool = $values['dumpTool'] ?? null; + $this->host = $values['host']; + $this->ignoreDbs = $values['ignoreDbs'] ?? null; + $this->ignoreRoles = $values['ignoreRoles'] ?? null; + $this->method = $values['method'] ?? null; + $this->password = $values['password'] ?? null; + $this->port = $values['port']; + $this->reestablishReplication = $values['reestablishReplication'] ?? null; + $this->ssl = $values['ssl'] ?? null; + $this->username = $values['username'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesMysqlMigrationDumpTool.php b/fern/sdk/src/Types/DatabaseServicePropertiesMysqlMigrationDumpTool.php new file mode 100644 index 00000000..cc9bd93f --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesMysqlMigrationDumpTool.php @@ -0,0 +1,9 @@ +enabled = $values['enabled']; + $this->fullBackupWeekSchedule = $values['fullBackupWeekSchedule'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesMysqlVersion.php b/fern/sdk/src/Types/DatabaseServicePropertiesMysqlVersion.php new file mode 100644 index 00000000..2c8e9856 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesMysqlVersion.php @@ -0,0 +1,8 @@ + $customKeystores Allow to register custom keystores in OpenSearch + */ + #[JsonProperty('custom_keystores'), ArrayType([DatabaseServicePropertiesOpensearchCustomKeystoresItem::class])] + public ?array $customKeystores; + + /** + * @var ?array $customRepos Allow to register object storage repositories in OpenSearch + */ + #[JsonProperty('custom_repos'), ArrayType([DatabaseServicePropertiesOpensearchCustomReposItem::class])] + public ?array $customRepos; + + /** + * @var ?DatabaseServicePropertiesOpensearchDiskWatermarks $diskWatermarks + */ + #[JsonProperty('disk_watermarks')] + public ?DatabaseServicePropertiesOpensearchDiskWatermarks $diskWatermarks; + + /** + * @var ?value-of $elasticsearchVersion + */ + #[JsonProperty('elasticsearch_version')] + public ?string $elasticsearchVersion; + + /** + * @var ?string $emailSenderName This should be identical to the Sender name defined in Opensearch dashboards + */ + #[JsonProperty('email_sender_name')] + public ?string $emailSenderName; + + /** + * @var ?string $emailSenderPassword Sender password for Opensearch alerts to authenticate with SMTP server + */ + #[JsonProperty('email_sender_password')] + public ?string $emailSenderPassword; + + /** + * @var ?string $emailSenderUsername + */ + #[JsonProperty('email_sender_username')] + public ?string $emailSenderUsername; + + /** + * @var ?bool $enableRemoteBackedStorage + */ + #[JsonProperty('enable_remote_backed_storage')] + public ?bool $enableRemoteBackedStorage; + + /** + * @var ?bool $enableSearchableSnapshots + */ + #[JsonProperty('enable_searchable_snapshots')] + public ?bool $enableSearchableSnapshots; + + /** + * @var ?bool $enableSecurityAudit + */ + #[JsonProperty('enable_security_audit')] + public ?bool $enableSecurityAudit; + + /** + * @var ?bool $enableSnapshotApi Enable/Disable snapshot API for custom repositories, this requires security management to be enabled + */ + #[JsonProperty('enable_snapshot_api')] + public ?bool $enableSnapshotApi; + + /** + * @var ?int $httpMaxContentLength Maximum content length for HTTP requests to the OpenSearch HTTP API, in bytes. + */ + #[JsonProperty('http_max_content_length')] + public ?int $httpMaxContentLength; + + /** + * @var ?int $httpMaxHeaderSize The max size of allowed headers, in bytes + */ + #[JsonProperty('http_max_header_size')] + public ?int $httpMaxHeaderSize; + + /** + * @var ?int $httpMaxInitialLineLength The max length of an HTTP URL, in bytes + */ + #[JsonProperty('http_max_initial_line_length')] + public ?int $httpMaxInitialLineLength; + + /** + * @var ?array $indexPatterns + */ + #[JsonProperty('index_patterns'), ArrayType([DatabaseServicePropertiesOpensearchIndexPatternsItem::class])] + public ?array $indexPatterns; + + /** + * @var ?DatabaseServicePropertiesOpensearchIndexRollup $indexRollup + */ + #[JsonProperty('index_rollup')] + public ?DatabaseServicePropertiesOpensearchIndexRollup $indexRollup; + + /** + * @var ?DatabaseServicePropertiesOpensearchIndexTemplate $indexTemplate + */ + #[JsonProperty('index_template')] + public ?DatabaseServicePropertiesOpensearchIndexTemplate $indexTemplate; + + /** + * @var ?int $indicesFielddataCacheSize Relative amount. Maximum amount of heap memory used for field data cache. This is an expert setting; decreasing the value too much will increase overhead of loading field data; too much memory used for field data cache will decrease amount of heap available for other operations. + */ + #[JsonProperty('indices_fielddata_cache_size')] + public ?int $indicesFielddataCacheSize; + + /** + * @var ?int $indicesMemoryIndexBufferSize Percentage value. Default is 10%. Total amount of heap used for indexing buffer, before writing segments to disk. This is an expert setting. Too low value will slow down indexing; too high value will increase indexing performance but causes performance issues for query performance. + */ + #[JsonProperty('indices_memory_index_buffer_size')] + public ?int $indicesMemoryIndexBufferSize; + + /** + * @var ?int $indicesMemoryMaxIndexBufferSize Absolute value. Default is unbound. Doesn't work without indices.memory.index_buffer_size. Maximum amount of heap used for query cache, an absolute indices.memory.index_buffer_size maximum hard limit. + */ + #[JsonProperty('indices_memory_max_index_buffer_size')] + public ?int $indicesMemoryMaxIndexBufferSize; + + /** + * @var ?int $indicesMemoryMinIndexBufferSize Absolute value. Default is 48mb. Doesn't work without indices.memory.index_buffer_size. Minimum amount of heap used for query cache, an absolute indices.memory.index_buffer_size minimal hard limit. + */ + #[JsonProperty('indices_memory_min_index_buffer_size')] + public ?int $indicesMemoryMinIndexBufferSize; + + /** + * @var ?int $indicesQueriesCacheSize Percentage value. Default is 10%. Maximum amount of heap used for query cache. This is an expert setting. Too low value will decrease query performance and increase performance for other operations; too high value will cause issues with other OpenSearch functionality. + */ + #[JsonProperty('indices_queries_cache_size')] + public ?int $indicesQueriesCacheSize; + + /** + * @var ?int $indicesQueryBoolMaxClauseCount Maximum number of clauses Lucene BooleanQuery can have. The default value (1024) is relatively high, and increasing it may cause performance issues. Investigate other approaches first before increasing this value. + */ + #[JsonProperty('indices_query_bool_max_clause_count')] + public ?int $indicesQueryBoolMaxClauseCount; + + /** + * @var ?int $indicesRecoveryMaxBytesPerSec Limits total inbound and outbound recovery traffic for each node. Applies to both peer recoveries as well as snapshot recoveries (i.e., restores from a snapshot). Defaults to 40mb + */ + #[JsonProperty('indices_recovery_max_bytes_per_sec')] + public ?int $indicesRecoveryMaxBytesPerSec; + + /** + * @var ?int $indicesRecoveryMaxConcurrentFileChunks Number of file chunks sent in parallel for each recovery. Defaults to 2. + */ + #[JsonProperty('indices_recovery_max_concurrent_file_chunks')] + public ?int $indicesRecoveryMaxConcurrentFileChunks; + + /** + * @var ?array $ipFilter Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16' + */ + #[JsonProperty('ip_filter'), ArrayType(['string'])] + public ?array $ipFilter; + + /** + * @var ?bool $ismEnabled + */ + #[JsonProperty('ism_enabled')] + public ?bool $ismEnabled; + + /** + * @var ?bool $ismHistoryEnabled + */ + #[JsonProperty('ism_history_enabled')] + public ?bool $ismHistoryEnabled; + + /** + * @var ?int $ismHistoryMaxAge + */ + #[JsonProperty('ism_history_max_age')] + public ?int $ismHistoryMaxAge; + + /** + * @var ?int $ismHistoryMaxDocs + */ + #[JsonProperty('ism_history_max_docs')] + public ?int $ismHistoryMaxDocs; + + /** + * @var ?int $ismHistoryRolloverCheckPeriod + */ + #[JsonProperty('ism_history_rollover_check_period')] + public ?int $ismHistoryRolloverCheckPeriod; + + /** + * @var ?int $ismHistoryRolloverRetentionPeriod + */ + #[JsonProperty('ism_history_rollover_retention_period')] + public ?int $ismHistoryRolloverRetentionPeriod; + + /** + * @var ?DatabaseServicePropertiesOpensearchJwt $jwt + */ + #[JsonProperty('jwt')] + public ?DatabaseServicePropertiesOpensearchJwt $jwt; + + /** + * @var ?bool $keepIndexRefreshInterval UpCloud automation resets index.refresh_interval to default value for every index to be sure that indices are always visible to search. If it doesn't fit your case, you can disable this by setting up this flag to true. + */ + #[JsonProperty('keep_index_refresh_interval')] + public ?bool $keepIndexRefreshInterval; + + /** + * @var ?bool $knnMemoryCircuitBreakerEnabled Enable or disable KNN memory circuit breaker. Defaults to true. + */ + #[JsonProperty('knn_memory_circuit_breaker_enabled')] + public ?bool $knnMemoryCircuitBreakerEnabled; + + /** + * @var ?int $knnMemoryCircuitBreakerLimit Maximum amount of memory in percentage that can be used for the KNN index. Defaults to 50% of the JVM heap size. 0 is used to set it to null which can be used to invalidate caches. + */ + #[JsonProperty('knn_memory_circuit_breaker_limit')] + public ?int $knnMemoryCircuitBreakerLimit; + + /** + * @var ?bool $mlCommonsConnectorAccessControlEnabled When set to true, the setting allows admins to control access and permissions to the connector API using backend_roles. Defaults to false. + */ + #[JsonProperty('ml_commons_connector_access_control_enabled')] + public ?bool $mlCommonsConnectorAccessControlEnabled; + + /** + * @var ?bool $mlCommonsModelAccessControlEnabled Enable or disable model access control for ML Commons. When enabled, access to ML models is controlled by security permissions. Defaults to false. + */ + #[JsonProperty('ml_commons_model_access_control_enabled')] + public ?bool $mlCommonsModelAccessControlEnabled; + + /** + * @var ?int $mlCommonsNativeMemoryThreshold Native memory threshold percentage for ML Commons. Controls the maximum percentage of native memory that can be used by ML Commons operations. Defaults to 90%. + */ + #[JsonProperty('ml_commons_native_memory_threshold')] + public ?int $mlCommonsNativeMemoryThreshold; + + /** + * @var ?bool $mlCommonsOnlyRunOnMlNode Enable or disable running ML Commons tasks only on ML nodes. When enabled, ML tasks will only execute on nodes designated as ML nodes. Defaults to true. + */ + #[JsonProperty('ml_commons_only_run_on_ml_node')] + public ?bool $mlCommonsOnlyRunOnMlNode; + + /** + * @var ?array $mlCommonsTrustedConnectorEndpointsRegex Adds the trusted endpoints to the cluster settings. Supports Java regex expressions. + */ + #[JsonProperty('ml_commons_trusted_connector_endpoints_regex'), ArrayType(['string'])] + public ?array $mlCommonsTrustedConnectorEndpointsRegex; + + /** + * @var ?string $nodeSearchCacheSize Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 5gb. Requires restarting all OpenSearch nodes. + */ + #[JsonProperty('node_search_cache_size')] + public ?string $nodeSearchCacheSize; + + /** + * @var ?DatabaseServicePropertiesOpensearchOpenid $openid + */ + #[JsonProperty('openid')] + public ?DatabaseServicePropertiesOpensearchOpenid $openid; + + /** + * @var ?DatabaseServicePropertiesOpensearchOpensearchDashboards $opensearchDashboards + */ + #[JsonProperty('opensearch_dashboards')] + public ?DatabaseServicePropertiesOpensearchOpensearchDashboards $opensearchDashboards; + + /** + * @var ?bool $overrideMainResponseVersion Compatibility mode sets OpenSearch to report its version as 7.10 so clients continue to work. Default is false. Deprecated and ignored for service version 3.3 and higher. + */ + #[JsonProperty('override_main_response_version')] + public ?bool $overrideMainResponseVersion; + + /** + * @var ?bool $pluginsAlertingFilterByBackendRoles Enable or disable filtering of alerting by backend roles. Requires Security plugin. Defaults to false + */ + #[JsonProperty('plugins_alerting_filter_by_backend_roles')] + public ?bool $pluginsAlertingFilterByBackendRoles; + + /** + * @var ?bool $publicAccess Allow access to the service from the public Internet + */ + #[JsonProperty('public_access')] + public ?bool $publicAccess; + + /** + * @var ?bool $publicAccessPrometheus Allow access to Prometheus metrics from the public Internet + */ + #[JsonProperty('public_access_prometheus')] + public ?bool $publicAccessPrometheus; + + /** + * @var ?array $reindexRemoteWhitelist Whitelisted addresses for reindexing. Changing this value will cause all OpenSearch instances to restart. + */ + #[JsonProperty('reindex_remote_whitelist'), ArrayType([new Union('string', 'null')])] + public ?array $reindexRemoteWhitelist; + + /** + * @var ?DatabaseServicePropertiesOpensearchRemoteStore $remoteStore + */ + #[JsonProperty('remote_store')] + public ?DatabaseServicePropertiesOpensearchRemoteStore $remoteStore; + + /** + * @var ?DatabaseServicePropertiesOpensearchSaml $saml + */ + #[JsonProperty('saml')] + public ?DatabaseServicePropertiesOpensearchSaml $saml; + + /** + * @var ?string $scriptMaxCompilationsRate Script compilation circuit breaker limits the number of inline script compilations within a period of time. Default is use-context + */ + #[JsonProperty('script_max_compilations_rate')] + public ?string $scriptMaxCompilationsRate; + + /** + * @var ?DatabaseServicePropertiesOpensearchSearchBackpressure $searchBackpressure + */ + #[JsonProperty('search_backpressure')] + public ?DatabaseServicePropertiesOpensearchSearchBackpressure $searchBackpressure; + + /** + * @var ?DatabaseServicePropertiesOpensearchSearchInsightsTopQueries $searchInsightsTopQueries + */ + #[JsonProperty('search_insights_top_queries')] + public ?DatabaseServicePropertiesOpensearchSearchInsightsTopQueries $searchInsightsTopQueries; + + /** + * @var ?int $searchMaxBuckets Maximum number of aggregation buckets allowed in a single response. OpenSearch default value is used when this is not defined. + */ + #[JsonProperty('search_max_buckets')] + public ?int $searchMaxBuckets; + + /** + * @var ?DatabaseServicePropertiesOpensearchSegrep $segrep + */ + #[JsonProperty('segrep')] + public ?DatabaseServicePropertiesOpensearchSegrep $segrep; + + /** + * @var ?bool $serviceLog Store logs for the service so that they are available in the HTTP API and console. + */ + #[JsonProperty('service_log')] + public ?bool $serviceLog; + + /** + * @var ?DatabaseServicePropertiesOpensearchShardIndexingPressure $shardIndexingPressure + */ + #[JsonProperty('shard_indexing_pressure')] + public ?DatabaseServicePropertiesOpensearchShardIndexingPressure $shardIndexingPressure; + + /** + * @var ?int $threadPoolAnalyzeQueueSize Size for the thread pool queue. See documentation for exact details. + */ + #[JsonProperty('thread_pool_analyze_queue_size')] + public ?int $threadPoolAnalyzeQueueSize; + + /** + * @var ?int $threadPoolAnalyzeSize Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + */ + #[JsonProperty('thread_pool_analyze_size')] + public ?int $threadPoolAnalyzeSize; + + /** + * @var ?int $threadPoolForceMergeSize Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + */ + #[JsonProperty('thread_pool_force_merge_size')] + public ?int $threadPoolForceMergeSize; + + /** + * @var ?int $threadPoolGetQueueSize Size for the thread pool queue. See documentation for exact details. + */ + #[JsonProperty('thread_pool_get_queue_size')] + public ?int $threadPoolGetQueueSize; + + /** + * @var ?int $threadPoolGetSize Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + */ + #[JsonProperty('thread_pool_get_size')] + public ?int $threadPoolGetSize; + + /** + * @var ?int $threadPoolSearchQueueSize Size for the thread pool queue. See documentation for exact details. + */ + #[JsonProperty('thread_pool_search_queue_size')] + public ?int $threadPoolSearchQueueSize; + + /** + * @var ?int $threadPoolSearchSize Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + */ + #[JsonProperty('thread_pool_search_size')] + public ?int $threadPoolSearchSize; + + /** + * @var ?int $threadPoolSearchThrottledQueueSize Size for the thread pool queue. See documentation for exact details. + */ + #[JsonProperty('thread_pool_search_throttled_queue_size')] + public ?int $threadPoolSearchThrottledQueueSize; + + /** + * @var ?int $threadPoolSearchThrottledSize Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + */ + #[JsonProperty('thread_pool_search_throttled_size')] + public ?int $threadPoolSearchThrottledSize; + + /** + * @var ?int $threadPoolWriteQueueSize Size for the thread pool queue. See documentation for exact details. + */ + #[JsonProperty('thread_pool_write_queue_size')] + public ?int $threadPoolWriteQueueSize; + + /** + * @var ?int $threadPoolWriteSize Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. + */ + #[JsonProperty('thread_pool_write_size')] + public ?int $threadPoolWriteSize; + + /** + * @var ?value-of $version + */ + #[JsonProperty('version')] + public ?string $version; + + /** + * @param array{ + * actionAutoCreateIndexEnabled?: ?bool, + * actionDestructiveRequiresName?: ?bool, + * authFailureListeners?: ?DatabaseServicePropertiesOpensearchAuthFailureListeners, + * automaticUtilityNetworkIpFilter?: ?bool, + * clusterFilecacheRemoteDataRatio?: ( + * int + * |float + * )|null, + * clusterMaxShardsPerNode?: ?int, + * clusterRemoteStore?: ?DatabaseServicePropertiesOpensearchClusterRemoteStore, + * clusterRoutingAllocationBalancePreferPrimary?: ?bool, + * clusterRoutingAllocationNodeConcurrentRecoveries?: ?int, + * clusterSearchRequestSlowlog?: ?DatabaseServicePropertiesOpensearchClusterSearchRequestSlowlog, + * customDomain?: ?string, + * customKeystores?: ?array, + * customRepos?: ?array, + * diskWatermarks?: ?DatabaseServicePropertiesOpensearchDiskWatermarks, + * elasticsearchVersion?: ?value-of, + * emailSenderName?: ?string, + * emailSenderPassword?: ?string, + * emailSenderUsername?: ?string, + * enableRemoteBackedStorage?: ?bool, + * enableSearchableSnapshots?: ?bool, + * enableSecurityAudit?: ?bool, + * enableSnapshotApi?: ?bool, + * httpMaxContentLength?: ?int, + * httpMaxHeaderSize?: ?int, + * httpMaxInitialLineLength?: ?int, + * indexPatterns?: ?array, + * indexRollup?: ?DatabaseServicePropertiesOpensearchIndexRollup, + * indexTemplate?: ?DatabaseServicePropertiesOpensearchIndexTemplate, + * indicesFielddataCacheSize?: ?int, + * indicesMemoryIndexBufferSize?: ?int, + * indicesMemoryMaxIndexBufferSize?: ?int, + * indicesMemoryMinIndexBufferSize?: ?int, + * indicesQueriesCacheSize?: ?int, + * indicesQueryBoolMaxClauseCount?: ?int, + * indicesRecoveryMaxBytesPerSec?: ?int, + * indicesRecoveryMaxConcurrentFileChunks?: ?int, + * ipFilter?: ?array, + * ismEnabled?: ?bool, + * ismHistoryEnabled?: ?bool, + * ismHistoryMaxAge?: ?int, + * ismHistoryMaxDocs?: ?int, + * ismHistoryRolloverCheckPeriod?: ?int, + * ismHistoryRolloverRetentionPeriod?: ?int, + * jwt?: ?DatabaseServicePropertiesOpensearchJwt, + * keepIndexRefreshInterval?: ?bool, + * knnMemoryCircuitBreakerEnabled?: ?bool, + * knnMemoryCircuitBreakerLimit?: ?int, + * mlCommonsConnectorAccessControlEnabled?: ?bool, + * mlCommonsModelAccessControlEnabled?: ?bool, + * mlCommonsNativeMemoryThreshold?: ?int, + * mlCommonsOnlyRunOnMlNode?: ?bool, + * mlCommonsTrustedConnectorEndpointsRegex?: ?array, + * nodeSearchCacheSize?: ?string, + * openid?: ?DatabaseServicePropertiesOpensearchOpenid, + * opensearchDashboards?: ?DatabaseServicePropertiesOpensearchOpensearchDashboards, + * overrideMainResponseVersion?: ?bool, + * pluginsAlertingFilterByBackendRoles?: ?bool, + * publicAccess?: ?bool, + * publicAccessPrometheus?: ?bool, + * reindexRemoteWhitelist?: ?array, + * remoteStore?: ?DatabaseServicePropertiesOpensearchRemoteStore, + * saml?: ?DatabaseServicePropertiesOpensearchSaml, + * scriptMaxCompilationsRate?: ?string, + * searchBackpressure?: ?DatabaseServicePropertiesOpensearchSearchBackpressure, + * searchInsightsTopQueries?: ?DatabaseServicePropertiesOpensearchSearchInsightsTopQueries, + * searchMaxBuckets?: ?int, + * segrep?: ?DatabaseServicePropertiesOpensearchSegrep, + * serviceLog?: ?bool, + * shardIndexingPressure?: ?DatabaseServicePropertiesOpensearchShardIndexingPressure, + * threadPoolAnalyzeQueueSize?: ?int, + * threadPoolAnalyzeSize?: ?int, + * threadPoolForceMergeSize?: ?int, + * threadPoolGetQueueSize?: ?int, + * threadPoolGetSize?: ?int, + * threadPoolSearchQueueSize?: ?int, + * threadPoolSearchSize?: ?int, + * threadPoolSearchThrottledQueueSize?: ?int, + * threadPoolSearchThrottledSize?: ?int, + * threadPoolWriteQueueSize?: ?int, + * threadPoolWriteSize?: ?int, + * version?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->actionAutoCreateIndexEnabled = $values['actionAutoCreateIndexEnabled'] ?? null; + $this->actionDestructiveRequiresName = $values['actionDestructiveRequiresName'] ?? null; + $this->authFailureListeners = $values['authFailureListeners'] ?? null; + $this->automaticUtilityNetworkIpFilter = $values['automaticUtilityNetworkIpFilter'] ?? null; + $this->clusterFilecacheRemoteDataRatio = $values['clusterFilecacheRemoteDataRatio'] ?? null; + $this->clusterMaxShardsPerNode = $values['clusterMaxShardsPerNode'] ?? null; + $this->clusterRemoteStore = $values['clusterRemoteStore'] ?? null; + $this->clusterRoutingAllocationBalancePreferPrimary = $values['clusterRoutingAllocationBalancePreferPrimary'] ?? null; + $this->clusterRoutingAllocationNodeConcurrentRecoveries = $values['clusterRoutingAllocationNodeConcurrentRecoveries'] ?? null; + $this->clusterSearchRequestSlowlog = $values['clusterSearchRequestSlowlog'] ?? null; + $this->customDomain = $values['customDomain'] ?? null; + $this->customKeystores = $values['customKeystores'] ?? null; + $this->customRepos = $values['customRepos'] ?? null; + $this->diskWatermarks = $values['diskWatermarks'] ?? null; + $this->elasticsearchVersion = $values['elasticsearchVersion'] ?? null; + $this->emailSenderName = $values['emailSenderName'] ?? null; + $this->emailSenderPassword = $values['emailSenderPassword'] ?? null; + $this->emailSenderUsername = $values['emailSenderUsername'] ?? null; + $this->enableRemoteBackedStorage = $values['enableRemoteBackedStorage'] ?? null; + $this->enableSearchableSnapshots = $values['enableSearchableSnapshots'] ?? null; + $this->enableSecurityAudit = $values['enableSecurityAudit'] ?? null; + $this->enableSnapshotApi = $values['enableSnapshotApi'] ?? null; + $this->httpMaxContentLength = $values['httpMaxContentLength'] ?? null; + $this->httpMaxHeaderSize = $values['httpMaxHeaderSize'] ?? null; + $this->httpMaxInitialLineLength = $values['httpMaxInitialLineLength'] ?? null; + $this->indexPatterns = $values['indexPatterns'] ?? null; + $this->indexRollup = $values['indexRollup'] ?? null; + $this->indexTemplate = $values['indexTemplate'] ?? null; + $this->indicesFielddataCacheSize = $values['indicesFielddataCacheSize'] ?? null; + $this->indicesMemoryIndexBufferSize = $values['indicesMemoryIndexBufferSize'] ?? null; + $this->indicesMemoryMaxIndexBufferSize = $values['indicesMemoryMaxIndexBufferSize'] ?? null; + $this->indicesMemoryMinIndexBufferSize = $values['indicesMemoryMinIndexBufferSize'] ?? null; + $this->indicesQueriesCacheSize = $values['indicesQueriesCacheSize'] ?? null; + $this->indicesQueryBoolMaxClauseCount = $values['indicesQueryBoolMaxClauseCount'] ?? null; + $this->indicesRecoveryMaxBytesPerSec = $values['indicesRecoveryMaxBytesPerSec'] ?? null; + $this->indicesRecoveryMaxConcurrentFileChunks = $values['indicesRecoveryMaxConcurrentFileChunks'] ?? null; + $this->ipFilter = $values['ipFilter'] ?? null; + $this->ismEnabled = $values['ismEnabled'] ?? null; + $this->ismHistoryEnabled = $values['ismHistoryEnabled'] ?? null; + $this->ismHistoryMaxAge = $values['ismHistoryMaxAge'] ?? null; + $this->ismHistoryMaxDocs = $values['ismHistoryMaxDocs'] ?? null; + $this->ismHistoryRolloverCheckPeriod = $values['ismHistoryRolloverCheckPeriod'] ?? null; + $this->ismHistoryRolloverRetentionPeriod = $values['ismHistoryRolloverRetentionPeriod'] ?? null; + $this->jwt = $values['jwt'] ?? null; + $this->keepIndexRefreshInterval = $values['keepIndexRefreshInterval'] ?? null; + $this->knnMemoryCircuitBreakerEnabled = $values['knnMemoryCircuitBreakerEnabled'] ?? null; + $this->knnMemoryCircuitBreakerLimit = $values['knnMemoryCircuitBreakerLimit'] ?? null; + $this->mlCommonsConnectorAccessControlEnabled = $values['mlCommonsConnectorAccessControlEnabled'] ?? null; + $this->mlCommonsModelAccessControlEnabled = $values['mlCommonsModelAccessControlEnabled'] ?? null; + $this->mlCommonsNativeMemoryThreshold = $values['mlCommonsNativeMemoryThreshold'] ?? null; + $this->mlCommonsOnlyRunOnMlNode = $values['mlCommonsOnlyRunOnMlNode'] ?? null; + $this->mlCommonsTrustedConnectorEndpointsRegex = $values['mlCommonsTrustedConnectorEndpointsRegex'] ?? null; + $this->nodeSearchCacheSize = $values['nodeSearchCacheSize'] ?? null; + $this->openid = $values['openid'] ?? null; + $this->opensearchDashboards = $values['opensearchDashboards'] ?? null; + $this->overrideMainResponseVersion = $values['overrideMainResponseVersion'] ?? null; + $this->pluginsAlertingFilterByBackendRoles = $values['pluginsAlertingFilterByBackendRoles'] ?? null; + $this->publicAccess = $values['publicAccess'] ?? null; + $this->publicAccessPrometheus = $values['publicAccessPrometheus'] ?? null; + $this->reindexRemoteWhitelist = $values['reindexRemoteWhitelist'] ?? null; + $this->remoteStore = $values['remoteStore'] ?? null; + $this->saml = $values['saml'] ?? null; + $this->scriptMaxCompilationsRate = $values['scriptMaxCompilationsRate'] ?? null; + $this->searchBackpressure = $values['searchBackpressure'] ?? null; + $this->searchInsightsTopQueries = $values['searchInsightsTopQueries'] ?? null; + $this->searchMaxBuckets = $values['searchMaxBuckets'] ?? null; + $this->segrep = $values['segrep'] ?? null; + $this->serviceLog = $values['serviceLog'] ?? null; + $this->shardIndexingPressure = $values['shardIndexingPressure'] ?? null; + $this->threadPoolAnalyzeQueueSize = $values['threadPoolAnalyzeQueueSize'] ?? null; + $this->threadPoolAnalyzeSize = $values['threadPoolAnalyzeSize'] ?? null; + $this->threadPoolForceMergeSize = $values['threadPoolForceMergeSize'] ?? null; + $this->threadPoolGetQueueSize = $values['threadPoolGetQueueSize'] ?? null; + $this->threadPoolGetSize = $values['threadPoolGetSize'] ?? null; + $this->threadPoolSearchQueueSize = $values['threadPoolSearchQueueSize'] ?? null; + $this->threadPoolSearchSize = $values['threadPoolSearchSize'] ?? null; + $this->threadPoolSearchThrottledQueueSize = $values['threadPoolSearchThrottledQueueSize'] ?? null; + $this->threadPoolSearchThrottledSize = $values['threadPoolSearchThrottledSize'] ?? null; + $this->threadPoolWriteQueueSize = $values['threadPoolWriteQueueSize'] ?? null; + $this->threadPoolWriteSize = $values['threadPoolWriteSize'] ?? null; + $this->version = $values['version'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchAuthFailureListeners.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchAuthFailureListeners.php new file mode 100644 index 00000000..763e6fcb --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchAuthFailureListeners.php @@ -0,0 +1,34 @@ +internalAuthenticationBackendLimiting = $values['internalAuthenticationBackendLimiting'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchAuthFailureListenersInternalAuthenticationBackendLimiting.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchAuthFailureListenersInternalAuthenticationBackendLimiting.php new file mode 100644 index 00000000..4901b80f --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchAuthFailureListenersInternalAuthenticationBackendLimiting.php @@ -0,0 +1,82 @@ + $authenticationBackend The internal backend. Enter `internal` + */ + #[JsonProperty('authentication_backend')] + public ?string $authenticationBackend; + + /** + * @var ?int $blockExpirySeconds The duration of time that login remains blocked after a failed login + */ + #[JsonProperty('block_expiry_seconds')] + public ?int $blockExpirySeconds; + + /** + * @var ?int $maxBlockedClients The maximum number of blocked IP addresses + */ + #[JsonProperty('max_blocked_clients')] + public ?int $maxBlockedClients; + + /** + * @var ?int $maxTrackedClients The maximum number of tracked IP addresses that have failed login + */ + #[JsonProperty('max_tracked_clients')] + public ?int $maxTrackedClients; + + /** + * @var ?int $timeWindowSeconds The window of time in which the value for `allowed_tries` is enforced + */ + #[JsonProperty('time_window_seconds')] + public ?int $timeWindowSeconds; + + /** + * @var ?value-of $type The type of rate limiting + */ + #[JsonProperty('type')] + public ?string $type; + + /** + * @param array{ + * allowedTries?: ?int, + * authenticationBackend?: ?value-of, + * blockExpirySeconds?: ?int, + * maxBlockedClients?: ?int, + * maxTrackedClients?: ?int, + * timeWindowSeconds?: ?int, + * type?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->allowedTries = $values['allowedTries'] ?? null; + $this->authenticationBackend = $values['authenticationBackend'] ?? null; + $this->blockExpirySeconds = $values['blockExpirySeconds'] ?? null; + $this->maxBlockedClients = $values['maxBlockedClients'] ?? null; + $this->maxTrackedClients = $values['maxTrackedClients'] ?? null; + $this->timeWindowSeconds = $values['timeWindowSeconds'] ?? null; + $this->type = $values['type'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchAuthFailureListenersInternalAuthenticationBackendLimitingAuthenticationBackend.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchAuthFailureListenersInternalAuthenticationBackendLimitingAuthenticationBackend.php new file mode 100644 index 00000000..ae3e142f --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchAuthFailureListenersInternalAuthenticationBackendLimitingAuthenticationBackend.php @@ -0,0 +1,8 @@ +stateGlobalMetadataUploadTimeout = $values['stateGlobalMetadataUploadTimeout'] ?? null; + $this->stateMetadataManifestUploadTimeout = $values['stateMetadataManifestUploadTimeout'] ?? null; + $this->translogBufferInterval = $values['translogBufferInterval'] ?? null; + $this->translogMaxReaders = $values['translogMaxReaders'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchClusterSearchRequestSlowlog.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchClusterSearchRequestSlowlog.php new file mode 100644 index 00000000..2be61c6c --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchClusterSearchRequestSlowlog.php @@ -0,0 +1,42 @@ + $level + */ + #[JsonProperty('level')] + public ?string $level; + + /** + * @var ?DatabaseServicePropertiesOpensearchClusterSearchRequestSlowlogThreshold $threshold + */ + #[JsonProperty('threshold')] + public ?DatabaseServicePropertiesOpensearchClusterSearchRequestSlowlogThreshold $threshold; + + /** + * @param array{ + * level?: ?value-of, + * threshold?: ?DatabaseServicePropertiesOpensearchClusterSearchRequestSlowlogThreshold, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->level = $values['level'] ?? null; + $this->threshold = $values['threshold'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchClusterSearchRequestSlowlogLevel.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchClusterSearchRequestSlowlogLevel.php new file mode 100644 index 00000000..17092e24 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchClusterSearchRequestSlowlogLevel.php @@ -0,0 +1,11 @@ +debug = $values['debug'] ?? null; + $this->info = $values['info'] ?? null; + $this->trace = $values['trace'] ?? null; + $this->warn = $values['warn'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItem.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItem.php new file mode 100644 index 00000000..473cc2e2 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItem.php @@ -0,0 +1,59 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @param array{ + * name: string, + * settings: ( + * DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsAccount + * |DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsCredentials + * |DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsAccessKey + * ), + * type: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->settings = $values['settings']; + $this->type = $values['type']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsAccessKey.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsAccessKey.php new file mode 100644 index 00000000..4f24889c --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsAccessKey.php @@ -0,0 +1,42 @@ +accessKey = $values['accessKey']; + $this->secretKey = $values['secretKey']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsAccount.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsAccount.php new file mode 100644 index 00000000..c7991bcd --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsAccount.php @@ -0,0 +1,50 @@ +account = $values['account']; + $this->key = $values['key'] ?? null; + $this->sasToken = $values['sasToken'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsCredentials.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsCredentials.php new file mode 100644 index 00000000..e18af4f7 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsCredentials.php @@ -0,0 +1,34 @@ +credentials = $values['credentials']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsCredentialsCredentials.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsCredentialsCredentials.php new file mode 100644 index 00000000..1c97d4ed --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemSettingsCredentialsCredentials.php @@ -0,0 +1,130 @@ +authProviderX509CertUrl = $values['authProviderX509CertUrl'] ?? null; + $this->authUri = $values['authUri'] ?? null; + $this->clientEmail = $values['clientEmail']; + $this->clientId = $values['clientId']; + $this->clientX509CertUrl = $values['clientX509CertUrl'] ?? null; + $this->hmacAccessId = $values['hmacAccessId'] ?? null; + $this->hmacSecret = $values['hmacSecret'] ?? null; + $this->privateKey = $values['privateKey']; + $this->privateKeyId = $values['privateKeyId']; + $this->projectId = $values['projectId'] ?? null; + $this->tokenUri = $values['tokenUri'] ?? null; + $this->type = $values['type']; + $this->universeDomain = $values['universeDomain'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemType.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemType.php new file mode 100644 index 00000000..5ad679d5 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomKeystoresItemType.php @@ -0,0 +1,10 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @param array{ + * name: string, + * settings: ( + * DatabaseServicePropertiesOpensearchCustomReposItemSettingsAccount + * |DatabaseServicePropertiesOpensearchCustomReposItemSettingsCredentials + * |DatabaseServicePropertiesOpensearchCustomReposItemSettingsAccessKey + * ), + * type: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->settings = $values['settings']; + $this->type = $values['type']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemSettingsAccessKey.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemSettingsAccessKey.php new file mode 100644 index 00000000..bb673b43 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemSettingsAccessKey.php @@ -0,0 +1,122 @@ +accessKey = $values['accessKey']; + $this->basePath = $values['basePath']; + $this->bucket = $values['bucket']; + $this->chunkSize = $values['chunkSize'] ?? null; + $this->compress = $values['compress'] ?? null; + $this->endpoint = $values['endpoint'] ?? null; + $this->maxRestoreBytesPerSec = $values['maxRestoreBytesPerSec'] ?? null; + $this->maxSnapshotBytesPerSec = $values['maxSnapshotBytesPerSec'] ?? null; + $this->readonly = $values['readonly'] ?? null; + $this->region = $values['region']; + $this->secretKey = $values['secretKey']; + $this->serverSideEncryption = $values['serverSideEncryption'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemSettingsAccount.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemSettingsAccount.php new file mode 100644 index 00000000..cb78bfee --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemSettingsAccount.php @@ -0,0 +1,114 @@ +account = $values['account']; + $this->basePath = $values['basePath']; + $this->chunkSize = $values['chunkSize'] ?? null; + $this->compress = $values['compress'] ?? null; + $this->container = $values['container']; + $this->endpointSuffix = $values['endpointSuffix'] ?? null; + $this->key = $values['key'] ?? null; + $this->maxRestoreBytesPerSec = $values['maxRestoreBytesPerSec'] ?? null; + $this->maxSnapshotBytesPerSec = $values['maxSnapshotBytesPerSec'] ?? null; + $this->readonly = $values['readonly'] ?? null; + $this->sasToken = $values['sasToken'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemSettingsCredentials.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemSettingsCredentials.php new file mode 100644 index 00000000..a7d395fb --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemSettingsCredentials.php @@ -0,0 +1,90 @@ +basePath = $values['basePath']; + $this->bucket = $values['bucket']; + $this->chunkSize = $values['chunkSize'] ?? null; + $this->compress = $values['compress'] ?? null; + $this->credentials = $values['credentials']; + $this->maxRestoreBytesPerSec = $values['maxRestoreBytesPerSec'] ?? null; + $this->maxSnapshotBytesPerSec = $values['maxSnapshotBytesPerSec'] ?? null; + $this->readonly = $values['readonly'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemSettingsCredentialsCredentials.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemSettingsCredentialsCredentials.php new file mode 100644 index 00000000..5821d524 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemSettingsCredentialsCredentials.php @@ -0,0 +1,130 @@ +authProviderX509CertUrl = $values['authProviderX509CertUrl'] ?? null; + $this->authUri = $values['authUri'] ?? null; + $this->clientEmail = $values['clientEmail']; + $this->clientId = $values['clientId']; + $this->clientX509CertUrl = $values['clientX509CertUrl'] ?? null; + $this->hmacAccessId = $values['hmacAccessId'] ?? null; + $this->hmacSecret = $values['hmacSecret'] ?? null; + $this->privateKey = $values['privateKey']; + $this->privateKeyId = $values['privateKeyId']; + $this->projectId = $values['projectId'] ?? null; + $this->tokenUri = $values['tokenUri'] ?? null; + $this->type = $values['type']; + $this->universeDomain = $values['universeDomain'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemType.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemType.php new file mode 100644 index 00000000..e622abed --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchCustomReposItemType.php @@ -0,0 +1,10 @@ +floodStage = $values['floodStage']; + $this->high = $values['high']; + $this->low = $values['low']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchElasticsearchVersion.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchElasticsearchVersion.php new file mode 100644 index 00000000..15d29820 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchElasticsearchVersion.php @@ -0,0 +1,12 @@ + $sortingAlgorithm + */ + #[JsonProperty('sorting_algorithm')] + public ?string $sortingAlgorithm; + + /** + * @param array{ + * maxIndexCount: int, + * pattern: string, + * sortingAlgorithm?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->maxIndexCount = $values['maxIndexCount']; + $this->pattern = $values['pattern']; + $this->sortingAlgorithm = $values['sortingAlgorithm'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchIndexPatternsItemSortingAlgorithm.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchIndexPatternsItemSortingAlgorithm.php new file mode 100644 index 00000000..5fa6e4c6 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchIndexPatternsItemSortingAlgorithm.php @@ -0,0 +1,9 @@ +rollupDashboardsEnabled = $values['rollupDashboardsEnabled'] ?? null; + $this->rollupEnabled = $values['rollupEnabled'] ?? null; + $this->rollupSearchBackoffCount = $values['rollupSearchBackoffCount'] ?? null; + $this->rollupSearchBackoffMillis = $values['rollupSearchBackoffMillis'] ?? null; + $this->rollupSearchSearchAllJobs = $values['rollupSearchSearchAllJobs'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchIndexTemplate.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchIndexTemplate.php new file mode 100644 index 00000000..b7b60184 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchIndexTemplate.php @@ -0,0 +1,50 @@ +mappingNestedObjectsLimit = $values['mappingNestedObjectsLimit'] ?? null; + $this->numberOfReplicas = $values['numberOfReplicas'] ?? null; + $this->numberOfShards = $values['numberOfShards'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchJwt.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchJwt.php new file mode 100644 index 00000000..23f007ae --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchJwt.php @@ -0,0 +1,98 @@ +enabled = $values['enabled']; + $this->jwtClockSkewToleranceSeconds = $values['jwtClockSkewToleranceSeconds'] ?? null; + $this->jwtHeader = $values['jwtHeader'] ?? null; + $this->jwtUrlParameter = $values['jwtUrlParameter'] ?? null; + $this->requiredAudience = $values['requiredAudience'] ?? null; + $this->requiredIssuer = $values['requiredIssuer'] ?? null; + $this->rolesKey = $values['rolesKey'] ?? null; + $this->signingKey = $values['signingKey']; + $this->subjectKey = $values['subjectKey'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchOpenid.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchOpenid.php new file mode 100644 index 00000000..fde476f1 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchOpenid.php @@ -0,0 +1,122 @@ +. Optional. Default is Authorization. + */ + #[JsonProperty('jwt_header')] + public ?string $jwtHeader; + + /** + * @var ?string $jwtUrlParameter If the token is not transmitted in the HTTP header, but as an URL parameter, define the name of the parameter here. Optional. + */ + #[JsonProperty('jwt_url_parameter')] + public ?string $jwtUrlParameter; + + /** + * @var ?int $refreshRateLimitCount The maximum number of unknown key IDs in the time frame. Default is 10. Optional. + */ + #[JsonProperty('refresh_rate_limit_count')] + public ?int $refreshRateLimitCount; + + /** + * @var ?int $refreshRateLimitTimeWindowMs The time frame to use when checking the maximum number of unknown key IDs, in milliseconds. Optional.Default is 10000 (10 seconds). + */ + #[JsonProperty('refresh_rate_limit_time_window_ms')] + public ?int $refreshRateLimitTimeWindowMs; + + /** + * @var ?string $rolesKey The key in the JSON payload that stores the user’s roles. The value of this key must be a comma-separated list of roles. Required only if you want to use roles in the JWT + */ + #[JsonProperty('roles_key')] + public ?string $rolesKey; + + /** + * @var ?string $scope The scope of the identity token issued by the IdP. Optional. Default is openid profile email address phone. + */ + #[JsonProperty('scope')] + public ?string $scope; + + /** + * @var ?string $subjectKey The key in the JSON payload that stores the user’s name. If not defined, the subject registered claim is used. Most IdP providers use the preferred_username claim. Optional. + */ + #[JsonProperty('subject_key')] + public ?string $subjectKey; + + /** + * @param array{ + * clientId: string, + * clientSecret: string, + * connectUrl: string, + * enabled: bool, + * header?: ?string, + * jwtHeader?: ?string, + * jwtUrlParameter?: ?string, + * refreshRateLimitCount?: ?int, + * refreshRateLimitTimeWindowMs?: ?int, + * rolesKey?: ?string, + * scope?: ?string, + * subjectKey?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->clientId = $values['clientId']; + $this->clientSecret = $values['clientSecret']; + $this->connectUrl = $values['connectUrl']; + $this->enabled = $values['enabled']; + $this->header = $values['header'] ?? null; + $this->jwtHeader = $values['jwtHeader'] ?? null; + $this->jwtUrlParameter = $values['jwtUrlParameter'] ?? null; + $this->refreshRateLimitCount = $values['refreshRateLimitCount'] ?? null; + $this->refreshRateLimitTimeWindowMs = $values['refreshRateLimitTimeWindowMs'] ?? null; + $this->rolesKey = $values['rolesKey'] ?? null; + $this->scope = $values['scope'] ?? null; + $this->subjectKey = $values['subjectKey'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchOpensearchDashboards.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchOpensearchDashboards.php new file mode 100644 index 00000000..c71c5705 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchOpensearchDashboards.php @@ -0,0 +1,74 @@ +enabled = $values['enabled'] ?? null; + $this->maxOldSpaceSize = $values['maxOldSpaceSize'] ?? null; + $this->multipleDataSourceEnabled = $values['multipleDataSourceEnabled'] ?? null; + $this->opensearchRequestTimeout = $values['opensearchRequestTimeout'] ?? null; + $this->sessionKeepalive = $values['sessionKeepalive'] ?? null; + $this->sessionTtl = $values['sessionTtl'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchRemoteStore.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchRemoteStore.php new file mode 100644 index 00000000..c86d7f8c --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchRemoteStore.php @@ -0,0 +1,58 @@ +segmentPressureBytesLagVarianceFactor = $values['segmentPressureBytesLagVarianceFactor'] ?? null; + $this->segmentPressureConsecutiveFailuresLimit = $values['segmentPressureConsecutiveFailuresLimit'] ?? null; + $this->segmentPressureEnabled = $values['segmentPressureEnabled'] ?? null; + $this->segmentPressureTimeLagVarianceFactor = $values['segmentPressureTimeLagVarianceFactor'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSaml.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSaml.php new file mode 100644 index 00000000..59803d30 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSaml.php @@ -0,0 +1,82 @@ +enabled = $values['enabled']; + $this->idpEntityId = $values['idpEntityId']; + $this->idpMetadataUrl = $values['idpMetadataUrl']; + $this->idpPemtrustedcasContent = $values['idpPemtrustedcasContent'] ?? null; + $this->rolesKey = $values['rolesKey'] ?? null; + $this->spEntityId = $values['spEntityId']; + $this->subjectKey = $values['subjectKey'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressure.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressure.php new file mode 100644 index 00000000..ccec7a1a --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressure.php @@ -0,0 +1,58 @@ + $mode The search backpressure mode. Valid values are monitor_only, enforced, or disabled. Default is monitor_only + */ + #[JsonProperty('mode')] + public ?string $mode; + + /** + * @var ?DatabaseServicePropertiesOpensearchSearchBackpressureNodeDuress $nodeDuress + */ + #[JsonProperty('node_duress')] + public ?DatabaseServicePropertiesOpensearchSearchBackpressureNodeDuress $nodeDuress; + + /** + * @var ?DatabaseServicePropertiesOpensearchSearchBackpressureSearchShardTask $searchShardTask + */ + #[JsonProperty('search_shard_task')] + public ?DatabaseServicePropertiesOpensearchSearchBackpressureSearchShardTask $searchShardTask; + + /** + * @var ?DatabaseServicePropertiesOpensearchSearchBackpressureSearchTask $searchTask + */ + #[JsonProperty('search_task')] + public ?DatabaseServicePropertiesOpensearchSearchBackpressureSearchTask $searchTask; + + /** + * @param array{ + * mode?: ?value-of, + * nodeDuress?: ?DatabaseServicePropertiesOpensearchSearchBackpressureNodeDuress, + * searchShardTask?: ?DatabaseServicePropertiesOpensearchSearchBackpressureSearchShardTask, + * searchTask?: ?DatabaseServicePropertiesOpensearchSearchBackpressureSearchTask, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->mode = $values['mode'] ?? null; + $this->nodeDuress = $values['nodeDuress'] ?? null; + $this->searchShardTask = $values['searchShardTask'] ?? null; + $this->searchTask = $values['searchTask'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressureMode.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressureMode.php new file mode 100644 index 00000000..de822a12 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressureMode.php @@ -0,0 +1,10 @@ +cpuThreshold = $values['cpuThreshold'] ?? null; + $this->heapThreshold = $values['heapThreshold'] ?? null; + $this->numSuccessiveBreaches = $values['numSuccessiveBreaches'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressureSearchShardTask.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressureSearchShardTask.php new file mode 100644 index 00000000..a43603ac --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressureSearchShardTask.php @@ -0,0 +1,98 @@ +cancellationBurst = $values['cancellationBurst'] ?? null; + $this->cancellationRate = $values['cancellationRate'] ?? null; + $this->cancellationRatio = $values['cancellationRatio'] ?? null; + $this->cpuTimeMillisThreshold = $values['cpuTimeMillisThreshold'] ?? null; + $this->elapsedTimeMillisThreshold = $values['elapsedTimeMillisThreshold'] ?? null; + $this->heapMovingAverageWindowSize = $values['heapMovingAverageWindowSize'] ?? null; + $this->heapPercentThreshold = $values['heapPercentThreshold'] ?? null; + $this->heapVariance = $values['heapVariance'] ?? null; + $this->totalHeapPercentThreshold = $values['totalHeapPercentThreshold'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressureSearchTask.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressureSearchTask.php new file mode 100644 index 00000000..3e73a7f5 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchBackpressureSearchTask.php @@ -0,0 +1,98 @@ +cancellationBurst = $values['cancellationBurst'] ?? null; + $this->cancellationRate = $values['cancellationRate'] ?? null; + $this->cancellationRatio = $values['cancellationRatio'] ?? null; + $this->cpuTimeMillisThreshold = $values['cpuTimeMillisThreshold'] ?? null; + $this->elapsedTimeMillisThreshold = $values['elapsedTimeMillisThreshold'] ?? null; + $this->heapMovingAverageWindowSize = $values['heapMovingAverageWindowSize'] ?? null; + $this->heapPercentThreshold = $values['heapPercentThreshold'] ?? null; + $this->heapVariance = $values['heapVariance'] ?? null; + $this->totalHeapPercentThreshold = $values['totalHeapPercentThreshold'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchInsightsTopQueries.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchInsightsTopQueries.php new file mode 100644 index 00000000..4d17be6e --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchInsightsTopQueries.php @@ -0,0 +1,50 @@ +cpu = $values['cpu'] ?? null; + $this->latency = $values['latency'] ?? null; + $this->memory = $values['memory'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchInsightsTopQueriesCpu.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchInsightsTopQueriesCpu.php new file mode 100644 index 00000000..94424837 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchInsightsTopQueriesCpu.php @@ -0,0 +1,50 @@ +enabled = $values['enabled'] ?? null; + $this->topNSize = $values['topNSize'] ?? null; + $this->windowSize = $values['windowSize'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchInsightsTopQueriesLatency.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchInsightsTopQueriesLatency.php new file mode 100644 index 00000000..95f5f2a8 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchInsightsTopQueriesLatency.php @@ -0,0 +1,50 @@ +enabled = $values['enabled'] ?? null; + $this->topNSize = $values['topNSize'] ?? null; + $this->windowSize = $values['windowSize'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchInsightsTopQueriesMemory.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchInsightsTopQueriesMemory.php new file mode 100644 index 00000000..c93a85d4 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSearchInsightsTopQueriesMemory.php @@ -0,0 +1,50 @@ +enabled = $values['enabled'] ?? null; + $this->topNSize = $values['topNSize'] ?? null; + $this->windowSize = $values['windowSize'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSegrep.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSegrep.php new file mode 100644 index 00000000..60915b20 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchSegrep.php @@ -0,0 +1,58 @@ +pressureCheckpointLimit = $values['pressureCheckpointLimit'] ?? null; + $this->pressureEnabled = $values['pressureEnabled'] ?? null; + $this->pressureReplicaStaleLimit = $values['pressureReplicaStaleLimit'] ?? null; + $this->pressureTimeLimit = $values['pressureTimeLimit'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressure.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressure.php new file mode 100644 index 00000000..205b11af --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressure.php @@ -0,0 +1,65 @@ +enabled = $values['enabled'] ?? null; + $this->enforced = $values['enforced'] ?? null; + $this->operatingFactor = $values['operatingFactor'] ?? null; + $this->primaryParameter = $values['primaryParameter'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressureOperatingFactor.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressureOperatingFactor.php new file mode 100644 index 00000000..9826b69f --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressureOperatingFactor.php @@ -0,0 +1,65 @@ +lower = $values['lower'] ?? null; + $this->optimal = $values['optimal'] ?? null; + $this->upper = $values['upper'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressurePrimaryParameter.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressurePrimaryParameter.php new file mode 100644 index 00000000..e8ee0a70 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressurePrimaryParameter.php @@ -0,0 +1,42 @@ +node = $values['node'] ?? null; + $this->shard = $values['shard'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressurePrimaryParameterNode.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressurePrimaryParameterNode.php new file mode 100644 index 00000000..671a5a9a --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressurePrimaryParameterNode.php @@ -0,0 +1,38 @@ +softLimit = $values['softLimit'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressurePrimaryParameterShard.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressurePrimaryParameterShard.php new file mode 100644 index 00000000..67f4dd89 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchShardIndexingPressurePrimaryParameterShard.php @@ -0,0 +1,38 @@ +minLimit = $values['minLimit'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchVersion.php b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchVersion.php new file mode 100644 index 00000000..d27cc78f --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesOpensearchVersion.php @@ -0,0 +1,10 @@ + $defaultToastCompression Specifies the default TOAST compression method for values of compressible columns. The default is `lz4`. Only available for PostgreSQL 14+. + */ + #[JsonProperty('default_toast_compression')] + public ?string $defaultToastCompression; + + /** + * @var ?bool $enableHaReplicaDns Creates a dedicated read-only DNS that automatically falls back to the primary if standby nodes are unavailable. It switches back when a standby recovers. + */ + #[JsonProperty('enable_ha_replica_dns')] + public ?bool $enableHaReplicaDns; + + /** + * @var ?int $idleInTransactionSessionTimeout Time out sessions with open transactions after this number of milliseconds + */ + #[JsonProperty('idle_in_transaction_session_timeout')] + public ?int $idleInTransactionSessionTimeout; + + /** + * @var ?int $ioCombineLimit EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units. Version 17 and up only. + */ + #[JsonProperty('io_combine_limit')] + public ?int $ioCombineLimit; + + /** + * @var ?int $ioMaxCombineLimit EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units, and silently limits the user-settable parameter io_combine_limit. Version 18 and up only. Changing this parameter causes a service restart. + */ + #[JsonProperty('io_max_combine_limit')] + public ?int $ioMaxCombineLimit; + + /** + * @var ?int $ioMaxConcurrency EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + */ + #[JsonProperty('io_max_concurrency')] + public ?int $ioMaxConcurrency; + + /** + * @var ?value-of $ioMethod EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart. + */ + #[JsonProperty('io_method')] + public ?string $ioMethod; + + /** + * @var ?int $ioWorkers EXPERIMENTAL: Number of IO worker processes, for io_method=worker. Version 18 and up only. + */ + #[JsonProperty('io_workers')] + public ?int $ioWorkers; + + /** + * @var ?array $ipFilter Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16' + */ + #[JsonProperty('ip_filter'), ArrayType(['string'])] + public ?array $ipFilter; + + /** + * @var ?bool $jit Controls system-wide use of Just-in-Time Compilation (JIT). + */ + #[JsonProperty('jit')] + public ?bool $jit; + + /** + * @var ?int $logAutovacuumMinDuration Causes each action executed by autovacuum to be logged if it ran for at least the specified number of milliseconds. Setting this to zero logs all autovacuum actions. Minus-one disables logging autovacuum actions. The default is `1000`. + */ + #[JsonProperty('log_autovacuum_min_duration')] + public ?int $logAutovacuumMinDuration; + + /** + * @var ?value-of $logErrorVerbosity Controls the amount of detail written in the server log for each message that is logged. + */ + #[JsonProperty('log_error_verbosity')] + public ?string $logErrorVerbosity; + + /** + * @var ?value-of $logLinePrefix Choose from one of the available log formats. + */ + #[JsonProperty('log_line_prefix')] + public ?string $logLinePrefix; + + /** + * @var ?int $logMinDurationStatement Log statements that take more than this number of milliseconds to run, -1 disables + */ + #[JsonProperty('log_min_duration_statement')] + public ?int $logMinDurationStatement; + + /** + * @var ?int $logTempFiles Log statements for each temporary file created larger than this number of kilobytes, -1 disables + */ + #[JsonProperty('log_temp_files')] + public ?int $logTempFiles; + + /** + * @var ?int $maxConnections Sets the PostgreSQL maximum number of concurrent connections to the database server. For services with a read replica, first increase the read replica's value. After the change is applied to the replica, you can increase the primary service's value. Changing this parameter causes a service restart. + */ + #[JsonProperty('max_connections')] + public ?int $maxConnections; + + /** + * @var ?int $maxFilesPerProcess PostgreSQL maximum number of files that can be open per process. The default is `1000` (upstream default). Changing this parameter causes a service restart. + */ + #[JsonProperty('max_files_per_process')] + public ?int $maxFilesPerProcess; + + /** + * @var ?int $maxLocksPerTransaction PostgreSQL maximum locks per transaction. Changing this parameter causes a service restart. + */ + #[JsonProperty('max_locks_per_transaction')] + public ?int $maxLocksPerTransaction; + + /** + * @var ?int $maxLogicalReplicationWorkers PostgreSQL maximum logical replication workers (taken from the pool defined by max_worker_processes). The default is `4` (upstream default). Changing this parameter causes a service restart. + */ + #[JsonProperty('max_logical_replication_workers')] + public ?int $maxLogicalReplicationWorkers; + + /** + * @var ?int $maxParallelWorkers Sets the maximum number of workers that the system can support for parallel queries. The default is `8` (upstream default). + */ + #[JsonProperty('max_parallel_workers')] + public ?int $maxParallelWorkers; + + /** + * @var ?int $maxParallelWorkersPerGather Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. The default is `2` (upstream default). + */ + #[JsonProperty('max_parallel_workers_per_gather')] + public ?int $maxParallelWorkersPerGather; + + /** + * @var ?int $maxPredLocksPerTransaction PostgreSQL maximum predicate locks per transaction. The default is `64` (upstream default). Changing this parameter causes a service restart. + */ + #[JsonProperty('max_pred_locks_per_transaction')] + public ?int $maxPredLocksPerTransaction; + + /** + * @var ?int $maxPreparedTransactions PostgreSQL maximum prepared transactions. The default is `0`. Changing this parameter causes a service restart. + */ + #[JsonProperty('max_prepared_transactions')] + public ?int $maxPreparedTransactions; + + /** + * @var ?int $maxReplicationSlots PostgreSQL maximum replication slots. The default is `20`. Changing this parameter causes a service restart. + */ + #[JsonProperty('max_replication_slots')] + public ?int $maxReplicationSlots; + + /** + * @var ?int $maxSlotWalKeepSize PostgreSQL maximum WAL size (MB) reserved for replication slots. If `-1` is specified, replication slots may retain an unlimited amount of WAL files. The default is `-1` (upstream default). wal_keep_size minimum WAL size setting takes precedence over this. + */ + #[JsonProperty('max_slot_wal_keep_size')] + public ?int $maxSlotWalKeepSize; + + /** + * @var ?int $maxStackDepth Maximum depth of the stack in bytes. The default is `2097152` (upstream default). + */ + #[JsonProperty('max_stack_depth')] + public ?int $maxStackDepth; + + /** + * @var ?int $maxStandbyArchiveDelay Max standby archive delay in milliseconds. The default is `30000` (upstream default). + */ + #[JsonProperty('max_standby_archive_delay')] + public ?int $maxStandbyArchiveDelay; + + /** + * @var ?int $maxStandbyStreamingDelay Max standby streaming delay in milliseconds. The default is `30000` (upstream default). + */ + #[JsonProperty('max_standby_streaming_delay')] + public ?int $maxStandbyStreamingDelay; + + /** + * @var ?int $maxSyncWorkersPerSubscription Maximum number of synchronization workers per subscription. The default is `2`. + */ + #[JsonProperty('max_sync_workers_per_subscription')] + public ?int $maxSyncWorkersPerSubscription; + + /** + * @var ?int $maxWalSenders PostgreSQL maximum WAL senders. The default is `20`. Changing this parameter causes a service restart. + */ + #[JsonProperty('max_wal_senders')] + public ?int $maxWalSenders; + + /** + * @var ?int $maxWorkerProcesses Sets the maximum number of background processes that the system can support. The default is `8`. Changing this parameter causes a service restart. + */ + #[JsonProperty('max_worker_processes')] + public ?int $maxWorkerProcesses; + + /** + * @var ?DatabaseServicePropertiesPgMigration $migration + */ + #[JsonProperty('migration')] + public ?DatabaseServicePropertiesPgMigration $migration; + + /** + * @var ?int $nodeCount + */ + #[JsonProperty('node_count')] + public ?int $nodeCount; + + /** + * @var ?value-of $passwordEncryption Chooses the algorithm for encrypting passwords. + */ + #[JsonProperty('password_encryption')] + public ?string $passwordEncryption; + + /** + * @var ?int $pgPartmanBgwInterval Sets the time interval in seconds to run pg_partman's scheduled tasks. The default is `3600`. + */ + #[JsonProperty('pg_partman_bgw_interval')] + public ?int $pgPartmanBgwInterval; + + /** + * @var ?string $pgPartmanBgwRole Controls which role to use for pg_partman's scheduled background tasks. + */ + #[JsonProperty('pg_partman_bgw_role')] + public ?string $pgPartmanBgwRole; + + /** + * @var ?bool $pgStatMonitorEnable Enable the pg_stat_monitor extension. Changing this parameter causes a service restart. When this extension is enabled, pg_stat_statements results for utility commands are unreliable + */ + #[JsonProperty('pg_stat_monitor_enable')] + public ?bool $pgStatMonitorEnable; + + /** + * @var ?bool $pgStatMonitorPgsmEnableQueryPlan Enables or disables query plan monitoring. Only available for PostgreSQL 13+. + */ + #[JsonProperty('pg_stat_monitor_pgsm_enable_query_plan')] + public ?bool $pgStatMonitorPgsmEnableQueryPlan; + + /** + * @var ?int $pgStatMonitorPgsmMaxBuckets Sets the maximum number of buckets. Changing this parameter causes a service restart. Only available for PostgreSQL 13+. + */ + #[JsonProperty('pg_stat_monitor_pgsm_max_buckets')] + public ?int $pgStatMonitorPgsmMaxBuckets; + + /** + * @var ?bool $pgStatPlansEnable Enable the pg_stat_plans extension. Changing this parameter causes a service restart. Tracks execution plans for SQL queries + */ + #[JsonProperty('pg_stat_plans_enable')] + public ?bool $pgStatPlansEnable; + + /** + * @var ?value-of $pgStatPlansTrack Controls which statements' plans are tracked. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable plan tracking. The default is `top`. + */ + #[JsonProperty('pg_stat_plans_track')] + public ?string $pgStatPlansTrack; + + /** + * @var ?value-of $pgStatStatementsTrack Controls which statements are counted. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable statement statistics collection. The default is `top`. + */ + #[JsonProperty('pg_stat_statements_track')] + public ?string $pgStatStatementsTrack; + + /** + * @var ?DatabaseServicePropertiesPgPgaudit $pgaudit System-wide settings for the pgaudit extension. + */ + #[JsonProperty('pgaudit')] + public ?DatabaseServicePropertiesPgPgaudit $pgaudit; + + /** + * @var ?DatabaseServicePropertiesPgPgbouncer $pgbouncer System-wide settings for pgbouncer. + */ + #[JsonProperty('pgbouncer')] + public ?DatabaseServicePropertiesPgPgbouncer $pgbouncer; + + /** + * @var ?DatabaseServicePropertiesPgPglookout $pglookout System-wide settings for pglookout. + */ + #[JsonProperty('pglookout')] + public ?DatabaseServicePropertiesPgPglookout $pglookout; + + /** + * @var ?bool $publicAccess Allow access to the service from the public Internet + */ + #[JsonProperty('public_access')] + public ?bool $publicAccess; + + /** + * @var ?bool $publicAccessPrometheus Allow access to Prometheus metrics from the public Internet + */ + #[JsonProperty('public_access_prometheus')] + public ?bool $publicAccessPrometheus; + + /** + * @var ?bool $serviceLog Store logs for the service so that they are available in the HTTP API and console. + */ + #[JsonProperty('service_log')] + public ?bool $serviceLog; + + /** + * @var ?float $sharedBuffersPercentage Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value. Changing this parameter causes a service restart. + */ + #[JsonProperty('shared_buffers_percentage')] + public ?float $sharedBuffersPercentage; + + /** + * @var ?value-of $synchronousCommit Sets the current transaction's synchronization level. The default is `off`. This setting takes precedence over `synchronous_replication`. + */ + #[JsonProperty('synchronous_commit')] + public ?string $synchronousCommit; + + /** + * @var ?value-of $synchronousReplication This setting is deprecated. Use synchronous_commit instead. Any change to this setting will automatically update synchronous_commit. Setting the value to quorum changes synchronous_commit to remote_write, while setting it to off changes synchronous_commit to off. + */ + #[JsonProperty('synchronous_replication')] + public ?string $synchronousReplication; + + /** + * @var ?int $tempFileLimit PostgreSQL temporary file limit in KiB, -1 for unlimited + */ + #[JsonProperty('temp_file_limit')] + public ?int $tempFileLimit; + + /** + * @var ?DatabaseServicePropertiesPgTimescaledb $timescaledb System-wide settings for the timescaledb extension + */ + #[JsonProperty('timescaledb')] + public ?DatabaseServicePropertiesPgTimescaledb $timescaledb; + + /** + * @var ?string $timezone PostgreSQL service timezone + */ + #[JsonProperty('timezone')] + public ?string $timezone; + + /** + * @var ?int $trackActivityQuerySize Specifies the number of bytes reserved to track the currently executing command for each active session. Changing this parameter causes a service restart. + */ + #[JsonProperty('track_activity_query_size')] + public ?int $trackActivityQuerySize; + + /** + * @var ?value-of $trackCommitTimestamp Record commit time of transactions. Changing this parameter causes a service restart. + */ + #[JsonProperty('track_commit_timestamp')] + public ?string $trackCommitTimestamp; + + /** + * @var ?value-of $trackFunctions Enables tracking of function call counts and time used. + */ + #[JsonProperty('track_functions')] + public ?string $trackFunctions; + + /** + * @var ?value-of $trackIoTiming Enables timing of database I/O calls. The default is `off`. When on, it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms. + */ + #[JsonProperty('track_io_timing')] + public ?string $trackIoTiming; + + /** + * @var ?value-of $variant + */ + #[JsonProperty('variant')] + public ?string $variant; + + /** + * @var ?value-of $version + */ + #[JsonProperty('version')] + public ?string $version; + + /** + * @var ?int $walSenderTimeout Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout. + */ + #[JsonProperty('wal_sender_timeout')] + public ?int $walSenderTimeout; + + /** + * @var ?int $walWriterDelay WAL flush interval in milliseconds. The default is `200`. Setting this parameter to a lower value may negatively impact performance. + */ + #[JsonProperty('wal_writer_delay')] + public ?int $walWriterDelay; + + /** + * @var ?int $workMem Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. The default is 1MB + 0.075% of total RAM (up to 32MB). + */ + #[JsonProperty('work_mem')] + public ?int $workMem; + + /** + * @param array{ + * adminPassword?: ?string, + * adminUsername?: ?string, + * automaticUtilityNetworkIpFilter?: ?bool, + * autovacuumAnalyzeScaleFactor?: ?float, + * autovacuumAnalyzeThreshold?: ?int, + * autovacuumFreezeMaxAge?: ?int, + * autovacuumMaxWorkers?: ?int, + * autovacuumNaptime?: ?int, + * autovacuumVacuumCostDelay?: ?int, + * autovacuumVacuumCostLimit?: ?int, + * autovacuumVacuumScaleFactor?: ?float, + * autovacuumVacuumThreshold?: ?int, + * backupHour?: ?int, + * backupIntervalHours?: ?int, + * backupMinute?: ?int, + * backupRetentionDays?: ?int, + * bgwriterDelay?: ?int, + * bgwriterFlushAfter?: ?int, + * bgwriterLruMaxpages?: ?int, + * bgwriterLruMultiplier?: ?float, + * deadlockTimeout?: ?int, + * defaultToastCompression?: ?value-of, + * enableHaReplicaDns?: ?bool, + * idleInTransactionSessionTimeout?: ?int, + * ioCombineLimit?: ?int, + * ioMaxCombineLimit?: ?int, + * ioMaxConcurrency?: ?int, + * ioMethod?: ?value-of, + * ioWorkers?: ?int, + * ipFilter?: ?array, + * jit?: ?bool, + * logAutovacuumMinDuration?: ?int, + * logErrorVerbosity?: ?value-of, + * logLinePrefix?: ?value-of, + * logMinDurationStatement?: ?int, + * logTempFiles?: ?int, + * maxConnections?: ?int, + * maxFilesPerProcess?: ?int, + * maxLocksPerTransaction?: ?int, + * maxLogicalReplicationWorkers?: ?int, + * maxParallelWorkers?: ?int, + * maxParallelWorkersPerGather?: ?int, + * maxPredLocksPerTransaction?: ?int, + * maxPreparedTransactions?: ?int, + * maxReplicationSlots?: ?int, + * maxSlotWalKeepSize?: ?int, + * maxStackDepth?: ?int, + * maxStandbyArchiveDelay?: ?int, + * maxStandbyStreamingDelay?: ?int, + * maxSyncWorkersPerSubscription?: ?int, + * maxWalSenders?: ?int, + * maxWorkerProcesses?: ?int, + * migration?: ?DatabaseServicePropertiesPgMigration, + * nodeCount?: ?int, + * passwordEncryption?: ?value-of, + * pgPartmanBgwInterval?: ?int, + * pgPartmanBgwRole?: ?string, + * pgStatMonitorEnable?: ?bool, + * pgStatMonitorPgsmEnableQueryPlan?: ?bool, + * pgStatMonitorPgsmMaxBuckets?: ?int, + * pgStatPlansEnable?: ?bool, + * pgStatPlansTrack?: ?value-of, + * pgStatStatementsTrack?: ?value-of, + * pgaudit?: ?DatabaseServicePropertiesPgPgaudit, + * pgbouncer?: ?DatabaseServicePropertiesPgPgbouncer, + * pglookout?: ?DatabaseServicePropertiesPgPglookout, + * publicAccess?: ?bool, + * publicAccessPrometheus?: ?bool, + * serviceLog?: ?bool, + * sharedBuffersPercentage?: ?float, + * synchronousCommit?: ?value-of, + * synchronousReplication?: ?value-of, + * tempFileLimit?: ?int, + * timescaledb?: ?DatabaseServicePropertiesPgTimescaledb, + * timezone?: ?string, + * trackActivityQuerySize?: ?int, + * trackCommitTimestamp?: ?value-of, + * trackFunctions?: ?value-of, + * trackIoTiming?: ?value-of, + * variant?: ?value-of, + * version?: ?value-of, + * walSenderTimeout?: ?int, + * walWriterDelay?: ?int, + * workMem?: ?int, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->adminPassword = $values['adminPassword'] ?? null; + $this->adminUsername = $values['adminUsername'] ?? null; + $this->automaticUtilityNetworkIpFilter = $values['automaticUtilityNetworkIpFilter'] ?? null; + $this->autovacuumAnalyzeScaleFactor = $values['autovacuumAnalyzeScaleFactor'] ?? null; + $this->autovacuumAnalyzeThreshold = $values['autovacuumAnalyzeThreshold'] ?? null; + $this->autovacuumFreezeMaxAge = $values['autovacuumFreezeMaxAge'] ?? null; + $this->autovacuumMaxWorkers = $values['autovacuumMaxWorkers'] ?? null; + $this->autovacuumNaptime = $values['autovacuumNaptime'] ?? null; + $this->autovacuumVacuumCostDelay = $values['autovacuumVacuumCostDelay'] ?? null; + $this->autovacuumVacuumCostLimit = $values['autovacuumVacuumCostLimit'] ?? null; + $this->autovacuumVacuumScaleFactor = $values['autovacuumVacuumScaleFactor'] ?? null; + $this->autovacuumVacuumThreshold = $values['autovacuumVacuumThreshold'] ?? null; + $this->backupHour = $values['backupHour'] ?? null; + $this->backupIntervalHours = $values['backupIntervalHours'] ?? null; + $this->backupMinute = $values['backupMinute'] ?? null; + $this->backupRetentionDays = $values['backupRetentionDays'] ?? null; + $this->bgwriterDelay = $values['bgwriterDelay'] ?? null; + $this->bgwriterFlushAfter = $values['bgwriterFlushAfter'] ?? null; + $this->bgwriterLruMaxpages = $values['bgwriterLruMaxpages'] ?? null; + $this->bgwriterLruMultiplier = $values['bgwriterLruMultiplier'] ?? null; + $this->deadlockTimeout = $values['deadlockTimeout'] ?? null; + $this->defaultToastCompression = $values['defaultToastCompression'] ?? null; + $this->enableHaReplicaDns = $values['enableHaReplicaDns'] ?? null; + $this->idleInTransactionSessionTimeout = $values['idleInTransactionSessionTimeout'] ?? null; + $this->ioCombineLimit = $values['ioCombineLimit'] ?? null; + $this->ioMaxCombineLimit = $values['ioMaxCombineLimit'] ?? null; + $this->ioMaxConcurrency = $values['ioMaxConcurrency'] ?? null; + $this->ioMethod = $values['ioMethod'] ?? null; + $this->ioWorkers = $values['ioWorkers'] ?? null; + $this->ipFilter = $values['ipFilter'] ?? null; + $this->jit = $values['jit'] ?? null; + $this->logAutovacuumMinDuration = $values['logAutovacuumMinDuration'] ?? null; + $this->logErrorVerbosity = $values['logErrorVerbosity'] ?? null; + $this->logLinePrefix = $values['logLinePrefix'] ?? null; + $this->logMinDurationStatement = $values['logMinDurationStatement'] ?? null; + $this->logTempFiles = $values['logTempFiles'] ?? null; + $this->maxConnections = $values['maxConnections'] ?? null; + $this->maxFilesPerProcess = $values['maxFilesPerProcess'] ?? null; + $this->maxLocksPerTransaction = $values['maxLocksPerTransaction'] ?? null; + $this->maxLogicalReplicationWorkers = $values['maxLogicalReplicationWorkers'] ?? null; + $this->maxParallelWorkers = $values['maxParallelWorkers'] ?? null; + $this->maxParallelWorkersPerGather = $values['maxParallelWorkersPerGather'] ?? null; + $this->maxPredLocksPerTransaction = $values['maxPredLocksPerTransaction'] ?? null; + $this->maxPreparedTransactions = $values['maxPreparedTransactions'] ?? null; + $this->maxReplicationSlots = $values['maxReplicationSlots'] ?? null; + $this->maxSlotWalKeepSize = $values['maxSlotWalKeepSize'] ?? null; + $this->maxStackDepth = $values['maxStackDepth'] ?? null; + $this->maxStandbyArchiveDelay = $values['maxStandbyArchiveDelay'] ?? null; + $this->maxStandbyStreamingDelay = $values['maxStandbyStreamingDelay'] ?? null; + $this->maxSyncWorkersPerSubscription = $values['maxSyncWorkersPerSubscription'] ?? null; + $this->maxWalSenders = $values['maxWalSenders'] ?? null; + $this->maxWorkerProcesses = $values['maxWorkerProcesses'] ?? null; + $this->migration = $values['migration'] ?? null; + $this->nodeCount = $values['nodeCount'] ?? null; + $this->passwordEncryption = $values['passwordEncryption'] ?? null; + $this->pgPartmanBgwInterval = $values['pgPartmanBgwInterval'] ?? null; + $this->pgPartmanBgwRole = $values['pgPartmanBgwRole'] ?? null; + $this->pgStatMonitorEnable = $values['pgStatMonitorEnable'] ?? null; + $this->pgStatMonitorPgsmEnableQueryPlan = $values['pgStatMonitorPgsmEnableQueryPlan'] ?? null; + $this->pgStatMonitorPgsmMaxBuckets = $values['pgStatMonitorPgsmMaxBuckets'] ?? null; + $this->pgStatPlansEnable = $values['pgStatPlansEnable'] ?? null; + $this->pgStatPlansTrack = $values['pgStatPlansTrack'] ?? null; + $this->pgStatStatementsTrack = $values['pgStatStatementsTrack'] ?? null; + $this->pgaudit = $values['pgaudit'] ?? null; + $this->pgbouncer = $values['pgbouncer'] ?? null; + $this->pglookout = $values['pglookout'] ?? null; + $this->publicAccess = $values['publicAccess'] ?? null; + $this->publicAccessPrometheus = $values['publicAccessPrometheus'] ?? null; + $this->serviceLog = $values['serviceLog'] ?? null; + $this->sharedBuffersPercentage = $values['sharedBuffersPercentage'] ?? null; + $this->synchronousCommit = $values['synchronousCommit'] ?? null; + $this->synchronousReplication = $values['synchronousReplication'] ?? null; + $this->tempFileLimit = $values['tempFileLimit'] ?? null; + $this->timescaledb = $values['timescaledb'] ?? null; + $this->timezone = $values['timezone'] ?? null; + $this->trackActivityQuerySize = $values['trackActivityQuerySize'] ?? null; + $this->trackCommitTimestamp = $values['trackCommitTimestamp'] ?? null; + $this->trackFunctions = $values['trackFunctions'] ?? null; + $this->trackIoTiming = $values['trackIoTiming'] ?? null; + $this->variant = $values['variant'] ?? null; + $this->version = $values['version'] ?? null; + $this->walSenderTimeout = $values['walSenderTimeout'] ?? null; + $this->walWriterDelay = $values['walWriterDelay'] ?? null; + $this->workMem = $values['workMem'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesPgDefaultToastCompression.php b/fern/sdk/src/Types/DatabaseServicePropertiesPgDefaultToastCompression.php new file mode 100644 index 00000000..e67b0e5b --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesPgDefaultToastCompression.php @@ -0,0 +1,9 @@ + $method + */ + #[JsonProperty('method')] + public ?string $method; + + /** + * @var ?string $password + */ + #[JsonProperty('password')] + public ?string $password; + + /** + * @var int $port + */ + #[JsonProperty('port')] + public int $port; + + /** + * @var ?bool $ssl + */ + #[JsonProperty('ssl')] + public ?bool $ssl; + + /** + * @var ?string $username + */ + #[JsonProperty('username')] + public ?string $username; + + /** + * @param array{ + * host: string, + * port: int, + * dbname?: ?string, + * ignoreDbs?: ?string, + * ignoreRoles?: ?string, + * method?: ?value-of, + * password?: ?string, + * ssl?: ?bool, + * username?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->dbname = $values['dbname'] ?? null; + $this->host = $values['host']; + $this->ignoreDbs = $values['ignoreDbs'] ?? null; + $this->ignoreRoles = $values['ignoreRoles'] ?? null; + $this->method = $values['method'] ?? null; + $this->password = $values['password'] ?? null; + $this->port = $values['port']; + $this->ssl = $values['ssl'] ?? null; + $this->username = $values['username'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesPgMigrationMethod.php b/fern/sdk/src/Types/DatabaseServicePropertiesPgMigrationMethod.php new file mode 100644 index 00000000..a28478e5 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesPgMigrationMethod.php @@ -0,0 +1,9 @@ +> $log Specifies which classes of statements will be logged by session audit logging. + */ + #[JsonProperty('log'), ArrayType(['string'])] + public ?array $log; + + /** + * Specifies that session logging should be enabled in the case where all relations + * in a statement are in pg_catalog. + * + * @var ?bool $logCatalog + */ + #[JsonProperty('log_catalog')] + public ?bool $logCatalog; + + /** + * @var ?bool $logClient Specifies whether log messages will be visible to a client process such as psql. + */ + #[JsonProperty('log_client')] + public ?bool $logClient; + + /** + * @var ?value-of $logLevel Specifies the log level that will be used for log entries. + */ + #[JsonProperty('log_level')] + public ?string $logLevel; + + /** + * Crop parameters representation and whole statements if they exceed this threshold. + * A (default) value of -1 disable the truncation. + * + * @var ?int $logMaxStringLength + */ + #[JsonProperty('log_max_string_length')] + public ?int $logMaxStringLength; + + /** + * This GUC allows to turn off logging nested statements, that is, statements that are + * executed as part of another ExecutorRun. + * + * @var ?bool $logNestedStatements + */ + #[JsonProperty('log_nested_statements')] + public ?bool $logNestedStatements; + + /** + * @var ?bool $logParameter Specifies that audit logging should include the parameters that were passed with the statement. + */ + #[JsonProperty('log_parameter')] + public ?bool $logParameter; + + /** + * Specifies that parameter values longer than this setting (in bytes) should not be logged, + * but replaced with . + * + * @var ?int $logParameterMaxSize + */ + #[JsonProperty('log_parameter_max_size')] + public ?int $logParameterMaxSize; + + /** + * Specifies whether session audit logging should create a separate log entry + * for each relation (TABLE, VIEW, etc.) referenced in a SELECT or DML statement. + * + * @var ?bool $logRelation + */ + #[JsonProperty('log_relation')] + public ?bool $logRelation; + + /** + * @var ?bool $logRows + */ + #[JsonProperty('log_rows')] + public ?bool $logRows; + + /** + * @var ?bool $logStatement Specifies whether logging will include the statement text and parameters (if enabled). + */ + #[JsonProperty('log_statement')] + public ?bool $logStatement; + + /** + * Specifies whether logging will include the statement text and parameters with + * the first log entry for a statement/substatement combination or with every entry. + * + * @var ?bool $logStatementOnce + */ + #[JsonProperty('log_statement_once')] + public ?bool $logStatementOnce; + + /** + * @var ?string $role Specifies the master role to use for object audit logging. + */ + #[JsonProperty('role')] + public ?string $role; + + /** + * @param array{ + * featureEnabled?: ?bool, + * log?: ?array>, + * logCatalog?: ?bool, + * logClient?: ?bool, + * logLevel?: ?value-of, + * logMaxStringLength?: ?int, + * logNestedStatements?: ?bool, + * logParameter?: ?bool, + * logParameterMaxSize?: ?int, + * logRelation?: ?bool, + * logRows?: ?bool, + * logStatement?: ?bool, + * logStatementOnce?: ?bool, + * role?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->featureEnabled = $values['featureEnabled'] ?? null; + $this->log = $values['log'] ?? null; + $this->logCatalog = $values['logCatalog'] ?? null; + $this->logClient = $values['logClient'] ?? null; + $this->logLevel = $values['logLevel'] ?? null; + $this->logMaxStringLength = $values['logMaxStringLength'] ?? null; + $this->logNestedStatements = $values['logNestedStatements'] ?? null; + $this->logParameter = $values['logParameter'] ?? null; + $this->logParameterMaxSize = $values['logParameterMaxSize'] ?? null; + $this->logRelation = $values['logRelation'] ?? null; + $this->logRows = $values['logRows'] ?? null; + $this->logStatement = $values['logStatement'] ?? null; + $this->logStatementOnce = $values['logStatementOnce'] ?? null; + $this->role = $values['role'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesPgPgauditLogItem.php b/fern/sdk/src/Types/DatabaseServicePropertiesPgPgauditLogItem.php new file mode 100644 index 00000000..a14da143 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesPgPgauditLogItem.php @@ -0,0 +1,15 @@ + $autodbPoolMode + */ + #[JsonProperty('autodb_pool_mode')] + public ?string $autodbPoolMode; + + /** + * @var ?int $autodbPoolSize + */ + #[JsonProperty('autodb_pool_size')] + public ?int $autodbPoolSize; + + /** + * @var ?array> $ignoreStartupParameters + */ + #[JsonProperty('ignore_startup_parameters'), ArrayType(['string'])] + public ?array $ignoreStartupParameters; + + /** + * @var ?int $maxPreparedStatements + */ + #[JsonProperty('max_prepared_statements')] + public ?int $maxPreparedStatements; + + /** + * @var ?int $minPoolSize + */ + #[JsonProperty('min_pool_size')] + public ?int $minPoolSize; + + /** + * @var ?float $serverConnectTimeout + */ + #[JsonProperty('server_connect_timeout')] + public ?float $serverConnectTimeout; + + /** + * @var ?int $serverIdleTimeout + */ + #[JsonProperty('server_idle_timeout')] + public ?int $serverIdleTimeout; + + /** + * @var ?int $serverLifetime + */ + #[JsonProperty('server_lifetime')] + public ?int $serverLifetime; + + /** + * @var ?float $serverLoginRetry + */ + #[JsonProperty('server_login_retry')] + public ?float $serverLoginRetry; + + /** + * @var ?bool $serverResetQueryAlways + */ + #[JsonProperty('server_reset_query_always')] + public ?bool $serverResetQueryAlways; + + /** + * @param array{ + * autodbIdleTimeout?: ?int, + * autodbMaxDbConnections?: ?int, + * autodbPoolMode?: ?value-of, + * autodbPoolSize?: ?int, + * ignoreStartupParameters?: ?array>, + * maxPreparedStatements?: ?int, + * minPoolSize?: ?int, + * serverConnectTimeout?: ?float, + * serverIdleTimeout?: ?int, + * serverLifetime?: ?int, + * serverLoginRetry?: ?float, + * serverResetQueryAlways?: ?bool, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->autodbIdleTimeout = $values['autodbIdleTimeout'] ?? null; + $this->autodbMaxDbConnections = $values['autodbMaxDbConnections'] ?? null; + $this->autodbPoolMode = $values['autodbPoolMode'] ?? null; + $this->autodbPoolSize = $values['autodbPoolSize'] ?? null; + $this->ignoreStartupParameters = $values['ignoreStartupParameters'] ?? null; + $this->maxPreparedStatements = $values['maxPreparedStatements'] ?? null; + $this->minPoolSize = $values['minPoolSize'] ?? null; + $this->serverConnectTimeout = $values['serverConnectTimeout'] ?? null; + $this->serverIdleTimeout = $values['serverIdleTimeout'] ?? null; + $this->serverLifetime = $values['serverLifetime'] ?? null; + $this->serverLoginRetry = $values['serverLoginRetry'] ?? null; + $this->serverResetQueryAlways = $values['serverResetQueryAlways'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesPgPgbouncerAutodbPoolMode.php b/fern/sdk/src/Types/DatabaseServicePropertiesPgPgbouncerAutodbPoolMode.php new file mode 100644 index 00000000..46229a57 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesPgPgbouncerAutodbPoolMode.php @@ -0,0 +1,10 @@ +maxFailoverReplicationTimeLag = $values['maxFailoverReplicationTimeLag'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesPgSynchronousCommit.php b/fern/sdk/src/Types/DatabaseServicePropertiesPgSynchronousCommit.php new file mode 100644 index 00000000..f10e998a --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesPgSynchronousCommit.php @@ -0,0 +1,12 @@ +maxBackgroundWorkers = $values['maxBackgroundWorkers'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesPgTrackCommitTimestamp.php b/fern/sdk/src/Types/DatabaseServicePropertiesPgTrackCommitTimestamp.php new file mode 100644 index 00000000..f5392c16 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesPgTrackCommitTimestamp.php @@ -0,0 +1,9 @@ + $ipFilter Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16' + */ + #[JsonProperty('ip_filter'), ArrayType(['string'])] + public ?array $ipFilter; + + /** + * @var ?DatabaseServicePropertiesRedisMigration $migration + */ + #[JsonProperty('migration')] + public ?DatabaseServicePropertiesRedisMigration $migration; + + /** + * @var ?bool $publicAccess Allow access to the service from the public Internet + */ + #[JsonProperty('public_access')] + public ?bool $publicAccess; + + /** + * @var ?bool $publicAccessPrometheus Allow access to Prometheus monitoring from the public Internet + */ + #[JsonProperty('public_access_prometheus')] + public ?bool $publicAccessPrometheus; + + /** + * @var ?value-of $redisAclChannelsDefault Determines default pub/sub channels' ACL for new users if ACL is not supplied. When this option is not defined, all_channels is assumed to keep backward compatibility. This option doesn't affect Redis configuration acl-pubsub-default. + */ + #[JsonProperty('redis_acl_channels_default')] + public ?string $redisAclChannelsDefault; + + /** + * @var ?int $redisIoThreads Set Redis IO thread count. Changing this will cause a restart of the Redis service. + */ + #[JsonProperty('redis_io_threads')] + public ?int $redisIoThreads; + + /** + * @var ?int $redisLfuDecayTime + */ + #[JsonProperty('redis_lfu_decay_time')] + public ?int $redisLfuDecayTime; + + /** + * @var ?int $redisLfuLogFactor + */ + #[JsonProperty('redis_lfu_log_factor')] + public ?int $redisLfuLogFactor; + + /** + * @var ?value-of $redisMaxmemoryPolicy + */ + #[JsonProperty('redis_maxmemory_policy')] + public ?string $redisMaxmemoryPolicy; + + /** + * @var ?string $redisNotifyKeyspaceEvents + */ + #[JsonProperty('redis_notify_keyspace_events')] + public ?string $redisNotifyKeyspaceEvents; + + /** + * @var ?int $redisNumberOfDatabases Set number of Redis databases. Changing this will cause a restart of the Redis service. + */ + #[JsonProperty('redis_number_of_databases')] + public ?int $redisNumberOfDatabases; + + /** + * @var ?value-of $redisPersistence When persistence is 'rdb', Redis does RDB dumps each 10 minutes if any key is changed. Also RDB dumps are done according to the backup schedule for backup purposes. When persistence is 'off', no RDB dumps or backups are done, so data can be lost at any moment if the service is restarted for any reason, or if the service is powered off. Also, the service can't be forked. + */ + #[JsonProperty('redis_persistence')] + public ?string $redisPersistence; + + /** + * @var ?int $redisPubsubClientOutputBufferLimit Set output buffer limit for pub / sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan. + */ + #[JsonProperty('redis_pubsub_client_output_buffer_limit')] + public ?int $redisPubsubClientOutputBufferLimit; + + /** + * @var ?bool $redisSsl + */ + #[JsonProperty('redis_ssl')] + public ?bool $redisSsl; + + /** + * @var ?int $redisTimeout + */ + #[JsonProperty('redis_timeout')] + public ?int $redisTimeout; + + /** + * @var ?value-of $redisVersion + */ + #[JsonProperty('redis_version')] + public ?string $redisVersion; + + /** + * @var ?bool $serviceLog Store logs for the service so that they are available in the HTTP API and console. + */ + #[JsonProperty('service_log')] + public ?bool $serviceLog; + + /** + * @param array{ + * automaticUtilityNetworkIpFilter?: ?bool, + * backupHour?: ?int, + * backupMinute?: ?int, + * ipFilter?: ?array, + * migration?: ?DatabaseServicePropertiesRedisMigration, + * publicAccess?: ?bool, + * publicAccessPrometheus?: ?bool, + * redisAclChannelsDefault?: ?value-of, + * redisIoThreads?: ?int, + * redisLfuDecayTime?: ?int, + * redisLfuLogFactor?: ?int, + * redisMaxmemoryPolicy?: ?value-of, + * redisNotifyKeyspaceEvents?: ?string, + * redisNumberOfDatabases?: ?int, + * redisPersistence?: ?value-of, + * redisPubsubClientOutputBufferLimit?: ?int, + * redisSsl?: ?bool, + * redisTimeout?: ?int, + * redisVersion?: ?value-of, + * serviceLog?: ?bool, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->automaticUtilityNetworkIpFilter = $values['automaticUtilityNetworkIpFilter'] ?? null; + $this->backupHour = $values['backupHour'] ?? null; + $this->backupMinute = $values['backupMinute'] ?? null; + $this->ipFilter = $values['ipFilter'] ?? null; + $this->migration = $values['migration'] ?? null; + $this->publicAccess = $values['publicAccess'] ?? null; + $this->publicAccessPrometheus = $values['publicAccessPrometheus'] ?? null; + $this->redisAclChannelsDefault = $values['redisAclChannelsDefault'] ?? null; + $this->redisIoThreads = $values['redisIoThreads'] ?? null; + $this->redisLfuDecayTime = $values['redisLfuDecayTime'] ?? null; + $this->redisLfuLogFactor = $values['redisLfuLogFactor'] ?? null; + $this->redisMaxmemoryPolicy = $values['redisMaxmemoryPolicy'] ?? null; + $this->redisNotifyKeyspaceEvents = $values['redisNotifyKeyspaceEvents'] ?? null; + $this->redisNumberOfDatabases = $values['redisNumberOfDatabases'] ?? null; + $this->redisPersistence = $values['redisPersistence'] ?? null; + $this->redisPubsubClientOutputBufferLimit = $values['redisPubsubClientOutputBufferLimit'] ?? null; + $this->redisSsl = $values['redisSsl'] ?? null; + $this->redisTimeout = $values['redisTimeout'] ?? null; + $this->redisVersion = $values['redisVersion'] ?? null; + $this->serviceLog = $values['serviceLog'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesRedisMigration.php b/fern/sdk/src/Types/DatabaseServicePropertiesRedisMigration.php new file mode 100644 index 00000000..83bcd5d7 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesRedisMigration.php @@ -0,0 +1,98 @@ + $method + */ + #[JsonProperty('method')] + public ?string $method; + + /** + * @var ?string $password + */ + #[JsonProperty('password')] + public ?string $password; + + /** + * @var int $port + */ + #[JsonProperty('port')] + public int $port; + + /** + * @var ?bool $ssl + */ + #[JsonProperty('ssl')] + public ?bool $ssl; + + /** + * @var ?string $username + */ + #[JsonProperty('username')] + public ?string $username; + + /** + * @param array{ + * host: string, + * port: int, + * dbname?: ?string, + * ignoreDbs?: ?string, + * ignoreRoles?: ?string, + * method?: ?value-of, + * password?: ?string, + * ssl?: ?bool, + * username?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->dbname = $values['dbname'] ?? null; + $this->host = $values['host']; + $this->ignoreDbs = $values['ignoreDbs'] ?? null; + $this->ignoreRoles = $values['ignoreRoles'] ?? null; + $this->method = $values['method'] ?? null; + $this->password = $values['password'] ?? null; + $this->port = $values['port']; + $this->ssl = $values['ssl'] ?? null; + $this->username = $values['username'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesRedisMigrationMethod.php b/fern/sdk/src/Types/DatabaseServicePropertiesRedisMigrationMethod.php new file mode 100644 index 00000000..4c2a19d6 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesRedisMigrationMethod.php @@ -0,0 +1,9 @@ + $ipFilter Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16' + */ + #[JsonProperty('ip_filter'), ArrayType(['string'])] + public ?array $ipFilter; + + /** + * @var ?DatabaseServicePropertiesValkeyMigration $migration + */ + #[JsonProperty('migration')] + public ?DatabaseServicePropertiesValkeyMigration $migration; + + /** + * @var ?bool $publicAccess Allow access to the service from the public Internet + */ + #[JsonProperty('public_access')] + public ?bool $publicAccess; + + /** + * @var ?bool $publicAccessPrometheus Allow access to Prometheus metrics from the public Internet + */ + #[JsonProperty('public_access_prometheus')] + public ?bool $publicAccessPrometheus; + + /** + * @var ?bool $serviceLog Store logs for the service so that they are available in the HTTP API and console. + */ + #[JsonProperty('service_log')] + public ?bool $serviceLog; + + /** + * @var ?value-of $valkeyAclChannelsDefault Determines default pub/sub channels' ACL for new users if ACL is not supplied. When this option is not defined, all_channels is assumed to keep backward compatibility. This option doesn't affect Valkey configuration acl-pubsub-default. + */ + #[JsonProperty('valkey_acl_channels_default')] + public ?string $valkeyAclChannelsDefault; + + /** + * @var ?int $valkeyActiveDefragIgnoreBytes Minimum amount of fragmentation waste, in bytes, before active defragmentation starts. Only takes effect when `valkey_activedefrag` is enabled. + */ + #[JsonProperty('valkey_active_defrag_ignore_bytes')] + public ?int $valkeyActiveDefragIgnoreBytes; + + /** + * @var ?int $valkeyActiveDefragThresholdLower Minimum percentage of fragmentation before active defragmentation starts. Only takes effect when `valkey_activedefrag` is enabled. + */ + #[JsonProperty('valkey_active_defrag_threshold_lower')] + public ?int $valkeyActiveDefragThresholdLower; + + /** + * @var ?int $valkeyActiveExpireEffort Valkey reclaims expired keys both when accessed and in the background. The background process scans for expired keys to free memory. Increasing the active-expire-effort setting (default 1, max 10) uses more CPU to reclaim expired keys faster, reducing memory usage but potentially increasing latency. + */ + #[JsonProperty('valkey_active_expire_effort')] + public ?int $valkeyActiveExpireEffort; + + /** + * @var ?bool $valkeyActivedefrag Enable active memory defragmentation. When enabled, Valkey relocates objects off sparsely-used memory pages to reduce fragmentation and return memory to the operating system. Defragmentation runs on the main thread and consumes CPU, so it may increase latency under load. + */ + #[JsonProperty('valkey_activedefrag')] + public ?bool $valkeyActivedefrag; + + /** + * @var ?int $valkeyIoThreads Set Valkey IO thread count. Changing this will cause a restart of the Valkey service. + */ + #[JsonProperty('valkey_io_threads')] + public ?int $valkeyIoThreads; + + /** + * @var ?int $valkeyLfuDecayTime + */ + #[JsonProperty('valkey_lfu_decay_time')] + public ?int $valkeyLfuDecayTime; + + /** + * @var ?int $valkeyLfuLogFactor + */ + #[JsonProperty('valkey_lfu_log_factor')] + public ?int $valkeyLfuLogFactor; + + /** + * @var ?value-of $valkeyMaxmemoryPolicy + */ + #[JsonProperty('valkey_maxmemory_policy')] + public ?string $valkeyMaxmemoryPolicy; + + /** + * @var ?string $valkeyNotifyKeyspaceEvents + */ + #[JsonProperty('valkey_notify_keyspace_events')] + public ?string $valkeyNotifyKeyspaceEvents; + + /** + * @var ?int $valkeyNumberOfDatabases Set number of Valkey databases. Changing this will cause a restart of the Valkey service. + */ + #[JsonProperty('valkey_number_of_databases')] + public ?int $valkeyNumberOfDatabases; + + /** + * @var ?value-of $valkeyPersistence Controls whether Valkey writes RDB dumps to disk. With `rdb`, RDB dumps are written for backups on the backup schedule and, if `frequent_snapshots` is enabled, every 10 minutes so the service can recover recent data after a restart. With `off`, no RDB dumps are written at all: backups and forking are unavailable, `frequent_snapshots` and `backup_hour`/`backup_minute` have no effect, and all data is lost if the service restarts or is powered off. + */ + #[JsonProperty('valkey_persistence')] + public ?string $valkeyPersistence; + + /** + * @var ?int $valkeyPubsubClientOutputBufferLimit Set output buffer limit for pub / sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan. + */ + #[JsonProperty('valkey_pubsub_client_output_buffer_limit')] + public ?int $valkeyPubsubClientOutputBufferLimit; + + /** + * @var ?bool $valkeySsl + */ + #[JsonProperty('valkey_ssl')] + public ?bool $valkeySsl; + + /** + * @var ?int $valkeyTimeout + */ + #[JsonProperty('valkey_timeout')] + public ?int $valkeyTimeout; + + /** + * @var ?value-of $valkeyVersion + */ + #[JsonProperty('valkey_version')] + public ?string $valkeyVersion; + + /** + * @param array{ + * automaticUtilityNetworkIpFilter?: ?bool, + * backupHour?: ?int, + * backupMinute?: ?int, + * frequentSnapshots?: ?bool, + * ipFilter?: ?array, + * migration?: ?DatabaseServicePropertiesValkeyMigration, + * publicAccess?: ?bool, + * publicAccessPrometheus?: ?bool, + * serviceLog?: ?bool, + * valkeyAclChannelsDefault?: ?value-of, + * valkeyActiveDefragIgnoreBytes?: ?int, + * valkeyActiveDefragThresholdLower?: ?int, + * valkeyActiveExpireEffort?: ?int, + * valkeyActivedefrag?: ?bool, + * valkeyIoThreads?: ?int, + * valkeyLfuDecayTime?: ?int, + * valkeyLfuLogFactor?: ?int, + * valkeyMaxmemoryPolicy?: ?value-of, + * valkeyNotifyKeyspaceEvents?: ?string, + * valkeyNumberOfDatabases?: ?int, + * valkeyPersistence?: ?value-of, + * valkeyPubsubClientOutputBufferLimit?: ?int, + * valkeySsl?: ?bool, + * valkeyTimeout?: ?int, + * valkeyVersion?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->automaticUtilityNetworkIpFilter = $values['automaticUtilityNetworkIpFilter'] ?? null; + $this->backupHour = $values['backupHour'] ?? null; + $this->backupMinute = $values['backupMinute'] ?? null; + $this->frequentSnapshots = $values['frequentSnapshots'] ?? null; + $this->ipFilter = $values['ipFilter'] ?? null; + $this->migration = $values['migration'] ?? null; + $this->publicAccess = $values['publicAccess'] ?? null; + $this->publicAccessPrometheus = $values['publicAccessPrometheus'] ?? null; + $this->serviceLog = $values['serviceLog'] ?? null; + $this->valkeyAclChannelsDefault = $values['valkeyAclChannelsDefault'] ?? null; + $this->valkeyActiveDefragIgnoreBytes = $values['valkeyActiveDefragIgnoreBytes'] ?? null; + $this->valkeyActiveDefragThresholdLower = $values['valkeyActiveDefragThresholdLower'] ?? null; + $this->valkeyActiveExpireEffort = $values['valkeyActiveExpireEffort'] ?? null; + $this->valkeyActivedefrag = $values['valkeyActivedefrag'] ?? null; + $this->valkeyIoThreads = $values['valkeyIoThreads'] ?? null; + $this->valkeyLfuDecayTime = $values['valkeyLfuDecayTime'] ?? null; + $this->valkeyLfuLogFactor = $values['valkeyLfuLogFactor'] ?? null; + $this->valkeyMaxmemoryPolicy = $values['valkeyMaxmemoryPolicy'] ?? null; + $this->valkeyNotifyKeyspaceEvents = $values['valkeyNotifyKeyspaceEvents'] ?? null; + $this->valkeyNumberOfDatabases = $values['valkeyNumberOfDatabases'] ?? null; + $this->valkeyPersistence = $values['valkeyPersistence'] ?? null; + $this->valkeyPubsubClientOutputBufferLimit = $values['valkeyPubsubClientOutputBufferLimit'] ?? null; + $this->valkeySsl = $values['valkeySsl'] ?? null; + $this->valkeyTimeout = $values['valkeyTimeout'] ?? null; + $this->valkeyVersion = $values['valkeyVersion'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesValkeyMigration.php b/fern/sdk/src/Types/DatabaseServicePropertiesValkeyMigration.php new file mode 100644 index 00000000..078ec10b --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesValkeyMigration.php @@ -0,0 +1,98 @@ + $method + */ + #[JsonProperty('method')] + public ?string $method; + + /** + * @var ?string $password + */ + #[JsonProperty('password')] + public ?string $password; + + /** + * @var int $port + */ + #[JsonProperty('port')] + public int $port; + + /** + * @var ?bool $ssl + */ + #[JsonProperty('ssl')] + public ?bool $ssl; + + /** + * @var ?string $username + */ + #[JsonProperty('username')] + public ?string $username; + + /** + * @param array{ + * host: string, + * port: int, + * dbname?: ?string, + * ignoreDbs?: ?string, + * ignoreRoles?: ?string, + * method?: ?value-of, + * password?: ?string, + * ssl?: ?bool, + * username?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->dbname = $values['dbname'] ?? null; + $this->host = $values['host']; + $this->ignoreDbs = $values['ignoreDbs'] ?? null; + $this->ignoreRoles = $values['ignoreRoles'] ?? null; + $this->method = $values['method'] ?? null; + $this->password = $values['password'] ?? null; + $this->port = $values['port']; + $this->ssl = $values['ssl'] ?? null; + $this->username = $values['username'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServicePropertiesValkeyMigrationMethod.php b/fern/sdk/src/Types/DatabaseServicePropertiesValkeyMigrationMethod.php new file mode 100644 index 00000000..1b131af8 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServicePropertiesValkeyMigrationMethod.php @@ -0,0 +1,9 @@ +state = $values['state'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceTaskBaseResponse.php b/fern/sdk/src/Types/DatabaseServiceTaskBaseResponse.php new file mode 100644 index 00000000..aab9b61e --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceTaskBaseResponse.php @@ -0,0 +1,112 @@ +> $resultCodes Optional list of result codes as key-value maps + */ + #[JsonProperty('result_codes'), ArrayType([['string' => 'string']])] + public ?array $resultCodes; + + /** + * @var ?string $ignoreDbs Optional list of databases to ignore + */ + #[JsonProperty('ignore_dbs')] + public ?string $ignoreDbs; + + /** + * @var ?string $operation The operation being performed + */ + #[JsonProperty('operation')] + public ?string $operation; + + /** + * @var ?bool $success Indicates if the operation was successful + */ + #[JsonProperty('success')] + public ?bool $success; + + /** + * @var ?string $method Optional method used for the operation + */ + #[JsonProperty('method')] + public ?string $method; + + /** + * @var ?string $sourcePgVersion Optional source PostgreSQL version + */ + #[JsonProperty('source_pg_version')] + public ?string $sourcePgVersion; + + /** + * @var ?string $targetPgVersion Optional target PostgreSQL version + */ + #[JsonProperty('target_pg_version')] + public ?string $targetPgVersion; + + /** + * @var ?string $id Optional identifier for the task + */ + #[JsonProperty('id')] + public ?string $id; + + /** + * @param array{ + * createTime?: ?DateTime, + * result?: ?string, + * resultCodes?: ?array>, + * ignoreDbs?: ?string, + * operation?: ?string, + * success?: ?bool, + * method?: ?string, + * sourcePgVersion?: ?string, + * targetPgVersion?: ?string, + * id?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->createTime = $values['createTime'] ?? null; + $this->result = $values['result'] ?? null; + $this->resultCodes = $values['resultCodes'] ?? null; + $this->ignoreDbs = $values['ignoreDbs'] ?? null; + $this->operation = $values['operation'] ?? null; + $this->success = $values['success'] ?? null; + $this->method = $values['method'] ?? null; + $this->sourcePgVersion = $values['sourcePgVersion'] ?? null; + $this->targetPgVersion = $values['targetPgVersion'] ?? null; + $this->id = $values['id'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceTaskDetailsResponse.php b/fern/sdk/src/Types/DatabaseServiceTaskDetailsResponse.php new file mode 100644 index 00000000..8a8b4e35 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceTaskDetailsResponse.php @@ -0,0 +1,112 @@ +> $resultCodes + */ + #[JsonProperty('result_codes'), ArrayType([['string' => 'string']])] + public ?array $resultCodes; + + /** + * @var ?string $result A human-readable summary of the task result. + */ + #[JsonProperty('result')] + public ?string $result; + + /** + * @var ?bool $success Indicates whether the task completed successfully. + */ + #[JsonProperty('success')] + public ?bool $success; + + /** + * @var ?DateTime $createTime The time when the service task was created + */ + #[JsonProperty('create_time'), Date(Date::TYPE_DATETIME)] + public ?DateTime $createTime; + + /** + * @var ?string $ignoreDbs Optional list of databases to ignore + */ + #[JsonProperty('ignore_dbs')] + public ?string $ignoreDbs; + + /** + * @var ?string $operation The operation being performed + */ + #[JsonProperty('operation')] + public ?string $operation; + + /** + * @var ?string $method Optional method used for the operation + */ + #[JsonProperty('method')] + public ?string $method; + + /** + * @var ?string $sourcePgVersion Optional source PostgreSQL version + */ + #[JsonProperty('source_pg_version')] + public ?string $sourcePgVersion; + + /** + * @var ?string $targetPgVersion Optional target PostgreSQL version + */ + #[JsonProperty('target_pg_version')] + public ?string $targetPgVersion; + + /** + * @var ?string $id Optional identifier for the task + */ + #[JsonProperty('id')] + public ?string $id; + + /** + * @param array{ + * resultCodes?: ?array>, + * result?: ?string, + * success?: ?bool, + * createTime?: ?DateTime, + * ignoreDbs?: ?string, + * operation?: ?string, + * method?: ?string, + * sourcePgVersion?: ?string, + * targetPgVersion?: ?string, + * id?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->resultCodes = $values['resultCodes'] ?? null; + $this->result = $values['result'] ?? null; + $this->success = $values['success'] ?? null; + $this->createTime = $values['createTime'] ?? null; + $this->ignoreDbs = $values['ignoreDbs'] ?? null; + $this->operation = $values['operation'] ?? null; + $this->method = $values['method'] ?? null; + $this->sourcePgVersion = $values['sourcePgVersion'] ?? null; + $this->targetPgVersion = $values['targetPgVersion'] ?? null; + $this->id = $values['id'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceTaskResponse.php b/fern/sdk/src/Types/DatabaseServiceTaskResponse.php new file mode 100644 index 00000000..907a7f99 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceTaskResponse.php @@ -0,0 +1,61 @@ +>, + * ignoreDbs?: ?string, + * operation?: ?string, + * success?: ?bool, + * method?: ?string, + * sourcePgVersion?: ?string, + * targetPgVersion?: ?string, + * id?: ?string, + * operationType?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->createTime = $values['createTime'] ?? null; + $this->result = $values['result'] ?? null; + $this->resultCodes = $values['resultCodes'] ?? null; + $this->ignoreDbs = $values['ignoreDbs'] ?? null; + $this->operation = $values['operation'] ?? null; + $this->success = $values['success'] ?? null; + $this->method = $values['method'] ?? null; + $this->sourcePgVersion = $values['sourcePgVersion'] ?? null; + $this->targetPgVersion = $values['targetPgVersion'] ?? null; + $this->id = $values['id'] ?? null; + $this->operationType = $values['operationType'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseServiceType.php b/fern/sdk/src/Types/DatabaseServiceType.php new file mode 100644 index 00000000..2718042b --- /dev/null +++ b/fern/sdk/src/Types/DatabaseServiceType.php @@ -0,0 +1,11 @@ + $servicePlans + */ + #[JsonProperty('service_plans'), ArrayType([DatabaseServicePlanResponse::class])] + public ?array $servicePlans; + + /** + * @var ?array $properties + */ + #[JsonProperty('properties'), ArrayType(['string' => DatabasePropertySchemaResponse::class])] + public ?array $properties; + + /** + * @var ?array $dependencies + */ + #[JsonProperty('dependencies'), ArrayType(['string' => DatabaseDependencyResponse::class])] + public ?array $dependencies; + + /** + * @param array{ + * name?: ?string, + * description?: ?string, + * latestAvailableVersion?: ?string, + * servicePlans?: ?array, + * properties?: ?array, + * dependencies?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->description = $values['description'] ?? null; + $this->latestAvailableVersion = $values['latestAvailableVersion'] ?? null; + $this->servicePlans = $values['servicePlans'] ?? null; + $this->properties = $values['properties'] ?? null; + $this->dependencies = $values['dependencies'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseUpCloudApiResponse.php b/fern/sdk/src/Types/DatabaseUpCloudApiResponse.php new file mode 100644 index 00000000..f39e971f --- /dev/null +++ b/fern/sdk/src/Types/DatabaseUpCloudApiResponse.php @@ -0,0 +1,46 @@ + $errors A list of error messages returned by UpCloud's API. + */ + #[JsonProperty('errors'), ArrayType([DatabaseUpCloudApiResponseErrorsItem::class])] + public ?array $errors; + + /** + * @var ?string $message The time the backup was created. + */ + #[JsonProperty('message')] + public ?string $message; + + /** + * @param array{ + * errors?: ?array, + * message?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->errors = $values['errors'] ?? null; + $this->message = $values['message'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseUpCloudApiResponseErrorsItem.php b/fern/sdk/src/Types/DatabaseUpCloudApiResponseErrorsItem.php new file mode 100644 index 00000000..3c9f43b7 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseUpCloudApiResponseErrorsItem.php @@ -0,0 +1,50 @@ +message = $values['message'] ?? null; + $this->moreInfo = $values['moreInfo'] ?? null; + $this->status = $values['status'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseUserResponse.php b/fern/sdk/src/Types/DatabaseUserResponse.php new file mode 100644 index 00000000..bcdde893 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseUserResponse.php @@ -0,0 +1,93 @@ +username = $values['username'] ?? null; + $this->password = $values['password'] ?? null; + $this->authentication = $values['authentication'] ?? null; + $this->type = $values['type'] ?? null; + $this->pgAccessControl = $values['pgAccessControl'] ?? null; + $this->redisAccessControl = $values['redisAccessControl'] ?? null; + $this->valkeyAccessControl = $values['valkeyAccessControl'] ?? null; + $this->opensearchAccessControl = $values['opensearchAccessControl'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseValkeyAccessControlResponse.php b/fern/sdk/src/Types/DatabaseValkeyAccessControlResponse.php new file mode 100644 index 00000000..f44b8a8b --- /dev/null +++ b/fern/sdk/src/Types/DatabaseValkeyAccessControlResponse.php @@ -0,0 +1,62 @@ + $categories List of command categories the user has access to. + */ + #[JsonProperty('categories'), ArrayType(['string'])] + public ?array $categories; + + /** + * @var ?array $channels List of Pub/Sub channels the user has access to. + */ + #[JsonProperty('channels'), ArrayType(['string'])] + public ?array $channels; + + /** + * @var ?array $commands List of specific commands the user has access to. + */ + #[JsonProperty('commands'), ArrayType(['string'])] + public ?array $commands; + + /** + * @var ?array $keys List of key patterns the user has access to. + */ + #[JsonProperty('keys'), ArrayType(['string'])] + public ?array $keys; + + /** + * @param array{ + * categories?: ?array, + * channels?: ?array, + * commands?: ?array, + * keys?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->categories = $values['categories'] ?? null; + $this->channels = $values['channels'] ?? null; + $this->commands = $values['commands'] ?? null; + $this->keys = $values['keys'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseVersionsResponseItem.php b/fern/sdk/src/Types/DatabaseVersionsResponseItem.php new file mode 100644 index 00000000..29e5f601 --- /dev/null +++ b/fern/sdk/src/Types/DatabaseVersionsResponseItem.php @@ -0,0 +1,108 @@ + $serviceType The type of service (e.g., mysql, pg, opensearch, valkey) + */ + #[JsonProperty('service_type')] + public string $serviceType; + + /** + * @var value-of $state The availability state of the version + */ + #[JsonProperty('state')] + public string $state; + + /** + * @var ?DateTime $endOfLifeTime The date when this version reaches end of life + */ + #[JsonProperty('end_of_life_time'), Date(Date::TYPE_DATETIME)] + public ?DateTime $endOfLifeTime; + + /** + * @var ?DateTime $availabilityEndTime The date when this version will no longer be available for new services + */ + #[JsonProperty('availability_end_time'), Date(Date::TYPE_DATETIME)] + public ?DateTime $availabilityEndTime; + + /** + * @var ?DateTime $availabilityStartTime The date when this version became available + */ + #[JsonProperty('availability_start_time'), Date(Date::TYPE_DATETIME)] + public ?DateTime $availabilityStartTime; + + /** + * @var ?DateTime $terminationTime The date when services running this version will be terminated + */ + #[JsonProperty('termination_time'), Date(Date::TYPE_DATETIME)] + public ?DateTime $terminationTime; + + /** + * @var ?DateTime $upgradeToServiceType The service type to upgrade to when this version reaches end of life + */ + #[JsonProperty('upgrade_to_service_type'), Date(Date::TYPE_DATETIME)] + public ?DateTime $upgradeToServiceType; + + /** + * @var ?string $upgradeToVersion The version to upgrade to when this version reaches end of life + */ + #[JsonProperty('upgrade_to_version')] + public ?string $upgradeToVersion; + + /** + * @var ?DateTime $upstreamEndOfLifeTime The upstream end of life date for this version + */ + #[JsonProperty('upstream_end_of_life_time'), Date(Date::TYPE_DATETIME)] + public ?DateTime $upstreamEndOfLifeTime; + + /** + * @param array{ + * majorVersion: string, + * serviceType: value-of, + * state: value-of, + * endOfLifeTime?: ?DateTime, + * availabilityEndTime?: ?DateTime, + * availabilityStartTime?: ?DateTime, + * terminationTime?: ?DateTime, + * upgradeToServiceType?: ?DateTime, + * upgradeToVersion?: ?string, + * upstreamEndOfLifeTime?: ?DateTime, + * } $values + */ + public function __construct( + array $values, + ) { + $this->majorVersion = $values['majorVersion']; + $this->serviceType = $values['serviceType']; + $this->state = $values['state']; + $this->endOfLifeTime = $values['endOfLifeTime'] ?? null; + $this->availabilityEndTime = $values['availabilityEndTime'] ?? null; + $this->availabilityStartTime = $values['availabilityStartTime'] ?? null; + $this->terminationTime = $values['terminationTime'] ?? null; + $this->upgradeToServiceType = $values['upgradeToServiceType'] ?? null; + $this->upgradeToVersion = $values['upgradeToVersion'] ?? null; + $this->upstreamEndOfLifeTime = $values['upstreamEndOfLifeTime'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DatabaseVersionsResponseItemServiceType.php b/fern/sdk/src/Types/DatabaseVersionsResponseItemServiceType.php new file mode 100644 index 00000000..e171d5fb --- /dev/null +++ b/fern/sdk/src/Types/DatabaseVersionsResponseItemServiceType.php @@ -0,0 +1,11 @@ +name = $values['name'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DetachStorageResponse.php b/fern/sdk/src/Types/DetachStorageResponse.php new file mode 100644 index 00000000..3eb8ec96 --- /dev/null +++ b/fern/sdk/src/Types/DetachStorageResponse.php @@ -0,0 +1,37 @@ +storage = $values['storage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DeviceError.php b/fern/sdk/src/Types/DeviceError.php new file mode 100644 index 00000000..791e69d0 --- /dev/null +++ b/fern/sdk/src/Types/DeviceError.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DeviceErrorError.php b/fern/sdk/src/Types/DeviceErrorError.php new file mode 100644 index 00000000..4039e4b7 --- /dev/null +++ b/fern/sdk/src/Types/DeviceErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DevicesValue.php b/fern/sdk/src/Types/DevicesValue.php new file mode 100644 index 00000000..29cd73ca --- /dev/null +++ b/fern/sdk/src/Types/DevicesValue.php @@ -0,0 +1,38 @@ + $gpuPlans Available GPU plans in the zone. + */ + #[JsonProperty('gpu_plans'), ArrayType(['string' => DevicesValueGpuPlansValue::class])] + public ?array $gpuPlans; + + /** + * @param array{ + * gpuPlans?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->gpuPlans = $values['gpuPlans'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/DevicesValueGpuPlansValue.php b/fern/sdk/src/Types/DevicesValueGpuPlansValue.php new file mode 100644 index 00000000..98ced967 --- /dev/null +++ b/fern/sdk/src/Types/DevicesValueGpuPlansValue.php @@ -0,0 +1,34 @@ +amount = $values['amount']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/Events.php b/fern/sdk/src/Types/Events.php new file mode 100644 index 00000000..efe95702 --- /dev/null +++ b/fern/sdk/src/Types/Events.php @@ -0,0 +1,37 @@ +events = $values['events'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/EventsError.php b/fern/sdk/src/Types/EventsError.php new file mode 100644 index 00000000..f6337bf0 --- /dev/null +++ b/fern/sdk/src/Types/EventsError.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/EventsErrorError.php b/fern/sdk/src/Types/EventsErrorError.php new file mode 100644 index 00000000..1fcab552 --- /dev/null +++ b/fern/sdk/src/Types/EventsErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/EventsEventType.php b/fern/sdk/src/Types/EventsEventType.php new file mode 100644 index 00000000..e63b05bc --- /dev/null +++ b/fern/sdk/src/Types/EventsEventType.php @@ -0,0 +1,14 @@ + $event List of events associated with servers + */ + #[JsonProperty('event'), ArrayType([EventsEventsEventItem::class])] + public array $event; + + /** + * @param array{ + * event: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->event = $values['event']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/EventsEventsEventItem.php b/fern/sdk/src/Types/EventsEventsEventItem.php new file mode 100644 index 00000000..6a56cdc1 --- /dev/null +++ b/fern/sdk/src/Types/EventsEventsEventItem.php @@ -0,0 +1,76 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @param array{ + * server: string, + * time: DateTime, + * type: value-of, + * email?: ?string, + * firstName?: ?string, + * lastName?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->email = $values['email'] ?? null; + $this->firstName = $values['firstName'] ?? null; + $this->lastName = $values['lastName'] ?? null; + $this->server = $values['server']; + $this->time = $values['time']; + $this->type = $values['type']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FileStorageAclCreate.php b/fern/sdk/src/Types/FileStorageAclCreate.php new file mode 100644 index 00000000..d1fa374c --- /dev/null +++ b/fern/sdk/src/Types/FileStorageAclCreate.php @@ -0,0 +1,53 @@ + $permission + */ + #[JsonProperty('permission')] + public string $permission; + + /** + * @param array{ + * name: string, + * target: string, + * permission: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->target = $values['target']; + $this->permission = $values['permission']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FileStorageAclDetailResponse.php b/fern/sdk/src/Types/FileStorageAclDetailResponse.php new file mode 100644 index 00000000..124f0cd2 --- /dev/null +++ b/fern/sdk/src/Types/FileStorageAclDetailResponse.php @@ -0,0 +1,53 @@ +name = $values['name'] ?? null; + $this->target = $values['target'] ?? null; + $this->permission = $values['permission'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FileStorageConfiguredStatus.php b/fern/sdk/src/Types/FileStorageConfiguredStatus.php new file mode 100644 index 00000000..c42215c3 --- /dev/null +++ b/fern/sdk/src/Types/FileStorageConfiguredStatus.php @@ -0,0 +1,9 @@ + $type Error code string. + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var string $title Short description of the error. + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var string $correlationId Unique identifier for the request, useful for debugging. + */ + #[JsonProperty('correlation_id')] + public string $correlationId; + + /** + * @var int $status HTTP status code associated with the error. + */ + #[JsonProperty('status')] + public int $status; + + /** + * @var ?array $invalidParams List of invalid parameters in the request. + */ + #[JsonProperty('invalid_params'), ArrayType([FileStorageErrorResponseInvalidParamsItem::class])] + public ?array $invalidParams; + + /** + * @param array{ + * type: value-of, + * title: string, + * correlationId: string, + * status: int, + * invalidParams?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->title = $values['title']; + $this->correlationId = $values['correlationId']; + $this->status = $values['status']; + $this->invalidParams = $values['invalidParams'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FileStorageErrorResponseInvalidParamsItem.php b/fern/sdk/src/Types/FileStorageErrorResponseInvalidParamsItem.php new file mode 100644 index 00000000..13330fe7 --- /dev/null +++ b/fern/sdk/src/Types/FileStorageErrorResponseInvalidParamsItem.php @@ -0,0 +1,42 @@ +name = $values['name']; + $this->reason = $values['reason']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FileStorageErrorResponseType.php b/fern/sdk/src/Types/FileStorageErrorResponseType.php new file mode 100644 index 00000000..ba1282f1 --- /dev/null +++ b/fern/sdk/src/Types/FileStorageErrorResponseType.php @@ -0,0 +1,11 @@ +key = $values['key']; + $this->value = $values['value'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FileStorageLabelDetails.php b/fern/sdk/src/Types/FileStorageLabelDetails.php new file mode 100644 index 00000000..4d9d8104 --- /dev/null +++ b/fern/sdk/src/Types/FileStorageLabelDetails.php @@ -0,0 +1,45 @@ +key = $values['key'] ?? null; + $this->value = $values['value'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FileStorageNetworkCreate.php b/fern/sdk/src/Types/FileStorageNetworkCreate.php new file mode 100644 index 00000000..49dd6633 --- /dev/null +++ b/fern/sdk/src/Types/FileStorageNetworkCreate.php @@ -0,0 +1,61 @@ + $family + */ + #[JsonProperty('family')] + public string $family; + + /** + * @var ?string $ipAddress + */ + #[JsonProperty('ip_address')] + public ?string $ipAddress; + + /** + * @param array{ + * uuid: string, + * name: string, + * family: value-of, + * ipAddress?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->uuid = $values['uuid']; + $this->name = $values['name']; + $this->family = $values['family']; + $this->ipAddress = $values['ipAddress'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FileStorageNetworkDetailResponse.php b/fern/sdk/src/Types/FileStorageNetworkDetailResponse.php new file mode 100644 index 00000000..f7cf2653 --- /dev/null +++ b/fern/sdk/src/Types/FileStorageNetworkDetailResponse.php @@ -0,0 +1,61 @@ +family = $values['family'] ?? null; + $this->ipAddress = $values['ipAddress'] ?? null; + $this->name = $values['name'] ?? null; + $this->uuid = $values['uuid'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FileStorageNetworkFamily.php b/fern/sdk/src/Types/FileStorageNetworkFamily.php new file mode 100644 index 00000000..3f41dd02 --- /dev/null +++ b/fern/sdk/src/Types/FileStorageNetworkFamily.php @@ -0,0 +1,9 @@ + $networks + */ + #[JsonProperty('networks'), ArrayType([FileStorageNetworkDetailResponse::class])] + public ?array $networks; + + /** + * @var ?array $shares + */ + #[JsonProperty('shares'), ArrayType([FileStorageShareDetailResponse::class])] + public ?array $shares; + + /** + * @var ?array $labels + */ + #[JsonProperty('labels'), ArrayType([FileStorageLabelDetails::class])] + public ?array $labels; + + /** + * @var ?array $stateMessages + */ + #[JsonProperty('state_messages'), ArrayType([FileStorageServiceDetailResponseStateMessagesItem::class])] + public ?array $stateMessages; + + /** + * @var ?DateTime $createdAt + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $createdAt; + + /** + * @var ?DateTime $updatedAt + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $updatedAt; + + /** + * @param array{ + * uuid?: ?string, + * name?: ?string, + * zone?: ?string, + * configuredStatus?: ?string, + * operationalState?: ?string, + * sizeGib?: ?int, + * encrypted?: ?bool, + * networks?: ?array, + * shares?: ?array, + * labels?: ?array, + * stateMessages?: ?array, + * createdAt?: ?DateTime, + * updatedAt?: ?DateTime, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->uuid = $values['uuid'] ?? null; + $this->name = $values['name'] ?? null; + $this->zone = $values['zone'] ?? null; + $this->configuredStatus = $values['configuredStatus'] ?? null; + $this->operationalState = $values['operationalState'] ?? null; + $this->sizeGib = $values['sizeGib'] ?? null; + $this->encrypted = $values['encrypted'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->shares = $values['shares'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->stateMessages = $values['stateMessages'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->updatedAt = $values['updatedAt'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FileStorageServiceDetailResponseStateMessagesItem.php b/fern/sdk/src/Types/FileStorageServiceDetailResponseStateMessagesItem.php new file mode 100644 index 00000000..6265eea5 --- /dev/null +++ b/fern/sdk/src/Types/FileStorageServiceDetailResponseStateMessagesItem.php @@ -0,0 +1,50 @@ +operationalState = $values['operationalState'] ?? null; + $this->message = $values['message'] ?? null; + $this->code = $values['code'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FileStorageShareCreate.php b/fern/sdk/src/Types/FileStorageShareCreate.php new file mode 100644 index 00000000..1124cf62 --- /dev/null +++ b/fern/sdk/src/Types/FileStorageShareCreate.php @@ -0,0 +1,54 @@ + $acl + */ + #[JsonProperty('acl'), ArrayType([FileStorageAclCreate::class])] + public array $acl; + + /** + * @param array{ + * name: string, + * path: string, + * acl: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->path = $values['path']; + $this->acl = $values['acl']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FileStorageShareDetailResponse.php b/fern/sdk/src/Types/FileStorageShareDetailResponse.php new file mode 100644 index 00000000..a2a48964 --- /dev/null +++ b/fern/sdk/src/Types/FileStorageShareDetailResponse.php @@ -0,0 +1,54 @@ + $acl + */ + #[JsonProperty('acl'), ArrayType([FileStorageShareDetailResponseAclItem::class])] + public ?array $acl; + + /** + * @param array{ + * name?: ?string, + * path?: ?string, + * acl?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->path = $values['path'] ?? null; + $this->acl = $values['acl'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FileStorageShareDetailResponseAclItem.php b/fern/sdk/src/Types/FileStorageShareDetailResponseAclItem.php new file mode 100644 index 00000000..3d4375dd --- /dev/null +++ b/fern/sdk/src/Types/FileStorageShareDetailResponseAclItem.php @@ -0,0 +1,50 @@ +name = $values['name'] ?? null; + $this->target = $values['target'] ?? null; + $this->permission = $values['permission'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FirewallRulesetCreateLabel.php b/fern/sdk/src/Types/FirewallRulesetCreateLabel.php new file mode 100644 index 00000000..75e85a6a --- /dev/null +++ b/fern/sdk/src/Types/FirewallRulesetCreateLabel.php @@ -0,0 +1,45 @@ +key = $values['key']; + $this->value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FirewallRulesetDetailResponse.php b/fern/sdk/src/Types/FirewallRulesetDetailResponse.php new file mode 100644 index 00000000..8863164a --- /dev/null +++ b/fern/sdk/src/Types/FirewallRulesetDetailResponse.php @@ -0,0 +1,120 @@ + $labels Labels + */ + #[JsonProperty('labels'), ArrayType([FirewallRulesetCreateLabel::class])] + public ?array $labels; + + /** + * @var ?string $serverUuid + */ + #[JsonProperty('server_uuid')] + public ?string $serverUuid; + + /** + * @var ?DateTime $createdAt + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $createdAt; + + /** + * @var ?DateTime $updatedAt + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $updatedAt; + + /** + * @param array{ + * uuid?: ?string, + * name?: ?string, + * description?: ?string, + * stateful?: ?bool, + * version?: ?int, + * enabled?: ?bool, + * defaultDnsRulesEnabled?: ?bool, + * labels?: ?array, + * serverUuid?: ?string, + * createdAt?: ?DateTime, + * updatedAt?: ?DateTime, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->uuid = $values['uuid'] ?? null; + $this->name = $values['name'] ?? null; + $this->description = $values['description'] ?? null; + $this->stateful = $values['stateful'] ?? null; + $this->version = $values['version'] ?? null; + $this->enabled = $values['enabled'] ?? null; + $this->defaultDnsRulesEnabled = $values['defaultDnsRulesEnabled'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->serverUuid = $values['serverUuid'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->updatedAt = $values['updatedAt'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FirewallRulesetErrorLegacyResponse.php b/fern/sdk/src/Types/FirewallRulesetErrorLegacyResponse.php new file mode 100644 index 00000000..09fa4f1d --- /dev/null +++ b/fern/sdk/src/Types/FirewallRulesetErrorLegacyResponse.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FirewallRulesetErrorLegacyResponseError.php b/fern/sdk/src/Types/FirewallRulesetErrorLegacyResponseError.php new file mode 100644 index 00000000..66616d26 --- /dev/null +++ b/fern/sdk/src/Types/FirewallRulesetErrorLegacyResponseError.php @@ -0,0 +1,45 @@ +errorCode = $values['errorCode'] ?? null; + $this->errorMessage = $values['errorMessage'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FirewallRulesetErrorResponse.php b/fern/sdk/src/Types/FirewallRulesetErrorResponse.php new file mode 100644 index 00000000..9bbb71e0 --- /dev/null +++ b/fern/sdk/src/Types/FirewallRulesetErrorResponse.php @@ -0,0 +1,70 @@ + $invalidParams List of invalid parameters in the request. + */ + #[JsonProperty('invalid_params'), ArrayType(['mixed'])] + public ?array $invalidParams; + + /** + * @param array{ + * type: string, + * title: string, + * correlationId: string, + * status: int, + * invalidParams?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->title = $values['title']; + $this->correlationId = $values['correlationId']; + $this->status = $values['status']; + $this->invalidParams = $values['invalidParams'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FirewallRulesetFirewallRuleCreate.php b/fern/sdk/src/Types/FirewallRulesetFirewallRuleCreate.php new file mode 100644 index 00000000..060f13e0 --- /dev/null +++ b/fern/sdk/src/Types/FirewallRulesetFirewallRuleCreate.php @@ -0,0 +1,170 @@ + $action + */ + #[JsonProperty('action')] + public string $action; + + /** + * @var ?string $comment Comments + */ + #[JsonProperty('comment')] + public ?string $comment; + + /** + * @var ?string $destinationAddressStart + */ + #[JsonProperty('destination_address_start')] + public ?string $destinationAddressStart; + + /** + * @var ?string $destinationAddressEnd + */ + #[JsonProperty('destination_address_end')] + public ?string $destinationAddressEnd; + + /** + * @var ?int $destinationPortStart + */ + #[JsonProperty('destination_port_start')] + public ?int $destinationPortStart; + + /** + * @var ?int $destinationPortEnd + */ + #[JsonProperty('destination_port_end')] + public ?int $destinationPortEnd; + + /** + * @var ?string $destinationAddressCidr + */ + #[JsonProperty('destination_address_cidr')] + public ?string $destinationAddressCidr; + + /** + * @var value-of $direction + */ + #[JsonProperty('direction')] + public string $direction; + + /** + * @var value-of $family + */ + #[JsonProperty('family')] + public string $family; + + /** + * @var ?int $icmpType + */ + #[JsonProperty('icmp_type')] + public ?int $icmpType; + + /** + * @var ?int $position + */ + #[JsonProperty('position')] + public ?int $position; + + /** + * @var ?value-of $protocol + */ + #[JsonProperty('protocol')] + public ?string $protocol; + + /** + * @var ?string $sourceAddressStart + */ + #[JsonProperty('source_address_start')] + public ?string $sourceAddressStart; + + /** + * @var ?string $sourceAddressEnd + */ + #[JsonProperty('source_address_end')] + public ?string $sourceAddressEnd; + + /** + * @var ?int $sourcePortStart + */ + #[JsonProperty('source_port_start')] + public ?int $sourcePortStart; + + /** + * @var ?int $sourcePortEnd + */ + #[JsonProperty('source_port_end')] + public ?int $sourcePortEnd; + + /** + * @var ?string $sourceAddressCidr + */ + #[JsonProperty('source_address_cidr')] + public ?string $sourceAddressCidr; + + /** + * @param array{ + * action: value-of, + * direction: value-of, + * family: value-of, + * enabled?: ?bool, + * comment?: ?string, + * destinationAddressStart?: ?string, + * destinationAddressEnd?: ?string, + * destinationPortStart?: ?int, + * destinationPortEnd?: ?int, + * destinationAddressCidr?: ?string, + * icmpType?: ?int, + * position?: ?int, + * protocol?: ?value-of, + * sourceAddressStart?: ?string, + * sourceAddressEnd?: ?string, + * sourcePortStart?: ?int, + * sourcePortEnd?: ?int, + * sourceAddressCidr?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->enabled = $values['enabled'] ?? null; + $this->action = $values['action']; + $this->comment = $values['comment'] ?? null; + $this->destinationAddressStart = $values['destinationAddressStart'] ?? null; + $this->destinationAddressEnd = $values['destinationAddressEnd'] ?? null; + $this->destinationPortStart = $values['destinationPortStart'] ?? null; + $this->destinationPortEnd = $values['destinationPortEnd'] ?? null; + $this->destinationAddressCidr = $values['destinationAddressCidr'] ?? null; + $this->direction = $values['direction']; + $this->family = $values['family']; + $this->icmpType = $values['icmpType'] ?? null; + $this->position = $values['position'] ?? null; + $this->protocol = $values['protocol'] ?? null; + $this->sourceAddressStart = $values['sourceAddressStart'] ?? null; + $this->sourceAddressEnd = $values['sourceAddressEnd'] ?? null; + $this->sourcePortStart = $values['sourcePortStart'] ?? null; + $this->sourcePortEnd = $values['sourcePortEnd'] ?? null; + $this->sourceAddressCidr = $values['sourceAddressCidr'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FirewallRulesetFirewallRuleListResponse.php b/fern/sdk/src/Types/FirewallRulesetFirewallRuleListResponse.php new file mode 100644 index 00000000..802d516d --- /dev/null +++ b/fern/sdk/src/Types/FirewallRulesetFirewallRuleListResponse.php @@ -0,0 +1,38 @@ + $rules + */ + #[JsonProperty('rules'), ArrayType([FirewallRulesetRuleDetailResponse::class])] + public array $rules; + + /** + * @param array{ + * rules: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->rules = $values['rules']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FirewallRulesetLabelDetailResponse.php b/fern/sdk/src/Types/FirewallRulesetLabelDetailResponse.php new file mode 100644 index 00000000..f1210478 --- /dev/null +++ b/fern/sdk/src/Types/FirewallRulesetLabelDetailResponse.php @@ -0,0 +1,45 @@ +key = $values['key'] ?? null; + $this->value = $values['value'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FirewallRulesetRelatedServers.php b/fern/sdk/src/Types/FirewallRulesetRelatedServers.php new file mode 100644 index 00000000..eb96ed81 --- /dev/null +++ b/fern/sdk/src/Types/FirewallRulesetRelatedServers.php @@ -0,0 +1,38 @@ + $servers Cloud Servers visible to the authenticated account that are related to the ruleset. + */ + #[JsonProperty('servers'), ArrayType([FirewallRulesetRelatedServersServersItem::class])] + public array $servers; + + /** + * @param array{ + * servers: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->servers = $values['servers']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FirewallRulesetRelatedServersServersItem.php b/fern/sdk/src/Types/FirewallRulesetRelatedServersServersItem.php new file mode 100644 index 00000000..1368522c --- /dev/null +++ b/fern/sdk/src/Types/FirewallRulesetRelatedServersServersItem.php @@ -0,0 +1,83 @@ + $attachedRulesets Private firewall rulesets attached to the Cloud Server. + */ + #[JsonProperty('attached_rulesets'), ArrayType([ServerFirewallRulesetRelationshipInternal::class])] + public array $attachedRulesets; + + /** + * @var value-of $firewall + */ + #[JsonProperty('firewall')] + public string $firewall; + + /** + * @var value-of $firewallPrivate + */ + #[JsonProperty('firewall_private')] + public string $firewallPrivate; + + /** + * @var value-of $firewallPrivateDefaultIncomingAction Default action for unmatched incoming traffic on private interfaces. + */ + #[JsonProperty('firewall_private_default_incoming_action')] + public string $firewallPrivateDefaultIncomingAction; + + /** + * @var value-of $firewallPrivateDefaultOutgoingAction Default action for unmatched outgoing traffic on private interfaces. + */ + #[JsonProperty('firewall_private_default_outgoing_action')] + public string $firewallPrivateDefaultOutgoingAction; + + /** + * @var string $title Cloud Server title. + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var string $uuid + */ + #[JsonProperty('uuid')] + public string $uuid; + + /** + * @param array{ + * attachedRulesets: array, + * firewall: value-of, + * firewallPrivate: value-of, + * firewallPrivateDefaultIncomingAction: value-of, + * firewallPrivateDefaultOutgoingAction: value-of, + * title: string, + * uuid: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->attachedRulesets = $values['attachedRulesets']; + $this->firewall = $values['firewall']; + $this->firewallPrivate = $values['firewallPrivate']; + $this->firewallPrivateDefaultIncomingAction = $values['firewallPrivateDefaultIncomingAction']; + $this->firewallPrivateDefaultOutgoingAction = $values['firewallPrivateDefaultOutgoingAction']; + $this->title = $values['title']; + $this->uuid = $values['uuid']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FirewallRulesetRelatedServersServersItemFirewallPrivateDefaultIncomingAction.php b/fern/sdk/src/Types/FirewallRulesetRelatedServersServersItemFirewallPrivateDefaultIncomingAction.php new file mode 100644 index 00000000..b7cd33b9 --- /dev/null +++ b/fern/sdk/src/Types/FirewallRulesetRelatedServersServersItemFirewallPrivateDefaultIncomingAction.php @@ -0,0 +1,9 @@ +uuid = $values['uuid'] ?? null; + $this->enabled = $values['enabled'] ?? null; + $this->action = $values['action']; + $this->comment = $values['comment'] ?? null; + $this->destinationAddressStart = $values['destinationAddressStart'] ?? null; + $this->destinationAddressEnd = $values['destinationAddressEnd'] ?? null; + $this->destinationPortStart = $values['destinationPortStart'] ?? null; + $this->destinationPortEnd = $values['destinationPortEnd'] ?? null; + $this->destinationAddressCidr = $values['destinationAddressCidr'] ?? null; + $this->direction = $values['direction']; + $this->family = $values['family']; + $this->icmpType = $values['icmpType'] ?? null; + $this->position = $values['position'] ?? null; + $this->protocol = $values['protocol'] ?? null; + $this->sourceAddressStart = $values['sourceAddressStart'] ?? null; + $this->sourceAddressEnd = $values['sourceAddressEnd'] ?? null; + $this->sourcePortStart = $values['sourcePortStart'] ?? null; + $this->sourcePortEnd = $values['sourcePortEnd'] ?? null; + $this->sourceAddressCidr = $values['sourceAddressCidr'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FirewallRulesetRuleDirection.php b/fern/sdk/src/Types/FirewallRulesetRuleDirection.php new file mode 100644 index 00000000..d640f472 --- /dev/null +++ b/fern/sdk/src/Types/FirewallRulesetRuleDirection.php @@ -0,0 +1,9 @@ +firewallRules = $values['firewallRules']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FirewallRulesetServerFirewallRule.php b/fern/sdk/src/Types/FirewallRulesetServerFirewallRule.php new file mode 100644 index 00000000..baa12287 --- /dev/null +++ b/fern/sdk/src/Types/FirewallRulesetServerFirewallRule.php @@ -0,0 +1,194 @@ + $direction + */ + #[JsonProperty('direction')] + public string $direction; + + /** + * @var value-of $action + */ + #[JsonProperty('action')] + public string $action; + + /** + * @var ( + * int + * |string + * )|null $position Rule position + */ + #[JsonProperty('position'), Union('integer', 'string', 'null')] + public int|string|null $position; + + /** + * @var ?string $family + */ + #[JsonProperty('family')] + public ?string $family; + + /** + * @var ?string $protocol Rule protocol + */ + #[JsonProperty('protocol')] + public ?string $protocol; + + /** + * @var ?string $enabled Rule enabled + */ + #[JsonProperty('enabled')] + public ?string $enabled; + + /** + * @var ( + * int + * |string + * )|null $icmpType ICMP type + */ + #[JsonProperty('icmp_type'), Union('integer', 'string', 'null')] + public int|string|null $icmpType; + + /** + * @var ( + * int + * |string + * )|null $destinationPortStart Destination port range starts from this port number + */ + #[JsonProperty('destination_port_start'), Union('integer', 'string', 'null')] + public int|string|null $destinationPortStart; + + /** + * @var ( + * int + * |string + * )|null $destinationPortEnd Destination port range ends at this port number + */ + #[JsonProperty('destination_port_end'), Union('integer', 'string', 'null')] + public int|string|null $destinationPortEnd; + + /** + * @var ( + * int + * |string + * )|null $sourcePortStart Source port range starts from this port number + */ + #[JsonProperty('source_port_start'), Union('integer', 'string', 'null')] + public int|string|null $sourcePortStart; + + /** + * @var ( + * int + * |string + * )|null $sourcePortEnd Source port range ends at this port number + */ + #[JsonProperty('source_port_end'), Union('integer', 'string', 'null')] + public int|string|null $sourcePortEnd; + + /** + * @var ?string $destinationAddressStart Destination address range starts from this address + */ + #[JsonProperty('destination_address_start')] + public ?string $destinationAddressStart; + + /** + * @var ?string $destinationAddressEnd Destination address range ends from to this address + */ + #[JsonProperty('destination_address_end')] + public ?string $destinationAddressEnd; + + /** + * @var ?string $sourceAddressStart Source address range starts from this address + */ + #[JsonProperty('source_address_start')] + public ?string $sourceAddressStart; + + /** + * @var ?string $sourceAddressEnd Source address range ends at this address + */ + #[JsonProperty('source_address_end')] + public ?string $sourceAddressEnd; + + /** + * @var ?string $comment Comment + */ + #[JsonProperty('comment')] + public ?string $comment; + + /** + * @param array{ + * direction: value-of, + * action: value-of, + * position?: ( + * int + * |string + * )|null, + * family?: ?string, + * protocol?: ?string, + * enabled?: ?string, + * icmpType?: ( + * int + * |string + * )|null, + * destinationPortStart?: ( + * int + * |string + * )|null, + * destinationPortEnd?: ( + * int + * |string + * )|null, + * sourcePortStart?: ( + * int + * |string + * )|null, + * sourcePortEnd?: ( + * int + * |string + * )|null, + * destinationAddressStart?: ?string, + * destinationAddressEnd?: ?string, + * sourceAddressStart?: ?string, + * sourceAddressEnd?: ?string, + * comment?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->direction = $values['direction']; + $this->action = $values['action']; + $this->position = $values['position'] ?? null; + $this->family = $values['family'] ?? null; + $this->protocol = $values['protocol'] ?? null; + $this->enabled = $values['enabled'] ?? null; + $this->icmpType = $values['icmpType'] ?? null; + $this->destinationPortStart = $values['destinationPortStart'] ?? null; + $this->destinationPortEnd = $values['destinationPortEnd'] ?? null; + $this->sourcePortStart = $values['sourcePortStart'] ?? null; + $this->sourcePortEnd = $values['sourcePortEnd'] ?? null; + $this->destinationAddressStart = $values['destinationAddressStart'] ?? null; + $this->destinationAddressEnd = $values['destinationAddressEnd'] ?? null; + $this->sourceAddressStart = $values['sourceAddressStart'] ?? null; + $this->sourceAddressEnd = $values['sourceAddressEnd'] ?? null; + $this->comment = $values['comment'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FirewallRulesetServerFirewallRuleDetail.php b/fern/sdk/src/Types/FirewallRulesetServerFirewallRuleDetail.php new file mode 100644 index 00000000..8ba0200b --- /dev/null +++ b/fern/sdk/src/Types/FirewallRulesetServerFirewallRuleDetail.php @@ -0,0 +1,37 @@ +firewallRule = $values['firewallRule']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/FirewallRulesetServerFirewallRules.php b/fern/sdk/src/Types/FirewallRulesetServerFirewallRules.php new file mode 100644 index 00000000..c1c07410 --- /dev/null +++ b/fern/sdk/src/Types/FirewallRulesetServerFirewallRules.php @@ -0,0 +1,38 @@ + $firewallRule + */ + #[JsonProperty('firewall_rule'), ArrayType([FirewallRulesetServerFirewallRule::class])] + public ?array $firewallRule; + + /** + * @param array{ + * firewallRule?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->firewallRule = $values['firewallRule'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayAddress.php b/fern/sdk/src/Types/GatewayAddress.php new file mode 100644 index 00000000..36637bef --- /dev/null +++ b/fern/sdk/src/Types/GatewayAddress.php @@ -0,0 +1,34 @@ +addr = $values['addr'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayAddressCreateRequest.php b/fern/sdk/src/Types/GatewayAddressCreateRequest.php new file mode 100644 index 00000000..4b5f354b --- /dev/null +++ b/fern/sdk/src/Types/GatewayAddressCreateRequest.php @@ -0,0 +1,45 @@ +name = $values['name']; + $this->address = $values['address'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayAddressDetailsResponse.php b/fern/sdk/src/Types/GatewayAddressDetailsResponse.php new file mode 100644 index 00000000..c0c92974 --- /dev/null +++ b/fern/sdk/src/Types/GatewayAddressDetailsResponse.php @@ -0,0 +1,53 @@ +name = $values['name'] ?? null; + $this->address = $values['address'] ?? null; + $this->provisionedBy = $values['provisionedBy'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayAuthenticationDetailsResponse.php b/fern/sdk/src/Types/GatewayAuthenticationDetailsResponse.php new file mode 100644 index 00000000..fc3420ad --- /dev/null +++ b/fern/sdk/src/Types/GatewayAuthenticationDetailsResponse.php @@ -0,0 +1,37 @@ + $authentication + */ + #[JsonProperty('authentication')] + public ?string $authentication; + + /** + * @param array{ + * authentication?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->authentication = $values['authentication'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayConnectionCreateRequest.php b/fern/sdk/src/Types/GatewayConnectionCreateRequest.php new file mode 100644 index 00000000..40a3d13c --- /dev/null +++ b/fern/sdk/src/Types/GatewayConnectionCreateRequest.php @@ -0,0 +1,78 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?array $localRoutes Connection local routes + */ + #[JsonProperty('local_routes'), ArrayType([GatewayConnectionRouteRequest::class])] + public ?array $localRoutes; + + /** + * @var ?array $remoteRoutes Connection remote routes + */ + #[JsonProperty('remote_routes'), ArrayType([GatewayConnectionRouteRequest::class])] + public ?array $remoteRoutes; + + /** + * @var ?array $tunnels Connection tunnels + */ + #[JsonProperty('tunnels'), ArrayType([GatewayTunnelCreateRequest::class])] + public ?array $tunnels; + + /** + * @param array{ + * name: string, + * type: value-of, + * uuid?: ?string, + * localRoutes?: ?array, + * remoteRoutes?: ?array, + * tunnels?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->uuid = $values['uuid'] ?? null; + $this->name = $values['name']; + $this->type = $values['type']; + $this->localRoutes = $values['localRoutes'] ?? null; + $this->remoteRoutes = $values['remoteRoutes'] ?? null; + $this->tunnels = $values['tunnels'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayConnectionDetailsResponse.php b/fern/sdk/src/Types/GatewayConnectionDetailsResponse.php new file mode 100644 index 00000000..60b2a6a7 --- /dev/null +++ b/fern/sdk/src/Types/GatewayConnectionDetailsResponse.php @@ -0,0 +1,96 @@ + $type + */ + #[JsonProperty('type')] + public ?string $type; + + /** + * @var ?array $localRoutes Local routes for the connection + */ + #[JsonProperty('local_routes'), ArrayType([GatewayConnectionRouteDetailsResponse::class])] + public ?array $localRoutes; + + /** + * @var ?array $remoteRoutes Remote routes for the connection + */ + #[JsonProperty('remote_routes'), ArrayType([GatewayConnectionRouteDetailsResponse::class])] + public ?array $remoteRoutes; + + /** + * @var ?array $tunnels + */ + #[JsonProperty('tunnels'), ArrayType([GatewayTunnelDetailsResponse::class])] + public ?array $tunnels; + + /** + * @var ?DateTime $createdAt Timestamp of when the connection was created. + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $createdAt; + + /** + * @var ?DateTime $updatedAt Timestamp of when the connection was last updated. + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $updatedAt; + + /** + * @param array{ + * uuid?: ?string, + * name?: ?string, + * type?: ?value-of, + * localRoutes?: ?array, + * remoteRoutes?: ?array, + * tunnels?: ?array, + * createdAt?: ?DateTime, + * updatedAt?: ?DateTime, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->uuid = $values['uuid'] ?? null; + $this->name = $values['name'] ?? null; + $this->type = $values['type'] ?? null; + $this->localRoutes = $values['localRoutes'] ?? null; + $this->remoteRoutes = $values['remoteRoutes'] ?? null; + $this->tunnels = $values['tunnels'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->updatedAt = $values['updatedAt'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayConnectionModifyRequest.php b/fern/sdk/src/Types/GatewayConnectionModifyRequest.php new file mode 100644 index 00000000..f5ec2fa6 --- /dev/null +++ b/fern/sdk/src/Types/GatewayConnectionModifyRequest.php @@ -0,0 +1,78 @@ + $type + */ + #[JsonProperty('type')] + public ?string $type; + + /** + * @var ?array $localRoutes Connection local routes + */ + #[JsonProperty('local_routes'), ArrayType([GatewayConnectionRouteRequest::class])] + public ?array $localRoutes; + + /** + * @var ?array $remoteRoutes Connection remote routes + */ + #[JsonProperty('remote_routes'), ArrayType([GatewayConnectionRouteRequest::class])] + public ?array $remoteRoutes; + + /** + * @var ?array $tunnels Tunnels + */ + #[JsonProperty('tunnels'), ArrayType([GatewayTunnelModifyRequest::class])] + public ?array $tunnels; + + /** + * @param array{ + * uuid?: ?string, + * name?: ?string, + * type?: ?value-of, + * localRoutes?: ?array, + * remoteRoutes?: ?array, + * tunnels?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->uuid = $values['uuid'] ?? null; + $this->name = $values['name'] ?? null; + $this->type = $values['type'] ?? null; + $this->localRoutes = $values['localRoutes'] ?? null; + $this->remoteRoutes = $values['remoteRoutes'] ?? null; + $this->tunnels = $values['tunnels'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayConnectionRouteDetailsResponse.php b/fern/sdk/src/Types/GatewayConnectionRouteDetailsResponse.php new file mode 100644 index 00000000..265db7f2 --- /dev/null +++ b/fern/sdk/src/Types/GatewayConnectionRouteDetailsResponse.php @@ -0,0 +1,53 @@ + $type + */ + #[JsonProperty('type')] + public ?string $type; + + /** + * @var ?string $staticNetwork Static network for the connection route + */ + #[JsonProperty('static_network')] + public ?string $staticNetwork; + + /** + * @param array{ + * name?: ?string, + * type?: ?value-of, + * staticNetwork?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->type = $values['type'] ?? null; + $this->staticNetwork = $values['staticNetwork'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayConnectionRouteRequest.php b/fern/sdk/src/Types/GatewayConnectionRouteRequest.php new file mode 100644 index 00000000..6c38e826 --- /dev/null +++ b/fern/sdk/src/Types/GatewayConnectionRouteRequest.php @@ -0,0 +1,53 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var string $staticNetwork Static network subnet + */ + #[JsonProperty('static_network')] + public string $staticNetwork; + + /** + * @param array{ + * name: string, + * type: value-of, + * staticNetwork: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->type = $values['type']; + $this->staticNetwork = $values['staticNetwork']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayConnectionRouteType.php b/fern/sdk/src/Types/GatewayConnectionRouteType.php new file mode 100644 index 00000000..5bcdf1aa --- /dev/null +++ b/fern/sdk/src/Types/GatewayConnectionRouteType.php @@ -0,0 +1,8 @@ + $invalidParams List of invalid parameters in the request. + */ + #[JsonProperty('invalid_params'), ArrayType(['mixed'])] + public ?array $invalidParams; + + /** + * @param array{ + * type: string, + * title: string, + * correlationId: string, + * status: int, + * invalidParams?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->title = $values['title']; + $this->correlationId = $values['correlationId']; + $this->status = $values['status']; + $this->invalidParams = $values['invalidParams'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayIpsecAuthenticationType.php b/fern/sdk/src/Types/GatewayIpsecAuthenticationType.php new file mode 100644 index 00000000..a31c483e --- /dev/null +++ b/fern/sdk/src/Types/GatewayIpsecAuthenticationType.php @@ -0,0 +1,8 @@ +> $phase1Algorithms Phase 1 proposal algorithms + */ + #[JsonProperty('phase1_algorithms'), ArrayType(['string'])] + public ?array $phase1Algorithms; + + /** + * @var ?array> $phase2Algorithms Phase 2 security association algorithms + */ + #[JsonProperty('phase2_algorithms'), ArrayType(['string'])] + public ?array $phase2Algorithms; + + /** + * @var ?array> $phase1IntegrityAlgorithms Phase 1 integrity algorithms + */ + #[JsonProperty('phase1_integrity_algorithms'), ArrayType(['string'])] + public ?array $phase1IntegrityAlgorithms; + + /** + * @var ?array> $phase2IntegrityAlgorithms Phase 2 integrity algorithms + */ + #[JsonProperty('phase2_integrity_algorithms'), ArrayType(['string'])] + public ?array $phase2IntegrityAlgorithms; + + /** + * @var ?int $ikeLifetime Maximum IKE SA lifetime in seconds + */ + #[JsonProperty('ike_lifetime')] + public ?int $ikeLifetime; + + /** + * @var ?int $rekeyTime IKE SA rekey time in seconds + */ + #[JsonProperty('rekey_time')] + public ?int $rekeyTime; + + /** + * @var ?int $childRekeyTime IKE child SA rekey time in seconds + */ + #[JsonProperty('child_rekey_time')] + public ?int $childRekeyTime; + + /** + * @var ?int $dpdDelay Delay before sending Dead Peer Detection packets if no traffic is detected, in seconds + */ + #[JsonProperty('dpd_delay')] + public ?int $dpdDelay; + + /** + * @var ?int $dpdTimeout Timeout period for DPD reply before considering the peer to be dead, in seconds + */ + #[JsonProperty('dpd_timeout')] + public ?int $dpdTimeout; + + /** + * @var ?array $phase1DhGroupNumbers Phase 1 Diffie-Hellman group numbers + */ + #[JsonProperty('phase1_dh_group_numbers'), ArrayType(['integer'])] + public ?array $phase1DhGroupNumbers; + + /** + * @var ?array $phase2DhGroupNumbers Phase 2 Diffie-Hellman group numbers + */ + #[JsonProperty('phase2_dh_group_numbers'), ArrayType(['integer'])] + public ?array $phase2DhGroupNumbers; + + /** + * @param array{ + * authentication?: ?GatewayAuthenticationDetailsResponse, + * phase1Algorithms?: ?array>, + * phase2Algorithms?: ?array>, + * phase1IntegrityAlgorithms?: ?array>, + * phase2IntegrityAlgorithms?: ?array>, + * ikeLifetime?: ?int, + * rekeyTime?: ?int, + * childRekeyTime?: ?int, + * dpdDelay?: ?int, + * dpdTimeout?: ?int, + * phase1DhGroupNumbers?: ?array, + * phase2DhGroupNumbers?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->authentication = $values['authentication'] ?? null; + $this->phase1Algorithms = $values['phase1Algorithms'] ?? null; + $this->phase2Algorithms = $values['phase2Algorithms'] ?? null; + $this->phase1IntegrityAlgorithms = $values['phase1IntegrityAlgorithms'] ?? null; + $this->phase2IntegrityAlgorithms = $values['phase2IntegrityAlgorithms'] ?? null; + $this->ikeLifetime = $values['ikeLifetime'] ?? null; + $this->rekeyTime = $values['rekeyTime'] ?? null; + $this->childRekeyTime = $values['childRekeyTime'] ?? null; + $this->dpdDelay = $values['dpdDelay'] ?? null; + $this->dpdTimeout = $values['dpdTimeout'] ?? null; + $this->phase1DhGroupNumbers = $values['phase1DhGroupNumbers'] ?? null; + $this->phase2DhGroupNumbers = $values['phase2DhGroupNumbers'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponse.php b/fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponse.php new file mode 100644 index 00000000..536fd4d6 --- /dev/null +++ b/fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponse.php @@ -0,0 +1,176 @@ + $operationalState Operational state of the IKE SA + */ + #[JsonProperty('operational_state')] + public ?string $operationalState; + + /** + * @var ?value-of $internalState Internal state of the IKE SA + */ + #[JsonProperty('internal_state')] + public ?string $internalState; + + /** + * @var ?bool $initator Whether the local gateway is the initiator of the IKE SA + */ + #[JsonProperty('initator')] + public ?bool $initator; + + /** + * @var ?int $established + */ + #[JsonProperty('established')] + public ?int $established; + + /** + * @var ?int $rekeyTime + */ + #[JsonProperty('rekey_time')] + public ?int $rekeyTime; + + /** + * @var ?int $reauthTime + */ + #[JsonProperty('reauth_time')] + public ?int $reauthTime; + + /** + * @var ?array $childSas + */ + #[JsonProperty('child_sas'), ArrayType([GatewayIpsecIkeSaMetricsDetailsResponseChildSasItem::class])] + public ?array $childSas; + + /** + * @var ?string $localHost Local host IP address + */ + #[JsonProperty('local_host')] + public ?string $localHost; + + /** + * @var ?string $remoteHost Remote host IP address + */ + #[JsonProperty('remote_host')] + public ?string $remoteHost; + + /** + * @var ?string $localId Local IKE identity + */ + #[JsonProperty('local_id')] + public ?string $localId; + + /** + * @var ?string $remoteId Remote IKE identity + */ + #[JsonProperty('remote_id')] + public ?string $remoteId; + + /** + * @var ?GatewayIpsecIkeSaMetricsDetailsResponseHeuristicState $heuristicState Heuristic state of the IKE SA + */ + #[JsonProperty('heuristic_state')] + public ?GatewayIpsecIkeSaMetricsDetailsResponseHeuristicState $heuristicState; + + /** + * @var ?DateTime $createdAt Timestamp of when the IKE SA was created. + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $createdAt; + + /** + * @var ?DateTime $updatedAt Timestamp of when the IKE SA was last updated. + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $updatedAt; + + /** + * @param array{ + * name?: ?string, + * tunnelId?: ?int, + * uniqueId?: ?string, + * version?: ?int, + * operationalState?: ?value-of, + * internalState?: ?value-of, + * initator?: ?bool, + * established?: ?int, + * rekeyTime?: ?int, + * reauthTime?: ?int, + * childSas?: ?array, + * localHost?: ?string, + * remoteHost?: ?string, + * localId?: ?string, + * remoteId?: ?string, + * heuristicState?: ?GatewayIpsecIkeSaMetricsDetailsResponseHeuristicState, + * createdAt?: ?DateTime, + * updatedAt?: ?DateTime, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->tunnelId = $values['tunnelId'] ?? null; + $this->uniqueId = $values['uniqueId'] ?? null; + $this->version = $values['version'] ?? null; + $this->operationalState = $values['operationalState'] ?? null; + $this->internalState = $values['internalState'] ?? null; + $this->initator = $values['initator'] ?? null; + $this->established = $values['established'] ?? null; + $this->rekeyTime = $values['rekeyTime'] ?? null; + $this->reauthTime = $values['reauthTime'] ?? null; + $this->childSas = $values['childSas'] ?? null; + $this->localHost = $values['localHost'] ?? null; + $this->remoteHost = $values['remoteHost'] ?? null; + $this->localId = $values['localId'] ?? null; + $this->remoteId = $values['remoteId'] ?? null; + $this->heuristicState = $values['heuristicState'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->updatedAt = $values['updatedAt'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponseChildSasItem.php b/fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponseChildSasItem.php new file mode 100644 index 00000000..cd5da53c --- /dev/null +++ b/fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponseChildSasItem.php @@ -0,0 +1,165 @@ + $state Operational state of the child SA + */ + #[JsonProperty('state')] + public ?string $state; + + /** + * @var ?string $spiIn + */ + #[JsonProperty('spi_in')] + public ?string $spiIn; + + /** + * @var ?string $spiOut + */ + #[JsonProperty('spi_out')] + public ?string $spiOut; + + /** + * @var ?int $bytesIn + */ + #[JsonProperty('bytes_in')] + public ?int $bytesIn; + + /** + * @var ?int $bytesOut + */ + #[JsonProperty('bytes_out')] + public ?int $bytesOut; + + /** + * @var ?int $packetsIn + */ + #[JsonProperty('packets_in')] + public ?int $packetsIn; + + /** + * @var ?int $packetsOut + */ + #[JsonProperty('packets_out')] + public ?int $packetsOut; + + /** + * @var ?int $rekeyTime + */ + #[JsonProperty('rekey_time')] + public ?int $rekeyTime; + + /** + * @var ?int $lifeTime + */ + #[JsonProperty('life_time')] + public ?int $lifeTime; + + /** + * @var ?int $installTime + */ + #[JsonProperty('install_time')] + public ?int $installTime; + + /** + * @var ?array $localTrafficSelector + */ + #[JsonProperty('local_traffic_selector'), ArrayType(['string'])] + public ?array $localTrafficSelector; + + /** + * @var ?array $remoteTrafficSelector + */ + #[JsonProperty('remote_traffic_selector'), ArrayType(['string'])] + public ?array $remoteTrafficSelector; + + /** + * @var ?DateTime $createdAt Timestamp of when the child SA was created. + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $createdAt; + + /** + * @var ?DateTime $updatedAt Timestamp of when the child SA was last updated. + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $updatedAt; + + /** + * @param array{ + * name?: ?string, + * tunnelId?: ?int, + * uniqueId?: ?string, + * state?: ?value-of, + * spiIn?: ?string, + * spiOut?: ?string, + * bytesIn?: ?int, + * bytesOut?: ?int, + * packetsIn?: ?int, + * packetsOut?: ?int, + * rekeyTime?: ?int, + * lifeTime?: ?int, + * installTime?: ?int, + * localTrafficSelector?: ?array, + * remoteTrafficSelector?: ?array, + * createdAt?: ?DateTime, + * updatedAt?: ?DateTime, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->tunnelId = $values['tunnelId'] ?? null; + $this->uniqueId = $values['uniqueId'] ?? null; + $this->state = $values['state'] ?? null; + $this->spiIn = $values['spiIn'] ?? null; + $this->spiOut = $values['spiOut'] ?? null; + $this->bytesIn = $values['bytesIn'] ?? null; + $this->bytesOut = $values['bytesOut'] ?? null; + $this->packetsIn = $values['packetsIn'] ?? null; + $this->packetsOut = $values['packetsOut'] ?? null; + $this->rekeyTime = $values['rekeyTime'] ?? null; + $this->lifeTime = $values['lifeTime'] ?? null; + $this->installTime = $values['installTime'] ?? null; + $this->localTrafficSelector = $values['localTrafficSelector'] ?? null; + $this->remoteTrafficSelector = $values['remoteTrafficSelector'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->updatedAt = $values['updatedAt'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponseChildSasItemState.php b/fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponseChildSasItemState.php new file mode 100644 index 00000000..55c881b0 --- /dev/null +++ b/fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponseChildSasItemState.php @@ -0,0 +1,20 @@ +tunnelUp = $values['tunnelUp'] ?? null; + $this->tunnelHealthy = $values['tunnelHealthy'] ?? null; + $this->lastDownMessage = $values['lastDownMessage'] ?? null; + $this->updatedAt = $values['updatedAt'] ?? null; + $this->lastDownMessageUpdatedAt = $values['lastDownMessageUpdatedAt'] ?? null; + $this->upEvents = $values['upEvents'] ?? null; + $this->downEvents = $values['downEvents'] ?? null; + $this->logMessageBadEvents = $values['logMessageBadEvents'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponseInternalState.php b/fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponseInternalState.php new file mode 100644 index 00000000..6aea98ba --- /dev/null +++ b/fern/sdk/src/Types/GatewayIpsecIkeSaMetricsDetailsResponseInternalState.php @@ -0,0 +1,18 @@ + $ikeSas List of IKE SAs + */ + #[JsonProperty('ike_sas'), ArrayType([GatewayIpsecIkeSaMetricsDetailsResponse::class])] + public ?array $ikeSas; + + /** + * @param array{ + * ikeSas?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->ikeSas = $values['ikeSas'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayLabelCreateRequest.php b/fern/sdk/src/Types/GatewayLabelCreateRequest.php new file mode 100644 index 00000000..542d022c --- /dev/null +++ b/fern/sdk/src/Types/GatewayLabelCreateRequest.php @@ -0,0 +1,45 @@ +key = $values['key']; + $this->value = $values['value'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayLabelDetailsResponse.php b/fern/sdk/src/Types/GatewayLabelDetailsResponse.php new file mode 100644 index 00000000..7bba7164 --- /dev/null +++ b/fern/sdk/src/Types/GatewayLabelDetailsResponse.php @@ -0,0 +1,45 @@ +key = $values['key']; + $this->value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayLocalPeerAddressDetailsResponse.php b/fern/sdk/src/Types/GatewayLocalPeerAddressDetailsResponse.php new file mode 100644 index 00000000..3941cf4b --- /dev/null +++ b/fern/sdk/src/Types/GatewayLocalPeerAddressDetailsResponse.php @@ -0,0 +1,37 @@ +name = $values['name'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayMetricsDetailsResponse.php b/fern/sdk/src/Types/GatewayMetricsDetailsResponse.php new file mode 100644 index 00000000..dd470a2f --- /dev/null +++ b/fern/sdk/src/Types/GatewayMetricsDetailsResponse.php @@ -0,0 +1,79 @@ +name = $values['name'] ?? null; + $this->activeConnections = $values['activeConnections'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->updatedAt = $values['updatedAt'] ?? null; + $this->totalAcceptedConnections = $values['totalAcceptedConnections'] ?? null; + $this->totalRejectedSessions = $values['totalRejectedSessions'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayPlanDetailsResponse.php b/fern/sdk/src/Types/GatewayPlanDetailsResponse.php new file mode 100644 index 00000000..03d06aaa --- /dev/null +++ b/fern/sdk/src/Types/GatewayPlanDetailsResponse.php @@ -0,0 +1,86 @@ +> $supportedFeatures + */ + #[JsonProperty('supported_features'), ArrayType(['string'])] + public ?array $supportedFeatures; + + /** + * @var ?int $vpnTunnelAmount Number of VPN tunnels this plan allows. + */ + #[JsonProperty('vpn_tunnel_amount')] + public ?int $vpnTunnelAmount; + + /** + * @var ?int $perGatewayBandwidthMbps Per gateway (agent node server) bandwidth in megabits per second. + */ + #[JsonProperty('per_gateway_bandwidth_mbps')] + public ?int $perGatewayBandwidthMbps; + + /** + * @var ?int $perGatewayMaximumVpnBandwidthMbps Per gateway (agent node server) maximum vpn bandwidth in megabits per second. + */ + #[JsonProperty('per_gateway_maximum_vpn_bandwidth_mbps')] + public ?int $perGatewayMaximumVpnBandwidthMbps; + + /** + * @param array{ + * name?: ?string, + * serverNumber?: ?int, + * perGatewayMaxConnections?: ?int, + * supportedFeatures?: ?array>, + * vpnTunnelAmount?: ?int, + * perGatewayBandwidthMbps?: ?int, + * perGatewayMaximumVpnBandwidthMbps?: ?int, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->serverNumber = $values['serverNumber'] ?? null; + $this->perGatewayMaxConnections = $values['perGatewayMaxConnections'] ?? null; + $this->supportedFeatures = $values['supportedFeatures'] ?? null; + $this->vpnTunnelAmount = $values['vpnTunnelAmount'] ?? null; + $this->perGatewayBandwidthMbps = $values['perGatewayBandwidthMbps'] ?? null; + $this->perGatewayMaximumVpnBandwidthMbps = $values['perGatewayMaximumVpnBandwidthMbps'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayQueryParamSortServices.php b/fern/sdk/src/Types/GatewayQueryParamSortServices.php new file mode 100644 index 00000000..e032a113 --- /dev/null +++ b/fern/sdk/src/Types/GatewayQueryParamSortServices.php @@ -0,0 +1,10 @@ +address = $values['address'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayRouterCreateRequest.php b/fern/sdk/src/Types/GatewayRouterCreateRequest.php new file mode 100644 index 00000000..ee7fa22f --- /dev/null +++ b/fern/sdk/src/Types/GatewayRouterCreateRequest.php @@ -0,0 +1,37 @@ +uuid = $values['uuid']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayRouterDetailsResponse.php b/fern/sdk/src/Types/GatewayRouterDetailsResponse.php new file mode 100644 index 00000000..c6cd0fed --- /dev/null +++ b/fern/sdk/src/Types/GatewayRouterDetailsResponse.php @@ -0,0 +1,55 @@ +uuid = $values['uuid'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->updatedAt = $values['updatedAt'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayServiceConfiguredStatus.php b/fern/sdk/src/Types/GatewayServiceConfiguredStatus.php new file mode 100644 index 00000000..601be25f --- /dev/null +++ b/fern/sdk/src/Types/GatewayServiceConfiguredStatus.php @@ -0,0 +1,9 @@ +> $features Active features + */ + #[JsonProperty('features'), ArrayType(['string'])] + public ?array $features; + + /** + * @var ?GatewayRouterDetailsResponse $routers + */ + #[JsonProperty('routers')] + public ?GatewayRouterDetailsResponse $routers; + + /** + * @var ?array $addresses + */ + #[JsonProperty('addresses'), ArrayType([GatewayAddressDetailsResponse::class])] + public ?array $addresses; + + /** + * @var ?array $connections + */ + #[JsonProperty('connections'), ArrayType([GatewayConnectionDetailsResponse::class])] + public ?array $connections; + + /** + * @var ?value-of $configuredStatus + */ + #[JsonProperty('configured_status')] + public ?string $configuredStatus; + + /** + * @var ?value-of $operationalState + */ + #[JsonProperty('operational_state')] + public ?string $operationalState; + + /** + * @var ?bool $automaticTunnelInternalIpAllocation Allocate and use tunnel internal IPs automatically + */ + #[JsonProperty('automatic_tunnel_internal_ip_allocation')] + public ?bool $automaticTunnelInternalIpAllocation; + + /** + * @var ?array $labels Labels + */ + #[JsonProperty('labels'), ArrayType([GatewayLabelDetailsResponse::class])] + public ?array $labels; + + /** + * @var ?DateTime $createdAt Timestamp of when the service was created. + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $createdAt; + + /** + * @var ?DateTime $updatedAt Timestamp of when the service was last updated. + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $updatedAt; + + /** + * @param array{ + * uuid?: ?string, + * name?: ?string, + * zone?: ?string, + * plan?: ?string, + * features?: ?array>, + * routers?: ?GatewayRouterDetailsResponse, + * addresses?: ?array, + * connections?: ?array, + * configuredStatus?: ?value-of, + * operationalState?: ?value-of, + * automaticTunnelInternalIpAllocation?: ?bool, + * labels?: ?array, + * createdAt?: ?DateTime, + * updatedAt?: ?DateTime, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->uuid = $values['uuid'] ?? null; + $this->name = $values['name'] ?? null; + $this->zone = $values['zone'] ?? null; + $this->plan = $values['plan'] ?? null; + $this->features = $values['features'] ?? null; + $this->routers = $values['routers'] ?? null; + $this->addresses = $values['addresses'] ?? null; + $this->connections = $values['connections'] ?? null; + $this->configuredStatus = $values['configuredStatus'] ?? null; + $this->operationalState = $values['operationalState'] ?? null; + $this->automaticTunnelInternalIpAllocation = $values['automaticTunnelInternalIpAllocation'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->updatedAt = $values['updatedAt'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayServiceFeatures.php b/fern/sdk/src/Types/GatewayServiceFeatures.php new file mode 100644 index 00000000..c2fb3e5a --- /dev/null +++ b/fern/sdk/src/Types/GatewayServiceFeatures.php @@ -0,0 +1,9 @@ + $sessions List of service sessions created. + */ + #[JsonProperty('sessions'), ArrayType([GatewayServiceLogSessionDetailsResponse::class])] + public array $sessions; + + /** + * @param array{ + * sessions: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->sessions = $values['sessions']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayServiceLogSessionDetailsResponse.php b/fern/sdk/src/Types/GatewayServiceLogSessionDetailsResponse.php new file mode 100644 index 00000000..6c3d0337 --- /dev/null +++ b/fern/sdk/src/Types/GatewayServiceLogSessionDetailsResponse.php @@ -0,0 +1,45 @@ +sessionId = $values['sessionId']; + $this->token = $values['token']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayServiceLogSessionTypes.php b/fern/sdk/src/Types/GatewayServiceLogSessionTypes.php new file mode 100644 index 00000000..1b8c1f9a --- /dev/null +++ b/fern/sdk/src/Types/GatewayServiceLogSessionTypes.php @@ -0,0 +1,8 @@ + $gateways + */ + #[JsonProperty('gateways'), ArrayType([GatewayMetricsDetailsResponse::class])] + public ?array $gateways; + + /** + * @var ?GatewayIpsecMetricsDetailsResponse $ipsecMetrics + */ + #[JsonProperty('ipsec_metrics')] + public ?GatewayIpsecMetricsDetailsResponse $ipsecMetrics; + + /** + * @param array{ + * gateways?: ?array, + * ipsecMetrics?: ?GatewayIpsecMetricsDetailsResponse, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->gateways = $values['gateways'] ?? null; + $this->ipsecMetrics = $values['ipsecMetrics'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayServiceOperationalState.php b/fern/sdk/src/Types/GatewayServiceOperationalState.php new file mode 100644 index 00000000..c50a5f95 --- /dev/null +++ b/fern/sdk/src/Types/GatewayServiceOperationalState.php @@ -0,0 +1,24 @@ +uuid = $values['uuid'] ?? null; + $this->name = $values['name']; + $this->localAddress = $values['localAddress']; + $this->remoteAddress = $values['remoteAddress']; + $this->ipsec = $values['ipsec']; + $this->tunnelInternalIp = $values['tunnelInternalIp'] ?? null; + $this->internalPeerPingInterval = $values['internalPeerPingInterval'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayTunnelCreateRequestIpsec.php b/fern/sdk/src/Types/GatewayTunnelCreateRequestIpsec.php new file mode 100644 index 00000000..6f70705c --- /dev/null +++ b/fern/sdk/src/Types/GatewayTunnelCreateRequestIpsec.php @@ -0,0 +1,126 @@ +> $phase1Algorithms Phase 1 proposal algorithms + */ + #[JsonProperty('phase1_algorithms'), ArrayType(['string'])] + public ?array $phase1Algorithms; + + /** + * @var ?array> $phase2Algorithms Phase 2 security association algorithms + */ + #[JsonProperty('phase2_algorithms'), ArrayType(['string'])] + public ?array $phase2Algorithms; + + /** + * @var ?array> $phase1IntegrityAlgorithms Phase 1 integrity algorithms + */ + #[JsonProperty('phase1_integrity_algorithms'), ArrayType(['string'])] + public ?array $phase1IntegrityAlgorithms; + + /** + * @var ?array> $phase2IntegrityAlgorithms Phase 2 integrity algorithms + */ + #[JsonProperty('phase2_integrity_algorithms'), ArrayType(['string'])] + public ?array $phase2IntegrityAlgorithms; + + /** + * @var ?array $phase1DhGroupNumbers Phase 1 Diffie-Hellman group numbers + */ + #[JsonProperty('phase1_dh_group_numbers'), ArrayType(['integer'])] + public ?array $phase1DhGroupNumbers; + + /** + * @var ?array $phase2DhGroupNumbers Phase 2 Diffie-Hellman group numbers + */ + #[JsonProperty('phase2_dh_group_numbers'), ArrayType(['integer'])] + public ?array $phase2DhGroupNumbers; + + /** + * @var ?int $ikeLifetime Maximum IKE SA lifetime in seconds + */ + #[JsonProperty('ike_lifetime')] + public ?int $ikeLifetime; + + /** + * @var ?int $rekeyTime IKE SA rekey time in seconds + */ + #[JsonProperty('rekey_time')] + public ?int $rekeyTime; + + /** + * @var ?int $childRekeyTime IKE child SA rekey time in seconds + */ + #[JsonProperty('child_rekey_time')] + public ?int $childRekeyTime; + + /** + * @var ?int $dpdDelay Delay before sending Dead Peer Detection packets if no traffic is detected, in seconds + */ + #[JsonProperty('dpd_delay')] + public ?int $dpdDelay; + + /** + * @var ?int $dpdTimeout Timeout period for DPD reply before considering the peer to be dead, in seconds + */ + #[JsonProperty('dpd_timeout')] + public ?int $dpdTimeout; + + /** + * @param array{ + * authentication: GatewayTunnelCreateRequestIpsecAuthentication, + * phase1Algorithms?: ?array>, + * phase2Algorithms?: ?array>, + * phase1IntegrityAlgorithms?: ?array>, + * phase2IntegrityAlgorithms?: ?array>, + * phase1DhGroupNumbers?: ?array, + * phase2DhGroupNumbers?: ?array, + * ikeLifetime?: ?int, + * rekeyTime?: ?int, + * childRekeyTime?: ?int, + * dpdDelay?: ?int, + * dpdTimeout?: ?int, + * } $values + */ + public function __construct( + array $values, + ) { + $this->authentication = $values['authentication']; + $this->phase1Algorithms = $values['phase1Algorithms'] ?? null; + $this->phase2Algorithms = $values['phase2Algorithms'] ?? null; + $this->phase1IntegrityAlgorithms = $values['phase1IntegrityAlgorithms'] ?? null; + $this->phase2IntegrityAlgorithms = $values['phase2IntegrityAlgorithms'] ?? null; + $this->phase1DhGroupNumbers = $values['phase1DhGroupNumbers'] ?? null; + $this->phase2DhGroupNumbers = $values['phase2DhGroupNumbers'] ?? null; + $this->ikeLifetime = $values['ikeLifetime'] ?? null; + $this->rekeyTime = $values['rekeyTime'] ?? null; + $this->childRekeyTime = $values['childRekeyTime'] ?? null; + $this->dpdDelay = $values['dpdDelay'] ?? null; + $this->dpdTimeout = $values['dpdTimeout'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayTunnelCreateRequestIpsecAuthentication.php b/fern/sdk/src/Types/GatewayTunnelCreateRequestIpsecAuthentication.php new file mode 100644 index 00000000..a38c79b0 --- /dev/null +++ b/fern/sdk/src/Types/GatewayTunnelCreateRequestIpsecAuthentication.php @@ -0,0 +1,45 @@ + $authentication + */ + #[JsonProperty('authentication')] + public string $authentication; + + /** + * @var string $psk IPsec PSK + */ + #[JsonProperty('psk')] + public string $psk; + + /** + * @param array{ + * authentication: value-of, + * psk: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->authentication = $values['authentication']; + $this->psk = $values['psk']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayTunnelCreateRequestLocalAddress.php b/fern/sdk/src/Types/GatewayTunnelCreateRequestLocalAddress.php new file mode 100644 index 00000000..840f1713 --- /dev/null +++ b/fern/sdk/src/Types/GatewayTunnelCreateRequestLocalAddress.php @@ -0,0 +1,37 @@ +name = $values['name'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayTunnelCreateRequestRemoteAddress.php b/fern/sdk/src/Types/GatewayTunnelCreateRequestRemoteAddress.php new file mode 100644 index 00000000..54599ce1 --- /dev/null +++ b/fern/sdk/src/Types/GatewayTunnelCreateRequestRemoteAddress.php @@ -0,0 +1,37 @@ +address = $values['address'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayTunnelDetailsResponse.php b/fern/sdk/src/Types/GatewayTunnelDetailsResponse.php new file mode 100644 index 00000000..81fb5220 --- /dev/null +++ b/fern/sdk/src/Types/GatewayTunnelDetailsResponse.php @@ -0,0 +1,127 @@ + $operationalState + */ + #[JsonProperty('operational_state')] + public ?string $operationalState; + + /** + * @var ?DateTime $createdAt Timestamp of when the tunnel was created. + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $createdAt; + + /** + * @var ?DateTime $updatedAt Timestamp of when the tunnel was last updated. + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $updatedAt; + + /** + * @var ?bool $tunnelUp Indicates whether the tunnel is up + */ + #[JsonProperty('tunnel_up')] + public ?bool $tunnelUp; + + /** + * @var ?bool $tunnelHealthy Indicates whether the tunnel is healthy + */ + #[JsonProperty('tunnel_healthy')] + public ?bool $tunnelHealthy; + + /** + * @param array{ + * uuid?: ?string, + * name?: ?string, + * localAddress?: ?GatewayLocalPeerAddressDetailsResponse, + * remoteAddress?: ?GatewayRemotePeerAddressDetailsResponse, + * ipsec?: ?GatewayIpsecDetailsResponse, + * tunnelInternalIp?: ?GatewayTunnelInternalIpDetailsResponse, + * internalPeerPingInterval?: ?int, + * operationalState?: ?value-of, + * createdAt?: ?DateTime, + * updatedAt?: ?DateTime, + * tunnelUp?: ?bool, + * tunnelHealthy?: ?bool, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->uuid = $values['uuid'] ?? null; + $this->name = $values['name'] ?? null; + $this->localAddress = $values['localAddress'] ?? null; + $this->remoteAddress = $values['remoteAddress'] ?? null; + $this->ipsec = $values['ipsec'] ?? null; + $this->tunnelInternalIp = $values['tunnelInternalIp'] ?? null; + $this->internalPeerPingInterval = $values['internalPeerPingInterval'] ?? null; + $this->operationalState = $values['operationalState'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->updatedAt = $values['updatedAt'] ?? null; + $this->tunnelUp = $values['tunnelUp'] ?? null; + $this->tunnelHealthy = $values['tunnelHealthy'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayTunnelInternalIpDetailsResponse.php b/fern/sdk/src/Types/GatewayTunnelInternalIpDetailsResponse.php new file mode 100644 index 00000000..08709948 --- /dev/null +++ b/fern/sdk/src/Types/GatewayTunnelInternalIpDetailsResponse.php @@ -0,0 +1,45 @@ +ip = $values['ip'] ?? null; + $this->hasParseError = $values['hasParseError'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayTunnelModifyRequest.php b/fern/sdk/src/Types/GatewayTunnelModifyRequest.php new file mode 100644 index 00000000..49a9dce3 --- /dev/null +++ b/fern/sdk/src/Types/GatewayTunnelModifyRequest.php @@ -0,0 +1,85 @@ +uuid = $values['uuid'] ?? null; + $this->name = $values['name'] ?? null; + $this->localAddress = $values['localAddress'] ?? null; + $this->remoteAddress = $values['remoteAddress'] ?? null; + $this->ipsec = $values['ipsec'] ?? null; + $this->tunnelInternalIp = $values['tunnelInternalIp'] ?? null; + $this->internalPeerPingInterval = $values['internalPeerPingInterval'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayTunnelModifyRequestIpsec.php b/fern/sdk/src/Types/GatewayTunnelModifyRequestIpsec.php new file mode 100644 index 00000000..d22fd515 --- /dev/null +++ b/fern/sdk/src/Types/GatewayTunnelModifyRequestIpsec.php @@ -0,0 +1,126 @@ +> $phase1Algorithms Phase 1 algorithms + */ + #[JsonProperty('phase1_algorithms'), ArrayType(['string'])] + public ?array $phase1Algorithms; + + /** + * @var ?array> $phase2Algorithms Phase 2 algorithms + */ + #[JsonProperty('phase2_algorithms'), ArrayType(['string'])] + public ?array $phase2Algorithms; + + /** + * @var ?array> $phase1IntegrityAlgorithms Phase 1 integrity algorithms + */ + #[JsonProperty('phase1_integrity_algorithms'), ArrayType(['string'])] + public ?array $phase1IntegrityAlgorithms; + + /** + * @var ?array> $phase2IntegrityAlgorithms Phase 2 integrity algorithms + */ + #[JsonProperty('phase2_integrity_algorithms'), ArrayType(['string'])] + public ?array $phase2IntegrityAlgorithms; + + /** + * @var ?array $phase1DhGroupNumbers Phase 1 Diffie-Hellman group numbers + */ + #[JsonProperty('phase1_dh_group_numbers'), ArrayType(['integer'])] + public ?array $phase1DhGroupNumbers; + + /** + * @var ?array $phase2DhGroupNumbers Phase 2 Diffie-Hellman group numbers + */ + #[JsonProperty('phase2_dh_group_numbers'), ArrayType(['integer'])] + public ?array $phase2DhGroupNumbers; + + /** + * @var ?int $ikeLifetime Maximum IKE SA lifetime in seconds + */ + #[JsonProperty('ike_lifetime')] + public ?int $ikeLifetime; + + /** + * @var ?int $rekeyTime IKE SA rekey time in seconds + */ + #[JsonProperty('rekey_time')] + public ?int $rekeyTime; + + /** + * @var ?int $childRekeyTime IKE child SA rekey time in seconds + */ + #[JsonProperty('child_rekey_time')] + public ?int $childRekeyTime; + + /** + * @var ?int $dpdDelay Delay before sending Dead Peer Detection packets if no traffic is detected, in seconds + */ + #[JsonProperty('dpd_delay')] + public ?int $dpdDelay; + + /** + * @var ?int $dpdTimeout Timeout period for DPD reply before considering the peer to be dead, in seconds + */ + #[JsonProperty('dpd_timeout')] + public ?int $dpdTimeout; + + /** + * @param array{ + * authentication: GatewayTunnelModifyRequestIpsecAuthentication, + * phase1Algorithms?: ?array>, + * phase2Algorithms?: ?array>, + * phase1IntegrityAlgorithms?: ?array>, + * phase2IntegrityAlgorithms?: ?array>, + * phase1DhGroupNumbers?: ?array, + * phase2DhGroupNumbers?: ?array, + * ikeLifetime?: ?int, + * rekeyTime?: ?int, + * childRekeyTime?: ?int, + * dpdDelay?: ?int, + * dpdTimeout?: ?int, + * } $values + */ + public function __construct( + array $values, + ) { + $this->authentication = $values['authentication']; + $this->phase1Algorithms = $values['phase1Algorithms'] ?? null; + $this->phase2Algorithms = $values['phase2Algorithms'] ?? null; + $this->phase1IntegrityAlgorithms = $values['phase1IntegrityAlgorithms'] ?? null; + $this->phase2IntegrityAlgorithms = $values['phase2IntegrityAlgorithms'] ?? null; + $this->phase1DhGroupNumbers = $values['phase1DhGroupNumbers'] ?? null; + $this->phase2DhGroupNumbers = $values['phase2DhGroupNumbers'] ?? null; + $this->ikeLifetime = $values['ikeLifetime'] ?? null; + $this->rekeyTime = $values['rekeyTime'] ?? null; + $this->childRekeyTime = $values['childRekeyTime'] ?? null; + $this->dpdDelay = $values['dpdDelay'] ?? null; + $this->dpdTimeout = $values['dpdTimeout'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayTunnelModifyRequestIpsecAuthentication.php b/fern/sdk/src/Types/GatewayTunnelModifyRequestIpsecAuthentication.php new file mode 100644 index 00000000..0e1983a6 --- /dev/null +++ b/fern/sdk/src/Types/GatewayTunnelModifyRequestIpsecAuthentication.php @@ -0,0 +1,45 @@ + $authentication + */ + #[JsonProperty('authentication')] + public string $authentication; + + /** + * @var ?string $psk IPsec PSK + */ + #[JsonProperty('psk')] + public ?string $psk; + + /** + * @param array{ + * authentication: value-of, + * psk?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->authentication = $values['authentication']; + $this->psk = $values['psk'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayTunnelModifyRequestLocalAddress.php b/fern/sdk/src/Types/GatewayTunnelModifyRequestLocalAddress.php new file mode 100644 index 00000000..f7466072 --- /dev/null +++ b/fern/sdk/src/Types/GatewayTunnelModifyRequestLocalAddress.php @@ -0,0 +1,37 @@ +name = $values['name'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayTunnelModifyRequestRemoteAddress.php b/fern/sdk/src/Types/GatewayTunnelModifyRequestRemoteAddress.php new file mode 100644 index 00000000..9e583268 --- /dev/null +++ b/fern/sdk/src/Types/GatewayTunnelModifyRequestRemoteAddress.php @@ -0,0 +1,37 @@ +address = $values['address'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GatewayTunnelOperationalState.php b/fern/sdk/src/Types/GatewayTunnelOperationalState.php new file mode 100644 index 00000000..6b7f60b3 --- /dev/null +++ b/fern/sdk/src/Types/GatewayTunnelOperationalState.php @@ -0,0 +1,12 @@ +servers = $values['servers']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/GetServerListServers.php b/fern/sdk/src/Types/GetServerListServers.php new file mode 100644 index 00000000..1e0e66cb --- /dev/null +++ b/fern/sdk/src/Types/GetServerListServers.php @@ -0,0 +1,35 @@ + $server + */ + #[JsonProperty('server'), ArrayType([ServerInGetServerList::class])] + public ?array $server; + + /** + * @param array{ + * server?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->server = $values['server'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/IpAddressBooleanYesno.php b/fern/sdk/src/Types/IpAddressBooleanYesno.php new file mode 100644 index 00000000..2a4f7ccc --- /dev/null +++ b/fern/sdk/src/Types/IpAddressBooleanYesno.php @@ -0,0 +1,9 @@ + $access + */ + #[JsonProperty('access')] + public string $access; + + /** + * @var ?int $accountId + */ + #[JsonProperty('account_id')] + public ?int $accountId; + + /** + * @var string $address + */ + #[JsonProperty('address')] + public string $address; + + /** + * @var ?int $delegatedToAccountId + */ + #[JsonProperty('delegated_to_account_id')] + public ?int $delegatedToAccountId; + + /** + * @var ?value-of $family + */ + #[JsonProperty('family')] + public ?string $family; + + /** + * @var ?value-of $floating + */ + #[JsonProperty('floating')] + public ?string $floating; + + /** + * @var ?string $mac + */ + #[JsonProperty('mac')] + public ?string $mac; + + /** + * @var ?value-of $partOfPlan + */ + #[JsonProperty('part_of_plan')] + public ?string $partOfPlan; + + /** + * @var ?string $ptrRecord + */ + #[JsonProperty('ptr_record')] + public ?string $ptrRecord; + + /** + * @var ?value-of $releasePolicy + */ + #[JsonProperty('release_policy')] + public ?string $releasePolicy; + + /** + * @var ?string $server + */ + #[JsonProperty('server')] + public ?string $server; + + /** + * @var ?string $zone + */ + #[JsonProperty('zone')] + public ?string $zone; + + /** + * @param array{ + * access: value-of, + * address: string, + * accountId?: ?int, + * delegatedToAccountId?: ?int, + * family?: ?value-of, + * floating?: ?value-of, + * mac?: ?string, + * partOfPlan?: ?value-of, + * ptrRecord?: ?string, + * releasePolicy?: ?value-of, + * server?: ?string, + * zone?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->access = $values['access']; + $this->accountId = $values['accountId'] ?? null; + $this->address = $values['address']; + $this->delegatedToAccountId = $values['delegatedToAccountId'] ?? null; + $this->family = $values['family'] ?? null; + $this->floating = $values['floating'] ?? null; + $this->mac = $values['mac'] ?? null; + $this->partOfPlan = $values['partOfPlan'] ?? null; + $this->ptrRecord = $values['ptrRecord'] ?? null; + $this->releasePolicy = $values['releasePolicy'] ?? null; + $this->server = $values['server'] ?? null; + $this->zone = $values['zone'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/IpAddressError.php b/fern/sdk/src/Types/IpAddressError.php new file mode 100644 index 00000000..16601b6f --- /dev/null +++ b/fern/sdk/src/Types/IpAddressError.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/IpAddressErrorError.php b/fern/sdk/src/Types/IpAddressErrorError.php new file mode 100644 index 00000000..e6c706a7 --- /dev/null +++ b/fern/sdk/src/Types/IpAddressErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/IpAddressIpFamily.php b/fern/sdk/src/Types/IpAddressIpFamily.php new file mode 100644 index 00000000..72c86378 --- /dev/null +++ b/fern/sdk/src/Types/IpAddressIpFamily.php @@ -0,0 +1,9 @@ + $ipAddresses List of IP addresses to operate on + */ + #[JsonProperty('ip_addresses'), ArrayType([IpAddressDetails::class])] + public array $ipAddresses; + + /** + * @param array{ + * ipAddresses: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->ipAddresses = $values['ipAddresses']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/IpAddressResponse.php b/fern/sdk/src/Types/IpAddressResponse.php new file mode 100644 index 00000000..cbd2721e --- /dev/null +++ b/fern/sdk/src/Types/IpAddressResponse.php @@ -0,0 +1,37 @@ +ipAddress = $values['ipAddress']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/IpAddressesResponse.php b/fern/sdk/src/Types/IpAddressesResponse.php new file mode 100644 index 00000000..f08d9663 --- /dev/null +++ b/fern/sdk/src/Types/IpAddressesResponse.php @@ -0,0 +1,37 @@ +ipAddresses = $values['ipAddresses']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/IpAddressesResponseIpAddresses.php b/fern/sdk/src/Types/IpAddressesResponseIpAddresses.php new file mode 100644 index 00000000..dff05bb4 --- /dev/null +++ b/fern/sdk/src/Types/IpAddressesResponseIpAddresses.php @@ -0,0 +1,35 @@ + $ipAddress List of IP addresses + */ + #[JsonProperty('ip_address'), ArrayType([IpAddressDetails::class])] + public array $ipAddress; + + /** + * @param array{ + * ipAddress: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->ipAddress = $values['ipAddress']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesAccepted.php b/fern/sdk/src/Types/KubernetesAccepted.php new file mode 100644 index 00000000..2545f527 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesAccepted.php @@ -0,0 +1,37 @@ +message = $values['message'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesAuthenticationIssuerConfig.php b/fern/sdk/src/Types/KubernetesAuthenticationIssuerConfig.php new file mode 100644 index 00000000..ceacf2b9 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesAuthenticationIssuerConfig.php @@ -0,0 +1,99 @@ + $audiences Accepted audiences for tokens from this issuer. The first audience is used as the OIDC client id in generated kubeconfigs by default; the OIDC kubeconfig endpoint's `audience` query parameter can select a different one. + */ + #[JsonProperty('audiences'), ArrayType(['string'])] + public array $audiences; + + /** + * @var ?value-of $audienceMatchPolicy + */ + #[JsonProperty('audience_match_policy')] + public ?string $audienceMatchPolicy; + + /** + * @var ?string $certificateAuthority Base64-encoded PEM certificate authority bundle. + */ + #[JsonProperty('certificate_authority')] + public ?string $certificateAuthority; + + /** + * @var ?KubernetesClaimMappings $claimMappings + */ + #[JsonProperty('claim_mappings')] + public ?KubernetesClaimMappings $claimMappings; + + /** + * @var ?array $claimValidationRules + */ + #[JsonProperty('claim_validation_rules'), ArrayType([KubernetesClaimValidationRule::class])] + public ?array $claimValidationRules; + + /** + * @var ?array $userValidationRules + */ + #[JsonProperty('user_validation_rules'), ArrayType([KubernetesUserValidationRule::class])] + public ?array $userValidationRules; + + /** + * @param array{ + * name: string, + * issuerUrl: string, + * audiences: array, + * discoveryUrl?: ?string, + * audienceMatchPolicy?: ?value-of, + * certificateAuthority?: ?string, + * claimMappings?: ?KubernetesClaimMappings, + * claimValidationRules?: ?array, + * userValidationRules?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->issuerUrl = $values['issuerUrl']; + $this->discoveryUrl = $values['discoveryUrl'] ?? null; + $this->audiences = $values['audiences']; + $this->audienceMatchPolicy = $values['audienceMatchPolicy'] ?? null; + $this->certificateAuthority = $values['certificateAuthority'] ?? null; + $this->claimMappings = $values['claimMappings'] ?? null; + $this->claimValidationRules = $values['claimValidationRules'] ?? null; + $this->userValidationRules = $values['userValidationRules'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesAuthenticationIssuerConfigAudienceMatchPolicy.php b/fern/sdk/src/Types/KubernetesAuthenticationIssuerConfigAudienceMatchPolicy.php new file mode 100644 index 00000000..9668496f --- /dev/null +++ b/fern/sdk/src/Types/KubernetesAuthenticationIssuerConfigAudienceMatchPolicy.php @@ -0,0 +1,9 @@ + $extra + */ + #[JsonProperty('extra'), ArrayType([KubernetesExtraMapping::class])] + public ?array $extra; + + /** + * @param array{ + * username?: ?KubernetesPrefixedClaimOrExpression, + * groups?: ?KubernetesPrefixedClaimOrExpression, + * uid?: ?KubernetesClaimOrExpression, + * extra?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->username = $values['username'] ?? null; + $this->groups = $values['groups'] ?? null; + $this->uid = $values['uid'] ?? null; + $this->extra = $values['extra'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesClaimOrExpression.php b/fern/sdk/src/Types/KubernetesClaimOrExpression.php new file mode 100644 index 00000000..044116ff --- /dev/null +++ b/fern/sdk/src/Types/KubernetesClaimOrExpression.php @@ -0,0 +1,45 @@ +claim = $values['claim'] ?? null; + $this->expression = $values['expression'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesClaimValidationRule.php b/fern/sdk/src/Types/KubernetesClaimValidationRule.php new file mode 100644 index 00000000..13c58fde --- /dev/null +++ b/fern/sdk/src/Types/KubernetesClaimValidationRule.php @@ -0,0 +1,61 @@ +claim = $values['claim'] ?? null; + $this->requiredValue = $values['requiredValue'] ?? null; + $this->expression = $values['expression'] ?? null; + $this->message = $values['message'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesCluster.php b/fern/sdk/src/Types/KubernetesCluster.php new file mode 100644 index 00000000..42dcd09b --- /dev/null +++ b/fern/sdk/src/Types/KubernetesCluster.php @@ -0,0 +1,142 @@ + $controlPlaneIpFilter + */ + #[JsonProperty('control_plane_ip_filter'), ArrayType(['string'])] + public ?array $controlPlaneIpFilter; + + /** + * @var string $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var string $network + */ + #[JsonProperty('network')] + public string $network; + + /** + * @var ?string $networkCidr + */ + #[JsonProperty('network_cidr')] + public ?string $networkCidr; + + /** + * @var ?value-of $storageEncryption + */ + #[JsonProperty('storage_encryption')] + public ?string $storageEncryption; + + /** + * @var ?array $nodeGroups + */ + #[JsonProperty('node_groups'), ArrayType([KubernetesNodeGroup::class])] + public ?array $nodeGroups; + + /** + * @var ?value-of $state + */ + #[JsonProperty('state')] + public ?string $state; + + /** + * @var ?string $uuid + */ + #[JsonProperty('uuid')] + public ?string $uuid; + + /** + * @var string $zone + */ + #[JsonProperty('zone')] + public string $zone; + + /** + * @var ?value-of $plan + */ + #[JsonProperty('plan')] + public ?string $plan; + + /** + * @var ?bool $privateNodeGroups + */ + #[JsonProperty('private_node_groups')] + public ?bool $privateNodeGroups; + + /** + * @var string $version + */ + #[JsonProperty('version')] + public string $version; + + /** + * @var ?array $authentication + */ + #[JsonProperty('authentication'), ArrayType([KubernetesAuthenticationIssuerConfig::class])] + public ?array $authentication; + + /** + * @var mixed $labels + */ + #[JsonProperty('labels')] + public mixed $labels; + + /** + * @param array{ + * name: string, + * network: string, + * zone: string, + * version: string, + * labels: mixed, + * controlPlaneIpFilter?: ?array, + * networkCidr?: ?string, + * storageEncryption?: ?value-of, + * nodeGroups?: ?array, + * state?: ?value-of, + * uuid?: ?string, + * plan?: ?value-of, + * privateNodeGroups?: ?bool, + * authentication?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->controlPlaneIpFilter = $values['controlPlaneIpFilter'] ?? null; + $this->name = $values['name']; + $this->network = $values['network']; + $this->networkCidr = $values['networkCidr'] ?? null; + $this->storageEncryption = $values['storageEncryption'] ?? null; + $this->nodeGroups = $values['nodeGroups'] ?? null; + $this->state = $values['state'] ?? null; + $this->uuid = $values['uuid'] ?? null; + $this->zone = $values['zone']; + $this->plan = $values['plan'] ?? null; + $this->privateNodeGroups = $values['privateNodeGroups'] ?? null; + $this->version = $values['version']; + $this->authentication = $values['authentication'] ?? null; + $this->labels = $values['labels']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesClusterAvailableUpgrades.php b/fern/sdk/src/Types/KubernetesClusterAvailableUpgrades.php new file mode 100644 index 00000000..ca902548 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesClusterAvailableUpgrades.php @@ -0,0 +1,35 @@ + $versions + */ + #[JsonProperty('versions'), ArrayType(['string'])] + public array $versions; + + /** + * @param array{ + * versions: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->versions = $values['versions']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesClusterAvailableUpgradesPost.php b/fern/sdk/src/Types/KubernetesClusterAvailableUpgradesPost.php new file mode 100644 index 00000000..ade68faa --- /dev/null +++ b/fern/sdk/src/Types/KubernetesClusterAvailableUpgradesPost.php @@ -0,0 +1,42 @@ +version = $values['version']; + $this->strategy = $values['strategy'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesClusterKubeconfig.php b/fern/sdk/src/Types/KubernetesClusterKubeconfig.php new file mode 100644 index 00000000..32ea1d69 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesClusterKubeconfig.php @@ -0,0 +1,37 @@ +kubeconfig = $values['kubeconfig']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesClusterPlan.php b/fern/sdk/src/Types/KubernetesClusterPlan.php new file mode 100644 index 00000000..90b6883f --- /dev/null +++ b/fern/sdk/src/Types/KubernetesClusterPlan.php @@ -0,0 +1,12 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @param array{ + * type: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesClusterUpgradeStrategyType.php b/fern/sdk/src/Types/KubernetesClusterUpgradeStrategyType.php new file mode 100644 index 00000000..e71edba0 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesClusterUpgradeStrategyType.php @@ -0,0 +1,9 @@ +type = $values['type']; + $this->title = $values['title']; + $this->status = $values['status']; + $this->invalidParams = $values['invalidParams'] ?? null; + $this->correlationId = $values['correlationId']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesExtraMapping.php b/fern/sdk/src/Types/KubernetesExtraMapping.php new file mode 100644 index 00000000..2edfe036 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesExtraMapping.php @@ -0,0 +1,45 @@ +key = $values['key']; + $this->valueExpression = $values['valueExpression']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesKubeletArg.php b/fern/sdk/src/Types/KubernetesKubeletArg.php new file mode 100644 index 00000000..40571976 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesKubeletArg.php @@ -0,0 +1,45 @@ +key = $values['key']; + $this->value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesLabel.php b/fern/sdk/src/Types/KubernetesLabel.php new file mode 100644 index 00000000..b51ea5e3 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesLabel.php @@ -0,0 +1,45 @@ +key = $values['key']; + $this->value = $values['value'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesNode.php b/fern/sdk/src/Types/KubernetesNode.php new file mode 100644 index 00000000..f752baa2 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesNode.php @@ -0,0 +1,61 @@ + $state + */ + #[JsonProperty('state')] + public string $state; + + /** + * @param array{ + * uuid: string, + * name: string, + * kubeletVersion: string, + * state: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->uuid = $values['uuid']; + $this->name = $values['name']; + $this->kubeletVersion = $values['kubeletVersion']; + $this->state = $values['state']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesNodeGroup.php b/fern/sdk/src/Types/KubernetesNodeGroup.php new file mode 100644 index 00000000..100ea1ed --- /dev/null +++ b/fern/sdk/src/Types/KubernetesNodeGroup.php @@ -0,0 +1,158 @@ + $kubeletArgs + */ + #[JsonProperty('kubelet_args'), ArrayType([KubernetesKubeletArg::class])] + public ?array $kubeletArgs; + + /** + * @var ?array $labels + */ + #[JsonProperty('labels'), ArrayType([KubernetesLabel::class])] + public ?array $labels; + + /** + * @var string $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var string $plan + */ + #[JsonProperty('plan')] + public string $plan; + + /** + * @var ?KubernetesNodeGroupCustomPlan $customPlan + */ + #[JsonProperty('custom_plan')] + public ?KubernetesNodeGroupCustomPlan $customPlan; + + /** + * @var ?KubernetesNodeGroupCloudNativePlan $cloudNativePlan + */ + #[JsonProperty('cloud_native_plan')] + public ?KubernetesNodeGroupCloudNativePlan $cloudNativePlan; + + /** + * @var ?KubernetesNodeGroupGpuPlan $gpuPlan + */ + #[JsonProperty('gpu_plan')] + public ?KubernetesNodeGroupGpuPlan $gpuPlan; + + /** + * @var ?array $sshKeys + */ + #[JsonProperty('ssh_keys'), ArrayType(['string'])] + public ?array $sshKeys; + + /** + * @var ?value-of $state + */ + #[JsonProperty('state')] + public ?string $state; + + /** + * @var ?string $storage + */ + #[JsonProperty('storage')] + public ?string $storage; + + /** + * @var ?value-of $storageEncryption + */ + #[JsonProperty('storage_encryption')] + public ?string $storageEncryption; + + /** + * @var ?array $taints + */ + #[JsonProperty('taints'), ArrayType([KubernetesTaint::class])] + public ?array $taints; + + /** + * @var ?bool $antiAffinity + */ + #[JsonProperty('anti_affinity')] + public ?bool $antiAffinity; + + /** + * @var ?bool $utilityNetworkAccess + */ + #[JsonProperty('utility_network_access')] + public ?bool $utilityNetworkAccess; + + /** + * @var ?KubernetesNodeUpdates $nodeUpdates + */ + #[JsonProperty('node_updates')] + public ?KubernetesNodeUpdates $nodeUpdates; + + /** + * @param array{ + * count: int, + * name: string, + * plan: string, + * kubeletArgs?: ?array, + * labels?: ?array, + * customPlan?: ?KubernetesNodeGroupCustomPlan, + * cloudNativePlan?: ?KubernetesNodeGroupCloudNativePlan, + * gpuPlan?: ?KubernetesNodeGroupGpuPlan, + * sshKeys?: ?array, + * state?: ?value-of, + * storage?: ?string, + * storageEncryption?: ?value-of, + * taints?: ?array, + * antiAffinity?: ?bool, + * utilityNetworkAccess?: ?bool, + * nodeUpdates?: ?KubernetesNodeUpdates, + * } $values + */ + public function __construct( + array $values, + ) { + $this->count = $values['count']; + $this->kubeletArgs = $values['kubeletArgs'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->name = $values['name']; + $this->plan = $values['plan']; + $this->customPlan = $values['customPlan'] ?? null; + $this->cloudNativePlan = $values['cloudNativePlan'] ?? null; + $this->gpuPlan = $values['gpuPlan'] ?? null; + $this->sshKeys = $values['sshKeys'] ?? null; + $this->state = $values['state'] ?? null; + $this->storage = $values['storage'] ?? null; + $this->storageEncryption = $values['storageEncryption'] ?? null; + $this->taints = $values['taints'] ?? null; + $this->antiAffinity = $values['antiAffinity'] ?? null; + $this->utilityNetworkAccess = $values['utilityNetworkAccess'] ?? null; + $this->nodeUpdates = $values['nodeUpdates'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesNodeGroupCloudNativePlan.php b/fern/sdk/src/Types/KubernetesNodeGroupCloudNativePlan.php new file mode 100644 index 00000000..78324ac7 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesNodeGroupCloudNativePlan.php @@ -0,0 +1,45 @@ + $storageTier + */ + #[JsonProperty('storage_tier')] + public ?string $storageTier; + + /** + * @param array{ + * storageSize: int, + * storageTier?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->storageSize = $values['storageSize']; + $this->storageTier = $values['storageTier'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesNodeGroupCustomPlan.php b/fern/sdk/src/Types/KubernetesNodeGroupCustomPlan.php new file mode 100644 index 00000000..34e1eb19 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesNodeGroupCustomPlan.php @@ -0,0 +1,61 @@ + $storageTier + */ + #[JsonProperty('storage_tier')] + public ?string $storageTier; + + /** + * @param array{ + * memory: int, + * cores: int, + * storageSize: int, + * storageTier?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->memory = $values['memory']; + $this->cores = $values['cores']; + $this->storageSize = $values['storageSize']; + $this->storageTier = $values['storageTier'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesNodeGroupDetails.php b/fern/sdk/src/Types/KubernetesNodeGroupDetails.php new file mode 100644 index 00000000..eaa0e7c6 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesNodeGroupDetails.php @@ -0,0 +1,166 @@ + $nodes List of node group nodes (experimental) + */ + #[JsonProperty('nodes'), ArrayType([KubernetesNode::class])] + public array $nodes; + + /** + * @var int $count + */ + #[JsonProperty('count')] + public int $count; + + /** + * @var ?array $kubeletArgs + */ + #[JsonProperty('kubelet_args'), ArrayType([KubernetesKubeletArg::class])] + public ?array $kubeletArgs; + + /** + * @var ?array $labels + */ + #[JsonProperty('labels'), ArrayType([KubernetesLabel::class])] + public ?array $labels; + + /** + * @var string $plan + */ + #[JsonProperty('plan')] + public string $plan; + + /** + * @var ?KubernetesNodeGroupCustomPlan $customPlan + */ + #[JsonProperty('custom_plan')] + public ?KubernetesNodeGroupCustomPlan $customPlan; + + /** + * @var ?KubernetesNodeGroupCloudNativePlan $cloudNativePlan + */ + #[JsonProperty('cloud_native_plan')] + public ?KubernetesNodeGroupCloudNativePlan $cloudNativePlan; + + /** + * @var ?KubernetesNodeGroupGpuPlan $gpuPlan + */ + #[JsonProperty('gpu_plan')] + public ?KubernetesNodeGroupGpuPlan $gpuPlan; + + /** + * @var ?array $sshKeys + */ + #[JsonProperty('ssh_keys'), ArrayType(['string'])] + public ?array $sshKeys; + + /** + * @var ?value-of $state + */ + #[JsonProperty('state')] + public ?string $state; + + /** + * @var ?string $storage + */ + #[JsonProperty('storage')] + public ?string $storage; + + /** + * @var ?value-of $storageEncryption + */ + #[JsonProperty('storage_encryption')] + public ?string $storageEncryption; + + /** + * @var ?array $taints + */ + #[JsonProperty('taints'), ArrayType([KubernetesTaint::class])] + public ?array $taints; + + /** + * @var ?bool $antiAffinity + */ + #[JsonProperty('anti_affinity')] + public ?bool $antiAffinity; + + /** + * @var ?bool $utilityNetworkAccess + */ + #[JsonProperty('utility_network_access')] + public ?bool $utilityNetworkAccess; + + /** + * @var ?KubernetesNodeUpdates $nodeUpdates + */ + #[JsonProperty('node_updates')] + public ?KubernetesNodeUpdates $nodeUpdates; + + /** + * @param array{ + * nodes: array, + * count: int, + * plan: string, + * name?: ?string, + * kubeletArgs?: ?array, + * labels?: ?array, + * customPlan?: ?KubernetesNodeGroupCustomPlan, + * cloudNativePlan?: ?KubernetesNodeGroupCloudNativePlan, + * gpuPlan?: ?KubernetesNodeGroupGpuPlan, + * sshKeys?: ?array, + * state?: ?value-of, + * storage?: ?string, + * storageEncryption?: ?value-of, + * taints?: ?array, + * antiAffinity?: ?bool, + * utilityNetworkAccess?: ?bool, + * nodeUpdates?: ?KubernetesNodeUpdates, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name'] ?? null; + $this->nodes = $values['nodes']; + $this->count = $values['count']; + $this->kubeletArgs = $values['kubeletArgs'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->plan = $values['plan']; + $this->customPlan = $values['customPlan'] ?? null; + $this->cloudNativePlan = $values['cloudNativePlan'] ?? null; + $this->gpuPlan = $values['gpuPlan'] ?? null; + $this->sshKeys = $values['sshKeys'] ?? null; + $this->state = $values['state'] ?? null; + $this->storage = $values['storage'] ?? null; + $this->storageEncryption = $values['storageEncryption'] ?? null; + $this->taints = $values['taints'] ?? null; + $this->antiAffinity = $values['antiAffinity'] ?? null; + $this->utilityNetworkAccess = $values['utilityNetworkAccess'] ?? null; + $this->nodeUpdates = $values['nodeUpdates'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesNodeGroupGpuPlan.php b/fern/sdk/src/Types/KubernetesNodeGroupGpuPlan.php new file mode 100644 index 00000000..1bfa992f --- /dev/null +++ b/fern/sdk/src/Types/KubernetesNodeGroupGpuPlan.php @@ -0,0 +1,45 @@ + $storageTier + */ + #[JsonProperty('storage_tier')] + public ?string $storageTier; + + /** + * @param array{ + * storageSize: int, + * storageTier?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->storageSize = $values['storageSize']; + $this->storageTier = $values['storageTier'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesNodeGroupState.php b/fern/sdk/src/Types/KubernetesNodeGroupState.php new file mode 100644 index 00000000..d3ecdc39 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesNodeGroupState.php @@ -0,0 +1,14 @@ + $scheduleDow The day of the week on which updates will be performed + */ + #[JsonProperty('schedule_dow')] + public string $scheduleDow; + + /** + * @var string $scheduleTime The time at which the updates will be applied in UTC (HH:MM). + */ + #[JsonProperty('schedule_time')] + public string $scheduleTime; + + /** + * @param array{ + * kubernetesPatches: bool, + * scheduleDow: value-of, + * scheduleTime: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->kubernetesPatches = $values['kubernetesPatches']; + $this->scheduleDow = $values['scheduleDow']; + $this->scheduleTime = $values['scheduleTime']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesNodeUpdatesScheduleDow.php b/fern/sdk/src/Types/KubernetesNodeUpdatesScheduleDow.php new file mode 100644 index 00000000..73137201 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesNodeUpdatesScheduleDow.php @@ -0,0 +1,15 @@ +description = $values['description']; + $this->name = $values['name']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesPrefixedClaimOrExpression.php b/fern/sdk/src/Types/KubernetesPrefixedClaimOrExpression.php new file mode 100644 index 00000000..b1875e03 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesPrefixedClaimOrExpression.php @@ -0,0 +1,53 @@ +claim = $values['claim'] ?? null; + $this->prefix = $values['prefix'] ?? null; + $this->expression = $values['expression'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesStorageEncryption.php b/fern/sdk/src/Types/KubernetesStorageEncryption.php new file mode 100644 index 00000000..d952d694 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesStorageEncryption.php @@ -0,0 +1,9 @@ + $effect + */ + #[JsonProperty('effect')] + public string $effect; + + /** + * @var string $key + */ + #[JsonProperty('key')] + public string $key; + + /** + * @var string $value + */ + #[JsonProperty('value')] + public string $value; + + /** + * @param array{ + * effect: value-of, + * key: string, + * value: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->effect = $values['effect']; + $this->key = $values['key']; + $this->value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesUserValidationRule.php b/fern/sdk/src/Types/KubernetesUserValidationRule.php new file mode 100644 index 00000000..378c09f2 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesUserValidationRule.php @@ -0,0 +1,45 @@ +expression = $values['expression']; + $this->message = $values['message'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/KubernetesVersion.php b/fern/sdk/src/Types/KubernetesVersion.php new file mode 100644 index 00000000..4b509561 --- /dev/null +++ b/fern/sdk/src/Types/KubernetesVersion.php @@ -0,0 +1,45 @@ +id = $values['id']; + $this->version = $values['version']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRedirect.php b/fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRedirect.php new file mode 100644 index 00000000..7477bb68 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRedirect.php @@ -0,0 +1,49 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ( + * LoadBalancerActionHttpRedirectCreateLocation + * |LoadBalancerActionHttpRedirectCreateScheme + * ) $actionHttpRedirect + */ + #[JsonProperty('action_http_redirect'), Union(LoadBalancerActionHttpRedirectCreateLocation::class, LoadBalancerActionHttpRedirectCreateScheme::class)] + public LoadBalancerActionHttpRedirectCreateLocation|LoadBalancerActionHttpRedirectCreateScheme $actionHttpRedirect; + + /** + * @param array{ + * type: value-of, + * actionHttpRedirect: ( + * LoadBalancerActionHttpRedirectCreateLocation + * |LoadBalancerActionHttpRedirectCreateScheme + * ), + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->actionHttpRedirect = $values['actionHttpRedirect']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRedirectType.php b/fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRedirectType.php new file mode 100644 index 00000000..1f3fabb7 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRedirectType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var LoadBalancerActionHttpReturnCreate $actionHttpReturn + */ + #[JsonProperty('action_http_return')] + public LoadBalancerActionHttpReturnCreate $actionHttpReturn; + + /** + * @param array{ + * type: value-of, + * actionHttpReturn: LoadBalancerActionHttpReturnCreate, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->actionHttpReturn = $values['actionHttpReturn']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionCreateActionHttpReturnType.php b/fern/sdk/src/Types/LoadBalancerActionCreateActionHttpReturnType.php new file mode 100644 index 00000000..9622ba4e --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionCreateActionHttpReturnType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var LoadBalancerActionHttpRewritePathCreate $actionHttpRewritePath + */ + #[JsonProperty('action_http_rewrite_path')] + public LoadBalancerActionHttpRewritePathCreate $actionHttpRewritePath; + + /** + * @param array{ + * type: value-of, + * actionHttpRewritePath: LoadBalancerActionHttpRewritePathCreate, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->actionHttpRewritePath = $values['actionHttpRewritePath']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRewritePathType.php b/fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRewritePathType.php new file mode 100644 index 00000000..7f7b40a4 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRewritePathType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var LoadBalancerActionHttpRewriteUriCreate $actionHttpRewriteUri + */ + #[JsonProperty('action_http_rewrite_uri')] + public LoadBalancerActionHttpRewriteUriCreate $actionHttpRewriteUri; + + /** + * @param array{ + * type: value-of, + * actionHttpRewriteUri: LoadBalancerActionHttpRewriteUriCreate, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->actionHttpRewriteUri = $values['actionHttpRewriteUri']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRewriteUriType.php b/fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRewriteUriType.php new file mode 100644 index 00000000..93572df2 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionCreateActionHttpRewriteUriType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var array $actionSetForwardedHeaders + */ + #[JsonProperty('action_set_forwarded_headers'), ArrayType(['string' => 'mixed'])] + public array $actionSetForwardedHeaders; + + /** + * @param array{ + * type: value-of, + * actionSetForwardedHeaders: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->actionSetForwardedHeaders = $values['actionSetForwardedHeaders']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionCreateActionSetForwardedHeadersType.php b/fern/sdk/src/Types/LoadBalancerActionCreateActionSetForwardedHeadersType.php new file mode 100644 index 00000000..5ac9458c --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionCreateActionSetForwardedHeadersType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var LoadBalancerActionSetHeaderCreate $actionSetRequestHeader + */ + #[JsonProperty('action_set_request_header')] + public LoadBalancerActionSetHeaderCreate $actionSetRequestHeader; + + /** + * @param array{ + * type: value-of, + * actionSetRequestHeader: LoadBalancerActionSetHeaderCreate, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->actionSetRequestHeader = $values['actionSetRequestHeader']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionCreateActionSetRequestHeaderType.php b/fern/sdk/src/Types/LoadBalancerActionCreateActionSetRequestHeaderType.php new file mode 100644 index 00000000..94165282 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionCreateActionSetRequestHeaderType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var LoadBalancerActionSetHeaderCreate $actionSetResponseHeader + */ + #[JsonProperty('action_set_response_header')] + public LoadBalancerActionSetHeaderCreate $actionSetResponseHeader; + + /** + * @param array{ + * type: value-of, + * actionSetResponseHeader: LoadBalancerActionSetHeaderCreate, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->actionSetResponseHeader = $values['actionSetResponseHeader']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionCreateActionSetResponseHeaderType.php b/fern/sdk/src/Types/LoadBalancerActionCreateActionSetResponseHeaderType.php new file mode 100644 index 00000000..866fa1fd --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionCreateActionSetResponseHeaderType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var array $actionTcpReject + */ + #[JsonProperty('action_tcp_reject'), ArrayType(['string' => 'mixed'])] + public array $actionTcpReject; + + /** + * @param array{ + * type: value-of, + * actionTcpReject: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->actionTcpReject = $values['actionTcpReject']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionCreateActionTcpRejectType.php b/fern/sdk/src/Types/LoadBalancerActionCreateActionTcpRejectType.php new file mode 100644 index 00000000..fb586b87 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionCreateActionTcpRejectType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var LoadBalancerActionUseBackendCreate $actionUseBackend + */ + #[JsonProperty('action_use_backend')] + public LoadBalancerActionUseBackendCreate $actionUseBackend; + + /** + * @param array{ + * type: value-of, + * actionUseBackend: LoadBalancerActionUseBackendCreate, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->actionUseBackend = $values['actionUseBackend']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionCreateActionUseBackendType.php b/fern/sdk/src/Types/LoadBalancerActionCreateActionUseBackendType.php new file mode 100644 index 00000000..cc2937a8 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionCreateActionUseBackendType.php @@ -0,0 +1,8 @@ +location = $values['location']; + $this->status = $values['status'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionHttpRedirectCreateScheme.php b/fern/sdk/src/Types/LoadBalancerActionHttpRedirectCreateScheme.php new file mode 100644 index 00000000..3722a624 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionHttpRedirectCreateScheme.php @@ -0,0 +1,42 @@ + $scheme URL Schemes + */ + #[JsonProperty('scheme')] + public string $scheme; + + /** + * @var ?int $status HTTP Status code + */ + #[JsonProperty('status')] + public ?int $status; + + /** + * @param array{ + * scheme: value-of, + * status?: ?int, + * } $values + */ + public function __construct( + array $values, + ) { + $this->scheme = $values['scheme']; + $this->status = $values['status'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionHttpRedirectCreateSchemeScheme.php b/fern/sdk/src/Types/LoadBalancerActionHttpRedirectCreateSchemeScheme.php new file mode 100644 index 00000000..ea566b35 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionHttpRedirectCreateSchemeScheme.php @@ -0,0 +1,9 @@ +location = $values['location']; + $this->status = $values['status']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionHttpReturnCreate.php b/fern/sdk/src/Types/LoadBalancerActionHttpReturnCreate.php new file mode 100644 index 00000000..f7249d54 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionHttpReturnCreate.php @@ -0,0 +1,53 @@ + $contentType + */ + #[JsonProperty('content_type')] + public string $contentType; + + /** + * @var string $payload Response body content to return to the client. + */ + #[JsonProperty('payload')] + public string $payload; + + /** + * @param array{ + * status: int, + * contentType: value-of, + * payload: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->status = $values['status']; + $this->contentType = $values['contentType']; + $this->payload = $values['payload']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionHttpReturnResponse.php b/fern/sdk/src/Types/LoadBalancerActionHttpReturnResponse.php new file mode 100644 index 00000000..5b3bc40d --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionHttpReturnResponse.php @@ -0,0 +1,53 @@ +status = $values['status']; + $this->contentType = $values['contentType']; + $this->payload = $values['payload']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionHttpRewritePathCreate.php b/fern/sdk/src/Types/LoadBalancerActionHttpRewritePathCreate.php new file mode 100644 index 00000000..35b28292 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionHttpRewritePathCreate.php @@ -0,0 +1,45 @@ +matchPattern = $values['matchPattern']; + $this->rewriteTo = $values['rewriteTo']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionHttpRewritePathResponse.php b/fern/sdk/src/Types/LoadBalancerActionHttpRewritePathResponse.php new file mode 100644 index 00000000..3435db6b --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionHttpRewritePathResponse.php @@ -0,0 +1,45 @@ +matchPattern = $values['matchPattern']; + $this->rewriteTo = $values['rewriteTo']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionHttpRewriteUriCreate.php b/fern/sdk/src/Types/LoadBalancerActionHttpRewriteUriCreate.php new file mode 100644 index 00000000..3f35d35d --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionHttpRewriteUriCreate.php @@ -0,0 +1,45 @@ +matchPattern = $values['matchPattern']; + $this->rewriteTo = $values['rewriteTo']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionHttpRewriteUriResponse.php b/fern/sdk/src/Types/LoadBalancerActionHttpRewriteUriResponse.php new file mode 100644 index 00000000..e8b68aad --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionHttpRewriteUriResponse.php @@ -0,0 +1,45 @@ +matchPattern = $values['matchPattern']; + $this->rewriteTo = $values['rewriteTo']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionResponse.php b/fern/sdk/src/Types/LoadBalancerActionResponse.php new file mode 100644 index 00000000..38033ac9 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionResponse.php @@ -0,0 +1,110 @@ + $type Type of action defining how matched requests should be processed or modified. + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?LoadBalancerActionUseBackendResponse $actionUseBackend + */ + #[JsonProperty('action_use_backend')] + public ?LoadBalancerActionUseBackendResponse $actionUseBackend; + + /** + * @var ?LoadBalancerActionHttpReturnResponse $actionHttpReturn + */ + #[JsonProperty('action_http_return')] + public ?LoadBalancerActionHttpReturnResponse $actionHttpReturn; + + /** + * @var ?LoadBalancerActionHttpRedirectResponse $actionHttpRedirect + */ + #[JsonProperty('action_http_redirect')] + public ?LoadBalancerActionHttpRedirectResponse $actionHttpRedirect; + + /** + * @var ?array $actionTcpReject + */ + #[JsonProperty('action_tcp_reject'), ArrayType(['string' => 'mixed'])] + public ?array $actionTcpReject; + + /** + * @var ?array $actionSetForwardedHeaders + */ + #[JsonProperty('action_set_forwarded_headers'), ArrayType(['string' => 'mixed'])] + public ?array $actionSetForwardedHeaders; + + /** + * @var ?LoadBalancerActionSetHeaderResponse $actionSetRequestHeader + */ + #[JsonProperty('action_set_request_header')] + public ?LoadBalancerActionSetHeaderResponse $actionSetRequestHeader; + + /** + * @var ?LoadBalancerActionSetHeaderResponse $actionSetResponseHeader + */ + #[JsonProperty('action_set_response_header')] + public ?LoadBalancerActionSetHeaderResponse $actionSetResponseHeader; + + /** + * @var ?LoadBalancerActionHttpRewritePathResponse $actionHttpRewritePath + */ + #[JsonProperty('action_http_rewrite_path')] + public ?LoadBalancerActionHttpRewritePathResponse $actionHttpRewritePath; + + /** + * @var ?LoadBalancerActionHttpRewriteUriResponse $actionHttpRewriteUri + */ + #[JsonProperty('action_http_rewrite_uri')] + public ?LoadBalancerActionHttpRewriteUriResponse $actionHttpRewriteUri; + + /** + * @param array{ + * type: value-of, + * actionUseBackend?: ?LoadBalancerActionUseBackendResponse, + * actionHttpReturn?: ?LoadBalancerActionHttpReturnResponse, + * actionHttpRedirect?: ?LoadBalancerActionHttpRedirectResponse, + * actionTcpReject?: ?array, + * actionSetForwardedHeaders?: ?array, + * actionSetRequestHeader?: ?LoadBalancerActionSetHeaderResponse, + * actionSetResponseHeader?: ?LoadBalancerActionSetHeaderResponse, + * actionHttpRewritePath?: ?LoadBalancerActionHttpRewritePathResponse, + * actionHttpRewriteUri?: ?LoadBalancerActionHttpRewriteUriResponse, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->actionUseBackend = $values['actionUseBackend'] ?? null; + $this->actionHttpReturn = $values['actionHttpReturn'] ?? null; + $this->actionHttpRedirect = $values['actionHttpRedirect'] ?? null; + $this->actionTcpReject = $values['actionTcpReject'] ?? null; + $this->actionSetForwardedHeaders = $values['actionSetForwardedHeaders'] ?? null; + $this->actionSetRequestHeader = $values['actionSetRequestHeader'] ?? null; + $this->actionSetResponseHeader = $values['actionSetResponseHeader'] ?? null; + $this->actionHttpRewritePath = $values['actionHttpRewritePath'] ?? null; + $this->actionHttpRewriteUri = $values['actionHttpRewriteUri'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionResponseType.php b/fern/sdk/src/Types/LoadBalancerActionResponseType.php new file mode 100644 index 00000000..ac00496e --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionResponseType.php @@ -0,0 +1,16 @@ +header = $values['header']; + $this->value = $values['value'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionSetHeaderResponse.php b/fern/sdk/src/Types/LoadBalancerActionSetHeaderResponse.php new file mode 100644 index 00000000..1931870e --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionSetHeaderResponse.php @@ -0,0 +1,45 @@ +header = $values['header']; + $this->value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionUseBackendCreate.php b/fern/sdk/src/Types/LoadBalancerActionUseBackendCreate.php new file mode 100644 index 00000000..b06eeac6 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionUseBackendCreate.php @@ -0,0 +1,37 @@ +backend = $values['backend']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerActionUseBackendResponse.php b/fern/sdk/src/Types/LoadBalancerActionUseBackendResponse.php new file mode 100644 index 00000000..d0a6aebf --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerActionUseBackendResponse.php @@ -0,0 +1,37 @@ +backend = $values['backend']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerAvgTimeMetricsResponse.php b/fern/sdk/src/Types/LoadBalancerAvgTimeMetricsResponse.php new file mode 100644 index 00000000..f7b9bbe8 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerAvgTimeMetricsResponse.php @@ -0,0 +1,61 @@ +avgConnectionTimeMs = $values['avgConnectionTimeMs']; + $this->avgQueueTimeMs = $values['avgQueueTimeMs']; + $this->avgServerResponseTimeMs = $values['avgServerResponseTimeMs']; + $this->avgTotalTimeMs = $values['avgTotalTimeMs']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerBackend.php b/fern/sdk/src/Types/LoadBalancerBackend.php new file mode 100644 index 00000000..eb80c354 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerBackend.php @@ -0,0 +1,88 @@ + $members List of backend member servers (nodes) participating in this backend configuration. + */ + #[JsonProperty('members'), ArrayType([LoadBalancerMember::class])] + public array $members; + + /** + * @var array $tlsConfigs TLS configurations associated with this backend, specifying certificate bundles and identifiers. + */ + #[JsonProperty('tls_configs'), ArrayType([LoadBalancerTlsConfig::class])] + public array $tlsConfigs; + + /** + * @var ?string $resolver Optional outbound DNS resolver reference used by this backend. Null when not set. + */ + #[JsonProperty('resolver')] + public ?string $resolver; + + /** + * @var LoadBalancerBackendPropertiesResponse $properties + */ + #[JsonProperty('properties')] + public LoadBalancerBackendPropertiesResponse $properties; + + /** + * @var DateTime $createdAt Timestamp when the backend was created (RFC 3339 format). + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; + + /** + * @var DateTime $updatedAt Timestamp when the backend was last updated (RFC 3339 format). + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; + + /** + * @param array{ + * name: string, + * members: array, + * tlsConfigs: array, + * properties: LoadBalancerBackendPropertiesResponse, + * createdAt: DateTime, + * updatedAt: DateTime, + * resolver?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->members = $values['members']; + $this->tlsConfigs = $values['tlsConfigs']; + $this->resolver = $values['resolver'] ?? null; + $this->properties = $values['properties']; + $this->createdAt = $values['createdAt']; + $this->updatedAt = $values['updatedAt']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerBackendCreate.php b/fern/sdk/src/Types/LoadBalancerBackendCreate.php new file mode 100644 index 00000000..03237c87 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerBackendCreate.php @@ -0,0 +1,77 @@ + $members Backend members + */ + #[JsonProperty('members'), ArrayType([new Union(LoadBalancerMemberCreateZero::class, LoadBalancerMemberCreateOne::class)])] + public ?array $members; + + /** + * @var ?array $tlsConfigs TLS Configs + */ + #[JsonProperty('tls_configs'), ArrayType([LoadBalancerTlsConfigCreate::class])] + public ?array $tlsConfigs; + + /** + * @var ?string $resolver Resolver reference + */ + #[JsonProperty('resolver')] + public ?string $resolver; + + /** + * @var ?LoadBalancerBackendPropertiesCreate $properties + */ + #[JsonProperty('properties')] + public ?LoadBalancerBackendPropertiesCreate $properties; + + /** + * @param array{ + * name: string, + * members?: ?array<( + * LoadBalancerMemberCreateZero + * |LoadBalancerMemberCreateOne + * )>, + * tlsConfigs?: ?array, + * resolver?: ?string, + * properties?: ?LoadBalancerBackendPropertiesCreate, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->members = $values['members'] ?? null; + $this->tlsConfigs = $values['tlsConfigs'] ?? null; + $this->resolver = $values['resolver'] ?? null; + $this->properties = $values['properties'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerBackendMetricsResponse.php b/fern/sdk/src/Types/LoadBalancerBackendMetricsResponse.php new file mode 100644 index 00000000..5d3800f4 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerBackendMetricsResponse.php @@ -0,0 +1,153 @@ + $members List of metrics for individual backend members (servers). + */ + #[JsonProperty('members'), ArrayType([LoadBalancerMemberMetricsResponse::class])] + public array $members; + + /** + * @var DateTime $createdAt Timestamp when the backend metrics record was created. + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; + + /** + * @var DateTime $updatedAt Timestamp when the backend metrics record was last updated. + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; + + /** + * @param array{ + * totalRequestBytes: int, + * totalResponseBytes: int, + * totalDeniedResponses: int, + * totalHttpResponses1Xx: int, + * totalHttpResponses2Xx: int, + * totalHttpResponses3Xx: int, + * totalHttpResponses4Xx: int, + * totalHttpResponses5Xx: int, + * totalHttpResponsesOther: int, + * totalSessions: int, + * sessionRate: int, + * currentSessions: int, + * totalFailedChecksTransitions: int, + * totalClientAborted: int, + * totalFailedConnections: int, + * totalInvalidResponses: int, + * totalRoutedRequests: int, + * totalServerAborted: int, + * totalServerRedispatches: int, + * totalServerConnectionRetries: int, + * connectionsWaiting: int, + * avgConnectionTimeMs: int, + * avgQueueTimeMs: int, + * avgServerResponseTimeMs: int, + * avgTotalTimeMs: int, + * backendId: int, + * name: string, + * downtimeS: int, + * activeServers: int, + * backupServers: int, + * members: array, + * createdAt: DateTime, + * updatedAt: DateTime, + * } $values + */ + public function __construct( + array $values, + ) { + $this->totalRequestBytes = $values['totalRequestBytes']; + $this->totalResponseBytes = $values['totalResponseBytes']; + $this->totalDeniedResponses = $values['totalDeniedResponses']; + $this->totalHttpResponses1Xx = $values['totalHttpResponses1Xx']; + $this->totalHttpResponses2Xx = $values['totalHttpResponses2Xx']; + $this->totalHttpResponses3Xx = $values['totalHttpResponses3Xx']; + $this->totalHttpResponses4Xx = $values['totalHttpResponses4Xx']; + $this->totalHttpResponses5Xx = $values['totalHttpResponses5Xx']; + $this->totalHttpResponsesOther = $values['totalHttpResponsesOther']; + $this->totalSessions = $values['totalSessions']; + $this->sessionRate = $values['sessionRate']; + $this->currentSessions = $values['currentSessions']; + $this->totalFailedChecksTransitions = $values['totalFailedChecksTransitions']; + $this->totalClientAborted = $values['totalClientAborted']; + $this->totalFailedConnections = $values['totalFailedConnections']; + $this->totalInvalidResponses = $values['totalInvalidResponses']; + $this->totalRoutedRequests = $values['totalRoutedRequests']; + $this->totalServerAborted = $values['totalServerAborted']; + $this->totalServerRedispatches = $values['totalServerRedispatches']; + $this->totalServerConnectionRetries = $values['totalServerConnectionRetries']; + $this->connectionsWaiting = $values['connectionsWaiting']; + $this->avgConnectionTimeMs = $values['avgConnectionTimeMs']; + $this->avgQueueTimeMs = $values['avgQueueTimeMs']; + $this->avgServerResponseTimeMs = $values['avgServerResponseTimeMs']; + $this->avgTotalTimeMs = $values['avgTotalTimeMs']; + $this->backendId = $values['backendId']; + $this->name = $values['name']; + $this->downtimeS = $values['downtimeS']; + $this->activeServers = $values['activeServers']; + $this->backupServers = $values['backupServers']; + $this->members = $values['members']; + $this->createdAt = $values['createdAt']; + $this->updatedAt = $values['updatedAt']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerBackendMetricsSeries.php b/fern/sdk/src/Types/LoadBalancerBackendMetricsSeries.php new file mode 100644 index 00000000..5e9a2cd9 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerBackendMetricsSeries.php @@ -0,0 +1,208 @@ + $backends List of backend identifiers included in the metrics series. + */ + #[JsonProperty('backends'), ArrayType(['string'])] + public array $backends; + + /** + * @var ?int $requestBytes Total number of request bytes processed. + */ + #[JsonProperty('request_bytes')] + public ?int $requestBytes; + + /** + * @var ?int $responseBytes Total number of response bytes sent. + */ + #[JsonProperty('response_bytes')] + public ?int $responseBytes; + + /** + * @var ?int $deniedResponses Total number of denied responses. + */ + #[JsonProperty('denied_responses')] + public ?int $deniedResponses; + + /** + * @var ?int $httpResponses1Xx Count of HTTP 1xx informational responses. + */ + #[JsonProperty('http_responses_1xx')] + public ?int $httpResponses1Xx; + + /** + * @var ?int $httpResponses2Xx Count of HTTP 2xx successful responses. + */ + #[JsonProperty('http_responses_2xx')] + public ?int $httpResponses2Xx; + + /** + * @var ?int $httpResponses3Xx Count of HTTP 3xx redirection responses. + */ + #[JsonProperty('http_responses_3xx')] + public ?int $httpResponses3Xx; + + /** + * @var ?int $httpResponses4Xx Count of HTTP 4xx client error responses. + */ + #[JsonProperty('http_responses_4xx')] + public ?int $httpResponses4Xx; + + /** + * @var ?int $httpResponses5Xx Count of HTTP 5xx server error responses. + */ + #[JsonProperty('http_responses_5xx')] + public ?int $httpResponses5Xx; + + /** + * @var ?int $httpResponsesOther Count of HTTP responses outside the 1xx–5xx range. + */ + #[JsonProperty('http_responses_other')] + public ?int $httpResponsesOther; + + /** + * @var ?int $sessions Total number of sessions. + */ + #[JsonProperty('sessions')] + public ?int $sessions; + + /** + * @var ?int $downtime Total downtime in seconds. + */ + #[JsonProperty('downtime')] + public ?int $downtime; + + /** + * @var ?int $failedChecksTransitions Number of transitions from healthy to failed health checks. + */ + #[JsonProperty('failed_checks_transitions')] + public ?int $failedChecksTransitions; + + /** + * @var ?int $clientAborted Number of client-aborted connections. + */ + #[JsonProperty('client_aborted')] + public ?int $clientAborted; + + /** + * @var ?int $failedConnections Number of failed connections. + */ + #[JsonProperty('failed_connections')] + public ?int $failedConnections; + + /** + * @var ?int $invalidResponses Number of invalid responses. + */ + #[JsonProperty('invalid_responses')] + public ?int $invalidResponses; + + /** + * @var ?int $routedRequests Number of routed requests. + */ + #[JsonProperty('routed_requests')] + public ?int $routedRequests; + + /** + * @var ?int $serverAborted Number of server-aborted connections. + */ + #[JsonProperty('server_aborted')] + public ?int $serverAborted; + + /** + * @var ?int $serverRedispatches Number of server redispatches. + */ + #[JsonProperty('server_redispatches')] + public ?int $serverRedispatches; + + /** + * @var ?int $serverConnectionRetries Number of server connection retries. + */ + #[JsonProperty('server_connection_retries')] + public ?int $serverConnectionRetries; + + /** + * @param array{ + * startAt: DateTime, + * endAt: DateTime, + * backends: array, + * requestBytes?: ?int, + * responseBytes?: ?int, + * deniedResponses?: ?int, + * httpResponses1Xx?: ?int, + * httpResponses2Xx?: ?int, + * httpResponses3Xx?: ?int, + * httpResponses4Xx?: ?int, + * httpResponses5Xx?: ?int, + * httpResponsesOther?: ?int, + * sessions?: ?int, + * downtime?: ?int, + * failedChecksTransitions?: ?int, + * clientAborted?: ?int, + * failedConnections?: ?int, + * invalidResponses?: ?int, + * routedRequests?: ?int, + * serverAborted?: ?int, + * serverRedispatches?: ?int, + * serverConnectionRetries?: ?int, + * } $values + */ + public function __construct( + array $values, + ) { + $this->startAt = $values['startAt']; + $this->endAt = $values['endAt']; + $this->backends = $values['backends']; + $this->requestBytes = $values['requestBytes'] ?? null; + $this->responseBytes = $values['responseBytes'] ?? null; + $this->deniedResponses = $values['deniedResponses'] ?? null; + $this->httpResponses1Xx = $values['httpResponses1Xx'] ?? null; + $this->httpResponses2Xx = $values['httpResponses2Xx'] ?? null; + $this->httpResponses3Xx = $values['httpResponses3Xx'] ?? null; + $this->httpResponses4Xx = $values['httpResponses4Xx'] ?? null; + $this->httpResponses5Xx = $values['httpResponses5Xx'] ?? null; + $this->httpResponsesOther = $values['httpResponsesOther'] ?? null; + $this->sessions = $values['sessions'] ?? null; + $this->downtime = $values['downtime'] ?? null; + $this->failedChecksTransitions = $values['failedChecksTransitions'] ?? null; + $this->clientAborted = $values['clientAborted'] ?? null; + $this->failedConnections = $values['failedConnections'] ?? null; + $this->invalidResponses = $values['invalidResponses'] ?? null; + $this->routedRequests = $values['routedRequests'] ?? null; + $this->serverAborted = $values['serverAborted'] ?? null; + $this->serverRedispatches = $values['serverRedispatches'] ?? null; + $this->serverConnectionRetries = $values['serverConnectionRetries'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerBackendPropertiesCreate.php b/fern/sdk/src/Types/LoadBalancerBackendPropertiesCreate.php new file mode 100644 index 00000000..93add95b --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerBackendPropertiesCreate.php @@ -0,0 +1,165 @@ + $outboundProxyProtocol + */ + #[JsonProperty('outbound_proxy_protocol')] + public ?string $outboundProxyProtocol; + + /** + * @var ?value-of $healthCheckType + */ + #[JsonProperty('health_check_type')] + public ?string $healthCheckType; + + /** + * @var ?int $healthCheckInterval Interval between health checks + */ + #[JsonProperty('health_check_interval')] + public ?int $healthCheckInterval; + + /** + * @var ?int $healthCheckFall Sets how many failed health checks are allowed + */ + #[JsonProperty('health_check_fall')] + public ?int $healthCheckFall; + + /** + * @var ?int $healthCheckRise Sets how many passing checks there must be before returning server to the rotation + */ + #[JsonProperty('health_check_rise')] + public ?int $healthCheckRise; + + /** + * @var ?string $healthCheckUrl Target url for health check HTTP GET requests + */ + #[JsonProperty('health_check_url')] + public ?string $healthCheckUrl; + + /** + * @var ?int $healthCheckExpectedStatus Expected HTTP status code returned by the customer application to mark server as healthy + */ + #[JsonProperty('health_check_expected_status')] + public ?int $healthCheckExpectedStatus; + + /** + * @var ?value-of $healthCheckOnDown + */ + #[JsonProperty('health_check_on_down')] + public ?string $healthCheckOnDown; + + /** + * @var ?bool $healthCheckTlsVerify Allows health check CA verification on TLS connections + */ + #[JsonProperty('health_check_tls_verify')] + public ?bool $healthCheckTlsVerify; + + /** + * @var ?string $stickySessionCookieName Sets sticky session cookie name. Empty string disables sticky session. + */ + #[JsonProperty('sticky_session_cookie_name')] + public ?string $stickySessionCookieName; + + /** + * @var ?string $stickySessionCookieAttributes Controls additional cookie attributes appended to sticky session cookies. Supports combinations of: SameSite=Strict|Lax|None, Secure, HttpOnly, Partitioned (semicolon-separated). Note: SameSite=None and Partitioned require Secure. + */ + #[JsonProperty('sticky_session_cookie_attributes')] + public ?string $stickySessionCookieAttributes; + + /** + * @var ?bool $tlsEnabled Enables TLS between LB backend and member servers + */ + #[JsonProperty('tls_enabled')] + public ?bool $tlsEnabled; + + /** + * @var ?bool $tlsVerify Enables CA verification on TLS backend connections + */ + #[JsonProperty('tls_verify')] + public ?bool $tlsVerify; + + /** + * @var ?bool $tlsUseSystemCa Force Load Balancer to verify member certificates against system CA bundle + */ + #[JsonProperty('tls_use_system_ca')] + public ?bool $tlsUseSystemCa; + + /** + * @var ?bool $http2Enabled Allows for HTTP2 connection via ALPN + */ + #[JsonProperty('http2_enabled')] + public ?bool $http2Enabled; + + /** + * @param array{ + * timeoutServer?: ?int, + * timeoutTunnel?: ?int, + * outboundProxyProtocol?: ?value-of, + * healthCheckType?: ?value-of, + * healthCheckInterval?: ?int, + * healthCheckFall?: ?int, + * healthCheckRise?: ?int, + * healthCheckUrl?: ?string, + * healthCheckExpectedStatus?: ?int, + * healthCheckOnDown?: ?value-of, + * healthCheckTlsVerify?: ?bool, + * stickySessionCookieName?: ?string, + * stickySessionCookieAttributes?: ?string, + * tlsEnabled?: ?bool, + * tlsVerify?: ?bool, + * tlsUseSystemCa?: ?bool, + * http2Enabled?: ?bool, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->timeoutServer = $values['timeoutServer'] ?? null; + $this->timeoutTunnel = $values['timeoutTunnel'] ?? null; + $this->outboundProxyProtocol = $values['outboundProxyProtocol'] ?? null; + $this->healthCheckType = $values['healthCheckType'] ?? null; + $this->healthCheckInterval = $values['healthCheckInterval'] ?? null; + $this->healthCheckFall = $values['healthCheckFall'] ?? null; + $this->healthCheckRise = $values['healthCheckRise'] ?? null; + $this->healthCheckUrl = $values['healthCheckUrl'] ?? null; + $this->healthCheckExpectedStatus = $values['healthCheckExpectedStatus'] ?? null; + $this->healthCheckOnDown = $values['healthCheckOnDown'] ?? null; + $this->healthCheckTlsVerify = $values['healthCheckTlsVerify'] ?? null; + $this->stickySessionCookieName = $values['stickySessionCookieName'] ?? null; + $this->stickySessionCookieAttributes = $values['stickySessionCookieAttributes'] ?? null; + $this->tlsEnabled = $values['tlsEnabled'] ?? null; + $this->tlsVerify = $values['tlsVerify'] ?? null; + $this->tlsUseSystemCa = $values['tlsUseSystemCa'] ?? null; + $this->http2Enabled = $values['http2Enabled'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerBackendPropertiesResponse.php b/fern/sdk/src/Types/LoadBalancerBackendPropertiesResponse.php new file mode 100644 index 00000000..be8e91e3 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerBackendPropertiesResponse.php @@ -0,0 +1,173 @@ + $outboundProxyProtocol + */ + #[JsonProperty('outbound_proxy_protocol')] + public ?string $outboundProxyProtocol; + + /** + * @var int $timeoutServer Server timeout in milliseconds. + */ + #[JsonProperty('timeout_server')] + public int $timeoutServer; + + /** + * @var int $timeoutTunnel Tunnel timeout in milliseconds. + */ + #[JsonProperty('timeout_tunnel')] + public int $timeoutTunnel; + + /** + * @var string $healthCheckType Type of health check. + */ + #[JsonProperty('health_check_type')] + public string $healthCheckType; + + /** + * @var int $healthCheckInterval Interval between health checks in seconds. + */ + #[JsonProperty('health_check_interval')] + public int $healthCheckInterval; + + /** + * @var int $healthCheckFall Number of failed checks before marking as unhealthy. + */ + #[JsonProperty('health_check_fall')] + public int $healthCheckFall; + + /** + * @var int $healthCheckRise Number of successful checks before marking as healthy. + */ + #[JsonProperty('health_check_rise')] + public int $healthCheckRise; + + /** + * @var string $healthCheckUrl URL for HTTP health checks. + */ + #[JsonProperty('health_check_url')] + public string $healthCheckUrl; + + /** + * @var int $healthCheckExpectedStatus Expected HTTP status code from health check. + */ + #[JsonProperty('health_check_expected_status')] + public int $healthCheckExpectedStatus; + + /** + * @var bool $healthCheckTlsVerify Whether to verify TLS in health check. + */ + #[JsonProperty('health_check_tls_verify')] + public bool $healthCheckTlsVerify; + + /** + * @var string $healthCheckOnDown Action to take when backend is down. + */ + #[JsonProperty('health_check_on_down')] + public string $healthCheckOnDown; + + /** + * @var ?string $stickySessionCookieName Name of the sticky session cookie. + */ + #[JsonProperty('sticky_session_cookie_name')] + public ?string $stickySessionCookieName; + + /** + * @var ?string $stickySessionCookieAttributes Additional cookie attributes appended to sticky session cookies. Supports combinations of: SameSite=Strict|Lax|None, Secure, HttpOnly, Partitioned (semicolon-separated). + */ + #[JsonProperty('sticky_session_cookie_attributes')] + public ?string $stickySessionCookieAttributes; + + /** + * @var bool $tlsEnabled Whether TLS is enabled. + */ + #[JsonProperty('tls_enabled')] + public bool $tlsEnabled; + + /** + * @var bool $tlsVerify Whether to verify backend TLS certificate. + */ + #[JsonProperty('tls_verify')] + public bool $tlsVerify; + + /** + * @var bool $tlsUseSystemCa Whether to use system CA for backend TLS. + */ + #[JsonProperty('tls_use_system_ca')] + public bool $tlsUseSystemCa; + + /** + * @var bool $http2Enabled Whether HTTP/2 is enabled for the backend. + */ + #[JsonProperty('http2_enabled')] + public bool $http2Enabled; + + /** + * @param array{ + * backendId: int, + * timeoutServer: int, + * timeoutTunnel: int, + * healthCheckType: string, + * healthCheckInterval: int, + * healthCheckFall: int, + * healthCheckRise: int, + * healthCheckUrl: string, + * healthCheckExpectedStatus: int, + * healthCheckTlsVerify: bool, + * healthCheckOnDown: string, + * tlsEnabled: bool, + * tlsVerify: bool, + * tlsUseSystemCa: bool, + * http2Enabled: bool, + * outboundProxyProtocol?: ?value-of, + * stickySessionCookieName?: ?string, + * stickySessionCookieAttributes?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->backendId = $values['backendId']; + $this->outboundProxyProtocol = $values['outboundProxyProtocol'] ?? null; + $this->timeoutServer = $values['timeoutServer']; + $this->timeoutTunnel = $values['timeoutTunnel']; + $this->healthCheckType = $values['healthCheckType']; + $this->healthCheckInterval = $values['healthCheckInterval']; + $this->healthCheckFall = $values['healthCheckFall']; + $this->healthCheckRise = $values['healthCheckRise']; + $this->healthCheckUrl = $values['healthCheckUrl']; + $this->healthCheckExpectedStatus = $values['healthCheckExpectedStatus']; + $this->healthCheckTlsVerify = $values['healthCheckTlsVerify']; + $this->healthCheckOnDown = $values['healthCheckOnDown']; + $this->stickySessionCookieName = $values['stickySessionCookieName'] ?? null; + $this->stickySessionCookieAttributes = $values['stickySessionCookieAttributes'] ?? null; + $this->tlsEnabled = $values['tlsEnabled']; + $this->tlsVerify = $values['tlsVerify']; + $this->tlsUseSystemCa = $values['tlsUseSystemCa']; + $this->http2Enabled = $values['http2Enabled']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerCertificateBundle.php b/fern/sdk/src/Types/LoadBalancerCertificateBundle.php new file mode 100644 index 00000000..6f326bb6 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerCertificateBundle.php @@ -0,0 +1,152 @@ + $tlsType The certificate bundle type. Determines how the certificate is provisioned and managed. + */ + #[JsonProperty('tls_type')] + public string $tlsType; + + /** + * @var value-of $operationalState Current operational state of the certificate bundle. + */ + #[JsonProperty('operational_state')] + public string $operationalState; + + /** + * @var ?string $certificate PEM-encoded certificate data (base64). + */ + #[JsonProperty('certificate')] + public ?string $certificate; + + /** + * @var ?string $intermediates PEM-encoded intermediate certificates (base64). + */ + #[JsonProperty('intermediates')] + public ?string $intermediates; + + /** + * @var ?array $hostnames List of hostnames covered by this certificate bundle. + */ + #[JsonProperty('hostnames'), ArrayType(['string'])] + public ?array $hostnames; + + /** + * @var ?array $challengeProblems Problems reported during ACME challenge validation. + */ + #[JsonProperty('challenge_problems'), ArrayType([LoadBalancerChallengeProblemResponse::class])] + public ?array $challengeProblems; + + /** + * @var ?value-of $keyType Type of private key used for this certificate bundle. + */ + #[JsonProperty('key_type')] + public ?string $keyType; + + /** + * @var ?array $services List of load balancer services that use this certificate bundle. + */ + #[JsonProperty('services'), ArrayType([LoadBalancerEmbeddedServiceResponse::class])] + public ?array $services; + + /** + * @var ?DateTime $notBefore The start date and time of certificate validity. + */ + #[JsonProperty('not_before'), Date(Date::TYPE_DATETIME)] + public ?DateTime $notBefore; + + /** + * @var ?DateTime $notAfter The expiration date and time of certificate validity. + */ + #[JsonProperty('not_after'), Date(Date::TYPE_DATETIME)] + public ?DateTime $notAfter; + + /** + * @var ?array $labels List of labels attached to this certificate bundle. + */ + #[JsonProperty('labels'), ArrayType([LoadBalancerLabelResponse::class])] + public ?array $labels; + + /** + * @var DateTime $createdAt Timestamp when this certificate bundle was created. + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; + + /** + * @var DateTime $updatedAt Timestamp when this certificate bundle was last updated. + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; + + /** + * @param array{ + * uuid: string, + * name: string, + * tlsType: value-of, + * operationalState: value-of, + * createdAt: DateTime, + * updatedAt: DateTime, + * certificate?: ?string, + * intermediates?: ?string, + * hostnames?: ?array, + * challengeProblems?: ?array, + * keyType?: ?value-of, + * services?: ?array, + * notBefore?: ?DateTime, + * notAfter?: ?DateTime, + * labels?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->uuid = $values['uuid']; + $this->name = $values['name']; + $this->tlsType = $values['tlsType']; + $this->operationalState = $values['operationalState']; + $this->certificate = $values['certificate'] ?? null; + $this->intermediates = $values['intermediates'] ?? null; + $this->hostnames = $values['hostnames'] ?? null; + $this->challengeProblems = $values['challengeProblems'] ?? null; + $this->keyType = $values['keyType'] ?? null; + $this->services = $values['services'] ?? null; + $this->notBefore = $values['notBefore'] ?? null; + $this->notAfter = $values['notAfter'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->createdAt = $values['createdAt']; + $this->updatedAt = $values['updatedAt']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerCertificateBundleAuthorityModify.php b/fern/sdk/src/Types/LoadBalancerCertificateBundleAuthorityModify.php new file mode 100644 index 00000000..1aee9d89 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerCertificateBundleAuthorityModify.php @@ -0,0 +1,54 @@ + $labels Labels + */ + #[JsonProperty('labels'), ArrayType([LoadBalancerLabelCreate::class])] + public ?array $labels; + + /** + * @param array{ + * name?: ?string, + * certificate?: ?string, + * labels?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->certificate = $values['certificate'] ?? null; + $this->labels = $values['labels'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerCertificateBundleCreateCertificate.php b/fern/sdk/src/Types/LoadBalancerCertificateBundleCreateCertificate.php new file mode 100644 index 00000000..eb88fe17 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerCertificateBundleCreateCertificate.php @@ -0,0 +1,34 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @param array{ + * type: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerCertificateBundleCreateCertificateType.php b/fern/sdk/src/Types/LoadBalancerCertificateBundleCreateCertificateType.php new file mode 100644 index 00000000..98315211 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerCertificateBundleCreateCertificateType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @param array{ + * type: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerCertificateBundleCreateTypeType.php b/fern/sdk/src/Types/LoadBalancerCertificateBundleCreateTypeType.php new file mode 100644 index 00000000..9fc026e0 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerCertificateBundleCreateTypeType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @param array{ + * type: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerCertificateBundleCreateZeroType.php b/fern/sdk/src/Types/LoadBalancerCertificateBundleCreateZeroType.php new file mode 100644 index 00000000..8979be9f --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerCertificateBundleCreateZeroType.php @@ -0,0 +1,8 @@ + $hostnames Array of hostnames + */ + #[JsonProperty('hostnames'), ArrayType(['string'])] + public ?array $hostnames; + + /** + * @var ?array $labels Labels + */ + #[JsonProperty('labels'), ArrayType([LoadBalancerLabelCreate::class])] + public ?array $labels; + + /** + * @var ?string $challengeKey Unique key used for ACME DNS challenge validation when obtaining certificates dynamically. + */ + #[JsonProperty('challenge_key')] + public ?string $challengeKey; + + /** + * @param array{ + * name?: ?string, + * hostnames?: ?array, + * labels?: ?array, + * challengeKey?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->hostnames = $values['hostnames'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->challengeKey = $values['challengeKey'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerCertificateBundleKeyType.php b/fern/sdk/src/Types/LoadBalancerCertificateBundleKeyType.php new file mode 100644 index 00000000..84335d45 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerCertificateBundleKeyType.php @@ -0,0 +1,9 @@ + $labels Labels + */ + #[JsonProperty('labels'), ArrayType([LoadBalancerLabelCreate::class])] + public ?array $labels; + + /** + * @param array{ + * name?: ?string, + * certificate?: ?string, + * intermediates?: ?string, + * privateKey?: ?string, + * labels?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->certificate = $values['certificate'] ?? null; + $this->intermediates = $values['intermediates'] ?? null; + $this->privateKey = $values['privateKey'] ?? null; + $this->labels = $values['labels'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerCertificateBundleOperationalState.php b/fern/sdk/src/Types/LoadBalancerCertificateBundleOperationalState.php new file mode 100644 index 00000000..2467c76c --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerCertificateBundleOperationalState.php @@ -0,0 +1,12 @@ +hostname = $values['hostname']; + $this->problem = $values['problem']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerChecksOnDown.php b/fern/sdk/src/Types/LoadBalancerChecksOnDown.php new file mode 100644 index 00000000..4a651127 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerChecksOnDown.php @@ -0,0 +1,9 @@ +totalRequestBytes = $values['totalRequestBytes']; + $this->totalResponseBytes = $values['totalResponseBytes']; + $this->totalDeniedResponses = $values['totalDeniedResponses']; + $this->totalHttpResponses1Xx = $values['totalHttpResponses1Xx']; + $this->totalHttpResponses2Xx = $values['totalHttpResponses2Xx']; + $this->totalHttpResponses3Xx = $values['totalHttpResponses3Xx']; + $this->totalHttpResponses4Xx = $values['totalHttpResponses4Xx']; + $this->totalHttpResponses5Xx = $values['totalHttpResponses5Xx']; + $this->totalHttpResponsesOther = $values['totalHttpResponsesOther']; + $this->totalSessions = $values['totalSessions']; + $this->sessionRate = $values['sessionRate']; + $this->currentSessions = $values['currentSessions']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerContentTypes.php b/fern/sdk/src/Types/LoadBalancerContentTypes.php new file mode 100644 index 00000000..78189d96 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerContentTypes.php @@ -0,0 +1,11 @@ +domain = $values['domain']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerEmbeddedBackendResponse.php b/fern/sdk/src/Types/LoadBalancerEmbeddedBackendResponse.php new file mode 100644 index 00000000..f0d7a16b --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerEmbeddedBackendResponse.php @@ -0,0 +1,46 @@ + $tlsConfigs List of TLS configuration objects associated with this backend. Each entry defines a certificate bundle used for secure connections to backend servers. + */ + #[JsonProperty('tls_configs'), ArrayType([LoadBalancerTlsConfig::class])] + public ?array $tlsConfigs; + + /** + * @param array{ + * name: string, + * tlsConfigs?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->tlsConfigs = $values['tlsConfigs'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerEmbeddedFrontendResponse.php b/fern/sdk/src/Types/LoadBalancerEmbeddedFrontendResponse.php new file mode 100644 index 00000000..69c0b0ac --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerEmbeddedFrontendResponse.php @@ -0,0 +1,46 @@ + $tlsConfigs List of TLS configuration objects associated with this frontend. Each entry references a certificate bundle used for secure connections. + */ + #[JsonProperty('tls_configs'), ArrayType([LoadBalancerTlsConfig::class])] + public ?array $tlsConfigs; + + /** + * @param array{ + * name: string, + * tlsConfigs?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->tlsConfigs = $values['tlsConfigs'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerEmbeddedServiceResponse.php b/fern/sdk/src/Types/LoadBalancerEmbeddedServiceResponse.php new file mode 100644 index 00000000..c9f40c77 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerEmbeddedServiceResponse.php @@ -0,0 +1,70 @@ + $frontends List of frontends associated with the service. Each frontend defines how client connections are received. + */ + #[JsonProperty('frontends'), ArrayType([LoadBalancerEmbeddedFrontendResponse::class])] + public ?array $frontends; + + /** + * @var ?array $backends List of backends associated with the service. Each backend defines how traffic is distributed to target servers. + */ + #[JsonProperty('backends'), ArrayType([LoadBalancerEmbeddedBackendResponse::class])] + public ?array $backends; + + /** + * @var ?bool $deleted Indicates whether the service has been marked as deleted. + */ + #[JsonProperty('deleted')] + public ?bool $deleted; + + /** + * @param array{ + * uuid: string, + * name: string, + * frontends?: ?array, + * backends?: ?array, + * deleted?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->uuid = $values['uuid']; + $this->name = $values['name']; + $this->frontends = $values['frontends'] ?? null; + $this->backends = $values['backends'] ?? null; + $this->deleted = $values['deleted'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerErrorResponse.php b/fern/sdk/src/Types/LoadBalancerErrorResponse.php new file mode 100644 index 00000000..d480466c --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerErrorResponse.php @@ -0,0 +1,37 @@ +error = $values['error'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerErrorResponseError.php b/fern/sdk/src/Types/LoadBalancerErrorResponseError.php new file mode 100644 index 00000000..767526d1 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerErrorResponseError.php @@ -0,0 +1,45 @@ +errorMessage = $values['errorMessage']; + $this->errorCode = $values['errorCode']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerFrontend.php b/fern/sdk/src/Types/LoadBalancerFrontend.php new file mode 100644 index 00000000..114a354a --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerFrontend.php @@ -0,0 +1,112 @@ + $mode Operating mode defining the protocol layer at which the frontend operates. + */ + #[JsonProperty('mode')] + public string $mode; + + /** + * @var string $defaultBackend Name of the backend used when no routing rules match the incoming request. + */ + #[JsonProperty('default_backend')] + public string $defaultBackend; + + /** + * @var array $tlsConfigs + */ + #[JsonProperty('tls_configs'), ArrayType([LoadBalancerTlsConfig::class])] + public array $tlsConfigs; + + /** + * @var array $rules + */ + #[JsonProperty('rules'), ArrayType([LoadBalancerRule::class])] + public array $rules; + + /** + * @var LoadBalancerFrontendPropertiesResponse $properties + */ + #[JsonProperty('properties')] + public LoadBalancerFrontendPropertiesResponse $properties; + + /** + * @var array $networks + */ + #[JsonProperty('networks'), ArrayType([LoadBalancerFrontendNetworksItem::class])] + public array $networks; + + /** + * @var DateTime $createdAt Timestamp when the frontend was created (RFC 3339 format). + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; + + /** + * @var DateTime $updatedAt Timestamp when the frontend was last updated (RFC 3339 format). + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; + + /** + * @param array{ + * name: string, + * port: int, + * mode: value-of, + * defaultBackend: string, + * tlsConfigs: array, + * rules: array, + * properties: LoadBalancerFrontendPropertiesResponse, + * networks: array, + * createdAt: DateTime, + * updatedAt: DateTime, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->port = $values['port']; + $this->mode = $values['mode']; + $this->defaultBackend = $values['defaultBackend']; + $this->tlsConfigs = $values['tlsConfigs']; + $this->rules = $values['rules']; + $this->properties = $values['properties']; + $this->networks = $values['networks']; + $this->createdAt = $values['createdAt']; + $this->updatedAt = $values['updatedAt']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerFrontendCreate.php b/fern/sdk/src/Types/LoadBalancerFrontendCreate.php new file mode 100644 index 00000000..00b95de2 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerFrontendCreate.php @@ -0,0 +1,94 @@ + $mode + */ + #[JsonProperty('mode')] + public string $mode; + + /** + * @var string $defaultBackend Default backend + */ + #[JsonProperty('default_backend')] + public string $defaultBackend; + + /** + * @var ?array $networks Network names + */ + #[JsonProperty('networks'), ArrayType([LoadBalancerFrontendNetworkCreate::class])] + public ?array $networks; + + /** + * @var ?array $tlsConfigs TLS Configs + */ + #[JsonProperty('tls_configs'), ArrayType([LoadBalancerTlsConfigCreate::class])] + public ?array $tlsConfigs; + + /** + * @var ?array $rules Rules + */ + #[JsonProperty('rules'), ArrayType([LoadBalancerRuleCreate::class])] + public ?array $rules; + + /** + * @var ?LoadBalancerFrontendPropertiesCreate $properties + */ + #[JsonProperty('properties')] + public ?LoadBalancerFrontendPropertiesCreate $properties; + + /** + * @param array{ + * name: string, + * port: int, + * mode: value-of, + * defaultBackend: string, + * networks?: ?array, + * tlsConfigs?: ?array, + * rules?: ?array, + * properties?: ?LoadBalancerFrontendPropertiesCreate, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->port = $values['port']; + $this->mode = $values['mode']; + $this->defaultBackend = $values['defaultBackend']; + $this->networks = $values['networks'] ?? null; + $this->tlsConfigs = $values['tlsConfigs'] ?? null; + $this->rules = $values['rules'] ?? null; + $this->properties = $values['properties'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerFrontendMetricsResponse.php b/fern/sdk/src/Types/LoadBalancerFrontendMetricsResponse.php new file mode 100644 index 00000000..5f3f4586 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerFrontendMetricsResponse.php @@ -0,0 +1,130 @@ +totalRequestBytes = $values['totalRequestBytes']; + $this->totalResponseBytes = $values['totalResponseBytes']; + $this->totalDeniedResponses = $values['totalDeniedResponses']; + $this->totalHttpResponses1Xx = $values['totalHttpResponses1Xx']; + $this->totalHttpResponses2Xx = $values['totalHttpResponses2Xx']; + $this->totalHttpResponses3Xx = $values['totalHttpResponses3Xx']; + $this->totalHttpResponses4Xx = $values['totalHttpResponses4Xx']; + $this->totalHttpResponses5Xx = $values['totalHttpResponses5Xx']; + $this->totalHttpResponsesOther = $values['totalHttpResponsesOther']; + $this->totalSessions = $values['totalSessions']; + $this->sessionRate = $values['sessionRate']; + $this->currentSessions = $values['currentSessions']; + $this->totalHttpRequests = $values['totalHttpRequests']; + $this->totalDeniedRequests = $values['totalDeniedRequests']; + $this->totalInterceptedRequests = $values['totalInterceptedRequests']; + $this->frontendId = $values['frontendId']; + $this->name = $values['name']; + $this->requestRate = $values['requestRate']; + $this->totalDeniedConnections = $values['totalDeniedConnections']; + $this->totalDeniedSessions = $values['totalDeniedSessions']; + $this->totalInvalidRequests = $values['totalInvalidRequests']; + $this->createdAt = $values['createdAt']; + $this->updatedAt = $values['updatedAt']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerFrontendMetricsSeries.php b/fern/sdk/src/Types/LoadBalancerFrontendMetricsSeries.php new file mode 100644 index 00000000..e5e7e3c6 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerFrontendMetricsSeries.php @@ -0,0 +1,184 @@ + $frontends List of frontend names or identifiers included in the aggregated data. + */ + #[JsonProperty('frontends'), ArrayType(['string'])] + public array $frontends; + + /** + * @var ?int $deniedConnections Total number of denied frontend connections within the time range. + */ + #[JsonProperty('denied_connections')] + public ?int $deniedConnections; + + /** + * @var ?int $deniedSessions Total number of denied sessions during the period. + */ + #[JsonProperty('denied_sessions')] + public ?int $deniedSessions; + + /** + * @var ?int $invalidRequests Number of malformed or invalid HTTP requests received. + */ + #[JsonProperty('invalid_requests')] + public ?int $invalidRequests; + + /** + * @var ?int $requestBytes Total size of incoming request payloads, in bytes. + */ + #[JsonProperty('request_bytes')] + public ?int $requestBytes; + + /** + * @var ?int $responseBytes Total size of outgoing response payloads, in bytes. + */ + #[JsonProperty('response_bytes')] + public ?int $responseBytes; + + /** + * @var ?int $deniedResponses Number of HTTP responses that were denied or rejected. + */ + #[JsonProperty('denied_responses')] + public ?int $deniedResponses; + + /** + * @var ?int $httpResponses1Xx Count of informational (1xx) HTTP responses. + */ + #[JsonProperty('http_responses_1xx')] + public ?int $httpResponses1Xx; + + /** + * @var ?int $httpResponses2Xx Count of successful (2xx) HTTP responses. + */ + #[JsonProperty('http_responses_2xx')] + public ?int $httpResponses2Xx; + + /** + * @var ?int $httpResponses3Xx Count of redirection (3xx) HTTP responses. + */ + #[JsonProperty('http_responses_3xx')] + public ?int $httpResponses3Xx; + + /** + * @var ?int $httpResponses4Xx Count of client error (4xx) HTTP responses. + */ + #[JsonProperty('http_responses_4xx')] + public ?int $httpResponses4Xx; + + /** + * @var ?int $httpResponses5Xx Count of server error (5xx) HTTP responses. + */ + #[JsonProperty('http_responses_5xx')] + public ?int $httpResponses5Xx; + + /** + * @var ?int $httpResponsesOther Count of HTTP responses with codes outside the 1xx–5xx range. + */ + #[JsonProperty('http_responses_other')] + public ?int $httpResponsesOther; + + /** + * @var ?int $sessions Total number of frontend sessions handled. + */ + #[JsonProperty('sessions')] + public ?int $sessions; + + /** + * @var ?int $httpRequests Total number of HTTP requests processed during the aggregation period. + */ + #[JsonProperty('http_requests')] + public ?int $httpRequests; + + /** + * @var ?int $deniedRequests Total number of HTTP requests denied. + */ + #[JsonProperty('denied_requests')] + public ?int $deniedRequests; + + /** + * @var ?int $interceptedRequests Number of requests intercepted before reaching the backend. + */ + #[JsonProperty('intercepted_requests')] + public ?int $interceptedRequests; + + /** + * @param array{ + * startAt: DateTime, + * endAt: DateTime, + * frontends: array, + * deniedConnections?: ?int, + * deniedSessions?: ?int, + * invalidRequests?: ?int, + * requestBytes?: ?int, + * responseBytes?: ?int, + * deniedResponses?: ?int, + * httpResponses1Xx?: ?int, + * httpResponses2Xx?: ?int, + * httpResponses3Xx?: ?int, + * httpResponses4Xx?: ?int, + * httpResponses5Xx?: ?int, + * httpResponsesOther?: ?int, + * sessions?: ?int, + * httpRequests?: ?int, + * deniedRequests?: ?int, + * interceptedRequests?: ?int, + * } $values + */ + public function __construct( + array $values, + ) { + $this->startAt = $values['startAt']; + $this->endAt = $values['endAt']; + $this->frontends = $values['frontends']; + $this->deniedConnections = $values['deniedConnections'] ?? null; + $this->deniedSessions = $values['deniedSessions'] ?? null; + $this->invalidRequests = $values['invalidRequests'] ?? null; + $this->requestBytes = $values['requestBytes'] ?? null; + $this->responseBytes = $values['responseBytes'] ?? null; + $this->deniedResponses = $values['deniedResponses'] ?? null; + $this->httpResponses1Xx = $values['httpResponses1Xx'] ?? null; + $this->httpResponses2Xx = $values['httpResponses2Xx'] ?? null; + $this->httpResponses3Xx = $values['httpResponses3Xx'] ?? null; + $this->httpResponses4Xx = $values['httpResponses4Xx'] ?? null; + $this->httpResponses5Xx = $values['httpResponses5Xx'] ?? null; + $this->httpResponsesOther = $values['httpResponsesOther'] ?? null; + $this->sessions = $values['sessions'] ?? null; + $this->httpRequests = $values['httpRequests'] ?? null; + $this->deniedRequests = $values['deniedRequests'] ?? null; + $this->interceptedRequests = $values['interceptedRequests'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerFrontendMode.php b/fern/sdk/src/Types/LoadBalancerFrontendMode.php new file mode 100644 index 00000000..1eb50ac7 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerFrontendMode.php @@ -0,0 +1,9 @@ +name = $values['name']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerFrontendNetworksItem.php b/fern/sdk/src/Types/LoadBalancerFrontendNetworksItem.php new file mode 100644 index 00000000..fca4d720 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerFrontendNetworksItem.php @@ -0,0 +1,34 @@ +name = $values['name']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerFrontendPropertiesCreate.php b/fern/sdk/src/Types/LoadBalancerFrontendPropertiesCreate.php new file mode 100644 index 00000000..451bbd61 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerFrontendPropertiesCreate.php @@ -0,0 +1,53 @@ +timeoutClient = $values['timeoutClient'] ?? null; + $this->inboundProxyProtocol = $values['inboundProxyProtocol'] ?? null; + $this->http2Enabled = $values['http2Enabled'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerFrontendPropertiesResponse.php b/fern/sdk/src/Types/LoadBalancerFrontendPropertiesResponse.php new file mode 100644 index 00000000..457c581a --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerFrontendPropertiesResponse.php @@ -0,0 +1,61 @@ +inboundProxyProtocol = $values['inboundProxyProtocol'] ?? null; + $this->timeoutClient = $values['timeoutClient']; + $this->http2Enabled = $values['http2Enabled'] ?? null; + $this->frontendId = $values['frontendId']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerHealthCheckType.php b/fern/sdk/src/Types/LoadBalancerHealthCheckType.php new file mode 100644 index 00000000..50e8b7e6 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerHealthCheckType.php @@ -0,0 +1,9 @@ +address = $values['address']; + $this->networkName = $values['networkName']; + $this->createdAt = $values['createdAt']; + $this->updatedAt = $values['updatedAt']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerIpAddressCreate.php b/fern/sdk/src/Types/LoadBalancerIpAddressCreate.php new file mode 100644 index 00000000..3354e784 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerIpAddressCreate.php @@ -0,0 +1,45 @@ +address = $values['address']; + $this->networkName = $values['networkName'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerLabelCreate.php b/fern/sdk/src/Types/LoadBalancerLabelCreate.php new file mode 100644 index 00000000..6408e438 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerLabelCreate.php @@ -0,0 +1,45 @@ +key = $values['key']; + $this->value = $values['value'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerLabelModify.php b/fern/sdk/src/Types/LoadBalancerLabelModify.php new file mode 100644 index 00000000..6593b329 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerLabelModify.php @@ -0,0 +1,45 @@ +key = $values['key'] ?? null; + $this->value = $values['value'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerLabelResponse.php b/fern/sdk/src/Types/LoadBalancerLabelResponse.php new file mode 100644 index 00000000..af959215 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerLabelResponse.php @@ -0,0 +1,45 @@ +key = $values['key']; + $this->value = $values['value'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMaintenanceDayOfWeek.php b/fern/sdk/src/Types/LoadBalancerMaintenanceDayOfWeek.php new file mode 100644 index 00000000..56abdce8 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMaintenanceDayOfWeek.php @@ -0,0 +1,14 @@ +, + * value: int, + * backend: string, + * rangeStart?: ?int, + * rangeEnd?: ?int, + * } $values + */ + public function __construct( + array $values, + ) { + $this->method = $values['method']; + $this->value = $values['value']; + $this->rangeStart = $values['rangeStart'] ?? null; + $this->rangeEnd = $values['rangeEnd'] ?? null; + $this->backend = $values['backend']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatchIntResponse.php b/fern/sdk/src/Types/LoadBalancerMatchIntResponse.php new file mode 100644 index 00000000..6b0c4d24 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatchIntResponse.php @@ -0,0 +1,61 @@ + $method Comparison method used to evaluate the integer value. + */ + #[JsonProperty('method')] + public string $method; + + /** + * @var int $value Integer value to compare against using the specified comparison method. + */ + #[JsonProperty('value')] + public int $value; + + /** + * @var ?int $rangeStart Starting value of the range for range-based integer matching. + */ + #[JsonProperty('range_start')] + public ?int $rangeStart; + + /** + * @var ?int $rangeEnd Ending value of the range for range-based integer matching. + */ + #[JsonProperty('range_end')] + public ?int $rangeEnd; + + /** + * @param array{ + * method: value-of, + * value: int, + * rangeStart?: ?int, + * rangeEnd?: ?int, + * } $values + */ + public function __construct( + array $values, + ) { + $this->method = $values['method']; + $this->value = $values['value']; + $this->rangeStart = $values['rangeStart'] ?? null; + $this->rangeEnd = $values['rangeEnd'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatchIntResponseMethod.php b/fern/sdk/src/Types/LoadBalancerMatchIntResponseMethod.php new file mode 100644 index 00000000..17730030 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatchIntResponseMethod.php @@ -0,0 +1,12 @@ +value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatchStringResponse.php b/fern/sdk/src/Types/LoadBalancerMatchStringResponse.php new file mode 100644 index 00000000..90ba8653 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatchStringResponse.php @@ -0,0 +1,53 @@ + $method String comparison method used to evaluate the match condition. + */ + #[JsonProperty('method')] + public ?string $method; + + /** + * @var ?string $value String value or pattern to match against using the specified comparison method. + */ + #[JsonProperty('value')] + public ?string $value; + + /** + * @var ?bool $ignoreCase Indicates whether the string comparison should be case-insensitive. + */ + #[JsonProperty('ignore_case')] + public ?bool $ignoreCase; + + /** + * @param array{ + * method?: ?value-of, + * value?: ?string, + * ignoreCase?: ?bool, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->method = $values['method'] ?? null; + $this->value = $values['value'] ?? null; + $this->ignoreCase = $values['ignoreCase'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatchStringResponseMethod.php b/fern/sdk/src/Types/LoadBalancerMatchStringResponseMethod.php new file mode 100644 index 00000000..11446079 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatchStringResponseMethod.php @@ -0,0 +1,12 @@ +, + * value?: ?string, + * ignoreCase?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->method = $values['method'] ?? null; + $this->value = $values['value'] ?? null; + $this->ignoreCase = $values['ignoreCase'] ?? null; + $this->name = $values['name']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherBackendCreateRangeEnd.php b/fern/sdk/src/Types/LoadBalancerMatcherBackendCreateRangeEnd.php new file mode 100644 index 00000000..eb8ee86e --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherBackendCreateRangeEnd.php @@ -0,0 +1,26 @@ +toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherCreateInverse.php b/fern/sdk/src/Types/LoadBalancerMatcherCreateInverse.php new file mode 100644 index 00000000..77e19abc --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherCreateInverse.php @@ -0,0 +1,50 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?bool $inverse Inverse rule + */ + #[JsonProperty('inverse')] + public ?bool $inverse; + + /** + * @var LoadBalancerMatcherIntCreateRangeEnd $matchHttpStatus + */ + #[JsonProperty('match_http_status')] + public LoadBalancerMatcherIntCreateRangeEnd $matchHttpStatus; + + /** + * @param array{ + * type: value-of, + * matchHttpStatus: LoadBalancerMatcherIntCreateRangeEnd, + * inverse?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->inverse = $values['inverse'] ?? null; + $this->matchHttpStatus = $values['matchHttpStatus']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherCreateInverseType.php b/fern/sdk/src/Types/LoadBalancerMatcherCreateInverseType.php new file mode 100644 index 00000000..87572f73 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherCreateInverseType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?bool $inverse Inverse rule + */ + #[JsonProperty('inverse')] + public ?bool $inverse; + + /** + * @var LoadBalancerMatcherIntCreateRangeEnd $matchBodySize + */ + #[JsonProperty('match_body_size')] + public LoadBalancerMatcherIntCreateRangeEnd $matchBodySize; + + /** + * @param array{ + * type: value-of, + * matchBodySize: LoadBalancerMatcherIntCreateRangeEnd, + * inverse?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->inverse = $values['inverse'] ?? null; + $this->matchBodySize = $values['matchBodySize']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchBodySizeType.php b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchBodySizeType.php new file mode 100644 index 00000000..9b73650a --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchBodySizeType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?bool $inverse Inverse rule + */ + #[JsonProperty('inverse')] + public ?bool $inverse; + + /** + * @var ( + * LoadBalancerMatcherStringArgCreateIgnoreCase + * |LoadBalancerMatcherStringArgCreateOne + * ) $matchCookie + */ + #[JsonProperty('match_cookie'), Union(LoadBalancerMatcherStringArgCreateIgnoreCase::class, LoadBalancerMatcherStringArgCreateOne::class)] + public LoadBalancerMatcherStringArgCreateIgnoreCase|LoadBalancerMatcherStringArgCreateOne $matchCookie; + + /** + * @param array{ + * type: value-of, + * matchCookie: ( + * LoadBalancerMatcherStringArgCreateIgnoreCase + * |LoadBalancerMatcherStringArgCreateOne + * ), + * inverse?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->inverse = $values['inverse'] ?? null; + $this->matchCookie = $values['matchCookie']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchCookieType.php b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchCookieType.php new file mode 100644 index 00000000..2a60ee03 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchCookieType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?bool $inverse Inverse rule + */ + #[JsonProperty('inverse')] + public ?bool $inverse; + + /** + * @var ( + * LoadBalancerMatcherStringArgCreateIgnoreCase + * |LoadBalancerMatcherStringArgCreateOne + * ) $matchHeader + */ + #[JsonProperty('match_header'), Union(LoadBalancerMatcherStringArgCreateIgnoreCase::class, LoadBalancerMatcherStringArgCreateOne::class)] + public LoadBalancerMatcherStringArgCreateIgnoreCase|LoadBalancerMatcherStringArgCreateOne $matchHeader; + + /** + * @param array{ + * type: value-of, + * matchHeader: ( + * LoadBalancerMatcherStringArgCreateIgnoreCase + * |LoadBalancerMatcherStringArgCreateOne + * ), + * inverse?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->inverse = $values['inverse'] ?? null; + $this->matchHeader = $values['matchHeader']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchHeaderType.php b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchHeaderType.php new file mode 100644 index 00000000..0069220a --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchHeaderType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?bool $inverse Inverse rule + */ + #[JsonProperty('inverse')] + public ?bool $inverse; + + /** + * @var LoadBalancerMatcherHostCreate $matchHost + */ + #[JsonProperty('match_host')] + public LoadBalancerMatcherHostCreate $matchHost; + + /** + * @param array{ + * type: value-of, + * matchHost: LoadBalancerMatcherHostCreate, + * inverse?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->inverse = $values['inverse'] ?? null; + $this->matchHost = $values['matchHost']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchHostType.php b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchHostType.php new file mode 100644 index 00000000..b9c8fff1 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchHostType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?bool $inverse Inverse rule + */ + #[JsonProperty('inverse')] + public ?bool $inverse; + + /** + * @var LoadBalancerMatcherHttpMethodCreate $matchHttpMethod + */ + #[JsonProperty('match_http_method')] + public LoadBalancerMatcherHttpMethodCreate $matchHttpMethod; + + /** + * @param array{ + * type: value-of, + * matchHttpMethod: LoadBalancerMatcherHttpMethodCreate, + * inverse?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->inverse = $values['inverse'] ?? null; + $this->matchHttpMethod = $values['matchHttpMethod']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchHttpMethodType.php b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchHttpMethodType.php new file mode 100644 index 00000000..91201637 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchHttpMethodType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?bool $inverse Inverse rule + */ + #[JsonProperty('inverse')] + public ?bool $inverse; + + /** + * @var LoadBalancerMatcherBackendCreateRangeEnd $matchNumMembersUp + */ + #[JsonProperty('match_num_members_up')] + public LoadBalancerMatcherBackendCreateRangeEnd $matchNumMembersUp; + + /** + * @param array{ + * type: value-of, + * matchNumMembersUp: LoadBalancerMatcherBackendCreateRangeEnd, + * inverse?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->inverse = $values['inverse'] ?? null; + $this->matchNumMembersUp = $values['matchNumMembersUp']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchNumMembersUpType.php b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchNumMembersUpType.php new file mode 100644 index 00000000..e33b8e5b --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchNumMembersUpType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?bool $inverse Inverse rule + */ + #[JsonProperty('inverse')] + public ?bool $inverse; + + /** + * @var ( + * LoadBalancerMatcherStringCreateIgnoreCase + * |LoadBalancerMatcherStringCreateOne + * ) $matchPath + */ + #[JsonProperty('match_path'), Union(LoadBalancerMatcherStringCreateIgnoreCase::class, LoadBalancerMatcherStringCreateOne::class)] + public LoadBalancerMatcherStringCreateIgnoreCase|LoadBalancerMatcherStringCreateOne $matchPath; + + /** + * @param array{ + * type: value-of, + * matchPath: ( + * LoadBalancerMatcherStringCreateIgnoreCase + * |LoadBalancerMatcherStringCreateOne + * ), + * inverse?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->inverse = $values['inverse'] ?? null; + $this->matchPath = $values['matchPath']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchPathType.php b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchPathType.php new file mode 100644 index 00000000..2bbd379c --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchPathType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?bool $inverse Inverse rule + */ + #[JsonProperty('inverse')] + public ?bool $inverse; + + /** + * @var ( + * LoadBalancerMatcherStringArgCreateIgnoreCase + * |LoadBalancerMatcherStringArgCreateOne + * ) $matchRequestHeader + */ + #[JsonProperty('match_request_header'), Union(LoadBalancerMatcherStringArgCreateIgnoreCase::class, LoadBalancerMatcherStringArgCreateOne::class)] + public LoadBalancerMatcherStringArgCreateIgnoreCase|LoadBalancerMatcherStringArgCreateOne $matchRequestHeader; + + /** + * @param array{ + * type: value-of, + * matchRequestHeader: ( + * LoadBalancerMatcherStringArgCreateIgnoreCase + * |LoadBalancerMatcherStringArgCreateOne + * ), + * inverse?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->inverse = $values['inverse'] ?? null; + $this->matchRequestHeader = $values['matchRequestHeader']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchRequestHeaderType.php b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchRequestHeaderType.php new file mode 100644 index 00000000..11cc6969 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchRequestHeaderType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?bool $inverse Inverse rule + */ + #[JsonProperty('inverse')] + public ?bool $inverse; + + /** + * @var ( + * LoadBalancerMatcherStringArgCreateIgnoreCase + * |LoadBalancerMatcherStringArgCreateOne + * ) $matchResponseHeader + */ + #[JsonProperty('match_response_header'), Union(LoadBalancerMatcherStringArgCreateIgnoreCase::class, LoadBalancerMatcherStringArgCreateOne::class)] + public LoadBalancerMatcherStringArgCreateIgnoreCase|LoadBalancerMatcherStringArgCreateOne $matchResponseHeader; + + /** + * @param array{ + * type: value-of, + * matchResponseHeader: ( + * LoadBalancerMatcherStringArgCreateIgnoreCase + * |LoadBalancerMatcherStringArgCreateOne + * ), + * inverse?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->inverse = $values['inverse'] ?? null; + $this->matchResponseHeader = $values['matchResponseHeader']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchResponseHeaderType.php b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchResponseHeaderType.php new file mode 100644 index 00000000..df4aa198 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchResponseHeaderType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?bool $inverse Inverse rule + */ + #[JsonProperty('inverse')] + public ?bool $inverse; + + /** + * @var LoadBalancerMatcherIpCreate $matchSrcIp + */ + #[JsonProperty('match_src_ip')] + public LoadBalancerMatcherIpCreate $matchSrcIp; + + /** + * @param array{ + * type: value-of, + * matchSrcIp: LoadBalancerMatcherIpCreate, + * inverse?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->inverse = $values['inverse'] ?? null; + $this->matchSrcIp = $values['matchSrcIp']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchSrcIpType.php b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchSrcIpType.php new file mode 100644 index 00000000..0e713477 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchSrcIpType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?bool $inverse Inverse rule + */ + #[JsonProperty('inverse')] + public ?bool $inverse; + + /** + * @var LoadBalancerMatcherIntCreateRangeEnd $matchSrcPort + */ + #[JsonProperty('match_src_port')] + public LoadBalancerMatcherIntCreateRangeEnd $matchSrcPort; + + /** + * @param array{ + * type: value-of, + * matchSrcPort: LoadBalancerMatcherIntCreateRangeEnd, + * inverse?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->inverse = $values['inverse'] ?? null; + $this->matchSrcPort = $values['matchSrcPort']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchSrcPortType.php b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchSrcPortType.php new file mode 100644 index 00000000..245a9442 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchSrcPortType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?bool $inverse Inverse rule + */ + #[JsonProperty('inverse')] + public ?bool $inverse; + + /** + * @var ( + * LoadBalancerMatcherStringCreateIgnoreCase + * |LoadBalancerMatcherStringCreateOne + * ) $matchUrl + */ + #[JsonProperty('match_url'), Union(LoadBalancerMatcherStringCreateIgnoreCase::class, LoadBalancerMatcherStringCreateOne::class)] + public LoadBalancerMatcherStringCreateIgnoreCase|LoadBalancerMatcherStringCreateOne $matchUrl; + + /** + * @param array{ + * type: value-of, + * matchUrl: ( + * LoadBalancerMatcherStringCreateIgnoreCase + * |LoadBalancerMatcherStringCreateOne + * ), + * inverse?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->inverse = $values['inverse'] ?? null; + $this->matchUrl = $values['matchUrl']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchUrlParam.php b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchUrlParam.php new file mode 100644 index 00000000..3b0d4c66 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchUrlParam.php @@ -0,0 +1,57 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?bool $inverse Inverse rule + */ + #[JsonProperty('inverse')] + public ?bool $inverse; + + /** + * @var ( + * LoadBalancerMatcherStringArgCreateIgnoreCase + * |LoadBalancerMatcherStringArgCreateOne + * ) $matchUrlParam + */ + #[JsonProperty('match_url_param'), Union(LoadBalancerMatcherStringArgCreateIgnoreCase::class, LoadBalancerMatcherStringArgCreateOne::class)] + public LoadBalancerMatcherStringArgCreateIgnoreCase|LoadBalancerMatcherStringArgCreateOne $matchUrlParam; + + /** + * @param array{ + * type: value-of, + * matchUrlParam: ( + * LoadBalancerMatcherStringArgCreateIgnoreCase + * |LoadBalancerMatcherStringArgCreateOne + * ), + * inverse?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->inverse = $values['inverse'] ?? null; + $this->matchUrlParam = $values['matchUrlParam']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchUrlParamType.php b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchUrlParamType.php new file mode 100644 index 00000000..0cabfe13 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchUrlParamType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?bool $inverse Inverse rule + */ + #[JsonProperty('inverse')] + public ?bool $inverse; + + /** + * @var ( + * LoadBalancerMatcherStringCreateIgnoreCase + * |LoadBalancerMatcherStringCreateOne + * ) $matchUrlQuery + */ + #[JsonProperty('match_url_query'), Union(LoadBalancerMatcherStringCreateIgnoreCase::class, LoadBalancerMatcherStringCreateOne::class)] + public LoadBalancerMatcherStringCreateIgnoreCase|LoadBalancerMatcherStringCreateOne $matchUrlQuery; + + /** + * @param array{ + * type: value-of, + * matchUrlQuery: ( + * LoadBalancerMatcherStringCreateIgnoreCase + * |LoadBalancerMatcherStringCreateOne + * ), + * inverse?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->inverse = $values['inverse'] ?? null; + $this->matchUrlQuery = $values['matchUrlQuery']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchUrlQueryType.php b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchUrlQueryType.php new file mode 100644 index 00000000..94ce0535 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherCreateMatchUrlQueryType.php @@ -0,0 +1,8 @@ +value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherHttpMethodCreate.php b/fern/sdk/src/Types/LoadBalancerMatcherHttpMethodCreate.php new file mode 100644 index 00000000..af4c9164 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherHttpMethodCreate.php @@ -0,0 +1,37 @@ + $value + */ + #[JsonProperty('value')] + public string $value; + + /** + * @param array{ + * value: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherIntCreateRangeEnd.php b/fern/sdk/src/Types/LoadBalancerMatcherIntCreateRangeEnd.php new file mode 100644 index 00000000..334bf05e --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherIntCreateRangeEnd.php @@ -0,0 +1,26 @@ +toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherIpCreate.php b/fern/sdk/src/Types/LoadBalancerMatcherIpCreate.php new file mode 100644 index 00000000..188c18e8 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherIpCreate.php @@ -0,0 +1,37 @@ +value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherResponse.php b/fern/sdk/src/Types/LoadBalancerMatcherResponse.php new file mode 100644 index 00000000..e6d5237d --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherResponse.php @@ -0,0 +1,165 @@ + $type Type of matcher defining which aspect of the request or response to evaluate. + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var bool $inverse Indicates whether to invert the match result (true) or use it as-is (false). + */ + #[JsonProperty('inverse')] + public bool $inverse; + + /** + * @var ?LoadBalancerMatchIpResponse $matchSrcIp + */ + #[JsonProperty('match_src_ip')] + public ?LoadBalancerMatchIpResponse $matchSrcIp; + + /** + * @var ?LoadBalancerMatchIntResponse $matchSrcPort + */ + #[JsonProperty('match_src_port')] + public ?LoadBalancerMatchIntResponse $matchSrcPort; + + /** + * @var ?LoadBalancerMatchIntResponse $matchBodySize + */ + #[JsonProperty('match_body_size')] + public ?LoadBalancerMatchIntResponse $matchBodySize; + + /** + * @var ?LoadBalancerMatchStringWithArgResponse $matchCookie + */ + #[JsonProperty('match_cookie')] + public ?LoadBalancerMatchStringWithArgResponse $matchCookie; + + /** + * @var ?LoadBalancerMatchStringWithArgResponse $matchHeader + */ + #[JsonProperty('match_header')] + public ?LoadBalancerMatchStringWithArgResponse $matchHeader; + + /** + * @var ?LoadBalancerMatchStringWithArgResponse $matchUrlParam + */ + #[JsonProperty('match_url_param')] + public ?LoadBalancerMatchStringWithArgResponse $matchUrlParam; + + /** + * @var ?LoadBalancerMatchStringWithArgResponse $matchRequestHeader + */ + #[JsonProperty('match_request_header')] + public ?LoadBalancerMatchStringWithArgResponse $matchRequestHeader; + + /** + * @var ?LoadBalancerMatchStringWithArgResponse $matchResponseHeader + */ + #[JsonProperty('match_response_header')] + public ?LoadBalancerMatchStringWithArgResponse $matchResponseHeader; + + /** + * @var ?LoadBalancerMatchIntResponse $matchHttpStatus + */ + #[JsonProperty('match_http_status')] + public ?LoadBalancerMatchIntResponse $matchHttpStatus; + + /** + * @var ?LoadBalancerMatchStringResponse $matchHttpMethod + */ + #[JsonProperty('match_http_method')] + public ?LoadBalancerMatchStringResponse $matchHttpMethod; + + /** + * @var ?LoadBalancerMatchStringResponse $matchPath + */ + #[JsonProperty('match_path')] + public ?LoadBalancerMatchStringResponse $matchPath; + + /** + * @var ?LoadBalancerMatchStringResponse $matchUrl + */ + #[JsonProperty('match_url')] + public ?LoadBalancerMatchStringResponse $matchUrl; + + /** + * @var ?LoadBalancerMatchStringResponse $matchHost + */ + #[JsonProperty('match_host')] + public ?LoadBalancerMatchStringResponse $matchHost; + + /** + * @var ?LoadBalancerMatchStringResponse $matchUrlQuery + */ + #[JsonProperty('match_url_query')] + public ?LoadBalancerMatchStringResponse $matchUrlQuery; + + /** + * @var ?LoadBalancerMatchBackendResponse $matchNumMembersUp + */ + #[JsonProperty('match_num_members_up')] + public ?LoadBalancerMatchBackendResponse $matchNumMembersUp; + + /** + * @param array{ + * type: value-of, + * inverse: bool, + * matchSrcIp?: ?LoadBalancerMatchIpResponse, + * matchSrcPort?: ?LoadBalancerMatchIntResponse, + * matchBodySize?: ?LoadBalancerMatchIntResponse, + * matchCookie?: ?LoadBalancerMatchStringWithArgResponse, + * matchHeader?: ?LoadBalancerMatchStringWithArgResponse, + * matchUrlParam?: ?LoadBalancerMatchStringWithArgResponse, + * matchRequestHeader?: ?LoadBalancerMatchStringWithArgResponse, + * matchResponseHeader?: ?LoadBalancerMatchStringWithArgResponse, + * matchHttpStatus?: ?LoadBalancerMatchIntResponse, + * matchHttpMethod?: ?LoadBalancerMatchStringResponse, + * matchPath?: ?LoadBalancerMatchStringResponse, + * matchUrl?: ?LoadBalancerMatchStringResponse, + * matchHost?: ?LoadBalancerMatchStringResponse, + * matchUrlQuery?: ?LoadBalancerMatchStringResponse, + * matchNumMembersUp?: ?LoadBalancerMatchBackendResponse, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->inverse = $values['inverse']; + $this->matchSrcIp = $values['matchSrcIp'] ?? null; + $this->matchSrcPort = $values['matchSrcPort'] ?? null; + $this->matchBodySize = $values['matchBodySize'] ?? null; + $this->matchCookie = $values['matchCookie'] ?? null; + $this->matchHeader = $values['matchHeader'] ?? null; + $this->matchUrlParam = $values['matchUrlParam'] ?? null; + $this->matchRequestHeader = $values['matchRequestHeader'] ?? null; + $this->matchResponseHeader = $values['matchResponseHeader'] ?? null; + $this->matchHttpStatus = $values['matchHttpStatus'] ?? null; + $this->matchHttpMethod = $values['matchHttpMethod'] ?? null; + $this->matchPath = $values['matchPath'] ?? null; + $this->matchUrl = $values['matchUrl'] ?? null; + $this->matchHost = $values['matchHost'] ?? null; + $this->matchUrlQuery = $values['matchUrlQuery'] ?? null; + $this->matchNumMembersUp = $values['matchNumMembersUp'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherResponseType.php b/fern/sdk/src/Types/LoadBalancerMatcherResponseType.php new file mode 100644 index 00000000..09e63d08 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherResponseType.php @@ -0,0 +1,22 @@ + $method + */ + #[JsonProperty('method')] + public string $method; + + /** + * @var string $name Name of the parameter + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var string $value Value + */ + #[JsonProperty('value')] + public string $value; + + /** + * @var ?bool $ignoreCase Ignore case + */ + #[JsonProperty('ignore_case')] + public ?bool $ignoreCase; + + /** + * @param array{ + * method: value-of, + * name: string, + * value: string, + * ignoreCase?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->method = $values['method']; + $this->name = $values['name']; + $this->value = $values['value']; + $this->ignoreCase = $values['ignoreCase'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherStringArgCreateOne.php b/fern/sdk/src/Types/LoadBalancerMatcherStringArgCreateOne.php new file mode 100644 index 00000000..bb70b180 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherStringArgCreateOne.php @@ -0,0 +1,42 @@ + $method + */ + #[JsonProperty('method')] + public string $method; + + /** + * @var string $name Name of the parameter + */ + #[JsonProperty('name')] + public string $name; + + /** + * @param array{ + * method: value-of, + * name: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->method = $values['method']; + $this->name = $values['name']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherStringCreateIgnoreCase.php b/fern/sdk/src/Types/LoadBalancerMatcherStringCreateIgnoreCase.php new file mode 100644 index 00000000..cc128677 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherStringCreateIgnoreCase.php @@ -0,0 +1,50 @@ + $method + */ + #[JsonProperty('method')] + public string $method; + + /** + * @var string $value Value + */ + #[JsonProperty('value')] + public string $value; + + /** + * @var ?bool $ignoreCase Ignore case + */ + #[JsonProperty('ignore_case')] + public ?bool $ignoreCase; + + /** + * @param array{ + * method: value-of, + * value: string, + * ignoreCase?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->method = $values['method']; + $this->value = $values['value']; + $this->ignoreCase = $values['ignoreCase'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatcherStringCreateOne.php b/fern/sdk/src/Types/LoadBalancerMatcherStringCreateOne.php new file mode 100644 index 00000000..e4a257f6 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatcherStringCreateOne.php @@ -0,0 +1,34 @@ + $method + */ + #[JsonProperty('method')] + public string $method; + + /** + * @param array{ + * method: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->method = $values['method']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMatchingCondition.php b/fern/sdk/src/Types/LoadBalancerMatchingCondition.php new file mode 100644 index 00000000..69551116 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMatchingCondition.php @@ -0,0 +1,9 @@ + $type Type of backend configuration. Allowed values are 'static' and 'dynamic'. + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var bool $enabled Indicates whether the backend member is actively participating in load balancing. + */ + #[JsonProperty('enabled')] + public bool $enabled; + + /** + * @var bool $backup Indicates whether this member serves as a backup, only receiving traffic when all primary members are unavailable. + */ + #[JsonProperty('backup')] + public bool $backup; + + /** + * @var DateTime $createdAt Timestamp when the backend member was created (RFC 3339 format). + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; + + /** + * @var DateTime $updatedAt Timestamp when the backend member was last updated (RFC 3339 format). + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; + + /** + * @param array{ + * name: string, + * ip: string, + * port: int, + * weight: int, + * maxSessions: int, + * type: value-of, + * enabled: bool, + * backup: bool, + * createdAt: DateTime, + * updatedAt: DateTime, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->ip = $values['ip']; + $this->port = $values['port']; + $this->weight = $values['weight']; + $this->maxSessions = $values['maxSessions']; + $this->type = $values['type']; + $this->enabled = $values['enabled']; + $this->backup = $values['backup']; + $this->createdAt = $values['createdAt']; + $this->updatedAt = $values['updatedAt']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMemberCreateOne.php b/fern/sdk/src/Types/LoadBalancerMemberCreateOne.php new file mode 100644 index 00000000..5e6d4a5b --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMemberCreateOne.php @@ -0,0 +1,50 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?string $ip Fallback IP address (IPv4 or IPv6) + */ + #[JsonProperty('ip')] + public ?string $ip; + + /** + * @var ?int $port Target Port + */ + #[JsonProperty('port')] + public ?int $port; + + /** + * @param array{ + * type: value-of, + * ip?: ?string, + * port?: ?int, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->ip = $values['ip'] ?? null; + $this->port = $values['port'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMemberCreateOneType.php b/fern/sdk/src/Types/LoadBalancerMemberCreateOneType.php new file mode 100644 index 00000000..589c6342 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMemberCreateOneType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var string $ip Target IP address (IPv4 or IPv6) + */ + #[JsonProperty('ip')] + public string $ip; + + /** + * @var int $port Target Port + */ + #[JsonProperty('port')] + public int $port; + + /** + * @param array{ + * type: value-of, + * ip: string, + * port: int, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->ip = $values['ip']; + $this->port = $values['port']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMemberCreateZeroType.php b/fern/sdk/src/Types/LoadBalancerMemberCreateZeroType.php new file mode 100644 index 00000000..27ba6964 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMemberCreateZeroType.php @@ -0,0 +1,8 @@ + $status Current operational status of the member. + */ + #[JsonProperty('status')] + public string $status; + + /** + * @var value-of $checkStatus Result of the latest health check for the member. + */ + #[JsonProperty('check_status')] + public string $checkStatus; + + /** + * @var int $checkHttpCode HTTP status code returned by the last health check (if applicable). + */ + #[JsonProperty('check_http_code')] + public int $checkHttpCode; + + /** + * @var ?string $lastCheckContent Response content returned by the last health check. + */ + #[JsonProperty('last_check_content')] + public ?string $lastCheckContent; + + /** + * @var ?string $lastCheckDesc Description or additional diagnostic information from the last health check. + */ + #[JsonProperty('last_check_desc')] + public ?string $lastCheckDesc; + + /** + * @var int $totalFailedChecks Total number of failed health checks recorded for this member. + */ + #[JsonProperty('total_failed_checks')] + public int $totalFailedChecks; + + /** + * @var DateTime $createdAt Timestamp of when the member was created. + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; + + /** + * @var DateTime $updatedAt Timestamp of when the member metrics were last updated. + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; + + /** + * @param array{ + * totalRequestBytes: int, + * totalResponseBytes: int, + * totalDeniedResponses: int, + * totalHttpResponses1Xx: int, + * totalHttpResponses2Xx: int, + * totalHttpResponses3Xx: int, + * totalHttpResponses4Xx: int, + * totalHttpResponses5Xx: int, + * totalHttpResponsesOther: int, + * totalSessions: int, + * sessionRate: int, + * currentSessions: int, + * totalFailedChecksTransitions: int, + * totalClientAborted: int, + * totalFailedConnections: int, + * totalInvalidResponses: int, + * totalRoutedRequests: int, + * totalServerAborted: int, + * totalServerRedispatches: int, + * totalServerConnectionRetries: int, + * connectionsWaiting: int, + * avgConnectionTimeMs: int, + * avgQueueTimeMs: int, + * avgServerResponseTimeMs: int, + * avgTotalTimeMs: int, + * memberId: int, + * name: string, + * backendId: int, + * status: value-of, + * checkStatus: value-of, + * checkHttpCode: int, + * totalFailedChecks: int, + * createdAt: DateTime, + * updatedAt: DateTime, + * lastCheckContent?: ?string, + * lastCheckDesc?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->totalRequestBytes = $values['totalRequestBytes']; + $this->totalResponseBytes = $values['totalResponseBytes']; + $this->totalDeniedResponses = $values['totalDeniedResponses']; + $this->totalHttpResponses1Xx = $values['totalHttpResponses1Xx']; + $this->totalHttpResponses2Xx = $values['totalHttpResponses2Xx']; + $this->totalHttpResponses3Xx = $values['totalHttpResponses3Xx']; + $this->totalHttpResponses4Xx = $values['totalHttpResponses4Xx']; + $this->totalHttpResponses5Xx = $values['totalHttpResponses5Xx']; + $this->totalHttpResponsesOther = $values['totalHttpResponsesOther']; + $this->totalSessions = $values['totalSessions']; + $this->sessionRate = $values['sessionRate']; + $this->currentSessions = $values['currentSessions']; + $this->totalFailedChecksTransitions = $values['totalFailedChecksTransitions']; + $this->totalClientAborted = $values['totalClientAborted']; + $this->totalFailedConnections = $values['totalFailedConnections']; + $this->totalInvalidResponses = $values['totalInvalidResponses']; + $this->totalRoutedRequests = $values['totalRoutedRequests']; + $this->totalServerAborted = $values['totalServerAborted']; + $this->totalServerRedispatches = $values['totalServerRedispatches']; + $this->totalServerConnectionRetries = $values['totalServerConnectionRetries']; + $this->connectionsWaiting = $values['connectionsWaiting']; + $this->avgConnectionTimeMs = $values['avgConnectionTimeMs']; + $this->avgQueueTimeMs = $values['avgQueueTimeMs']; + $this->avgServerResponseTimeMs = $values['avgServerResponseTimeMs']; + $this->avgTotalTimeMs = $values['avgTotalTimeMs']; + $this->memberId = $values['memberId']; + $this->name = $values['name']; + $this->backendId = $values['backendId']; + $this->status = $values['status']; + $this->checkStatus = $values['checkStatus']; + $this->checkHttpCode = $values['checkHttpCode']; + $this->lastCheckContent = $values['lastCheckContent'] ?? null; + $this->lastCheckDesc = $values['lastCheckDesc'] ?? null; + $this->totalFailedChecks = $values['totalFailedChecks']; + $this->createdAt = $values['createdAt']; + $this->updatedAt = $values['updatedAt']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMemberMetricsResponseCheckStatus.php b/fern/sdk/src/Types/LoadBalancerMemberMetricsResponseCheckStatus.php new file mode 100644 index 00000000..9e5c1850 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMemberMetricsResponseCheckStatus.php @@ -0,0 +1,11 @@ + $members List of backend member identifiers included in the metrics series. + */ + #[JsonProperty('members'), ArrayType(['string'])] + public array $members; + + /** + * @var ?int $requestBytes Total number of request bytes processed by all members in the series. + */ + #[JsonProperty('request_bytes')] + public ?int $requestBytes; + + /** + * @var ?int $responseBytes Total number of response bytes sent by all members. + */ + #[JsonProperty('response_bytes')] + public ?int $responseBytes; + + /** + * @var ?int $deniedResponses Total number of denied responses returned during the period. + */ + #[JsonProperty('denied_responses')] + public ?int $deniedResponses; + + /** + * @var ?int $httpResponses1Xx Count of HTTP 1xx informational responses. + */ + #[JsonProperty('http_responses_1xx')] + public ?int $httpResponses1Xx; + + /** + * @var ?int $httpResponses2Xx Count of HTTP 2xx successful responses. + */ + #[JsonProperty('http_responses_2xx')] + public ?int $httpResponses2Xx; + + /** + * @var ?int $httpResponses3Xx Count of HTTP 3xx redirection responses. + */ + #[JsonProperty('http_responses_3xx')] + public ?int $httpResponses3Xx; + + /** + * @var ?int $httpResponses4Xx Count of HTTP 4xx client error responses. + */ + #[JsonProperty('http_responses_4xx')] + public ?int $httpResponses4Xx; + + /** + * @var ?int $httpResponses5Xx Count of HTTP 5xx server error responses. + */ + #[JsonProperty('http_responses_5xx')] + public ?int $httpResponses5Xx; + + /** + * @var ?int $httpResponsesOther Count of HTTP responses outside the 1xx–5xx range. + */ + #[JsonProperty('http_responses_other')] + public ?int $httpResponsesOther; + + /** + * @var ?int $sessions Total number of active or completed sessions during the metrics window. + */ + #[JsonProperty('sessions')] + public ?int $sessions; + + /** + * @var ?int $downtime Total downtime duration in seconds. + */ + #[JsonProperty('downtime')] + public ?int $downtime; + + /** + * @var ?int $failedChecksTransitions Number of transitions from healthy to failed health checks detected during the period. + */ + #[JsonProperty('failed_checks_transitions')] + public ?int $failedChecksTransitions; + + /** + * @var ?int $clientAborted Number of connections aborted by the client. + */ + #[JsonProperty('client_aborted')] + public ?int $clientAborted; + + /** + * @var ?int $failedConnections Number of backend connection attempts that failed. + */ + #[JsonProperty('failed_connections')] + public ?int $failedConnections; + + /** + * @var ?int $invalidResponses Number of invalid or malformed responses detected. + */ + #[JsonProperty('invalid_responses')] + public ?int $invalidResponses; + + /** + * @var ?int $routedRequests Total number of requests successfully routed to the backend members. + */ + #[JsonProperty('routed_requests')] + public ?int $routedRequests; + + /** + * @var ?int $serverAborted Number of connections aborted by the backend server. + */ + #[JsonProperty('server_aborted')] + public ?int $serverAborted; + + /** + * @var ?int $serverRedispatches Number of requests redispatched to another backend member after an initial failure. + */ + #[JsonProperty('server_redispatches')] + public ?int $serverRedispatches; + + /** + * @var ?int $serverConnectionRetries Number of backend connection retry attempts. + */ + #[JsonProperty('server_connection_retries')] + public ?int $serverConnectionRetries; + + /** + * @var ?int $failedChecks Total number of failed health checks for all members combined. + */ + #[JsonProperty('failed_checks')] + public ?int $failedChecks; + + /** + * @param array{ + * startAt: DateTime, + * endAt: DateTime, + * members: array, + * requestBytes?: ?int, + * responseBytes?: ?int, + * deniedResponses?: ?int, + * httpResponses1Xx?: ?int, + * httpResponses2Xx?: ?int, + * httpResponses3Xx?: ?int, + * httpResponses4Xx?: ?int, + * httpResponses5Xx?: ?int, + * httpResponsesOther?: ?int, + * sessions?: ?int, + * downtime?: ?int, + * failedChecksTransitions?: ?int, + * clientAborted?: ?int, + * failedConnections?: ?int, + * invalidResponses?: ?int, + * routedRequests?: ?int, + * serverAborted?: ?int, + * serverRedispatches?: ?int, + * serverConnectionRetries?: ?int, + * failedChecks?: ?int, + * } $values + */ + public function __construct( + array $values, + ) { + $this->startAt = $values['startAt']; + $this->endAt = $values['endAt']; + $this->members = $values['members']; + $this->requestBytes = $values['requestBytes'] ?? null; + $this->responseBytes = $values['responseBytes'] ?? null; + $this->deniedResponses = $values['deniedResponses'] ?? null; + $this->httpResponses1Xx = $values['httpResponses1Xx'] ?? null; + $this->httpResponses2Xx = $values['httpResponses2Xx'] ?? null; + $this->httpResponses3Xx = $values['httpResponses3Xx'] ?? null; + $this->httpResponses4Xx = $values['httpResponses4Xx'] ?? null; + $this->httpResponses5Xx = $values['httpResponses5Xx'] ?? null; + $this->httpResponsesOther = $values['httpResponsesOther'] ?? null; + $this->sessions = $values['sessions'] ?? null; + $this->downtime = $values['downtime'] ?? null; + $this->failedChecksTransitions = $values['failedChecksTransitions'] ?? null; + $this->clientAborted = $values['clientAborted'] ?? null; + $this->failedConnections = $values['failedConnections'] ?? null; + $this->invalidResponses = $values['invalidResponses'] ?? null; + $this->routedRequests = $values['routedRequests'] ?? null; + $this->serverAborted = $values['serverAborted'] ?? null; + $this->serverRedispatches = $values['serverRedispatches'] ?? null; + $this->serverConnectionRetries = $values['serverConnectionRetries'] ?? null; + $this->failedChecks = $values['failedChecks'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMemberModifyOne.php b/fern/sdk/src/Types/LoadBalancerMemberModifyOne.php new file mode 100644 index 00000000..aeeec531 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMemberModifyOne.php @@ -0,0 +1,50 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?string $ip Fallback IP address (IPv4 or IPv6) + */ + #[JsonProperty('ip')] + public ?string $ip; + + /** + * @var ?int $port Target Port + */ + #[JsonProperty('port')] + public ?int $port; + + /** + * @param array{ + * type: value-of, + * ip?: ?string, + * port?: ?int, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->ip = $values['ip'] ?? null; + $this->port = $values['port'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMemberModifyOneType.php b/fern/sdk/src/Types/LoadBalancerMemberModifyOneType.php new file mode 100644 index 00000000..fed1e022 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMemberModifyOneType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public ?string $type; + + /** + * @var ?string $ip Target IP address (IPv4 or IPv6) + */ + #[JsonProperty('ip')] + public ?string $ip; + + /** + * @var ?int $port Target Port + */ + #[JsonProperty('port')] + public ?int $port; + + /** + * @param array{ + * type?: ?value-of, + * ip?: ?string, + * port?: ?int, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->type = $values['type'] ?? null; + $this->ip = $values['ip'] ?? null; + $this->port = $values['port'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMemberModifyZeroType.php b/fern/sdk/src/Types/LoadBalancerMemberModifyZeroType.php new file mode 100644 index 00000000..228d3e1c --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMemberModifyZeroType.php @@ -0,0 +1,8 @@ + $frontends List of frontend metrics. + */ + #[JsonProperty('frontends'), ArrayType([LoadBalancerFrontendMetricsResponse::class])] + public array $frontends; + + /** + * @var array $backends List of backend metrics. + */ + #[JsonProperty('backends'), ArrayType([LoadBalancerBackendMetricsResponse::class])] + public array $backends; + + /** + * @param array{ + * frontends: array, + * backends: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->frontends = $values['frontends']; + $this->backends = $values['backends']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerMetricsSortParameter.php b/fern/sdk/src/Types/LoadBalancerMetricsSortParameter.php new file mode 100644 index 00000000..774ecd1e --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerMetricsSortParameter.php @@ -0,0 +1,8 @@ +name = $values['name']; + $this->uuid = $values['uuid']; + $this->type = $values['type']; + $this->family = $values['family']; + $this->dnsName = $values['dnsName'] ?? null; + $this->createdAt = $values['createdAt']; + $this->updatedAt = $values['updatedAt']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerNetworkCreate.php b/fern/sdk/src/Types/LoadBalancerNetworkCreate.php new file mode 100644 index 00000000..7d548d77 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerNetworkCreate.php @@ -0,0 +1,61 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var value-of $family + */ + #[JsonProperty('family')] + public string $family; + + /** + * @param array{ + * name: string, + * type: value-of, + * family: value-of, + * uuid?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->uuid = $values['uuid'] ?? null; + $this->type = $values['type']; + $this->family = $values['family']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerNetworkFamily.php b/fern/sdk/src/Types/LoadBalancerNetworkFamily.php new file mode 100644 index 00000000..6a249418 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerNetworkFamily.php @@ -0,0 +1,9 @@ +name = $values['name'] ?? null; + $this->serverNumber = $values['serverNumber'] ?? null; + $this->perServerMaxSessions = $values['perServerMaxSessions'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerProblemInvalidParamResponse.php b/fern/sdk/src/Types/LoadBalancerProblemInvalidParamResponse.php new file mode 100644 index 00000000..fee97167 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerProblemInvalidParamResponse.php @@ -0,0 +1,45 @@ +name = $values['name']; + $this->reason = $values['reason']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerProblemResponse.php b/fern/sdk/src/Types/LoadBalancerProblemResponse.php new file mode 100644 index 00000000..c5df829f --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerProblemResponse.php @@ -0,0 +1,78 @@ + $invalidParams A list of invalid parameters that caused the problem. Used to provide detailed feedback for validation errors. + */ + #[JsonProperty('invalid_params'), ArrayType([LoadBalancerProblemInvalidParamResponse::class])] + public ?array $invalidParams; + + /** + * @var ?string $correlationId A unique identifier for this error instance, useful for tracing or debugging requests. + */ + #[JsonProperty('correlation_id')] + public ?string $correlationId; + + /** + * @param array{ + * type: string, + * title: string, + * status: int, + * detail?: ?string, + * invalidParams?: ?array, + * correlationId?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->title = $values['title']; + $this->detail = $values['detail'] ?? null; + $this->status = $values['status']; + $this->invalidParams = $values['invalidParams'] ?? null; + $this->correlationId = $values['correlationId'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerProxyProtocolVersionOrDisabled.php b/fern/sdk/src/Types/LoadBalancerProxyProtocolVersionOrDisabled.php new file mode 100644 index 00000000..b6bb280b --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerProxyProtocolVersionOrDisabled.php @@ -0,0 +1,10 @@ +totalHttpRequests = $values['totalHttpRequests']; + $this->totalDeniedRequests = $values['totalDeniedRequests']; + $this->totalInterceptedRequests = $values['totalInterceptedRequests']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerResolver.php b/fern/sdk/src/Types/LoadBalancerResolver.php new file mode 100644 index 00000000..f8afcf3c --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerResolver.php @@ -0,0 +1,104 @@ + $nameservers List of DNS nameserver addresses (with optional port) used to resolve backend member hostnames. + */ + #[JsonProperty('nameservers'), ArrayType(['string'])] + public array $nameservers; + + /** + * @var int $retries Number of retry attempts for failed DNS queries. + */ + #[JsonProperty('retries')] + public int $retries; + + /** + * @var int $timeout Initial timeout in milliseconds for DNS query responses. + */ + #[JsonProperty('timeout')] + public int $timeout; + + /** + * @var int $timeoutRetry Timeout in milliseconds for DNS query retry attempts. + */ + #[JsonProperty('timeout_retry')] + public int $timeoutRetry; + + /** + * @var int $cacheValid Time in seconds to cache valid (successful) DNS responses. + */ + #[JsonProperty('cache_valid')] + public int $cacheValid; + + /** + * @var int $cacheInvalid Time in seconds to cache invalid (failed) DNS responses. + */ + #[JsonProperty('cache_invalid')] + public int $cacheInvalid; + + /** + * @var DateTime $createdAt Timestamp when the DNS resolver was created (RFC 3339 format). + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; + + /** + * @var DateTime $updatedAt Timestamp when the DNS resolver was last updated (RFC 3339 format). + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; + + /** + * @param array{ + * name: string, + * nameservers: array, + * retries: int, + * timeout: int, + * timeoutRetry: int, + * cacheValid: int, + * cacheInvalid: int, + * createdAt: DateTime, + * updatedAt: DateTime, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->nameservers = $values['nameservers']; + $this->retries = $values['retries']; + $this->timeout = $values['timeout']; + $this->timeoutRetry = $values['timeoutRetry']; + $this->cacheValid = $values['cacheValid']; + $this->cacheInvalid = $values['cacheInvalid']; + $this->createdAt = $values['createdAt']; + $this->updatedAt = $values['updatedAt']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerResolverCreate.php b/fern/sdk/src/Types/LoadBalancerResolverCreate.php new file mode 100644 index 00000000..35b5461f --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerResolverCreate.php @@ -0,0 +1,86 @@ + $nameservers Nameservers + */ + #[JsonProperty('nameservers'), ArrayType(['string'])] + public array $nameservers; + + /** + * @var int $retries Number of retries on failure + */ + #[JsonProperty('retries')] + public int $retries; + + /** + * @var int $timeout Timeout for the query in seconds + */ + #[JsonProperty('timeout')] + public int $timeout; + + /** + * @var int $timeoutRetry Timeout for the query retries in seconds + */ + #[JsonProperty('timeout_retry')] + public int $timeoutRetry; + + /** + * @var int $cacheValid Time in seconds to cache valid results + */ + #[JsonProperty('cache_valid')] + public int $cacheValid; + + /** + * @var int $cacheInvalid Time in seconds to cache invalid results + */ + #[JsonProperty('cache_invalid')] + public int $cacheInvalid; + + /** + * @param array{ + * name: string, + * nameservers: array, + * retries: int, + * timeout: int, + * timeoutRetry: int, + * cacheValid: int, + * cacheInvalid: int, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->nameservers = $values['nameservers']; + $this->retries = $values['retries']; + $this->timeout = $values['timeout']; + $this->timeoutRetry = $values['timeoutRetry']; + $this->cacheValid = $values['cacheValid']; + $this->cacheInvalid = $values['cacheInvalid']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerRule.php b/fern/sdk/src/Types/LoadBalancerRule.php new file mode 100644 index 00000000..5064eff7 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerRule.php @@ -0,0 +1,88 @@ + $matchingCondition Logical operator determining how multiple matchers are combined (and/or). + */ + #[JsonProperty('matching_condition')] + public string $matchingCondition; + + /** + * @var array $matchers List of conditions that incoming requests must satisfy for this rule to apply. + */ + #[JsonProperty('matchers'), ArrayType([LoadBalancerMatcherResponse::class])] + public array $matchers; + + /** + * @var array $actions List of actions to execute when the rule matches an incoming request. + */ + #[JsonProperty('actions'), ArrayType([LoadBalancerActionResponse::class])] + public array $actions; + + /** + * @var DateTime $createdAt Timestamp when the rule was created (RFC 3339 format). + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; + + /** + * @var DateTime $updatedAt Timestamp when the rule was last updated (RFC 3339 format). + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; + + /** + * @param array{ + * name: string, + * priority: int, + * matchingCondition: value-of, + * matchers: array, + * actions: array, + * createdAt: DateTime, + * updatedAt: DateTime, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->priority = $values['priority']; + $this->matchingCondition = $values['matchingCondition']; + $this->matchers = $values['matchers']; + $this->actions = $values['actions']; + $this->createdAt = $values['createdAt']; + $this->updatedAt = $values['updatedAt']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerRuleCreate.php b/fern/sdk/src/Types/LoadBalancerRuleCreate.php new file mode 100644 index 00000000..eed81035 --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerRuleCreate.php @@ -0,0 +1,123 @@ + $matchingCondition + */ + #[JsonProperty('matching_condition')] + public ?string $matchingCondition; + + /** + * @var ?array<( + * LoadBalancerMatcherCreateMatchSrcIp + * |LoadBalancerMatcherCreateMatchSrcPort + * |LoadBalancerMatcherCreateMatchBodySize + * |LoadBalancerMatcherCreateMatchCookie + * |LoadBalancerMatcherCreateMatchHeader + * |LoadBalancerMatcherCreateMatchUrlParam + * |LoadBalancerMatcherCreateMatchHttpMethod + * |LoadBalancerMatcherCreateMatchPath + * |LoadBalancerMatcherCreateMatchUrl + * |LoadBalancerMatcherCreateMatchHost + * |LoadBalancerMatcherCreateMatchUrlQuery + * |LoadBalancerMatcherCreateMatchNumMembersUp + * |LoadBalancerMatcherCreateMatchRequestHeader + * |LoadBalancerMatcherCreateMatchResponseHeader + * |LoadBalancerMatcherCreateInverse + * )> $matchers Rule matchers + */ + #[JsonProperty('matchers'), ArrayType([new Union(LoadBalancerMatcherCreateMatchSrcIp::class, LoadBalancerMatcherCreateMatchSrcPort::class, LoadBalancerMatcherCreateMatchBodySize::class, LoadBalancerMatcherCreateMatchCookie::class, LoadBalancerMatcherCreateMatchHeader::class, LoadBalancerMatcherCreateMatchUrlParam::class, LoadBalancerMatcherCreateMatchHttpMethod::class, LoadBalancerMatcherCreateMatchPath::class, LoadBalancerMatcherCreateMatchUrl::class, LoadBalancerMatcherCreateMatchHost::class, LoadBalancerMatcherCreateMatchUrlQuery::class, LoadBalancerMatcherCreateMatchNumMembersUp::class, LoadBalancerMatcherCreateMatchRequestHeader::class, LoadBalancerMatcherCreateMatchResponseHeader::class, LoadBalancerMatcherCreateInverse::class)])] + public ?array $matchers; + + /** + * @var array<( + * LoadBalancerActionCreateActionUseBackend + * |LoadBalancerActionCreateActionHttpReturn + * |LoadBalancerActionCreateActionHttpRedirect + * |LoadBalancerActionCreateActionTcpReject + * |LoadBalancerActionCreateActionSetForwardedHeaders + * |LoadBalancerActionCreateActionSetRequestHeader + * |LoadBalancerActionCreateActionSetResponseHeader + * |LoadBalancerActionCreateActionHttpRewritePath + * |LoadBalancerActionCreateActionHttpRewriteUri + * )> $actions Rule actions + */ + #[JsonProperty('actions'), ArrayType([new Union(LoadBalancerActionCreateActionUseBackend::class, LoadBalancerActionCreateActionHttpReturn::class, LoadBalancerActionCreateActionHttpRedirect::class, LoadBalancerActionCreateActionTcpReject::class, LoadBalancerActionCreateActionSetForwardedHeaders::class, LoadBalancerActionCreateActionSetRequestHeader::class, LoadBalancerActionCreateActionSetResponseHeader::class, LoadBalancerActionCreateActionHttpRewritePath::class, LoadBalancerActionCreateActionHttpRewriteUri::class)])] + public array $actions; + + /** + * @param array{ + * name: string, + * priority: int, + * actions: array<( + * LoadBalancerActionCreateActionUseBackend + * |LoadBalancerActionCreateActionHttpReturn + * |LoadBalancerActionCreateActionHttpRedirect + * |LoadBalancerActionCreateActionTcpReject + * |LoadBalancerActionCreateActionSetForwardedHeaders + * |LoadBalancerActionCreateActionSetRequestHeader + * |LoadBalancerActionCreateActionSetResponseHeader + * |LoadBalancerActionCreateActionHttpRewritePath + * |LoadBalancerActionCreateActionHttpRewriteUri + * )>, + * matchingCondition?: ?value-of, + * matchers?: ?array<( + * LoadBalancerMatcherCreateMatchSrcIp + * |LoadBalancerMatcherCreateMatchSrcPort + * |LoadBalancerMatcherCreateMatchBodySize + * |LoadBalancerMatcherCreateMatchCookie + * |LoadBalancerMatcherCreateMatchHeader + * |LoadBalancerMatcherCreateMatchUrlParam + * |LoadBalancerMatcherCreateMatchHttpMethod + * |LoadBalancerMatcherCreateMatchPath + * |LoadBalancerMatcherCreateMatchUrl + * |LoadBalancerMatcherCreateMatchHost + * |LoadBalancerMatcherCreateMatchUrlQuery + * |LoadBalancerMatcherCreateMatchNumMembersUp + * |LoadBalancerMatcherCreateMatchRequestHeader + * |LoadBalancerMatcherCreateMatchResponseHeader + * |LoadBalancerMatcherCreateInverse + * )>, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->priority = $values['priority']; + $this->matchingCondition = $values['matchingCondition'] ?? null; + $this->matchers = $values['matchers'] ?? null; + $this->actions = $values['actions']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerRuleMatcherIntMethod.php b/fern/sdk/src/Types/LoadBalancerRuleMatcherIntMethod.php new file mode 100644 index 00000000..0fa5924d --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerRuleMatcherIntMethod.php @@ -0,0 +1,13 @@ +totalFailedChecksTransitions = $values['totalFailedChecksTransitions']; + $this->totalClientAborted = $values['totalClientAborted']; + $this->totalFailedConnections = $values['totalFailedConnections']; + $this->totalInvalidResponses = $values['totalInvalidResponses']; + $this->totalRoutedRequests = $values['totalRoutedRequests']; + $this->totalServerAborted = $values['totalServerAborted']; + $this->totalServerRedispatches = $values['totalServerRedispatches']; + $this->totalServerConnectionRetries = $values['totalServerConnectionRetries']; + $this->connectionsWaiting = $values['connectionsWaiting']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerService.php b/fern/sdk/src/Types/LoadBalancerService.php new file mode 100644 index 00000000..49b4219f --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerService.php @@ -0,0 +1,176 @@ + $operationalState Current operational state of the service, describing its runtime behavior and availability. + */ + #[JsonProperty('operational_state')] + public ?string $operationalState; + + /** + * @var ?array $frontends List of frontend configurations associated with the service. + */ + #[JsonProperty('frontends'), ArrayType([LoadBalancerFrontend::class])] + public ?array $frontends; + + /** + * @var ?array $backends List of backend configurations linked to this service. + */ + #[JsonProperty('backends'), ArrayType([LoadBalancerBackend::class])] + public ?array $backends; + + /** + * @var ?array $resolvers DNS resolvers available for this service. + */ + #[JsonProperty('resolvers'), ArrayType([LoadBalancerResolver::class])] + public ?array $resolvers; + + /** + * @var ?array $networks Networks attached to this service. + */ + #[JsonProperty('networks'), ArrayType([LoadBalancerNetwork::class])] + public ?array $networks; + + /** + * @var ?array $ipAddresses IP addresses assigned to this service. + */ + #[JsonProperty('ip_addresses'), ArrayType([LoadBalancerIpAddress::class])] + public ?array $ipAddresses; + + /** + * @var ?array $labels Labels associated with the service for metadata tagging and identification. + */ + #[JsonProperty('labels'), ArrayType([LoadBalancerLabelResponse::class])] + public ?array $labels; + + /** + * @var ?value-of $maintenanceDow Day of week scheduled for maintenance operations. + */ + #[JsonProperty('maintenance_dow')] + public ?string $maintenanceDow; + + /** + * @var ?string $maintenanceTime Time of day (in UTC) scheduled for maintenance operations. + */ + #[JsonProperty('maintenance_time')] + public ?string $maintenanceTime; + + /** + * @var DateTime $createdAt Timestamp when the service was created. + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; + + /** + * @var DateTime $updatedAt Timestamp when the service was last updated. + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; + + /** + * @var ?string $networkUuid Deprecated: old field replaced by the networks array. + */ + #[JsonProperty('network_uuid')] + public ?string $networkUuid; + + /** + * @var ?string $dnsName Deprecated: legacy DNS field replaced by service-level IP addressing. + */ + #[JsonProperty('dns_name')] + public ?string $dnsName; + + /** + * @param array{ + * uuid: string, + * name: string, + * zone: string, + * plan: string, + * configuredStatus: string, + * createdAt: DateTime, + * updatedAt: DateTime, + * operationalState?: ?value-of, + * frontends?: ?array, + * backends?: ?array, + * resolvers?: ?array, + * networks?: ?array, + * ipAddresses?: ?array, + * labels?: ?array, + * maintenanceDow?: ?value-of, + * maintenanceTime?: ?string, + * networkUuid?: ?string, + * dnsName?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->uuid = $values['uuid']; + $this->name = $values['name']; + $this->zone = $values['zone']; + $this->plan = $values['plan']; + $this->configuredStatus = $values['configuredStatus']; + $this->operationalState = $values['operationalState'] ?? null; + $this->frontends = $values['frontends'] ?? null; + $this->backends = $values['backends'] ?? null; + $this->resolvers = $values['resolvers'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->ipAddresses = $values['ipAddresses'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->maintenanceDow = $values['maintenanceDow'] ?? null; + $this->maintenanceTime = $values['maintenanceTime'] ?? null; + $this->createdAt = $values['createdAt']; + $this->updatedAt = $values['updatedAt']; + $this->networkUuid = $values['networkUuid'] ?? null; + $this->dnsName = $values['dnsName'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerServiceConfiguredStatus.php b/fern/sdk/src/Types/LoadBalancerServiceConfiguredStatus.php new file mode 100644 index 00000000..b6c487df --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerServiceConfiguredStatus.php @@ -0,0 +1,9 @@ +name = $values['name']; + $this->certificateBundleUuid = $values['certificateBundleUuid']; + $this->createdAt = $values['createdAt']; + $this->updatedAt = $values['updatedAt']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerTlsConfigCreate.php b/fern/sdk/src/Types/LoadBalancerTlsConfigCreate.php new file mode 100644 index 00000000..0d9d7c6a --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerTlsConfigCreate.php @@ -0,0 +1,45 @@ +name = $values['name']; + $this->certificateBundleUuid = $values['certificateBundleUuid']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LoadBalancerTlsConfigModify.php b/fern/sdk/src/Types/LoadBalancerTlsConfigModify.php new file mode 100644 index 00000000..58aaafda --- /dev/null +++ b/fern/sdk/src/Types/LoadBalancerTlsConfigModify.php @@ -0,0 +1,45 @@ +name = $values['name'] ?? null; + $this->certificateBundleUuid = $values['certificateBundleUuid'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/LogicalDatabaseResponse.php b/fern/sdk/src/Types/LogicalDatabaseResponse.php new file mode 100644 index 00000000..e3141693 --- /dev/null +++ b/fern/sdk/src/Types/LogicalDatabaseResponse.php @@ -0,0 +1,53 @@ +name = $values['name'] ?? null; + $this->lcCollate = $values['lcCollate'] ?? null; + $this->lcCtype = $values['lcCtype'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ModifyStorageResponse.php b/fern/sdk/src/Types/ModifyStorageResponse.php new file mode 100644 index 00000000..e012b9b3 --- /dev/null +++ b/fern/sdk/src/Types/ModifyStorageResponse.php @@ -0,0 +1,45 @@ +storage = $values['storage']; + $this->resizeBackup = $values['resizeBackup'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/Network.php b/fern/sdk/src/Types/Network.php new file mode 100644 index 00000000..95e286b0 --- /dev/null +++ b/fern/sdk/src/Types/Network.php @@ -0,0 +1,37 @@ +network = $values['network']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkBooleanYesno.php b/fern/sdk/src/Types/NetworkBooleanYesno.php new file mode 100644 index 00000000..a8e7ddb4 --- /dev/null +++ b/fern/sdk/src/Types/NetworkBooleanYesno.php @@ -0,0 +1,9 @@ + $grtExport + */ + #[JsonProperty('grt_export')] + public ?string $grtExport; + + /** + * @var ?NetworkDetailsIpNetworks $ipNetworks + */ + #[JsonProperty('ip_networks')] + public ?NetworkDetailsIpNetworks $ipNetworks; + + /** + * @var string $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var ?array $networkFeatures + */ + #[JsonProperty('network_features'), ArrayType(['string'])] + public ?array $networkFeatures; + + /** + * @var ?string $parentNetwork + */ + #[JsonProperty('parent_network')] + public ?string $parentNetwork; + + /** + * @var ?NetworkDetailsPeerings $peerings List of network peerings the network is part of + */ + #[JsonProperty('peerings')] + public ?NetworkDetailsPeerings $peerings; + + /** + * @var ?string $router + */ + #[JsonProperty('router')] + public ?string $router; + + /** + * @var ?NetworkDetailsServers $servers + */ + #[JsonProperty('servers')] + public ?NetworkDetailsServers $servers; + + /** + * @var ?NetworkDetailsServices $services List of services this network is joined to + */ + #[JsonProperty('services')] + public ?NetworkDetailsServices $services; + + /** + * @var ?array $tags + */ + #[JsonProperty('tags'), ArrayType(['string'])] + public ?array $tags; + + /** + * @var ?value-of $type + */ + #[JsonProperty('type')] + public ?string $type; + + /** + * @var ?string $uuid + */ + #[JsonProperty('uuid')] + public ?string $uuid; + + /** + * @var string $zone + */ + #[JsonProperty('zone')] + public string $zone; + + /** + * @param array{ + * name: string, + * zone: string, + * grtExport?: ?value-of, + * ipNetworks?: ?NetworkDetailsIpNetworks, + * networkFeatures?: ?array, + * parentNetwork?: ?string, + * peerings?: ?NetworkDetailsPeerings, + * router?: ?string, + * servers?: ?NetworkDetailsServers, + * services?: ?NetworkDetailsServices, + * tags?: ?array, + * type?: ?value-of, + * uuid?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->grtExport = $values['grtExport'] ?? null; + $this->ipNetworks = $values['ipNetworks'] ?? null; + $this->name = $values['name']; + $this->networkFeatures = $values['networkFeatures'] ?? null; + $this->parentNetwork = $values['parentNetwork'] ?? null; + $this->peerings = $values['peerings'] ?? null; + $this->router = $values['router'] ?? null; + $this->servers = $values['servers'] ?? null; + $this->services = $values['services'] ?? null; + $this->tags = $values['tags'] ?? null; + $this->type = $values['type'] ?? null; + $this->uuid = $values['uuid'] ?? null; + $this->zone = $values['zone']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkDetailsIpNetworks.php b/fern/sdk/src/Types/NetworkDetailsIpNetworks.php new file mode 100644 index 00000000..dfc1a0d0 --- /dev/null +++ b/fern/sdk/src/Types/NetworkDetailsIpNetworks.php @@ -0,0 +1,35 @@ + $ipNetwork + */ + #[JsonProperty('ip_network'), ArrayType([NetworkDetailsIpNetworksIpNetworkItem::class])] + public array $ipNetwork; + + /** + * @param array{ + * ipNetwork: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->ipNetwork = $values['ipNetwork']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkDetailsIpNetworksIpNetworkItem.php b/fern/sdk/src/Types/NetworkDetailsIpNetworksIpNetworkItem.php new file mode 100644 index 00000000..82936b74 --- /dev/null +++ b/fern/sdk/src/Types/NetworkDetailsIpNetworksIpNetworkItem.php @@ -0,0 +1,91 @@ + $dhcp + */ + #[JsonProperty('dhcp')] + public ?string $dhcp; + + /** + * @var ?string $dhcpBootfileUrl + */ + #[JsonProperty('dhcp_bootfile_url')] + public ?string $dhcpBootfileUrl; + + /** + * @var ?value-of $dhcpDefaultRoute + */ + #[JsonProperty('dhcp_default_route')] + public ?string $dhcpDefaultRoute; + + /** + * @var ?array $dhcpDns + */ + #[JsonProperty('dhcp_dns'), ArrayType(['string'])] + public ?array $dhcpDns; + + /** + * @var ?array $dhcpRoutes + */ + #[JsonProperty('dhcp_routes'), ArrayType(['string'])] + public ?array $dhcpRoutes; + + /** + * @var value-of $family + */ + #[JsonProperty('family')] + public string $family; + + /** + * @var ?string $gateway + */ + #[JsonProperty('gateway')] + public ?string $gateway; + + /** + * @param array{ + * address: string, + * family: value-of, + * dhcp?: ?value-of, + * dhcpBootfileUrl?: ?string, + * dhcpDefaultRoute?: ?value-of, + * dhcpDns?: ?array, + * dhcpRoutes?: ?array, + * gateway?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->address = $values['address']; + $this->dhcp = $values['dhcp'] ?? null; + $this->dhcpBootfileUrl = $values['dhcpBootfileUrl'] ?? null; + $this->dhcpDefaultRoute = $values['dhcpDefaultRoute'] ?? null; + $this->dhcpDns = $values['dhcpDns'] ?? null; + $this->dhcpRoutes = $values['dhcpRoutes'] ?? null; + $this->family = $values['family']; + $this->gateway = $values['gateway'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkDetailsPeerings.php b/fern/sdk/src/Types/NetworkDetailsPeerings.php new file mode 100644 index 00000000..9fba35bc --- /dev/null +++ b/fern/sdk/src/Types/NetworkDetailsPeerings.php @@ -0,0 +1,38 @@ + $peering + */ + #[JsonProperty('peering'), ArrayType([NetworkDetailsPeeringsPeeringItem::class])] + public ?array $peering; + + /** + * @param array{ + * peering?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->peering = $values['peering'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkDetailsPeeringsPeeringItem.php b/fern/sdk/src/Types/NetworkDetailsPeeringsPeeringItem.php new file mode 100644 index 00000000..c157e44b --- /dev/null +++ b/fern/sdk/src/Types/NetworkDetailsPeeringsPeeringItem.php @@ -0,0 +1,50 @@ + $state + */ + #[JsonProperty('state')] + public ?string $state; + + /** + * @var ?string $uuid + */ + #[JsonProperty('uuid')] + public ?string $uuid; + + /** + * @param array{ + * name?: ?string, + * state?: ?value-of, + * uuid?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->state = $values['state'] ?? null; + $this->uuid = $values['uuid'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkDetailsServers.php b/fern/sdk/src/Types/NetworkDetailsServers.php new file mode 100644 index 00000000..4d018bef --- /dev/null +++ b/fern/sdk/src/Types/NetworkDetailsServers.php @@ -0,0 +1,35 @@ + $server + */ + #[JsonProperty('server'), ArrayType([NetworkDetailsServersServerItem::class])] + public array $server; + + /** + * @param array{ + * server: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->server = $values['server']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkDetailsServersServerItem.php b/fern/sdk/src/Types/NetworkDetailsServersServerItem.php new file mode 100644 index 00000000..eac37533 --- /dev/null +++ b/fern/sdk/src/Types/NetworkDetailsServersServerItem.php @@ -0,0 +1,42 @@ +title = $values['title']; + $this->uuid = $values['uuid']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkDetailsServices.php b/fern/sdk/src/Types/NetworkDetailsServices.php new file mode 100644 index 00000000..37ee39dc --- /dev/null +++ b/fern/sdk/src/Types/NetworkDetailsServices.php @@ -0,0 +1,38 @@ + $service + */ + #[JsonProperty('service'), ArrayType([NetworkDetailsServicesServiceItem::class])] + public array $service; + + /** + * @param array{ + * service: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->service = $values['service']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkDetailsServicesServiceItem.php b/fern/sdk/src/Types/NetworkDetailsServicesServiceItem.php new file mode 100644 index 00000000..05283068 --- /dev/null +++ b/fern/sdk/src/Types/NetworkDetailsServicesServiceItem.php @@ -0,0 +1,43 @@ + $serviceRoutes + */ + #[JsonProperty('service_routes'), ArrayType(['string'])] + public array $serviceRoutes; + + /** + * @param array{ + * name: string, + * serviceRoutes: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->serviceRoutes = $values['serviceRoutes']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkError.php b/fern/sdk/src/Types/NetworkError.php new file mode 100644 index 00000000..72764129 --- /dev/null +++ b/fern/sdk/src/Types/NetworkError.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkErrorError.php b/fern/sdk/src/Types/NetworkErrorError.php new file mode 100644 index 00000000..1cb5d81c --- /dev/null +++ b/fern/sdk/src/Types/NetworkErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkFeatures.php b/fern/sdk/src/Types/NetworkFeatures.php new file mode 100644 index 00000000..8fbb4d3e --- /dev/null +++ b/fern/sdk/src/Types/NetworkFeatures.php @@ -0,0 +1,11 @@ + $bootable + */ + #[JsonProperty('bootable')] + public string $bootable; + + /** + * @var array> $ipAddresses + */ + #[JsonProperty('ip_addresses'), ArrayType([['string' => 'mixed']])] + public array $ipAddresses; + + /** + * @var string $mac + */ + #[JsonProperty('mac')] + public string $mac; + + /** + * @var string $network + */ + #[JsonProperty('network')] + public string $network; + + /** + * @var value-of $sourceIpFiltering + */ + #[JsonProperty('source_ip_filtering')] + public string $sourceIpFiltering; + + /** + * @var ?string $server + */ + #[JsonProperty('server')] + public ?string $server; + + /** + * @var value-of $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var string $uuid + */ + #[JsonProperty('uuid')] + public string $uuid; + + /** + * @param array{ + * bootable: value-of, + * ipAddresses: array>, + * mac: string, + * network: string, + * sourceIpFiltering: value-of, + * type: value-of, + * uuid: string, + * server?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->bootable = $values['bootable']; + $this->ipAddresses = $values['ipAddresses']; + $this->mac = $values['mac']; + $this->network = $values['network']; + $this->sourceIpFiltering = $values['sourceIpFiltering']; + $this->server = $values['server'] ?? null; + $this->type = $values['type']; + $this->uuid = $values['uuid']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkInterfaces.php b/fern/sdk/src/Types/NetworkInterfaces.php new file mode 100644 index 00000000..f9a5fdde --- /dev/null +++ b/fern/sdk/src/Types/NetworkInterfaces.php @@ -0,0 +1,37 @@ +interfaces = $values['interfaces']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkInterfacesInterfaces.php b/fern/sdk/src/Types/NetworkInterfacesInterfaces.php new file mode 100644 index 00000000..3409d8ab --- /dev/null +++ b/fern/sdk/src/Types/NetworkInterfacesInterfaces.php @@ -0,0 +1,34 @@ +interface = $values['interface']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkIpFamily.php b/fern/sdk/src/Types/NetworkIpFamily.php new file mode 100644 index 00000000..f9cf58fd --- /dev/null +++ b/fern/sdk/src/Types/NetworkIpFamily.php @@ -0,0 +1,9 @@ +key = $values['key']; + $this->value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkLabels.php b/fern/sdk/src/Types/NetworkLabels.php new file mode 100644 index 00000000..92b3362f --- /dev/null +++ b/fern/sdk/src/Types/NetworkLabels.php @@ -0,0 +1,38 @@ + $label + */ + #[JsonProperty('label'), ArrayType([NetworkLabel::class])] + public ?array $label; + + /** + * @param array{ + * label?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->label = $values['label'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkPeering.php b/fern/sdk/src/Types/NetworkPeering.php new file mode 100644 index 00000000..120327ef --- /dev/null +++ b/fern/sdk/src/Types/NetworkPeering.php @@ -0,0 +1,95 @@ + $configuredStatus + */ + #[JsonProperty('configured_status')] + public ?string $configuredStatus; + + /** + * @var ?string $name + */ + #[JsonProperty('name')] + public ?string $name; + + /** + * @var ?NetworkPeeringNetwork $network Describes the local side of the peering + */ + #[JsonProperty('network')] + public ?NetworkPeeringNetwork $network; + + /** + * @var ?NetworkPeeringPeerNetwork $peerNetwork Describes the peer side of the peering + */ + #[JsonProperty('peer_network')] + public ?NetworkPeeringPeerNetwork $peerNetwork; + + /** + * @var ?value-of $state + */ + #[JsonProperty('state')] + public ?string $state; + + /** + * @var ?string $uuid + */ + #[JsonProperty('uuid')] + public ?string $uuid; + + /** + * @var ?DateTime $createdAt When the network peering was created + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $createdAt; + + /** + * @var ?DateTime $updatedAt When the network peering was last updated. Null until the first modification. + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $updatedAt; + + /** + * @param array{ + * configuredStatus?: ?value-of, + * name?: ?string, + * network?: ?NetworkPeeringNetwork, + * peerNetwork?: ?NetworkPeeringPeerNetwork, + * state?: ?value-of, + * uuid?: ?string, + * createdAt?: ?DateTime, + * updatedAt?: ?DateTime, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->configuredStatus = $values['configuredStatus'] ?? null; + $this->name = $values['name'] ?? null; + $this->network = $values['network'] ?? null; + $this->peerNetwork = $values['peerNetwork'] ?? null; + $this->state = $values['state'] ?? null; + $this->uuid = $values['uuid'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->updatedAt = $values['updatedAt'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkPeeringConfiguredStatus.php b/fern/sdk/src/Types/NetworkPeeringConfiguredStatus.php new file mode 100644 index 00000000..5b9fc320 --- /dev/null +++ b/fern/sdk/src/Types/NetworkPeeringConfiguredStatus.php @@ -0,0 +1,9 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkPeeringErrorError.php b/fern/sdk/src/Types/NetworkPeeringErrorError.php new file mode 100644 index 00000000..9698c879 --- /dev/null +++ b/fern/sdk/src/Types/NetworkPeeringErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkPeeringIpFamily.php b/fern/sdk/src/Types/NetworkPeeringIpFamily.php new file mode 100644 index 00000000..3be12d00 --- /dev/null +++ b/fern/sdk/src/Types/NetworkPeeringIpFamily.php @@ -0,0 +1,9 @@ +ipNetworks = $values['ipNetworks'] ?? null; + $this->uuid = $values['uuid'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkPeeringNetworkIpNetworks.php b/fern/sdk/src/Types/NetworkPeeringNetworkIpNetworks.php new file mode 100644 index 00000000..69aea78a --- /dev/null +++ b/fern/sdk/src/Types/NetworkPeeringNetworkIpNetworks.php @@ -0,0 +1,35 @@ + $ipNetwork + */ + #[JsonProperty('ip_network'), ArrayType([NetworkPeeringNetworkIpNetworksIpNetworkItem::class])] + public ?array $ipNetwork; + + /** + * @param array{ + * ipNetwork?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->ipNetwork = $values['ipNetwork'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkPeeringNetworkIpNetworksIpNetworkItem.php b/fern/sdk/src/Types/NetworkPeeringNetworkIpNetworksIpNetworkItem.php new file mode 100644 index 00000000..03f72322 --- /dev/null +++ b/fern/sdk/src/Types/NetworkPeeringNetworkIpNetworksIpNetworkItem.php @@ -0,0 +1,42 @@ + $family + */ + #[JsonProperty('family')] + public ?string $family; + + /** + * @param array{ + * address?: ?string, + * family?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->address = $values['address'] ?? null; + $this->family = $values['family'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkPeeringPeerNetwork.php b/fern/sdk/src/Types/NetworkPeeringPeerNetwork.php new file mode 100644 index 00000000..b61a5b89 --- /dev/null +++ b/fern/sdk/src/Types/NetworkPeeringPeerNetwork.php @@ -0,0 +1,45 @@ +ipNetworks = $values['ipNetworks'] ?? null; + $this->uuid = $values['uuid'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkPeeringPeerNetworkIpNetworks.php b/fern/sdk/src/Types/NetworkPeeringPeerNetworkIpNetworks.php new file mode 100644 index 00000000..52958007 --- /dev/null +++ b/fern/sdk/src/Types/NetworkPeeringPeerNetworkIpNetworks.php @@ -0,0 +1,38 @@ + $ipNetwork + */ + #[JsonProperty('ip_network'), ArrayType([NetworkPeeringPeerNetworkIpNetworksIpNetworkItem::class])] + public ?array $ipNetwork; + + /** + * @param array{ + * ipNetwork?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->ipNetwork = $values['ipNetwork'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkPeeringPeerNetworkIpNetworksIpNetworkItem.php b/fern/sdk/src/Types/NetworkPeeringPeerNetworkIpNetworksIpNetworkItem.php new file mode 100644 index 00000000..4ea91c7a --- /dev/null +++ b/fern/sdk/src/Types/NetworkPeeringPeerNetworkIpNetworksIpNetworkItem.php @@ -0,0 +1,42 @@ + $family + */ + #[JsonProperty('family')] + public ?string $family; + + /** + * @param array{ + * address?: ?string, + * family?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->address = $values['address'] ?? null; + $this->family = $values['family'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkPeeringState.php b/fern/sdk/src/Types/NetworkPeeringState.php new file mode 100644 index 00000000..d270592d --- /dev/null +++ b/fern/sdk/src/Types/NetworkPeeringState.php @@ -0,0 +1,17 @@ +networkPeerings = $values['networkPeerings']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkPeeringsNetworkPeerings.php b/fern/sdk/src/Types/NetworkPeeringsNetworkPeerings.php new file mode 100644 index 00000000..44590b48 --- /dev/null +++ b/fern/sdk/src/Types/NetworkPeeringsNetworkPeerings.php @@ -0,0 +1,35 @@ + $networkPeering + */ + #[JsonProperty('network_peering'), ArrayType([NetworkPeering::class])] + public array $networkPeering; + + /** + * @param array{ + * networkPeering: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->networkPeering = $values['networkPeering']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkServers.php b/fern/sdk/src/Types/NetworkServers.php new file mode 100644 index 00000000..1db7e022 --- /dev/null +++ b/fern/sdk/src/Types/NetworkServers.php @@ -0,0 +1,38 @@ + $server + */ + #[JsonProperty('server'), ArrayType(['string'])] + public ?array $server; + + /** + * @param array{ + * server?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->server = $values['server'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkTags.php b/fern/sdk/src/Types/NetworkTags.php new file mode 100644 index 00000000..1c4a1286 --- /dev/null +++ b/fern/sdk/src/Types/NetworkTags.php @@ -0,0 +1,37 @@ +tags = $values['tags']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkTagsTags.php b/fern/sdk/src/Types/NetworkTagsTags.php new file mode 100644 index 00000000..507f6188 --- /dev/null +++ b/fern/sdk/src/Types/NetworkTagsTags.php @@ -0,0 +1,35 @@ + $tag + */ + #[JsonProperty('tag'), ArrayType([NetworkTagsTagsTagItem::class])] + public array $tag; + + /** + * @param array{ + * tag: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->tag = $values['tag']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkTagsTagsTagItem.php b/fern/sdk/src/Types/NetworkTagsTagsTagItem.php new file mode 100644 index 00000000..66507b10 --- /dev/null +++ b/fern/sdk/src/Types/NetworkTagsTagsTagItem.php @@ -0,0 +1,50 @@ +description = $values['description'] ?? null; + $this->name = $values['name']; + $this->servers = $values['servers']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworkType.php b/fern/sdk/src/Types/NetworkType.php new file mode 100644 index 00000000..72d3a152 --- /dev/null +++ b/fern/sdk/src/Types/NetworkType.php @@ -0,0 +1,10 @@ +networks = $values['networks']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/NetworksNetworks.php b/fern/sdk/src/Types/NetworksNetworks.php new file mode 100644 index 00000000..afb1ed1d --- /dev/null +++ b/fern/sdk/src/Types/NetworksNetworks.php @@ -0,0 +1,38 @@ + $network + */ + #[JsonProperty('network'), ArrayType([NetworkDetails::class])] + public array $network; + + /** + * @param array{ + * network: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->network = $values['network']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2AccessKeyDetailResponse.php b/fern/sdk/src/Types/ObjectStorage2AccessKeyDetailResponse.php new file mode 100644 index 00000000..4bb08fd9 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2AccessKeyDetailResponse.php @@ -0,0 +1,71 @@ + $status + */ + #[JsonProperty('status')] + public ?string $status; + + /** + * @param array{ + * accessKeyId?: ?string, + * createdAt?: ?DateTime, + * lastUsedAt?: ?DateTime, + * secretAccessKey?: ?string, + * status?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->accessKeyId = $values['accessKeyId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->lastUsedAt = $values['lastUsedAt'] ?? null; + $this->secretAccessKey = $values['secretAccessKey'] ?? null; + $this->status = $values['status'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2AccessKeyDetailResponseStatus.php b/fern/sdk/src/Types/ObjectStorage2AccessKeyDetailResponseStatus.php new file mode 100644 index 00000000..5dad548a --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2AccessKeyDetailResponseStatus.php @@ -0,0 +1,9 @@ +document = $values['document'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2BucketDetailResponse.php b/fern/sdk/src/Types/ObjectStorage2BucketDetailResponse.php new file mode 100644 index 00000000..3a4b8e01 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2BucketDetailResponse.php @@ -0,0 +1,61 @@ +name = $values['name'] ?? null; + $this->totalObjects = $values['totalObjects'] ?? null; + $this->totalSizeBytes = $values['totalSizeBytes'] ?? null; + $this->deleted = $values['deleted'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2CreateAccessKeyResponse.php b/fern/sdk/src/Types/ObjectStorage2CreateAccessKeyResponse.php new file mode 100644 index 00000000..fb39b12e --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2CreateAccessKeyResponse.php @@ -0,0 +1,71 @@ + $status + */ + #[JsonProperty('status')] + public ?string $status; + + /** + * @param array{ + * accessKeyId?: ?string, + * createdAt?: ?DateTime, + * lastUsedAt?: ?DateTime, + * secretAccessKey?: ?string, + * status?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->accessKeyId = $values['accessKeyId'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->lastUsedAt = $values['lastUsedAt'] ?? null; + $this->secretAccessKey = $values['secretAccessKey'] ?? null; + $this->status = $values['status'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2CreateAccessKeyResponseStatus.php b/fern/sdk/src/Types/ObjectStorage2CreateAccessKeyResponseStatus.php new file mode 100644 index 00000000..83744e38 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2CreateAccessKeyResponseStatus.php @@ -0,0 +1,9 @@ + $type Type of the custom domain. At the moment only public is accepted. + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?value-of $mode Purpose of the domain. 'api' for S3 API access (creates base URL), 'static-website' for static website hosting (no base URL). Cannot be changed after creation. + */ + #[JsonProperty('mode')] + public ?string $mode; + + /** + * @var string $domainName Custom domain to be added. Supports both apex domains (example.com) and subdomains (objects.example.com). + */ + #[JsonProperty('domain_name')] + public string $domainName; + + /** + * @param array{ + * type: value-of, + * domainName: string, + * mode?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->mode = $values['mode'] ?? null; + $this->domainName = $values['domainName']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2CustomDomainCreateMode.php b/fern/sdk/src/Types/ObjectStorage2CustomDomainCreateMode.php new file mode 100644 index 00000000..2dd03a25 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2CustomDomainCreateMode.php @@ -0,0 +1,9 @@ + $mode Purpose of the domain. 'api' for S3 API access, 'static-website' for static website hosting. + */ + #[JsonProperty('mode')] + public ?string $mode; + + /** + * @param array{ + * domainName?: ?string, + * type?: ?string, + * mode?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->domainName = $values['domainName'] ?? null; + $this->type = $values['type'] ?? null; + $this->mode = $values['mode'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2CustomDomainDetailResponseMode.php b/fern/sdk/src/Types/ObjectStorage2CustomDomainDetailResponseMode.php new file mode 100644 index 00000000..efe6442f --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2CustomDomainDetailResponseMode.php @@ -0,0 +1,9 @@ + $type The network access type of the endpoint + */ + #[JsonProperty('type')] + public ?string $type; + + /** + * @var ?value-of $mode The operational mode of the endpoint: 'api' for S3/IAM/STS access, 'static-website' for static website hosting + */ + #[JsonProperty('mode')] + public ?string $mode; + + /** + * @param array{ + * domainName?: ?string, + * iamUrl?: ?string, + * stsUrl?: ?string, + * type?: ?value-of, + * mode?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->domainName = $values['domainName'] ?? null; + $this->iamUrl = $values['iamUrl'] ?? null; + $this->stsUrl = $values['stsUrl'] ?? null; + $this->type = $values['type'] ?? null; + $this->mode = $values['mode'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2EndpointResponseMode.php b/fern/sdk/src/Types/ObjectStorage2EndpointResponseMode.php new file mode 100644 index 00000000..8e5d3a9c --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2EndpointResponseMode.php @@ -0,0 +1,9 @@ + $type Error code string. + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var string $title Short description of the error. + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var string $correlationId Unique identifier for the request, useful for debugging. + */ + #[JsonProperty('correlation_id')] + public string $correlationId; + + /** + * @var int $status HTTP status code associated with the error. + */ + #[JsonProperty('status')] + public int $status; + + /** + * @var ?array $invalidParams List of invalid parameters in the request. + */ + #[JsonProperty('invalid_params'), ArrayType([ObjectStorage2ErrorResponseInvalidParamsItem::class])] + public ?array $invalidParams; + + /** + * @param array{ + * type: value-of, + * title: string, + * correlationId: string, + * status: int, + * invalidParams?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->type = $values['type']; + $this->title = $values['title']; + $this->correlationId = $values['correlationId']; + $this->status = $values['status']; + $this->invalidParams = $values['invalidParams'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2ErrorResponseInvalidParamsItem.php b/fern/sdk/src/Types/ObjectStorage2ErrorResponseInvalidParamsItem.php new file mode 100644 index 00000000..da913bf2 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2ErrorResponseInvalidParamsItem.php @@ -0,0 +1,42 @@ +name = $values['name']; + $this->reason = $values['reason']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2ErrorResponseType.php b/fern/sdk/src/Types/ObjectStorage2ErrorResponseType.php new file mode 100644 index 00000000..f258004f --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2ErrorResponseType.php @@ -0,0 +1,11 @@ +arn = $values['arn'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->name = $values['name'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2InlinePolicyCreate.php b/fern/sdk/src/Types/ObjectStorage2InlinePolicyCreate.php new file mode 100644 index 00000000..839003e9 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2InlinePolicyCreate.php @@ -0,0 +1,45 @@ +name = $values['name']; + $this->document = $values['document']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2InlinePolicyResponse.php b/fern/sdk/src/Types/ObjectStorage2InlinePolicyResponse.php new file mode 100644 index 00000000..cc7955f5 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2InlinePolicyResponse.php @@ -0,0 +1,45 @@ +document = $values['document'] ?? null; + $this->name = $values['name'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2LabelCreate.php b/fern/sdk/src/Types/ObjectStorage2LabelCreate.php new file mode 100644 index 00000000..604433ae --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2LabelCreate.php @@ -0,0 +1,45 @@ +key = $values['key']; + $this->value = $values['value'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2LabelDetailResponse.php b/fern/sdk/src/Types/ObjectStorage2LabelDetailResponse.php new file mode 100644 index 00000000..76cba62e --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2LabelDetailResponse.php @@ -0,0 +1,45 @@ +key = $values['key'] ?? null; + $this->value = $values['value'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2MetricsSeriesListResponseItem.php b/fern/sdk/src/Types/ObjectStorage2MetricsSeriesListResponseItem.php new file mode 100644 index 00000000..899d6fc8 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2MetricsSeriesListResponseItem.php @@ -0,0 +1,108 @@ +bytesCreated = $values['bytesCreated'] ?? null; + $this->bytesDeleted = $values['bytesDeleted'] ?? null; + $this->bytesReceived = $values['bytesReceived'] ?? null; + $this->bytesTotal = $values['bytesTotal'] ?? null; + $this->bytesTransmitted = $values['bytesTransmitted'] ?? null; + $this->endAt = $values['endAt'] ?? null; + $this->objectsCreated = $values['objectsCreated'] ?? null; + $this->objectsDeleted = $values['objectsDeleted'] ?? null; + $this->objectsTotal = $values['objectsTotal'] ?? null; + $this->startAt = $values['startAt'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2MetricsUsageResponse.php b/fern/sdk/src/Types/ObjectStorage2MetricsUsageResponse.php new file mode 100644 index 00000000..88f24528 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2MetricsUsageResponse.php @@ -0,0 +1,45 @@ +totalObjects = $values['totalObjects'] ?? null; + $this->totalSizeBytes = $values['totalSizeBytes'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2NetworkCreate.php b/fern/sdk/src/Types/ObjectStorage2NetworkCreate.php new file mode 100644 index 00000000..29a98796 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2NetworkCreate.php @@ -0,0 +1,61 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var value-of $family + */ + #[JsonProperty('family')] + public string $family; + + /** + * @param array{ + * name: string, + * type: value-of, + * family: value-of, + * uuid?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->uuid = $values['uuid'] ?? null; + $this->name = $values['name']; + $this->type = $values['type']; + $this->family = $values['family']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2NetworkDetailResponse.php b/fern/sdk/src/Types/ObjectStorage2NetworkDetailResponse.php new file mode 100644 index 00000000..d3ff7341 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2NetworkDetailResponse.php @@ -0,0 +1,61 @@ +family = $values['family'] ?? null; + $this->name = $values['name'] ?? null; + $this->type = $values['type'] ?? null; + $this->uuid = $values['uuid'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2NetworkFamily.php b/fern/sdk/src/Types/ObjectStorage2NetworkFamily.php new file mode 100644 index 00000000..20580aa5 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2NetworkFamily.php @@ -0,0 +1,9 @@ +policyName = $values['policyName']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2PolicyAttachmentCreate.php b/fern/sdk/src/Types/ObjectStorage2PolicyAttachmentCreate.php new file mode 100644 index 00000000..01945fe7 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2PolicyAttachmentCreate.php @@ -0,0 +1,37 @@ +name = $values['name']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2PolicyAttachmentResponse.php b/fern/sdk/src/Types/ObjectStorage2PolicyAttachmentResponse.php new file mode 100644 index 00000000..8c4890b3 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2PolicyAttachmentResponse.php @@ -0,0 +1,45 @@ +arn = $values['arn'] ?? null; + $this->name = $values['name'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2PolicyDetailResponse.php b/fern/sdk/src/Types/ObjectStorage2PolicyDetailResponse.php new file mode 100644 index 00000000..4aafe4c1 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2PolicyDetailResponse.php @@ -0,0 +1,103 @@ +arn = $values['arn'] ?? null; + $this->attachmentCount = $values['attachmentCount'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->defaultVersionId = $values['defaultVersionId'] ?? null; + $this->description = $values['description'] ?? null; + $this->document = $values['document'] ?? null; + $this->name = $values['name'] ?? null; + $this->system = $values['system'] ?? null; + $this->updatedAt = $values['updatedAt'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2PolicyVersionResponse.php b/fern/sdk/src/Types/ObjectStorage2PolicyVersionResponse.php new file mode 100644 index 00000000..aa7a7605 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2PolicyVersionResponse.php @@ -0,0 +1,63 @@ +createDate = $values['createDate'] ?? null; + $this->document = $values['document'] ?? null; + $this->isDefault = $values['isDefault'] ?? null; + $this->versionId = $values['versionId'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2PropertiesCreate.php b/fern/sdk/src/Types/ObjectStorage2PropertiesCreate.php new file mode 100644 index 00000000..7acb6572 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2PropertiesCreate.php @@ -0,0 +1,37 @@ +accessControlOriginOverride = $values['accessControlOriginOverride'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2PropertyConfiguredStatus.php b/fern/sdk/src/Types/ObjectStorage2PropertyConfiguredStatus.php new file mode 100644 index 00000000..300a75ae --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2PropertyConfiguredStatus.php @@ -0,0 +1,9 @@ + $zones + */ + #[JsonProperty('zones'), ArrayType([ObjectStorage2RegionDetailResponseZonesItem::class])] + public ?array $zones; + + /** + * @param array{ + * name?: ?string, + * primaryZone?: ?string, + * zones?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->name = $values['name'] ?? null; + $this->primaryZone = $values['primaryZone'] ?? null; + $this->zones = $values['zones'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2RegionDetailResponseZonesItem.php b/fern/sdk/src/Types/ObjectStorage2RegionDetailResponseZonesItem.php new file mode 100644 index 00000000..27088986 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2RegionDetailResponseZonesItem.php @@ -0,0 +1,34 @@ +name = $values['name'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2RoleResponse.php b/fern/sdk/src/Types/ObjectStorage2RoleResponse.php new file mode 100644 index 00000000..3755a898 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2RoleResponse.php @@ -0,0 +1,112 @@ + $inlinePolicies + */ + #[JsonProperty('inline_policies'), ArrayType([ObjectStorage2RoleResponseInlinePoliciesItem::class])] + public ?array $inlinePolicies; + + /** + * @var ?int $maxSessionDuration + */ + #[JsonProperty('max_session_duration')] + public ?int $maxSessionDuration; + + /** + * @var ?string $name + */ + #[JsonProperty('name')] + public ?string $name; + + /** + * @var ?string $permissionsBoundary + */ + #[JsonProperty('permissions_boundary')] + public ?string $permissionsBoundary; + + /** + * @var ?array $policies + */ + #[JsonProperty('policies'), ArrayType([ObjectStorage2PolicyAttachmentResponse::class])] + public ?array $policies; + + /** + * @var ?array $tags + */ + #[JsonProperty('tags'), ArrayType([ObjectStorage2TagResponse::class])] + public ?array $tags; + + /** + * @param array{ + * arn?: ?string, + * assumeRolePolicyDocument?: ?string, + * createdAt?: ?DateTime, + * description?: ?string, + * inlinePolicies?: ?array, + * maxSessionDuration?: ?int, + * name?: ?string, + * permissionsBoundary?: ?string, + * policies?: ?array, + * tags?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->arn = $values['arn'] ?? null; + $this->assumeRolePolicyDocument = $values['assumeRolePolicyDocument'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->description = $values['description'] ?? null; + $this->inlinePolicies = $values['inlinePolicies'] ?? null; + $this->maxSessionDuration = $values['maxSessionDuration'] ?? null; + $this->name = $values['name'] ?? null; + $this->permissionsBoundary = $values['permissionsBoundary'] ?? null; + $this->policies = $values['policies'] ?? null; + $this->tags = $values['tags'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2RoleResponseInlinePoliciesItem.php b/fern/sdk/src/Types/ObjectStorage2RoleResponseInlinePoliciesItem.php new file mode 100644 index 00000000..313f2b65 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2RoleResponseInlinePoliciesItem.php @@ -0,0 +1,34 @@ +name = $values['name'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2RoleTag.php b/fern/sdk/src/Types/ObjectStorage2RoleTag.php new file mode 100644 index 00000000..348ebea4 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2RoleTag.php @@ -0,0 +1,45 @@ +key = $values['key']; + $this->value = $values['value'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2ServiceDetailResponse.php b/fern/sdk/src/Types/ObjectStorage2ServiceDetailResponse.php new file mode 100644 index 00000000..7b9ccef0 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2ServiceDetailResponse.php @@ -0,0 +1,160 @@ + $configuredStatus + */ + #[JsonProperty('configured_status')] + public ?string $configuredStatus; + + /** + * @var ?value-of $operationalState + */ + #[JsonProperty('operational_state')] + public ?string $operationalState; + + /** + * @var ?array $networks + */ + #[JsonProperty('networks'), ArrayType([ObjectStorage2NetworkDetailResponse::class])] + public ?array $networks; + + /** + * @var ?ObjectStorage2ServiceDetailResponseUsage $usage + */ + #[JsonProperty('usage')] + public ?ObjectStorage2ServiceDetailResponseUsage $usage; + + /** + * @var ?array $labels + */ + #[JsonProperty('labels'), ArrayType([ObjectStorage2LabelDetailResponse::class])] + public ?array $labels; + + /** + * @var ?array $users + */ + #[JsonProperty('users'), ArrayType([ObjectStorage2UserDetailResponse::class])] + public ?array $users; + + /** + * @var ?array $endpoints + */ + #[JsonProperty('endpoints'), ArrayType([ObjectStorage2EndpointResponse::class])] + public ?array $endpoints; + + /** + * @var ?array $customDomains + */ + #[JsonProperty('custom_domains'), ArrayType([ObjectStorage2CustomDomainDetailResponse::class])] + public ?array $customDomains; + + /** + * @var ?array $staticWebsites Static website configurations for this service + */ + #[JsonProperty('static_websites'), ArrayType([ObjectStorage2StaticWebsiteConfig::class])] + public ?array $staticWebsites; + + /** + * @var ?array $stateMessages + */ + #[JsonProperty('state_messages'), ArrayType([ObjectStorage2ServiceDetailResponseStateMessagesItem::class])] + public ?array $stateMessages; + + /** + * @var ?bool $terminationProtection + */ + #[JsonProperty('termination_protection')] + public ?bool $terminationProtection; + + /** + * @var ?DateTime $createdAt + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $createdAt; + + /** + * @var ?DateTime $updatedAt + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $updatedAt; + + /** + * @param array{ + * uuid?: ?string, + * name?: ?string, + * region?: ?string, + * configuredStatus?: ?value-of, + * operationalState?: ?value-of, + * networks?: ?array, + * usage?: ?ObjectStorage2ServiceDetailResponseUsage, + * labels?: ?array, + * users?: ?array, + * endpoints?: ?array, + * customDomains?: ?array, + * staticWebsites?: ?array, + * stateMessages?: ?array, + * terminationProtection?: ?bool, + * createdAt?: ?DateTime, + * updatedAt?: ?DateTime, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->uuid = $values['uuid'] ?? null; + $this->name = $values['name'] ?? null; + $this->region = $values['region'] ?? null; + $this->configuredStatus = $values['configuredStatus'] ?? null; + $this->operationalState = $values['operationalState'] ?? null; + $this->networks = $values['networks'] ?? null; + $this->usage = $values['usage'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->users = $values['users'] ?? null; + $this->endpoints = $values['endpoints'] ?? null; + $this->customDomains = $values['customDomains'] ?? null; + $this->staticWebsites = $values['staticWebsites'] ?? null; + $this->stateMessages = $values['stateMessages'] ?? null; + $this->terminationProtection = $values['terminationProtection'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->updatedAt = $values['updatedAt'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2ServiceDetailResponseConfiguredStatus.php b/fern/sdk/src/Types/ObjectStorage2ServiceDetailResponseConfiguredStatus.php new file mode 100644 index 00000000..08c10bfc --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2ServiceDetailResponseConfiguredStatus.php @@ -0,0 +1,9 @@ + $code + */ + #[JsonProperty('code')] + public ?string $code; + + /** + * @var ?DateTime $createdAt + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $createdAt; + + /** + * @var ?DateTime $updatedAt + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $updatedAt; + + /** + * @param array{ + * operationalState?: ?string, + * message?: ?string, + * code?: ?value-of, + * createdAt?: ?DateTime, + * updatedAt?: ?DateTime, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->operationalState = $values['operationalState'] ?? null; + $this->message = $values['message'] ?? null; + $this->code = $values['code'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->updatedAt = $values['updatedAt'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2ServiceDetailResponseStateMessagesItemCode.php b/fern/sdk/src/Types/ObjectStorage2ServiceDetailResponseStateMessagesItemCode.php new file mode 100644 index 00000000..0614f83c --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2ServiceDetailResponseStateMessagesItemCode.php @@ -0,0 +1,12 @@ +totalSizeBytes = $values['totalSizeBytes'] ?? null; + $this->totalObjects = $values['totalObjects'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2ServiceDomains.php b/fern/sdk/src/Types/ObjectStorage2ServiceDomains.php new file mode 100644 index 00000000..d5ac3e9e --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2ServiceDomains.php @@ -0,0 +1,38 @@ + $domains List of all service domains (public, private, custom) with their static website hosting availability and configuration status + */ + #[JsonProperty('domains'), ArrayType([ObjectStorage2ServiceDomainsDomainsItem::class])] + public array $domains; + + /** + * @param array{ + * domains: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->domains = $values['domains']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2ServiceDomainsDomainsItem.php b/fern/sdk/src/Types/ObjectStorage2ServiceDomainsDomainsItem.php new file mode 100644 index 00000000..d0ac62ec --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2ServiceDomainsDomainsItem.php @@ -0,0 +1,58 @@ + $type Type of domain (public endpoint, private endpoint, or custom domain) + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var bool $active Whether this domain is active and ready to use (always true for enabled public/private endpoints, true for custom domains only if certificate is ready) + */ + #[JsonProperty('active')] + public bool $active; + + /** + * @var bool $staticWebsiteConfigured Whether static website hosting is configured for this domain + */ + #[JsonProperty('static_website_configured')] + public bool $staticWebsiteConfigured; + + /** + * @param array{ + * domain: string, + * type: value-of, + * active: bool, + * staticWebsiteConfigured: bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->domain = $values['domain']; + $this->type = $values['type']; + $this->active = $values['active']; + $this->staticWebsiteConfigured = $values['staticWebsiteConfigured']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2ServiceDomainsDomainsItemType.php b/fern/sdk/src/Types/ObjectStorage2ServiceDomainsDomainsItemType.php new file mode 100644 index 00000000..831598f8 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2ServiceDomainsDomainsItemType.php @@ -0,0 +1,10 @@ + $errorPages Custom error page configurations for specific HTTP status codes or ranges + */ + #[JsonProperty('error_pages'), ArrayType(['mixed'])] + public array $errorPages; + + /** + * @var bool $enabled Whether the static website configuration is currently active + */ + #[JsonProperty('enabled')] + public bool $enabled; + + /** + * @var DateTime $createdAt Timestamp when this configuration was created + */ + #[JsonProperty('created_at'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; + + /** + * @var DateTime $updatedAt Timestamp when this configuration was last updated + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; + + /** + * @param array{ + * domainName: string, + * bucketName: string, + * bucketPrefix: string, + * indexDocument: string, + * errorPages: array, + * enabled: bool, + * createdAt: DateTime, + * updatedAt: DateTime, + * spaMode?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->domainName = $values['domainName']; + $this->bucketName = $values['bucketName']; + $this->bucketPrefix = $values['bucketPrefix']; + $this->indexDocument = $values['indexDocument']; + $this->spaMode = $values['spaMode'] ?? null; + $this->errorPages = $values['errorPages']; + $this->enabled = $values['enabled']; + $this->createdAt = $values['createdAt']; + $this->updatedAt = $values['updatedAt']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2StaticWebsiteConfigCreate.php b/fern/sdk/src/Types/ObjectStorage2StaticWebsiteConfigCreate.php new file mode 100644 index 00000000..b37293ac --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2StaticWebsiteConfigCreate.php @@ -0,0 +1,86 @@ + $errorPages Custom error page configurations for specific HTTP status codes or ranges + */ + #[JsonProperty('error_pages'), ArrayType(['mixed'])] + public ?array $errorPages; + + /** + * @param array{ + * bucketName: string, + * domainName?: ?string, + * bucketPrefix?: ?string, + * indexDocument?: ?string, + * spaMode?: ?bool, + * enabled?: ?bool, + * errorPages?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->domainName = $values['domainName'] ?? null; + $this->bucketName = $values['bucketName']; + $this->bucketPrefix = $values['bucketPrefix'] ?? null; + $this->indexDocument = $values['indexDocument'] ?? null; + $this->spaMode = $values['spaMode'] ?? null; + $this->enabled = $values['enabled'] ?? null; + $this->errorPages = $values['errorPages'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2TagListRequestItem.php b/fern/sdk/src/Types/ObjectStorage2TagListRequestItem.php new file mode 100644 index 00000000..03391156 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2TagListRequestItem.php @@ -0,0 +1,42 @@ +key = $values['key']; + $this->value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2TagListResponseItem.php b/fern/sdk/src/Types/ObjectStorage2TagListResponseItem.php new file mode 100644 index 00000000..3ff86e6a --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2TagListResponseItem.php @@ -0,0 +1,42 @@ +key = $values['key']; + $this->value = $values['value'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2TagResponse.php b/fern/sdk/src/Types/ObjectStorage2TagResponse.php new file mode 100644 index 00000000..f62f8953 --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2TagResponse.php @@ -0,0 +1,45 @@ +key = $values['key'] ?? null; + $this->value = $values['value'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ObjectStorage2UserDetailResponse.php b/fern/sdk/src/Types/ObjectStorage2UserDetailResponse.php new file mode 100644 index 00000000..c8cf216d --- /dev/null +++ b/fern/sdk/src/Types/ObjectStorage2UserDetailResponse.php @@ -0,0 +1,88 @@ + $accessKeys + */ + #[JsonProperty('access_keys'), ArrayType([ObjectStorage2AccessKeyDetailResponse::class])] + public ?array $accessKeys; + + /** + * @var ?array $policies + */ + #[JsonProperty('policies'), ArrayType([ObjectStorage2PolicyAttachmentResponse::class])] + public ?array $policies; + + /** + * @var ?array $tags + */ + #[JsonProperty('tags'), ArrayType([ObjectStorage2TagResponse::class])] + public ?array $tags; + + /** + * @var ?string $permissionsBoundary + */ + #[JsonProperty('permissions_boundary')] + public ?string $permissionsBoundary; + + /** + * @param array{ + * username?: ?string, + * arn?: ?string, + * createdAt?: ?DateTime, + * accessKeys?: ?array, + * policies?: ?array, + * tags?: ?array, + * permissionsBoundary?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->username = $values['username'] ?? null; + $this->arn = $values['arn'] ?? null; + $this->createdAt = $values['createdAt'] ?? null; + $this->accessKeys = $values['accessKeys'] ?? null; + $this->policies = $values['policies'] ?? null; + $this->tags = $values['tags'] ?? null; + $this->permissionsBoundary = $values['permissionsBoundary'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerAccount.php b/fern/sdk/src/Types/PartnerAccount.php new file mode 100644 index 00000000..ca52737f --- /dev/null +++ b/fern/sdk/src/Types/PartnerAccount.php @@ -0,0 +1,125 @@ +address = $values['address'] ?? null; + $this->city = $values['city'] ?? null; + $this->company = $values['company'] ?? null; + $this->country = $values['country'] ?? null; + $this->email = $values['email'] ?? null; + $this->firstName = $values['firstName'] ?? null; + $this->lastName = $values['lastName'] ?? null; + $this->phone = $values['phone'] ?? null; + $this->postalCode = $values['postalCode'] ?? null; + $this->state = $values['state'] ?? null; + $this->username = $values['username']; + $this->vatNumber = $values['vatNumber'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError.php b/fern/sdk/src/Types/PartnerError.php new file mode 100644 index 00000000..63fac2ea --- /dev/null +++ b/fern/sdk/src/Types/PartnerError.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400.php b/fern/sdk/src/Types/PartnerError400.php new file mode 100644 index 00000000..0fdfdb32 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400AddressInvalid.php b/fern/sdk/src/Types/PartnerError400AddressInvalid.php new file mode 100644 index 00000000..154f4e73 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400AddressInvalid.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400CityInvalid.php b/fern/sdk/src/Types/PartnerError400CityInvalid.php new file mode 100644 index 00000000..12937c93 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400CityInvalid.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400CompanyInvalid.php b/fern/sdk/src/Types/PartnerError400CompanyInvalid.php new file mode 100644 index 00000000..145a6f3c --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400CompanyInvalid.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400CountryInvalid.php b/fern/sdk/src/Types/PartnerError400CountryInvalid.php new file mode 100644 index 00000000..35032045 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400CountryInvalid.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400CountryMissing.php b/fern/sdk/src/Types/PartnerError400CountryMissing.php new file mode 100644 index 00000000..d69cd6f6 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400CountryMissing.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400EmailInvalid.php b/fern/sdk/src/Types/PartnerError400EmailInvalid.php new file mode 100644 index 00000000..b643545e --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400EmailInvalid.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400EmailMissing.php b/fern/sdk/src/Types/PartnerError400EmailMissing.php new file mode 100644 index 00000000..8c80d047 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400EmailMissing.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400Error.php b/fern/sdk/src/Types/PartnerError400Error.php new file mode 100644 index 00000000..846a3810 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400Error.php @@ -0,0 +1,884 @@ +errorCode = $values['errorCode']; + $this->value = $values['value']; + } + + /** + * @param PartnerError400AddressInvalid $addressInvalid + * @return PartnerError400Error + */ + public static function addressInvalid(PartnerError400AddressInvalid $addressInvalid): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'ADDRESS_INVALID', + 'value' => $addressInvalid, + ]); + } + + /** + * @param PartnerError400CityInvalid $cityInvalid + * @return PartnerError400Error + */ + public static function cityInvalid(PartnerError400CityInvalid $cityInvalid): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'CITY_INVALID', + 'value' => $cityInvalid, + ]); + } + + /** + * @param PartnerError400CompanyInvalid $companyInvalid + * @return PartnerError400Error + */ + public static function companyInvalid(PartnerError400CompanyInvalid $companyInvalid): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'COMPANY_INVALID', + 'value' => $companyInvalid, + ]); + } + + /** + * @param PartnerError400CountryInvalid $countryInvalid + * @return PartnerError400Error + */ + public static function countryInvalid(PartnerError400CountryInvalid $countryInvalid): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'COUNTRY_INVALID', + 'value' => $countryInvalid, + ]); + } + + /** + * @param PartnerError400CountryMissing $countryMissing + * @return PartnerError400Error + */ + public static function countryMissing(PartnerError400CountryMissing $countryMissing): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'COUNTRY_MISSING', + 'value' => $countryMissing, + ]); + } + + /** + * @param PartnerError400EmailInvalid $emailInvalid + * @return PartnerError400Error + */ + public static function emailInvalid(PartnerError400EmailInvalid $emailInvalid): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'EMAIL_INVALID', + 'value' => $emailInvalid, + ]); + } + + /** + * @param PartnerError400EmailMissing $emailMissing + * @return PartnerError400Error + */ + public static function emailMissing(PartnerError400EmailMissing $emailMissing): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'EMAIL_MISSING', + 'value' => $emailMissing, + ]); + } + + /** + * @param PartnerError400FirstNameInvalid $firstNameInvalid + * @return PartnerError400Error + */ + public static function firstNameInvalid(PartnerError400FirstNameInvalid $firstNameInvalid): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'FIRST_NAME_INVALID', + 'value' => $firstNameInvalid, + ]); + } + + /** + * @param PartnerError400FirstNameMissing $firstNameMissing + * @return PartnerError400Error + */ + public static function firstNameMissing(PartnerError400FirstNameMissing $firstNameMissing): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'FIRST_NAME_MISSING', + 'value' => $firstNameMissing, + ]); + } + + /** + * @param PartnerError400LastNameInvalid $lastNameInvalid + * @return PartnerError400Error + */ + public static function lastNameInvalid(PartnerError400LastNameInvalid $lastNameInvalid): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'LAST_NAME_INVALID', + 'value' => $lastNameInvalid, + ]); + } + + /** + * @param PartnerError400LastNameMissing $lastNameMissing + * @return PartnerError400Error + */ + public static function lastNameMissing(PartnerError400LastNameMissing $lastNameMissing): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'LAST_NAME_MISSING', + 'value' => $lastNameMissing, + ]); + } + + /** + * @param PartnerError400PasswordInvalid $passwordInvalid + * @return PartnerError400Error + */ + public static function passwordInvalid(PartnerError400PasswordInvalid $passwordInvalid): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'PASSWORD_INVALID', + 'value' => $passwordInvalid, + ]); + } + + /** + * @param PartnerError400PasswordMissing $passwordMissing + * @return PartnerError400Error + */ + public static function passwordMissing(PartnerError400PasswordMissing $passwordMissing): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'PASSWORD_MISSING', + 'value' => $passwordMissing, + ]); + } + + /** + * @param PartnerError400PhoneInvalid $phoneInvalid + * @return PartnerError400Error + */ + public static function phoneInvalid(PartnerError400PhoneInvalid $phoneInvalid): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'PHONE_INVALID', + 'value' => $phoneInvalid, + ]); + } + + /** + * @param PartnerError400PhoneMissing $phoneMissing + * @return PartnerError400Error + */ + public static function phoneMissing(PartnerError400PhoneMissing $phoneMissing): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'PHONE_MISSING', + 'value' => $phoneMissing, + ]); + } + + /** + * @param PartnerError400PostalCodeInvalid $postalCodeInvalid + * @return PartnerError400Error + */ + public static function postalCodeInvalid(PartnerError400PostalCodeInvalid $postalCodeInvalid): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'POSTAL_CODE_INVALID', + 'value' => $postalCodeInvalid, + ]); + } + + /** + * @param PartnerError400PostalCodeMissing $postalCodeMissing + * @return PartnerError400Error + */ + public static function postalCodeMissing(PartnerError400PostalCodeMissing $postalCodeMissing): PartnerError400Error + { + return new PartnerError400Error([ + 'errorCode' => 'POSTAL_CODE_MISSING', + 'value' => $postalCodeMissing, + ]); + } + + /** + * @return bool + */ + public function isAddressInvalid(): bool + { + return $this->value instanceof PartnerError400AddressInvalid && $this->errorCode === 'ADDRESS_INVALID'; + } + + /** + * @return PartnerError400AddressInvalid + */ + public function asAddressInvalid(): PartnerError400AddressInvalid + { + if (!($this->value instanceof PartnerError400AddressInvalid && $this->errorCode === 'ADDRESS_INVALID')) { + throw new Exception( + "Expected ADDRESS_INVALID; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isCityInvalid(): bool + { + return $this->value instanceof PartnerError400CityInvalid && $this->errorCode === 'CITY_INVALID'; + } + + /** + * @return PartnerError400CityInvalid + */ + public function asCityInvalid(): PartnerError400CityInvalid + { + if (!($this->value instanceof PartnerError400CityInvalid && $this->errorCode === 'CITY_INVALID')) { + throw new Exception( + "Expected CITY_INVALID; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isCompanyInvalid(): bool + { + return $this->value instanceof PartnerError400CompanyInvalid && $this->errorCode === 'COMPANY_INVALID'; + } + + /** + * @return PartnerError400CompanyInvalid + */ + public function asCompanyInvalid(): PartnerError400CompanyInvalid + { + if (!($this->value instanceof PartnerError400CompanyInvalid && $this->errorCode === 'COMPANY_INVALID')) { + throw new Exception( + "Expected COMPANY_INVALID; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isCountryInvalid(): bool + { + return $this->value instanceof PartnerError400CountryInvalid && $this->errorCode === 'COUNTRY_INVALID'; + } + + /** + * @return PartnerError400CountryInvalid + */ + public function asCountryInvalid(): PartnerError400CountryInvalid + { + if (!($this->value instanceof PartnerError400CountryInvalid && $this->errorCode === 'COUNTRY_INVALID')) { + throw new Exception( + "Expected COUNTRY_INVALID; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isCountryMissing(): bool + { + return $this->value instanceof PartnerError400CountryMissing && $this->errorCode === 'COUNTRY_MISSING'; + } + + /** + * @return PartnerError400CountryMissing + */ + public function asCountryMissing(): PartnerError400CountryMissing + { + if (!($this->value instanceof PartnerError400CountryMissing && $this->errorCode === 'COUNTRY_MISSING')) { + throw new Exception( + "Expected COUNTRY_MISSING; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isEmailInvalid(): bool + { + return $this->value instanceof PartnerError400EmailInvalid && $this->errorCode === 'EMAIL_INVALID'; + } + + /** + * @return PartnerError400EmailInvalid + */ + public function asEmailInvalid(): PartnerError400EmailInvalid + { + if (!($this->value instanceof PartnerError400EmailInvalid && $this->errorCode === 'EMAIL_INVALID')) { + throw new Exception( + "Expected EMAIL_INVALID; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isEmailMissing(): bool + { + return $this->value instanceof PartnerError400EmailMissing && $this->errorCode === 'EMAIL_MISSING'; + } + + /** + * @return PartnerError400EmailMissing + */ + public function asEmailMissing(): PartnerError400EmailMissing + { + if (!($this->value instanceof PartnerError400EmailMissing && $this->errorCode === 'EMAIL_MISSING')) { + throw new Exception( + "Expected EMAIL_MISSING; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isFirstNameInvalid(): bool + { + return $this->value instanceof PartnerError400FirstNameInvalid && $this->errorCode === 'FIRST_NAME_INVALID'; + } + + /** + * @return PartnerError400FirstNameInvalid + */ + public function asFirstNameInvalid(): PartnerError400FirstNameInvalid + { + if (!($this->value instanceof PartnerError400FirstNameInvalid && $this->errorCode === 'FIRST_NAME_INVALID')) { + throw new Exception( + "Expected FIRST_NAME_INVALID; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isFirstNameMissing(): bool + { + return $this->value instanceof PartnerError400FirstNameMissing && $this->errorCode === 'FIRST_NAME_MISSING'; + } + + /** + * @return PartnerError400FirstNameMissing + */ + public function asFirstNameMissing(): PartnerError400FirstNameMissing + { + if (!($this->value instanceof PartnerError400FirstNameMissing && $this->errorCode === 'FIRST_NAME_MISSING')) { + throw new Exception( + "Expected FIRST_NAME_MISSING; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isLastNameInvalid(): bool + { + return $this->value instanceof PartnerError400LastNameInvalid && $this->errorCode === 'LAST_NAME_INVALID'; + } + + /** + * @return PartnerError400LastNameInvalid + */ + public function asLastNameInvalid(): PartnerError400LastNameInvalid + { + if (!($this->value instanceof PartnerError400LastNameInvalid && $this->errorCode === 'LAST_NAME_INVALID')) { + throw new Exception( + "Expected LAST_NAME_INVALID; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isLastNameMissing(): bool + { + return $this->value instanceof PartnerError400LastNameMissing && $this->errorCode === 'LAST_NAME_MISSING'; + } + + /** + * @return PartnerError400LastNameMissing + */ + public function asLastNameMissing(): PartnerError400LastNameMissing + { + if (!($this->value instanceof PartnerError400LastNameMissing && $this->errorCode === 'LAST_NAME_MISSING')) { + throw new Exception( + "Expected LAST_NAME_MISSING; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isPasswordInvalid(): bool + { + return $this->value instanceof PartnerError400PasswordInvalid && $this->errorCode === 'PASSWORD_INVALID'; + } + + /** + * @return PartnerError400PasswordInvalid + */ + public function asPasswordInvalid(): PartnerError400PasswordInvalid + { + if (!($this->value instanceof PartnerError400PasswordInvalid && $this->errorCode === 'PASSWORD_INVALID')) { + throw new Exception( + "Expected PASSWORD_INVALID; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isPasswordMissing(): bool + { + return $this->value instanceof PartnerError400PasswordMissing && $this->errorCode === 'PASSWORD_MISSING'; + } + + /** + * @return PartnerError400PasswordMissing + */ + public function asPasswordMissing(): PartnerError400PasswordMissing + { + if (!($this->value instanceof PartnerError400PasswordMissing && $this->errorCode === 'PASSWORD_MISSING')) { + throw new Exception( + "Expected PASSWORD_MISSING; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isPhoneInvalid(): bool + { + return $this->value instanceof PartnerError400PhoneInvalid && $this->errorCode === 'PHONE_INVALID'; + } + + /** + * @return PartnerError400PhoneInvalid + */ + public function asPhoneInvalid(): PartnerError400PhoneInvalid + { + if (!($this->value instanceof PartnerError400PhoneInvalid && $this->errorCode === 'PHONE_INVALID')) { + throw new Exception( + "Expected PHONE_INVALID; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isPhoneMissing(): bool + { + return $this->value instanceof PartnerError400PhoneMissing && $this->errorCode === 'PHONE_MISSING'; + } + + /** + * @return PartnerError400PhoneMissing + */ + public function asPhoneMissing(): PartnerError400PhoneMissing + { + if (!($this->value instanceof PartnerError400PhoneMissing && $this->errorCode === 'PHONE_MISSING')) { + throw new Exception( + "Expected PHONE_MISSING; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isPostalCodeInvalid(): bool + { + return $this->value instanceof PartnerError400PostalCodeInvalid && $this->errorCode === 'POSTAL_CODE_INVALID'; + } + + /** + * @return PartnerError400PostalCodeInvalid + */ + public function asPostalCodeInvalid(): PartnerError400PostalCodeInvalid + { + if (!($this->value instanceof PartnerError400PostalCodeInvalid && $this->errorCode === 'POSTAL_CODE_INVALID')) { + throw new Exception( + "Expected POSTAL_CODE_INVALID; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isPostalCodeMissing(): bool + { + return $this->value instanceof PartnerError400PostalCodeMissing && $this->errorCode === 'POSTAL_CODE_MISSING'; + } + + /** + * @return PartnerError400PostalCodeMissing + */ + public function asPostalCodeMissing(): PartnerError400PostalCodeMissing + { + if (!($this->value instanceof PartnerError400PostalCodeMissing && $this->errorCode === 'POSTAL_CODE_MISSING')) { + throw new Exception( + "Expected POSTAL_CODE_MISSING; got " . $this->errorCode . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } + + /** + * @return array + */ + public function jsonSerialize(): array + { + $result = []; + $result['error_code'] = $this->errorCode; + + $base = parent::jsonSerialize(); + $result = array_merge($base, $result); + + switch ($this->errorCode) { + case 'ADDRESS_INVALID': + $value = $this->asAddressInvalid()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'CITY_INVALID': + $value = $this->asCityInvalid()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'COMPANY_INVALID': + $value = $this->asCompanyInvalid()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'COUNTRY_INVALID': + $value = $this->asCountryInvalid()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'COUNTRY_MISSING': + $value = $this->asCountryMissing()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'EMAIL_INVALID': + $value = $this->asEmailInvalid()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'EMAIL_MISSING': + $value = $this->asEmailMissing()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'FIRST_NAME_INVALID': + $value = $this->asFirstNameInvalid()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'FIRST_NAME_MISSING': + $value = $this->asFirstNameMissing()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'LAST_NAME_INVALID': + $value = $this->asLastNameInvalid()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'LAST_NAME_MISSING': + $value = $this->asLastNameMissing()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'PASSWORD_INVALID': + $value = $this->asPasswordInvalid()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'PASSWORD_MISSING': + $value = $this->asPasswordMissing()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'PHONE_INVALID': + $value = $this->asPhoneInvalid()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'PHONE_MISSING': + $value = $this->asPhoneMissing()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'POSTAL_CODE_INVALID': + $value = $this->asPostalCodeInvalid()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'POSTAL_CODE_MISSING': + $value = $this->asPostalCodeMissing()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case '_unknown': + default: + if (is_null($this->value)) { + break; + } + if ($this->value instanceof JsonSerializableType) { + $value = $this->value->jsonSerialize(); + $result = array_merge($value, $result); + } elseif (is_array($this->value)) { + $result = array_merge($this->value, $result); + } + } + + return $result; + } + + /** + * @param string $json + */ + public static function fromJson(string $json): static + { + $decodedJson = JsonDecoder::decode($json); + if (!is_array($decodedJson)) { + throw new Exception("Unexpected non-array decoded type: " . gettype($decodedJson)); + } + return self::jsonDeserialize($decodedJson); + } + + /** + * @param array $data + */ + public static function jsonDeserialize(array $data): static + { + $args = []; + if (!array_key_exists('error_code', $data)) { + throw new Exception( + "JSON data is missing property 'error_code'", + ); + } + $errorCode = $data['error_code']; + if (!(is_string($errorCode))) { + throw new Exception( + "Expected property 'errorCode' in JSON data to be string, instead received " . get_debug_type($data['error_code']), + ); + } + + $args['errorCode'] = $errorCode; + switch ($errorCode) { + case 'ADDRESS_INVALID': + $args['value'] = PartnerError400AddressInvalid::jsonDeserialize($data); + break; + case 'CITY_INVALID': + $args['value'] = PartnerError400CityInvalid::jsonDeserialize($data); + break; + case 'COMPANY_INVALID': + $args['value'] = PartnerError400CompanyInvalid::jsonDeserialize($data); + break; + case 'COUNTRY_INVALID': + $args['value'] = PartnerError400CountryInvalid::jsonDeserialize($data); + break; + case 'COUNTRY_MISSING': + $args['value'] = PartnerError400CountryMissing::jsonDeserialize($data); + break; + case 'EMAIL_INVALID': + $args['value'] = PartnerError400EmailInvalid::jsonDeserialize($data); + break; + case 'EMAIL_MISSING': + $args['value'] = PartnerError400EmailMissing::jsonDeserialize($data); + break; + case 'FIRST_NAME_INVALID': + $args['value'] = PartnerError400FirstNameInvalid::jsonDeserialize($data); + break; + case 'FIRST_NAME_MISSING': + $args['value'] = PartnerError400FirstNameMissing::jsonDeserialize($data); + break; + case 'LAST_NAME_INVALID': + $args['value'] = PartnerError400LastNameInvalid::jsonDeserialize($data); + break; + case 'LAST_NAME_MISSING': + $args['value'] = PartnerError400LastNameMissing::jsonDeserialize($data); + break; + case 'PASSWORD_INVALID': + $args['value'] = PartnerError400PasswordInvalid::jsonDeserialize($data); + break; + case 'PASSWORD_MISSING': + $args['value'] = PartnerError400PasswordMissing::jsonDeserialize($data); + break; + case 'PHONE_INVALID': + $args['value'] = PartnerError400PhoneInvalid::jsonDeserialize($data); + break; + case 'PHONE_MISSING': + $args['value'] = PartnerError400PhoneMissing::jsonDeserialize($data); + break; + case 'POSTAL_CODE_INVALID': + $args['value'] = PartnerError400PostalCodeInvalid::jsonDeserialize($data); + break; + case 'POSTAL_CODE_MISSING': + $args['value'] = PartnerError400PostalCodeMissing::jsonDeserialize($data); + break; + case '_unknown': + default: + $args['errorCode'] = '_unknown'; + $args['value'] = $data; + } + + // @phpstan-ignore-next-line + return new static($args); + } +} diff --git a/fern/sdk/src/Types/PartnerError400FirstNameInvalid.php b/fern/sdk/src/Types/PartnerError400FirstNameInvalid.php new file mode 100644 index 00000000..a155f60a --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400FirstNameInvalid.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400FirstNameMissing.php b/fern/sdk/src/Types/PartnerError400FirstNameMissing.php new file mode 100644 index 00000000..d5ace4b4 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400FirstNameMissing.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400LastNameInvalid.php b/fern/sdk/src/Types/PartnerError400LastNameInvalid.php new file mode 100644 index 00000000..f2e620a7 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400LastNameInvalid.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400LastNameMissing.php b/fern/sdk/src/Types/PartnerError400LastNameMissing.php new file mode 100644 index 00000000..d2cadff2 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400LastNameMissing.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400PasswordInvalid.php b/fern/sdk/src/Types/PartnerError400PasswordInvalid.php new file mode 100644 index 00000000..bddb85a7 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400PasswordInvalid.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400PasswordMissing.php b/fern/sdk/src/Types/PartnerError400PasswordMissing.php new file mode 100644 index 00000000..1af856a9 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400PasswordMissing.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400PhoneInvalid.php b/fern/sdk/src/Types/PartnerError400PhoneInvalid.php new file mode 100644 index 00000000..e3b4fcec --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400PhoneInvalid.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400PhoneMissing.php b/fern/sdk/src/Types/PartnerError400PhoneMissing.php new file mode 100644 index 00000000..326978d4 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400PhoneMissing.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400PostalCodeInvalid.php b/fern/sdk/src/Types/PartnerError400PostalCodeInvalid.php new file mode 100644 index 00000000..8a275bfb --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400PostalCodeInvalid.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError400PostalCodeMissing.php b/fern/sdk/src/Types/PartnerError400PostalCodeMissing.php new file mode 100644 index 00000000..f669fe06 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError400PostalCodeMissing.php @@ -0,0 +1,37 @@ +errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError403.php b/fern/sdk/src/Types/PartnerError403.php new file mode 100644 index 00000000..48cf16d0 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError403.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError403Error.php b/fern/sdk/src/Types/PartnerError403Error.php new file mode 100644 index 00000000..308dd4e2 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError403Error.php @@ -0,0 +1,42 @@ + $errorCode + */ + #[JsonProperty('error_code')] + public string $errorCode; + + /** + * @var string $errorMessage + */ + #[JsonProperty('error_message')] + public string $errorMessage; + + /** + * @param array{ + * errorCode: value-of, + * errorMessage: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError403ErrorErrorCode.php b/fern/sdk/src/Types/PartnerError403ErrorErrorCode.php new file mode 100644 index 00000000..10c5dedd --- /dev/null +++ b/fern/sdk/src/Types/PartnerError403ErrorErrorCode.php @@ -0,0 +1,8 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError409Error.php b/fern/sdk/src/Types/PartnerError409Error.php new file mode 100644 index 00000000..71c6cea9 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError409Error.php @@ -0,0 +1,42 @@ + $errorCode + */ + #[JsonProperty('error_code')] + public string $errorCode; + + /** + * @var string $errorMessage + */ + #[JsonProperty('error_message')] + public string $errorMessage; + + /** + * @param array{ + * errorCode: value-of, + * errorMessage: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PartnerError409ErrorErrorCode.php b/fern/sdk/src/Types/PartnerError409ErrorErrorCode.php new file mode 100644 index 00000000..fb60c050 --- /dev/null +++ b/fern/sdk/src/Types/PartnerError409ErrorErrorCode.php @@ -0,0 +1,8 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/Permission.php b/fern/sdk/src/Types/Permission.php new file mode 100644 index 00000000..33e44371 --- /dev/null +++ b/fern/sdk/src/Types/Permission.php @@ -0,0 +1,37 @@ +permission = $values['permission'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PermissionDocument.php b/fern/sdk/src/Types/PermissionDocument.php new file mode 100644 index 00000000..23214bc2 --- /dev/null +++ b/fern/sdk/src/Types/PermissionDocument.php @@ -0,0 +1,62 @@ + $options Target specific options. + */ + #[JsonProperty('options'), ArrayType(['string' => 'mixed'])] + public ?array $options; + + /** + * @var string $targetIdentifier + */ + #[JsonProperty('target_identifier')] + public string $targetIdentifier; + + /** + * @var value-of $targetType + */ + #[JsonProperty('target_type')] + public string $targetType; + + /** + * @var string $user + */ + #[JsonProperty('user')] + public string $user; + + /** + * @param array{ + * targetIdentifier: string, + * targetType: value-of, + * user: string, + * options?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->options = $values['options'] ?? null; + $this->targetIdentifier = $values['targetIdentifier']; + $this->targetType = $values['targetType']; + $this->user = $values['user']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PermissionError.php b/fern/sdk/src/Types/PermissionError.php new file mode 100644 index 00000000..f47610b2 --- /dev/null +++ b/fern/sdk/src/Types/PermissionError.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PermissionErrorError.php b/fern/sdk/src/Types/PermissionErrorError.php new file mode 100644 index 00000000..87a22800 --- /dev/null +++ b/fern/sdk/src/Types/PermissionErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PermissionTargetType.php b/fern/sdk/src/Types/PermissionTargetType.php new file mode 100644 index 00000000..c597d773 --- /dev/null +++ b/fern/sdk/src/Types/PermissionTargetType.php @@ -0,0 +1,22 @@ +permissions = $values['permissions']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PermissionsPermissions.php b/fern/sdk/src/Types/PermissionsPermissions.php new file mode 100644 index 00000000..2b7ec2ea --- /dev/null +++ b/fern/sdk/src/Types/PermissionsPermissions.php @@ -0,0 +1,35 @@ + $permission + */ + #[JsonProperty('permission'), ArrayType([PermissionDocument::class])] + public array $permission; + + /** + * @param array{ + * permission: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->permission = $values['permission']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/Plan.php b/fern/sdk/src/Types/Plan.php new file mode 100644 index 00000000..6b19bfb8 --- /dev/null +++ b/fern/sdk/src/Types/Plan.php @@ -0,0 +1,37 @@ +plans = $values['plans']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PlanBooleanYesno.php b/fern/sdk/src/Types/PlanBooleanYesno.php new file mode 100644 index 00000000..aea15a84 --- /dev/null +++ b/fern/sdk/src/Types/PlanBooleanYesno.php @@ -0,0 +1,9 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PlanErrorError.php b/fern/sdk/src/Types/PlanErrorError.php new file mode 100644 index 00000000..6000e37b --- /dev/null +++ b/fern/sdk/src/Types/PlanErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PlanFamily.php b/fern/sdk/src/Types/PlanFamily.php new file mode 100644 index 00000000..1863d56a --- /dev/null +++ b/fern/sdk/src/Types/PlanFamily.php @@ -0,0 +1,13 @@ + $plan + */ + #[JsonProperty('plan'), ArrayType([PlanPlansPlanItem::class])] + public array $plan; + + /** + * @param array{ + * plan: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->plan = $values['plan']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PlanPlansPlanItem.php b/fern/sdk/src/Types/PlanPlansPlanItem.php new file mode 100644 index 00000000..164680d1 --- /dev/null +++ b/fern/sdk/src/Types/PlanPlansPlanItem.php @@ -0,0 +1,106 @@ + $family + */ + #[JsonProperty('family')] + public string $family; + + /** + * @var value-of $currentOffering + */ + #[JsonProperty('current_offering')] + public string $currentOffering; + + /** + * @param array{ + * coreNumber: int, + * memoryAmount: int, + * name: string, + * family: value-of, + * currentOffering: value-of, + * publicTrafficOut?: ?int, + * storageSize?: ?int, + * storageTier?: ?string, + * gpuAmount?: ?int, + * gpuModel?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->coreNumber = $values['coreNumber']; + $this->memoryAmount = $values['memoryAmount']; + $this->name = $values['name']; + $this->publicTrafficOut = $values['publicTrafficOut'] ?? null; + $this->storageSize = $values['storageSize'] ?? null; + $this->storageTier = $values['storageTier'] ?? null; + $this->gpuAmount = $values['gpuAmount'] ?? null; + $this->gpuModel = $values['gpuModel'] ?? null; + $this->family = $values['family']; + $this->currentOffering = $values['currentOffering']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PriceError.php b/fern/sdk/src/Types/PriceError.php new file mode 100644 index 00000000..5d4610db --- /dev/null +++ b/fern/sdk/src/Types/PriceError.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PriceError400.php b/fern/sdk/src/Types/PriceError400.php new file mode 100644 index 00000000..8de2b273 --- /dev/null +++ b/fern/sdk/src/Types/PriceError400.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PriceError400Error.php b/fern/sdk/src/Types/PriceError400Error.php new file mode 100644 index 00000000..85d3da36 --- /dev/null +++ b/fern/sdk/src/Types/PriceError400Error.php @@ -0,0 +1,42 @@ + $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @param array{ + * code: value-of, + * message: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->code = $values['code']; + $this->message = $values['message']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PriceError400ErrorCode.php b/fern/sdk/src/Types/PriceError400ErrorCode.php new file mode 100644 index 00000000..6c7151d7 --- /dev/null +++ b/fern/sdk/src/Types/PriceError400ErrorCode.php @@ -0,0 +1,8 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/Prices.php b/fern/sdk/src/Types/Prices.php new file mode 100644 index 00000000..13a650ff --- /dev/null +++ b/fern/sdk/src/Types/Prices.php @@ -0,0 +1,37 @@ +prices = $values['prices']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/PricesPrices.php b/fern/sdk/src/Types/PricesPrices.php new file mode 100644 index 00000000..c90a1c13 --- /dev/null +++ b/fern/sdk/src/Types/PricesPrices.php @@ -0,0 +1,43 @@ + $zone + */ + #[JsonProperty('zone'), ArrayType([ZonePrices::class])] + public array $zone; + + /** + * @param array{ + * currency: string, + * zone: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->currency = $values['currency']; + $this->zone = $values['zone']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ResizeStorageResponse.php b/fern/sdk/src/Types/ResizeStorageResponse.php new file mode 100644 index 00000000..bf88e002 --- /dev/null +++ b/fern/sdk/src/Types/ResizeStorageResponse.php @@ -0,0 +1,37 @@ +resizeBackup = $values['resizeBackup']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/Router.php b/fern/sdk/src/Types/Router.php new file mode 100644 index 00000000..17c63a62 --- /dev/null +++ b/fern/sdk/src/Types/Router.php @@ -0,0 +1,37 @@ +router = $values['router']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/RouterDetails.php b/fern/sdk/src/Types/RouterDetails.php new file mode 100644 index 00000000..94f1f52b --- /dev/null +++ b/fern/sdk/src/Types/RouterDetails.php @@ -0,0 +1,86 @@ + $attachedNetworkGateways Gateways of the networks attached to the router. + */ + #[JsonProperty('attached_network_gateways'), ArrayType([RouterDetailsAttachedNetworkGatewaysItem::class])] + public array $attachedNetworkGateways; + + /** + * @var RouterDetailsAttachedNetworks $attachedNetworks Networks attached to the router. + */ + #[JsonProperty('attached_networks')] + public RouterDetailsAttachedNetworks $attachedNetworks; + + /** + * @var array $labels + */ + #[JsonProperty('labels'), ArrayType([RouterLabel::class])] + public array $labels; + + /** + * @var string $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var array $staticRoutes + */ + #[JsonProperty('static_routes'), ArrayType([RouterRouteNexthop::class])] + public array $staticRoutes; + + /** + * @var value-of $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var string $uuid + */ + #[JsonProperty('uuid')] + public string $uuid; + + /** + * @param array{ + * attachedNetworkGateways: array, + * attachedNetworks: RouterDetailsAttachedNetworks, + * labels: array, + * name: string, + * staticRoutes: array, + * type: value-of, + * uuid: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->attachedNetworkGateways = $values['attachedNetworkGateways']; + $this->attachedNetworks = $values['attachedNetworks']; + $this->labels = $values['labels']; + $this->name = $values['name']; + $this->staticRoutes = $values['staticRoutes']; + $this->type = $values['type']; + $this->uuid = $values['uuid']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/RouterDetailsAttachedNetworkGatewaysItem.php b/fern/sdk/src/Types/RouterDetailsAttachedNetworkGatewaysItem.php new file mode 100644 index 00000000..a200198c --- /dev/null +++ b/fern/sdk/src/Types/RouterDetailsAttachedNetworkGatewaysItem.php @@ -0,0 +1,34 @@ +uuid = $values['uuid']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/RouterDetailsAttachedNetworks.php b/fern/sdk/src/Types/RouterDetailsAttachedNetworks.php new file mode 100644 index 00000000..87352d27 --- /dev/null +++ b/fern/sdk/src/Types/RouterDetailsAttachedNetworks.php @@ -0,0 +1,38 @@ + $network + */ + #[JsonProperty('network'), ArrayType([RouterDetailsAttachedNetworksNetworkItem::class])] + public array $network; + + /** + * @param array{ + * network: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->network = $values['network']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/RouterDetailsAttachedNetworksNetworkItem.php b/fern/sdk/src/Types/RouterDetailsAttachedNetworksNetworkItem.php new file mode 100644 index 00000000..5843d6ab --- /dev/null +++ b/fern/sdk/src/Types/RouterDetailsAttachedNetworksNetworkItem.php @@ -0,0 +1,34 @@ +uuid = $values['uuid']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/RouterError.php b/fern/sdk/src/Types/RouterError.php new file mode 100644 index 00000000..b5c1ef83 --- /dev/null +++ b/fern/sdk/src/Types/RouterError.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/RouterErrorError.php b/fern/sdk/src/Types/RouterErrorError.php new file mode 100644 index 00000000..15be2597 --- /dev/null +++ b/fern/sdk/src/Types/RouterErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/RouterLabel.php b/fern/sdk/src/Types/RouterLabel.php new file mode 100644 index 00000000..fc11930b --- /dev/null +++ b/fern/sdk/src/Types/RouterLabel.php @@ -0,0 +1,45 @@ +key = $values['key']; + $this->value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/RouterRouteNexthop.php b/fern/sdk/src/Types/RouterRouteNexthop.php new file mode 100644 index 00000000..b0402593 --- /dev/null +++ b/fern/sdk/src/Types/RouterRouteNexthop.php @@ -0,0 +1,67 @@ + + * ) $nexthop + */ + #[JsonProperty('nexthop')] + public string $nexthop; + + /** + * @var string $route + */ + #[JsonProperty('route')] + public string $route; + + /** + * @var value-of $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @param array{ + * name: string, + * nexthop: ( + * string + * |value-of + * ), + * route: string, + * type: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->nexthop = $values['nexthop']; + $this->route = $values['route']; + $this->type = $values['type']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/RouterRouteNexthopNexthopOne.php b/fern/sdk/src/Types/RouterRouteNexthopNexthopOne.php new file mode 100644 index 00000000..9d9c2c85 --- /dev/null +++ b/fern/sdk/src/Types/RouterRouteNexthopNexthopOne.php @@ -0,0 +1,8 @@ +routers = $values['routers']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/RoutersRouters.php b/fern/sdk/src/Types/RoutersRouters.php new file mode 100644 index 00000000..15c6032f --- /dev/null +++ b/fern/sdk/src/Types/RoutersRouters.php @@ -0,0 +1,35 @@ + $router + */ + #[JsonProperty('router'), ArrayType([RouterDetails::class])] + public array $router; + + /** + * @param array{ + * router: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->router = $values['router']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/Server.php b/fern/sdk/src/Types/Server.php new file mode 100644 index 00000000..97d47236 --- /dev/null +++ b/fern/sdk/src/Types/Server.php @@ -0,0 +1,37 @@ +server = $values['server']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerBooleanOnoff.php b/fern/sdk/src/Types/ServerBooleanOnoff.php new file mode 100644 index 00000000..f3aed284 --- /dev/null +++ b/fern/sdk/src/Types/ServerBooleanOnoff.php @@ -0,0 +1,9 @@ +stats = $values['stats']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerCpuStatsStats.php b/fern/sdk/src/Types/ServerCpuStatsStats.php new file mode 100644 index 00000000..5c434ac8 --- /dev/null +++ b/fern/sdk/src/Types/ServerCpuStatsStats.php @@ -0,0 +1,58 @@ +daily = $values['daily'] ?? null; + $this->monthly = $values['monthly'] ?? null; + $this->yearly = $values['yearly'] ?? null; + $this->weekly = $values['weekly'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerCpuStatsStatsDaily.php b/fern/sdk/src/Types/ServerCpuStatsStatsDaily.php new file mode 100644 index 00000000..eb1a908a --- /dev/null +++ b/fern/sdk/src/Types/ServerCpuStatsStatsDaily.php @@ -0,0 +1,34 @@ +summary = $values['summary']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerCpuStatsStatsMonthly.php b/fern/sdk/src/Types/ServerCpuStatsStatsMonthly.php new file mode 100644 index 00000000..6d914f46 --- /dev/null +++ b/fern/sdk/src/Types/ServerCpuStatsStatsMonthly.php @@ -0,0 +1,34 @@ +summary = $values['summary']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerCpuStatsStatsWeekly.php b/fern/sdk/src/Types/ServerCpuStatsStatsWeekly.php new file mode 100644 index 00000000..1828f86e --- /dev/null +++ b/fern/sdk/src/Types/ServerCpuStatsStatsWeekly.php @@ -0,0 +1,34 @@ +summary = $values['summary']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerCpuStatsStatsYearly.php b/fern/sdk/src/Types/ServerCpuStatsStatsYearly.php new file mode 100644 index 00000000..b50a77ff --- /dev/null +++ b/fern/sdk/src/Types/ServerCpuStatsStatsYearly.php @@ -0,0 +1,34 @@ +summary = $values['summary']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerCpuStatsSummary.php b/fern/sdk/src/Types/ServerCpuStatsSummary.php new file mode 100644 index 00000000..5078de1b --- /dev/null +++ b/fern/sdk/src/Types/ServerCpuStatsSummary.php @@ -0,0 +1,38 @@ + $variable + */ + #[JsonProperty('variable'), ArrayType([ServerCpuStatsSummaryVariableItem::class])] + public array $variable; + + /** + * @param array{ + * variable: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->variable = $values['variable']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerCpuStatsSummaryVariableItem.php b/fern/sdk/src/Types/ServerCpuStatsSummaryVariableItem.php new file mode 100644 index 00000000..9d189e26 --- /dev/null +++ b/fern/sdk/src/Types/ServerCpuStatsSummaryVariableItem.php @@ -0,0 +1,66 @@ + $title + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var string $maximum Maximum CPU usage during the period. + */ + #[JsonProperty('maximum')] + public string $maximum; + + /** + * @var string $total Total CPU time consumed during the period. + */ + #[JsonProperty('total')] + public string $total; + + /** + * @param array{ + * average: string, + * current: string, + * title: value-of, + * maximum: string, + * total: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->average = $values['average']; + $this->current = $values['current']; + $this->title = $values['title']; + $this->maximum = $values['maximum']; + $this->total = $values['total']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerCpuStatsSummaryVariableItemTitle.php b/fern/sdk/src/Types/ServerCpuStatsSummaryVariableItemTitle.php new file mode 100644 index 00000000..84b8525f --- /dev/null +++ b/fern/sdk/src/Types/ServerCpuStatsSummaryVariableItemTitle.php @@ -0,0 +1,8 @@ + $device + */ + #[JsonProperty('device'), ArrayType([ServerCreateDevicesDeviceItem::class])] + public array $device; + + /** + * @param array{ + * device: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->device = $values['device']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerCreateDevicesDeviceItem.php b/fern/sdk/src/Types/ServerCreateDevicesDeviceItem.php new file mode 100644 index 00000000..99d5cf15 --- /dev/null +++ b/fern/sdk/src/Types/ServerCreateDevicesDeviceItem.php @@ -0,0 +1,42 @@ +serial = $values['serial']; + $this->type = $values['type']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerCreateNetworking.php b/fern/sdk/src/Types/ServerCreateNetworking.php new file mode 100644 index 00000000..20375547 --- /dev/null +++ b/fern/sdk/src/Types/ServerCreateNetworking.php @@ -0,0 +1,37 @@ +interfaces = $values['interfaces']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerCreateNetworkingInterfaces.php b/fern/sdk/src/Types/ServerCreateNetworkingInterfaces.php new file mode 100644 index 00000000..e2b0c5c5 --- /dev/null +++ b/fern/sdk/src/Types/ServerCreateNetworkingInterfaces.php @@ -0,0 +1,35 @@ + $interface + */ + #[JsonProperty('interface'), ArrayType([ServerCreateNetworkingInterfacesInterfaceItem::class])] + public array $interface; + + /** + * @param array{ + * interface: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->interface = $values['interface']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerCreateNetworkingInterfacesInterfaceItem.php b/fern/sdk/src/Types/ServerCreateNetworkingInterfacesInterfaceItem.php new file mode 100644 index 00000000..b20f7ece --- /dev/null +++ b/fern/sdk/src/Types/ServerCreateNetworkingInterfacesInterfaceItem.php @@ -0,0 +1,74 @@ + $bootable + */ + #[JsonProperty('bootable')] + public ?string $bootable; + + /** + * @var ?int $index Index used to identify and order the network interface + */ + #[JsonProperty('index')] + public ?int $index; + + /** + * @var ServerCreateNetworkingInterfacesInterfaceItemIpAddresses $ipAddresses + */ + #[JsonProperty('ip_addresses')] + public ServerCreateNetworkingInterfacesInterfaceItemIpAddresses $ipAddresses; + + /** + * @var ?string $network + */ + #[JsonProperty('network')] + public ?string $network; + + /** + * @var ?value-of $sourceIpFiltering + */ + #[JsonProperty('source_ip_filtering')] + public ?string $sourceIpFiltering; + + /** + * @var value-of $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @param array{ + * ipAddresses: ServerCreateNetworkingInterfacesInterfaceItemIpAddresses, + * type: value-of, + * bootable?: ?value-of, + * index?: ?int, + * network?: ?string, + * sourceIpFiltering?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->bootable = $values['bootable'] ?? null; + $this->index = $values['index'] ?? null; + $this->ipAddresses = $values['ipAddresses']; + $this->network = $values['network'] ?? null; + $this->sourceIpFiltering = $values['sourceIpFiltering'] ?? null; + $this->type = $values['type']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerCreateNetworkingInterfacesInterfaceItemIpAddresses.php b/fern/sdk/src/Types/ServerCreateNetworkingInterfacesInterfaceItemIpAddresses.php new file mode 100644 index 00000000..d6e3eaf3 --- /dev/null +++ b/fern/sdk/src/Types/ServerCreateNetworkingInterfacesInterfaceItemIpAddresses.php @@ -0,0 +1,35 @@ + $ipAddress + */ + #[JsonProperty('ip_address'), ArrayType([ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem::class])] + public array $ipAddress; + + /** + * @param array{ + * ipAddress: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->ipAddress = $values['ipAddress']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem.php b/fern/sdk/src/Types/ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem.php new file mode 100644 index 00000000..f9b812b0 --- /dev/null +++ b/fern/sdk/src/Types/ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem.php @@ -0,0 +1,50 @@ + $dhcpProvided + */ + #[JsonProperty('dhcp_provided')] + public ?string $dhcpProvided; + + /** + * @var value-of $family + */ + #[JsonProperty('family')] + public string $family; + + /** + * @param array{ + * family: value-of, + * address?: ?string, + * dhcpProvided?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->address = $values['address'] ?? null; + $this->dhcpProvided = $values['dhcpProvided'] ?? null; + $this->family = $values['family']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerDetails.php b/fern/sdk/src/Types/ServerDetails.php new file mode 100644 index 00000000..4a9301f5 --- /dev/null +++ b/fern/sdk/src/Types/ServerDetails.php @@ -0,0 +1,356 @@ + $firewall + */ + #[JsonProperty('firewall')] + public ?string $firewall; + + /** + * @var ?value-of $firewallPrivate + */ + #[JsonProperty('firewall_private')] + public ?string $firewallPrivate; + + /** + * @var ?value-of $firewallPrivateDefaultIncomingAction + */ + #[JsonProperty('firewall_private_default_incoming_action')] + public ?string $firewallPrivateDefaultIncomingAction; + + /** + * @var ?value-of $firewallPrivateDefaultOutgoingAction + */ + #[JsonProperty('firewall_private_default_outgoing_action')] + public ?string $firewallPrivateDefaultOutgoingAction; + + /** + * @var ?value-of $firewallPublicDefaultIncomingAction + */ + #[JsonProperty('firewall_public_default_incoming_action')] + public ?string $firewallPublicDefaultIncomingAction; + + /** + * @var ?value-of $firewallPublicDefaultOutgoingAction + */ + #[JsonProperty('firewall_public_default_outgoing_action')] + public ?string $firewallPublicDefaultOutgoingAction; + + /** + * @var ?int $host + */ + #[JsonProperty('host')] + public ?int $host; + + /** + * @var string $hostname Cloud Server hostname. + */ + #[JsonProperty('hostname')] + public string $hostname; + + /** + * @var ?ServerIpAddresses $ipAddresses + */ + #[JsonProperty('ip_addresses')] + public ?ServerIpAddresses $ipAddresses; + + /** + * @var ?ServerLabels $labels + */ + #[JsonProperty('labels')] + public ?ServerLabels $labels; + + /** + * @var string $license Hourly license price + */ + #[JsonProperty('license')] + public string $license; + + /** + * @var string $memoryAmount Memory in MiB. + */ + #[JsonProperty('memory_amount')] + public string $memoryAmount; + + /** + * @var ?value-of $metadata + */ + #[JsonProperty('metadata')] + public ?string $metadata; + + /** + * @var ?ServerNetworking $networking + */ + #[JsonProperty('networking')] + public ?ServerNetworking $networking; + + /** + * @var ?value-of $nicModel + */ + #[JsonProperty('nic_model')] + public ?string $nicModel; + + /** + * @var ?string $plan + */ + #[JsonProperty('plan')] + public ?string $plan; + + /** + * @var ?string $planIpv4Bytes Public IPv4 outbound traffic this billing month, in bytes. + */ + #[JsonProperty('plan_ipv4_bytes')] + public ?string $planIpv4Bytes; + + /** + * @var ?string $planIpv6Bytes Public IPv6 outbound traffic this billing month, in bytes. + */ + #[JsonProperty('plan_ipv6_bytes')] + public ?string $planIpv6Bytes; + + /** + * @var ?string $password One-time login password returned when the Cloud Server is created. + */ + #[JsonProperty('password')] + public ?string $password; + + /** + * @var ?string $progress Progress percentage for an operation in progress. + */ + #[JsonProperty('progress')] + public ?string $progress; + + /** + * @var ?value-of $remoteAccessEnabled + */ + #[JsonProperty('remote_access_enabled')] + public ?string $remoteAccessEnabled; + + /** + * @var ?string $remoteAccessHost Remote access hostname. + */ + #[JsonProperty('remote_access_host')] + public ?string $remoteAccessHost; + + /** + * @var ?string $remoteAccessPassword + */ + #[JsonProperty('remote_access_password')] + public ?string $remoteAccessPassword; + + /** + * @var ?string $remoteAccessPort Remote access port. + */ + #[JsonProperty('remote_access_port')] + public ?string $remoteAccessPort; + + /** + * @var ?value-of $remoteAccessType + */ + #[JsonProperty('remote_access_type')] + public ?string $remoteAccessType; + + /** + * @var ?string $serverGroup + */ + #[JsonProperty('server_group')] + public ?string $serverGroup; + + /** + * @var ?string $simpleBackup + */ + #[JsonProperty('simple_backup')] + public ?string $simpleBackup; + + /** + * @var value-of $state + */ + #[JsonProperty('state')] + public string $state; + + /** + * @var ?ServerStorageDevicesResponse $storageDevices + */ + #[JsonProperty('storage_devices')] + public ?ServerStorageDevicesResponse $storageDevices; + + /** + * @var ( + * array + * |ServerTagsTag + * )|null $tags + */ + #[JsonProperty('tags'), Union(['string'], ServerTagsTag::class, 'null')] + public array|ServerTagsTag|null $tags; + + /** + * @var ?string $timezone Configured timezone. + */ + #[JsonProperty('timezone')] + public ?string $timezone; + + /** + * @var string $title Display title. + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var ?string $username + */ + #[JsonProperty('username')] + public ?string $username; + + /** + * @var string $uuid + */ + #[JsonProperty('uuid')] + public string $uuid; + + /** + * @var ?string $videoModel + */ + #[JsonProperty('video_model')] + public ?string $videoModel; + + /** + * @var string $zone + */ + #[JsonProperty('zone')] + public string $zone; + + /** + * @param array{ + * coreNumber: string, + * created: int, + * hostname: string, + * license: string, + * memoryAmount: string, + * state: value-of, + * title: string, + * uuid: string, + * zone: string, + * bootOrder?: ?string, + * devices?: ?ServerDetailsDevices, + * firewall?: ?value-of, + * firewallPrivate?: ?value-of, + * firewallPrivateDefaultIncomingAction?: ?value-of, + * firewallPrivateDefaultOutgoingAction?: ?value-of, + * firewallPublicDefaultIncomingAction?: ?value-of, + * firewallPublicDefaultOutgoingAction?: ?value-of, + * host?: ?int, + * ipAddresses?: ?ServerIpAddresses, + * labels?: ?ServerLabels, + * metadata?: ?value-of, + * networking?: ?ServerNetworking, + * nicModel?: ?value-of, + * plan?: ?string, + * planIpv4Bytes?: ?string, + * planIpv6Bytes?: ?string, + * password?: ?string, + * progress?: ?string, + * remoteAccessEnabled?: ?value-of, + * remoteAccessHost?: ?string, + * remoteAccessPassword?: ?string, + * remoteAccessPort?: ?string, + * remoteAccessType?: ?value-of, + * serverGroup?: ?string, + * simpleBackup?: ?string, + * storageDevices?: ?ServerStorageDevicesResponse, + * tags?: ( + * array + * |ServerTagsTag + * )|null, + * timezone?: ?string, + * username?: ?string, + * videoModel?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->bootOrder = $values['bootOrder'] ?? null; + $this->coreNumber = $values['coreNumber']; + $this->created = $values['created']; + $this->devices = $values['devices'] ?? null; + $this->firewall = $values['firewall'] ?? null; + $this->firewallPrivate = $values['firewallPrivate'] ?? null; + $this->firewallPrivateDefaultIncomingAction = $values['firewallPrivateDefaultIncomingAction'] ?? null; + $this->firewallPrivateDefaultOutgoingAction = $values['firewallPrivateDefaultOutgoingAction'] ?? null; + $this->firewallPublicDefaultIncomingAction = $values['firewallPublicDefaultIncomingAction'] ?? null; + $this->firewallPublicDefaultOutgoingAction = $values['firewallPublicDefaultOutgoingAction'] ?? null; + $this->host = $values['host'] ?? null; + $this->hostname = $values['hostname']; + $this->ipAddresses = $values['ipAddresses'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->license = $values['license']; + $this->memoryAmount = $values['memoryAmount']; + $this->metadata = $values['metadata'] ?? null; + $this->networking = $values['networking'] ?? null; + $this->nicModel = $values['nicModel'] ?? null; + $this->plan = $values['plan'] ?? null; + $this->planIpv4Bytes = $values['planIpv4Bytes'] ?? null; + $this->planIpv6Bytes = $values['planIpv6Bytes'] ?? null; + $this->password = $values['password'] ?? null; + $this->progress = $values['progress'] ?? null; + $this->remoteAccessEnabled = $values['remoteAccessEnabled'] ?? null; + $this->remoteAccessHost = $values['remoteAccessHost'] ?? null; + $this->remoteAccessPassword = $values['remoteAccessPassword'] ?? null; + $this->remoteAccessPort = $values['remoteAccessPort'] ?? null; + $this->remoteAccessType = $values['remoteAccessType'] ?? null; + $this->serverGroup = $values['serverGroup'] ?? null; + $this->simpleBackup = $values['simpleBackup'] ?? null; + $this->state = $values['state']; + $this->storageDevices = $values['storageDevices'] ?? null; + $this->tags = $values['tags'] ?? null; + $this->timezone = $values['timezone'] ?? null; + $this->title = $values['title']; + $this->username = $values['username'] ?? null; + $this->uuid = $values['uuid']; + $this->videoModel = $values['videoModel'] ?? null; + $this->zone = $values['zone']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerDetailsDevices.php b/fern/sdk/src/Types/ServerDetailsDevices.php new file mode 100644 index 00000000..bebfe1e8 --- /dev/null +++ b/fern/sdk/src/Types/ServerDetailsDevices.php @@ -0,0 +1,35 @@ + $device + */ + #[JsonProperty('device'), ArrayType([ServerDevice::class])] + public array $device; + + /** + * @param array{ + * device: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->device = $values['device']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerDetailsFirewallPrivateDefaultIncomingAction.php b/fern/sdk/src/Types/ServerDetailsFirewallPrivateDefaultIncomingAction.php new file mode 100644 index 00000000..1bff3aa2 --- /dev/null +++ b/fern/sdk/src/Types/ServerDetailsFirewallPrivateDefaultIncomingAction.php @@ -0,0 +1,9 @@ +serial = $values['serial']; + $this->type = $values['type']; + $this->model = $values['model']; + $this->metadata = $values['metadata']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerDeviceMetadata.php b/fern/sdk/src/Types/ServerDeviceMetadata.php new file mode 100644 index 00000000..4297695b --- /dev/null +++ b/fern/sdk/src/Types/ServerDeviceMetadata.php @@ -0,0 +1,50 @@ +serial = $values['serial']; + $this->memory = $values['memory']; + $this->cores = $values['cores']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerDiskStats.php b/fern/sdk/src/Types/ServerDiskStats.php new file mode 100644 index 00000000..6db58cf9 --- /dev/null +++ b/fern/sdk/src/Types/ServerDiskStats.php @@ -0,0 +1,37 @@ +stats = $values['stats']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerDiskStatsStats.php b/fern/sdk/src/Types/ServerDiskStatsStats.php new file mode 100644 index 00000000..069c4829 --- /dev/null +++ b/fern/sdk/src/Types/ServerDiskStatsStats.php @@ -0,0 +1,58 @@ +daily = $values['daily'] ?? null; + $this->monthly = $values['monthly'] ?? null; + $this->yearly = $values['yearly'] ?? null; + $this->weekly = $values['weekly'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerDiskStatsStatsDaily.php b/fern/sdk/src/Types/ServerDiskStatsStatsDaily.php new file mode 100644 index 00000000..3ff946c8 --- /dev/null +++ b/fern/sdk/src/Types/ServerDiskStatsStatsDaily.php @@ -0,0 +1,34 @@ +summary = $values['summary']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerDiskStatsStatsMonthly.php b/fern/sdk/src/Types/ServerDiskStatsStatsMonthly.php new file mode 100644 index 00000000..c68f9dd3 --- /dev/null +++ b/fern/sdk/src/Types/ServerDiskStatsStatsMonthly.php @@ -0,0 +1,34 @@ +summary = $values['summary']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerDiskStatsStatsWeekly.php b/fern/sdk/src/Types/ServerDiskStatsStatsWeekly.php new file mode 100644 index 00000000..a5d0c16f --- /dev/null +++ b/fern/sdk/src/Types/ServerDiskStatsStatsWeekly.php @@ -0,0 +1,34 @@ +summary = $values['summary']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerDiskStatsStatsYearly.php b/fern/sdk/src/Types/ServerDiskStatsStatsYearly.php new file mode 100644 index 00000000..2b5b9f68 --- /dev/null +++ b/fern/sdk/src/Types/ServerDiskStatsStatsYearly.php @@ -0,0 +1,34 @@ +summary = $values['summary']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerDiskStatsSummary.php b/fern/sdk/src/Types/ServerDiskStatsSummary.php new file mode 100644 index 00000000..7b32913a --- /dev/null +++ b/fern/sdk/src/Types/ServerDiskStatsSummary.php @@ -0,0 +1,38 @@ + $variable + */ + #[JsonProperty('variable'), ArrayType([ServerDiskStatsSummaryVariableItem::class])] + public array $variable; + + /** + * @param array{ + * variable: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->variable = $values['variable']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerDiskStatsSummaryVariableItem.php b/fern/sdk/src/Types/ServerDiskStatsSummaryVariableItem.php new file mode 100644 index 00000000..57105ca6 --- /dev/null +++ b/fern/sdk/src/Types/ServerDiskStatsSummaryVariableItem.php @@ -0,0 +1,66 @@ + $title + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var string $maximum Maximum transfer rate or request rate during the period. + */ + #[JsonProperty('maximum')] + public string $maximum; + + /** + * @var string $total Total transferred data or I/O requests during the period. + */ + #[JsonProperty('total')] + public string $total; + + /** + * @param array{ + * average: string, + * current: string, + * title: value-of, + * maximum: string, + * total: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->average = $values['average']; + $this->current = $values['current']; + $this->title = $values['title']; + $this->maximum = $values['maximum']; + $this->total = $values['total']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerDiskStatsSummaryVariableItemTitle.php b/fern/sdk/src/Types/ServerDiskStatsSummaryVariableItemTitle.php new file mode 100644 index 00000000..65b54c61 --- /dev/null +++ b/fern/sdk/src/Types/ServerDiskStatsSummaryVariableItemTitle.php @@ -0,0 +1,9 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerError400.php b/fern/sdk/src/Types/ServerError400.php new file mode 100644 index 00000000..9ef64930 --- /dev/null +++ b/fern/sdk/src/Types/ServerError400.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerError400Error.php b/fern/sdk/src/Types/ServerError400Error.php new file mode 100644 index 00000000..4bd4bfa8 --- /dev/null +++ b/fern/sdk/src/Types/ServerError400Error.php @@ -0,0 +1,42 @@ +code = $values['code']; + $this->message = $values['message']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerError403.php b/fern/sdk/src/Types/ServerError403.php new file mode 100644 index 00000000..8a143ba4 --- /dev/null +++ b/fern/sdk/src/Types/ServerError403.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerError403Error.php b/fern/sdk/src/Types/ServerError403Error.php new file mode 100644 index 00000000..4ef12d6c --- /dev/null +++ b/fern/sdk/src/Types/ServerError403Error.php @@ -0,0 +1,42 @@ +code = $values['code']; + $this->message = $values['message']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerError404.php b/fern/sdk/src/Types/ServerError404.php new file mode 100644 index 00000000..15414c84 --- /dev/null +++ b/fern/sdk/src/Types/ServerError404.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerError404Error.php b/fern/sdk/src/Types/ServerError404Error.php new file mode 100644 index 00000000..c9190e3f --- /dev/null +++ b/fern/sdk/src/Types/ServerError404Error.php @@ -0,0 +1,42 @@ +code = $values['code']; + $this->message = $values['message']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerError409.php b/fern/sdk/src/Types/ServerError409.php new file mode 100644 index 00000000..11233e4e --- /dev/null +++ b/fern/sdk/src/Types/ServerError409.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerError409Error.php b/fern/sdk/src/Types/ServerError409Error.php new file mode 100644 index 00000000..2f37f9c0 --- /dev/null +++ b/fern/sdk/src/Types/ServerError409Error.php @@ -0,0 +1,42 @@ +code = $values['code']; + $this->message = $values['message']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerError511.php b/fern/sdk/src/Types/ServerError511.php new file mode 100644 index 00000000..425d3484 --- /dev/null +++ b/fern/sdk/src/Types/ServerError511.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerError511Error.php b/fern/sdk/src/Types/ServerError511Error.php new file mode 100644 index 00000000..51df1227 --- /dev/null +++ b/fern/sdk/src/Types/ServerError511Error.php @@ -0,0 +1,42 @@ +code = $values['code']; + $this->message = $values['message']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerErrorError.php b/fern/sdk/src/Types/ServerErrorError.php new file mode 100644 index 00000000..c8b623e0 --- /dev/null +++ b/fern/sdk/src/Types/ServerErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerFirewallRule.php b/fern/sdk/src/Types/ServerFirewallRule.php new file mode 100644 index 00000000..e37e1058 --- /dev/null +++ b/fern/sdk/src/Types/ServerFirewallRule.php @@ -0,0 +1,37 @@ +firewallRule = $values['firewallRule']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerFirewallRuleItem.php b/fern/sdk/src/Types/ServerFirewallRuleItem.php new file mode 100644 index 00000000..95d9f984 --- /dev/null +++ b/fern/sdk/src/Types/ServerFirewallRuleItem.php @@ -0,0 +1,144 @@ + $action Action taken when the rule matches. + */ + #[JsonProperty('action')] + public string $action; + + /** + * @var ?string $comment Free-form rule description. + */ + #[JsonProperty('comment')] + public ?string $comment; + + /** + * @var ?string $destinationAddressEnd Last destination IP address in the range. Must be specified with destination_address_start. + */ + #[JsonProperty('destination_address_end')] + public ?string $destinationAddressEnd; + + /** + * @var ?string $destinationAddressStart First destination IP address in the range. Must be specified with destination_address_end. + */ + #[JsonProperty('destination_address_start')] + public ?string $destinationAddressStart; + + /** + * @var ?string $destinationPortEnd + */ + #[JsonProperty('destination_port_end')] + public ?string $destinationPortEnd; + + /** + * @var ?string $destinationPortStart + */ + #[JsonProperty('destination_port_start')] + public ?string $destinationPortStart; + + /** + * @var value-of $direction Traffic direction to which the rule applies. + */ + #[JsonProperty('direction')] + public string $direction; + + /** + * @var ?value-of $family IP address family. Required when protocol, addresses, ports, or ICMP type are specified. + */ + #[JsonProperty('family')] + public ?string $family; + + /** + * @var ?string $icmpType + */ + #[JsonProperty('icmp_type')] + public ?string $icmpType; + + /** + * @var ?value-of $protocol Network protocol to match. + */ + #[JsonProperty('protocol')] + public ?string $protocol; + + /** + * @var ?string $sourceAddressEnd Last source IP address in the range. Must be specified with source_address_start. + */ + #[JsonProperty('source_address_end')] + public ?string $sourceAddressEnd; + + /** + * @var ?string $sourceAddressStart First source IP address in the range. Must be specified with source_address_end. + */ + #[JsonProperty('source_address_start')] + public ?string $sourceAddressStart; + + /** + * @var ?string $sourcePortEnd + */ + #[JsonProperty('source_port_end')] + public ?string $sourcePortEnd; + + /** + * @var ?string $sourcePortStart + */ + #[JsonProperty('source_port_start')] + public ?string $sourcePortStart; + + /** + * @param array{ + * action: value-of, + * direction: value-of, + * comment?: ?string, + * destinationAddressEnd?: ?string, + * destinationAddressStart?: ?string, + * destinationPortEnd?: ?string, + * destinationPortStart?: ?string, + * family?: ?value-of, + * icmpType?: ?string, + * protocol?: ?value-of, + * sourceAddressEnd?: ?string, + * sourceAddressStart?: ?string, + * sourcePortEnd?: ?string, + * sourcePortStart?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->action = $values['action']; + $this->comment = $values['comment'] ?? null; + $this->destinationAddressEnd = $values['destinationAddressEnd'] ?? null; + $this->destinationAddressStart = $values['destinationAddressStart'] ?? null; + $this->destinationPortEnd = $values['destinationPortEnd'] ?? null; + $this->destinationPortStart = $values['destinationPortStart'] ?? null; + $this->direction = $values['direction']; + $this->family = $values['family'] ?? null; + $this->icmpType = $values['icmpType'] ?? null; + $this->protocol = $values['protocol'] ?? null; + $this->sourceAddressEnd = $values['sourceAddressEnd'] ?? null; + $this->sourceAddressStart = $values['sourceAddressStart'] ?? null; + $this->sourcePortEnd = $values['sourcePortEnd'] ?? null; + $this->sourcePortStart = $values['sourcePortStart'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerFirewallRuleItemAction.php b/fern/sdk/src/Types/ServerFirewallRuleItemAction.php new file mode 100644 index 00000000..0f9d6da0 --- /dev/null +++ b/fern/sdk/src/Types/ServerFirewallRuleItemAction.php @@ -0,0 +1,9 @@ +toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerFirewallRuleResponseItem.php b/fern/sdk/src/Types/ServerFirewallRuleResponseItem.php new file mode 100644 index 00000000..c3ea37fc --- /dev/null +++ b/fern/sdk/src/Types/ServerFirewallRuleResponseItem.php @@ -0,0 +1,149 @@ + $action Action taken when the rule matches. + */ + #[JsonProperty('action')] + public string $action; + + /** + * @var string $comment Free-form rule description. + */ + #[JsonProperty('comment')] + public string $comment; + + /** + * @var string $destinationAddressEnd Last destination IP address in the matched range, or an empty string when unrestricted. + */ + #[JsonProperty('destination_address_end')] + public string $destinationAddressEnd; + + /** + * @var string $destinationAddressStart First destination IP address in the matched range, or an empty string when unrestricted. + */ + #[JsonProperty('destination_address_start')] + public string $destinationAddressStart; + + /** + * @var string $destinationPortEnd Last destination port in the matched range, or an empty string when unrestricted. + */ + #[JsonProperty('destination_port_end')] + public string $destinationPortEnd; + + /** + * @var string $destinationPortStart First destination port in the matched range, or an empty string when unrestricted. + */ + #[JsonProperty('destination_port_start')] + public string $destinationPortStart; + + /** + * @var value-of $direction Traffic direction to which the rule applies. + */ + #[JsonProperty('direction')] + public string $direction; + + /** + * @var value-of $family IP address family, or an empty string when unrestricted. + */ + #[JsonProperty('family')] + public string $family; + + /** + * @var string $icmpType ICMP packet type, or an empty string when unrestricted. + */ + #[JsonProperty('icmp_type')] + public string $icmpType; + + /** + * @var string $position One-based position in the Cloud Server's firewall rule chain. + */ + #[JsonProperty('position')] + public string $position; + + /** + * @var value-of $protocol Matched network protocol, or an empty string when unrestricted. + */ + #[JsonProperty('protocol')] + public string $protocol; + + /** + * @var string $sourceAddressEnd Last source IP address in the matched range, or an empty string when unrestricted. + */ + #[JsonProperty('source_address_end')] + public string $sourceAddressEnd; + + /** + * @var string $sourceAddressStart First source IP address in the matched range, or an empty string when unrestricted. + */ + #[JsonProperty('source_address_start')] + public string $sourceAddressStart; + + /** + * @var string $sourcePortEnd Last source port in the matched range, or an empty string when unrestricted. + */ + #[JsonProperty('source_port_end')] + public string $sourcePortEnd; + + /** + * @var string $sourcePortStart First source port in the matched range, or an empty string when unrestricted. + */ + #[JsonProperty('source_port_start')] + public string $sourcePortStart; + + /** + * @param array{ + * action: value-of, + * comment: string, + * destinationAddressEnd: string, + * destinationAddressStart: string, + * destinationPortEnd: string, + * destinationPortStart: string, + * direction: value-of, + * family: value-of, + * icmpType: string, + * position: string, + * protocol: value-of, + * sourceAddressEnd: string, + * sourceAddressStart: string, + * sourcePortEnd: string, + * sourcePortStart: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->action = $values['action']; + $this->comment = $values['comment']; + $this->destinationAddressEnd = $values['destinationAddressEnd']; + $this->destinationAddressStart = $values['destinationAddressStart']; + $this->destinationPortEnd = $values['destinationPortEnd']; + $this->destinationPortStart = $values['destinationPortStart']; + $this->direction = $values['direction']; + $this->family = $values['family']; + $this->icmpType = $values['icmpType']; + $this->position = $values['position']; + $this->protocol = $values['protocol']; + $this->sourceAddressEnd = $values['sourceAddressEnd']; + $this->sourceAddressStart = $values['sourceAddressStart']; + $this->sourcePortEnd = $values['sourcePortEnd']; + $this->sourcePortStart = $values['sourcePortStart']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerFirewallRuleResponseItemAction.php b/fern/sdk/src/Types/ServerFirewallRuleResponseItemAction.php new file mode 100644 index 00000000..ea62f30a --- /dev/null +++ b/fern/sdk/src/Types/ServerFirewallRuleResponseItemAction.php @@ -0,0 +1,9 @@ +firewallRules = $values['firewallRules']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerFirewallRulesFirewallRules.php b/fern/sdk/src/Types/ServerFirewallRulesFirewallRules.php new file mode 100644 index 00000000..2d1b0742 --- /dev/null +++ b/fern/sdk/src/Types/ServerFirewallRulesFirewallRules.php @@ -0,0 +1,35 @@ + $firewallRule + */ + #[JsonProperty('firewall_rule'), ArrayType([ServerFirewallRuleResponseItem::class])] + public array $firewallRule; + + /** + * @param array{ + * firewallRule: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->firewallRule = $values['firewallRule']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerFirewallRulesetRelationship.php b/fern/sdk/src/Types/ServerFirewallRulesetRelationship.php new file mode 100644 index 00000000..efc20f78 --- /dev/null +++ b/fern/sdk/src/Types/ServerFirewallRulesetRelationship.php @@ -0,0 +1,53 @@ + $type Network interface class to which the ruleset applies. + */ + #[JsonProperty('type')] + public string $type; + + /** + * @param array{ + * firewallRulesetUuid: string, + * serverUuid: string, + * type: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->firewallRulesetUuid = $values['firewallRulesetUuid']; + $this->serverUuid = $values['serverUuid']; + $this->type = $values['type']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerFirewallRulesetRelationshipDetails.php b/fern/sdk/src/Types/ServerFirewallRulesetRelationshipDetails.php new file mode 100644 index 00000000..6e7d84bf --- /dev/null +++ b/fern/sdk/src/Types/ServerFirewallRulesetRelationshipDetails.php @@ -0,0 +1,95 @@ + $type Network interface class to which the ruleset applies. + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?DateTime $updatedAt Time when the relationship was last updated, or null if it has not been updated. + */ + #[JsonProperty('updated_at'), Date(Date::TYPE_DATETIME)] + public ?DateTime $updatedAt; + + /** + * @var int $version Ruleset version selected for the relationship. + */ + #[JsonProperty('version')] + public int $version; + + /** + * @param array{ + * createdAt: DateTime, + * firewallRulesetUuid: string, + * serverUuid: string, + * type: value-of, + * version: int, + * appliedVersion?: ?int, + * lastAppliedAt?: ?DateTime, + * updatedAt?: ?DateTime, + * } $values + */ + public function __construct( + array $values, + ) { + $this->appliedVersion = $values['appliedVersion'] ?? null; + $this->createdAt = $values['createdAt']; + $this->firewallRulesetUuid = $values['firewallRulesetUuid']; + $this->lastAppliedAt = $values['lastAppliedAt'] ?? null; + $this->serverUuid = $values['serverUuid']; + $this->type = $values['type']; + $this->updatedAt = $values['updatedAt'] ?? null; + $this->version = $values['version']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerFirewallRulesetRelationshipDetailsType.php b/fern/sdk/src/Types/ServerFirewallRulesetRelationshipDetailsType.php new file mode 100644 index 00000000..8a5e8ff3 --- /dev/null +++ b/fern/sdk/src/Types/ServerFirewallRulesetRelationshipDetailsType.php @@ -0,0 +1,8 @@ + $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?int $updatedAt + */ + #[JsonProperty('updated_at')] + public ?int $updatedAt; + + /** + * @var int $version + */ + #[JsonProperty('version')] + public int $version; + + /** + * @param array{ + * createdAt: int, + * firewallRulesetUuid: string, + * serverUuid: string, + * type: value-of, + * version: int, + * appliedVersion?: ?int, + * lastAppliedAt?: ?int, + * updatedAt?: ?int, + * } $values + */ + public function __construct( + array $values, + ) { + $this->appliedVersion = $values['appliedVersion'] ?? null; + $this->createdAt = $values['createdAt']; + $this->firewallRulesetUuid = $values['firewallRulesetUuid']; + $this->lastAppliedAt = $values['lastAppliedAt'] ?? null; + $this->serverUuid = $values['serverUuid']; + $this->type = $values['type']; + $this->updatedAt = $values['updatedAt'] ?? null; + $this->version = $values['version']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerFirewallRulesetRelationshipInternalType.php b/fern/sdk/src/Types/ServerFirewallRulesetRelationshipInternalType.php new file mode 100644 index 00000000..4ac6b789 --- /dev/null +++ b/fern/sdk/src/Types/ServerFirewallRulesetRelationshipInternalType.php @@ -0,0 +1,9 @@ +firewallRulesetRelationships = $values['firewallRulesetRelationships']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerFirewallRulesetRelationshipsFirewallRulesetRelationships.php b/fern/sdk/src/Types/ServerFirewallRulesetRelationshipsFirewallRulesetRelationships.php new file mode 100644 index 00000000..3796a4fe --- /dev/null +++ b/fern/sdk/src/Types/ServerFirewallRulesetRelationshipsFirewallRulesetRelationships.php @@ -0,0 +1,35 @@ + $private Private firewall rulesets attached to the Cloud Server. + */ + #[JsonProperty('private'), ArrayType([ServerFirewallRulesetRelationshipDetails::class])] + public array $private; + + /** + * @param array{ + * private: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->private = $values['private']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerGpus.php b/fern/sdk/src/Types/ServerGpus.php new file mode 100644 index 00000000..5299bc38 --- /dev/null +++ b/fern/sdk/src/Types/ServerGpus.php @@ -0,0 +1,38 @@ + $gpus + */ + #[JsonProperty('gpus'), ArrayType([ServerGpusGpusItem::class])] + public array $gpus; + + /** + * @param array{ + * gpus: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->gpus = $values['gpus']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerGpusGpusItem.php b/fern/sdk/src/Types/ServerGpusGpusItem.php new file mode 100644 index 00000000..8f95d557 --- /dev/null +++ b/fern/sdk/src/Types/ServerGpusGpusItem.php @@ -0,0 +1,74 @@ +firmware = $values['firmware'] ?? null; + $this->serial = $values['serial'] ?? null; + $this->part = $values['part'] ?? null; + $this->model = $values['model']; + $this->memoryGib = $values['memoryGib'] ?? null; + $this->cores = $values['cores'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerGroup.php b/fern/sdk/src/Types/ServerGroup.php new file mode 100644 index 00000000..d78852ce --- /dev/null +++ b/fern/sdk/src/Types/ServerGroup.php @@ -0,0 +1,37 @@ +serverGroup = $values['serverGroup']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerGroupAntiAffinity.php b/fern/sdk/src/Types/ServerGroupAntiAffinity.php new file mode 100644 index 00000000..b516c2ef --- /dev/null +++ b/fern/sdk/src/Types/ServerGroupAntiAffinity.php @@ -0,0 +1,10 @@ + $status Indicates whether the anti-affinity policy is currently being met ('met') or not ('unmet') + */ + #[JsonProperty('status')] + public string $status; + + /** + * @param array{ + * uuid: string, + * status: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->uuid = $values['uuid']; + $this->status = $values['status']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerGroupAntiAffinityStatusStatus.php b/fern/sdk/src/Types/ServerGroupAntiAffinityStatusStatus.php new file mode 100644 index 00000000..87b55e8d --- /dev/null +++ b/fern/sdk/src/Types/ServerGroupAntiAffinityStatusStatus.php @@ -0,0 +1,9 @@ + $antiAffinity + */ + #[JsonProperty('anti_affinity')] + public string $antiAffinity; + + /** + * @var array $antiAffinityStatus + */ + #[JsonProperty('anti_affinity_status'), ArrayType([ServerGroupAntiAffinityStatus::class])] + public array $antiAffinityStatus; + + /** + * @var ServerGroupDetailsLabels $labels List of labels associated with the server group. + */ + #[JsonProperty('labels')] + public ServerGroupDetailsLabels $labels; + + /** + * @var ServerGroupDetailsServers $servers List of servers associated with the server group. + */ + #[JsonProperty('servers')] + public ServerGroupDetailsServers $servers; + + /** + * @var string $title + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var string $uuid + */ + #[JsonProperty('uuid')] + public string $uuid; + + /** + * @param array{ + * antiAffinity: value-of, + * antiAffinityStatus: array, + * labels: ServerGroupDetailsLabels, + * servers: ServerGroupDetailsServers, + * title: string, + * uuid: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->antiAffinity = $values['antiAffinity']; + $this->antiAffinityStatus = $values['antiAffinityStatus']; + $this->labels = $values['labels']; + $this->servers = $values['servers']; + $this->title = $values['title']; + $this->uuid = $values['uuid']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerGroupDetailsLabels.php b/fern/sdk/src/Types/ServerGroupDetailsLabels.php new file mode 100644 index 00000000..4b772655 --- /dev/null +++ b/fern/sdk/src/Types/ServerGroupDetailsLabels.php @@ -0,0 +1,38 @@ + $label + */ + #[JsonProperty('label'), ArrayType([ServerGroupLabel::class])] + public array $label; + + /** + * @param array{ + * label: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->label = $values['label']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerGroupDetailsServers.php b/fern/sdk/src/Types/ServerGroupDetailsServers.php new file mode 100644 index 00000000..1ba328d3 --- /dev/null +++ b/fern/sdk/src/Types/ServerGroupDetailsServers.php @@ -0,0 +1,38 @@ + $server + */ + #[JsonProperty('server'), ArrayType(['string'])] + public array $server; + + /** + * @param array{ + * server: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->server = $values['server']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerGroupError.php b/fern/sdk/src/Types/ServerGroupError.php new file mode 100644 index 00000000..b5fd3c8a --- /dev/null +++ b/fern/sdk/src/Types/ServerGroupError.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerGroupErrorError.php b/fern/sdk/src/Types/ServerGroupErrorError.php new file mode 100644 index 00000000..f06c6389 --- /dev/null +++ b/fern/sdk/src/Types/ServerGroupErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerGroupLabel.php b/fern/sdk/src/Types/ServerGroupLabel.php new file mode 100644 index 00000000..594a1515 --- /dev/null +++ b/fern/sdk/src/Types/ServerGroupLabel.php @@ -0,0 +1,45 @@ +key = $values['key']; + $this->value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerGroupModify.php b/fern/sdk/src/Types/ServerGroupModify.php new file mode 100644 index 00000000..da17a6be --- /dev/null +++ b/fern/sdk/src/Types/ServerGroupModify.php @@ -0,0 +1,37 @@ +serverGroup = $values['serverGroup']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerGroupModifyServerGroup.php b/fern/sdk/src/Types/ServerGroupModifyServerGroup.php new file mode 100644 index 00000000..7d902610 --- /dev/null +++ b/fern/sdk/src/Types/ServerGroupModifyServerGroup.php @@ -0,0 +1,58 @@ + $antiAffinity + */ + #[JsonProperty('anti_affinity')] + public ?string $antiAffinity; + + /** + * @param array{ + * title?: ?string, + * servers?: ?ServerGroupServers, + * labels?: ?ServerGroupModifyServerGroupLabels, + * antiAffinity?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->title = $values['title'] ?? null; + $this->servers = $values['servers'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->antiAffinity = $values['antiAffinity'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerGroupModifyServerGroupLabels.php b/fern/sdk/src/Types/ServerGroupModifyServerGroupLabels.php new file mode 100644 index 00000000..2b6ef694 --- /dev/null +++ b/fern/sdk/src/Types/ServerGroupModifyServerGroupLabels.php @@ -0,0 +1,38 @@ + $label + */ + #[JsonProperty('label'), ArrayType([ServerGroupLabel::class])] + public ?array $label; + + /** + * @param array{ + * label?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->label = $values['label'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerGroupServers.php b/fern/sdk/src/Types/ServerGroupServers.php new file mode 100644 index 00000000..a7319921 --- /dev/null +++ b/fern/sdk/src/Types/ServerGroupServers.php @@ -0,0 +1,38 @@ + $servers + */ + #[JsonProperty('servers'), ArrayType(['string'])] + public array $servers; + + /** + * @param array{ + * servers: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->servers = $values['servers']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerGroups.php b/fern/sdk/src/Types/ServerGroups.php new file mode 100644 index 00000000..e132e423 --- /dev/null +++ b/fern/sdk/src/Types/ServerGroups.php @@ -0,0 +1,37 @@ +serverGroups = $values['serverGroups']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerGroupsServerGroups.php b/fern/sdk/src/Types/ServerGroupsServerGroups.php new file mode 100644 index 00000000..1aa2e06f --- /dev/null +++ b/fern/sdk/src/Types/ServerGroupsServerGroups.php @@ -0,0 +1,35 @@ + $serverGroup + */ + #[JsonProperty('server_group'), ArrayType([ServerGroupDetails::class])] + public array $serverGroup; + + /** + * @param array{ + * serverGroup: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->serverGroup = $values['serverGroup']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerInGetServerList.php b/fern/sdk/src/Types/ServerInGetServerList.php new file mode 100644 index 00000000..1fde2450 --- /dev/null +++ b/fern/sdk/src/Types/ServerInGetServerList.php @@ -0,0 +1,180 @@ + $state + */ + #[JsonProperty('state')] + public string $state; + + /** + * @var ( + * array + * |ServerTagsTag + * )|null $tags + */ + #[JsonProperty('tags'), Union(['string'], ServerTagsTag::class, 'null')] + public array|ServerTagsTag|null $tags; + + /** + * @var string $title Display title of the Cloud Server. + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var string $uuid + */ + #[JsonProperty('uuid')] + public string $uuid; + + /** + * @var string $zone + */ + #[JsonProperty('zone')] + public string $zone; + + /** + * @var ?string $serverGroup + */ + #[JsonProperty('server_group')] + public ?string $serverGroup; + + /** + * @param array{ + * created: int, + * coreNumber: string, + * hostname: string, + * license: string, + * memoryAmount: string, + * state: value-of, + * title: string, + * uuid: string, + * zone: string, + * host?: ?int, + * labels?: ?ServerInGetServerListLabels, + * plan?: ?string, + * planIpv4Bytes?: ?string, + * planIpv6Bytes?: ?string, + * progress?: ?string, + * simpleBackup?: ?string, + * tags?: ( + * array + * |ServerTagsTag + * )|null, + * serverGroup?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->created = $values['created']; + $this->coreNumber = $values['coreNumber']; + $this->host = $values['host'] ?? null; + $this->hostname = $values['hostname']; + $this->labels = $values['labels'] ?? null; + $this->license = $values['license']; + $this->memoryAmount = $values['memoryAmount']; + $this->plan = $values['plan'] ?? null; + $this->planIpv4Bytes = $values['planIpv4Bytes'] ?? null; + $this->planIpv6Bytes = $values['planIpv6Bytes'] ?? null; + $this->progress = $values['progress'] ?? null; + $this->simpleBackup = $values['simpleBackup'] ?? null; + $this->state = $values['state']; + $this->tags = $values['tags'] ?? null; + $this->title = $values['title']; + $this->uuid = $values['uuid']; + $this->zone = $values['zone']; + $this->serverGroup = $values['serverGroup'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerInGetServerListLabels.php b/fern/sdk/src/Types/ServerInGetServerListLabels.php new file mode 100644 index 00000000..f4e32678 --- /dev/null +++ b/fern/sdk/src/Types/ServerInGetServerListLabels.php @@ -0,0 +1,38 @@ + $label + */ + #[JsonProperty('label'), ArrayType([ServerLabel::class])] + public ?array $label; + + /** + * @param array{ + * label?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->label = $values['label'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerInterface.php b/fern/sdk/src/Types/ServerInterface.php new file mode 100644 index 00000000..4e7ea073 --- /dev/null +++ b/fern/sdk/src/Types/ServerInterface.php @@ -0,0 +1,85 @@ + $bootable + */ + #[JsonProperty('bootable')] + public ?string $bootable; + + /** + * @var ?int $index Index that identifies and orders the interface + */ + #[JsonProperty('index')] + public ?int $index; + + /** + * @var ?ServerInterfaceIpAddresses $ipAddresses IP addresses attached to the interface + */ + #[JsonProperty('ip_addresses')] + public ?ServerInterfaceIpAddresses $ipAddresses; + + /** + * @var ?string $mac + */ + #[JsonProperty('mac')] + public ?string $mac; + + /** + * @var string $network + */ + #[JsonProperty('network')] + public string $network; + + /** + * @var ?value-of $sourceIpFiltering + */ + #[JsonProperty('source_ip_filtering')] + public ?string $sourceIpFiltering; + + /** + * @var ?value-of $type + */ + #[JsonProperty('type')] + public ?string $type; + + /** + * @param array{ + * network: string, + * bootable?: ?value-of, + * index?: ?int, + * ipAddresses?: ?ServerInterfaceIpAddresses, + * mac?: ?string, + * sourceIpFiltering?: ?value-of, + * type?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->bootable = $values['bootable'] ?? null; + $this->index = $values['index'] ?? null; + $this->ipAddresses = $values['ipAddresses'] ?? null; + $this->mac = $values['mac'] ?? null; + $this->network = $values['network']; + $this->sourceIpFiltering = $values['sourceIpFiltering'] ?? null; + $this->type = $values['type'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerInterfaceIpAddress.php b/fern/sdk/src/Types/ServerInterfaceIpAddress.php new file mode 100644 index 00000000..3ea2f7e8 --- /dev/null +++ b/fern/sdk/src/Types/ServerInterfaceIpAddress.php @@ -0,0 +1,69 @@ + $dhcpProvided + */ + #[JsonProperty('dhcp_provided')] + public ?string $dhcpProvided; + + /** + * @var value-of $family + */ + #[JsonProperty('family')] + public string $family; + + /** + * @var ?value-of $floating + */ + #[JsonProperty('floating')] + public ?string $floating; + + /** + * @var ?value-of $releasePolicy + */ + #[JsonProperty('release_policy')] + public ?string $releasePolicy; + + /** + * @param array{ + * address: string, + * family: value-of, + * dhcpProvided?: ?value-of, + * floating?: ?value-of, + * releasePolicy?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->address = $values['address']; + $this->dhcpProvided = $values['dhcpProvided'] ?? null; + $this->family = $values['family']; + $this->floating = $values['floating'] ?? null; + $this->releasePolicy = $values['releasePolicy'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerInterfaceIpAddresses.php b/fern/sdk/src/Types/ServerInterfaceIpAddresses.php new file mode 100644 index 00000000..25f999dd --- /dev/null +++ b/fern/sdk/src/Types/ServerInterfaceIpAddresses.php @@ -0,0 +1,38 @@ + $ipAddress + */ + #[JsonProperty('ip_address'), ArrayType([ServerInterfaceIpAddress::class])] + public array $ipAddress; + + /** + * @param array{ + * ipAddress: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->ipAddress = $values['ipAddress']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerInterfaceResponse.php b/fern/sdk/src/Types/ServerInterfaceResponse.php new file mode 100644 index 00000000..5ab163a1 --- /dev/null +++ b/fern/sdk/src/Types/ServerInterfaceResponse.php @@ -0,0 +1,37 @@ +interface = $values['interface']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerIpAddressInterfaceResponse.php b/fern/sdk/src/Types/ServerIpAddressInterfaceResponse.php new file mode 100644 index 00000000..3eea97b3 --- /dev/null +++ b/fern/sdk/src/Types/ServerIpAddressInterfaceResponse.php @@ -0,0 +1,37 @@ +ipAddress = $values['ipAddress']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerIpAddresses.php b/fern/sdk/src/Types/ServerIpAddresses.php new file mode 100644 index 00000000..44d986dc --- /dev/null +++ b/fern/sdk/src/Types/ServerIpAddresses.php @@ -0,0 +1,38 @@ + $ipAddress + */ + #[JsonProperty('ip_address'), ArrayType([ServerIpAddressesIpAddressItem::class])] + public array $ipAddress; + + /** + * @param array{ + * ipAddress: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->ipAddress = $values['ipAddress']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerIpAddressesIpAddressItem.php b/fern/sdk/src/Types/ServerIpAddressesIpAddressItem.php new file mode 100644 index 00000000..5471c2dc --- /dev/null +++ b/fern/sdk/src/Types/ServerIpAddressesIpAddressItem.php @@ -0,0 +1,58 @@ + $access + */ + #[JsonProperty('access')] + public string $access; + + /** + * @var value-of $family + */ + #[JsonProperty('family')] + public string $family; + + /** + * @var ?string $prefix Network prefix length of the IP address + */ + #[JsonProperty('prefix')] + public ?string $prefix; + + /** + * @param array{ + * access: value-of, + * family: value-of, + * address?: ?string, + * prefix?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->address = $values['address'] ?? null; + $this->access = $values['access']; + $this->family = $values['family']; + $this->prefix = $values['prefix'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerIpFamily.php b/fern/sdk/src/Types/ServerIpFamily.php new file mode 100644 index 00000000..33072a5f --- /dev/null +++ b/fern/sdk/src/Types/ServerIpFamily.php @@ -0,0 +1,9 @@ +key = $values['key']; + $this->value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerLabels.php b/fern/sdk/src/Types/ServerLabels.php new file mode 100644 index 00000000..cc1a01fd --- /dev/null +++ b/fern/sdk/src/Types/ServerLabels.php @@ -0,0 +1,38 @@ + $label + */ + #[JsonProperty('label'), ArrayType([ServerLabel::class])] + public ?array $label; + + /** + * @param array{ + * label?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->label = $values['label'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerLegacyBoolean.php b/fern/sdk/src/Types/ServerLegacyBoolean.php new file mode 100644 index 00000000..fcf6ecbe --- /dev/null +++ b/fern/sdk/src/Types/ServerLegacyBoolean.php @@ -0,0 +1,17 @@ + $createPassword + */ + #[JsonProperty('create_password')] + public ?string $createPassword; + + /** + * @var ?ServerLoginUserSshKeys $sshKeys + */ + #[JsonProperty('ssh_keys')] + public ?ServerLoginUserSshKeys $sshKeys; + + /** + * @var ?string $username Username for logging in to the Cloud Server + */ + #[JsonProperty('username')] + public ?string $username; + + /** + * @param array{ + * createPassword?: ?value-of, + * sshKeys?: ?ServerLoginUserSshKeys, + * username?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->createPassword = $values['createPassword'] ?? null; + $this->sshKeys = $values['sshKeys'] ?? null; + $this->username = $values['username'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerLoginUserSshKeys.php b/fern/sdk/src/Types/ServerLoginUserSshKeys.php new file mode 100644 index 00000000..6c337a16 --- /dev/null +++ b/fern/sdk/src/Types/ServerLoginUserSshKeys.php @@ -0,0 +1,35 @@ + $sshKey + */ + #[JsonProperty('ssh_key'), ArrayType(['string'])] + public array $sshKey; + + /** + * @param array{ + * sshKey: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->sshKey = $values['sshKey']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerNetworkStats.php b/fern/sdk/src/Types/ServerNetworkStats.php new file mode 100644 index 00000000..7d67cd3a --- /dev/null +++ b/fern/sdk/src/Types/ServerNetworkStats.php @@ -0,0 +1,37 @@ +stats = $values['stats']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerNetworkStatsStats.php b/fern/sdk/src/Types/ServerNetworkStatsStats.php new file mode 100644 index 00000000..5ea2db7e --- /dev/null +++ b/fern/sdk/src/Types/ServerNetworkStatsStats.php @@ -0,0 +1,58 @@ +daily = $values['daily'] ?? null; + $this->monthly = $values['monthly'] ?? null; + $this->yearly = $values['yearly'] ?? null; + $this->weekly = $values['weekly'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerNetworkStatsStatsDaily.php b/fern/sdk/src/Types/ServerNetworkStatsStatsDaily.php new file mode 100644 index 00000000..5fcd08cf --- /dev/null +++ b/fern/sdk/src/Types/ServerNetworkStatsStatsDaily.php @@ -0,0 +1,34 @@ +summary = $values['summary']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerNetworkStatsStatsMonthly.php b/fern/sdk/src/Types/ServerNetworkStatsStatsMonthly.php new file mode 100644 index 00000000..a8666ade --- /dev/null +++ b/fern/sdk/src/Types/ServerNetworkStatsStatsMonthly.php @@ -0,0 +1,34 @@ +summary = $values['summary']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerNetworkStatsStatsWeekly.php b/fern/sdk/src/Types/ServerNetworkStatsStatsWeekly.php new file mode 100644 index 00000000..7d0f2795 --- /dev/null +++ b/fern/sdk/src/Types/ServerNetworkStatsStatsWeekly.php @@ -0,0 +1,34 @@ +summary = $values['summary']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerNetworkStatsStatsYearly.php b/fern/sdk/src/Types/ServerNetworkStatsStatsYearly.php new file mode 100644 index 00000000..dd53a67e --- /dev/null +++ b/fern/sdk/src/Types/ServerNetworkStatsStatsYearly.php @@ -0,0 +1,34 @@ +summary = $values['summary']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerNetworkStatsSummary.php b/fern/sdk/src/Types/ServerNetworkStatsSummary.php new file mode 100644 index 00000000..ab19b781 --- /dev/null +++ b/fern/sdk/src/Types/ServerNetworkStatsSummary.php @@ -0,0 +1,38 @@ + $variable + */ + #[JsonProperty('variable'), ArrayType([ServerNetworkStatsSummaryVariableItem::class])] + public array $variable; + + /** + * @param array{ + * variable: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->variable = $values['variable']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerNetworkStatsSummaryVariableItem.php b/fern/sdk/src/Types/ServerNetworkStatsSummaryVariableItem.php new file mode 100644 index 00000000..75c6726a --- /dev/null +++ b/fern/sdk/src/Types/ServerNetworkStatsSummaryVariableItem.php @@ -0,0 +1,66 @@ + $title + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var string $maximum Maximum bit rate or packet rate during the period. + */ + #[JsonProperty('maximum')] + public string $maximum; + + /** + * @var string $total Total transferred data or packets during the period. + */ + #[JsonProperty('total')] + public string $total; + + /** + * @param array{ + * average: string, + * current: string, + * title: value-of, + * maximum: string, + * total: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->average = $values['average']; + $this->current = $values['current']; + $this->title = $values['title']; + $this->maximum = $values['maximum']; + $this->total = $values['total']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerNetworkStatsSummaryVariableItemTitle.php b/fern/sdk/src/Types/ServerNetworkStatsSummaryVariableItemTitle.php new file mode 100644 index 00000000..0c1a482a --- /dev/null +++ b/fern/sdk/src/Types/ServerNetworkStatsSummaryVariableItemTitle.php @@ -0,0 +1,9 @@ +interfaces = $values['interfaces'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerNetworkingInterfaces.php b/fern/sdk/src/Types/ServerNetworkingInterfaces.php new file mode 100644 index 00000000..0b1007b9 --- /dev/null +++ b/fern/sdk/src/Types/ServerNetworkingInterfaces.php @@ -0,0 +1,38 @@ + $interface Network interfaces ordered by interface index + */ + #[JsonProperty('interface'), ArrayType([ServerInterface::class])] + public array $interface; + + /** + * @param array{ + * interface: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->interface = $values['interface']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerNetworkingResponse.php b/fern/sdk/src/Types/ServerNetworkingResponse.php new file mode 100644 index 00000000..a9baff71 --- /dev/null +++ b/fern/sdk/src/Types/ServerNetworkingResponse.php @@ -0,0 +1,37 @@ +networking = $values['networking']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerNicModel.php b/fern/sdk/src/Types/ServerNicModel.php new file mode 100644 index 00000000..cbefd6f3 --- /dev/null +++ b/fern/sdk/src/Types/ServerNicModel.php @@ -0,0 +1,10 @@ +server = $values['server']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerRemoteAccessDetailsServer.php b/fern/sdk/src/Types/ServerRemoteAccessDetailsServer.php new file mode 100644 index 00000000..2a7536d8 --- /dev/null +++ b/fern/sdk/src/Types/ServerRemoteAccessDetailsServer.php @@ -0,0 +1,89 @@ + $state + */ + #[JsonProperty('state')] + public string $state; + + /** + * @var string $vncHost + */ + #[JsonProperty('vnc_host')] + public string $vncHost; + + /** + * @var string $vncPassword + */ + #[JsonProperty('vnc_password')] + public string $vncPassword; + + /** + * @var ( + * int + * |value-of + * ) $vncPort + */ + #[JsonProperty('vnc_port'), Union('integer', 'string')] + public int|string $vncPort; + + /** + * @var value-of $remoteAccessType + */ + #[JsonProperty('remote_access_type')] + public string $remoteAccessType; + + /** + * @var value-of $remoteAccessEnabled + */ + #[JsonProperty('remote_access_enabled')] + public string $remoteAccessEnabled; + + /** + * @var string $remoteAccessPassword + */ + #[JsonProperty('remote_access_password')] + public string $remoteAccessPassword; + + /** + * @param array{ + * state: value-of, + * vncHost: string, + * vncPassword: string, + * vncPort: ( + * int + * |value-of + * ), + * remoteAccessType: value-of, + * remoteAccessEnabled: value-of, + * remoteAccessPassword: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->state = $values['state']; + $this->vncHost = $values['vncHost']; + $this->vncPassword = $values['vncPassword']; + $this->vncPort = $values['vncPort']; + $this->remoteAccessType = $values['remoteAccessType']; + $this->remoteAccessEnabled = $values['remoteAccessEnabled']; + $this->remoteAccessPassword = $values['remoteAccessPassword']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerRemoteAccessEnabled.php b/fern/sdk/src/Types/ServerRemoteAccessEnabled.php new file mode 100644 index 00000000..b6fa3af0 --- /dev/null +++ b/fern/sdk/src/Types/ServerRemoteAccessEnabled.php @@ -0,0 +1,9 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerSizeErrorError.php b/fern/sdk/src/Types/ServerSizeErrorError.php new file mode 100644 index 00000000..62251127 --- /dev/null +++ b/fern/sdk/src/Types/ServerSizeErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerSizeLimits.php b/fern/sdk/src/Types/ServerSizeLimits.php new file mode 100644 index 00000000..6ebc722c --- /dev/null +++ b/fern/sdk/src/Types/ServerSizeLimits.php @@ -0,0 +1,37 @@ +serverSizeLimits = $values['serverSizeLimits']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerSizeLimitsServerSizeLimits.php b/fern/sdk/src/Types/ServerSizeLimitsServerSizeLimits.php new file mode 100644 index 00000000..e8b7e58f --- /dev/null +++ b/fern/sdk/src/Types/ServerSizeLimitsServerSizeLimits.php @@ -0,0 +1,66 @@ +coreNumberMin = $values['coreNumberMin']; + $this->coreNumberMax = $values['coreNumberMax']; + $this->memoryAmountMin = $values['memoryAmountMin']; + $this->memoryAmountMax = $values['memoryAmountMax']; + $this->memoryAmountStep = $values['memoryAmountStep']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerSizes.php b/fern/sdk/src/Types/ServerSizes.php new file mode 100644 index 00000000..91becedc --- /dev/null +++ b/fern/sdk/src/Types/ServerSizes.php @@ -0,0 +1,37 @@ +serverSizes = $values['serverSizes']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerSizesServerSizes.php b/fern/sdk/src/Types/ServerSizesServerSizes.php new file mode 100644 index 00000000..dd51e94a --- /dev/null +++ b/fern/sdk/src/Types/ServerSizesServerSizes.php @@ -0,0 +1,35 @@ + $serverSize + */ + #[JsonProperty('server_size'), ArrayType([ServerSizesServerSizesServerSizeItem::class])] + public array $serverSize; + + /** + * @param array{ + * serverSize: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->serverSize = $values['serverSize']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerSizesServerSizesServerSizeItem.php b/fern/sdk/src/Types/ServerSizesServerSizesServerSizeItem.php new file mode 100644 index 00000000..80467573 --- /dev/null +++ b/fern/sdk/src/Types/ServerSizesServerSizesServerSizeItem.php @@ -0,0 +1,42 @@ +coreNumber = $values['coreNumber']; + $this->memoryAmount = $values['memoryAmount']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerState.php b/fern/sdk/src/Types/ServerState.php new file mode 100644 index 00000000..f5488788 --- /dev/null +++ b/fern/sdk/src/Types/ServerState.php @@ -0,0 +1,12 @@ + $storageDevice + */ + #[JsonProperty('storage_device'), ArrayType([ServerStorageDevicesStorageDeviceItem::class])] + public array $storageDevice; + + /** + * @param array{ + * storageDevice: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->storageDevice = $values['storageDevice']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerStorageDevicesResponse.php b/fern/sdk/src/Types/ServerStorageDevicesResponse.php new file mode 100644 index 00000000..570961ad --- /dev/null +++ b/fern/sdk/src/Types/ServerStorageDevicesResponse.php @@ -0,0 +1,38 @@ + $storageDevice + */ + #[JsonProperty('storage_device'), ArrayType([ServerStorageDevicesResponseStorageDeviceItem::class])] + public array $storageDevice; + + /** + * @param array{ + * storageDevice: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->storageDevice = $values['storageDevice']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerStorageDevicesResponseStorageDeviceItem.php b/fern/sdk/src/Types/ServerStorageDevicesResponseStorageDeviceItem.php new file mode 100644 index 00000000..576bf112 --- /dev/null +++ b/fern/sdk/src/Types/ServerStorageDevicesResponseStorageDeviceItem.php @@ -0,0 +1,107 @@ + $bootDisk Whether this device is the Cloud Server's boot disk, encoded as 0 or 1. + */ + #[JsonProperty('boot_disk')] + public string $bootDisk; + + /** + * @var array $labels Labels assigned to the storage resource. + */ + #[JsonProperty('labels'), ArrayType([ServerLabel::class])] + public array $labels; + + /** + * @var ?value-of $partOfPlan + */ + #[JsonProperty('part_of_plan')] + public ?string $partOfPlan; + + /** + * @var string $storage Storage resource UUID. Empty for an unloaded CD-ROM device. + */ + #[JsonProperty('storage')] + public string $storage; + + /** + * @var value-of $storageEncrypted + */ + #[JsonProperty('storage_encrypted')] + public string $storageEncrypted; + + /** + * @var int $storageSize Storage resource size in gibibytes. + */ + #[JsonProperty('storage_size')] + public int $storageSize; + + /** + * @var ?string $storageTier Storage resource performance tier. + */ + #[JsonProperty('storage_tier')] + public ?string $storageTier; + + /** + * @var string $storageTitle Storage resource title. + */ + #[JsonProperty('storage_title')] + public string $storageTitle; + + /** + * @var value-of $type Attached device type. + */ + #[JsonProperty('type')] + public string $type; + + /** + * @param array{ + * address: string, + * bootDisk: value-of, + * labels: array, + * storage: string, + * storageEncrypted: value-of, + * storageSize: int, + * storageTitle: string, + * type: value-of, + * partOfPlan?: ?value-of, + * storageTier?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->address = $values['address']; + $this->bootDisk = $values['bootDisk']; + $this->labels = $values['labels']; + $this->partOfPlan = $values['partOfPlan'] ?? null; + $this->storage = $values['storage']; + $this->storageEncrypted = $values['storageEncrypted']; + $this->storageSize = $values['storageSize']; + $this->storageTier = $values['storageTier'] ?? null; + $this->storageTitle = $values['storageTitle']; + $this->type = $values['type']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerStorageDevicesResponseStorageDeviceItemBootDisk.php b/fern/sdk/src/Types/ServerStorageDevicesResponseStorageDeviceItemBootDisk.php new file mode 100644 index 00000000..d317a74e --- /dev/null +++ b/fern/sdk/src/Types/ServerStorageDevicesResponseStorageDeviceItemBootDisk.php @@ -0,0 +1,9 @@ + $action Method used to create, clone, or attach storage for the device + */ + #[JsonProperty('action')] + public string $action; + + /** + * @var ?string $address Device address on the Cloud Server + */ + #[JsonProperty('address')] + public ?string $address; + + /** + * @var ?ServerStorageDevicesStorageDeviceItemBackupRule $backupRule + */ + #[JsonProperty('backup_rule')] + public ?ServerStorageDevicesStorageDeviceItemBackupRule $backupRule; + + /** + * @var ?value-of $encrypted + */ + #[JsonProperty('encrypted')] + public ?string $encrypted; + + /** + * @var ?array $labels + */ + #[JsonProperty('labels'), ArrayType([ServerLabel::class])] + public ?array $labels; + + /** + * @var ( + * int + * |string + * )|null $size Requested block storage size in gigabytes + */ + #[JsonProperty('size'), Union('integer', 'string', 'null')] + public int|string|null $size; + + /** + * @var ?string $storage UUID of the storage resource to attach or clone + */ + #[JsonProperty('storage')] + public ?string $storage; + + /** + * @var ?string $tier Performance and pricing tier of the block storage + */ + #[JsonProperty('tier')] + public ?string $tier; + + /** + * @var ?string $title Short informational description of the block storage + */ + #[JsonProperty('title')] + public ?string $title; + + /** + * @var ?string $type Storage device type: disk or cdrom + */ + #[JsonProperty('type')] + public ?string $type; + + /** + * @param array{ + * action: value-of, + * address?: ?string, + * backupRule?: ?ServerStorageDevicesStorageDeviceItemBackupRule, + * encrypted?: ?value-of, + * labels?: ?array, + * size?: ( + * int + * |string + * )|null, + * storage?: ?string, + * tier?: ?string, + * title?: ?string, + * type?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->action = $values['action']; + $this->address = $values['address'] ?? null; + $this->backupRule = $values['backupRule'] ?? null; + $this->encrypted = $values['encrypted'] ?? null; + $this->labels = $values['labels'] ?? null; + $this->size = $values['size'] ?? null; + $this->storage = $values['storage'] ?? null; + $this->tier = $values['tier'] ?? null; + $this->title = $values['title'] ?? null; + $this->type = $values['type'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerStorageDevicesStorageDeviceItemAction.php b/fern/sdk/src/Types/ServerStorageDevicesStorageDeviceItemAction.php new file mode 100644 index 00000000..c7bc78db --- /dev/null +++ b/fern/sdk/src/Types/ServerStorageDevicesStorageDeviceItemAction.php @@ -0,0 +1,10 @@ +interval = $values['interval'] ?? null; + $this->retention = $values['retention'] ?? null; + $this->time = $values['time'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerTagsTag.php b/fern/sdk/src/Types/ServerTagsTag.php new file mode 100644 index 00000000..14a36820 --- /dev/null +++ b/fern/sdk/src/Types/ServerTagsTag.php @@ -0,0 +1,35 @@ + $tag + */ + #[JsonProperty('tag'), ArrayType(['string'])] + public array $tag; + + /** + * @param array{ + * tag: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->tag = $values['tag']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ServerVncPortOne.php b/fern/sdk/src/Types/ServerVncPortOne.php new file mode 100644 index 00000000..d177763b --- /dev/null +++ b/fern/sdk/src/Types/ServerVncPortOne.php @@ -0,0 +1,8 @@ +storage = $values['storage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/StorageAccess.php b/fern/sdk/src/Types/StorageAccess.php new file mode 100644 index 00000000..fbd46160 --- /dev/null +++ b/fern/sdk/src/Types/StorageAccess.php @@ -0,0 +1,10 @@ + $interval Weekday when the backup is created, or `daily` to create a backup every day at the same time. + */ + #[JsonProperty('interval')] + public string $interval; + + /** + * @var string $time UTC time of day when the backup is created, in `HHMM` format. + */ + #[JsonProperty('time')] + public string $time; + + /** + * @var string $retention Number of days before the backup is automatically deleted, from 1 through 1095. + */ + #[JsonProperty('retention')] + public string $retention; + + /** + * @param array{ + * interval: value-of, + * time: string, + * retention: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->interval = $values['interval']; + $this->time = $values['time']; + $this->retention = $values['retention']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/StorageBackupRuleInterval.php b/fern/sdk/src/Types/StorageBackupRuleInterval.php new file mode 100644 index 00000000..c59e822c --- /dev/null +++ b/fern/sdk/src/Types/StorageBackupRuleInterval.php @@ -0,0 +1,15 @@ + $access + */ + #[JsonProperty('access')] + public string $access; + + /** + * @var value-of $encrypted + */ + #[JsonProperty('encrypted')] + public string $encrypted; + + /** + * @var array $labels Labels describing and classifying the storage resource. + */ + #[JsonProperty('labels'), ArrayType([StorageLabel::class])] + public array $labels; + + /** + * @var float $license Hourly license cost in credits when the storage resource contains a licensed operating system. + */ + #[JsonProperty('license')] + public float $license; + + /** + * @var ( + * StorageBackupRule + * |array + * )|null $backupRule Schedule for automatic backups of the storage resource. An empty object indicates that no automatic backup schedule is configured. + */ + #[JsonProperty('backup_rule'), Union(StorageBackupRule::class, ['string' => 'mixed'], 'null')] + public StorageBackupRule|array|null $backupRule; + + /** + * @var ?StorageDetailsBackups $backups Backups associated with this storage resource. + */ + #[JsonProperty('backups')] + public ?StorageDetailsBackups $backups; + + /** + * @var ?DateTime $created Time when the private storage resource was created. + */ + #[JsonProperty('created'), Date(Date::TYPE_DATETIME)] + public ?DateTime $created; + + /** + * @var ?string $origin + */ + #[JsonProperty('origin')] + public ?string $origin; + + /** + * @var ?value-of $partOfPlan Present with the value `yes` when the storage resource is included in a Cloud Server plan. + */ + #[JsonProperty('part_of_plan')] + public ?string $partOfPlan; + + /** + * @var ?string $progress Progress of an ongoing storage operation when available. + */ + #[JsonProperty('progress')] + public ?string $progress; + + /** + * @var StorageDetailsServers $servers Cloud Servers to which the storage resource is attached. + */ + #[JsonProperty('servers')] + public StorageDetailsServers $servers; + + /** + * @var int $size Size of the storage resource in gigabytes. + */ + #[JsonProperty('size')] + public int $size; + + /** + * @var value-of $state + */ + #[JsonProperty('state')] + public string $state; + + /** + * @var ?value-of $tier + */ + #[JsonProperty('tier')] + public ?string $tier; + + /** + * @var string $title A short, informational description of the storage resource. + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var value-of $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?value-of $templateType + */ + #[JsonProperty('template_type')] + public ?string $templateType; + + /** + * @var string $uuid + */ + #[JsonProperty('uuid')] + public string $uuid; + + /** + * @var ?string $zone + */ + #[JsonProperty('zone')] + public ?string $zone; + + /** + * @param array{ + * access: value-of, + * encrypted: value-of, + * labels: array, + * license: float, + * servers: StorageDetailsServers, + * size: int, + * state: value-of, + * title: string, + * type: value-of, + * uuid: string, + * backupRule?: ( + * StorageBackupRule + * |array + * )|null, + * backups?: ?StorageDetailsBackups, + * created?: ?DateTime, + * origin?: ?string, + * partOfPlan?: ?value-of, + * progress?: ?string, + * tier?: ?value-of, + * templateType?: ?value-of, + * zone?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->access = $values['access']; + $this->encrypted = $values['encrypted']; + $this->labels = $values['labels']; + $this->license = $values['license']; + $this->backupRule = $values['backupRule'] ?? null; + $this->backups = $values['backups'] ?? null; + $this->created = $values['created'] ?? null; + $this->origin = $values['origin'] ?? null; + $this->partOfPlan = $values['partOfPlan'] ?? null; + $this->progress = $values['progress'] ?? null; + $this->servers = $values['servers']; + $this->size = $values['size']; + $this->state = $values['state']; + $this->tier = $values['tier'] ?? null; + $this->title = $values['title']; + $this->type = $values['type']; + $this->templateType = $values['templateType'] ?? null; + $this->uuid = $values['uuid']; + $this->zone = $values['zone'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/StorageDetailsBackups.php b/fern/sdk/src/Types/StorageDetailsBackups.php new file mode 100644 index 00000000..545193cf --- /dev/null +++ b/fern/sdk/src/Types/StorageDetailsBackups.php @@ -0,0 +1,38 @@ + $backup UUIDs of backups associated with this storage resource. + */ + #[JsonProperty('backup'), ArrayType(['string'])] + public array $backup; + + /** + * @param array{ + * backup: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->backup = $values['backup']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/StorageDetailsPartOfPlan.php b/fern/sdk/src/Types/StorageDetailsPartOfPlan.php new file mode 100644 index 00000000..9542e7b5 --- /dev/null +++ b/fern/sdk/src/Types/StorageDetailsPartOfPlan.php @@ -0,0 +1,8 @@ + $server UUIDs of Cloud Servers to which the storage resource is attached. + */ + #[JsonProperty('server'), ArrayType(['string'])] + public array $server; + + /** + * @param array{ + * server: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->server = $values['server']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/StorageEncrypted.php b/fern/sdk/src/Types/StorageEncrypted.php new file mode 100644 index 00000000..a5ab91ad --- /dev/null +++ b/fern/sdk/src/Types/StorageEncrypted.php @@ -0,0 +1,9 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/StorageErrorError.php b/fern/sdk/src/Types/StorageErrorError.php new file mode 100644 index 00000000..be3aac26 --- /dev/null +++ b/fern/sdk/src/Types/StorageErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/StorageImport.php b/fern/sdk/src/Types/StorageImport.php new file mode 100644 index 00000000..00c905ca --- /dev/null +++ b/fern/sdk/src/Types/StorageImport.php @@ -0,0 +1,158 @@ + + * |DateTime + * ) $completed Completion time in RFC 3339 format, or an empty string while unfinished. + */ + #[JsonProperty('completed'), Union('string', 'datetime')] + public string|DateTime $completed; + + /** + * @var DateTime $created Time when the import task was created. + */ + #[JsonProperty('created'), Date(Date::TYPE_DATETIME)] + public DateTime $created; + + /** + * @var ?string $directUploadUrl Temporary URL to which image data is uploaded in `direct_upload` mode. + */ + #[JsonProperty('direct_upload_url')] + public ?string $directUploadUrl; + + /** + * @var value-of $errorCode Failure category, empty unless the task failed. + */ + #[JsonProperty('error_code')] + public string $errorCode; + + /** + * @var string $errorMessage Failure details, empty unless the task failed. + */ + #[JsonProperty('error_message')] + public string $errorMessage; + + /** + * @var string $md5Sum MD5 checksum of the imported data, available after completion. + */ + #[JsonProperty('md5sum')] + public string $md5Sum; + + /** + * @var int $readBytes Number of bytes read from the source. + */ + #[JsonProperty('read_bytes')] + public int $readBytes; + + /** + * @var string $sha256Sum SHA-256 checksum of the imported data, available after completion. + */ + #[JsonProperty('sha256sum')] + public string $sha256Sum; + + /** + * @var value-of $source Import mode. + */ + #[JsonProperty('source')] + public string $source; + + /** + * @var ?string $sourceLocation HTTP or HTTPS source URL for an `http_import` task. + */ + #[JsonProperty('source_location')] + public ?string $sourceLocation; + + /** + * @var value-of $state Current import task state. + */ + #[JsonProperty('state')] + public string $state; + + /** + * @var string $uuid + */ + #[JsonProperty('uuid')] + public string $uuid; + + /** + * @var int $writtenBytes Number of bytes written to the storage resource. + */ + #[JsonProperty('written_bytes')] + public int $writtenBytes; + + /** + * @param array{ + * clientContentLength: int, + * clientContentType: string, + * completed: ( + * value-of + * |DateTime + * ), + * created: DateTime, + * errorCode: value-of, + * errorMessage: string, + * md5Sum: string, + * readBytes: int, + * sha256Sum: string, + * source: value-of, + * state: value-of, + * uuid: string, + * writtenBytes: int, + * directUploadUrl?: ?string, + * sourceLocation?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->clientContentLength = $values['clientContentLength']; + $this->clientContentType = $values['clientContentType']; + $this->completed = $values['completed']; + $this->created = $values['created']; + $this->directUploadUrl = $values['directUploadUrl'] ?? null; + $this->errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + $this->md5Sum = $values['md5Sum']; + $this->readBytes = $values['readBytes']; + $this->sha256Sum = $values['sha256Sum']; + $this->source = $values['source']; + $this->sourceLocation = $values['sourceLocation'] ?? null; + $this->state = $values['state']; + $this->uuid = $values['uuid']; + $this->writtenBytes = $values['writtenBytes']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/StorageImportCompletedZero.php b/fern/sdk/src/Types/StorageImportCompletedZero.php new file mode 100644 index 00000000..46d4692b --- /dev/null +++ b/fern/sdk/src/Types/StorageImportCompletedZero.php @@ -0,0 +1,8 @@ +storageImport = $values['storageImport']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/StorageImportSource.php b/fern/sdk/src/Types/StorageImportSource.php new file mode 100644 index 00000000..41cd08e0 --- /dev/null +++ b/fern/sdk/src/Types/StorageImportSource.php @@ -0,0 +1,9 @@ +key = $values['key']; + $this->value = $values['value']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/StorageListItem.php b/fern/sdk/src/Types/StorageListItem.php new file mode 100644 index 00000000..7cbcaf38 --- /dev/null +++ b/fern/sdk/src/Types/StorageListItem.php @@ -0,0 +1,160 @@ + $access + */ + #[JsonProperty('access')] + public string $access; + + /** + * @var value-of $encrypted + */ + #[JsonProperty('encrypted')] + public string $encrypted; + + /** + * @var array $labels Labels describing and classifying the storage resource. + */ + #[JsonProperty('labels'), ArrayType([StorageLabel::class])] + public array $labels; + + /** + * @var float $license Hourly license fee in credits. The value is `0` when the storage resource has no license fee. + */ + #[JsonProperty('license')] + public float $license; + + /** + * @var ?value-of $partOfPlan Present with value `yes` when the storage resource is included in the Cloud Server plan. + */ + #[JsonProperty('part_of_plan')] + public ?string $partOfPlan; + + /** + * @var ?string $progress Progress of an active storage operation. + */ + #[JsonProperty('progress')] + public ?string $progress; + + /** + * @var ?DateTime $created Time when the private storage resource or backup was created. + */ + #[JsonProperty('created'), Date(Date::TYPE_DATETIME)] + public ?DateTime $created; + + /** + * @var ?string $origin + */ + #[JsonProperty('origin')] + public ?string $origin; + + /** + * @var int $size Size of the storage resource in gigabytes. + */ + #[JsonProperty('size')] + public int $size; + + /** + * @var value-of $state + */ + #[JsonProperty('state')] + public string $state; + + /** + * @var ?value-of $tier + */ + #[JsonProperty('tier')] + public ?string $tier; + + /** + * @var string $title A short, informational description of the storage resource. + */ + #[JsonProperty('title')] + public string $title; + + /** + * @var value-of $type + */ + #[JsonProperty('type')] + public string $type; + + /** + * @var ?value-of $templateType + */ + #[JsonProperty('template_type')] + public ?string $templateType; + + /** + * @var string $uuid + */ + #[JsonProperty('uuid')] + public string $uuid; + + /** + * @var ?string $zone + */ + #[JsonProperty('zone')] + public ?string $zone; + + /** + * @param array{ + * access: value-of, + * encrypted: value-of, + * labels: array, + * license: float, + * size: int, + * state: value-of, + * title: string, + * type: value-of, + * uuid: string, + * partOfPlan?: ?value-of, + * progress?: ?string, + * created?: ?DateTime, + * origin?: ?string, + * tier?: ?value-of, + * templateType?: ?value-of, + * zone?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->access = $values['access']; + $this->encrypted = $values['encrypted']; + $this->labels = $values['labels']; + $this->license = $values['license']; + $this->partOfPlan = $values['partOfPlan'] ?? null; + $this->progress = $values['progress'] ?? null; + $this->created = $values['created'] ?? null; + $this->origin = $values['origin'] ?? null; + $this->size = $values['size']; + $this->state = $values['state']; + $this->tier = $values['tier'] ?? null; + $this->title = $values['title']; + $this->type = $values['type']; + $this->templateType = $values['templateType'] ?? null; + $this->uuid = $values['uuid']; + $this->zone = $values['zone'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/StorageListItemPartOfPlan.php b/fern/sdk/src/Types/StorageListItemPartOfPlan.php new file mode 100644 index 00000000..e7003c0f --- /dev/null +++ b/fern/sdk/src/Types/StorageListItemPartOfPlan.php @@ -0,0 +1,8 @@ +storages = $values['storages']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/StoragesStorages.php b/fern/sdk/src/Types/StoragesStorages.php new file mode 100644 index 00000000..e91d48ce --- /dev/null +++ b/fern/sdk/src/Types/StoragesStorages.php @@ -0,0 +1,35 @@ + $storage + */ + #[JsonProperty('storage'), ArrayType([StorageListItem::class])] + public array $storage; + + /** + * @param array{ + * storage: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->storage = $values['storage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/Tag.php b/fern/sdk/src/Types/Tag.php new file mode 100644 index 00000000..ae1140e2 --- /dev/null +++ b/fern/sdk/src/Types/Tag.php @@ -0,0 +1,37 @@ +tag = $values['tag']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TagError.php b/fern/sdk/src/Types/TagError.php new file mode 100644 index 00000000..29c8b2d0 --- /dev/null +++ b/fern/sdk/src/Types/TagError.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TagError400.php b/fern/sdk/src/Types/TagError400.php new file mode 100644 index 00000000..d8e3a864 --- /dev/null +++ b/fern/sdk/src/Types/TagError400.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TagError400Error.php b/fern/sdk/src/Types/TagError400Error.php new file mode 100644 index 00000000..3e37a3b8 --- /dev/null +++ b/fern/sdk/src/Types/TagError400Error.php @@ -0,0 +1,42 @@ + $errorCode + */ + #[JsonProperty('error_code')] + public string $errorCode; + + /** + * @var string $errorMessage + */ + #[JsonProperty('error_message')] + public string $errorMessage; + + /** + * @param array{ + * errorCode: value-of, + * errorMessage: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TagError400ErrorErrorCode.php b/fern/sdk/src/Types/TagError400ErrorErrorCode.php new file mode 100644 index 00000000..e5ee2abb --- /dev/null +++ b/fern/sdk/src/Types/TagError400ErrorErrorCode.php @@ -0,0 +1,8 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TagError403Error.php b/fern/sdk/src/Types/TagError403Error.php new file mode 100644 index 00000000..ec72826c --- /dev/null +++ b/fern/sdk/src/Types/TagError403Error.php @@ -0,0 +1,42 @@ + $errorCode + */ + #[JsonProperty('error_code')] + public string $errorCode; + + /** + * @var string $errorMessage + */ + #[JsonProperty('error_message')] + public string $errorMessage; + + /** + * @param array{ + * errorCode: value-of, + * errorMessage: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TagError403ErrorErrorCode.php b/fern/sdk/src/Types/TagError403ErrorErrorCode.php new file mode 100644 index 00000000..53b6119d --- /dev/null +++ b/fern/sdk/src/Types/TagError403ErrorErrorCode.php @@ -0,0 +1,8 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TagError404Error.php b/fern/sdk/src/Types/TagError404Error.php new file mode 100644 index 00000000..22dc635c --- /dev/null +++ b/fern/sdk/src/Types/TagError404Error.php @@ -0,0 +1,42 @@ + $errorCode + */ + #[JsonProperty('error_code')] + public string $errorCode; + + /** + * @var string $errorMessage + */ + #[JsonProperty('error_message')] + public string $errorMessage; + + /** + * @param array{ + * errorCode: value-of, + * errorMessage: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TagError404ErrorErrorCode.php b/fern/sdk/src/Types/TagError404ErrorErrorCode.php new file mode 100644 index 00000000..20db0cfb --- /dev/null +++ b/fern/sdk/src/Types/TagError404ErrorErrorCode.php @@ -0,0 +1,8 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TagError409Error.php b/fern/sdk/src/Types/TagError409Error.php new file mode 100644 index 00000000..555138ca --- /dev/null +++ b/fern/sdk/src/Types/TagError409Error.php @@ -0,0 +1,42 @@ + $errorCode + */ + #[JsonProperty('error_code')] + public string $errorCode; + + /** + * @var string $errorMessage + */ + #[JsonProperty('error_message')] + public string $errorMessage; + + /** + * @param array{ + * errorCode: value-of, + * errorMessage: string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TagError409ErrorErrorCode.php b/fern/sdk/src/Types/TagError409ErrorErrorCode.php new file mode 100644 index 00000000..87f5d9be --- /dev/null +++ b/fern/sdk/src/Types/TagError409ErrorErrorCode.php @@ -0,0 +1,8 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TagServers.php b/fern/sdk/src/Types/TagServers.php new file mode 100644 index 00000000..49cada98 --- /dev/null +++ b/fern/sdk/src/Types/TagServers.php @@ -0,0 +1,38 @@ + $server + */ + #[JsonProperty('server'), ArrayType(['string'])] + public ?array $server; + + /** + * @param array{ + * server?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->server = $values['server'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TagTag.php b/fern/sdk/src/Types/TagTag.php new file mode 100644 index 00000000..25bdf2a5 --- /dev/null +++ b/fern/sdk/src/Types/TagTag.php @@ -0,0 +1,50 @@ +description = $values['description'] ?? null; + $this->name = $values['name']; + $this->servers = $values['servers']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/Tags.php b/fern/sdk/src/Types/Tags.php new file mode 100644 index 00000000..3e1b4555 --- /dev/null +++ b/fern/sdk/src/Types/Tags.php @@ -0,0 +1,37 @@ +tags = $values['tags']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TagsTags.php b/fern/sdk/src/Types/TagsTags.php new file mode 100644 index 00000000..13384fb2 --- /dev/null +++ b/fern/sdk/src/Types/TagsTags.php @@ -0,0 +1,35 @@ + $tag + */ + #[JsonProperty('tag'), ArrayType([TagsTagsTagItem::class])] + public array $tag; + + /** + * @param array{ + * tag: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->tag = $values['tag']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TagsTagsTagItem.php b/fern/sdk/src/Types/TagsTagsTagItem.php new file mode 100644 index 00000000..aa4bd493 --- /dev/null +++ b/fern/sdk/src/Types/TagsTagsTagItem.php @@ -0,0 +1,50 @@ +description = $values['description'] ?? null; + $this->name = $values['name']; + $this->servers = $values['servers']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TimezoneError.php b/fern/sdk/src/Types/TimezoneError.php new file mode 100644 index 00000000..6c491cf7 --- /dev/null +++ b/fern/sdk/src/Types/TimezoneError.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TimezoneErrorError.php b/fern/sdk/src/Types/TimezoneErrorError.php new file mode 100644 index 00000000..35654e0b --- /dev/null +++ b/fern/sdk/src/Types/TimezoneErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/Timezones.php b/fern/sdk/src/Types/Timezones.php new file mode 100644 index 00000000..917e453c --- /dev/null +++ b/fern/sdk/src/Types/Timezones.php @@ -0,0 +1,37 @@ +timezones = $values['timezones']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/TimezonesTimezones.php b/fern/sdk/src/Types/TimezonesTimezones.php new file mode 100644 index 00000000..a1f1a942 --- /dev/null +++ b/fern/sdk/src/Types/TimezonesTimezones.php @@ -0,0 +1,35 @@ + $timezone + */ + #[JsonProperty('timezone'), ArrayType(['string'])] + public array $timezone; + + /** + * @param array{ + * timezone: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->timezone = $values['timezone']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/VncKeymapError.php b/fern/sdk/src/Types/VncKeymapError.php new file mode 100644 index 00000000..01bdf0bb --- /dev/null +++ b/fern/sdk/src/Types/VncKeymapError.php @@ -0,0 +1,37 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/VncKeymapErrorError.php b/fern/sdk/src/Types/VncKeymapErrorError.php new file mode 100644 index 00000000..bc97329b --- /dev/null +++ b/fern/sdk/src/Types/VncKeymapErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/VncKeymapKeymaps.php b/fern/sdk/src/Types/VncKeymapKeymaps.php new file mode 100644 index 00000000..9c3139e7 --- /dev/null +++ b/fern/sdk/src/Types/VncKeymapKeymaps.php @@ -0,0 +1,37 @@ +keymaps = $values['keymaps']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/VncKeymapKeymapsKeymaps.php b/fern/sdk/src/Types/VncKeymapKeymapsKeymaps.php new file mode 100644 index 00000000..b05f0895 --- /dev/null +++ b/fern/sdk/src/Types/VncKeymapKeymapsKeymaps.php @@ -0,0 +1,35 @@ + $keymap + */ + #[JsonProperty('keymap'), ArrayType(['string'])] + public array $keymap; + + /** + * @param array{ + * keymap: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->keymap = $values['keymap']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ZoneBooleanYesno.php b/fern/sdk/src/Types/ZoneBooleanYesno.php new file mode 100644 index 00000000..55ba802e --- /dev/null +++ b/fern/sdk/src/Types/ZoneBooleanYesno.php @@ -0,0 +1,9 @@ +error = $values['error']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ZoneErrorError.php b/fern/sdk/src/Types/ZoneErrorError.php new file mode 100644 index 00000000..d0a3dee7 --- /dev/null +++ b/fern/sdk/src/Types/ZoneErrorError.php @@ -0,0 +1,42 @@ +errorCode = $values['errorCode']; + $this->errorMessage = $values['errorMessage']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ZonePrices.php b/fern/sdk/src/Types/ZonePrices.php new file mode 100644 index 00000000..ab5116e2 --- /dev/null +++ b/fern/sdk/src/Types/ZonePrices.php @@ -0,0 +1,38 @@ + $items + */ + #[JsonProperty('items'), ArrayType(['string' => ZonePricesItemsValue::class])] + public ?array $items; + + /** + * @param array{ + * items?: ?array, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->items = $values['items'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ZonePricesItemsValue.php b/fern/sdk/src/Types/ZonePricesItemsValue.php new file mode 100644 index 00000000..76a1f5c8 --- /dev/null +++ b/fern/sdk/src/Types/ZonePricesItemsValue.php @@ -0,0 +1,42 @@ +amount = $values['amount']; + $this->price = $values['price']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ZoneVlans.php b/fern/sdk/src/Types/ZoneVlans.php new file mode 100644 index 00000000..1fe25666 --- /dev/null +++ b/fern/sdk/src/Types/ZoneVlans.php @@ -0,0 +1,37 @@ +zoneVlans = $values['zoneVlans']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ZoneVlansZoneVlans.php b/fern/sdk/src/Types/ZoneVlansZoneVlans.php new file mode 100644 index 00000000..15ee7135 --- /dev/null +++ b/fern/sdk/src/Types/ZoneVlansZoneVlans.php @@ -0,0 +1,35 @@ + $vlan + */ + #[JsonProperty('vlan'), ArrayType([ZoneVlansZoneVlansVlanItem::class])] + public array $vlan; + + /** + * @param array{ + * vlan: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->vlan = $values['vlan']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ZoneVlansZoneVlansVlanItem.php b/fern/sdk/src/Types/ZoneVlansZoneVlansVlanItem.php new file mode 100644 index 00000000..9fae8028 --- /dev/null +++ b/fern/sdk/src/Types/ZoneVlansZoneVlansVlanItem.php @@ -0,0 +1,58 @@ +id = $values['id']; + $this->access = $values['access']; + $this->description = $values['description']; + $this->default = $values['default']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/Zones.php b/fern/sdk/src/Types/Zones.php new file mode 100644 index 00000000..5e25e598 --- /dev/null +++ b/fern/sdk/src/Types/Zones.php @@ -0,0 +1,37 @@ +zones = $values['zones']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ZonesZones.php b/fern/sdk/src/Types/ZonesZones.php new file mode 100644 index 00000000..a04c559f --- /dev/null +++ b/fern/sdk/src/Types/ZonesZones.php @@ -0,0 +1,35 @@ + $zone + */ + #[JsonProperty('zone'), ArrayType([ZonesZonesZoneItem::class])] + public array $zone; + + /** + * @param array{ + * zone: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->zone = $values['zone']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/Types/ZonesZonesZoneItem.php b/fern/sdk/src/Types/ZonesZonesZoneItem.php new file mode 100644 index 00000000..9d5b230c --- /dev/null +++ b/fern/sdk/src/Types/ZonesZonesZoneItem.php @@ -0,0 +1,50 @@ + $public + */ + #[JsonProperty('public')] + public string $public; + + /** + * @param array{ + * description: string, + * id: string, + * public: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->description = $values['description']; + $this->id = $values['id']; + $this->public = $values['public']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/fern/sdk/src/UpcloudClient.php b/fern/sdk/src/UpcloudClient.php new file mode 100644 index 00000000..3d937be0 --- /dev/null +++ b/fern/sdk/src/UpcloudClient.php @@ -0,0 +1,261 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param string $token The token to use for authentication. + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + string $token, + ?array $options = null, + ) { + $defaultHeaders = [ + 'Authorization' => "Bearer $token", + 'X-Fern-Language' => 'PHP', + 'X-Fern-SDK-Name' => 'Upcloud', + ]; + + $this->options = $options ?? []; + + $this->options['headers'] = array_merge( + $defaultHeaders, + $this->options['headers'] ?? [], + ); + + $this->client = new RawClient( + options: $this->options, + ); + + $this->account = new AccountClient($this->client, $this->options); + $this->kubernetes = new KubernetesClient($this->client, $this->options); + $this->currency = new CurrencyClient($this->client, $this->options); + $this->device = new DeviceClient($this->client, $this->options); + $this->events = new EventsClient($this->client, $this->options); + $this->ipAddress = new IpAddressClient($this->client, $this->options); + $this->networkPeering = new NetworkPeeringClient($this->client, $this->options); + $this->network = new NetworkClient($this->client, $this->options); + $this->auditLogs = new AuditLogsClient($this->client, $this->options); + $this->partner = new PartnerClient($this->client, $this->options); + $this->permission = new PermissionClient($this->client, $this->options); + $this->plan = new PlanClient($this->client, $this->options); + $this->price = new PriceClient($this->client, $this->options); + $this->router = new RouterClient($this->client, $this->options); + $this->serverGroup = new ServerGroupClient($this->client, $this->options); + $this->server = new ServerClient($this->client, $this->options); + $this->serverSize = new ServerSizeClient($this->client, $this->options); + $this->storage = new StorageClient($this->client, $this->options); + $this->tag = new TagClient($this->client, $this->options); + $this->timezone = new TimezoneClient($this->client, $this->options); + $this->accountTokens = new AccountTokensClient($this->client, $this->options); + $this->objectStorage2 = new ObjectStorage2Client($this->client, $this->options); + $this->fileStorage = new FileStorageClient($this->client, $this->options); + $this->database = new DatabaseClient($this->client, $this->options); + $this->gateway = new GatewayClient($this->client, $this->options); + $this->loadBalancer = new LoadBalancerClient($this->client, $this->options); + $this->firewallRuleset = new FirewallRulesetClient($this->client, $this->options); + $this->vncKeymap = new VncKeymapClient($this->client, $this->options); + $this->zone = new ZoneClient($this->client, $this->options); + } +} diff --git a/fern/sdk/src/Utils/File.php b/fern/sdk/src/Utils/File.php new file mode 100644 index 00000000..1c07c70b --- /dev/null +++ b/fern/sdk/src/Utils/File.php @@ -0,0 +1,125 @@ +filename = $filename; + $this->contentType = $contentType; + $this->stream = $stream; + } + + /** + * Creates a File instance from a filepath. + * + * @param string $filepath + * @param ?string $filename + * @param ?string $contentType + * @return File + * @throws Exception + */ + public static function createFromFilepath( + string $filepath, + ?string $filename = null, + ?string $contentType = null, + ): File { + $resource = fopen($filepath, 'r'); + if (!$resource) { + throw new Exception("Unable to open file $filepath"); + } + $stream = Utils::streamFor($resource); + if (!$stream->isReadable()) { + throw new Exception("File $filepath is not readable"); + } + return new self( + stream: $stream, + filename: $filename ?? basename($filepath), + contentType: $contentType, + ); + } + + /** + * Creates a File instance from a string. + * + * @param string $content + * @param ?string $filename + * @param ?string $contentType + * @return File + */ + public static function createFromString( + string $content, + ?string $filename, + ?string $contentType = null, + ): File { + return new self( + stream: Utils::streamFor($content), + filename: $filename, + contentType: $contentType, + ); + } + + /** + * Maps this File into a multipart form data part. + * + * @param string $name The name of the multipart form data part. + * @param ?string $contentType Overrides the Content-Type associated with the file, if any. + * @return MultipartFormDataPart + */ + public function toMultipartFormDataPart(string $name, ?string $contentType = null): MultipartFormDataPart + { + $contentType ??= $this->contentType; + $headers = $contentType !== null + ? ['Content-Type' => $contentType] + : null; + + return new MultipartFormDataPart( + name: $name, + value: $this->stream, + filename: $this->filename, + headers: $headers, + ); + } + + /** + * Closes the file stream. + */ + public function close(): void + { + $this->stream->close(); + } + + /** + * Destructor to ensure stream is closed. + */ + public function __destruct() + { + $this->close(); + } +} diff --git a/fern/sdk/src/VncKeymap/VncKeymapClient.php b/fern/sdk/src/VncKeymap/VncKeymapClient.php new file mode 100644 index 00000000..d2698471 --- /dev/null +++ b/fern/sdk/src/VncKeymap/VncKeymapClient.php @@ -0,0 +1,106 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Retrieves a list of supported VNC keymaps. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return VncKeymapKeymaps + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listVncKeymaps(?array $options = null): VncKeymapKeymaps + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/vnc_keymap", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return VncKeymapKeymaps::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/src/Zone/ZoneClient.php b/fern/sdk/src/Zone/ZoneClient.php new file mode 100644 index 00000000..a5c373df --- /dev/null +++ b/fern/sdk/src/Zone/ZoneClient.php @@ -0,0 +1,162 @@ +, + * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator + */ + private array $options; + + /** + * @var RawClient $client + */ + private RawClient $client; + + /** + * @param RawClient $client + * @param ?array{ + * baseUrl?: string, + * client?: ClientInterface, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * } $options + */ + public function __construct( + RawClient $client, + ?array $options = null, + ) { + $this->client = $client; + $this->options = $options ?? []; + } + + /** + * Retrieves a list of zones. + * + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return Zones + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listZones(?array $options = null): Zones + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/zone", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return Zones::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * Retrieves a list of VLANs in a specific zone. + * + * @param string $zone The zone identifier. + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ZoneVlans + * @throws UpcloudException + * @throws UpcloudApiException + */ + public function listZoneVlaNs(string $zone, ?array $options = null): ZoneVlans + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Default_->value, + path: "1.3/zone/{$zone}/vlans", + method: HttpMethod::GET, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return ZoneVlans::fromJson($json); + } + } catch (JsonException $e) { + throw new UpcloudException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (RequestException $e) { + $response = $e->getResponse(); + if ($response === null) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: "API request failed", + statusCode: $response->getStatusCode(), + body: $response->getBody()->getContents(), + ); + } catch (ClientExceptionInterface $e) { + throw new UpcloudException(message: $e->getMessage(), previous: $e); + } + throw new UpcloudApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } +} diff --git a/fern/sdk/tests/Core/Client/RawClientTest.php b/fern/sdk/tests/Core/Client/RawClientTest.php new file mode 100644 index 00000000..501a336e --- /dev/null +++ b/fern/sdk/tests/Core/Client/RawClientTest.php @@ -0,0 +1,671 @@ +name = $values['name']; + } + + /** + * @return string + */ + public function getName(): ?string + { + return $this->name; + } +} + +class RawClientTest extends TestCase +{ + private string $baseUrl = 'https://api.example.com'; + private MockHandler $mockHandler; + private RawClient $rawClient; + + protected function setUp(): void + { + $this->mockHandler = new MockHandler(); + $handlerStack = HandlerStack::create($this->mockHandler); + // since the client is constructed manually, we need to add the retry middleware manually + $handlerStack->push(RetryMiddleware::create([ + 'maxRetries' => 0, + 'baseDelay' => 0, + ])); + $client = new Client(['handler' => $handlerStack]); + $this->rawClient = new RawClient(['client' => $client]); + } + + /** + * @throws ClientExceptionInterface + */ + public function testHeaders(): void + { + $this->mockHandler->append(new Response(200)); + + $request = new JsonApiRequest( + $this->baseUrl, + '/test', + HttpMethod::GET, + ['X-Custom-Header' => 'TestValue'] + ); + + $this->rawClient->sendRequest($request); + + $lastRequest = $this->mockHandler->getLastRequest(); + assert($lastRequest instanceof RequestInterface); + $this->assertEquals('application/json', $lastRequest->getHeaderLine('Content-Type')); + $this->assertEquals('TestValue', $lastRequest->getHeaderLine('X-Custom-Header')); + } + + /** + * @throws ClientExceptionInterface + */ + public function testQueryParameters(): void + { + $this->mockHandler->append(new Response(200)); + + $request = new JsonApiRequest( + $this->baseUrl, + '/test', + HttpMethod::GET, + [], + ['param1' => 'value1', 'param2' => ['a', 'b'], 'param3' => 'true'] + ); + + $this->rawClient->sendRequest($request); + + $lastRequest = $this->mockHandler->getLastRequest(); + assert($lastRequest instanceof RequestInterface); + $this->assertEquals( + 'https://api.example.com/test?param1=value1¶m2=a¶m2=b¶m3=true', + (string)$lastRequest->getUri() + ); + } + + /** + * @throws ClientExceptionInterface + */ + public function testJsonBody(): void + { + $this->mockHandler->append(new Response(200)); + + $body = ['key' => 'value']; + $request = new JsonApiRequest( + $this->baseUrl, + '/test', + HttpMethod::POST, + [], + [], + $body + ); + + $this->rawClient->sendRequest($request); + + $lastRequest = $this->mockHandler->getLastRequest(); + assert($lastRequest instanceof RequestInterface); + $this->assertEquals('application/json', $lastRequest->getHeaderLine('Content-Type')); + $this->assertEquals(json_encode($body), (string)$lastRequest->getBody()); + } + + public function testAdditionalHeaders(): void + { + $this->mockHandler->append(new Response(200)); + + $body = new JsonRequest([ + 'name' => 'john.doe' + ]); + $headers = [ + 'X-API-Version' => '1.0.0', + ]; + $request = new JsonApiRequest( + $this->baseUrl, + '/test', + HttpMethod::POST, + $headers, + [], + $body + ); + + $this->rawClient->sendRequest( + $request, + options: [ + 'headers' => [ + 'X-Tenancy' => 'test' + ] + ] + ); + + $lastRequest = $this->mockHandler->getLastRequest(); + assert($lastRequest instanceof RequestInterface); + $this->assertEquals('application/json', $lastRequest->getHeaderLine('Content-Type')); + $this->assertEquals('1.0.0', $lastRequest->getHeaderLine('X-API-Version')); + $this->assertEquals('test', $lastRequest->getHeaderLine('X-Tenancy')); + } + + public function testOverrideAdditionalHeaders(): void + { + $this->mockHandler->append(new Response(200)); + + $body = new JsonRequest([ + 'name' => 'john.doe' + ]); + $headers = [ + 'X-API-Version' => '1.0.0', + ]; + $request = new JsonApiRequest( + $this->baseUrl, + '/test', + HttpMethod::POST, + $headers, + [], + $body + ); + + $this->rawClient->sendRequest( + $request, + options: [ + 'headers' => [ + 'X-API-Version' => '2.0.0' + ] + ] + ); + + $lastRequest = $this->mockHandler->getLastRequest(); + assert($lastRequest instanceof RequestInterface); + $this->assertEquals('application/json', $lastRequest->getHeaderLine('Content-Type')); + $this->assertEquals('2.0.0', $lastRequest->getHeaderLine('X-API-Version')); + } + + public function testAdditionalBodyProperties(): void + { + $this->mockHandler->append(new Response(200)); + + $body = new JsonRequest([ + 'name' => 'john.doe' + ]); + $request = new JsonApiRequest( + $this->baseUrl, + '/test', + HttpMethod::POST, + [], + [], + $body + ); + + $this->rawClient->sendRequest( + $request, + options: [ + 'bodyProperties' => [ + 'age' => 42 + ] + ] + ); + + $expectedJson = [ + 'name' => 'john.doe', + 'age' => 42 + ]; + + $lastRequest = $this->mockHandler->getLastRequest(); + assert($lastRequest instanceof RequestInterface); + $this->assertEquals('application/json', $lastRequest->getHeaderLine('Content-Type')); + $this->assertEquals(json_encode($expectedJson), (string)$lastRequest->getBody()); + } + + public function testOverrideAdditionalBodyProperties(): void + { + $this->mockHandler->append(new Response(200)); + + $body = [ + 'name' => 'john.doe' + ]; + $request = new JsonApiRequest( + $this->baseUrl, + '/test', + HttpMethod::POST, + [], + [], + $body + ); + + $this->rawClient->sendRequest( + $request, + options: [ + 'bodyProperties' => [ + 'name' => 'jane.doe' + ] + ] + ); + + $expectedJson = [ + 'name' => 'jane.doe', + ]; + + $lastRequest = $this->mockHandler->getLastRequest(); + assert($lastRequest instanceof RequestInterface); + $this->assertEquals('application/json', $lastRequest->getHeaderLine('Content-Type')); + $this->assertEquals(json_encode($expectedJson), (string)$lastRequest->getBody()); + } + + public function testAdditionalQueryParameters(): void + { + $this->mockHandler->append(new Response(200)); + + $query = ['key' => 'value']; + $request = new JsonApiRequest( + $this->baseUrl, + '/test', + HttpMethod::POST, + [], + $query, + [] + ); + + $this->rawClient->sendRequest( + $request, + options: [ + 'queryParameters' => [ + 'extra' => 42 + ] + ] + ); + + $lastRequest = $this->mockHandler->getLastRequest(); + assert($lastRequest instanceof RequestInterface); + $this->assertEquals('application/json', $lastRequest->getHeaderLine('Content-Type')); + $this->assertEquals('key=value&extra=42', $lastRequest->getUri()->getQuery()); + } + + public function testOverrideQueryParameters(): void + { + $this->mockHandler->append(new Response(200)); + + $query = ['key' => 'invalid']; + $request = new JsonApiRequest( + $this->baseUrl, + '/test', + HttpMethod::POST, + [], + $query, + [] + ); + + $this->rawClient->sendRequest( + $request, + options: [ + 'queryParameters' => [ + 'key' => 'value' + ] + ] + ); + + $lastRequest = $this->mockHandler->getLastRequest(); + assert($lastRequest instanceof RequestInterface); + $this->assertEquals('application/json', $lastRequest->getHeaderLine('Content-Type')); + $this->assertEquals('key=value', $lastRequest->getUri()->getQuery()); + } + + public function testDefaultRetries(): void + { + $this->mockHandler->append(new Response(500)); + + $request = new JsonApiRequest( + $this->baseUrl, + '/test', + HttpMethod::GET + ); + + try { + $this->rawClient->sendRequest($request); + $this->fail("Request should've failed but succeeded."); + } catch (ClientExceptionInterface) { + } + + $lastRequest = $this->mockHandler->getLastRequest(); + assert($lastRequest instanceof RequestInterface); + $this->assertEquals(0, $this->mockHandler->count()); + } + + /** + * @throws ClientExceptionInterface + */ + public function testExplicitRetriesSuccess(): void + { + $this->mockHandler->append(new Response(500), new Response(500), new Response(200)); + + $request = new JsonApiRequest( + $this->baseUrl, + '/test', + HttpMethod::GET + ); + + $this->rawClient->sendRequest($request, ['maxRetries' => 2]); + + $lastRequest = $this->mockHandler->getLastRequest(); + assert($lastRequest instanceof RequestInterface); + $this->assertEquals(0, $this->mockHandler->count()); + } + + public function testExplicitRetriesFailure(): void + { + $this->mockHandler->append(new Response(500), new Response(500), new Response(500)); + + $request = new JsonApiRequest( + $this->baseUrl, + '/test', + HttpMethod::GET + ); + + try { + $this->rawClient->sendRequest($request, ['maxRetries' => 2]); + $this->fail("Request should've failed but succeeded."); + } catch (ClientExceptionInterface) { + } + + $this->assertEquals(0, $this->mockHandler->count()); + } + + /** + * @throws ClientExceptionInterface + */ + public function testShouldRetryOnStatusCodes(): void + { + $this->mockHandler->append( + new Response(408), + new Response(429), + new Response(500), + new Response(501), + new Response(502), + new Response(503), + new Response(504), + new Response(505), + new Response(599), + new Response(200), + ); + $countOfErrorRequests = $this->mockHandler->count() - 1; + + $request = new JsonApiRequest( + $this->baseUrl, + '/test', + HttpMethod::GET + ); + + $this->rawClient->sendRequest($request, ['maxRetries' => $countOfErrorRequests]); + + $this->assertEquals(0, $this->mockHandler->count()); + } + + public function testShouldFailOn400Response(): void + { + $this->mockHandler->append(new Response(400), new Response(200)); + + $request = new JsonApiRequest( + $this->baseUrl, + '/test', + HttpMethod::GET + ); + + try { + $this->rawClient->sendRequest($request, ['maxRetries' => 2]); + $this->fail("Request should've failed but succeeded."); + } catch (ClientExceptionInterface) { + } + + $this->assertEquals(1, $this->mockHandler->count()); + } + + public function testRetryAfterSecondsHeaderControlsDelay(): void + { + $responses = [ + new Response(503, ['Retry-After' => '10']), + new Response(200), + ]; + $capturedOptions = []; + + $handler = function (RequestInterface $request, array $options) use (&$responses, &$capturedOptions) { + $capturedOptions[] = $options; + $response = array_shift($responses); + return P\Create::promiseFor($response); + }; + + $middleware = RetryMiddleware::create([ + 'maxRetries' => 2, + 'baseDelay' => 1000, + ]); + + $retryHandler = $middleware($handler); + $request = new Request('GET', $this->baseUrl . '/test'); + + $promise = $retryHandler($request, ['delay' => 0]); + $promise->wait(); + + $this->assertCount(2, $capturedOptions); + $this->assertSame(0, $capturedOptions[0]['delay']); + $delay = $capturedOptions[1]['delay']; + $this->assertGreaterThanOrEqual(10000, $delay); + $this->assertLessThanOrEqual(12000, $delay); + } + + public function testRetryAfterHttpDateHeaderIsHandled(): void + { + $retryAfterDate = gmdate('D, d M Y H:i:s \G\M\T', time() + 5); + + $responses = [ + new Response(503, ['Retry-After' => $retryAfterDate]), + new Response(200), + ]; + $capturedOptions = []; + + $handler = function (RequestInterface $request, array $options) use (&$responses, &$capturedOptions) { + $capturedOptions[] = $options; + $response = array_shift($responses); + return P\Create::promiseFor($response); + }; + + $middleware = RetryMiddleware::create([ + 'maxRetries' => 2, + 'baseDelay' => 1000, + ]); + + $retryHandler = $middleware($handler); + $request = new Request('GET', $this->baseUrl . '/test'); + + $promise = $retryHandler($request, ['delay' => 0]); + $promise->wait(); + + $this->assertCount(2, $capturedOptions); + $delay = $capturedOptions[1]['delay']; + $this->assertGreaterThan(0, $delay); + $this->assertLessThanOrEqual(60000, $delay); + } + + public function testRateLimitResetHeaderControlsDelay(): void + { + $resetTime = (int) floor(microtime(true)) + 5; + $responses = [ + new Response(429, ['X-RateLimit-Reset' => (string) $resetTime]), + new Response(200), + ]; + $capturedOptions = []; + + $handler = function (RequestInterface $request, array $options) use (&$responses, &$capturedOptions) { + $capturedOptions[] = $options; + $response = array_shift($responses); + return P\Create::promiseFor($response); + }; + + $middleware = RetryMiddleware::create([ + 'maxRetries' => 2, + 'baseDelay' => 1000, + ]); + + $retryHandler = $middleware($handler); + $request = new Request('GET', $this->baseUrl . '/test'); + + $promise = $retryHandler($request, ['delay' => 0]); + $promise->wait(); + + $this->assertCount(2, $capturedOptions); + $delay = $capturedOptions[1]['delay']; + $this->assertGreaterThan(0, $delay); + $this->assertLessThanOrEqual(60000, $delay); + } + + public function testRateLimitResetHeaderRespectsMaxDelayAndPositiveJitter(): void + { + $resetTime = (int) floor(microtime(true)) + 1000; + $responses = [ + new Response(429, ['X-RateLimit-Reset' => (string) $resetTime]), + new Response(200), + ]; + $capturedOptions = []; + + $handler = function (RequestInterface $request, array $options) use (&$responses, &$capturedOptions) { + $capturedOptions[] = $options; + $response = array_shift($responses); + return P\Create::promiseFor($response); + }; + + $middleware = RetryMiddleware::create([ + 'maxRetries' => 1, + 'baseDelay' => 1000, + ]); + + $retryHandler = $middleware($handler); + $request = new Request('GET', $this->baseUrl . '/test'); + + $promise = $retryHandler($request, ['delay' => 0]); + $promise->wait(); + + $delay = $capturedOptions[1]['delay']; + $this->assertGreaterThanOrEqual(60000, $delay); + $this->assertLessThanOrEqual(72000, $delay); + } + + public function testExponentialBackoffWithSymmetricJitterWhenNoHeaders(): void + { + $responses = [ + new Response(503), + new Response(200), + ]; + $capturedOptions = []; + + $handler = function (RequestInterface $request, array $options) use (&$responses, &$capturedOptions) { + $capturedOptions[] = $options; + $response = array_shift($responses); + return P\Create::promiseFor($response); + }; + + $middleware = RetryMiddleware::create([ + 'maxRetries' => 1, + 'baseDelay' => 1000, + ]); + + $retryHandler = $middleware($handler); + $request = new Request('GET', $this->baseUrl . '/test'); + + $promise = $retryHandler($request, ['delay' => 0]); + $promise->wait(); + + $this->assertCount(2, $capturedOptions); + $delay = $capturedOptions[1]['delay']; + $this->assertGreaterThanOrEqual(900, $delay); + $this->assertLessThanOrEqual(1100, $delay); + } + + public function testRetryAfterHeaderTakesPrecedenceOverRateLimitReset(): void + { + $resetTime = (int) floor(microtime(true)) + 30; + $responses = [ + new Response(503, [ + 'Retry-After' => '5', + 'X-RateLimit-Reset' => (string) $resetTime, + ]), + new Response(200), + ]; + $capturedOptions = []; + + $handler = function (RequestInterface $request, array $options) use (&$responses, &$capturedOptions) { + $capturedOptions[] = $options; + $response = array_shift($responses); + return P\Create::promiseFor($response); + }; + + $middleware = RetryMiddleware::create([ + 'maxRetries' => 2, + 'baseDelay' => 1000, + ]); + + $retryHandler = $middleware($handler); + $request = new Request('GET', $this->baseUrl . '/test'); + + $promise = $retryHandler($request, ['delay' => 0]); + $promise->wait(); + + $this->assertCount(2, $capturedOptions); + $delay = $capturedOptions[1]['delay']; + $this->assertGreaterThanOrEqual(5000, $delay); + $this->assertLessThanOrEqual(6000, $delay); + } + + public function testMaxDelayCapIsApplied(): void + { + $responses = [ + new Response(503, ['Retry-After' => '120']), + new Response(200), + ]; + $capturedOptions = []; + + $handler = function (RequestInterface $request, array $options) use (&$responses, &$capturedOptions) { + $capturedOptions[] = $options; + $response = array_shift($responses); + return P\Create::promiseFor($response); + }; + + $middleware = RetryMiddleware::create([ + 'maxRetries' => 2, + 'baseDelay' => 1000, + ]); + + $retryHandler = $middleware($handler); + $request = new Request('GET', $this->baseUrl . '/test'); + + $promise = $retryHandler($request, ['delay' => 0]); + $promise->wait(); + + $this->assertCount(2, $capturedOptions); + $delay = $capturedOptions[1]['delay']; + $this->assertGreaterThanOrEqual(60000, $delay); + $this->assertLessThanOrEqual(72000, $delay); + } +} diff --git a/fern/sdk/tests/Core/Json/AdditionalPropertiesTest.php b/fern/sdk/tests/Core/Json/AdditionalPropertiesTest.php new file mode 100644 index 00000000..b859faff --- /dev/null +++ b/fern/sdk/tests/Core/Json/AdditionalPropertiesTest.php @@ -0,0 +1,76 @@ +name; + } + + /** + * @return string|null + */ + public function getEmail(): ?string + { + return $this->email; + } + + /** + * @param array{ + * name: string, + * email?: string|null, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->email = $values['email'] ?? null; + } +} + +class AdditionalPropertiesTest extends TestCase +{ + public function testExtraProperties(): void + { + $expectedJson = json_encode( + [ + 'name' => 'john.doe', + 'email' => 'john.doe@example.com', + 'age' => 42 + ], + JSON_THROW_ON_ERROR + ); + + $person = Person::fromJson($expectedJson); + $this->assertEquals('john.doe', $person->getName()); + $this->assertEquals('john.doe@example.com', $person->getEmail()); + $this->assertEquals( + [ + 'age' => 42 + ], + $person->getAdditionalProperties(), + ); + } +} diff --git a/fern/sdk/tests/Core/Json/DateArrayTest.php b/fern/sdk/tests/Core/Json/DateArrayTest.php new file mode 100644 index 00000000..2bd2ebb9 --- /dev/null +++ b/fern/sdk/tests/Core/Json/DateArrayTest.php @@ -0,0 +1,54 @@ +dates = $values['dates']; + } +} + +class DateArrayTest extends TestCase +{ + public function testDateTimeInArrays(): void + { + $expectedJson = json_encode( + [ + 'dates' => ['2023-01-01', '2023-02-01', '2023-03-01'] + ], + JSON_THROW_ON_ERROR + ); + + $object = DateArray::fromJson($expectedJson); + $this->assertInstanceOf(DateTime::class, $object->dates[0], 'dates[0] should be a DateTime instance.'); + $this->assertEquals('2023-01-01', $object->dates[0]->format('Y-m-d'), 'dates[0] should have the correct date.'); + $this->assertInstanceOf(DateTime::class, $object->dates[1], 'dates[1] should be a DateTime instance.'); + $this->assertEquals('2023-02-01', $object->dates[1]->format('Y-m-d'), 'dates[1] should have the correct date.'); + $this->assertInstanceOf(DateTime::class, $object->dates[2], 'dates[2] should be a DateTime instance.'); + $this->assertEquals('2023-03-01', $object->dates[2]->format('Y-m-d'), 'dates[2] should have the correct date.'); + + $actualJson = $object->toJson(); + $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for dates array.'); + } +} diff --git a/fern/sdk/tests/Core/Json/EmptyArrayTest.php b/fern/sdk/tests/Core/Json/EmptyArrayTest.php new file mode 100644 index 00000000..3b9d3367 --- /dev/null +++ b/fern/sdk/tests/Core/Json/EmptyArrayTest.php @@ -0,0 +1,71 @@ + $emptyMapArray + */ + #[JsonProperty('empty_map_array')] + #[ArrayType(['integer' => new Union('string', 'null')])] + public array $emptyMapArray; + + /** + * @var array $emptyDatesArray + */ + #[ArrayType([new Union('date', 'null')])] + #[JsonProperty('empty_dates_array')] + public array $emptyDatesArray; + + /** + * @param array{ + * emptyStringArray: string[], + * emptyMapArray: array, + * emptyDatesArray: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->emptyStringArray = $values['emptyStringArray']; + $this->emptyMapArray = $values['emptyMapArray']; + $this->emptyDatesArray = $values['emptyDatesArray']; + } +} + +class EmptyArrayTest extends TestCase +{ + public function testEmptyArray(): void + { + $expectedJson = json_encode( + [ + 'empty_string_array' => [], + 'empty_map_array' => [], + 'empty_dates_array' => [] + ], + JSON_THROW_ON_ERROR + ); + + $object = EmptyArray::fromJson($expectedJson); + $this->assertEmpty($object->emptyStringArray, 'empty_string_array should be empty.'); + $this->assertEmpty($object->emptyMapArray, 'empty_map_array should be empty.'); + $this->assertEmpty($object->emptyDatesArray, 'empty_dates_array should be empty.'); + + $actualJson = $object->toJson(); + $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for EmptyArraysType.'); + } +} diff --git a/fern/sdk/tests/Core/Json/EnumTest.php b/fern/sdk/tests/Core/Json/EnumTest.php new file mode 100644 index 00000000..bad1266e --- /dev/null +++ b/fern/sdk/tests/Core/Json/EnumTest.php @@ -0,0 +1,76 @@ +value; + } +} + +class ShapeType extends JsonSerializableType +{ + /** + * @var Shape $shape + */ + #[JsonProperty('shape')] + public Shape $shape; + + /** + * @var Shape[] $shapes + */ + #[ArrayType([Shape::class])] + #[JsonProperty('shapes')] + public array $shapes; + + /** + * @param Shape $shape + * @param Shape[] $shapes + */ + public function __construct( + Shape $shape, + array $shapes, + ) { + $this->shape = $shape; + $this->shapes = $shapes; + } +} + +class EnumTest extends TestCase +{ + public function testEnumSerialization(): void + { + $object = new ShapeType( + Shape::Circle, + [Shape::Square, Shape::Circle, Shape::Triangle] + ); + + $expectedJson = json_encode([ + 'shape' => 'CIRCLE', + 'shapes' => ['SQUARE', 'CIRCLE', 'TRIANGLE'] + ], JSON_THROW_ON_ERROR); + + $actualJson = $object->toJson(); + + $this->assertJsonStringEqualsJsonString( + $expectedJson, + $actualJson, + 'Serialized JSON does not match expected JSON for shape and shapes properties.' + ); + } +} diff --git a/fern/sdk/tests/Core/Json/ExhaustiveTest.php b/fern/sdk/tests/Core/Json/ExhaustiveTest.php new file mode 100644 index 00000000..ffe860c7 --- /dev/null +++ b/fern/sdk/tests/Core/Json/ExhaustiveTest.php @@ -0,0 +1,197 @@ +nestedProperty = $values['nestedProperty']; + } +} + +class Type extends JsonSerializableType +{ + /** + * @var Nested nestedType + */ + #[JsonProperty('nested_type')] + public Nested $nestedType; /** + + * @var string $simpleProperty + */ + #[JsonProperty('simple_property')] + public string $simpleProperty; + + /** + * @var DateTime $dateProperty + */ + #[Date(Date::TYPE_DATE)] + #[JsonProperty('date_property')] + public DateTime $dateProperty; + + /** + * @var DateTime $datetimeProperty + */ + #[Date(Date::TYPE_DATETIME)] + #[JsonProperty('datetime_property')] + public DateTime $datetimeProperty; + + /** + * @var array $stringArray + */ + #[ArrayType(['string'])] + #[JsonProperty('string_array')] + public array $stringArray; + + /** + * @var array $mapProperty + */ + #[ArrayType(['string' => 'integer'])] + #[JsonProperty('map_property')] + public array $mapProperty; + + /** + * @var array $objectArray + */ + #[ArrayType(['integer' => new Union(Nested::class, 'null')])] + #[JsonProperty('object_array')] + public array $objectArray; + + /** + * @var array> $nestedArray + */ + #[ArrayType(['integer' => ['integer' => new Union('string', 'null')]])] + #[JsonProperty('nested_array')] + public array $nestedArray; + + /** + * @var array $datesArray + */ + #[ArrayType([new Union('date', 'null')])] + #[JsonProperty('dates_array')] + public array $datesArray; + + /** + * @var string|null $nullableProperty + */ + #[JsonProperty('nullable_property')] + public ?string $nullableProperty; + + /** + * @param array{ + * nestedType: Nested, + * simpleProperty: string, + * dateProperty: DateTime, + * datetimeProperty: DateTime, + * stringArray: array, + * mapProperty: array, + * objectArray: array, + * nestedArray: array>, + * datesArray: array, + * nullableProperty?: string|null, + * } $values + */ + public function __construct( + array $values, + ) { + $this->nestedType = $values['nestedType']; + $this->simpleProperty = $values['simpleProperty']; + $this->dateProperty = $values['dateProperty']; + $this->datetimeProperty = $values['datetimeProperty']; + $this->stringArray = $values['stringArray']; + $this->mapProperty = $values['mapProperty']; + $this->objectArray = $values['objectArray']; + $this->nestedArray = $values['nestedArray']; + $this->datesArray = $values['datesArray']; + $this->nullableProperty = $values['nullableProperty'] ?? null; + } +} + +class ExhaustiveTest extends TestCase +{ + /** + * Test serialization and deserialization of all types in Type. + */ + public function testExhaustive(): void + { + $expectedJson = json_encode( + [ + 'nested_type' => ['nested_property' => '1995-07-20'], + 'simple_property' => 'Test String', + // Omit 'nullable_property' to test null serialization + 'date_property' => '2023-01-01', + 'datetime_property' => '2023-01-01T12:34:56Z', + 'string_array' => ['one', 'two', 'three'], + 'map_property' => ['key1' => 1, 'key2' => 2], + 'object_array' => [ + 1 => ['nested_property' => '2021-07-20'], + 2 => null, // Testing nullable objects in array + ], + 'nested_array' => [ + 1 => [1 => 'value1', 2 => null], // Testing nullable strings in nested array + 2 => [3 => 'value3', 4 => 'value4'] + ], + 'dates_array' => ['2023-01-01', null, '2023-03-01'] // Testing nullable dates in array> + ], + JSON_THROW_ON_ERROR + ); + + $object = Type::fromJson($expectedJson); + + // Check that nullable property is null and not included in JSON + $this->assertNull($object->nullableProperty, 'Nullable property should be null.'); + + // Check date properties + $this->assertInstanceOf(DateTime::class, $object->dateProperty, 'date_property should be a DateTime instance.'); + $this->assertEquals('2023-01-01', $object->dateProperty->format('Y-m-d'), 'date_property should have the correct date.'); + $this->assertInstanceOf(DateTime::class, $object->datetimeProperty, 'datetime_property should be a DateTime instance.'); + $this->assertEquals('2023-01-01 12:34:56', $object->datetimeProperty->format('Y-m-d H:i:s'), 'datetime_property should have the correct datetime.'); + + // Check scalar arrays + $this->assertEquals(['one', 'two', 'three'], $object->stringArray, 'string_array should match the original data.'); + $this->assertEquals(['key1' => 1, 'key2' => 2], $object->mapProperty, 'map_property should match the original data.'); + + // Check object array with nullable elements + $this->assertInstanceOf(Nested::class, $object->objectArray[1], 'object_array[1] should be an instance of TestNestedType1.'); + $this->assertEquals('2021-07-20', $object->objectArray[1]->nestedProperty->format('Y-m-d'), 'object_array[1]->nestedProperty should match the original data.'); + $this->assertNull($object->objectArray[2], 'object_array[2] should be null.'); + + // Check nested array with nullable strings + $this->assertEquals('value1', $object->nestedArray[1][1], 'nested_array[1][1] should match the original data.'); + $this->assertNull($object->nestedArray[1][2], 'nested_array[1][2] should be null.'); + $this->assertEquals('value3', $object->nestedArray[2][3], 'nested_array[2][3] should match the original data.'); + $this->assertEquals('value4', $object->nestedArray[2][4], 'nested_array[2][4] should match the original data.'); + + // Check dates array with nullable DateTime objects + $this->assertInstanceOf(DateTime::class, $object->datesArray[0], 'dates_array[0] should be a DateTime instance.'); + $this->assertEquals('2023-01-01', $object->datesArray[0]->format('Y-m-d'), 'dates_array[0] should have the correct date.'); + $this->assertNull($object->datesArray[1], 'dates_array[1] should be null.'); + $this->assertInstanceOf(DateTime::class, $object->datesArray[2], 'dates_array[2] should be a DateTime instance.'); + $this->assertEquals('2023-03-01', $object->datesArray[2]->format('Y-m-d'), 'dates_array[2] should have the correct date.'); + + $actualJson = $object->toJson(); + $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'The serialized JSON does not match the original JSON.'); + } +} diff --git a/fern/sdk/tests/Core/Json/InvalidTest.php b/fern/sdk/tests/Core/Json/InvalidTest.php new file mode 100644 index 00000000..e2403642 --- /dev/null +++ b/fern/sdk/tests/Core/Json/InvalidTest.php @@ -0,0 +1,42 @@ +integerProperty = $values['integerProperty']; + } +} + +class InvalidTest extends TestCase +{ + public function testInvalidJsonThrowsException(): void + { + $this->expectException(\TypeError::class); + $json = json_encode( + [ + 'integer_property' => 'not_an_integer' + ], + JSON_THROW_ON_ERROR + ); + Invalid::fromJson($json); + } +} diff --git a/fern/sdk/tests/Core/Json/NestedUnionArrayTest.php b/fern/sdk/tests/Core/Json/NestedUnionArrayTest.php new file mode 100644 index 00000000..11280d6c --- /dev/null +++ b/fern/sdk/tests/Core/Json/NestedUnionArrayTest.php @@ -0,0 +1,89 @@ +nestedProperty = $values['nestedProperty']; + } +} + +class NestedUnionArray extends JsonSerializableType +{ + /** + * @var array> $nestedArray + */ + #[ArrayType(['integer' => ['integer' => new Union(UnionObject::class, 'null', 'date')]])] + #[JsonProperty('nested_array')] + public array $nestedArray; + + /** + * @param array{ + * nestedArray: array>, + * } $values + */ + public function __construct( + array $values, + ) { + $this->nestedArray = $values['nestedArray']; + } +} + +class NestedUnionArrayTest extends TestCase +{ + public function testNestedUnionArray(): void + { + $expectedJson = json_encode( + [ + 'nested_array' => [ + 1 => [ + 1 => ['nested_property' => 'Nested One'], + 2 => null, + 4 => '2023-01-02' + ], + 2 => [ + 5 => ['nested_property' => 'Nested Two'], + 7 => '2023-02-02' + ] + ] + ], + JSON_THROW_ON_ERROR + ); + + $object = NestedUnionArray::fromJson($expectedJson); + $this->assertInstanceOf(UnionObject::class, $object->nestedArray[1][1], 'nested_array[1][1] should be an instance of Object.'); + $this->assertEquals('Nested One', $object->nestedArray[1][1]->nestedProperty, 'nested_array[1][1]->nestedProperty should match the original data.'); + $this->assertNull($object->nestedArray[1][2], 'nested_array[1][2] should be null.'); + $this->assertInstanceOf(DateTime::class, $object->nestedArray[1][4], 'nested_array[1][4] should be a DateTime instance.'); + $this->assertEquals('2023-01-02T00:00:00+00:00', $object->nestedArray[1][4]->format(Constant::DateTimeFormat), 'nested_array[1][4] should have the correct datetime.'); + $this->assertInstanceOf(UnionObject::class, $object->nestedArray[2][5], 'nested_array[2][5] should be an instance of Object.'); + $this->assertEquals('Nested Two', $object->nestedArray[2][5]->nestedProperty, 'nested_array[2][5]->nestedProperty should match the original data.'); + $this->assertInstanceOf(DateTime::class, $object->nestedArray[2][7], 'nested_array[1][4] should be a DateTime instance.'); + $this->assertEquals('2023-02-02', $object->nestedArray[2][7]->format('Y-m-d'), 'nested_array[1][4] should have the correct date.'); + + $actualJson = $object->toJson(); + $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for nested_array.'); + } +} diff --git a/fern/sdk/tests/Core/Json/NullPropertyTest.php b/fern/sdk/tests/Core/Json/NullPropertyTest.php new file mode 100644 index 00000000..6b376b75 --- /dev/null +++ b/fern/sdk/tests/Core/Json/NullPropertyTest.php @@ -0,0 +1,53 @@ +nonNullProperty = $values['nonNullProperty']; + $this->nullProperty = $values['nullProperty'] ?? null; + } +} + +class NullPropertyTest extends TestCase +{ + public function testNullPropertiesAreOmitted(): void + { + $object = new NullProperty( + [ + "nonNullProperty" => "Test String", + "nullProperty" => null + ] + ); + + $serialized = $object->jsonSerialize(); + $this->assertArrayHasKey('non_null_property', $serialized, 'non_null_property should be present in the serialized JSON.'); + $this->assertArrayNotHasKey('null_property', $serialized, 'null_property should be omitted from the serialized JSON.'); + $this->assertEquals('Test String', $serialized['non_null_property'], 'non_null_property should have the correct value.'); + } +} diff --git a/fern/sdk/tests/Core/Json/NullableArrayTest.php b/fern/sdk/tests/Core/Json/NullableArrayTest.php new file mode 100644 index 00000000..b9df55ff --- /dev/null +++ b/fern/sdk/tests/Core/Json/NullableArrayTest.php @@ -0,0 +1,49 @@ + $nullableStringArray + */ + #[ArrayType([new Union('string', 'null')])] + #[JsonProperty('nullable_string_array')] + public array $nullableStringArray; + + /** + * @param array{ + * nullableStringArray: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->nullableStringArray = $values['nullableStringArray']; + } +} + +class NullableArrayTest extends TestCase +{ + public function testNullableArray(): void + { + $expectedJson = json_encode( + [ + 'nullable_string_array' => ['one', null, 'three'] + ], + JSON_THROW_ON_ERROR + ); + + $object = NullableArray::fromJson($expectedJson); + $this->assertEquals(['one', null, 'three'], $object->nullableStringArray, 'nullable_string_array should match the original data.'); + + $actualJson = $object->toJson(); + $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for nullable_string_array.'); + } +} diff --git a/fern/sdk/tests/Core/Json/ScalarTest.php b/fern/sdk/tests/Core/Json/ScalarTest.php new file mode 100644 index 00000000..c3d8ff3c --- /dev/null +++ b/fern/sdk/tests/Core/Json/ScalarTest.php @@ -0,0 +1,116 @@ + $intFloatArray + */ + #[ArrayType([new Union('integer', 'float')])] + #[JsonProperty('int_float_array')] + public array $intFloatArray; + + /** + * @var array $floatArray + */ + #[ArrayType(['float'])] + #[JsonProperty('float_array')] + public array $floatArray; + + /** + * @var bool|null $nullableBooleanProperty + */ + #[JsonProperty('nullable_boolean_property')] + public ?bool $nullableBooleanProperty; + + /** + * @param array{ + * integerProperty: int, + * floatProperty: float, + * otherFloatProperty: float, + * booleanProperty: bool, + * stringProperty: string, + * intFloatArray: array, + * floatArray: array, + * nullableBooleanProperty?: bool|null, + * } $values + */ + public function __construct( + array $values, + ) { + $this->integerProperty = $values['integerProperty']; + $this->floatProperty = $values['floatProperty']; + $this->otherFloatProperty = $values['otherFloatProperty']; + $this->booleanProperty = $values['booleanProperty']; + $this->stringProperty = $values['stringProperty']; + $this->intFloatArray = $values['intFloatArray']; + $this->floatArray = $values['floatArray']; + $this->nullableBooleanProperty = $values['nullableBooleanProperty'] ?? null; + } +} + +class ScalarTest extends TestCase +{ + public function testAllScalarTypesIncludingFloat(): void + { + $expectedJson = json_encode( + [ + 'integer_property' => 42, + 'float_property' => 3.14159, + 'other_float_property' => 3, + 'boolean_property' => true, + 'string_property' => 'Hello, World!', + 'int_float_array' => [1, 2.5, 3, 4.75], + 'float_array' => [1, 2, 3, 4] // Ensure we handle "integer-looking" floats + ], + JSON_THROW_ON_ERROR + ); + + $object = Scalar::fromJson($expectedJson); + $this->assertEquals(42, $object->integerProperty, 'integer_property should be 42.'); + $this->assertEquals(3.14159, $object->floatProperty, 'float_property should be 3.14159.'); + $this->assertTrue($object->booleanProperty, 'boolean_property should be true.'); + $this->assertEquals('Hello, World!', $object->stringProperty, 'string_property should be "Hello, World!".'); + $this->assertNull($object->nullableBooleanProperty, 'nullable_boolean_property should be null.'); + $this->assertEquals([1, 2.5, 3, 4.75], $object->intFloatArray, 'int_float_array should match the original data.'); + + $actualJson = $object->toJson(); + $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for ScalarTypesTest.'); + } +} diff --git a/fern/sdk/tests/Core/Json/TraitTest.php b/fern/sdk/tests/Core/Json/TraitTest.php new file mode 100644 index 00000000..5ad0e5f0 --- /dev/null +++ b/fern/sdk/tests/Core/Json/TraitTest.php @@ -0,0 +1,60 @@ +integerProperty = $values['integerProperty']; + $this->stringProperty = $values['stringProperty']; + } +} + +class TraitTest extends TestCase +{ + public function testTraitPropertyAndString(): void + { + $expectedJson = json_encode( + [ + 'integer_property' => 42, + 'string_property' => 'Hello, World!', + ], + JSON_THROW_ON_ERROR + ); + + $object = TypeWithTrait::fromJson($expectedJson); + $this->assertEquals(42, $object->integerProperty, 'integer_property should be 42.'); + $this->assertEquals('Hello, World!', $object->stringProperty, 'string_property should be "Hello, World!".'); + + $actualJson = $object->toJson(); + $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for ScalarTypesTestWithTrait.'); + } +} diff --git a/fern/sdk/tests/Core/Json/UnionArrayTest.php b/fern/sdk/tests/Core/Json/UnionArrayTest.php new file mode 100644 index 00000000..18645954 --- /dev/null +++ b/fern/sdk/tests/Core/Json/UnionArrayTest.php @@ -0,0 +1,57 @@ + $mixedDates + */ + #[ArrayType(['integer' => new Union('datetime', 'string', 'null')])] + #[JsonProperty('mixed_dates')] + public array $mixedDates; + + /** + * @param array{ + * mixedDates: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->mixedDates = $values['mixedDates']; + } +} + +class UnionArrayTest extends TestCase +{ + public function testUnionArray(): void + { + $expectedJson = json_encode( + [ + 'mixed_dates' => [ + 1 => '2023-01-01T12:00:00Z', + 2 => null, + 3 => 'Some String' + ] + ], + JSON_THROW_ON_ERROR + ); + + $object = UnionArray::fromJson($expectedJson); + $this->assertInstanceOf(DateTime::class, $object->mixedDates[1], 'mixed_dates[1] should be a DateTime instance.'); + $this->assertEquals('2023-01-01 12:00:00', $object->mixedDates[1]->format('Y-m-d H:i:s'), 'mixed_dates[1] should have the correct datetime.'); + $this->assertNull($object->mixedDates[2], 'mixed_dates[2] should be null.'); + $this->assertEquals('Some String', $object->mixedDates[3], 'mixed_dates[3] should be "Some String".'); + + $actualJson = $object->toJson(); + $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for mixed_dates.'); + } +} diff --git a/fern/sdk/tests/Core/Json/UnionPropertyTest.php b/fern/sdk/tests/Core/Json/UnionPropertyTest.php new file mode 100644 index 00000000..17ce256e --- /dev/null +++ b/fern/sdk/tests/Core/Json/UnionPropertyTest.php @@ -0,0 +1,115 @@ + 'integer'], UnionProperty::class)] + #[JsonProperty('complexUnion')] + public mixed $complexUnion; + + /** + * @param array{ + * complexUnion: string|int|null|array|UnionProperty + * } $values + */ + public function __construct( + array $values, + ) { + $this->complexUnion = $values['complexUnion']; + } +} + +class UnionPropertyTest extends TestCase +{ + public function testWithMapOfIntToInt(): void + { + $expectedJson = json_encode( + [ + 'complexUnion' => [1 => 100, 2 => 200] + ], + JSON_THROW_ON_ERROR + ); + + $object = UnionProperty::fromJson($expectedJson); + $this->assertIsArray($object->complexUnion, 'complexUnion should be an array.'); + $this->assertEquals([1 => 100, 2 => 200], $object->complexUnion, 'complexUnion should match the original map of int => int.'); + + $actualJson = $object->toJson(); + $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match the original JSON.'); + } + + public function testWithNestedUnionPropertyType(): void + { + $expectedJson = json_encode( + [ + 'complexUnion' => new UnionProperty( + [ + 'complexUnion' => 'Nested String' + ] + ) + ], + JSON_THROW_ON_ERROR + ); + + $object = UnionProperty::fromJson($expectedJson); + $this->assertInstanceOf(UnionProperty::class, $object->complexUnion, 'complexUnion should be an instance of UnionPropertyType.'); + $this->assertEquals('Nested String', $object->complexUnion->complexUnion, 'Nested complexUnion should match the original value.'); + + $actualJson = $object->toJson(); + $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match the original JSON.'); + } + + public function testWithNull(): void + { + $expectedJson = json_encode( + [], + JSON_THROW_ON_ERROR + ); + + $object = UnionProperty::fromJson($expectedJson); + $this->assertNull($object->complexUnion, 'complexUnion should be null.'); + + $actualJson = $object->toJson(); + $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match the original JSON.'); + } + + public function testWithInteger(): void + { + $expectedJson = json_encode( + [ + 'complexUnion' => 42 + ], + JSON_THROW_ON_ERROR + ); + + $object = UnionProperty::fromJson($expectedJson); + $this->assertIsInt($object->complexUnion, 'complexUnion should be an integer.'); + $this->assertEquals(42, $object->complexUnion, 'complexUnion should match the original integer.'); + + $actualJson = $object->toJson(); + $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match the original JSON.'); + } + + public function testWithString(): void + { + $expectedJson = json_encode( + [ + 'complexUnion' => 'Some String' + ], + JSON_THROW_ON_ERROR + ); + + $object = UnionProperty::fromJson($expectedJson); + $this->assertIsString($object->complexUnion, 'complexUnion should be a string.'); + $this->assertEquals('Some String', $object->complexUnion, 'complexUnion should match the original string.'); + + $actualJson = $object->toJson(); + $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match the original JSON.'); + } +} diff --git a/fern/sdk/tests/Wire/AccountTokensWireTest.php b/fern/sdk/tests/Wire/AccountTokensWireTest.php new file mode 100644 index 00000000..4d435f4c --- /dev/null +++ b/fern/sdk/tests/Wire/AccountTokensWireTest.php @@ -0,0 +1,115 @@ +client->accountTokens->listTokens( + new ListTokensRequest([ + 'gui' => true, + 'sort' => '+name,-created_at', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'account_tokens.list_tokens.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/account/tokens", + ['gui' => 'true', 'sort' => '+name,-created_at'], + 1 + ); + } + + /** + */ + public function testCreateToken(): void { + $testId = 'account_tokens.create_token.0'; + $this->client->accountTokens->createToken( + new AccountTokensCreateTokenRequestExpiresIn([]), + [ + 'headers' => [ + 'X-Test-Id' => 'account_tokens.create_token.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/account/tokens", + null, + 1 + ); + } + + /** + */ + public function testGetToken(): void { + $testId = 'account_tokens.get_token.0'; + $this->client->accountTokens->getToken( + 'token-uuid', + [ + 'headers' => [ + 'X-Test-Id' => 'account_tokens.get_token.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/account/tokens/token-uuid", + null, + 1 + ); + } + + /** + */ + public function testRevokeToken(): void { + $testId = 'account_tokens.revoke_token.0'; + $this->client->accountTokens->revokeToken( + 'token-uuid', + [ + 'headers' => [ + 'X-Test-Id' => 'account_tokens.revoke_token.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/account/tokens/token-uuid", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/AccountWireTest.php b/fern/sdk/tests/Wire/AccountWireTest.php new file mode 100644 index 00000000..b9c8c4ad --- /dev/null +++ b/fern/sdk/tests/Wire/AccountWireTest.php @@ -0,0 +1,363 @@ +client->account->details( + [ + 'headers' => [ + 'X-Test-Id' => 'account.details.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/account", + null, + 1 + ); + } + + /** + */ + public function testGetMonthlyDetailedBillingSummary(): void { + $testId = 'account.get_monthly_detailed_billing_summary.0'; + $this->client->account->getMonthlyDetailedBillingSummary( + 'year', + 'month', + new GetMonthlyDetailedBillingSummaryRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'account.get_monthly_detailed_billing_summary.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/account/billing/summary/year-month", + null, + 1 + ); + } + + /** + */ + public function testGetMonthlyBillingSummary(): void { + $testId = 'account.get_monthly_billing_summary.0'; + $this->client->account->getMonthlyBillingSummary( + 'year', + 'month', + [ + 'headers' => [ + 'X-Test-Id' => 'account.get_monthly_billing_summary.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/account/billing_summary/year-month", + null, + 1 + ); + } + + /** + */ + public function testGetCurrentNetworkUsage(): void { + $testId = 'account.get_current_network_usage.0'; + $this->client->account->getCurrentNetworkUsage( + [ + 'headers' => [ + 'X-Test-Id' => 'account.get_current_network_usage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/account/current_network_usage", + null, + 1 + ); + } + + /** + */ + public function testListAccounts(): void { + $testId = 'account.list_accounts.0'; + $this->client->account->listAccounts( + new ListAccountsRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'account.list_accounts.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/account/list", + null, + 1 + ); + } + + /** + */ + public function testCreateMslmaSigningLink(): void { + $testId = 'account.create_mslma_signing_link.0'; + $this->client->account->createMslmaSigningLink( + [ + 'headers' => [ + 'X-Test-Id' => 'account.create_mslma_signing_link.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/account/ms_lma", + null, + 1 + ); + } + + /** + */ + public function testGetAccountNetworkTopUsage(): void { + $testId = 'account.get_account_network_top_usage.0'; + $this->client->account->getAccountNetworkTopUsage( + new GetAccountNetworkTopUsageRequest([ + 'from' => new DateTime('2026-07-01T00:00:00Z'), + 'to' => new DateTime('2026-07-01T00:00:00Z'), + 'zone' => 'fi-hel1', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'account.get_account_network_top_usage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/account/network_top_usage", + ['from' => '2026-07-01T00:00:00Z', 'to' => '2026-07-01T00:00:00Z', 'zone' => 'fi-hel1'], + 1 + ); + } + + /** + */ + public function testGetAccountNetworkUsage(): void { + $testId = 'account.get_account_network_usage.0'; + $this->client->account->getAccountNetworkUsage( + new GetAccountNetworkUsageRequest([ + 'from' => new DateTime('2026-07-01T00:00:00Z'), + 'to' => new DateTime('2026-07-01T00:00:00Z'), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'account.get_account_network_usage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/account/network_usage", + ['from' => '2026-07-01T00:00:00Z', 'to' => '2026-07-01T00:00:00Z'], + 1 + ); + } + + /** + */ + public function testGetAccountResourceUsage(): void { + $testId = 'account.get_account_resource_usage.0'; + $this->client->account->getAccountResourceUsage( + [ + 'headers' => [ + 'X-Test-Id' => 'account.get_account_resource_usage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/account/resource-usage", + null, + 1 + ); + } + + /** + */ + public function testGetMonthlyResourceBillingSummary(): void { + $testId = 'account.get_monthly_resource_billing_summary.0'; + $this->client->account->getMonthlyResourceBillingSummary( + 'resource_id', + 'year', + 'month', + [ + 'headers' => [ + 'X-Test-Id' => 'account.get_monthly_resource_billing_summary.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/account/resource_billing_summary/resource_id/year-month", + null, + 1 + ); + } + + /** + */ + public function testGetAccountResourceNetworkUsage(): void { + $testId = 'account.get_account_resource_network_usage.0'; + $this->client->account->getAccountResourceNetworkUsage( + new GetAccountResourceNetworkUsageRequest([ + 'from' => new DateTime('2026-07-01T00:00:00Z'), + 'to' => new DateTime('2026-07-01T00:00:00Z'), + 'resourceId' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'zone' => 'fi-hel1', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'account.get_account_resource_network_usage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/account/resource_network_usage", + ['from' => '2026-07-01T00:00:00Z', 'to' => '2026-07-01T00:00:00Z', 'resource_id' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', 'zone' => 'fi-hel1'], + 1 + ); + } + + /** + */ + public function testCreateSubaccount(): void { + $testId = 'account.create_subaccount.0'; + $this->client->account->createSubaccount( + new CreateSubaccountRequest([ + 'subAccount' => new CreateSubaccountRequestSubAccount([ + 'username' => 'myusername', + 'password' => 'mysecr3tPassword', + 'firstName' => 'first', + 'lastName' => 'last', + 'company' => 'my company name', + 'vatNumber' => 'my vat number', + 'address' => 'my address', + 'postalCode' => '00130', + 'city' => 'Helsinki', + 'state' => '', + 'country' => 'FIN', + 'email' => 'user@example.com', + 'phone' => '+358.31245434', + 'language' => 'en', + 'currency' => 'EUR', + 'timezone' => 'Europe/Helsinki', + 'allowApi' => AccountBooleanYesno::Yes->value, + 'allowGui' => AccountBooleanYesno::No->value, + 'roles' => new CreateSubaccountRequestSubAccountRoles([ + 'role' => [ + 'technical', + 'billing', + 'aux_billing', + ], + ]), + 'labels' => [ + new AccountLabel([ + 'key' => 'department', + 'value' => 'it', + ]), + ], + 'ipFilters' => new CreateSubaccountRequestSubAccountIpFilters([ + 'ipFilter' => [ + 'ip_filter', + ], + ]), + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'account.create_subaccount.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/account/sub", + null, + 1 + ); + } + + /** + */ + public function testDeleteSubaccount(): void { + $testId = 'account.delete_subaccount.0'; + $this->client->account->deleteSubaccount( + 'username', + [ + 'headers' => [ + 'X-Test-Id' => 'account.delete_subaccount.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/account/sub/username", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/AuditLogsWireTest.php b/fern/sdk/tests/Wire/AuditLogsWireTest.php new file mode 100644 index 00000000..8ffa3ec1 --- /dev/null +++ b/fern/sdk/tests/Wire/AuditLogsWireTest.php @@ -0,0 +1,118 @@ +client->auditLogs->listAuditLogs( + new ListAuditLogsRequest([ + 'q' => 'my_account', + 'limit' => 50, + 'offset' => 0, + 'createdAfter' => new DateTime('2024-01-01T00:00:00Z'), + 'createdBefore' => new DateTime('2024-12-31T23:59:59Z'), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'audit_logs.list_audit_logs.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/audit-logs", + ['q' => 'my_account', 'limit' => '50', 'offset' => '0', 'created_after' => '2024-01-01T00:00:00Z', 'created_before' => '2024-12-31T23:59:59Z'], + 1 + ); + } + + /** + */ + public function testExportAuditLogs(): void { + $testId = 'audit_logs.export_audit_logs.0'; + $this->client->auditLogs->exportAuditLogs( + new ExportAuditLogsRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'audit_logs.export_audit_logs.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/audit-logs/export", + null, + 1 + ); + } + + /** + */ + public function testGetAuditLog(): void { + $testId = 'audit_logs.get_audit_log.0'; + $this->client->auditLogs->getAuditLog( + '01HQXYZ123456789ABCDEFGHJK', + [ + 'headers' => [ + 'X-Test-Id' => 'audit_logs.get_audit_log.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/audit-logs/01HQXYZ123456789ABCDEFGHJK", + null, + 1 + ); + } + + /** + */ + public function testGetFilterOptions(): void { + $testId = 'audit_logs.get_filter_options.0'; + $this->client->auditLogs->getFilterOptions( + [ + 'headers' => [ + 'X-Test-Id' => 'audit_logs.get_filter_options.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/audit-logs/filter-options", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/CurrencyWireTest.php b/fern/sdk/tests/Wire/CurrencyWireTest.php new file mode 100644 index 00000000..8cc85405 --- /dev/null +++ b/fern/sdk/tests/Wire/CurrencyWireTest.php @@ -0,0 +1,46 @@ +client->currency->listCurrencies( + [ + 'headers' => [ + 'X-Test-Id' => 'currency.list_currencies.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/currency", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/DatabaseWireTest.php b/fern/sdk/tests/Wire/DatabaseWireTest.php new file mode 100644 index 00000000..9ddaff22 --- /dev/null +++ b/fern/sdk/tests/Wire/DatabaseWireTest.php @@ -0,0 +1,1786 @@ +client->database->listDatabaseTypes( + [ + 'headers' => [ + 'X-Test-Id' => 'database.list_database_types.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/service-types", + null, + 1 + ); + } + + /** + */ + public function testListDatabasePlans(): void { + $testId = 'database.list_database_plans.0'; + $this->client->database->listDatabasePlans( + [ + 'headers' => [ + 'X-Test-Id' => 'database.list_database_plans.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/plans", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseType(): void { + $testId = 'database.get_database_type.0'; + $this->client->database->getDatabaseType( + DatabaseServiceType::Mysql->value, + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_type.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/service-types/mysql", + null, + 1 + ); + } + + /** + */ + public function testListDatabases(): void { + $testId = 'database.list_databases.0'; + $this->client->database->listDatabases( + new ListDatabasesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.list_databases.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database", + ['limit' => '10', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testCreateDatabase(): void { + $testId = 'database.create_database.0'; + $this->client->database->createDatabase( + new DatabaseServiceCreateOpenApi([ + 'hostnamePrefix' => 'doc-api-unique-prefix', + 'title' => 'my-managed-database', + 'type' => DatabaseServiceType::Mysql->value, + 'zone' => 'de-fra1', + 'terminationProtection' => false, + 'maintenance' => new DatabaseServiceCreateOpenApiMaintenance([ + 'dow' => DatabaseMaintenanceDow::Sunday->value, + 'time' => '05:00:00', + ]), + 'networks' => [ + new DatabaseNetworkCreate([ + 'uuid' => '03631160-d57a-4926-ad48-a2f828229dcb', + 'name' => 'example-network-1', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + new DatabaseNetworkCreate([ + 'uuid' => '03631160-d57a-4926-ad48-a2f828229dcb', + 'name' => 'example-network-2', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + ], + 'labels' => [ + new DatabaseLabelCreate([ + 'key' => 'env', + 'value' => 'staging', + ]), + new DatabaseLabelCreate([ + 'key' => 'foo', + 'value' => 'bar', + ]), + ], + 'properties' => new DatabaseServicePropertiesMysql([ + 'automaticUtilityNetworkIpFilter' => true, + 'ipFilter' => [ + 'ip_filter', + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.create_database.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/database", + null, + 1 + ); + } + + /** + */ + public function testGetDatabase(): void { + $testId = 'database.get_database.0'; + $this->client->database->getDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testDeleteDatabase(): void { + $testId = 'database.delete_database.0'; + $this->client->database->deleteDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.delete_database.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testModifyDatabase(): void { + $testId = 'database.modify_database.0'; + $this->client->database->modifyDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceModifyOpenApi([ + 'title' => 'my-managed-database', + 'powered' => true, + 'zone' => 'de-fra1', + 'terminationProtection' => false, + 'maintenance' => new DatabaseServiceModifyOpenApiMaintenance([ + 'dow' => DatabaseMaintenanceDow::Sunday->value, + 'time' => '12:00:00', + ]), + 'networks' => [ + new DatabaseNetworkCreate([ + 'uuid' => '03631160-d57a-4926-ad48-a2f828229dcb', + 'name' => 'example-network-1', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + ], + 'properties' => new DatabaseServicePropertiesMysql([ + 'automaticUtilityNetworkIpFilter' => true, + 'ipFilter' => [ + 'ip_filter', + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.modify_database.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testModifyDatabaseType(): void { + $testId = 'database.modify_database_type.0'; + $this->client->database->modifyDatabaseType( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceTypeModify([ + 'targetType' => 'primary', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.modify_database_type.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/service-type", + null, + 1 + ); + } + + /** + */ + public function testCloneDatabase(): void { + $testId = 'database.clone_database.0'; + $this->client->database->cloneDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new CloneDatabaseRequest([ + 'body' => new DatabaseServiceCloneMysql([ + 'hostnamePrefix' => 'dev', + 'cloneTime' => new DateTime('2024-01-30T15:04:05Z'), + 'backupName' => 'daily-backup-2024-01-30', + 'zone' => 'fi-hel1', + 'terminationProtection' => false, + 'maintenance' => new DatabaseServiceCloneMysqlMaintenance([ + 'dow' => DatabaseMaintenanceDow::Monday->value, + 'time' => '03:00:00', + ]), + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.clone_database.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/clone", + null, + 1 + ); + } + + /** + */ + public function testListDatabaseNetworks(): void { + $testId = 'database.list_database_networks.0'; + $this->client->database->listDatabaseNetworks( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.list_database_networks.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/networks", + null, + 1 + ); + } + + /** + */ + public function testCreateDatabaseNetwork(): void { + $testId = 'database.create_database_network.0'; + $this->client->database->createDatabaseNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateDatabaseNetworkRequest([ + 'body' => new DatabaseNetworkCreate([ + 'name' => 'my-network', + 'type' => DatabaseNetworkType::Private_->value, + 'family' => DatabaseNetworkFamily::IPv4->value, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.create_database_network.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/networks", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseNetwork(): void { + $testId = 'database.get_database_network.0'; + $this->client->database->getDatabaseNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_network.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/networks/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testDeleteDatabaseNetwork(): void { + $testId = 'database.delete_database_network.0'; + $this->client->database->deleteDatabaseNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.delete_database_network.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/networks/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testUpgradeDatabase(): void { + $testId = 'database.upgrade_database.0'; + $this->client->database->upgradeDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceUpgrade([ + 'targetVersion' => '12', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.upgrade_database.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/upgrade", + null, + 1 + ); + } + + /** + */ + public function testListDatabaseLabels(): void { + $testId = 'database.list_database_labels.0'; + $this->client->database->listDatabaseLabels( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.list_database_labels.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/labels", + null, + 1 + ); + } + + /** + */ + public function testCreateDatabaseLabel(): void { + $testId = 'database.create_database_label.0'; + $this->client->database->createDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateDatabaseLabelRequest([ + 'body' => new DatabaseLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.create_database_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/labels", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseLabel(): void { + $testId = 'database.get_database_label.0'; + $this->client->database->getDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'foo', + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/labels/foo", + null, + 1 + ); + } + + /** + */ + public function testDeleteDatabaseLabel(): void { + $testId = 'database.delete_database_label.0'; + $this->client->database->deleteDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'foo', + [ + 'headers' => [ + 'X-Test-Id' => 'database.delete_database_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/labels/foo", + null, + 1 + ); + } + + /** + */ + public function testModifyDatabaseLabel(): void { + $testId = 'database.modify_database_label.0'; + $this->client->database->modifyDatabaseLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'foo', + new DatabaseLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.modify_database_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/labels/foo", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseAvailableExtensions(): void { + $testId = 'database.get_database_available_extensions.0'; + $this->client->database->getDatabaseAvailableExtensions( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_available_extensions.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/available-extensions", + null, + 1 + ); + } + + /** + */ + public function testGetPgAvailableExtensions(): void { + $testId = 'database.get_pg_available_extensions.0'; + $this->client->database->getPgAvailableExtensions( + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_pg_available_extensions.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/pg/available-extensions", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseTypeVersions(): void { + $testId = 'database.get_database_type_versions.0'; + $this->client->database->getDatabaseTypeVersions( + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_type_versions.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/versions", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseAccessControl(): void { + $testId = 'database.get_database_access_control.0'; + $this->client->database->getDatabaseAccessControl( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_access_control.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/access-control", + null, + 1 + ); + } + + /** + */ + public function testModifyDatabaseAccessControl(): void { + $testId = 'database.modify_database_access_control.0'; + $this->client->database->modifyDatabaseAccessControl( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceAclModify([ + 'accessControl' => true, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.modify_database_access_control.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/access-control", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseSecurity(): void { + $testId = 'database.get_database_security.0'; + $this->client->database->getDatabaseSecurity( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_security.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/security", + null, + 1 + ); + } + + /** + */ + public function testEnableDatabaseSecurityAdmin(): void { + $testId = 'database.enable_database_security_admin.0'; + $this->client->database->enableDatabaseSecurityAdmin( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceSecurityEnable([ + 'adminPassword' => 'Str0ngP@ssw0rd!', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.enable_database_security_admin.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/security/admin", + null, + 1 + ); + } + + /** + */ + public function testModifyDatabaseSecurityAdmin(): void { + $testId = 'database.modify_database_security_admin.0'; + $this->client->database->modifyDatabaseSecurityAdmin( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceSecurityModify([ + 'adminPassword' => 'Curr3nt@Passw0rd!', + 'newPassword' => 'N3w@Str0ngPassw0rd!', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.modify_database_security_admin.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/security/admin", + null, + 1 + ); + } + + /** + */ + public function testListDatabaseIntegrationEndpoints(): void { + $testId = 'database.list_database_integration_endpoints.0'; + $this->client->database->listDatabaseIntegrationEndpoints( + [ + 'headers' => [ + 'X-Test-Id' => 'database.list_database_integration_endpoints.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/integration-endpoints", + null, + 1 + ); + } + + /** + */ + public function testCreateDatabaseIntegrationEndpoint(): void { + $testId = 'database.create_database_integration_endpoint.0'; + $this->client->database->createDatabaseIntegrationEndpoint( + new DatabaseIntegrationEndpointCreate([ + 'type' => DatabaseIntegrationEndpoint::Logs->value, + 'name' => 'webhook-endpoint', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.create_database_integration_endpoint.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/database/integration-endpoints", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseIntegrationEndpoint(): void { + $testId = 'database.get_database_integration_endpoint.0'; + $this->client->database->getDatabaseIntegrationEndpoint( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_integration_endpoint.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/integration-endpoints/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testDeleteDatabaseIntegrationEndpoint(): void { + $testId = 'database.delete_database_integration_endpoint.0'; + $this->client->database->deleteDatabaseIntegrationEndpoint( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.delete_database_integration_endpoint.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/database/integration-endpoints/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testModifyDatabaseIntegrationEndpoint(): void { + $testId = 'database.modify_database_integration_endpoint.0'; + $this->client->database->modifyDatabaseIntegrationEndpoint( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseIntegrationEndpointModify([]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.modify_database_integration_endpoint.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/database/integration-endpoints/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseAccountCa(): void { + $testId = 'database.get_database_account_ca.0'; + $this->client->database->getDatabaseAccountCa( + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_account_ca.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/certificate", + null, + 1 + ); + } + + /** + */ + public function testListDatabaseAlerts(): void { + $testId = 'database.list_database_alerts.0'; + $this->client->database->listDatabaseAlerts( + [ + 'headers' => [ + 'X-Test-Id' => 'database.list_database_alerts.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/alerts", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseStatus(): void { + $testId = 'database.get_database_status.0'; + $this->client->database->getDatabaseStatus( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_status.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/status", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseVersions(): void { + $testId = 'database.get_database_versions.0'; + $this->client->database->getDatabaseVersions( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_versions.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/versions", + null, + 1 + ); + } + + /** + */ + public function testStartDatabaseManualMaintenance(): void { + $testId = 'database.start_database_manual_maintenance.0'; + $this->client->database->startDatabaseManualMaintenance( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.start_database_manual_maintenance.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/start-maintenance", + null, + 1 + ); + } + + /** + */ + public function testEnableDatabaseTemporaryWrites(): void { + $testId = 'database.enable_database_temporary_writes.0'; + $this->client->database->enableDatabaseTemporaryWrites( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.enable_database_temporary_writes.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/enable-writes", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseMigrationStatus(): void { + $testId = 'database.get_database_migration_status.0'; + $this->client->database->getDatabaseMigrationStatus( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_migration_status.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/migration-status", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseAlerts(): void { + $testId = 'database.get_database_alerts.0'; + $this->client->database->getDatabaseAlerts( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_alerts.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/alerts", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseMetrics(): void { + $testId = 'database.get_database_metrics.0'; + $this->client->database->getDatabaseMetrics( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_metrics.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/metrics", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseQueryStatistics(): void { + $testId = 'database.get_database_query_statistics.0'; + $this->client->database->getDatabaseQueryStatistics( + '01234567-89ab-cdef-0123-456789abcdef', + new GetDatabaseQueryStatisticsRequest([ + 'limit' => 10, + 'offset' => 0, + 'order' => 'asc', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_query_statistics.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/query-statistics", + ['limit' => '10', 'offset' => '0', 'order' => 'asc'], + 1 + ); + } + + /** + */ + public function testGetDatabaseLogs(): void { + $testId = 'database.get_database_logs.0'; + $this->client->database->getDatabaseLogs( + '01234567-89ab-cdef-0123-456789abcdef', + new GetDatabaseLogsRequest([ + 'limit' => 10, + 'offset' => 0, + 'order' => 'asc', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_logs.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/logs", + ['limit' => '10', 'offset' => '0', 'order' => 'asc'], + 1 + ); + } + + /** + */ + public function testListDatabaseConnectionPools(): void { + $testId = 'database.list_database_connection_pools.0'; + $this->client->database->listDatabaseConnectionPools( + '01234567-89ab-cdef-0123-456789abcdef', + new ListDatabaseConnectionPoolsRequest([ + 'sort' => 'asc', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.list_database_connection_pools.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/connection-pools", + ['sort' => 'asc'], + 1 + ); + } + + /** + */ + public function testCreateDatabaseConnectionPool(): void { + $testId = 'database.create_database_connection_pool.0'; + $this->client->database->createDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseConnectionPoolCreate([ + 'database' => 'defaultdb', + 'poolMode' => DatabaseConnectionPoolCreatePoolMode::Statement->value, + 'poolName' => 'readonly-pool', + 'poolSize' => 10, + 'username' => 'readonly', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.create_database_connection_pool.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/connection-pools", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseConnectionPool(): void { + $testId = 'database.get_database_connection_pool.0'; + $this->client->database->getDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_connection_pool.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/connection-pools/my-service", + null, + 1 + ); + } + + /** + */ + public function testDeleteDatabaseConnectionPool(): void { + $testId = 'database.delete_database_connection_pool.0'; + $this->client->database->deleteDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + [ + 'headers' => [ + 'X-Test-Id' => 'database.delete_database_connection_pool.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/connection-pools/my-service", + null, + 1 + ); + } + + /** + */ + public function testModifyDatabaseConnectionPool(): void { + $testId = 'database.modify_database_connection_pool.0'; + $this->client->database->modifyDatabaseConnectionPool( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + new DatabaseConnectionPoolModify([ + 'database' => 'defaultdb', + 'poolMode' => DatabaseConnectionPoolModifyPoolMode::Session->value, + 'poolSize' => 20, + 'username' => 'app-user', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.modify_database_connection_pool.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/connection-pools/my-service", + null, + 1 + ); + } + + /** + */ + public function testListDatabaseIndices(): void { + $testId = 'database.list_database_indices.0'; + $this->client->database->listDatabaseIndices( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.list_database_indices.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/indices", + null, + 1 + ); + } + + /** + */ + public function testDeleteDatabaseIndex(): void { + $testId = 'database.delete_database_index.0'; + $this->client->database->deleteDatabaseIndex( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + [ + 'headers' => [ + 'X-Test-Id' => 'database.delete_database_index.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/indices/my-service", + null, + 1 + ); + } + + /** + */ + public function testListDatabaseIntegrations(): void { + $testId = 'database.list_database_integrations.0'; + $this->client->database->listDatabaseIntegrations( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.list_database_integrations.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/integrations", + null, + 1 + ); + } + + /** + */ + public function testCreateDatabaseIntegration(): void { + $testId = 'database.create_database_integration.0'; + $this->client->database->createDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateDatabaseIntegrationRequest([ + 'body' => new DatabaseServiceIntegrationCreate([ + 'type' => DatabaseServiceIntegration::Logs->value, + 'destinationUuid' => '09e86f48-2dcd-4a43-843d-3532ab112c1d', + 'properties' => [ + 'opensearch_index_days_max' => 30, + 'opensearch_index_prefix' => "mysql_logs", + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.create_database_integration.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/integrations", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseIntegration(): void { + $testId = 'database.get_database_integration.0'; + $this->client->database->getDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_integration.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/integrations/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testDeleteDatabaseIntegration(): void { + $testId = 'database.delete_database_integration.0'; + $this->client->database->deleteDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.delete_database_integration.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/integrations/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testModifyDatabaseIntegration(): void { + $testId = 'database.modify_database_integration.0'; + $this->client->database->modifyDatabaseIntegration( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceIntegrationModify([ + 'properties' => [ + 'key1' => "value1", + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.modify_database_integration.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/integrations/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testListDatabaseLogicalDatabases(): void { + $testId = 'database.list_database_logical_databases.0'; + $this->client->database->listDatabaseLogicalDatabases( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.list_database_logical_databases.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/databases", + null, + 1 + ); + } + + /** + */ + public function testCreateDatabaseLogicalDatabase(): void { + $testId = 'database.create_database_logical_database.0'; + $this->client->database->createDatabaseLogicalDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + new LogicalDatabaseCreate([ + 'name' => 'my_database', + 'lcCollate' => 'en_US.UTF-8', + 'lcCtype' => 'en_US.UTF-8', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.create_database_logical_database.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/databases", + null, + 1 + ); + } + + /** + */ + public function testDeleteDatabaseLogicalDatabase(): void { + $testId = 'database.delete_database_logical_database.0'; + $this->client->database->deleteDatabaseLogicalDatabase( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + [ + 'headers' => [ + 'X-Test-Id' => 'database.delete_database_logical_database.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/databases/my-service", + null, + 1 + ); + } + + /** + */ + public function testGetDatabasePeeringsStatus(): void { + $testId = 'database.get_database_peerings_status.0'; + $this->client->database->getDatabasePeeringsStatus( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_peerings_status.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/peering-status", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseSessions(): void { + $testId = 'database.get_database_sessions.0'; + $this->client->database->getDatabaseSessions( + '01234567-89ab-cdef-0123-456789abcdef', + new GetDatabaseSessionsRequest([ + 'limit' => 10, + 'offset' => 0, + 'order' => 'asc', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_sessions.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/sessions", + ['limit' => '10', 'offset' => '0', 'order' => 'asc'], + 1 + ); + } + + /** + */ + public function testTerminateDatabaseSession(): void { + $testId = 'database.terminate_database_session.0'; + $this->client->database->terminateDatabaseSession( + '01234567-89ab-cdef-0123-456789abcdef', + 1001, + [ + 'headers' => [ + 'X-Test-Id' => 'database.terminate_database_session.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/sessions/1001", + null, + 1 + ); + } + + /** + */ + public function testCreateDatabaseTask(): void { + $testId = 'database.create_database_task.0'; + $this->client->database->createDatabaseTask( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceTaskCreate([ + 'datasetImport' => new DatabaseServiceTaskCreateDatasetImport([ + 'datasetName' => 'customer-events', + ]), + 'operation' => 'dataset_import', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.create_database_task.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/tasks", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseTask(): void { + $testId = 'database.get_database_task.0'; + $this->client->database->getDatabaseTask( + '01234567-89ab-cdef-0123-456789abcdef', + 1001, + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_task.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/tasks/1001", + null, + 1 + ); + } + + /** + */ + public function testListDatabaseUsers(): void { + $testId = 'database.list_database_users.0'; + $this->client->database->listDatabaseUsers( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'database.list_database_users.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/users", + null, + 1 + ); + } + + /** + */ + public function testCreateDatabaseUser(): void { + $testId = 'database.create_database_user.0'; + $this->client->database->createDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + new DatabaseServiceUserCreate([ + 'username' => 'api-doc-user', + 'password' => 'new-password', + 'authentication' => 'caching_sha2_password', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.create_database_user.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/users", + null, + 1 + ); + } + + /** + */ + public function testGetDatabaseUser(): void { + $testId = 'database.get_database_user.0'; + $this->client->database->getDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + [ + 'headers' => [ + 'X-Test-Id' => 'database.get_database_user.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/users/my-service", + null, + 1 + ); + } + + /** + */ + public function testDeleteDatabaseUser(): void { + $testId = 'database.delete_database_user.0'; + $this->client->database->deleteDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + [ + 'headers' => [ + 'X-Test-Id' => 'database.delete_database_user.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/users/my-service", + null, + 1 + ); + } + + /** + */ + public function testModifyDatabaseUser(): void { + $testId = 'database.modify_database_user.0'; + $this->client->database->modifyDatabaseUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + new DatabaseServiceUserModify([ + 'password' => 'new_secure_password_123!', + 'authentication' => 'caching_sha2_password', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.modify_database_user.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/users/my-service", + null, + 1 + ); + } + + /** + */ + public function testModifyDatabaseUserAccessControl(): void { + $testId = 'database.modify_database_user_access_control.0'; + $this->client->database->modifyDatabaseUserAccessControl( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-service', + new DatabaseServiceUserAclModify([ + 'redisAccessControl' => new DatabaseServiceUserAclModifyRedisAccessControl([ + 'categories' => [ + '@admin', + '@read', + ], + 'channels' => [ + 'news', + 'alerts', + ], + 'commands' => [ + 'GET', + 'SET', + ], + 'keys' => [ + 'user:*', + 'session:*', + ], + ]), + 'pgAccessControl' => new DatabaseServiceUserAclModifyPgAccessControl([ + 'allowReplication' => true, + ]), + 'opensearchAccessControl' => new DatabaseServiceUserAclModifyOpensearchAccessControl([ + 'rules' => [ + new DatabaseServiceUserAclModifyOpensearchAccessControlRulesItem([ + 'index' => 'logs-*', + 'permission' => 'read', + ]), + ], + ]), + 'valkeyAccessControl' => new DatabaseServiceUserAclModifyValkeyAccessControl([ + 'categories' => [ + '@write', + ], + 'channels' => [ + 'updates', + ], + 'commands' => [ + 'DEL', + ], + 'keys' => [ + 'cache:*', + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'database.modify_database_user_access_control.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/database/01234567-89ab-cdef-0123-456789abcdef/users/my-service/access-control", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/DeviceWireTest.php b/fern/sdk/tests/Wire/DeviceWireTest.php new file mode 100644 index 00000000..2f528b6a --- /dev/null +++ b/fern/sdk/tests/Wire/DeviceWireTest.php @@ -0,0 +1,48 @@ +client->device->getAvailablePassthroughDevices( + new GetAvailablePassthroughDevicesRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'device.get_available_passthrough_devices.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/device/availability", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/EventsWireTest.php b/fern/sdk/tests/Wire/EventsWireTest.php new file mode 100644 index 00000000..cd817058 --- /dev/null +++ b/fern/sdk/tests/Wire/EventsWireTest.php @@ -0,0 +1,49 @@ +client->events->listEvents( + 'server_uuid', + 1, + 1, + [ + 'headers' => [ + 'X-Test-Id' => 'events.list_events.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/events/server_uuid/1,1", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/FileStorageWireTest.php b/fern/sdk/tests/Wire/FileStorageWireTest.php new file mode 100644 index 00000000..cca08219 --- /dev/null +++ b/fern/sdk/tests/Wire/FileStorageWireTest.php @@ -0,0 +1,775 @@ +client->fileStorage->listFileStorages( + new ListFileStoragesRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.list_file_storages.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/file-storage", + null, + 1 + ); + } + + /** + */ + public function testCreateFileStorage(): void { + $testId = 'file_storage.create_file_storage.0'; + $this->client->fileStorage->createFileStorage( + new FileStorageServiceCreate([ + 'name' => 'test-name', + 'zone' => 'fi-hel2', + 'configuredStatus' => FileStorageConfiguredStatus::Started->value, + 'sizeGib' => 250, + 'encrypted' => false, + 'networks' => [ + new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'net', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '192.168.147.120', + ]), + ], + 'shares' => [ + new FileStorageShareCreate([ + 'name' => 'read', + 'path' => '/public', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '*', + 'permission' => FileStoragePermission::Ro->value, + ]), + ], + ]), + new FileStorageShareCreate([ + 'name' => 'write', + 'path' => '/project/data', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.147.0/24', + 'permission' => FileStoragePermission::Rw->value, + ]), + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => 'local.domain', + 'permission' => FileStoragePermission::Rw->value, + ]), + ], + ]), + ], + 'labels' => [ + new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.create_file_storage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/file-storage", + null, + 1 + ); + } + + /** + */ + public function testGetFileStorage(): void { + $testId = 'file_storage.get_file_storage.0'; + $this->client->fileStorage->getFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.get_file_storage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069", + null, + 1 + ); + } + + /** + */ + public function testReplaceFileStorage(): void { + $testId = 'file_storage.replace_file_storage.0'; + $this->client->fileStorage->replaceFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new FileStorageServiceReplace([ + 'name' => 'test-name', + 'configuredStatus' => FileStorageConfiguredStatus::Started->value, + 'sizeGib' => 250, + 'networks' => [ + new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'net', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '192.168.147.120', + ]), + ], + 'labels' => [ + new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.replace_file_storage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069", + null, + 1 + ); + } + + /** + */ + public function testDeleteFileStorage(): void { + $testId = 'file_storage.delete_file_storage.0'; + $this->client->fileStorage->deleteFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.delete_file_storage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069", + null, + 1 + ); + } + + /** + */ + public function testModifyFileStorage(): void { + $testId = 'file_storage.modify_file_storage.0'; + $this->client->fileStorage->modifyFileStorage( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new FileStorageServiceModify([ + 'name' => 'test-name', + 'configuredStatus' => FileStorageConfiguredStatus::Started->value, + 'sizeGib' => 250, + 'networks' => [ + new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'net', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '192.168.147.120', + ]), + ], + 'labels' => [ + new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.modify_file_storage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069", + null, + 1 + ); + } + + /** + */ + public function testListFileStorageNetworks(): void { + $testId = 'file_storage.list_file_storage_networks.0'; + $this->client->fileStorage->listFileStorageNetworks( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.list_file_storage_networks.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/networks", + null, + 1 + ); + } + + /** + */ + public function testCreateFileStorageNetwork(): void { + $testId = 'file_storage.create_file_storage_network.0'; + $this->client->fileStorage->createFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new CreateFileStorageNetworkRequest([ + 'body' => new FileStorageNetworkCreate([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'test-name', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '10.20.30.40', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.create_file_storage_network.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/networks", + null, + 1 + ); + } + + /** + */ + public function testGetFileStorageNetwork(): void { + $testId = 'file_storage.get_file_storage_network.0'; + $this->client->fileStorage->getFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.get_file_storage_network.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/networks/test-name", + null, + 1 + ); + } + + /** + */ + public function testDeleteFileStorageNetwork(): void { + $testId = 'file_storage.delete_file_storage_network.0'; + $this->client->fileStorage->deleteFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.delete_file_storage_network.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/networks/test-name", + null, + 1 + ); + } + + /** + */ + public function testModifyFileStorageNetwork(): void { + $testId = 'file_storage.modify_file_storage_network.0'; + $this->client->fileStorage->modifyFileStorageNetwork( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + new FileStorageNetworkModify([ + 'uuid' => '03720d07-80a9-41ac-90b0-68a932109339', + 'name' => 'test-name', + 'family' => FileStorageNetworkFamily::IPv4->value, + 'ipAddress' => '10.20.30.40', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.modify_file_storage_network.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/networks/test-name", + null, + 1 + ); + } + + /** + */ + public function testListFileStorageShares(): void { + $testId = 'file_storage.list_file_storage_shares.0'; + $this->client->fileStorage->listFileStorageShares( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.list_file_storage_shares.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/shares", + null, + 1 + ); + } + + /** + */ + public function testCreateFileStorageShare(): void { + $testId = 'file_storage.create_file_storage_share.0'; + $this->client->fileStorage->createFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new CreateFileStorageShareRequest([ + 'body' => new FileStorageShareCreate([ + 'name' => 'read', + 'path' => '/public', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.147.0/24', + 'permission' => FileStoragePermission::Ro->value, + ]), + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.create_file_storage_share.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/shares", + null, + 1 + ); + } + + /** + */ + public function testGetFileStorageShare(): void { + $testId = 'file_storage.get_file_storage_share.0'; + $this->client->fileStorage->getFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.get_file_storage_share.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/shares/test-name", + null, + 1 + ); + } + + /** + */ + public function testDeleteFileStorageShare(): void { + $testId = 'file_storage.delete_file_storage_share.0'; + $this->client->fileStorage->deleteFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.delete_file_storage_share.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/shares/test-name", + null, + 1 + ); + } + + /** + */ + public function testModifyFileStorageShare(): void { + $testId = 'file_storage.modify_file_storage_share.0'; + $this->client->fileStorage->modifyFileStorageShare( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + new FileStorageShareModify([ + 'name' => 'test-name', + 'acl' => [ + new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.25.0/24', + 'permission' => FileStoragePermission::Ro->value, + ]), + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.modify_file_storage_share.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/shares/test-name", + null, + 1 + ); + } + + /** + */ + public function testListFileStorageAcls(): void { + $testId = 'file_storage.list_file_storage_acls.0'; + $this->client->fileStorage->listFileStorageAcls( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.list_file_storage_acls.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/shares/test-name/acl", + null, + 1 + ); + } + + /** + */ + public function testCreateFileStorageAcl(): void { + $testId = 'file_storage.create_file_storage_acl.0'; + $this->client->fileStorage->createFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + new CreateFileStorageAclRequest([ + 'body' => new FileStorageAclCreate([ + 'name' => 'test-name', + 'target' => '192.168.25.147', + 'permission' => FileStoragePermission::Ro->value, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.create_file_storage_acl.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/shares/test-name/acl", + null, + 1 + ); + } + + /** + */ + public function testGetFileStorageAcl(): void { + $testId = 'file_storage.get_file_storage_acl.0'; + $this->client->fileStorage->getFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + 'test-name', + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.get_file_storage_acl.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/shares/test-name/acl/test-name", + null, + 1 + ); + } + + /** + */ + public function testDeleteFileStorageAcl(): void { + $testId = 'file_storage.delete_file_storage_acl.0'; + $this->client->fileStorage->deleteFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + 'test-name', + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.delete_file_storage_acl.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/shares/test-name/acl/test-name", + null, + 1 + ); + } + + /** + */ + public function testModifyFileStorageAcl(): void { + $testId = 'file_storage.modify_file_storage_acl.0'; + $this->client->fileStorage->modifyFileStorageAcl( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'test-name', + 'test-name', + new FileStorageAclModify([ + 'name' => 'test-name', + 'target' => '192.168.25.0/24', + 'permission' => FileStoragePermission::Rw->value, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.modify_file_storage_acl.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/shares/test-name/acl/test-name", + null, + 1 + ); + } + + /** + */ + public function testListFileStorageLabels(): void { + $testId = 'file_storage.list_file_storage_labels.0'; + $this->client->fileStorage->listFileStorageLabels( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.list_file_storage_labels.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/labels", + null, + 1 + ); + } + + /** + */ + public function testCreateFileStorageLabel(): void { + $testId = 'file_storage.create_file_storage_label.0'; + $this->client->fileStorage->createFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + new CreateFileStorageLabelRequest([ + 'body' => new FileStorageLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.create_file_storage_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/labels", + null, + 1 + ); + } + + /** + */ + public function testGetFileStorageLabel(): void { + $testId = 'file_storage.get_file_storage_label.0'; + $this->client->fileStorage->getFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'environment', + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.get_file_storage_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/labels/environment", + null, + 1 + ); + } + + /** + */ + public function testDeleteFileStorageLabel(): void { + $testId = 'file_storage.delete_file_storage_label.0'; + $this->client->fileStorage->deleteFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'environment', + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.delete_file_storage_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/labels/environment", + null, + 1 + ); + } + + /** + */ + public function testModifyFileStorageLabel(): void { + $testId = 'file_storage.modify_file_storage_label.0'; + $this->client->fileStorage->modifyFileStorageLabel( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + 'environment', + new FileStorageLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.modify_file_storage_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/labels/environment", + null, + 1 + ); + } + + /** + */ + public function testGetFileStorageCurrentState(): void { + $testId = 'file_storage.get_file_storage_current_state.0'; + $this->client->fileStorage->getFileStorageCurrentState( + '17fd43a5-a97e-44f7-98a8-0a787da67069', + [ + 'headers' => [ + 'X-Test-Id' => 'file_storage.get_file_storage_current_state.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/file-storage/17fd43a5-a97e-44f7-98a8-0a787da67069/current-state", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/FirewallRulesetWireTest.php b/fern/sdk/tests/Wire/FirewallRulesetWireTest.php new file mode 100644 index 00000000..390f1c0d --- /dev/null +++ b/fern/sdk/tests/Wire/FirewallRulesetWireTest.php @@ -0,0 +1,660 @@ +client->firewallRuleset->listFirewallRulesets( + new ListFirewallRulesetsRequest([ + 'limit' => 10, + 'offset' => 0, + 'sort' => 'name', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.list_firewall_rulesets.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/firewall-ruleset", + ['limit' => '10', 'offset' => '0', 'sort' => 'name'], + 1 + ); + } + + /** + */ + public function testCreateFirewallRuleset(): void { + $testId = 'firewall_ruleset.create_firewall_ruleset.0'; + $this->client->firewallRuleset->createFirewallRuleset( + new CreateFirewallRuleset([ + 'name' => 'example_firewall_ruleset', + 'stateful' => true, + 'enabled' => false, + 'defaultDnsRulesEnabled' => false, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.create_firewall_ruleset.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/firewall-ruleset", + null, + 1 + ); + } + + /** + */ + public function testGetFirewallRuleset(): void { + $testId = 'firewall_ruleset.get_firewall_ruleset.0'; + $this->client->firewallRuleset->getFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.get_firewall_ruleset.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/firewall-ruleset/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testDeleteFirewallRuleset(): void { + $testId = 'firewall_ruleset.delete_firewall_ruleset.0'; + $this->client->firewallRuleset->deleteFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.delete_firewall_ruleset.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/firewall-ruleset/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testModifyFirewallRuleset(): void { + $testId = 'firewall_ruleset.modify_firewall_ruleset.0'; + $this->client->firewallRuleset->modifyFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetModify([ + 'name' => 'modified_example_firewall_ruleset', + 'description' => 'Modified example stateless firewall ruleset', + 'labels' => [ + new FirewallRulesetCreateLabel([ + 'key' => 'dev', + 'value' => 'dev-1', + ]), + ], + 'enabled' => false, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.modify_firewall_ruleset.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/firewall-ruleset/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testRestoreFirewallRuleset(): void { + $testId = 'firewall_ruleset.restore_firewall_ruleset.0'; + $this->client->firewallRuleset->restoreFirewallRuleset( + '01234567-89ab-cdef-0123-456789abcdef', + 1, + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.restore_firewall_ruleset.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/firewall-ruleset/01234567-89ab-cdef-0123-456789abcdef/restore/1", + null, + 1 + ); + } + + /** + */ + public function testListFirewallRulesetRules(): void { + $testId = 'firewall_ruleset.list_firewall_ruleset_rules.0'; + $this->client->firewallRuleset->listFirewallRulesetRules( + '01234567-89ab-cdef-0123-456789abcdef', + new ListFirewallRulesetRulesRequest([ + 'limit' => 10, + 'offset' => 0, + 'sort' => 'name', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.list_firewall_ruleset_rules.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/firewall-ruleset/01234567-89ab-cdef-0123-456789abcdef/rule", + ['limit' => '10', 'offset' => '0', 'sort' => 'name'], + 1 + ); + } + + /** + */ + public function testCreateFirewallRulesetRule(): void { + $testId = 'firewall_ruleset.create_firewall_ruleset_rule.0'; + $this->client->firewallRuleset->createFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateFirewallRulesetRuleRequest([ + 'body' => new FirewallRulesetFirewallRuleCreate([ + 'enabled' => false, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'direction' => FirewallRulesetRuleDirection::In->value, + 'family' => FirewallRulesetRuleFamily::IPv4->value, + 'protocol' => FirewallRulesetRuleProtocol::Tcp->value, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.create_firewall_ruleset_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/firewall-ruleset/01234567-89ab-cdef-0123-456789abcdef/rule", + null, + 1 + ); + } + + /** + */ + public function testCreateMultipleFirewallRulesetRule(): void { + $testId = 'firewall_ruleset.create_multiple_firewall_ruleset_rule.0'; + $this->client->firewallRuleset->createMultipleFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetFirewallMultipleRuleCreate([ + 'rules' => [ + new FirewallRulesetFirewallRuleCreate([ + 'enabled' => false, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'direction' => FirewallRulesetRuleDirection::In->value, + 'family' => FirewallRulesetRuleFamily::IPv4->value, + 'protocol' => FirewallRulesetRuleProtocol::Tcp->value, + ]), + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.create_multiple_firewall_ruleset_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/firewall-ruleset/01234567-89ab-cdef-0123-456789abcdef/rule", + null, + 1 + ); + } + + /** + */ + public function testGetFirewallRulesetRule(): void { + $testId = 'firewall_ruleset.get_firewall_ruleset_rule.0'; + $this->client->firewallRuleset->getFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.get_firewall_ruleset_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/firewall-ruleset/01234567-89ab-cdef-0123-456789abcdef/rule/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testDeleteFirewallRulesetRule(): void { + $testId = 'firewall_ruleset.delete_firewall_ruleset_rule.0'; + $this->client->firewallRuleset->deleteFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.delete_firewall_ruleset_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/firewall-ruleset/01234567-89ab-cdef-0123-456789abcdef/rule/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testModifyFirewallRulesetRule(): void { + $testId = 'firewall_ruleset.modify_firewall_ruleset_rule.0'; + $this->client->firewallRuleset->modifyFirewallRulesetRule( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetFirewallRuleModify([ + 'enabled' => false, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'direction' => FirewallRulesetRuleDirection::In->value, + 'family' => FirewallRulesetRuleFamily::IPv4->value, + 'protocol' => FirewallRulesetRuleProtocol::Tcp->value, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.modify_firewall_ruleset_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/firewall-ruleset/01234567-89ab-cdef-0123-456789abcdef/rule/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testListFirewallRulesetLabels(): void { + $testId = 'firewall_ruleset.list_firewall_ruleset_labels.0'; + $this->client->firewallRuleset->listFirewallRulesetLabels( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.list_firewall_ruleset_labels.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/firewall-ruleset/01234567-89ab-cdef-0123-456789abcdef/labels", + null, + 1 + ); + } + + /** + */ + public function testCreateFirewallRulesetLabel(): void { + $testId = 'firewall_ruleset.create_firewall_ruleset_label.0'; + $this->client->firewallRuleset->createFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateFirewallRulesetLabelRequest([ + 'body' => new FirewallRulesetCreateLabel([ + 'key' => 'dev', + 'value' => 'dev-1', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.create_firewall_ruleset_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/firewall-ruleset/01234567-89ab-cdef-0123-456789abcdef/labels", + null, + 1 + ); + } + + /** + */ + public function testListFirewallRulesetAttachedServers(): void { + $testId = 'firewall_ruleset.list_firewall_ruleset_attached_servers.0'; + $this->client->firewallRuleset->listFirewallRulesetAttachedServers( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.list_firewall_ruleset_attached_servers.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/firewall-ruleset/01234567-89ab-cdef-0123-456789abcdef/servers", + null, + 1 + ); + } + + /** + */ + public function testGetFirewallRulesetLabel(): void { + $testId = 'firewall_ruleset.get_firewall_ruleset_label.0'; + $this->client->firewallRuleset->getFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.get_firewall_ruleset_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/firewall-ruleset/01234567-89ab-cdef-0123-456789abcdef/labels/environment", + null, + 1 + ); + } + + /** + */ + public function testDeleteFirewallRulesetLabel(): void { + $testId = 'firewall_ruleset.delete_firewall_ruleset_label.0'; + $this->client->firewallRuleset->deleteFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.delete_firewall_ruleset_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/firewall-ruleset/01234567-89ab-cdef-0123-456789abcdef/labels/environment", + null, + 1 + ); + } + + /** + */ + public function testModifyFirewallRulesetLabel(): void { + $testId = 'firewall_ruleset.modify_firewall_ruleset_label.0'; + $this->client->firewallRuleset->modifyFirewallRulesetLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + new FirewallRulesetLabelModify([ + 'key' => 'foo', + 'value' => 'bar', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.modify_firewall_ruleset_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/firewall-ruleset/01234567-89ab-cdef-0123-456789abcdef/labels/environment", + null, + 1 + ); + } + + /** + */ + public function testListServerFirewallRule(): void { + $testId = 'firewall_ruleset.list_server_firewall_rule.0'; + $this->client->firewallRuleset->listServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + new ListServerFirewallRuleRequest([ + 'limit' => 10, + 'offset' => 0, + 'sort' => 'name', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.list_server_firewall_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/firewall-ruleset/server/01234567-89ab-cdef-0123-456789abcdef/firewall-rule", + ['limit' => '10', 'offset' => '0', 'sort' => 'name'], + 1 + ); + } + + /** + */ + public function testCreateServerFirewallRule(): void { + $testId = 'firewall_ruleset.create_server_firewall_rule.0'; + $this->client->firewallRuleset->createServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetServerFirewallRuleCreate([ + 'firewallRule' => new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::In->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'destinationAddressStart' => '', + 'destinationAddressEnd' => '', + 'sourceAddressStart' => '192.168.1.1', + 'sourceAddressEnd' => '192.168.1.255', + 'comment' => 'Allow SSH from this network', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.create_server_firewall_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/firewall-ruleset/server/01234567-89ab-cdef-0123-456789abcdef/firewall-rule", + null, + 1 + ); + } + + /** + */ + public function testCreateMultipleServerFirewallRules(): void { + $testId = 'firewall_ruleset.create_multiple_server_firewall_rules.0'; + $this->client->firewallRuleset->createMultipleServerFirewallRules( + '01234567-89ab-cdef-0123-456789abcdef', + new FirewallRulesetServerMultipleFirewallRulesCreate([ + 'firewallRules' => new FirewallRulesetServerMultipleFirewallRulesCreateFirewallRules([ + 'firewallRule' => [ + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::In->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'sourceAddressStart' => '192.168.1.1', + 'sourceAddressEnd' => '192.168.1.255', + 'comment' => 'Allow SSH from this network', + ]), + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::In->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'sourceAddressStart' => '1.1.1.1', + 'sourceAddressEnd' => '1.1.1.1', + 'comment' => 'Allow DNS from this network', + ]), + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::Out->value, + 'action' => FirewallRulesetRuleAction::Drop->value, + 'family' => 'IPv4', + 'protocol' => 'tcp', + 'destinationAddressStart' => '100.100.128.2', + 'destinationAddressEnd' => '100.100.128.2', + 'comment' => 'dfg', + ]), + new FirewallRulesetServerFirewallRule([ + 'direction' => FirewallRulesetRuleDirection::Out->value, + 'action' => FirewallRulesetRuleAction::Accept->value, + 'family' => 'IPv6', + 'protocol' => 'icmp', + 'destinationAddressStart' => '2a04:3540:1001:1000:1411:4dff:fea5:1bab', + 'destinationAddressEnd' => '2a04:3540:1001:1000:1411:4dff:fea5:1bab', + 'comment' => "'w???''?p'2'?12??12?3?'231", + ]), + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.create_multiple_server_firewall_rules.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/firewall-ruleset/server/01234567-89ab-cdef-0123-456789abcdef/firewall-rule", + null, + 1 + ); + } + + /** + */ + public function testGetServerFirewallRule(): void { + $testId = 'firewall_ruleset.get_server_firewall_rule.0'; + $this->client->firewallRuleset->getServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + 1, + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.get_server_firewall_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/firewall-ruleset/server/01234567-89ab-cdef-0123-456789abcdef/firewall-rule/1", + null, + 1 + ); + } + + /** + */ + public function testDeleteServerFirewallRule(): void { + $testId = 'firewall_ruleset.delete_server_firewall_rule.0'; + $this->client->firewallRuleset->deleteServerFirewallRule( + '01234567-89ab-cdef-0123-456789abcdef', + 1, + [ + 'headers' => [ + 'X-Test-Id' => 'firewall_ruleset.delete_server_firewall_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/firewall-ruleset/server/01234567-89ab-cdef-0123-456789abcdef/firewall-rule/1", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/GatewayWireTest.php b/fern/sdk/tests/Wire/GatewayWireTest.php new file mode 100644 index 00000000..ff6de641 --- /dev/null +++ b/fern/sdk/tests/Wire/GatewayWireTest.php @@ -0,0 +1,989 @@ +client->gateway->listGatewayPlans( + new ListGatewayPlansRequest([ + 'limit' => 10, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.list_gateway_plans.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/gateway/plans", + ['limit' => '10', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testGetGatewayPlan(): void { + $testId = 'gateway.get_gateway_plan.0'; + $this->client->gateway->getGatewayPlan( + 'advanced', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.get_gateway_plan.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/gateway/plans/advanced", + null, + 1 + ); + } + + /** + */ + public function testListGatewayServices(): void { + $testId = 'gateway.list_gateway_services.0'; + $this->client->gateway->listGatewayServices( + new ListGatewayServicesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.list_gateway_services.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/gateway", + ['limit' => '10', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testCreateGatewayService(): void { + $testId = 'gateway.create_gateway_service.0'; + $this->client->gateway->createGatewayService( + new GatewayServiceCreateRequest([ + 'name' => 'gateway-service', + 'plan' => 'development-gwaas-1c2g', + 'zone' => 'fi-hel1', + 'features' => [ + GatewayServiceFeatures::Nat->value, + ], + 'routers' => [ + new GatewayRouterCreateRequest([ + 'uuid' => 'fedcba98-7654-3210-fedc-ba9876543210', + ]), + ], + 'addresses' => [ + new GatewayAddressCreateRequest([ + 'name' => 'gateway-service', + ]), + ], + 'connections' => [ + new GatewayConnectionCreateRequest([ + 'name' => 'gateway-service', + 'type' => GatewayConnectionType::Ipsec->value, + 'localRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'upcloud-example-route', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.0.0/24', + ]), + ], + 'remoteRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'remote-example-route', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.1.0/24', + ]), + ], + 'tunnels' => [ + new GatewayTunnelCreateRequest([ + 'name' => 'example-tunnel-1', + 'localAddress' => new GatewayTunnelCreateRequestLocalAddress([ + 'name' => 'public-ip-1', + ]), + 'remoteAddress' => new GatewayTunnelCreateRequestRemoteAddress([ + 'address' => '100.10.0.111', + ]), + 'ipsec' => new GatewayTunnelCreateRequestIpsec([ + 'authentication' => new GatewayTunnelCreateRequestIpsecAuthentication([ + 'authentication' => GatewayIpsecAuthenticationType::Psk->value, + 'psk' => '{your PSK}', + ]), + ]), + 'tunnelInternalIp' => '169.254.17.1', + 'internalPeerPingInterval' => 0, + ]), + ], + ]), + ], + 'labels' => [ + new GatewayLabelCreateRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + 'configuredStatus' => GatewayServiceConfiguredStatus::Started->value, + 'automaticTunnelInternalIpAllocation' => true, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.create_gateway_service.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/gateway", + null, + 1 + ); + } + + /** + */ + public function testGetGatewayService(): void { + $testId = 'gateway.get_gateway_service.0'; + $this->client->gateway->getGatewayService( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.get_gateway_service.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testReplaceGatewayService(): void { + $testId = 'gateway.replace_gateway_service.0'; + $this->client->gateway->replaceGatewayService( + '01234567-89ab-cdef-0123-456789abcdef', + new GatewayServiceReplaceRequest([ + 'name' => 'gateway-service', + 'plan' => 'development-gwaas-1c2g', + 'configuredStatus' => GatewayServiceConfiguredStatus::Started->value, + 'labels' => [ + new GatewayLabelCreateRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + 'automaticTunnelInternalIpAllocation' => true, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.replace_gateway_service.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testDeleteGatewayService(): void { + $testId = 'gateway.delete_gateway_service.0'; + $this->client->gateway->deleteGatewayService( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.delete_gateway_service.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testModifyGatewayService(): void { + $testId = 'gateway.modify_gateway_service.0'; + $this->client->gateway->modifyGatewayService( + '01234567-89ab-cdef-0123-456789abcdef', + new GatewayServiceModifyRequest([ + 'name' => 'gateway-service', + 'features' => [ + GatewayServiceFeatures::Nat->value, + ], + 'plan' => 'development-gwaas-1c2g', + 'configuredStatus' => GatewayServiceConfiguredStatus::Started->value, + 'connections' => [ + new GatewayConnectionModifyRequest([ + 'uuid' => '01234567-89ab-cdef-0123-456789abcdef', + 'name' => 'gateway-service', + 'type' => GatewayConnectionType::Ipsec->value, + 'localRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'modified-routes', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.22.0/24', + ]), + ], + ]), + ], + 'labels' => [ + new GatewayLabelCreateRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + 'automaticTunnelInternalIpAllocation' => true, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.modify_gateway_service.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testFlushGatewayNat(): void { + $testId = 'gateway.flush_gateway_nat.0'; + $this->client->gateway->flushGatewayNat( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.flush_gateway_nat.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/actions/nat-flush-connections", + null, + 1 + ); + } + + /** + */ + public function testListGatewayConnections(): void { + $testId = 'gateway.list_gateway_connections.0'; + $this->client->gateway->listGatewayConnections( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.list_gateway_connections.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/connections", + null, + 1 + ); + } + + /** + */ + public function testCreateGatewayConnection(): void { + $testId = 'gateway.create_gateway_connection.0'; + $this->client->gateway->createGatewayConnection( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateGatewayConnectionRequest([ + 'body' => new GatewayConnectionCreateRequest([ + 'name' => 'gateway-service', + 'type' => GatewayConnectionType::Ipsec->value, + 'localRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'upcloud-example-route', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.0.0/24', + ]), + ], + 'remoteRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'remote-example-route', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.1.0/24', + ]), + ], + 'tunnels' => [ + new GatewayTunnelCreateRequest([ + 'name' => 'example-tunnel-1', + 'localAddress' => new GatewayTunnelCreateRequestLocalAddress([ + 'name' => 'public-ip-1', + ]), + 'remoteAddress' => new GatewayTunnelCreateRequestRemoteAddress([ + 'address' => '100.10.0.111', + ]), + 'ipsec' => new GatewayTunnelCreateRequestIpsec([ + 'authentication' => new GatewayTunnelCreateRequestIpsecAuthentication([ + 'authentication' => GatewayIpsecAuthenticationType::Psk->value, + 'psk' => '{your PSK}', + ]), + ]), + 'tunnelInternalIp' => '169.254.17.1', + 'internalPeerPingInterval' => 0, + ]), + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.create_gateway_connection.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/connections", + null, + 1 + ); + } + + /** + */ + public function testGetGatewayConnection(): void { + $testId = 'gateway.get_gateway_connection.0'; + $this->client->gateway->getGatewayConnection( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.get_gateway_connection.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/connections/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testDeleteGatewayConnection(): void { + $testId = 'gateway.delete_gateway_connection.0'; + $this->client->gateway->deleteGatewayConnection( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.delete_gateway_connection.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/connections/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testModifyGatewayConnection(): void { + $testId = 'gateway.modify_gateway_connection.0'; + $this->client->gateway->modifyGatewayConnection( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new ModifyGatewayConnectionRequest([ + 'body' => new GatewayConnectionModifyRequest([ + 'uuid' => '01234567-89ab-cdef-0123-456789abcdef', + 'name' => 'gateway-service', + 'type' => GatewayConnectionType::Ipsec->value, + 'localRoutes' => [ + new GatewayConnectionRouteRequest([ + 'name' => 'modified-routes', + 'type' => GatewayConnectionRouteType::Static_->value, + 'staticNetwork' => '10.0.22.0/24', + ]), + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.modify_gateway_connection.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/connections/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testListGatewayTunnels(): void { + $testId = 'gateway.list_gateway_tunnels.0'; + $this->client->gateway->listGatewayTunnels( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.list_gateway_tunnels.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/connections/01234567-89ab-cdef-0123-456789abcdef/tunnels", + null, + 1 + ); + } + + /** + */ + public function testCreateGatewayTunnel(): void { + $testId = 'gateway.create_gateway_tunnel.0'; + $this->client->gateway->createGatewayTunnel( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new CreateGatewayTunnelRequest([ + 'body' => new GatewayTunnelCreateRequest([ + 'name' => 'gateway-service', + 'localAddress' => new GatewayTunnelCreateRequestLocalAddress([ + 'name' => 'gateway-service', + ]), + 'remoteAddress' => new GatewayTunnelCreateRequestRemoteAddress([ + 'address' => '203.0.113.10', + ]), + 'ipsec' => new GatewayTunnelCreateRequestIpsec([ + 'authentication' => new GatewayTunnelCreateRequestIpsecAuthentication([ + 'authentication' => GatewayIpsecAuthenticationType::Psk->value, + 'psk' => 'MySecretPsk123', + ]), + 'phase1Algorithms' => [ + GatewaySupportedProposalAlgorithms::Aes128->value, + GatewaySupportedProposalAlgorithms::Aes256->value, + GatewaySupportedProposalAlgorithms::Aes128Gcm128->value, + GatewaySupportedProposalAlgorithms::Aes256Gcm128->value, + ], + 'phase2Algorithms' => [ + GatewaySupportedProposalAlgorithms::Aes128->value, + GatewaySupportedProposalAlgorithms::Aes256->value, + GatewaySupportedProposalAlgorithms::Aes128Gcm128->value, + GatewaySupportedProposalAlgorithms::Aes256Gcm128->value, + ], + 'phase1IntegrityAlgorithms' => [ + GatewaySupportedIntegrityAlgorithms::Sha256->value, + GatewaySupportedIntegrityAlgorithms::Sha384->value, + GatewaySupportedIntegrityAlgorithms::Sha512->value, + ], + 'phase2IntegrityAlgorithms' => [ + GatewaySupportedIntegrityAlgorithms::Sha256->value, + GatewaySupportedIntegrityAlgorithms::Sha384->value, + GatewaySupportedIntegrityAlgorithms::Sha512->value, + ], + 'phase1DhGroupNumbers' => [ + 16, + 18, + 19, + ], + 'phase2DhGroupNumbers' => [ + 14, + 16, + 18, + 19, + ], + ]), + 'tunnelInternalIp' => '10.0.0.1', + 'internalPeerPingInterval' => 0, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.create_gateway_tunnel.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/connections/01234567-89ab-cdef-0123-456789abcdef/tunnels", + null, + 1 + ); + } + + /** + */ + public function testGetGatewayTunnel(): void { + $testId = 'gateway.get_gateway_tunnel.0'; + $this->client->gateway->getGatewayTunnel( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.get_gateway_tunnel.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/connections/01234567-89ab-cdef-0123-456789abcdef/tunnels/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testDeleteGatewayTunnel(): void { + $testId = 'gateway.delete_gateway_tunnel.0'; + $this->client->gateway->deleteGatewayTunnel( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.delete_gateway_tunnel.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/connections/01234567-89ab-cdef-0123-456789abcdef/tunnels/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testModifyGatewayTunnel(): void { + $testId = 'gateway.modify_gateway_tunnel.0'; + $this->client->gateway->modifyGatewayTunnel( + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + '01234567-89ab-cdef-0123-456789abcdef', + new ModifyGatewayTunnelRequest([ + 'body' => new GatewayTunnelModifyRequest([ + 'uuid' => '01234567-89ab-cdef-0123-456789abcdef', + 'name' => 'gateway-service', + 'localAddress' => new GatewayTunnelModifyRequestLocalAddress([ + 'name' => 'gateway-service', + ]), + 'remoteAddress' => new GatewayTunnelModifyRequestRemoteAddress([ + 'address' => '203.0.113.10', + ]), + 'ipsec' => new GatewayTunnelModifyRequestIpsec([ + 'authentication' => new GatewayTunnelModifyRequestIpsecAuthentication([ + 'authentication' => GatewayIpsecAuthenticationType::Psk->value, + 'psk' => 'MySecretPsk123', + ]), + 'phase1Algorithms' => [ + GatewaySupportedProposalAlgorithms::Aes128Gcm16->value, + ], + 'phase2Algorithms' => [ + GatewaySupportedProposalAlgorithms::Aes128Gcm16->value, + ], + 'phase1IntegrityAlgorithms' => [ + GatewaySupportedIntegrityAlgorithms::Sha256->value, + GatewaySupportedIntegrityAlgorithms::Sha384->value, + GatewaySupportedIntegrityAlgorithms::Sha512->value, + ], + 'phase2IntegrityAlgorithms' => [ + GatewaySupportedIntegrityAlgorithms::Sha256->value, + GatewaySupportedIntegrityAlgorithms::Sha384->value, + GatewaySupportedIntegrityAlgorithms::Sha512->value, + ], + 'phase1DhGroupNumbers' => [ + 16, + 18, + 19, + ], + 'phase2DhGroupNumbers' => [ + 14, + 16, + 18, + 19, + ], + ]), + 'tunnelInternalIp' => '10.0.0.1', + 'internalPeerPingInterval' => 0, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.modify_gateway_tunnel.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/connections/01234567-89ab-cdef-0123-456789abcdef/tunnels/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testListGatewayServiceLabels(): void { + $testId = 'gateway.list_gateway_service_labels.0'; + $this->client->gateway->listGatewayServiceLabels( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.list_gateway_service_labels.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/labels", + null, + 1 + ); + } + + /** + */ + public function testCreateGatewayServiceLabel(): void { + $testId = 'gateway.create_gateway_service_label.0'; + $this->client->gateway->createGatewayServiceLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateGatewayServiceLabelRequest([ + 'body' => new GatewayLabelCreateRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.create_gateway_service_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/labels", + null, + 1 + ); + } + + /** + */ + public function testGetGatewayServiceLabel(): void { + $testId = 'gateway.get_gateway_service_label.0'; + $this->client->gateway->getGatewayServiceLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.get_gateway_service_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/labels/environment", + null, + 1 + ); + } + + /** + */ + public function testDeleteGatewayServiceLabel(): void { + $testId = 'gateway.delete_gateway_service_label.0'; + $this->client->gateway->deleteGatewayServiceLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.delete_gateway_service_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/labels/environment", + null, + 1 + ); + } + + /** + */ + public function testModifyGatewayServiceLabel(): void { + $testId = 'gateway.modify_gateway_service_label.0'; + $this->client->gateway->modifyGatewayServiceLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + new GatewayLabelModifyRequest([ + 'key' => 'environment', + 'value' => 'production', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.modify_gateway_service_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/labels/environment", + null, + 1 + ); + } + + /** + */ + public function testListGatewayAddresses(): void { + $testId = 'gateway.list_gateway_addresses.0'; + $this->client->gateway->listGatewayAddresses( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.list_gateway_addresses.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/addresses", + null, + 1 + ); + } + + /** + */ + public function testGetGatewayAddress(): void { + $testId = 'gateway.get_gateway_address.0'; + $this->client->gateway->getGatewayAddress( + '01234567-89ab-cdef-0123-456789abcdef', + 'advanced', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.get_gateway_address.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/addresses/advanced", + null, + 1 + ); + } + + /** + */ + public function testModifyGatewayAddress(): void { + $testId = 'gateway.modify_gateway_address.0'; + $this->client->gateway->modifyGatewayAddress( + '01234567-89ab-cdef-0123-456789abcdef', + 'advanced', + new GatewayAddressModifyRequest([ + 'address' => '203.0.113.10', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.modify_gateway_address.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/addresses/advanced", + null, + 1 + ); + } + + /** + */ + public function testReleaseGatewayFloatingIp(): void { + $testId = 'gateway.release_gateway_floating_ip.0'; + $this->client->gateway->releaseGatewayFloatingIp( + '01234567-89ab-cdef-0123-456789abcdef', + 'advanced', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.release_gateway_floating_ip.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/addresses/advanced/release", + null, + 1 + ); + } + + /** + */ + public function testGetGatewayMetrics(): void { + $testId = 'gateway.get_gateway_metrics.0'; + $this->client->gateway->getGatewayMetrics( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.get_gateway_metrics.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/metrics", + null, + 1 + ); + } + + /** + */ + public function testCreateGatewayServiceLogSession(): void { + $testId = 'gateway.create_gateway_service_log_session.0'; + $this->client->gateway->createGatewayServiceLogSession( + '01234567-89ab-cdef-0123-456789abcdef', + new GatewayServiceLogSessionCreateRequest([ + 'sessionType' => GatewayServiceLogSessionTypes::Vpn->value, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'gateway.create_gateway_service_log_session.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/gateway/01234567-89ab-cdef-0123-456789abcdef/logs", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/IpAddressWireTest.php b/fern/sdk/tests/Wire/IpAddressWireTest.php new file mode 100644 index 00000000..84fd7847 --- /dev/null +++ b/fern/sdk/tests/Wire/IpAddressWireTest.php @@ -0,0 +1,204 @@ +client->ipAddress->listIpAddresses( + [ + 'headers' => [ + 'X-Test-Id' => 'ip_address.list_ip_addresses.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/ip_address", + null, + 1 + ); + } + + /** + */ + public function testAddIpAddress(): void { + $testId = 'ip_address.add_ip_address.0'; + $this->client->ipAddress->addIpAddress( + new AddIpAddressRequest([ + 'ipAddress' => new AddIpAddressRequestIpAddress([ + 'access' => 'access', + 'family' => IpAddressIpFamily::IPv4->value, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'ip_address.add_ip_address.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/ip_address", + null, + 1 + ); + } + + /** + */ + public function testBulkModifyIpAddresses(): void { + $testId = 'ip_address.bulk_modify_ip_addresses.0'; + $this->client->ipAddress->bulkModifyIpAddresses( + new BulkPatchIpAddressesRequestV13([ + 'ipAddresses' => [ + new BulkPatchIpAddressesRequestV13IpAddressesItem([ + 'address' => 'address', + 'mainAccountId' => 1000000, + 'delegatedToAccountId' => 1000000, + 'releasePolicy' => IpAddressIpReleasePolicy::Release->value, + ]), + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'ip_address.bulk_modify_ip_addresses.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/ip_address/bulk", + null, + 1 + ); + } + + /** + */ + public function testGetIpAddressDetails(): void { + $testId = 'ip_address.get_ip_address_details.0'; + $this->client->ipAddress->getIpAddressDetails( + 'address', + [ + 'headers' => [ + 'X-Test-Id' => 'ip_address.get_ip_address_details.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/ip_address/address", + null, + 1 + ); + } + + /** + */ + public function testModifyIpAddress(): void { + $testId = 'ip_address.modify_ip_address.0'; + $this->client->ipAddress->modifyIpAddress( + 'address', + new ModifyIpAddressRequestV10([ + 'ipAddress' => new ModifyIpAddressRequestV10IpAddress([ + 'ptrRecord' => 'host.example.com', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'ip_address.modify_ip_address.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/ip_address/address", + null, + 1 + ); + } + + /** + */ + public function testDeleteIpAddress(): void { + $testId = 'ip_address.delete_ip_address.0'; + $this->client->ipAddress->deleteIpAddress( + 'address', + [ + 'headers' => [ + 'X-Test-Id' => 'ip_address.delete_ip_address.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/ip_address/address", + null, + 1 + ); + } + + /** + */ + public function testPatchModifyIpAddress(): void { + $testId = 'ip_address.patch_modify_ip_address.0'; + $this->client->ipAddress->patchModifyIpAddress( + 'address', + new PatchIpAddressRequestV13([ + 'ipAddress' => new PatchIpAddressRequestV13IpAddress([]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'ip_address.patch_modify_ip_address.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/ip_address/address", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/KubernetesWireTest.php b/fern/sdk/tests/Wire/KubernetesWireTest.php new file mode 100644 index 00000000..15375ab3 --- /dev/null +++ b/fern/sdk/tests/Wire/KubernetesWireTest.php @@ -0,0 +1,726 @@ +client->kubernetes->listKubernetesClusters( + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.list_kubernetes_clusters.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/kubernetes", + null, + 1 + ); + } + + /** + */ + public function testCreateKubernetesCluster(): void { + $testId = 'kubernetes.create_kubernetes_cluster.0'; + $this->client->kubernetes->createKubernetesCluster( + new KubernetesCluster([ + 'controlPlaneIpFilter' => [ + '1.2.3.0/24', + '1.1.1.1', + ], + 'name' => 'example-cluster', + 'network' => '33333333-3333-3333-333333333333', + 'networkCidr' => '172.16.0.0/24', + 'nodeGroups' => [ + new KubernetesNodeGroup([ + 'count' => 4, + 'kubeletArgs' => [ + new KubernetesKubeletArg([ + 'key' => 'log-flush-frequency', + 'value' => '5s', + ]), + ], + 'labels' => [ + new KubernetesLabel([ + 'key' => 'managedBy', + 'value' => 'exampleDevelopmentTeam', + ]), + new KubernetesLabel([ + 'key' => 'environment', + 'value' => 'development', + ]), + ], + 'name' => 'small', + 'plan' => 'K8S-2xCPU-4GB', + 'sshKeys' => [ + 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV', + ], + 'storage' => '01000000-0000-4000-8000-000160010100', + 'taints' => [ + new KubernetesTaint([ + 'effect' => KubernetesEffect::NoSchedule->value, + 'key' => 'environment', + 'value' => 'development', + ]), + ], + ]), + new KubernetesNodeGroup([ + 'count' => 8, + 'kubeletArgs' => [ + new KubernetesKubeletArg([ + 'key' => 'log-flush-frequency', + 'value' => '15s', + ]), + ], + 'labels' => [ + new KubernetesLabel([ + 'key' => 'managedBy', + 'value' => 'exampleStagingTeam', + ]), + new KubernetesLabel([ + 'key' => 'environment', + 'value' => 'staging', + ]), + ], + 'name' => 'medium', + 'plan' => 'K8S-4xCPU-8GB', + 'sshKeys' => [ + 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV', + ], + 'storage' => '01000000-0000-4000-8000-000160010100', + 'taints' => [ + new KubernetesTaint([ + 'effect' => KubernetesEffect::NoSchedule->value, + 'key' => 'environment', + 'value' => 'staging', + ]), + ], + ]), + ], + 'zone' => 'de-fra1', + 'version' => 'version', + 'labels' => [ + [ + 'key' => "env", + 'value' => "prod", + ], + [ + 'key' => "app", + 'value' => "cats-dating-app", + ], + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.create_kubernetes_cluster.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/kubernetes", + null, + 1 + ); + } + + /** + */ + public function testGetKubernetesCluster(): void { + $testId = 'kubernetes.get_kubernetes_cluster.0'; + $this->client->kubernetes->getKubernetesCluster( + 'uuid', + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.get_kubernetes_cluster.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/kubernetes/uuid", + null, + 1 + ); + } + + /** + */ + public function testDeleteKubernetesCluster(): void { + $testId = 'kubernetes.delete_kubernetes_cluster.0'; + $this->client->kubernetes->deleteKubernetesCluster( + 'uuid', + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.delete_kubernetes_cluster.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/kubernetes/uuid", + null, + 1 + ); + } + + /** + */ + public function testModifyKubernetesCluster(): void { + $testId = 'kubernetes.modify_kubernetes_cluster.0'; + $this->client->kubernetes->modifyKubernetesCluster( + 'uuid', + new KubernetesClusterPatch([ + 'controlPlaneIpFilter' => [ + '1.2.3.0/24', + '1.1.1.1', + ], + 'labels' => [ + [ + 'key' => "env", + 'value' => "prod", + ], + [ + 'key' => "app", + 'value' => "cats-dating-app", + ], + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.modify_kubernetes_cluster.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/kubernetes/uuid", + null, + 1 + ); + } + + /** + */ + public function testGetKubernetesClusterKubeconfig(): void { + $testId = 'kubernetes.get_kubernetes_cluster_kubeconfig.0'; + $this->client->kubernetes->getKubernetesClusterKubeconfig( + 'uuid', + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.get_kubernetes_cluster_kubeconfig.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/kubernetes/uuid/kubeconfig", + null, + 1 + ); + } + + /** + */ + public function testGetKubernetesClusterAvailableUpgrades(): void { + $testId = 'kubernetes.get_kubernetes_cluster_available_upgrades.0'; + $this->client->kubernetes->getKubernetesClusterAvailableUpgrades( + 'uuid', + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.get_kubernetes_cluster_available_upgrades.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/kubernetes/uuid/available-upgrades", + null, + 1 + ); + } + + /** + */ + public function testUpgradeKubernetesCluster(): void { + $testId = 'kubernetes.upgrade_kubernetes_cluster.0'; + $this->client->kubernetes->upgradeKubernetesCluster( + 'uuid', + new UpgradeKubernetesClusterRequest([ + 'body' => new KubernetesClusterAvailableUpgradesPost([ + 'version' => '1.31', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.upgrade_kubernetes_cluster.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/kubernetes/uuid/available-upgrades", + null, + 1 + ); + } + + /** + */ + public function testListKubernetesClusterNodeGroups(): void { + $testId = 'kubernetes.list_kubernetes_cluster_node_groups.0'; + $this->client->kubernetes->listKubernetesClusterNodeGroups( + 'uuid', + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.list_kubernetes_cluster_node_groups.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/kubernetes/uuid/node-groups", + null, + 1 + ); + } + + /** + */ + public function testCreateKubernetesClusterNodeGroup(): void { + $testId = 'kubernetes.create_kubernetes_cluster_node_group.0'; + $this->client->kubernetes->createKubernetesClusterNodeGroup( + 'uuid', + new CreateKubernetesClusterNodeGroupRequest([ + 'body' => new KubernetesNodeGroup([ + 'count' => 4, + 'kubeletArgs' => [ + new KubernetesKubeletArg([ + 'key' => 'log-flush-frequency', + 'value' => '5s', + ]), + ], + 'labels' => [ + new KubernetesLabel([ + 'key' => 'managedBy', + 'value' => 'exampleDevelopmentTeam', + ]), + new KubernetesLabel([ + 'key' => 'environment', + 'value' => 'development', + ]), + ], + 'name' => 'small', + 'plan' => 'K8S-2xCPU-4GB', + 'sshKeys' => [ + 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV', + ], + 'storage' => '01000000-0000-4000-8000-000160010100', + 'taints' => [ + new KubernetesTaint([ + 'effect' => KubernetesEffect::NoSchedule->value, + 'key' => 'environment', + 'value' => 'development', + ]), + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.create_kubernetes_cluster_node_group.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/kubernetes/uuid/node-groups", + null, + 1 + ); + } + + /** + */ + public function testGetKubernetesClusterNodeGroup(): void { + $testId = 'kubernetes.get_kubernetes_cluster_node_group.0'; + $this->client->kubernetes->getKubernetesClusterNodeGroup( + 'uuid', + 'name', + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.get_kubernetes_cluster_node_group.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/kubernetes/uuid/node-groups/name", + null, + 1 + ); + } + + /** + */ + public function testDeleteKubernetesClusterNodeGroup(): void { + $testId = 'kubernetes.delete_kubernetes_cluster_node_group.0'; + $this->client->kubernetes->deleteKubernetesClusterNodeGroup( + 'uuid', + 'name', + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.delete_kubernetes_cluster_node_group.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/kubernetes/uuid/node-groups/name", + null, + 1 + ); + } + + /** + */ + public function testModifyKubernetesClusterNodeGroup(): void { + $testId = 'kubernetes.modify_kubernetes_cluster_node_group.0'; + $this->client->kubernetes->modifyKubernetesClusterNodeGroup( + 'uuid', + 'name', + new KubernetesNodeGroupPatch([ + 'count' => 16, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.modify_kubernetes_cluster_node_group.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/kubernetes/uuid/node-groups/name", + null, + 1 + ); + } + + /** + */ + public function testDeleteKubernetesClusterNodeGroupNode(): void { + $testId = 'kubernetes.delete_kubernetes_cluster_node_group_node.0'; + $this->client->kubernetes->deleteKubernetesClusterNodeGroupNode( + 'uuid', + 'name', + 'node-name', + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.delete_kubernetes_cluster_node_group_node.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/kubernetes/uuid/node-groups/name/node-name", + null, + 1 + ); + } + + /** + */ + public function testListKubernetesPlans(): void { + $testId = 'kubernetes.list_kubernetes_plans.0'; + $this->client->kubernetes->listKubernetesPlans( + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.list_kubernetes_plans.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/kubernetes/plans", + null, + 1 + ); + } + + /** + */ + public function testListKubernetesVersions(): void { + $testId = 'kubernetes.list_kubernetes_versions.0'; + $this->client->kubernetes->listKubernetesVersions( + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.list_kubernetes_versions.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/kubernetes/versions", + null, + 1 + ); + } + + /** + */ + public function testListClusterAuthentication(): void { + $testId = 'kubernetes.list_cluster_authentication.0'; + $this->client->kubernetes->listClusterAuthentication( + 'uuid', + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.list_cluster_authentication.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/kubernetes/uuid/authentication", + null, + 1 + ); + } + + /** + */ + public function testCreateClusterAuthentication(): void { + $testId = 'kubernetes.create_cluster_authentication.0'; + $this->client->kubernetes->createClusterAuthentication( + 'uuid', + new CreateClusterAuthenticationRequest([ + 'body' => new KubernetesAuthenticationIssuerConfig([ + 'name' => 'name', + 'issuerUrl' => 'https://accounts.myoidcprovider.com', + 'audiences' => [ + 'client-id-123', + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.create_cluster_authentication.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/kubernetes/uuid/authentication", + null, + 1 + ); + } + + /** + */ + public function testSetClusterAuthentication(): void { + $testId = 'kubernetes.set_cluster_authentication.0'; + $this->client->kubernetes->setClusterAuthentication( + 'uuid', + new SetClusterAuthenticationRequest([ + 'body' => [ + new KubernetesAuthenticationIssuerConfig([ + 'name' => 'name', + 'issuerUrl' => 'https://accounts.myoidcprovider.com', + 'audiences' => [ + 'client-id-123', + ], + ]), + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.set_cluster_authentication.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/kubernetes/uuid/authentication", + null, + 1 + ); + } + + /** + */ + public function testImportClusterAuthentication(): void { + $testId = 'kubernetes.import_cluster_authentication.0'; + $this->client->kubernetes->importClusterAuthentication( + 'uuid', + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.import_cluster_authentication.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/kubernetes/uuid/authentication/import", + null, + 1 + ); + } + + /** + */ + public function testGetClusterAuthentication(): void { + $testId = 'kubernetes.get_cluster_authentication.0'; + $this->client->kubernetes->getClusterAuthentication( + 'uuid', + 'name', + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.get_cluster_authentication.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/kubernetes/uuid/authentication/name", + null, + 1 + ); + } + + /** + */ + public function testUpdateClusterAuthentication(): void { + $testId = 'kubernetes.update_cluster_authentication.0'; + $this->client->kubernetes->updateClusterAuthentication( + 'uuid', + 'name', + new UpdateClusterAuthenticationRequest([ + 'body' => new KubernetesAuthenticationIssuerConfig([ + 'name' => 'name', + 'issuerUrl' => 'https://accounts.myoidcprovider.com', + 'audiences' => [ + 'client-id-123', + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.update_cluster_authentication.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/kubernetes/uuid/authentication/name", + null, + 1 + ); + } + + /** + */ + public function testDeleteClusterAuthentication(): void { + $testId = 'kubernetes.delete_cluster_authentication.0'; + $this->client->kubernetes->deleteClusterAuthentication( + 'uuid', + 'name', + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.delete_cluster_authentication.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/kubernetes/uuid/authentication/name", + null, + 1 + ); + } + + /** + */ + public function testGetKubernetesClusterOidcKubeconfig(): void { + $testId = 'kubernetes.get_kubernetes_cluster_oidc_kubeconfig.0'; + $this->client->kubernetes->getKubernetesClusterOidcKubeconfig( + 'uuid', + 'name', + new GetKubernetesClusterOidcKubeconfigRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'kubernetes.get_kubernetes_cluster_oidc_kubeconfig.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/kubernetes/uuid/authentication/name/kubeconfig", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/LoadBalancerWireTest.php b/fern/sdk/tests/Wire/LoadBalancerWireTest.php new file mode 100644 index 00000000..aee7c606 --- /dev/null +++ b/fern/sdk/tests/Wire/LoadBalancerWireTest.php @@ -0,0 +1,1886 @@ +client->loadBalancer->listLoadBalancers( + new ListLoadBalancersRequest([ + 'limit' => 10, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.list_load_balancers.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer", + ['limit' => '10', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testCreateLoadBalancer(): void { + $testId = 'load_balancer.create_load_balancer.0'; + $this->client->loadBalancer->createLoadBalancer( + new LoadBalancerServiceCreate([ + 'name' => 'my-loadbalancer', + 'zone' => 'fi-hel1', + 'plan' => 'production-small', + 'configuredStatus' => LoadBalancerServiceConfiguredStatus::Started->value, + 'frontends' => [ + new LoadBalancerFrontendCreate([ + 'name' => 'my-frontend', + 'port' => 80, + 'mode' => LoadBalancerFrontendMode::Http->value, + 'defaultBackend' => 'my-backend', + ]), + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.create_load_balancer.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/load-balancer", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancer(): void { + $testId = 'load_balancer.get_load_balancer.0'; + $this->client->loadBalancer->getLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testReplaceLoadBalancer(): void { + $testId = 'load_balancer.replace_load_balancer.0'; + $this->client->loadBalancer->replaceLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', + new LoadBalancerServiceReplace([ + 'name' => 'my-loadbalancer', + 'plan' => 'production', + 'configuredStatus' => LoadBalancerServiceConfiguredStatus::Started->value, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.replace_load_balancer.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testDeleteLoadBalancer(): void { + $testId = 'load_balancer.delete_load_balancer.0'; + $this->client->loadBalancer->deleteLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.delete_load_balancer.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testModifyLoadBalancer(): void { + $testId = 'load_balancer.modify_load_balancer.0'; + $this->client->loadBalancer->modifyLoadBalancer( + '01234567-89ab-cdef-0123-456789abcdef', + new LoadBalancerServiceModify([ + 'name' => 'updated-loadbalancer', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.modify_load_balancer.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testListLoadBalancerFrontends(): void { + $testId = 'load_balancer.list_load_balancer_frontends.0'; + $this->client->loadBalancer->listLoadBalancerFrontends( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.list_load_balancer_frontends.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/frontends", + null, + 1 + ); + } + + /** + */ + public function testCreateLoadBalancerFrontend(): void { + $testId = 'load_balancer.create_load_balancer_frontend.0'; + $this->client->loadBalancer->createLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerFrontendRequest([ + 'body' => new LoadBalancerFrontendCreate([ + 'name' => 'my-frontend', + 'port' => 80, + 'mode' => LoadBalancerFrontendMode::Http->value, + 'defaultBackend' => 'my-backend', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.create_load_balancer_frontend.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/frontends", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerFrontend(): void { + $testId = 'load_balancer.get_load_balancer_frontend.0'; + $this->client->loadBalancer->getLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_frontend.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/frontends/example-frontend-1", + null, + 1 + ); + } + + /** + */ + public function testDeleteLoadBalancerFrontend(): void { + $testId = 'load_balancer.delete_load_balancer_frontend.0'; + $this->client->loadBalancer->deleteLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.delete_load_balancer_frontend.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/frontends/example-frontend-1", + null, + 1 + ); + } + + /** + */ + public function testModifyLoadBalancerFrontend(): void { + $testId = 'load_balancer.modify_load_balancer_frontend.0'; + $this->client->loadBalancer->modifyLoadBalancerFrontend( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new LoadBalancerFrontendModify([ + 'name' => 'updated-frontend', + 'port' => 443, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.modify_load_balancer_frontend.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/frontends/example-frontend-1", + null, + 1 + ); + } + + /** + */ + public function testListLoadBalancerFrontendTlsConfigs(): void { + $testId = 'load_balancer.list_load_balancer_frontend_tls_configs.0'; + $this->client->loadBalancer->listLoadBalancerFrontendTlsConfigs( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.list_load_balancer_frontend_tls_configs.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/frontends/example-frontend-1/tls-configs", + null, + 1 + ); + } + + /** + */ + public function testCreateLoadBalancerFrontendTlsConfig(): void { + $testId = 'load_balancer.create_load_balancer_frontend_tls_config.0'; + $this->client->loadBalancer->createLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new CreateLoadBalancerFrontendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigCreate([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.create_load_balancer_frontend_tls_config.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/frontends/example-frontend-1/tls-configs", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerFrontendTlsConfig(): void { + $testId = 'load_balancer.get_load_balancer_frontend_tls_config.0'; + $this->client->loadBalancer->getLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-tls-config-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_frontend_tls_config.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/frontends/example-frontend-1/tls-configs/example-tls-config-1", + null, + 1 + ); + } + + /** + */ + public function testDeleteLoadBalancerFrontendTlsConfig(): void { + $testId = 'load_balancer.delete_load_balancer_frontend_tls_config.0'; + $this->client->loadBalancer->deleteLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-tls-config-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.delete_load_balancer_frontend_tls_config.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/frontends/example-frontend-1/tls-configs/example-tls-config-1", + null, + 1 + ); + } + + /** + */ + public function testModifyLoadBalancerFrontendTlsConfig(): void { + $testId = 'load_balancer.modify_load_balancer_frontend_tls_config.0'; + $this->client->loadBalancer->modifyLoadBalancerFrontendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-tls-config-1', + new ModifyLoadBalancerFrontendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigModify([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.modify_load_balancer_frontend_tls_config.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/frontends/example-frontend-1/tls-configs/example-tls-config-1", + null, + 1 + ); + } + + /** + */ + public function testListLoadBalancerRules(): void { + $testId = 'load_balancer.list_load_balancer_rules.0'; + $this->client->loadBalancer->listLoadBalancerRules( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.list_load_balancer_rules.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/frontends/example-frontend-1/rules", + null, + 1 + ); + } + + /** + */ + public function testCreateLoadBalancerRule(): void { + $testId = 'load_balancer.create_load_balancer_rule.0'; + $this->client->loadBalancer->createLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new CreateLoadBalancerRuleRequest([ + 'body' => new LoadBalancerRuleCreate([ + 'name' => 'my-rule', + 'priority' => 10, + 'matchingCondition' => LoadBalancerMatchingCondition::And_->value, + 'matchers' => [ + new LoadBalancerMatcherCreateMatchSrcIp([ + 'type' => LoadBalancerMatcherCreateMatchSrcIpType::SrcIp->value, + 'matchSrcIp' => new LoadBalancerMatcherIpCreate([ + 'value' => '192.168.1.1', + ]), + ]), + ], + 'actions' => [ + new LoadBalancerActionCreateActionUseBackend([ + 'type' => LoadBalancerActionCreateActionUseBackendType::UseBackend->value, + 'actionUseBackend' => new LoadBalancerActionUseBackendCreate([ + 'backend' => 'backend-1', + ]), + ]), + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.create_load_balancer_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/frontends/example-frontend-1/rules", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerRule(): void { + $testId = 'load_balancer.get_load_balancer_rule.0'; + $this->client->loadBalancer->getLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/frontends/example-frontend-1/rules/example-rule-1", + null, + 1 + ); + } + + /** + */ + public function testReplaceLoadBalancerRule(): void { + $testId = 'load_balancer.replace_load_balancer_rule.0'; + $this->client->loadBalancer->replaceLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', + new ReplaceLoadBalancerRuleRequest([ + 'body' => new LoadBalancerRuleCreate([ + 'name' => 'my-rule', + 'priority' => 10, + 'matchingCondition' => LoadBalancerMatchingCondition::And_->value, + 'matchers' => [ + new LoadBalancerMatcherCreateMatchSrcIp([ + 'type' => LoadBalancerMatcherCreateMatchSrcIpType::SrcIp->value, + 'matchSrcIp' => new LoadBalancerMatcherIpCreate([ + 'value' => '192.168.1.1', + ]), + ]), + ], + 'actions' => [ + new LoadBalancerActionCreateActionUseBackend([ + 'type' => LoadBalancerActionCreateActionUseBackendType::UseBackend->value, + 'actionUseBackend' => new LoadBalancerActionUseBackendCreate([ + 'backend' => 'backend-1', + ]), + ]), + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.replace_load_balancer_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/frontends/example-frontend-1/rules/example-rule-1", + null, + 1 + ); + } + + /** + */ + public function testDeleteLoadBalancerRule(): void { + $testId = 'load_balancer.delete_load_balancer_rule.0'; + $this->client->loadBalancer->deleteLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.delete_load_balancer_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/frontends/example-frontend-1/rules/example-rule-1", + null, + 1 + ); + } + + /** + */ + public function testModifyLoadBalancerRule(): void { + $testId = 'load_balancer.modify_load_balancer_rule.0'; + $this->client->loadBalancer->modifyLoadBalancerRule( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + 'example-rule-1', + new LoadBalancerRuleModify([ + 'name' => 'updated-rule', + 'priority' => 10, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.modify_load_balancer_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/frontends/example-frontend-1/rules/example-rule-1", + null, + 1 + ); + } + + /** + */ + public function testListLoadBalancerBackends(): void { + $testId = 'load_balancer.list_load_balancer_backends.0'; + $this->client->loadBalancer->listLoadBalancerBackends( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.list_load_balancer_backends.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/backends", + null, + 1 + ); + } + + /** + */ + public function testCreateLoadBalancerBackend(): void { + $testId = 'load_balancer.create_load_balancer_backend.0'; + $this->client->loadBalancer->createLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerBackendRequest([ + 'body' => new LoadBalancerBackendCreate([ + 'name' => 'my-backend', + 'members' => [ + new LoadBalancerMemberCreateZero([ + 'type' => LoadBalancerMemberCreateZeroType::Static_->value, + 'ip' => 'ip', + 'port' => 1, + ]), + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.create_load_balancer_backend.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/backends", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerBackend(): void { + $testId = 'load_balancer.get_load_balancer_backend.0'; + $this->client->loadBalancer->getLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_backend.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/backends/backend-infra", + null, + 1 + ); + } + + /** + */ + public function testDeleteLoadBalancerBackend(): void { + $testId = 'load_balancer.delete_load_balancer_backend.0'; + $this->client->loadBalancer->deleteLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.delete_load_balancer_backend.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/backends/backend-infra", + null, + 1 + ); + } + + /** + */ + public function testModifyLoadBalancerBackend(): void { + $testId = 'load_balancer.modify_load_balancer_backend.0'; + $this->client->loadBalancer->modifyLoadBalancerBackend( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new LoadBalancerBackendModify([ + 'name' => 'updated-backend', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.modify_load_balancer_backend.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/backends/backend-infra", + null, + 1 + ); + } + + /** + */ + public function testListLoadBalancerMembers(): void { + $testId = 'load_balancer.list_load_balancer_members.0'; + $this->client->loadBalancer->listLoadBalancerMembers( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.list_load_balancer_members.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/backends/backend-infra/members", + null, + 1 + ); + } + + /** + */ + public function testCreateLoadBalancerMember(): void { + $testId = 'load_balancer.create_load_balancer_member.0'; + $this->client->loadBalancer->createLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new CreateLoadBalancerMemberRequest([ + 'body' => new LoadBalancerMemberCreateZero([ + 'type' => LoadBalancerMemberCreateZeroType::Static_->value, + 'ip' => 'ip', + 'port' => 1, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.create_load_balancer_member.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/backends/backend-infra/members", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerMember(): void { + $testId = 'load_balancer.get_load_balancer_member.0'; + $this->client->loadBalancer->getLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_member.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/backends/backend-infra/members/dev-member", + null, + 1 + ); + } + + /** + */ + public function testDeleteLoadBalancerMember(): void { + $testId = 'load_balancer.delete_load_balancer_member.0'; + $this->client->loadBalancer->deleteLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.delete_load_balancer_member.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/backends/backend-infra/members/dev-member", + null, + 1 + ); + } + + /** + */ + public function testModifyLoadBalancerMember(): void { + $testId = 'load_balancer.modify_load_balancer_member.0'; + $this->client->loadBalancer->modifyLoadBalancerMember( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', + new ModifyLoadBalancerMemberRequest([ + 'body' => new LoadBalancerMemberModifyZero([]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.modify_load_balancer_member.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/backends/backend-infra/members/dev-member", + null, + 1 + ); + } + + /** + */ + public function testListLoadBalancerBackendTlsConfigs(): void { + $testId = 'load_balancer.list_load_balancer_backend_tls_configs.0'; + $this->client->loadBalancer->listLoadBalancerBackendTlsConfigs( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.list_load_balancer_backend_tls_configs.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/backends/backend-infra/tls-configs", + null, + 1 + ); + } + + /** + */ + public function testCreateLoadBalancerBackendTlsConfig(): void { + $testId = 'load_balancer.create_load_balancer_backend_tls_config.0'; + $this->client->loadBalancer->createLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new CreateLoadBalancerBackendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigCreate([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.create_load_balancer_backend_tls_config.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/backends/backend-infra/tls-configs", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerBackendTlsConfig(): void { + $testId = 'load_balancer.get_load_balancer_backend_tls_config.0'; + $this->client->loadBalancer->getLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'example-tls-config-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_backend_tls_config.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/backends/backend-infra/tls-configs/example-tls-config-1", + null, + 1 + ); + } + + /** + */ + public function testDeleteLoadBalancerBackendTlsConfig(): void { + $testId = 'load_balancer.delete_load_balancer_backend_tls_config.0'; + $this->client->loadBalancer->deleteLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'example-tls-config-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.delete_load_balancer_backend_tls_config.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/backends/backend-infra/tls-configs/example-tls-config-1", + null, + 1 + ); + } + + /** + */ + public function testModifyLoadBalancerBackendTlsConfig(): void { + $testId = 'load_balancer.modify_load_balancer_backend_tls_config.0'; + $this->client->loadBalancer->modifyLoadBalancerBackendTlsConfig( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'example-tls-config-1', + new ModifyLoadBalancerBackendTlsConfigRequest([ + 'body' => new LoadBalancerTlsConfigModify([ + 'name' => 'tls-config-1', + 'certificateBundleUuid' => '123e4567-e89b-12d3-a456-426614174000', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.modify_load_balancer_backend_tls_config.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/backends/backend-infra/tls-configs/example-tls-config-1", + null, + 1 + ); + } + + /** + */ + public function testModifyLoadBalancerNetwork(): void { + $testId = 'load_balancer.modify_load_balancer_network.0'; + $this->client->loadBalancer->modifyLoadBalancerNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-network-1', + new LoadBalancerNetworkModify([ + 'name' => 'updated-network', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.modify_load_balancer_network.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/networks/example-network-1", + null, + 1 + ); + } + + /** + */ + public function testListLoadBalancerIpAddresses(): void { + $testId = 'load_balancer.list_load_balancer_ip_addresses.0'; + $this->client->loadBalancer->listLoadBalancerIpAddresses( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.list_load_balancer_ip_addresses.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/ip-addresses", + null, + 1 + ); + } + + /** + */ + public function testCreateLoadBalancerIpAddress(): void { + $testId = 'load_balancer.create_load_balancer_ip_address.0'; + $this->client->loadBalancer->createLoadBalancerIpAddress( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerIpAddressRequest([ + 'body' => new LoadBalancerIpAddressCreate([ + 'address' => '192.168.1.10', + 'networkName' => 'private-net-1', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.create_load_balancer_ip_address.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/ip-addresses", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerIpAddress(): void { + $testId = 'load_balancer.get_load_balancer_ip_address.0'; + $this->client->loadBalancer->getLoadBalancerIpAddress( + '01234567-89ab-cdef-0123-456789abcdef', + '192.168.1.1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_ip_address.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/ip-addresses/192.168.1.1", + null, + 1 + ); + } + + /** + */ + public function testDeleteLoadBalancerIpAddress(): void { + $testId = 'load_balancer.delete_load_balancer_ip_address.0'; + $this->client->loadBalancer->deleteLoadBalancerIpAddress( + '01234567-89ab-cdef-0123-456789abcdef', + '192.168.1.1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.delete_load_balancer_ip_address.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/ip-addresses/192.168.1.1", + null, + 1 + ); + } + + /** + */ + public function testListLoadBalancerResolvers(): void { + $testId = 'load_balancer.list_load_balancer_resolvers.0'; + $this->client->loadBalancer->listLoadBalancerResolvers( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.list_load_balancer_resolvers.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/resolvers", + null, + 1 + ); + } + + /** + */ + public function testCreateLoadBalancerResolver(): void { + $testId = 'load_balancer.create_load_balancer_resolver.0'; + $this->client->loadBalancer->createLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerResolverRequest([ + 'body' => new LoadBalancerResolverCreate([ + 'name' => 'default-resolver', + 'nameservers' => [ + '1.1.1.1:53', + '8.8.8.8:53', + ], + 'retries' => 3, + 'timeout' => 5, + 'timeoutRetry' => 3, + 'cacheValid' => 300, + 'cacheInvalid' => 60, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.create_load_balancer_resolver.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/resolvers", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerResolver(): void { + $testId = 'load_balancer.get_load_balancer_resolver.0'; + $this->client->loadBalancer->getLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-resolver-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_resolver.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/resolvers/example-resolver-1", + null, + 1 + ); + } + + /** + */ + public function testDeleteLoadBalancerResolver(): void { + $testId = 'load_balancer.delete_load_balancer_resolver.0'; + $this->client->loadBalancer->deleteLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-resolver-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.delete_load_balancer_resolver.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/resolvers/example-resolver-1", + null, + 1 + ); + } + + /** + */ + public function testModifyLoadBalancerResolver(): void { + $testId = 'load_balancer.modify_load_balancer_resolver.0'; + $this->client->loadBalancer->modifyLoadBalancerResolver( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-resolver-1', + new LoadBalancerResolverModify([ + 'name' => 'default-resolver', + 'nameservers' => [ + '1.1.1.1:53', + '8.8.8.8:53', + ], + 'retries' => 3, + 'timeout' => 5, + 'timeoutRetry' => 3, + 'cacheValid' => 300, + 'cacheInvalid' => 60, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.modify_load_balancer_resolver.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/resolvers/example-resolver-1", + null, + 1 + ); + } + + /** + */ + public function testListLoadBalancerLabels(): void { + $testId = 'load_balancer.list_load_balancer_labels.0'; + $this->client->loadBalancer->listLoadBalancerLabels( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.list_load_balancer_labels.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/labels", + null, + 1 + ); + } + + /** + */ + public function testCreateLoadBalancerLabel(): void { + $testId = 'load_balancer.create_load_balancer_label.0'; + $this->client->loadBalancer->createLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerLabelRequest([ + 'body' => new LoadBalancerLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.create_load_balancer_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/labels", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerLabel(): void { + $testId = 'load_balancer.get_load_balancer_label.0'; + $this->client->loadBalancer->getLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/labels/example-key-1", + null, + 1 + ); + } + + /** + */ + public function testDeleteLoadBalancerLabel(): void { + $testId = 'load_balancer.delete_load_balancer_label.0'; + $this->client->loadBalancer->deleteLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.delete_load_balancer_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/labels/example-key-1", + null, + 1 + ); + } + + /** + */ + public function testModifyLoadBalancerLabel(): void { + $testId = 'load_balancer.modify_load_balancer_label.0'; + $this->client->loadBalancer->modifyLoadBalancerLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', + new ModifyLoadBalancerLabelRequest([ + 'body' => new LoadBalancerLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.modify_load_balancer_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/labels/example-key-1", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerMetrics(): void { + $testId = 'load_balancer.get_load_balancer_metrics.0'; + $this->client->loadBalancer->getLoadBalancerMetrics( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_metrics.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/metrics", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerMetricsSeries(): void { + $testId = 'load_balancer.get_load_balancer_metrics_series.0'; + $this->client->loadBalancer->getLoadBalancerMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_metrics_series.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/metrics/series", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerFrontendCombinedMetricsSeries(): void { + $testId = 'load_balancer.get_load_balancer_frontend_combined_metrics_series.0'; + $this->client->loadBalancer->getLoadBalancerFrontendCombinedMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + new GetLoadBalancerFrontendCombinedMetricsSeriesRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_frontend_combined_metrics_series.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/metrics/series/frontends", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerFrontendMetricsSeries(): void { + $testId = 'load_balancer.get_load_balancer_frontend_metrics_series.0'; + $this->client->loadBalancer->getLoadBalancerFrontendMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-frontend-1', + new GetLoadBalancerFrontendMetricsSeriesRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_frontend_metrics_series.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/metrics/series/frontends/example-frontend-1", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerBackendCombinedMetricsSeries(): void { + $testId = 'load_balancer.get_load_balancer_backend_combined_metrics_series.0'; + $this->client->loadBalancer->getLoadBalancerBackendCombinedMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + new GetLoadBalancerBackendCombinedMetricsSeriesRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_backend_combined_metrics_series.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/metrics/series/backends", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerBackendMetricsSeries(): void { + $testId = 'load_balancer.get_load_balancer_backend_metrics_series.0'; + $this->client->loadBalancer->getLoadBalancerBackendMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new GetLoadBalancerBackendMetricsSeriesRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_backend_metrics_series.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/metrics/series/backends/backend-infra", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerMemberCombinedMetricsSeries(): void { + $testId = 'load_balancer.get_load_balancer_member_combined_metrics_series.0'; + $this->client->loadBalancer->getLoadBalancerMemberCombinedMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + new GetLoadBalancerMemberCombinedMetricsSeriesRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_member_combined_metrics_series.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/metrics/series/backends/backend-infra/members", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerMemberMetricsSeries(): void { + $testId = 'load_balancer.get_load_balancer_member_metrics_series.0'; + $this->client->loadBalancer->getLoadBalancerMemberMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + 'backend-infra', + 'dev-member', + new GetLoadBalancerMemberMetricsSeriesRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_member_metrics_series.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/01234567-89ab-cdef-0123-456789abcdef/metrics/series/backends/backend-infra/members/dev-member", + null, + 1 + ); + } + + /** + */ + public function testListLoadBalancerCertificateBundles(): void { + $testId = 'load_balancer.list_load_balancer_certificate_bundles.0'; + $this->client->loadBalancer->listLoadBalancerCertificateBundles( + new ListLoadBalancerCertificateBundlesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.list_load_balancer_certificate_bundles.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/certificate-bundles", + ['limit' => '10', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testCreateLoadBalancerCertificateBundle(): void { + $testId = 'load_balancer.create_load_balancer_certificate_bundle.0'; + $this->client->loadBalancer->createLoadBalancerCertificateBundle( + new LoadBalancerCertificateBundleCreateZero([ + 'type' => LoadBalancerCertificateBundleCreateZeroType::Manual->value, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.create_load_balancer_certificate_bundle.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/load-balancer/certificate-bundles", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerCertificateBundle(): void { + $testId = 'load_balancer.get_load_balancer_certificate_bundle.0'; + $this->client->loadBalancer->getLoadBalancerCertificateBundle( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_certificate_bundle.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/certificate-bundles/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testDeleteLoadBalancerCertificateBundle(): void { + $testId = 'load_balancer.delete_load_balancer_certificate_bundle.0'; + $this->client->loadBalancer->deleteLoadBalancerCertificateBundle( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.delete_load_balancer_certificate_bundle.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/load-balancer/certificate-bundles/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testModifyLoadBalancerCertificateBundle(): void { + $testId = 'load_balancer.modify_load_balancer_certificate_bundle.0'; + $this->client->loadBalancer->modifyLoadBalancerCertificateBundle( + '01234567-89ab-cdef-0123-456789abcdef', + new ModifyLoadBalancerCertificateBundleRequest([ + 'body' => new LoadBalancerCertificateBundleManualModify([ + 'name' => 'updated-manual-cert', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.modify_load_balancer_certificate_bundle.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/load-balancer/certificate-bundles/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testListLoadBalancerCertificateBundleLabels(): void { + $testId = 'load_balancer.list_load_balancer_certificate_bundle_labels.0'; + $this->client->loadBalancer->listLoadBalancerCertificateBundleLabels( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.list_load_balancer_certificate_bundle_labels.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/certificate-bundles/01234567-89ab-cdef-0123-456789abcdef/labels", + null, + 1 + ); + } + + /** + */ + public function testCreateLoadBalancerCertificateBundleLabel(): void { + $testId = 'load_balancer.create_load_balancer_certificate_bundle_label.0'; + $this->client->loadBalancer->createLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateLoadBalancerCertificateBundleLabelRequest([ + 'body' => new LoadBalancerLabelCreate([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.create_load_balancer_certificate_bundle_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/load-balancer/certificate-bundles/01234567-89ab-cdef-0123-456789abcdef/labels", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerCertificateBundleLabel(): void { + $testId = 'load_balancer.get_load_balancer_certificate_bundle_label.0'; + $this->client->loadBalancer->getLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_certificate_bundle_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/certificate-bundles/01234567-89ab-cdef-0123-456789abcdef/labels/example-key-1", + null, + 1 + ); + } + + /** + */ + public function testDeleteLoadBalancerCertificateBundleLabel(): void { + $testId = 'load_balancer.delete_load_balancer_certificate_bundle_label.0'; + $this->client->loadBalancer->deleteLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.delete_load_balancer_certificate_bundle_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/load-balancer/certificate-bundles/01234567-89ab-cdef-0123-456789abcdef/labels/example-key-1", + null, + 1 + ); + } + + /** + */ + public function testModifyLoadBalancerCertificateBundleLabel(): void { + $testId = 'load_balancer.modify_load_balancer_certificate_bundle_label.0'; + $this->client->loadBalancer->modifyLoadBalancerCertificateBundleLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'example-key-1', + new ModifyLoadBalancerCertificateBundleLabelRequest([ + 'body' => new LoadBalancerLabelModify([ + 'key' => 'environment', + 'value' => 'production', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.modify_load_balancer_certificate_bundle_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/load-balancer/certificate-bundles/01234567-89ab-cdef-0123-456789abcdef/labels/example-key-1", + null, + 1 + ); + } + + /** + */ + public function testGetLoadBalancerDnsChallengeDomain(): void { + $testId = 'load_balancer.get_load_balancer_dns_challenge_domain.0'; + $this->client->loadBalancer->getLoadBalancerDnsChallengeDomain( + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_dns_challenge_domain.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/certificate-bundles/dns-challenge-domain", + null, + 1 + ); + } + + /** + */ + public function testListLoadBalancerPlans(): void { + $testId = 'load_balancer.list_load_balancer_plans.0'; + $this->client->loadBalancer->listLoadBalancerPlans( + new ListLoadBalancerPlansRequest([ + 'limit' => 10, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.list_load_balancer_plans.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/plans", + ['limit' => '10', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testGetLoadBalancerPlan(): void { + $testId = 'load_balancer.get_load_balancer_plan.0'; + $this->client->loadBalancer->getLoadBalancerPlan( + 'example-plan-1', + [ + 'headers' => [ + 'X-Test-Id' => 'load_balancer.get_load_balancer_plan.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/load-balancer/plans/example-plan-1", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/NetworkPeeringWireTest.php b/fern/sdk/tests/Wire/NetworkPeeringWireTest.php new file mode 100644 index 00000000..0ad727f6 --- /dev/null +++ b/fern/sdk/tests/Wire/NetworkPeeringWireTest.php @@ -0,0 +1,155 @@ +client->networkPeering->listNetworkPeerings( + new ListNetworkPeeringsRequest([ + 'uuid' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'networkUuidLocal' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'networkUuidPeer' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'network_peering.list_network_peerings.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/network-peering", + ['uuid' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', 'network_uuid_local' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', 'network_uuid_peer' => '0414e0d7-4436-4037-9dd8-6eaf47dce599'], + 1 + ); + } + + /** + */ + public function testCreateNetworkPeering(): void { + $testId = 'network_peering.create_network_peering.0'; + $this->client->networkPeering->createNetworkPeering( + new NetworkPeeringCreate([ + 'configuredStatus' => NetworkPeeringCreateConfiguredStatus::Active->value, + 'name' => 'Peering A->B', + 'network' => new NetworkPeeringCreateNetwork([ + 'uuid' => '03126dc1-a69f-4bc2-8b24-e31c22d64712', + ]), + 'peerNetwork' => new NetworkPeeringCreatePeerNetwork([ + 'uuid' => '03585987-bf7d-4544-8e9b-5a1b4d74a333', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'network_peering.create_network_peering.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/network-peering", + null, + 1 + ); + } + + /** + */ + public function testGetNetworkPeering(): void { + $testId = 'network_peering.get_network_peering.0'; + $this->client->networkPeering->getNetworkPeering( + 'peering_uuid', + [ + 'headers' => [ + 'X-Test-Id' => 'network_peering.get_network_peering.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/network-peering/peering_uuid", + null, + 1 + ); + } + + /** + */ + public function testDeleteNetworkPeering(): void { + $testId = 'network_peering.delete_network_peering.0'; + $this->client->networkPeering->deleteNetworkPeering( + 'peering_uuid', + [ + 'headers' => [ + 'X-Test-Id' => 'network_peering.delete_network_peering.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/network-peering/peering_uuid", + null, + 1 + ); + } + + /** + */ + public function testModifyNetworkPeering(): void { + $testId = 'network_peering.modify_network_peering.0'; + $this->client->networkPeering->modifyNetworkPeering( + 'peering_uuid', + new NetworkPeeringModify([ + 'configuredStatus' => NetworkPeeringModifyConfiguredStatus::Disabled->value, + 'name' => 'Peering A->B modified', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'network_peering.modify_network_peering.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/network-peering/peering_uuid", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/NetworkWireTest.php b/fern/sdk/tests/Wire/NetworkWireTest.php new file mode 100644 index 00000000..2acc0431 --- /dev/null +++ b/fern/sdk/tests/Wire/NetworkWireTest.php @@ -0,0 +1,305 @@ +client->network->listNetworks( + new ListNetworksRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'network.list_networks.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/network", + null, + 1 + ); + } + + /** + */ + public function testCreateNetwork(): void { + $testId = 'network.create_network.0'; + $this->client->network->createNetwork( + new CreateNetworkRequest([ + 'network' => new CreateNetworkRequestNetwork([ + 'type' => NetworkType::Private_->value, + 'name' => 'backend-net', + 'zone' => 'fi-hel2', + 'ipNetworks' => new CreateNetworkRequestNetworkIpNetworks([ + 'ipNetwork' => [ + new CreateNetworkRequestNetworkIpNetworksIpNetworkItem([ + 'family' => NetworkIpFamily::IPv4->value, + 'address' => '10.0.0.0/24', + 'dhcp' => NetworkBooleanYesno::Yes->value, + ]), + ], + ]), + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'network.create_network.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/network", + null, + 1 + ); + } + + /** + */ + public function testListNetworkInterfaces(): void { + $testId = 'network.list_network_interfaces.0'; + $this->client->network->listNetworkInterfaces( + [ + 'headers' => [ + 'X-Test-Id' => 'network.list_network_interfaces.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/network/interface", + null, + 1 + ); + } + + /** + */ + public function testCreateNetworkInterface(): void { + $testId = 'network.create_network_interface.0'; + $this->client->network->createNetworkInterface( + new NetworkCreateInterfaceRequest([ + 'mainAccountId' => 123456, + 'interface' => new NetworkCreateInterfaceRequestInterface([ + 'bootable' => NetworkBooleanYesno::No->value, + 'network' => '8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a001', + 'sourceIpFiltering' => NetworkBooleanYesno::Yes->value, + 'type' => NetworkType::Private_->value, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'network.create_network_interface.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/network/interface", + null, + 1 + ); + } + + /** + */ + public function testGetNetworkInterfaceDetails(): void { + $testId = 'network.get_network_interface_details.0'; + $this->client->network->getNetworkInterfaceDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'network.get_network_interface_details.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/network/interface/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + public function testDeleteNetworkInterface(): void { + $testId = 'network.delete_network_interface.0'; + $this->client->network->deleteNetworkInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'network.delete_network_interface.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/network/interface/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + public function testGetNetworkDetails(): void { + $testId = 'network.get_network_details.0'; + $this->client->network->getNetworkDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'network.get_network_details.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/network/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + public function testModifyNetwork(): void { + $testId = 'network.modify_network.0'; + $this->client->network->modifyNetwork( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyNetworkRequest([ + 'network' => new ModifyNetworkRequestNetwork([ + 'type' => NetworkType::Public_->value, + 'name' => 'name', + 'zone' => 'fi-hel1', + 'tags' => new NetworkTags([ + 'tags' => new NetworkTagsTags([ + 'tag' => [ + new NetworkTagsTagsTagItem([ + 'description' => 'Production servers', + 'name' => 'PROD', + 'servers' => new NetworkServers([ + 'server' => [ + '0077fa3d-32db-4b09-9f5f-30d9e9afb565', + ], + ]), + ]), + ], + ]), + ]), + 'labels' => new NetworkLabels([ + 'label' => [ + new NetworkLabel([ + 'key' => 'env', + 'value' => 'prod', + ]), + new NetworkLabel([ + 'key' => 'team', + 'value' => 'network', + ]), + ], + ]), + 'router' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'grtExport' => 1000000, + 'parentNetwork' => 'parent_network', + 'ipNetworks' => new ModifyNetworkRequestNetworkIpNetworks([ + 'ipNetwork' => [ + new ModifyNetworkRequestNetworkIpNetworksIpNetworkItem([ + 'family' => NetworkIpFamily::IPv4->value, + 'address' => 'address', + ]), + ], + ]), + 'networkFeatures' => NetworkFeatures::AllowLinklocalAddress->value, + 'mainAccountId' => 1000000, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'network.modify_network.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/network/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + public function testDeleteNetwork(): void { + $testId = 'network.delete_network.0'; + $this->client->network->deleteNetwork( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'network.delete_network.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/network/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/ObjectStorage2WireTest.php b/fern/sdk/tests/Wire/ObjectStorage2WireTest.php new file mode 100644 index 00000000..662e4659 --- /dev/null +++ b/fern/sdk/tests/Wire/ObjectStorage2WireTest.php @@ -0,0 +1,2349 @@ +client->objectStorage2->listObjectStorages( + new ListObjectStoragesRequest([ + 'limit' => 10, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storages.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2", + ['limit' => '10', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testCreateObjectStorage(): void { + $testId = 'object_storage_2.create_object_storage.0'; + $this->client->objectStorage2->createObjectStorage( + new ObjectStorage2ServiceCreate([ + 'name' => 'example-service', + 'region' => 'example', + 'configuredStatus' => ObjectStorage2PropertyConfiguredStatus::Started->value, + 'networks' => [ + new ObjectStorage2NetworkCreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2NetworkType::Public_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + new ObjectStorage2NetworkCreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2NetworkType::Private_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.create_object_storage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStorage(): void { + $testId = 'object_storage_2.get_object_storage.0'; + $this->client->objectStorage2->getObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testReplaceObjectStorage(): void { + $testId = 'object_storage_2.replace_object_storage.0'; + $this->client->objectStorage2->replaceObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2ServiceReplace([ + 'name' => 'example-service', + 'configuredStatus' => ObjectStorage2PropertyConfiguredStatus::Started->value, + 'networks' => [ + new ObjectStorage2NetworkCreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2NetworkType::Public_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + new ObjectStorage2NetworkCreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2NetworkType::Private_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ], + 'labels' => [ + new ObjectStorage2LabelCreate([ + 'key' => 'example-label-key', + 'value' => 'example-label-value', + ]), + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.replace_object_storage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorage(): void { + $testId = 'object_storage_2.delete_object_storage.0'; + $this->client->objectStorage2->deleteObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', + new DeleteObjectStorageRequest([ + 'force' => true, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef", + ['force' => 'true'], + 1 + ); + } + + /** + */ + public function testModifyObjectStorage(): void { + $testId = 'object_storage_2.modify_object_storage.0'; + $this->client->objectStorage2->modifyObjectStorage( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2ServiceModify([ + 'name' => 'example-service', + 'configuredStatus' => ObjectStorage2PropertyConfiguredStatus::Started->value, + 'networks' => [ + new ObjectStorage2NetworkCreate([ + 'uuid' => '03aa7245-2ff9-49c8-9f0e-7ca0270d71a4', + 'name' => 'example-private-network', + 'type' => ObjectStorage2NetworkType::Private_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.modify_object_storage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageNetworks(): void { + $testId = 'object_storage_2.list_object_storage_networks.0'; + $this->client->objectStorage2->listObjectStorageNetworks( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_networks.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/networks", + null, + 1 + ); + } + + /** + */ + public function testCreateObjectStorageNetwork(): void { + $testId = 'object_storage_2.create_object_storage_network.0'; + $this->client->objectStorage2->createObjectStorageNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateObjectStorageNetworkRequest([ + 'body' => new ObjectStorage2NetworkCreate([ + 'name' => 'example-public-network', + 'type' => ObjectStorage2NetworkType::Public_->value, + 'family' => ObjectStorage2NetworkFamily::IPv4->value, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.create_object_storage_network.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/networks", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStorageNetwork(): void { + $testId = 'object_storage_2.get_object_storage_network.0'; + $this->client->objectStorage2->getObjectStorageNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_network.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/networks/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorageNetwork(): void { + $testId = 'object_storage_2.delete_object_storage_network.0'; + $this->client->objectStorage2->deleteObjectStorageNetwork( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_network.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/networks/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageCustomDomains(): void { + $testId = 'object_storage_2.list_object_storage_custom_domains.0'; + $this->client->objectStorage2->listObjectStorageCustomDomains( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_custom_domains.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/custom-domains", + null, + 1 + ); + } + + /** + */ + public function testAttachObjectStorageCustomDomain(): void { + $testId = 'object_storage_2.attach_object_storage_custom_domain.0'; + $this->client->objectStorage2->attachObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + new AttachObjectStorageCustomDomainRequest([ + 'body' => new ObjectStorage2CustomDomainCreate([ + 'type' => ObjectStorage2CustomDomainCreateType::Public_->value, + 'domainName' => 'example.com', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.attach_object_storage_custom_domain.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/custom-domains", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStorageCustomDomain(): void { + $testId = 'object_storage_2.get_object_storage_custom_domain.0'; + $this->client->objectStorage2->getObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_custom_domain.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/custom-domains/example.com", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorageCustomDomain(): void { + $testId = 'object_storage_2.delete_object_storage_custom_domain.0'; + $this->client->objectStorage2->deleteObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_custom_domain.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/custom-domains/example.com", + null, + 1 + ); + } + + /** + */ + public function testModifyObjectStorageCustomDomain(): void { + $testId = 'object_storage_2.modify_object_storage_custom_domain.0'; + $this->client->objectStorage2->modifyObjectStorageCustomDomain( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', + new ObjectStorage2CustomDomainModify([ + 'type' => ObjectStorage2CustomDomainModifyType::Public_->value, + 'domainName' => 'example.com', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.modify_object_storage_custom_domain.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/custom-domains/example.com", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageRegions(): void { + $testId = 'object_storage_2.list_object_storage_regions.0'; + $this->client->objectStorage2->listObjectStorageRegions( + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_regions.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/regions", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStorageRegion(): void { + $testId = 'object_storage_2.get_object_storage_region.0'; + $this->client->objectStorage2->getObjectStorageRegion( + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_region.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/regions/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStorageMetrics(): void { + $testId = 'object_storage_2.get_object_storage_metrics.0'; + $this->client->objectStorage2->getObjectStorageMetrics( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_metrics.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/metrics", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageBucketMetrics(): void { + $testId = 'object_storage_2.list_object_storage_bucket_metrics.0'; + $this->client->objectStorage2->listObjectStorageBucketMetrics( + '01234567-89ab-cdef-0123-456789abcdef', + new ListObjectStorageBucketMetricsRequest([ + 'limit' => 10, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_bucket_metrics.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/buckets", + ['limit' => '10', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testCreateObjectStorageBucket(): void { + $testId = 'object_storage_2.create_object_storage_bucket.0'; + $this->client->objectStorage2->createObjectStorageBucket( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2BucketCreate([ + 'name' => 'my-bucket-1', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.create_object_storage_bucket.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/buckets", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorageBucket(): void { + $testId = 'object_storage_2.delete_object_storage_bucket.0'; + $this->client->objectStorage2->deleteObjectStorageBucket( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_bucket.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/buckets/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageMetricsSeries(): void { + $testId = 'object_storage_2.list_object_storage_metrics_series.0'; + $this->client->objectStorage2->listObjectStorageMetricsSeries( + '01234567-89ab-cdef-0123-456789abcdef', + new ListObjectStorageMetricsSeriesRequest([ + 'from' => new DateTime('2024-01-01T00:00:00Z'), + 'to' => new DateTime('2024-01-01T00:00:00Z'), + 'interval' => '1h', + 'limit' => 10, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_metrics_series.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/metrics/series", + ['from' => '2024-01-01T00:00:00Z', 'to' => '2024-01-01T00:00:00Z', 'interval' => '1h', 'limit' => '10', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testListObjectStorageLabels(): void { + $testId = 'object_storage_2.list_object_storage_labels.0'; + $this->client->objectStorage2->listObjectStorageLabels( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_labels.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/labels", + null, + 1 + ); + } + + /** + */ + public function testCreateObjectStorageLabel(): void { + $testId = 'object_storage_2.create_object_storage_label.0'; + $this->client->objectStorage2->createObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateObjectStorageLabelRequest([ + 'body' => new ObjectStorage2LabelCreate([ + 'key' => 'foo', + 'value' => 'bar', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.create_object_storage_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/labels", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStorageLabel(): void { + $testId = 'object_storage_2.get_object_storage_label.0'; + $this->client->objectStorage2->getObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/labels/environment", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorageLabel(): void { + $testId = 'object_storage_2.delete_object_storage_label.0'; + $this->client->objectStorage2->deleteObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/labels/environment", + null, + 1 + ); + } + + /** + */ + public function testModifyObjectStorageLabel(): void { + $testId = 'object_storage_2.modify_object_storage_label.0'; + $this->client->objectStorage2->modifyObjectStorageLabel( + '01234567-89ab-cdef-0123-456789abcdef', + 'environment', + new ObjectStorage2LabelModify([ + 'key' => 'foo', + 'value' => 'bar', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.modify_object_storage_label.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/labels/environment", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageStaticWebsites(): void { + $testId = 'object_storage_2.list_object_storage_static_websites.0'; + $this->client->objectStorage2->listObjectStorageStaticWebsites( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_static_websites.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/static-websites", + null, + 1 + ); + } + + /** + */ + public function testCreateObjectStorageStaticWebsite(): void { + $testId = 'object_storage_2.create_object_storage_static_website.0'; + $this->client->objectStorage2->createObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + new CreateObjectStorageStaticWebsiteRequest([ + 'body' => new ObjectStorage2StaticWebsiteConfigCreate([ + 'bucketName' => 'my-website', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.create_object_storage_static_website.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/static-websites", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStorageStaticWebsite(): void { + $testId = 'object_storage_2.get_object_storage_static_website.0'; + $this->client->objectStorage2->getObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_static_website.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/static-websites/example.com", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorageStaticWebsite(): void { + $testId = 'object_storage_2.delete_object_storage_static_website.0'; + $this->client->objectStorage2->deleteObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_static_website.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/static-websites/example.com", + null, + 1 + ); + } + + /** + */ + public function testModifyObjectStorageStaticWebsite(): void { + $testId = 'object_storage_2.modify_object_storage_static_website.0'; + $this->client->objectStorage2->modifyObjectStorageStaticWebsite( + '01234567-89ab-cdef-0123-456789abcdef', + 'example.com', + new ObjectStorage2StaticWebsiteConfigModify([]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.modify_object_storage_static_website.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/static-websites/example.com", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageDomains(): void { + $testId = 'object_storage_2.list_object_storage_domains.0'; + $this->client->objectStorage2->listObjectStorageDomains( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_domains.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/domains", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageUsers(): void { + $testId = 'object_storage_2.list_object_storage_users.0'; + $this->client->objectStorage2->listObjectStorageUsers( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_users.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users", + null, + 1 + ); + } + + /** + */ + public function testCreateObjectStorageUser(): void { + $testId = 'object_storage_2.create_object_storage_user.0'; + $this->client->objectStorage2->createObjectStorageUser( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2UserCreate([ + 'username' => 'example_user', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.create_object_storage_user.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStorageUser(): void { + $testId = 'object_storage_2.get_object_storage_user.0'; + $this->client->objectStorage2->getObjectStorageUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_user.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorageUser(): void { + $testId = 'object_storage_2.delete_object_storage_user.0'; + $this->client->objectStorage2->deleteObjectStorageUser( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_user.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageAccessKeys(): void { + $testId = 'object_storage_2.list_object_storage_access_keys.0'; + $this->client->objectStorage2->listObjectStorageAccessKeys( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_access_keys.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/access-keys", + null, + 1 + ); + } + + /** + */ + public function testCreateObjectStorageAccessKey(): void { + $testId = 'object_storage_2.create_object_storage_access_key.0'; + $this->client->objectStorage2->createObjectStorageAccessKey( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.create_object_storage_access_key.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/access-keys", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStorageAccessKeyDetails(): void { + $testId = 'object_storage_2.get_object_storage_access_key_details.0'; + $this->client->objectStorage2->getObjectStorageAccessKeyDetails( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_access_key_details.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/access-keys/UCK1234567890ABCDEF", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorageAccessKey(): void { + $testId = 'object_storage_2.delete_object_storage_access_key.0'; + $this->client->objectStorage2->deleteObjectStorageAccessKey( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_access_key.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/access-keys/UCK1234567890ABCDEF", + null, + 1 + ); + } + + /** + */ + public function testModifyObjectStorageAccessKeyDetails(): void { + $testId = 'object_storage_2.modify_object_storage_access_key_details.0'; + $this->client->objectStorage2->modifyObjectStorageAccessKeyDetails( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'UCK1234567890ABCDEF', + new ObjectStorage2AccessKeyModify([ + 'status' => ObjectStorage2AccessKeyModifyStatus::Inactive->value, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.modify_object_storage_access_key_details.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/access-keys/UCK1234567890ABCDEF", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageAttachedUserPolicies(): void { + $testId = 'object_storage_2.list_object_storage_attached_user_policies.0'; + $this->client->objectStorage2->listObjectStorageAttachedUserPolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_attached_user_policies.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/policies", + null, + 1 + ); + } + + /** + */ + public function testAttachObjectStorageUserPolicy(): void { + $testId = 'object_storage_2.attach_object_storage_user_policy.0'; + $this->client->objectStorage2->attachObjectStorageUserPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachObjectStorageUserPolicyRequest([ + 'body' => new ObjectStorage2PolicyAttachmentCreate([ + 'name' => 'test-policy', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.attach_object_storage_user_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/policies", + null, + 1 + ); + } + + /** + */ + public function testDetachObjectStorageUserPolicy(): void { + $testId = 'object_storage_2.detach_object_storage_user_policy.0'; + $this->client->objectStorage2->detachObjectStorageUserPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.detach_object_storage_user_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/policies/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStorageUserInlinePolicy(): void { + $testId = 'object_storage_2.get_object_storage_user_inline_policy.0'; + $this->client->objectStorage2->getObjectStorageUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_user_inline_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/inline-policies/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorageUserInlinePolicy(): void { + $testId = 'object_storage_2.delete_object_storage_user_inline_policy.0'; + $this->client->objectStorage2->deleteObjectStorageUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_user_inline_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/inline-policies/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageUserInlinePolicies(): void { + $testId = 'object_storage_2.list_object_storage_user_inline_policies.0'; + $this->client->objectStorage2->listObjectStorageUserInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_user_inline_policies.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/inline-policies", + null, + 1 + ); + } + + /** + */ + public function testCreateObjectStorageUserInlinePolicy(): void { + $testId = 'object_storage_2.create_object_storage_user_inline_policy.0'; + $this->client->objectStorage2->createObjectStorageUserInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageUserInlinePolicyRequest([ + 'body' => new ObjectStorage2InlinePolicyCreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.create_object_storage_user_inline_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/inline-policies", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStorageUserTags(): void { + $testId = 'object_storage_2.get_object_storage_user_tags.0'; + $this->client->objectStorage2->getObjectStorageUserTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_user_tags.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/tags", + null, + 1 + ); + } + + /** + */ + public function testReplaceObjectStorageUserTags(): void { + $testId = 'object_storage_2.replace_object_storage_user_tags.0'; + $this->client->objectStorage2->replaceObjectStorageUserTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ReplaceObjectStorageUserTagsRequest([ + 'body' => [ + new ObjectStorage2TagListRequestItem([ + 'key' => 'environment', + 'value' => 'production', + ]), + new ObjectStorage2TagListRequestItem([ + 'key' => 'team', + 'value' => 'backend', + ]), + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.replace_object_storage_user_tags.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/tags", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorageUserTag(): void { + $testId = 'object_storage_2.delete_object_storage_user_tag.0'; + $this->client->objectStorage2->deleteObjectStorageUserTag( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'environment', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_user_tag.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/tags/environment", + null, + 1 + ); + } + + /** + */ + public function testCreateObjectStorageUserPermissionsBoundary(): void { + $testId = 'object_storage_2.create_object_storage_user_permissions_boundary.0'; + $this->client->objectStorage2->createObjectStorageUserPermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageUserPermissionsBoundaryRequest([ + 'body' => new ObjectStorage2PermissionsBoundaryCreate([ + 'policyName' => 'sample-policy', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.create_object_storage_user_permissions_boundary.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/permissions-boundary", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorageUserPermissionsBoundary(): void { + $testId = 'object_storage_2.delete_object_storage_user_permissions_boundary.0'; + $this->client->objectStorage2->deleteObjectStorageUserPermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_user_permissions_boundary.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/users/my-object-storage/permissions-boundary", + null, + 1 + ); + } + + /** + */ + public function testListObjectStoragePolicyVersions(): void { + $testId = 'object_storage_2.list_object_storage_policy_versions.0'; + $this->client->objectStorage2->listObjectStoragePolicyVersions( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_policy_versions.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/policies/my-object-storage/versions", + null, + 1 + ); + } + + /** + */ + public function testCreateObjectStoragePolicyVersion(): void { + $testId = 'object_storage_2.create_object_storage_policy_version.0'; + $this->client->objectStorage2->createObjectStoragePolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2PolicyVersionCreate([ + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":["*"],"Effect":"Deny","Resource":"*"}]}', + 'isDefault' => true, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.create_object_storage_policy_version.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/policies/my-object-storage/versions", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStoragePolicyVersion(): void { + $testId = 'object_storage_2.get_object_storage_policy_version.0'; + $this->client->objectStorage2->getObjectStoragePolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'v1', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_policy_version.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/policies/my-object-storage/versions/v1", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStoragePolicyVersion(): void { + $testId = 'object_storage_2.delete_object_storage_policy_version.0'; + $this->client->objectStorage2->deleteObjectStoragePolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'v1', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_policy_version.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/policies/my-object-storage/versions/v1", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStoragePolicy(): void { + $testId = 'object_storage_2.get_object_storage_policy.0'; + $this->client->objectStorage2->getObjectStoragePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/policies/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStoragePolicy(): void { + $testId = 'object_storage_2.delete_object_storage_policy.0'; + $this->client->objectStorage2->deleteObjectStoragePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/policies/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testSetObjectStorageDefaultPolicyVersion(): void { + $testId = 'object_storage_2.set_object_storage_default_policy_version.0'; + $this->client->objectStorage2->setObjectStorageDefaultPolicyVersion( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2PolicySetDefaultVersion([ + 'versionId' => 'v2', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.set_object_storage_default_policy_version.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/policies/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testListObjectStoragePolicies(): void { + $testId = 'object_storage_2.list_object_storage_policies.0'; + $this->client->objectStorage2->listObjectStoragePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_policies.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/policies", + null, + 1 + ); + } + + /** + */ + public function testCreateObjectStoragePolicy(): void { + $testId = 'object_storage_2.create_object_storage_policy.0'; + $this->client->objectStorage2->createObjectStoragePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2PolicyCreate([ + 'name' => 'example-policy', + 'description' => 'example-description', + 'document' => '%7B%22Version%22%3A%20%222012-10-17%22%2C%20%20%22Statement%22%3A%20%5B%7B%22Action%22%3A%20%5B%22iam%3AGetUser%22%5D%2C%20%22Resource%22%3A%20%22%2A%22%2C%20%22Effect%22%3A%20%22Allow%22%2C%20%22Sid%22%3A%20%22editor%22%7D%5D%7D', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.create_object_storage_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/policies", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageIamGroupPolicies(): void { + $testId = 'object_storage_2.list_object_storage_iam_group_policies.0'; + $this->client->objectStorage2->listObjectStorageIamGroupPolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_iam_group_policies.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/groups/my-object-storage/policies", + null, + 1 + ); + } + + /** + */ + public function testAttachObjectStorageIamGroupPolicy(): void { + $testId = 'object_storage_2.attach_object_storage_iam_group_policy.0'; + $this->client->objectStorage2->attachObjectStorageIamGroupPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachObjectStorageIamGroupPolicyRequest([ + 'body' => new ObjectStorage2PolicyAttachmentCreate([ + 'name' => 'test-policy', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.attach_object_storage_iam_group_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/groups/my-object-storage/policies", + null, + 1 + ); + } + + /** + */ + public function testDetachObjectStorageIamGroupPolicy(): void { + $testId = 'object_storage_2.detach_object_storage_iam_group_policy.0'; + $this->client->objectStorage2->detachObjectStorageIamGroupPolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.detach_object_storage_iam_group_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/groups/my-object-storage/policies/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageGroups(): void { + $testId = 'object_storage_2.list_object_storage_groups.0'; + $this->client->objectStorage2->listObjectStorageGroups( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_groups.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/groups", + null, + 1 + ); + } + + /** + */ + public function testCreateObjectStorageGroup(): void { + $testId = 'object_storage_2.create_object_storage_group.0'; + $this->client->objectStorage2->createObjectStorageGroup( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2GroupCreate([ + 'name' => 'new-group', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.create_object_storage_group.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/groups", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStorageGroup(): void { + $testId = 'object_storage_2.get_object_storage_group.0'; + $this->client->objectStorage2->getObjectStorageGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_group.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/groups/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorageGroup(): void { + $testId = 'object_storage_2.delete_object_storage_group.0'; + $this->client->objectStorage2->deleteObjectStorageGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_group.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/groups/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testAttachObjectStorageUserToGroup(): void { + $testId = 'object_storage_2.attach_object_storage_user_to_group.0'; + $this->client->objectStorage2->attachObjectStorageUserToGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.attach_object_storage_user_to_group.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/groups/my-object-storage/users/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testRemoveObjectStorageUserFromGroup(): void { + $testId = 'object_storage_2.remove_object_storage_user_from_group.0'; + $this->client->objectStorage2->removeObjectStorageUserFromGroup( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.remove_object_storage_user_from_group.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/groups/my-object-storage/users/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageGroupInlinePolicies(): void { + $testId = 'object_storage_2.list_object_storage_group_inline_policies.0'; + $this->client->objectStorage2->listObjectStorageGroupInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_group_inline_policies.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/groups/my-object-storage/inline-policies", + null, + 1 + ); + } + + /** + */ + public function testCreateObjectStorageGroupInlinePolicy(): void { + $testId = 'object_storage_2.create_object_storage_group_inline_policy.0'; + $this->client->objectStorage2->createObjectStorageGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageGroupInlinePolicyRequest([ + 'body' => new ObjectStorage2InlinePolicyCreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.create_object_storage_group_inline_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/groups/my-object-storage/inline-policies", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStorageGroupInlinePolicy(): void { + $testId = 'object_storage_2.get_object_storage_group_inline_policy.0'; + $this->client->objectStorage2->getObjectStorageGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_group_inline_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/groups/my-object-storage/inline-policies/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorageGroupInlinePolicy(): void { + $testId = 'object_storage_2.delete_object_storage_group_inline_policy.0'; + $this->client->objectStorage2->deleteObjectStorageGroupInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_group_inline_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/groups/my-object-storage/inline-policies/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageRoles(): void { + $testId = 'object_storage_2.list_object_storage_roles.0'; + $this->client->objectStorage2->listObjectStorageRoles( + '01234567-89ab-cdef-0123-456789abcdef', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_roles.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles", + null, + 1 + ); + } + + /** + */ + public function testCreateObjectStorageRole(): void { + $testId = 'object_storage_2.create_object_storage_role.0'; + $this->client->objectStorage2->createObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + new ObjectStorage2RoleCreate([ + 'name' => 'test-role', + 'assumeRolePolicyDocument' => '{"Version": "2012-10-17","Statement": [{"Action": "sts:AssumeRole","Principal": {"AWS": ["urn:ecs:iam::ns1:user/Demby"]},"Effect": "Allow","Resource": "*"}]}', + 'description' => 'A test role.', + 'maxSessionDuration' => 3600, + 'permissionsBoundary' => 'test-policy', + 'tags' => [ + new ObjectStorage2RoleTag([ + 'key' => 'department', + 'value' => 'Finance', + ]), + new ObjectStorage2RoleTag([ + 'key' => 'school', + 'value' => 'University of Helsinki', + ]), + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.create_object_storage_role.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStorageRole(): void { + $testId = 'object_storage_2.get_object_storage_role.0'; + $this->client->objectStorage2->getObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_role.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorageRole(): void { + $testId = 'object_storage_2.delete_object_storage_role.0'; + $this->client->objectStorage2->deleteObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_role.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testUpdateObjectStorageRole(): void { + $testId = 'object_storage_2.update_object_storage_role.0'; + $this->client->objectStorage2->updateObjectStorageRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2RoleUpdate([ + 'description' => 'New description', + 'maxSessionDuration' => 3900, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.update_object_storage_role.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageRoleInlinePolicies(): void { + $testId = 'object_storage_2.list_object_storage_role_inline_policies.0'; + $this->client->objectStorage2->listObjectStorageRoleInlinePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_role_inline_policies.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles/my-object-storage/inline-policies", + null, + 1 + ); + } + + /** + */ + public function testCreateObjectStorageRoleInlinePolicy(): void { + $testId = 'object_storage_2.create_object_storage_role_inline_policy.0'; + $this->client->objectStorage2->createObjectStorageRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageRoleInlinePolicyRequest([ + 'body' => new ObjectStorage2InlinePolicyCreate([ + 'name' => 'ECSS3FullAccess', + 'document' => '{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Resource":"*"}]}', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.create_object_storage_role_inline_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles/my-object-storage/inline-policies", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStorageRoleInlinePolicy(): void { + $testId = 'object_storage_2.get_object_storage_role_inline_policy.0'; + $this->client->objectStorage2->getObjectStorageRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_role_inline_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles/my-object-storage/inline-policies/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorageRoleInlinePolicy(): void { + $testId = 'object_storage_2.delete_object_storage_role_inline_policy.0'; + $this->client->objectStorage2->deleteObjectStorageRoleInlinePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_role_inline_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles/my-object-storage/inline-policies/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testCreateObjectStorageRolePermissionsBoundary(): void { + $testId = 'object_storage_2.create_object_storage_role_permissions_boundary.0'; + $this->client->objectStorage2->createObjectStorageRolePermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new CreateObjectStorageRolePermissionsBoundaryRequest([ + 'body' => new ObjectStorage2PermissionsBoundaryCreate([ + 'policyName' => 'sample-policy', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.create_object_storage_role_permissions_boundary.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles/my-object-storage/permissions-boundary", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorageRolePermissionsBoundary(): void { + $testId = 'object_storage_2.delete_object_storage_role_permissions_boundary.0'; + $this->client->objectStorage2->deleteObjectStorageRolePermissionsBoundary( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_role_permissions_boundary.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles/my-object-storage/permissions-boundary", + null, + 1 + ); + } + + /** + */ + public function testAssumeObjectStorageRolePolicy(): void { + $testId = 'object_storage_2.assume_object_storage_role_policy.0'; + $this->client->objectStorage2->assumeObjectStorageRolePolicy( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ObjectStorage2AssumeRolePolicyRequest([ + 'document' => '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":"backup.upcloud.com"},"Action":"sts:AssumeRole"}]}', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.assume_object_storage_role_policy.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles/my-object-storage/assume-role-policy", + null, + 1 + ); + } + + /** + */ + public function testListObjectStorageAttachedRolePolicies(): void { + $testId = 'object_storage_2.list_object_storage_attached_role_policies.0'; + $this->client->objectStorage2->listObjectStorageAttachedRolePolicies( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.list_object_storage_attached_role_policies.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles/my-object-storage/policies", + null, + 1 + ); + } + + /** + */ + public function testAttachObjectStoragePolicyToRole(): void { + $testId = 'object_storage_2.attach_object_storage_policy_to_role.0'; + $this->client->objectStorage2->attachObjectStoragePolicyToRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new AttachObjectStoragePolicyToRoleRequest([ + 'body' => new ObjectStorage2PolicyAttachmentCreate([ + 'name' => 'test-policy', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.attach_object_storage_policy_to_role.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles/my-object-storage/policies", + null, + 1 + ); + } + + /** + */ + public function testDetachObjectStoragePolicyFromRole(): void { + $testId = 'object_storage_2.detach_object_storage_policy_from_role.0'; + $this->client->objectStorage2->detachObjectStoragePolicyFromRole( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.detach_object_storage_policy_from_role.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles/my-object-storage/policies/my-object-storage", + null, + 1 + ); + } + + /** + */ + public function testGetObjectStorageRoleTags(): void { + $testId = 'object_storage_2.get_object_storage_role_tags.0'; + $this->client->objectStorage2->getObjectStorageRoleTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.get_object_storage_role_tags.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles/my-object-storage/tags", + null, + 1 + ); + } + + /** + */ + public function testReplaceObjectStorageRoleTags(): void { + $testId = 'object_storage_2.replace_object_storage_role_tags.0'; + $this->client->objectStorage2->replaceObjectStorageRoleTags( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + new ReplaceObjectStorageRoleTagsRequest([ + 'body' => [ + new ObjectStorage2TagListRequestItem([ + 'key' => 'environment', + 'value' => 'production', + ]), + new ObjectStorage2TagListRequestItem([ + 'key' => 'team', + 'value' => 'backend', + ]), + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.replace_object_storage_role_tags.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles/my-object-storage/tags", + null, + 1 + ); + } + + /** + */ + public function testDeleteObjectStorageRoleTag(): void { + $testId = 'object_storage_2.delete_object_storage_role_tag.0'; + $this->client->objectStorage2->deleteObjectStorageRoleTag( + '01234567-89ab-cdef-0123-456789abcdef', + 'my-object-storage', + 'environment', + [ + 'headers' => [ + 'X-Test-Id' => 'object_storage_2.delete_object_storage_role_tag.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/object-storage-2/01234567-89ab-cdef-0123-456789abcdef/roles/my-object-storage/tags/environment", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/PartnerWireTest.php b/fern/sdk/tests/Wire/PartnerWireTest.php new file mode 100644 index 00000000..8f1b5f8a --- /dev/null +++ b/fern/sdk/tests/Wire/PartnerWireTest.php @@ -0,0 +1,71 @@ +client->partner->listPartnerAccounts( + [ + 'headers' => [ + 'X-Test-Id' => 'partner.list_partner_accounts.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/partner/accounts", + null, + 1 + ); + } + + /** + */ + public function testCreatePartnerAccount(): void { + $testId = 'partner.create_partner_account.0'; + $this->client->partner->createPartnerAccount( + new PartnerCreateAccount([ + 'username' => 'newuser', + 'password' => 'superSecret123', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'partner.create_partner_account.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/partner/accounts", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/PermissionWireTest.php b/fern/sdk/tests/Wire/PermissionWireTest.php new file mode 100644 index 00000000..41ab3ba0 --- /dev/null +++ b/fern/sdk/tests/Wire/PermissionWireTest.php @@ -0,0 +1,158 @@ +client->permission->listPermissions( + [ + 'headers' => [ + 'X-Test-Id' => 'permission.list_permissions.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/permission", + null, + 1 + ); + } + + /** + */ + public function testReplacePermissions(): void { + $testId = 'permission.replace_permissions.0'; + $this->client->permission->replacePermissions( + new Permission([]), + [ + 'headers' => [ + 'X-Test-Id' => 'permission.replace_permissions.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/permission", + null, + 1 + ); + } + + /** + */ + public function testGrantPermission(): void { + $testId = 'permission.grant_permission.0'; + $this->client->permission->grantPermission( + new GrantPermissionRequest([ + 'body' => new Permission([]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'permission.grant_permission.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/permission/grant", + null, + 1 + ); + } + + /** + */ + public function testRevokePermission(): void { + $testId = 'permission.revoke_permission.0'; + $this->client->permission->revokePermission( + new Permission([]), + [ + 'headers' => [ + 'X-Test-Id' => 'permission.revoke_permission.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/permission/revoke", + null, + 1 + ); + } + + /** + */ + public function testRevokeAllPermissionsByTarget(): void { + $testId = 'permission.revoke_all_permissions_by_target.0'; + $this->client->permission->revokeAllPermissionsByTarget( + 'target_type', + 'target_identifier', + new RevokeAllPermissionsByTargetRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'permission.revoke_all_permissions_by_target.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/permission/revoke-all-from-target/target_type/target_identifier", + null, + 1 + ); + } + + /** + */ + public function testRevokeAllPermissionsByUser(): void { + $testId = 'permission.revoke_all_permissions_by_user.0'; + $this->client->permission->revokeAllPermissionsByUser( + 'user', + [ + 'headers' => [ + 'X-Test-Id' => 'permission.revoke_all_permissions_by_user.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/permission/revoke-all-from-user/user", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/PlanWireTest.php b/fern/sdk/tests/Wire/PlanWireTest.php new file mode 100644 index 00000000..31c414c2 --- /dev/null +++ b/fern/sdk/tests/Wire/PlanWireTest.php @@ -0,0 +1,46 @@ +client->plan->listPlans( + [ + 'headers' => [ + 'X-Test-Id' => 'plan.list_plans.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/plan", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/PriceWireTest.php b/fern/sdk/tests/Wire/PriceWireTest.php new file mode 100644 index 00000000..d01cb305 --- /dev/null +++ b/fern/sdk/tests/Wire/PriceWireTest.php @@ -0,0 +1,48 @@ +client->price->getPrice( + new GetPriceRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'price.get_price.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/price", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/RouterWireTest.php b/fern/sdk/tests/Wire/RouterWireTest.php new file mode 100644 index 00000000..cf927785 --- /dev/null +++ b/fern/sdk/tests/Wire/RouterWireTest.php @@ -0,0 +1,168 @@ +client->router->listRouters( + new ListRoutersRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'router.list_routers.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/router", + null, + 1 + ); + } + + /** + */ + public function testCreateRouter(): void { + $testId = 'router.create_router.0'; + $this->client->router->createRouter( + new RouterCreate([ + 'router' => new RouterCreateRouter([ + 'name' => 'Example router', + 'staticRoutes' => [ + new RouterCreateRouterStaticRoutesItem([ + 'name' => 'static-route-0', + 'nexthop' => '192.168.1.1', + 'route' => '0.0.0.0/0', + ]), + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'router.create_router.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/router", + null, + 1 + ); + } + + /** + */ + public function testGetRouter(): void { + $testId = 'router.get_router.0'; + $this->client->router->getRouter( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'router.get_router.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/router/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + public function testDeleteRouter(): void { + $testId = 'router.delete_router.0'; + $this->client->router->deleteRouter( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'router.delete_router.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/router/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + public function testModifyRouter(): void { + $testId = 'router.modify_router.0'; + $this->client->router->modifyRouter( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new RouterModify([ + 'routerModifyRouter' => new RouterModifyRouter([ + 'name' => 'Example router', + 'staticRoutes' => [ + new RouterModifyRouterStaticRoutesItem([ + 'name' => 'static-route-0', + 'nexthop' => '192.168.1.1', + 'route' => '0.0.0.0/0', + ]), + ], + 'labels' => [ + new RouterLabel([ + 'key' => 'service', + 'value' => 'postgres cluster connectivity', + ]), + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'router.modify_router.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/router/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/ServerGroupWireTest.php b/fern/sdk/tests/Wire/ServerGroupWireTest.php new file mode 100644 index 00000000..82fcf664 --- /dev/null +++ b/fern/sdk/tests/Wire/ServerGroupWireTest.php @@ -0,0 +1,249 @@ +client->serverGroup->listServerGroups( + new ListServerGroupsRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'server_group.list_server_groups.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server-group", + null, + 1 + ); + } + + /** + */ + public function testCreateServerGroup(): void { + $testId = 'server_group.create_server_group.0'; + $this->client->serverGroup->createServerGroup( + new ServerGroupModify([ + 'serverGroup' => new ServerGroupModifyServerGroup([ + 'title' => 'edge-cluster-a', + 'servers' => new ServerGroupServers([ + 'servers' => [ + '00fce2f9-f9f4-46ff-86af-9e60f131f5cb', + ], + ]), + 'labels' => new ServerGroupModifyServerGroupLabels([ + 'label' => [ + new ServerGroupLabel([ + 'key' => 'env', + 'value' => 'prod', + ]), + ], + ]), + 'antiAffinity' => ServerGroupAntiAffinity::Yes->value, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server_group.create_server_group.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server-group", + null, + 1 + ); + } + + /** + */ + public function testGetServerGroup(): void { + $testId = 'server_group.get_server_group.0'; + $this->client->serverGroup->getServerGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'server_group.get_server_group.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server-group/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + public function testDeleteServerGroup(): void { + $testId = 'server_group.delete_server_group.0'; + $this->client->serverGroup->deleteServerGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'server_group.delete_server_group.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/server-group/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + public function testModifyServerGroup(): void { + $testId = 'server_group.modify_server_group.0'; + $this->client->serverGroup->modifyServerGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyServerGroupRequest([ + 'body' => new ServerGroupModify([ + 'serverGroup' => new ServerGroupModifyServerGroup([ + 'title' => 'edge-cluster-a', + 'servers' => new ServerGroupServers([ + 'servers' => [ + '00fce2f9-f9f4-46ff-86af-9e60f131f5cb', + ], + ]), + 'labels' => new ServerGroupModifyServerGroupLabels([ + 'label' => [ + new ServerGroupLabel([ + 'key' => 'env', + 'value' => 'prod', + ]), + ], + ]), + 'antiAffinity' => ServerGroupAntiAffinity::Yes->value, + ]), + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server_group.modify_server_group.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PATCH", + "/1.3/server-group/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + public function testListServerGroupMembers(): void { + $testId = 'server_group.list_server_group_members.0'; + $this->client->serverGroup->listServerGroupMembers( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'server_group.list_server_group_members.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server-group/0414e0d7-4436-4037-9dd8-6eaf47dce599/servers", + null, + 1 + ); + } + + /** + */ + public function testAddServerToGroup(): void { + $testId = 'server_group.add_server_to_group.0'; + $this->client->serverGroup->addServerToGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerGroupServerAdd([ + 'server' => new ServerGroupServerAddServer([ + 'uuid' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server_group.add_server_to_group.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server-group/0414e0d7-4436-4037-9dd8-6eaf47dce599/servers", + null, + 1 + ); + } + + /** + */ + public function testRemoveServerFromGroup(): void { + $testId = 'server_group.remove_server_from_group.0'; + $this->client->serverGroup->removeServerFromGroup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'server_group.remove_server_from_group.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/server-group/0414e0d7-4436-4037-9dd8-6eaf47dce599/servers/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/ServerSizeWireTest.php b/fern/sdk/tests/Wire/ServerSizeWireTest.php new file mode 100644 index 00000000..a0978519 --- /dev/null +++ b/fern/sdk/tests/Wire/ServerSizeWireTest.php @@ -0,0 +1,66 @@ +client->serverSize->listServerSizes( + [ + 'headers' => [ + 'X-Test-Id' => 'server_size.list_server_sizes.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server_size", + null, + 1 + ); + } + + /** + */ + public function testGetServerSizeLimits(): void { + $testId = 'server_size.get_server_size_limits.0'; + $this->client->serverSize->getServerSizeLimits( + [ + 'headers' => [ + 'X-Test-Id' => 'server_size.get_server_size_limits.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server_size/limits", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/ServerWireTest.php b/fern/sdk/tests/Wire/ServerWireTest.php new file mode 100644 index 00000000..ff077411 --- /dev/null +++ b/fern/sdk/tests/Wire/ServerWireTest.php @@ -0,0 +1,1180 @@ +client->server->listServers( + new ListServersRequest([ + 'uuid' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 'host' => 7653311107, + 'tag' => 'prod,web', + 'limit' => 25, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.list_servers.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server", + ['uuid' => '0414e0d7-4436-4037-9dd8-6eaf47dce599', 'host' => '7653311107', 'tag' => 'prod,web', 'limit' => '25', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testCreateServer(): void { + $testId = 'server.create_server.0'; + $this->client->server->createServer( + new CreateServer([ + 'server' => new CreateServerServer([ + 'hostname' => 'my-server.example.com', + 'loginUser' => new ServerLoginUser([ + 'sshKeys' => new ServerLoginUserSshKeys([ + 'sshKey' => [ + 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO3t5AQcuv4+KxJ5rC75N8bW/e7eOq0k5Y2L7V1oH3Z5 user@example.com', + ], + ]), + 'username' => 'upclouduser', + ]), + 'networking' => new ServerCreateNetworking([ + 'interfaces' => new ServerCreateNetworkingInterfaces([ + 'interface' => [ + new ServerCreateNetworkingInterfacesInterfaceItem([ + 'ipAddresses' => new ServerCreateNetworkingInterfacesInterfaceItemIpAddresses([ + 'ipAddress' => [ + new ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem([ + 'family' => ServerIpFamily::IPv4->value, + ]), + ], + ]), + 'type' => ServerNetworkType::Public_->value, + ]), + new ServerCreateNetworkingInterfacesInterfaceItem([ + 'ipAddresses' => new ServerCreateNetworkingInterfacesInterfaceItemIpAddresses([ + 'ipAddress' => [ + new ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem([ + 'family' => ServerIpFamily::IPv4->value, + ]), + ], + ]), + 'type' => ServerNetworkType::Utility->value, + ]), + new ServerCreateNetworkingInterfacesInterfaceItem([ + 'ipAddresses' => new ServerCreateNetworkingInterfacesInterfaceItemIpAddresses([ + 'ipAddress' => [ + new ServerCreateNetworkingInterfacesInterfaceItemIpAddressesIpAddressItem([ + 'family' => ServerIpFamily::IPv4->value, + ]), + ], + ]), + 'network' => '03000000-0000-4000-8000-000000000000', + 'type' => ServerNetworkType::Private_->value, + ]), + ], + ]), + ]), + 'plan' => '1xCPU-1GB', + 'metadata' => ServerBooleanYesno::Yes->value, + 'storageDevices' => new ServerStorageDevices([ + 'storageDevice' => [ + new ServerStorageDevicesStorageDeviceItem([ + 'action' => ServerStorageDevicesStorageDeviceItemAction::Clone_->value, + 'size' => 30, + 'storage' => '01000000-0000-4000-8000-000020080100', + 'tier' => 'maxiops', + 'title' => 'Debian Trixie', + ]), + ], + ]), + 'title' => 'My Server', + 'zone' => 'fi-hel1', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.create_server.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server", + null, + 1 + ); + } + + /** + */ + public function testListFirewallRulesetRelationships(): void { + $testId = 'server.list_firewall_ruleset_relationships.0'; + $this->client->server->listFirewallRulesetRelationships( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'server.list_firewall_ruleset_relationships.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/firewall_ruleset_relationships/private/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + public function testGetLabels(): void { + $testId = 'server.get_labels.0'; + $this->client->server->getLabels( + [ + 'headers' => [ + 'X-Test-Id' => 'server.get_labels.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/labels", + null, + 1 + ); + } + + /** + */ + public function testGetServer(): void { + $testId = 'server.get_server.0'; + $this->client->server->getServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'server.get_server.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + public function testModifyServer(): void { + $testId = 'server.modify_server.0'; + $this->client->server->modifyServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyServer([ + 'server' => new ModifyServerServer([ + 'coreNumber' => 8, + 'memoryAmount' => 16384, + 'plan' => 'custom', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.modify_server.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + public function testDeleteServer(): void { + $testId = 'server.delete_server.0'; + $this->client->server->deleteServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new DeleteServerRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.delete_server.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + public function testAttachPrivateFirewallRuleset(): void { + $testId = 'server.attach_private_firewall_ruleset.0'; + $this->client->server->attachPrivateFirewallRuleset( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerAttachPrivateFirewallRuleset([ + 'firewallRuleset' => new ServerAttachPrivateFirewallRulesetFirewallRuleset([ + 'firewallRulesetUuid' => '190f56d8-4b3f-4a89-9e5f-320fbc3d17c8', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.attach_private_firewall_ruleset.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/attach_firewall_ruleset/private", + null, + 1 + ); + } + + /** + */ + public function testCancelServerOperation(): void { + $testId = 'server.cancel_server_operation.0'; + $this->client->server->cancelServerOperation( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'server.cancel_server_operation.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/cancel", + null, + 1 + ); + } + + /** + */ + public function testEjectCdrom(): void { + $testId = 'server.eject_cdrom.0'; + $this->client->server->ejectCdrom( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'server.eject_cdrom.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/cdrom/eject", + null, + 1 + ); + } + + /** + */ + public function testLoadCdrom(): void { + $testId = 'server.load_cdrom.0'; + $this->client->server->loadCdrom( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerLoadCdrom([ + 'storageDevice' => new ServerLoadCdromStorageDevice([ + 'storage' => '01000000-0000-4000-8000-000060010101', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.load_cdrom.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/cdrom/load", + null, + 1 + ); + } + + /** + */ + public function testDetachPrivateFirewallRuleset(): void { + $testId = 'server.detach_private_firewall_ruleset.0'; + $this->client->server->detachPrivateFirewallRuleset( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerDetachPrivateFirewallRuleset([ + 'firewallRuleset' => new ServerDetachPrivateFirewallRulesetFirewallRuleset([ + 'firewallRulesetUuid' => '190f56d8-4b3f-4a89-9e5f-320fbc3d17c8', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.detach_private_firewall_ruleset.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/detach_firewall_ruleset/private", + null, + 1 + ); + } + + /** + */ + public function testListFirewallRules(): void { + $testId = 'server.list_firewall_rules.0'; + $this->client->server->listFirewallRules( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'server.list_firewall_rules.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/firewall_rule", + null, + 1 + ); + } + + /** + */ + public function testCreateFirewallRule(): void { + $testId = 'server.create_firewall_rule.0'; + $this->client->server->createFirewallRule( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerCreateFirewallRule([ + 'firewallRule' => new ServerCreateFirewallRuleFirewallRule([ + 'action' => ServerCreateFirewallRuleFirewallRuleAction::Accept->value, + 'comment' => 'Allow SSH from the office network', + 'destinationPortEnd' => '22', + 'destinationPortStart' => '22', + 'direction' => ServerCreateFirewallRuleFirewallRuleDirection::In->value, + 'family' => ServerCreateFirewallRuleFirewallRuleFamily::IPv4->value, + 'position' => '1', + 'protocol' => ServerCreateFirewallRuleFirewallRuleProtocol::Tcp->value, + 'sourceAddressEnd' => '192.0.2.255', + 'sourceAddressStart' => '192.0.2.1', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.create_firewall_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/firewall_rule", + null, + 1 + ); + } + + /** + */ + public function testUpdateFirewallRules(): void { + $testId = 'server.update_firewall_rules.0'; + $this->client->server->updateFirewallRules( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerUpdateFirewallRules([ + 'firewallRules' => new ServerUpdateFirewallRulesFirewallRules([ + 'firewallRule' => [ + new ServerFirewallRuleItem([ + 'action' => ServerFirewallRuleItemAction::Accept->value, + 'comment' => 'Allow SSH', + 'destinationPortEnd' => '22', + 'destinationPortStart' => '22', + 'direction' => ServerFirewallRuleItemDirection::In->value, + 'family' => ServerFirewallRuleItemFamily::IPv4->value, + 'protocol' => ServerFirewallRuleItemProtocol::Tcp->value, + ]), + new ServerFirewallRuleItem([ + 'action' => ServerFirewallRuleItemAction::Drop->value, + 'direction' => ServerFirewallRuleItemDirection::In->value, + ]), + ], + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.update_firewall_rules.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/firewall_rule", + null, + 1 + ); + } + + /** + */ + public function testGetFirewallRule(): void { + $testId = 'server.get_firewall_rule.0'; + $this->client->server->getFirewallRule( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, + [ + 'headers' => [ + 'X-Test-Id' => 'server.get_firewall_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/firewall_rule/1", + null, + 1 + ); + } + + /** + */ + public function testDeleteFirewallRule(): void { + $testId = 'server.delete_firewall_rule.0'; + $this->client->server->deleteFirewallRule( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, + [ + 'headers' => [ + 'X-Test-Id' => 'server.delete_firewall_rule.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/firewall_rule/1", + null, + 1 + ); + } + + /** + */ + public function testListPrivateFirewallRulesetRelationships(): void { + $testId = 'server.list_private_firewall_ruleset_relationships.0'; + $this->client->server->listPrivateFirewallRulesetRelationships( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'server.list_private_firewall_ruleset_relationships.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/firewall_ruleset_relationships/private", + null, + 1 + ); + } + + /** + */ + public function testListServerGpUs(): void { + $testId = 'server.list_server_gp_us.0'; + $this->client->server->listServerGpUs( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'server.list_server_gp_us.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/gpus", + null, + 1 + ); + } + + /** + */ + public function testGetServerNetworking(): void { + $testId = 'server.get_server_networking.0'; + $this->client->server->getServerNetworking( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'server.get_server_networking.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/networking", + null, + 1 + ); + } + + /** + */ + public function testAddServerInterface(): void { + $testId = 'server.add_server_interface.0'; + $this->client->server->addServerInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerAddInterface([ + 'interface' => new ServerAddInterfaceInterface([ + 'ipAddresses' => new ServerAddInterfaceInterfaceIpAddresses([ + 'ipAddress' => [ + new ServerAddInterfaceInterfaceIpAddressesIpAddressItem([ + 'address' => '10.0.0.20', + 'dhcpProvided' => ServerBooleanYesno::Yes->value, + 'family' => ServerIpFamily::IPv4->value, + ]), + ], + ]), + 'network' => '0374ce47-4303-4490-987d-32dc96cfd79b', + 'sourceIpFiltering' => ServerBooleanYesno::Yes->value, + 'type' => ServerNetworkType::Private_->value, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.add_server_interface.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/networking/interface", + null, + 1 + ); + } + + /** + */ + public function testModifyServerInterface(): void { + $testId = 'server.modify_server_interface.0'; + $this->client->server->modifyServerInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, + new ServerModifyInterface([ + 'interface' => new ServerModifyInterfaceInterface([ + 'bootable' => ServerBooleanYesno::Yes->value, + 'index' => 5, + 'sourceIpFiltering' => ServerBooleanYesno::No->value, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.modify_server_interface.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/networking/interface/1", + null, + 1 + ); + } + + /** + */ + public function testDeleteServerInterface(): void { + $testId = 'server.delete_server_interface.0'; + $this->client->server->deleteServerInterface( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, + [ + 'headers' => [ + 'X-Test-Id' => 'server.delete_server_interface.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/networking/interface/1", + null, + 1 + ); + } + + /** + */ + public function testAddServerInterfaceIpAddress(): void { + $testId = 'server.add_server_interface_ip_address.0'; + $this->client->server->addServerInterfaceIpAddress( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, + new ServerAddIpAddress([ + 'ipAddress' => new ServerAddIpAddressIpAddress([ + 'address' => '10.0.0.30', + 'family' => ServerIpFamily::IPv4->value, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.add_server_interface_ip_address.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/networking/interface/1/ip_address", + null, + 1 + ); + } + + /** + */ + public function testDeleteServerInterfaceIpAddress(): void { + $testId = 'server.delete_server_interface_ip_address.0'; + $this->client->server->deleteServerInterfaceIpAddress( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + 1, + 'ip', + [ + 'headers' => [ + 'X-Test-Id' => 'server.delete_server_interface_ip_address.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/networking/interface/1/ip_address/ip", + null, + 1 + ); + } + + /** + */ + public function testRebuildServer(): void { + $testId = 'server.rebuild_server.0'; + $this->client->server->rebuildServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerRebuild([ + 'serverRebuild' => new ServerRebuildServerRebuild([ + 'cloneSource' => '01000000-0000-4000-8000-000020050100', + 'deleteDetachedDisk' => ServerLegacyBoolean::Yes->value, + 'detachDisk' => '0169b4f8-051c-4a86-9484-f5b798249949', + 'encrypted' => ServerLegacyBoolean::Yes->value, + 'loginUser' => new ServerRebuildServerRebuildLoginUser([ + 'createPassword' => ServerLegacyBoolean::No->value, + 'sshKeys' => new ServerRebuildServerRebuildLoginUserSshKeys([ + 'sshKey' => [ + 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEexamplekey user@example', + ], + ]), + 'username' => 'debian', + ]), + 'passwordDelivery' => ServerRebuildServerRebuildPasswordDelivery::None->value, + 'storageTitle' => 'Rebuilt system disk', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.rebuild_server.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/rebuild", + null, + 1 + ); + } + + /** + */ + public function testRelocateServer(): void { + $testId = 'server.relocate_server.0'; + $this->client->server->relocateServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new RelocateServer([ + 'zone' => 'fi-hel2', + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.relocate_server.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/relocate", + null, + 1 + ); + } + + /** + */ + public function testGetRemoteAccessDetails(): void { + $testId = 'server.get_remote_access_details.0'; + $this->client->server->getRemoteAccessDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'server.get_remote_access_details.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/remote_access_details", + null, + 1 + ); + } + + /** + */ + public function testRestartServer(): void { + $testId = 'server.restart_server.0'; + $this->client->server->restartServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new RestartServer([ + 'restartServer' => new RestartServerRestartServerStopType([ + 'stopType' => RestartServerRestartServerStopTypeStopType::Hard->value, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.restart_server.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/restart", + null, + 1 + ); + } + + /** + */ + public function testStartServer(): void { + $testId = 'server.start_server.0'; + $this->client->server->startServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new StartServer([ + 'server' => new StartServerServer([ + 'host' => 8055964291, + 'startType' => StartServerServerStartType::Sync->value, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.start_server.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/start", + null, + 1 + ); + } + + /** + */ + public function testGetCpuStats(): void { + $testId = 'server.get_cpu_stats.0'; + $this->client->server->getCpuStats( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'server.get_cpu_stats.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/stats/cpu", + null, + 1 + ); + } + + /** + */ + public function testGetCpuStatsByPeriod(): void { + $testId = 'server.get_cpu_stats_by_period.0'; + $this->client->server->getCpuStatsByPeriod( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ServerStatsPeriod::Daily->value, + [ + 'headers' => [ + 'X-Test-Id' => 'server.get_cpu_stats_by_period.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/stats/cpu/daily", + null, + 1 + ); + } + + /** + */ + public function testGetDiskStats(): void { + $testId = 'server.get_disk_stats.0'; + $this->client->server->getDiskStats( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + GetDiskStatsRequestType::Bytes->value, + [ + 'headers' => [ + 'X-Test-Id' => 'server.get_disk_stats.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/stats/disk/bytes", + null, + 1 + ); + } + + /** + */ + public function testGetDiskStatsByPeriod(): void { + $testId = 'server.get_disk_stats_by_period.0'; + $this->client->server->getDiskStatsByPeriod( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + GetDiskStatsByPeriodRequestType::Bytes->value, + ServerStatsPeriod::Daily->value, + [ + 'headers' => [ + 'X-Test-Id' => 'server.get_disk_stats_by_period.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/stats/disk/bytes/daily", + null, + 1 + ); + } + + /** + */ + public function testGetNetworkStats(): void { + $testId = 'server.get_network_stats.0'; + $this->client->server->getNetworkStats( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ServerStatsNetworkType::Bytes->value, + [ + 'headers' => [ + 'X-Test-Id' => 'server.get_network_stats.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/stats/network/bytes", + null, + 1 + ); + } + + /** + */ + public function testGetNetworkStatsByNetwork(): void { + $testId = 'server.get_network_stats_by_network.0'; + $this->client->server->getNetworkStatsByNetwork( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ServerStatsNetworkType::Bytes->value, + ServerNetworkType::Public_->value, + [ + 'headers' => [ + 'X-Test-Id' => 'server.get_network_stats_by_network.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/stats/network/bytes/public", + null, + 1 + ); + } + + /** + */ + public function testGetNetworkStatsByNetworkAndPeriod(): void { + $testId = 'server.get_network_stats_by_network_and_period.0'; + $this->client->server->getNetworkStatsByNetworkAndPeriod( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + ServerStatsNetworkType::Bytes->value, + ServerNetworkType::Public_->value, + ServerStatsPeriod::Daily->value, + [ + 'headers' => [ + 'X-Test-Id' => 'server.get_network_stats_by_network_and_period.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/stats/network/bytes/public/daily", + null, + 1 + ); + } + + /** + */ + public function testStopServer(): void { + $testId = 'server.stop_server.0'; + $this->client->server->stopServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new StopServer([ + 'stopServer' => new StopServerStopServer([ + 'stopType' => StopServerStopServerStopType::Soft->value, + 'timeout' => '60', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.stop_server.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/stop", + null, + 1 + ); + } + + /** + */ + public function testAttachStorageDevice(): void { + $testId = 'server.attach_storage_device.0'; + $this->client->server->attachStorageDevice( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerAttachStorage([ + 'storageDevice' => new ServerAttachStorageStorageDevice([ + 'address' => 'virtio:0', + 'bootDisk' => 1, + 'storage' => '012580a1-32a1-466e-a323-689ca16f2d43', + 'type' => ServerAttachStorageStorageDeviceType::Disk->value, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.attach_storage_device.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/storage/attach", + null, + 1 + ); + } + + /** + */ + public function testDetachStorageDevice(): void { + $testId = 'server.detach_storage_device.0'; + $this->client->server->detachStorageDevice( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ServerDetachStorage([ + 'storageDevice' => [ + 'address' => "virtio:0", + ], + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'server.detach_storage_device.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/storage/detach", + null, + 1 + ); + } + + /** + */ + public function testGetVncDetails(): void { + $testId = 'server.get_vnc_details.0'; + $this->client->server->getVncDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'server.get_vnc_details.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/server/0414e0d7-4436-4037-9dd8-6eaf47dce599/vnc_details", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/StorageWireTest.php b/fern/sdk/tests/Wire/StorageWireTest.php new file mode 100644 index 00000000..06b3a258 --- /dev/null +++ b/fern/sdk/tests/Wire/StorageWireTest.php @@ -0,0 +1,701 @@ +client->storage->getStorageList( + new GetStorageListRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'storage.get_storage_list.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/storage", + ['label' => 'environment', 'search' => 'database', 'limit' => '25', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testCreateStorage(): void { + $testId = 'storage.create_storage.0'; + $this->client->storage->createStorage( + new CreateStorageRequest([ + 'storage' => new CreateStorageRequestStorage([ + 'backupRule' => new StorageBackupRule([ + 'interval' => StorageBackupRuleInterval::Daily->value, + 'time' => '0400', + 'retention' => '7', + ]), + 'encrypted' => StorageEncrypted::Yes->value, + 'labels' => [ + new StorageLabel([ + 'key' => 'environment', + 'value' => 'production', + ]), + ], + 'size' => 50, + 'tier' => StorageTier::Maxiops->value, + 'title' => 'Block Storage 1', + 'zone' => 'fi-hel1', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'storage.create_storage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/storage", + null, + 1 + ); + } + + /** + */ + public function testGetStorageListByBackup(): void { + $testId = 'storage.get_storage_list_by_backup.0'; + $this->client->storage->getStorageListByBackup( + new GetStorageListByBackupRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'storage.get_storage_list_by_backup.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/storage/backup", + ['label' => 'environment', 'search' => 'database', 'limit' => '25', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testGetStorageListByCdrom(): void { + $testId = 'storage.get_storage_list_by_cdrom.0'; + $this->client->storage->getStorageListByCdrom( + new GetStorageListByCdromRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'storage.get_storage_list_by_cdrom.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/storage/cdrom", + ['label' => 'environment', 'search' => 'database', 'limit' => '25', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testGetFavoriteStorageList(): void { + $testId = 'storage.get_favorite_storage_list.0'; + $this->client->storage->getFavoriteStorageList( + [ + 'headers' => [ + 'X-Test-Id' => 'storage.get_favorite_storage_list.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/storage/favorite", + null, + 1 + ); + } + + /** + */ + public function testGetStorageListByNormal(): void { + $testId = 'storage.get_storage_list_by_normal.0'; + $this->client->storage->getStorageListByNormal( + new GetStorageListByNormalRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'storage.get_storage_list_by_normal.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/storage/normal", + ['label' => 'environment', 'search' => 'database', 'limit' => '25', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testGetStorageListByPrivateAccess(): void { + $testId = 'storage.get_storage_list_by_private_access.0'; + $this->client->storage->getStorageListByPrivateAccess( + new GetStorageListByPrivateAccessRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'storage.get_storage_list_by_private_access.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/storage/private", + ['label' => 'environment', 'search' => 'database', 'limit' => '25', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testGetStorageListByPublicAccess(): void { + $testId = 'storage.get_storage_list_by_public_access.0'; + $this->client->storage->getStorageListByPublicAccess( + new GetStorageListByPublicAccessRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'storage.get_storage_list_by_public_access.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/storage/public", + ['label' => 'environment', 'search' => 'database', 'limit' => '25', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testGetStorageListByTemplate(): void { + $testId = 'storage.get_storage_list_by_template.0'; + $this->client->storage->getStorageListByTemplate( + new GetStorageListByTemplateRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'storage.get_storage_list_by_template.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/storage/template", + ['label' => 'environment', 'search' => 'database', 'limit' => '25', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testGetStorageListByTypeAndAccess(): void { + $testId = 'storage.get_storage_list_by_type_and_access.0'; + $this->client->storage->getStorageListByTypeAndAccess( + StorageType::Normal->value, + StorageAccessFilter::Public_->value, + new GetStorageListByTypeAndAccessRequest([ + 'label' => 'environment', + 'search' => 'database', + 'limit' => 25, + 'offset' => 0, + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'storage.get_storage_list_by_type_and_access.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/storage/normal/public", + ['label' => 'environment', 'search' => 'database', 'limit' => '25', 'offset' => '0'], + 1 + ); + } + + /** + */ + public function testGetStorageInfo(): void { + $testId = 'storage.get_storage_info.0'; + $this->client->storage->getStorageInfo( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'storage.get_storage_info.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/storage/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + public function testModifyStorage(): void { + $testId = 'storage.modify_storage.0'; + $this->client->storage->modifyStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new ModifyStorageBody([ + 'storage' => new ModifyStorageBodyStorage([ + 'size' => 100, + 'title' => 'Production data expanded', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'storage.modify_storage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/storage/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + public function testDeleteStorage(): void { + $testId = 'storage.delete_storage.0'; + $this->client->storage->deleteStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new DeleteStorageRequest([]), + [ + 'headers' => [ + 'X-Test-Id' => 'storage.delete_storage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/storage/0414e0d7-4436-4037-9dd8-6eaf47dce599", + null, + 1 + ); + } + + /** + */ + public function testAttachStorageToServer(): void { + $testId = 'storage.attach_storage_to_server.0'; + $this->client->storage->attachStorageToServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new AttachStorageRequest([ + 'storageDevice' => new AttachStorageRequestStorageDevice([ + 'server' => '00798b85-efdc-41ca-8021-f6ef457b8531', + 'type' => AttachStorageRequestStorageDeviceType::Disk->value, + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'storage.attach_storage_to_server.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/storage/0414e0d7-4436-4037-9dd8-6eaf47dce599/attach", + null, + 1 + ); + } + + /** + */ + public function testCreateOnDemandBackup(): void { + $testId = 'storage.create_on_demand_backup.0'; + $this->client->storage->createOnDemandBackup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CreateStorageBackupRequest([ + 'storage' => new CreateStorageBackupRequestStorage([ + 'title' => 'Manually created backup', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'storage.create_on_demand_backup.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/storage/0414e0d7-4436-4037-9dd8-6eaf47dce599/backup", + null, + 1 + ); + } + + /** + */ + public function testCancelStorageOperation(): void { + $testId = 'storage.cancel_storage_operation.0'; + $this->client->storage->cancelStorageOperation( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'storage.cancel_storage_operation.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/storage/0414e0d7-4436-4037-9dd8-6eaf47dce599/cancel", + null, + 1 + ); + } + + /** + */ + public function testCloneStorage(): void { + $testId = 'storage.clone_storage.0'; + $this->client->storage->cloneStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CloneStorageRequest([ + 'storage' => new CloneStorageRequestStorage([ + 'encrypted' => StorageEncrypted::Yes->value, + 'tier' => StorageTier::Maxiops->value, + 'title' => 'Cloned Block Storage', + 'zone' => 'fi-hel1', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'storage.clone_storage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/storage/0414e0d7-4436-4037-9dd8-6eaf47dce599/clone", + null, + 1 + ); + } + + /** + */ + public function testDetachStorageFromServer(): void { + $testId = 'storage.detach_storage_from_server.0'; + $this->client->storage->detachStorageFromServer( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'storage.detach_storage_from_server.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/storage/0414e0d7-4436-4037-9dd8-6eaf47dce599/detach", + null, + 1 + ); + } + + /** + */ + public function testAddStorageToFavorites(): void { + $testId = 'storage.add_storage_to_favorites.0'; + $this->client->storage->addStorageToFavorites( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'storage.add_storage_to_favorites.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/storage/0414e0d7-4436-4037-9dd8-6eaf47dce599/favorite", + null, + 1 + ); + } + + /** + */ + public function testRemoveStorageFromFavorites(): void { + $testId = 'storage.remove_storage_from_favorites.0'; + $this->client->storage->removeStorageFromFavorites( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'storage.remove_storage_from_favorites.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/storage/0414e0d7-4436-4037-9dd8-6eaf47dce599/favorite", + null, + 1 + ); + } + + /** + */ + public function testGetStorageImportDetails(): void { + $testId = 'storage.get_storage_import_details.0'; + $this->client->storage->getStorageImportDetails( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'storage.get_storage_import_details.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/storage/0414e0d7-4436-4037-9dd8-6eaf47dce599/import", + null, + 1 + ); + } + + /** + */ + public function testCreateStorageImport(): void { + $testId = 'storage.create_storage_import.0'; + $this->client->storage->createStorageImport( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CreateStorageImportRequest([ + 'storageImport' => new CreateStorageImportRequestStorageImport([ + 'source' => CreateStorageImportRequestStorageImportSource::HttpImport->value, + 'sourceLocation' => 'https://example.com/disk.raw', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'storage.create_storage_import.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/storage/0414e0d7-4436-4037-9dd8-6eaf47dce599/import", + null, + 1 + ); + } + + /** + */ + public function testCancelStorageImport(): void { + $testId = 'storage.cancel_storage_import.0'; + $this->client->storage->cancelStorageImport( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'storage.cancel_storage_import.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/storage/0414e0d7-4436-4037-9dd8-6eaf47dce599/import/cancel", + null, + 1 + ); + } + + /** + */ + public function testResizeStorage(): void { + $testId = 'storage.resize_storage.0'; + $this->client->storage->resizeStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'storage.resize_storage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/storage/0414e0d7-4436-4037-9dd8-6eaf47dce599/resize", + null, + 1 + ); + } + + /** + */ + public function testRestoreStorageFromBackup(): void { + $testId = 'storage.restore_storage_from_backup.0'; + $this->client->storage->restoreStorageFromBackup( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + [ + 'headers' => [ + 'X-Test-Id' => 'storage.restore_storage_from_backup.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/storage/0414e0d7-4436-4037-9dd8-6eaf47dce599/restore", + null, + 1 + ); + } + + /** + */ + public function testCreateTemplateFromStorage(): void { + $testId = 'storage.create_template_from_storage.0'; + $this->client->storage->createTemplateFromStorage( + '0414e0d7-4436-4037-9dd8-6eaf47dce599', + new CreateStorageTemplateRequest([ + 'storage' => new CreateStorageTemplateRequestStorage([ + 'title' => 'My server template', + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'storage.create_template_from_storage.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/storage/0414e0d7-4436-4037-9dd8-6eaf47dce599/templatize", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/TagWireTest.php b/fern/sdk/tests/Wire/TagWireTest.php new file mode 100644 index 00000000..14763fa4 --- /dev/null +++ b/fern/sdk/tests/Wire/TagWireTest.php @@ -0,0 +1,157 @@ +client->tag->listTags( + [ + 'headers' => [ + 'X-Test-Id' => 'tag.list_tags.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/tag", + null, + 1 + ); + } + + /** + */ + public function testCreateTag(): void { + $testId = 'tag.create_tag.0'; + $this->client->tag->createTag( + new Tag([ + 'tag' => new TagTag([ + 'description' => 'Production servers', + 'name' => 'PROD', + 'servers' => new TagServers([ + 'server' => [ + '0077fa3d-32db-4b09-9f5f-30d9e9afb565', + ], + ]), + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'tag.create_tag.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/1.3/tag", + null, + 1 + ); + } + + /** + */ + public function testGetTag(): void { + $testId = 'tag.get_tag.0'; + $this->client->tag->getTag( + 'DEV', + [ + 'headers' => [ + 'X-Test-Id' => 'tag.get_tag.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/tag/DEV", + null, + 1 + ); + } + + /** + */ + public function testModifyTag(): void { + $testId = 'tag.modify_tag.0'; + $this->client->tag->modifyTag( + 'DEV', + new ModifyTagRequest([ + 'body' => new Tag([ + 'tag' => new TagTag([ + 'description' => 'Production servers', + 'name' => 'PROD', + 'servers' => new TagServers([ + 'server' => [ + '0077fa3d-32db-4b09-9f5f-30d9e9afb565', + ], + ]), + ]), + ]), + ]), + [ + 'headers' => [ + 'X-Test-Id' => 'tag.modify_tag.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "PUT", + "/1.3/tag/DEV", + null, + 1 + ); + } + + /** + */ + public function testDeleteTag(): void { + $testId = 'tag.delete_tag.0'; + $this->client->tag->deleteTag( + 'DEV', + [ + 'headers' => [ + 'X-Test-Id' => 'tag.delete_tag.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "DELETE", + "/1.3/tag/DEV", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/TimezoneWireTest.php b/fern/sdk/tests/Wire/TimezoneWireTest.php new file mode 100644 index 00000000..91b1661b --- /dev/null +++ b/fern/sdk/tests/Wire/TimezoneWireTest.php @@ -0,0 +1,46 @@ +client->timezone->listTimezones( + [ + 'headers' => [ + 'X-Test-Id' => 'timezone.list_timezones.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/timezone", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/VncKeymapWireTest.php b/fern/sdk/tests/Wire/VncKeymapWireTest.php new file mode 100644 index 00000000..cdccbe9b --- /dev/null +++ b/fern/sdk/tests/Wire/VncKeymapWireTest.php @@ -0,0 +1,46 @@ +client->vncKeymap->listVncKeymaps( + [ + 'headers' => [ + 'X-Test-Id' => 'vnc_keymap.list_vnc_keymaps.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/vnc_keymap", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/tests/Wire/WireMockTestCase.php b/fern/sdk/tests/Wire/WireMockTestCase.php new file mode 100644 index 00000000..4d835f1e --- /dev/null +++ b/fern/sdk/tests/Wire/WireMockTestCase.php @@ -0,0 +1,106 @@ +&1', + escapeshellarg(self::$dockerComposeFile) + ); + exec($cmd, $output, $exitCode); + if ($exitCode !== 0) { + throw new \RuntimeException("Failed to start WireMock: " . implode("\n", $output)); + } + echo "WireMock container is ready\n"; + } + + public static function tearDownAfterClass(): void + { + if (!isset(self::$dockerComposeFile)) { + return; + } + echo "\nStopping WireMock container...\n"; + $cmd = sprintf( + 'docker compose -f %s down -v 2>&1', + escapeshellarg(self::$dockerComposeFile) + ); + exec($cmd); + } + + /** + * Verifies the number of requests made to WireMock filtered by test ID for concurrency safety. + * + * @param string $testId The test ID used to filter requests + * @param string $method The HTTP method (GET, POST, etc.) + * @param string $urlPath The URL path to match + * @param array|null $queryParams Query parameters to match + * @param int $expected Expected number of requests + */ + protected function verifyRequestCount( + string $testId, + string $method, + string $urlPath, + ?array $queryParams, + int $expected + ): void { + $client = new HttpClient(); + $body = [ + 'method' => $method, + 'urlPath' => $urlPath, + 'headers' => [ + 'X-Test-Id' => ['equalTo' => $testId], + ], + ]; + if ($queryParams !== null && $queryParams !== []) { + $body['queryParameters'] = []; + foreach ($queryParams as $k => $v) { + $body['queryParameters'][$k] = ['equalTo' => (string) $v]; + } + } + + $response = $client->post('http://localhost:8080/__admin/requests/find', [ + 'json' => $body, + ]); + + $this->assertSame(200, $response->getStatusCode(), 'Failed to query WireMock requests'); + + $json = json_decode((string) $response->getBody(), true); + + // Ensure we have an array; otherwise, fail the test. + if (!is_array($json)) { + $this->fail('Expected WireMock to return a JSON object.'); + } + + /** @var array $json */ + $requests = []; + if (isset($json['requests']) && is_array($json['requests'])) { + $requests = $json['requests']; + } + + /** @var array $requests */ + $this->assertCount( + $expected, + $requests, + sprintf('Expected %d requests, found %d', $expected, count($requests)) + ); + } +} diff --git a/fern/sdk/tests/Wire/ZoneWireTest.php b/fern/sdk/tests/Wire/ZoneWireTest.php new file mode 100644 index 00000000..7334a59e --- /dev/null +++ b/fern/sdk/tests/Wire/ZoneWireTest.php @@ -0,0 +1,67 @@ +client->zone->listZones( + [ + 'headers' => [ + 'X-Test-Id' => 'zone.list_zones.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/zone", + null, + 1 + ); + } + + /** + */ + public function testListZoneVlaNs(): void { + $testId = 'zone.list_zone_vla_ns.0'; + $this->client->zone->listZoneVlaNs( + 'fi-hel1', + [ + 'headers' => [ + 'X-Test-Id' => 'zone.list_zone_vla_ns.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "GET", + "/1.3/zone/fi-hel1/vlans", + null, + 1 + ); + } + + /** + */ + protected function setUp(): void { + parent::setUp(); + $this->client = new UpcloudClient( + token: 'test-token', + options: [ + 'baseUrl' => 'http://localhost:8080', + ], + ); + } +} diff --git a/fern/sdk/wiremock/docker-compose.test.yml b/fern/sdk/wiremock/docker-compose.test.yml new file mode 100644 index 00000000..f80c6b0a --- /dev/null +++ b/fern/sdk/wiremock/docker-compose.test.yml @@ -0,0 +1,14 @@ +services: + wiremock: + image: wiremock/wiremock:3.9.1 + ports: + - "8080:8080" + volumes: + - ./wiremock-mappings.json:/home/wiremock/mappings/wiremock-mappings.json + command: ["--global-response-templating", "--verbose"] + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080/__admin/health"] + interval: 2s + timeout: 5s + retries: 15 + start_period: 5s diff --git a/fern/sdk/wiremock/wiremock-mappings.json b/fern/sdk/wiremock/wiremock-mappings.json new file mode 100644 index 00000000..2461bc01 --- /dev/null +++ b/fern/sdk/wiremock/wiremock-mappings.json @@ -0,0 +1,15445 @@ +{ + "mappings": [ + { + "id": "03a50443-67a0-46ed-a616-1179f37988c9", + "name": "Account details - default", + "request": { + "urlPathTemplate": "/1.3/account", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"account\": {\n \"resource_limits\": {\n \"managed_databases\": 5,\n \"network_peerings\": 20,\n \"file_storages\": 10,\n \"managed_container_registries\": 1000000,\n \"managed_kubernetes\": 5,\n \"tags\": 200,\n \"cores\": 64,\n \"cloud_server_dev_1xcpu_1gb_10gb_plans\": 0,\n \"cloud_server_dev_1xcpu_1gb_plans\": 0,\n \"storage_hdd\": 10240,\n \"networks\": 100,\n \"network_gateways_essentials\": 20,\n \"network_gateways\": 20,\n \"storage_ssd\": 20480,\n \"load_balancers_essentials\": 20,\n \"load_balancers\": 20,\n \"gpus\": 8,\n \"detached_interfaces\": 100,\n \"detached_floating_ips\": 50,\n \"managed_object_storages\": 50,\n \"memory\": 524288,\n \"ntp_excess_gib\": 100,\n \"public_ipv4\": 64,\n \"public_ipv6\": 64,\n \"routers\": 20,\n \"storage_maxiops\": 10240,\n \"storage_standard\": 20480,\n \"storage_total\": 40960,\n \"type\": {\n \"key\": \"value\"\n },\n \"required\": {\n \"key\": \"value\"\n },\n \"additionalProperties\": {\n \"key\": \"value\"\n }\n },\n \"username\": \"apiuser01\",\n \"credits\": 125,\n \"credits_breakdown\": {\n \"account_credits\": {\n \"debt_credits\": 0,\n \"max_debt\": 0,\n \"paid_credits\": 25\n },\n \"account_free_credits\": {\n \"breakdown\": [\n {\n \"free_credit_type\": \"other\",\n \"free_credits\": 100,\n \"free_credits_expire\": \"2027-08-11T11:00:41Z\"\n }\n ]\n },\n \"total_credits\": 125\n },\n \"trial_mode\": 1000000\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "03a50443-67a0-46ed-a616-1179f37988c9", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "26b49678-14f2-4a0c-b769-16fc0baf621e", + "name": "Get monthly billing summary with resource details - default", + "request": { + "urlPathTemplate": "/1.3/account/billing/summary/{year}-{month}", + "method": "GET", + "pathParameters": { + "year": { + "equalTo": "year" + }, + "month": { + "equalTo": "month" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"currency\": \"EUR\",\n \"total_amount\": 53.34964,\n \"managed_databases\": {\n \"managed_database\": {\n \"resources\": [\n {\n \"amount\": 15.10223,\n \"details\": [\n {\n \"amount\": 15.10223,\n \"hours\": 420,\n \"plan\": \"1x1xCPU-2GB-25GB\",\n \"zone\": \"fi-hel2\"\n }\n ],\n \"hours\": 420,\n \"resource_id\": \"09001a4d-b525-4ab8-835d-000000000000\"\n }\n ],\n \"total_amount\": 15.10223\n },\n \"total_amount\": 15.10223\n },\n \"managed_object_storages\": {\n \"managed_object_storage\": {\n \"resources\": [\n {\n \"amount\": 5.03384,\n \"details\": [\n {\n \"amount\": 5.03384,\n \"billable_size_gib\": 500,\n \"hours\": 420,\n \"zone\": \"fi-hel2\"\n }\n ],\n \"hours\": 420,\n \"resource_id\": \"127ee42a-8304-477c-84e1-000000000000\"\n }\n ],\n \"total_amount\": 5.03384\n },\n \"total_amount\": 5.03384\n },\n \"servers\": {\n \"server\": {\n \"resources\": [\n {\n \"amount\": 16.18091,\n \"details\": [\n {\n \"amount\": 16.18091,\n \"hours\": 420,\n \"labels\": [\n {\n \"key\": \"test\",\n \"value\": \"\"\n }\n ],\n \"plan\": \"2xCPU-4GB\",\n \"zone\": \"fi-hel2\"\n }\n ],\n \"hours\": 420,\n \"resource_id\": \"001c2caa-00dc-4eff-9321-000000000000\"\n },\n {\n \"amount\": 16.10386,\n \"details\": [\n {\n \"amount\": 16.10386,\n \"hours\": 418,\n \"labels\": [\n {\n \"key\": \"test2\",\n \"value\": \"\"\n }\n ],\n \"plan\": \"2xCPU-4GB\",\n \"zone\": \"fi-hel2\"\n },\n {\n \"amount\": 0.9288,\n \"hours\": 12,\n \"labels\": [\n {\n \"key\": \"test2\",\n \"value\": \"\"\n }\n ],\n \"plan\": \"4xCPU-8GB\",\n \"zone\": \"fi-hel2\"\n }\n ],\n \"hours\": 430,\n \"resource_id\": \"0010cf04-3608-4512-b4de-000000000000\"\n }\n ],\n \"total_amount\": 33.21357\n },\n \"total_amount\": 33.21357\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "26b49678-14f2-4a0c-b769-16fc0baf621e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "712350e0-962a-4cba-a94f-cfe1fa808650", + "name": "Get monthly billing summary - default", + "request": { + "urlPathTemplate": "/1.3/account/billing_summary/{year}-{month}", + "method": "GET", + "pathParameters": { + "year": { + "equalTo": "year" + }, + "month": { + "equalTo": "month" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"billing\": {\n \"currency\": \"EUR\",\n \"total_amount\": 166.16629,\n \"networks\": {\n \"bandwidth\": {\n \"total_amount\": 52.136\n },\n \"total_amount\": 52.136\n },\n \"managed_databases\": {\n \"managed_database\": {\n \"total_amount\": 80.13127\n },\n \"total_amount\": 80.13127\n },\n \"managed_object_storages\": {\n \"managed_object_storage\": {\n \"total_amount\": 2.2253\n },\n \"total_amount\": 2.2253\n },\n \"servers\": {\n \"server\": {\n \"total_amount\": 28.05132\n },\n \"total_amount\": 28.05132\n },\n \"storages\": {\n \"storage\": {\n \"total_amount\": 3.6224\n },\n \"total_amount\": 3.6224\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "712350e0-962a-4cba-a94f-cfe1fa808650", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "988c4fbe-deec-43a8-a4f2-7d8f296d920e", + "name": "Get current network usage - default", + "request": { + "urlPathTemplate": "/1.3/account/current_network_usage", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"stats\": {\n \"current_network_usage\": {\n \"updated\": \"2020-10-15T07:00:00Z\",\n \"accumulated_quota_bytes\": 3546328504778,\n \"total_sent_bytes\": 13682943146,\n \"hourly_quota_increase_bytes\": 10577635230,\n \"projected_monthly_quota_bytes\": 7777382596778\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "988c4fbe-deec-43a8-a4f2-7d8f296d920e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "5fc89ba9-0e73-4aa7-aec4-df209c3cc1af", + "name": "List accounts - default", + "request": { + "urlPathTemplate": "/1.3/account/list", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"accounts\": {\n \"account\": [\n {\n \"type\": \"main\",\n \"username\": \"test\",\n \"roles\": {\n \"role\": [\n \"technical\"\n ]\n },\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ]\n },\n {\n \"type\": \"sub\",\n \"username\": \"my_sub_account\",\n \"roles\": {\n \"role\": [\n \"technical\"\n ]\n },\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ]\n },\n {\n \"type\": \"sub\",\n \"username\": \"my_temp_account\",\n \"roles\": {\n \"role\": [\n \"role\"\n ]\n },\n \"labels\": [\n {\n \"key\": \"to_be_removed\",\n \"value\": \"after 2022-31-12\"\n }\n ]\n },\n {\n \"type\": \"sub\",\n \"username\": \"my_billing_account\",\n \"roles\": {\n \"role\": [\n \"billing\"\n ]\n },\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ]\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5fc89ba9-0e73-4aa7-aec4-df209c3cc1af", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "3aeb995a-6bcc-47b7-b7d4-5bac425054f0", + "name": "Create Microsoft LMA signing link - default", + "request": { + "urlPathTemplate": "/1.3/account/ms_lma", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"signing_status\": {\n \"id\": \"mslma_1234567890\",\n \"initiated\": \"2026-07-29T11:00:00Z\",\n \"signed_at\": \"2026-07-29T11:05:00Z\",\n \"signing_link\": \"https://example.com/sign/mslma_1234567890\",\n \"state\": \"completed\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "3aeb995a-6bcc-47b7-b7d4-5bac425054f0", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "206b527e-bd0f-44df-8547-a8e0abf673ec", + "name": "Get top network usage - default", + "request": { + "urlPathTemplate": "/1.3/account/network_top_usage", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"stats\": {\n \"stat\": [\n {\n \"resource_id\": \"00777436-a6f8-43af-9daf-89e8e6833a7a\",\n \"service\": \"server_public\",\n \"zone\": \"de-fra1\",\n \"start_time\": \"2020-09-07T00:00:00Z\",\n \"sent_bytes\": 10094\n },\n {\n \"resource_id\": \"00777436-a6f8-43af-9daf-89e8e6833a7a\",\n \"service\": \"server_public\",\n \"zone\": \"de-fra1\",\n \"start_time\": \"2020-09-08T00:00:00Z\",\n \"sent_bytes\": 35174050\n },\n {\n \"resource_id\": \"00777436-a6f8-43af-9daf-89e8e6833a7a\",\n \"service\": \"server_public\",\n \"zone\": \"de-fra1\",\n \"start_time\": \"2020-09-09T00:00:00Z\",\n \"sent_bytes\": 32790622\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "206b527e-bd0f-44df-8547-a8e0abf673ec", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "22629b34-c31a-4094-ab2d-6261e4845249", + "name": "Get network transfer statistics - default", + "request": { + "urlPathTemplate": "/1.3/account/network_usage", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"stats\": {\n \"stat\": [\n {\n \"start_time\": \"2020-09-30T22:00:00Z\",\n \"sent_bytes\": 1254,\n \"total_sent_bytes\": 225149331390,\n \"accumulated_quota_bytes\": 6352371508013,\n \"projected_monthly_quota_bytes\": 6362243967561,\n \"quota_increase_bytes\": 9872459548\n },\n {\n \"start_time\": \"2020-09-30T23:00:00Z\",\n \"sent_bytes\": 1254,\n \"total_sent_bytes\": 225149332644,\n \"accumulated_quota_bytes\": 6362243967561,\n \"projected_monthly_quota_bytes\": 6362243967561,\n \"quota_increase_bytes\": 9872459548\n },\n {\n \"start_time\": \"2020-10-01T00:00:00Z\",\n \"sent_bytes\": 906,\n \"total_sent_bytes\": 906,\n \"accumulated_quota_bytes\": 9872459548,\n \"projected_monthly_quota_bytes\": 7345109903712,\n \"quota_increase_bytes\": 9872459548\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "22629b34-c31a-4094-ab2d-6261e4845249", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "97a2d30e-3ced-41cd-b314-23e4a66ba721", + "name": "Get resource usage - default", + "request": { + "urlPathTemplate": "/1.3/account/resource-usage", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"key\": 1\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "97a2d30e-3ced-41cd-b314-23e4a66ba721", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "ef1e6191-2a33-48f8-b4b8-53c6188001ee", + "name": "Get monthly resource billing summary - default", + "request": { + "urlPathTemplate": "/1.3/account/resource_billing_summary/{resource_id}/{year}-{month}", + "method": "GET", + "pathParameters": { + "resource_id": { + "equalTo": "resource_id" + }, + "year": { + "equalTo": "year" + }, + "month": { + "equalTo": "month" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"billing\": {\n \"currency\": \"currency\",\n \"daily_sums\": {\n \"2019-12-02\": 3.33684,\n \"2019-12-03\": 52.77344,\n \"2019-12-04\": 1.07424,\n \"2019-12-05\": 1.07424,\n \"2019-12-06\": 1.07424,\n \"2019-12-07\": 1.07424,\n \"2019-12-08\": 1.07424,\n \"2019-12-09\": 1.07424,\n \"2019-12-12\": 3.22272,\n \"2019-12-13\": 0.58188\n },\n \"details\": {\n \"hours\": 792,\n \"plan\": \"1xCPU-1GB\",\n \"resource_id\": \"00ce9363-9065-4c2a-9d66-3b0c762f556b\",\n \"title\": \"My Glorious Server\",\n \"type\": \"server\",\n \"zone\": \"fi-hel1\"\n },\n \"total_amount\": 66.36032\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ef1e6191-2a33-48f8-b4b8-53c6188001ee", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d90c7906-46d1-4148-a5b4-7a1915c1d29d", + "name": "Get resource transfer statistics - default", + "request": { + "urlPathTemplate": "/1.3/account/resource_network_usage", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"stats\": {\n \"stat\": [\n {\n \"resource_id\": \"00777436-a6f8-43af-9daf-89e8e6833a7a\",\n \"service\": \"server_public\",\n \"zone\": \"de-fra1\",\n \"start_time\": \"2020-09-07T00:00:00Z\",\n \"sent_bytes\": 10094\n },\n {\n \"resource_id\": \"00777436-a6f8-43af-9daf-89e8e6833a7a\",\n \"service\": \"server_public\",\n \"zone\": \"de-fra1\",\n \"start_time\": \"2020-09-08T00:00:00Z\",\n \"sent_bytes\": 35174050\n },\n {\n \"resource_id\": \"00777436-a6f8-43af-9daf-89e8e6833a7a\",\n \"service\": \"server_public\",\n \"zone\": \"de-fra1\",\n \"start_time\": \"2020-09-09T00:00:00Z\",\n \"sent_bytes\": 32790622\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d90c7906-46d1-4148-a5b4-7a1915c1d29d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "75e1789d-391e-47ad-a1f6-694fbd353630", + "name": "Create subaccount - default", + "request": { + "urlPathTemplate": "/1.3/account/sub", + "method": "POST" + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "75e1789d-391e-47ad-a1f6-694fbd353630", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "c0bcaca1-f900-4d40-90f2-21389f0b2dbe", + "name": "Delete subaccount - default", + "request": { + "urlPathTemplate": "/1.3/account/sub/{username}", + "method": "DELETE", + "pathParameters": { + "username": { + "equalTo": "username" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "c0bcaca1-f900-4d40-90f2-21389f0b2dbe", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ccef7c2b-7025-4a7d-ba92-2ba1e679e916", + "name": "List clusters - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"control_plane_ip_filter\": [\n \"1.2.3.4/24\",\n \"1.1.1.1\"\n ],\n \"name\": \"example-cluster\",\n \"network\": \"33333333-3333-3333-333333333333\",\n \"network_cidr\": \"172.16.0.0/24\",\n \"storage_encryption\": \"data-at-rest\",\n \"node_groups\": [\n {\n \"count\": 4,\n \"kubelet_args\": [\n {\n \"key\": \"log-flush-frequency\",\n \"value\": \"5s\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"managedBy\",\n \"value\": \"exampleDevelopmentTeam\"\n },\n {\n \"key\": \"environment\",\n \"value\": \"development\"\n }\n ],\n \"name\": \"small\",\n \"plan\": \"K8S-2xCPU-4GB\",\n \"ssh_keys\": [\n \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV\"\n ],\n \"state\": \"running\",\n \"storage\": \"01000000-0000-4000-8000-000160010100\",\n \"taints\": [\n {\n \"effect\": \"NoSchedule\",\n \"key\": \"environment\",\n \"value\": \"development\"\n }\n ],\n \"node_updates\": {\n \"kubernetes_patches\": true,\n \"schedule_dow\": \"Monday\",\n \"schedule_time\": \"06:00\"\n }\n },\n {\n \"count\": 8,\n \"kubelet_args\": [\n {\n \"key\": \"log-flush-frequency\",\n \"value\": \"15s\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"managedBy\",\n \"value\": \"exampleStagingTeam\"\n },\n {\n \"key\": \"environment\",\n \"value\": \"staging\"\n }\n ],\n \"name\": \"medium\",\n \"plan\": \"K8S-4xCPU-8GB\",\n \"ssh_keys\": [\n \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV\"\n ],\n \"state\": \"pending\",\n \"storage\": \"01000000-0000-4000-8000-000160010100\",\n \"taints\": [\n {\n \"effect\": \"NoSchedule\",\n \"key\": \"environment\",\n \"value\": \"staging\"\n }\n ],\n \"node_updates\": {\n \"kubernetes_patches\": true,\n \"schedule_dow\": \"Monday\",\n \"schedule_time\": \"06:00\"\n }\n }\n ],\n \"state\": \"running\",\n \"uuid\": \"11111111-1111-1111-1111-111111111111\",\n \"zone\": \"de-fra1\",\n \"plan\": \"development\",\n \"private_node_groups\": true,\n \"version\": \"version\",\n \"authentication\": [\n {\n \"name\": \"name\",\n \"issuer_url\": \"https://accounts.myoidcprovider.com\",\n \"discovery_url\": \"https://accounts.myoidcprovider.com/.well-known/openid-configuration\",\n \"audiences\": [\n \"client-id-123\"\n ],\n \"user_validation_rules\": [\n {\n \"expression\": \"!user.username.startsWith('system:')\",\n \"message\": \"Username must not start with the system: prefix.\"\n }\n ]\n }\n ],\n \"labels\": {\n \"key\": \"value\"\n }\n },\n {\n \"control_plane_ip_filter\": [\n \"control_plane_ip_filter\"\n ],\n \"name\": \"another-example-cluster\",\n \"network\": \"another33333333-3333-3333-333333333333\",\n \"network_cidr\": \"172.16.0.0/24\",\n \"storage_encryption\": \"data-at-rest\",\n \"node_groups\": [\n {\n \"count\": 4,\n \"name\": \"large\",\n \"plan\": \"K8S-8xCPU-32GB\",\n \"ssh_keys\": [\n \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV\"\n ],\n \"state\": \"running\",\n \"storage\": \"01000000-0000-4000-8000-000160010100\",\n \"node_updates\": {\n \"kubernetes_patches\": true,\n \"schedule_dow\": \"Monday\",\n \"schedule_time\": \"06:00\"\n }\n }\n ],\n \"state\": \"pending\",\n \"uuid\": \"22222222-2222-2222-2222-222222222222\",\n \"zone\": \"de-fra1\",\n \"plan\": \"development\",\n \"private_node_groups\": true,\n \"version\": \"version\",\n \"authentication\": [\n {\n \"name\": \"name\",\n \"issuer_url\": \"https://accounts.myoidcprovider.com\",\n \"discovery_url\": \"https://accounts.myoidcprovider.com/.well-known/openid-configuration\",\n \"audiences\": [\n \"client-id-123\"\n ],\n \"user_validation_rules\": [\n {\n \"expression\": \"!user.username.startsWith('system:')\",\n \"message\": \"Username must not start with the system: prefix.\"\n }\n ]\n }\n ],\n \"labels\": {\n \"key\": \"value\"\n }\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ccef7c2b-7025-4a7d-ba92-2ba1e679e916", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "02ea85da-2fe0-4dfd-aefc-c93aed833ff6", + "name": "Create cluster - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"control_plane_ip_filter\": [\n \"1.2.3.0/24\",\n \"1.1.1.1\"\n ],\n \"name\": \"example-cluster\",\n \"network\": \"33333333-3333-3333-333333333333\",\n \"network_cidr\": \"172.16.0.0/24\",\n \"storage_encryption\": \"data-at-rest\",\n \"node_groups\": [\n {\n \"count\": 4,\n \"kubelet_args\": [\n {\n \"key\": \"log-flush-frequency\",\n \"value\": \"5s\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"managedBy\",\n \"value\": \"exampleDevelopmentTeam\"\n },\n {\n \"key\": \"environment\",\n \"value\": \"development\"\n }\n ],\n \"name\": \"example-node-group-small\",\n \"plan\": \"K8S-2xCPU-4GB\",\n \"custom_plan\": {\n \"memory\": 1,\n \"cores\": 1,\n \"storage_size\": 1\n },\n \"cloud_native_plan\": {\n \"storage_size\": 1\n },\n \"gpu_plan\": {\n \"storage_size\": 1\n },\n \"ssh_keys\": [\n \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV\"\n ],\n \"state\": \"pending\",\n \"storage\": \"01000000-0000-4000-8000-000160010100\",\n \"storage_encryption\": \"data-at-rest\",\n \"taints\": [\n {\n \"effect\": \"NoSchedule\",\n \"key\": \"environment\",\n \"value\": \"development\"\n }\n ],\n \"anti_affinity\": true,\n \"utility_network_access\": true,\n \"node_updates\": {\n \"kubernetes_patches\": true,\n \"schedule_dow\": \"Monday\",\n \"schedule_time\": \"06:00\"\n }\n },\n {\n \"count\": 8,\n \"kubelet_args\": [\n {\n \"key\": \"log-flush-frequency\",\n \"value\": \"15s\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"managedBy\",\n \"value\": \"exampleStagingTeam\"\n },\n {\n \"key\": \"environment\",\n \"value\": \"staging\"\n }\n ],\n \"name\": \"example-node-group-medium\",\n \"plan\": \"K8S-4xCPU-8GB\",\n \"custom_plan\": {\n \"memory\": 1,\n \"cores\": 1,\n \"storage_size\": 1\n },\n \"cloud_native_plan\": {\n \"storage_size\": 1\n },\n \"gpu_plan\": {\n \"storage_size\": 1\n },\n \"ssh_keys\": [\n \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV\"\n ],\n \"state\": \"pending\",\n \"storage\": \"01000000-0000-4000-8000-000160010100\",\n \"storage_encryption\": \"data-at-rest\",\n \"taints\": [\n {\n \"effect\": \"NoSchedule\",\n \"key\": \"environment\",\n \"value\": \"staging\"\n }\n ],\n \"anti_affinity\": true,\n \"utility_network_access\": true,\n \"node_updates\": {\n \"kubernetes_patches\": true,\n \"schedule_dow\": \"Monday\",\n \"schedule_time\": \"06:00\"\n }\n }\n ],\n \"state\": \"pending\",\n \"uuid\": \"11111111-1111-1111-1111-111111111111\",\n \"zone\": \"de-fra1\",\n \"plan\": \"development\",\n \"private_node_groups\": true,\n \"version\": \"version\",\n \"authentication\": [\n {\n \"name\": \"name\",\n \"issuer_url\": \"https://accounts.myoidcprovider.com\",\n \"discovery_url\": \"https://accounts.myoidcprovider.com/.well-known/openid-configuration\",\n \"audiences\": [\n \"client-id-123\"\n ],\n \"audience_match_policy\": \"MatchAny\",\n \"certificate_authority\": \"certificate_authority\",\n \"claim_mappings\": {\n \"extra\": [\n {\n \"key\": \"example.org/foo\",\n \"value_expression\": \"claims.some_claim\"\n }\n ]\n },\n \"claim_validation_rules\": [\n {\n \"claim\": \"hd\",\n \"required_value\": \"upcloud.com\",\n \"expression\": \"claims.hd == 'upcloud.com'\",\n \"message\": \"User must belong to the upcloud.com organization domain.\"\n }\n ],\n \"user_validation_rules\": [\n {\n \"expression\": \"!user.username.startsWith('system:')\",\n \"message\": \"Username must not start with the system: prefix.\"\n }\n ]\n }\n ],\n \"labels\": {\n \"key\": \"value\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "02ea85da-2fe0-4dfd-aefc-c93aed833ff6", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "84c71d72-0249-41ae-9855-104829619468", + "name": "Get cluster details - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"control_plane_ip_filter\": [\n \"1.2.3.4/24\",\n \"1.1.1.1\"\n ],\n \"name\": \"example-cluster\",\n \"network\": \"33333333-3333-3333-333333333333\",\n \"network_cidr\": \"172.16.0.0/24\",\n \"storage_encryption\": \"data-at-rest\",\n \"node_groups\": [\n {\n \"count\": 4,\n \"kubelet_args\": [\n {\n \"key\": \"log-flush-frequency\",\n \"value\": \"5s\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"managedBy\",\n \"value\": \"exampleDevelopmentTeam\"\n },\n {\n \"key\": \"environment\",\n \"value\": \"development\"\n }\n ],\n \"name\": \"small\",\n \"plan\": \"K8S-2xCPU-4GB\",\n \"custom_plan\": {\n \"memory\": 1,\n \"cores\": 1,\n \"storage_size\": 1\n },\n \"cloud_native_plan\": {\n \"storage_size\": 1\n },\n \"gpu_plan\": {\n \"storage_size\": 1\n },\n \"ssh_keys\": [\n \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV\"\n ],\n \"state\": \"running\",\n \"storage\": \"01000000-0000-4000-8000-000160010100\",\n \"storage_encryption\": \"data-at-rest\",\n \"taints\": [\n {\n \"effect\": \"NoSchedule\",\n \"key\": \"environment\",\n \"value\": \"development\"\n }\n ],\n \"anti_affinity\": true,\n \"utility_network_access\": true,\n \"node_updates\": {\n \"kubernetes_patches\": true,\n \"schedule_dow\": \"Monday\",\n \"schedule_time\": \"06:00\"\n }\n },\n {\n \"count\": 8,\n \"kubelet_args\": [\n {\n \"key\": \"log-flush-frequency\",\n \"value\": \"15s\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"managedBy\",\n \"value\": \"exampleStagingTeam\"\n },\n {\n \"key\": \"environment\",\n \"value\": \"staging\"\n }\n ],\n \"name\": \"medium\",\n \"plan\": \"K8S-4xCPU-8GB\",\n \"custom_plan\": {\n \"memory\": 1,\n \"cores\": 1,\n \"storage_size\": 1\n },\n \"cloud_native_plan\": {\n \"storage_size\": 1\n },\n \"gpu_plan\": {\n \"storage_size\": 1\n },\n \"ssh_keys\": [\n \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV\"\n ],\n \"state\": \"pending\",\n \"storage\": \"01000000-0000-4000-8000-000160010100\",\n \"storage_encryption\": \"data-at-rest\",\n \"taints\": [\n {\n \"effect\": \"NoSchedule\",\n \"key\": \"environment\",\n \"value\": \"staging\"\n }\n ],\n \"anti_affinity\": true,\n \"utility_network_access\": true,\n \"node_updates\": {\n \"kubernetes_patches\": true,\n \"schedule_dow\": \"Monday\",\n \"schedule_time\": \"06:00\"\n }\n }\n ],\n \"state\": \"running\",\n \"uuid\": \"11111111-1111-1111-1111-111111111111\",\n \"zone\": \"de-fra1\",\n \"plan\": \"development\",\n \"private_node_groups\": true,\n \"version\": \"version\",\n \"authentication\": [\n {\n \"name\": \"name\",\n \"issuer_url\": \"https://accounts.myoidcprovider.com\",\n \"discovery_url\": \"https://accounts.myoidcprovider.com/.well-known/openid-configuration\",\n \"audiences\": [\n \"client-id-123\"\n ],\n \"audience_match_policy\": \"MatchAny\",\n \"certificate_authority\": \"certificate_authority\",\n \"claim_mappings\": {\n \"extra\": [\n {\n \"key\": \"example.org/foo\",\n \"value_expression\": \"claims.some_claim\"\n }\n ]\n },\n \"claim_validation_rules\": [\n {\n \"claim\": \"hd\",\n \"required_value\": \"upcloud.com\",\n \"expression\": \"claims.hd == 'upcloud.com'\",\n \"message\": \"User must belong to the upcloud.com organization domain.\"\n }\n ],\n \"user_validation_rules\": [\n {\n \"expression\": \"!user.username.startsWith('system:')\",\n \"message\": \"Username must not start with the system: prefix.\"\n }\n ]\n }\n ],\n \"labels\": {\n \"key\": \"value\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "84c71d72-0249-41ae-9855-104829619468", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "bb2898a4-fca4-4e30-b3db-656a5c85ccc8", + "name": "Delete cluster - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + } + } + }, + "response": { + "status": 202, + "body": "{\n \"message\": \"deletion started for cluster 11111111-1111-1111-1111-1111\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "bb2898a4-fca4-4e30-b3db-656a5c85ccc8", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "117edf67-a166-40e4-819f-77c14b06e194", + "name": "Modify cluster - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}", + "method": "PATCH", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"control_plane_ip_filter\": [\n \"1.2.3.0/24\",\n \"1.1.1.1\"\n ],\n \"name\": \"example-cluster\",\n \"network\": \"33333333-3333-3333-333333333333\",\n \"network_cidr\": \"172.16.0.0/24\",\n \"storage_encryption\": \"data-at-rest\",\n \"node_groups\": [\n {\n \"count\": 4,\n \"kubelet_args\": [\n {\n \"key\": \"log-flush-frequency\",\n \"value\": \"5s\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"managedBy\",\n \"value\": \"exampleDevelopmentTeam\"\n },\n {\n \"key\": \"environment\",\n \"value\": \"development\"\n }\n ],\n \"name\": \"example-node-group-small\",\n \"plan\": \"K8S-2xCPU-4GB\",\n \"custom_plan\": {\n \"memory\": 1,\n \"cores\": 1,\n \"storage_size\": 1\n },\n \"cloud_native_plan\": {\n \"storage_size\": 1\n },\n \"gpu_plan\": {\n \"storage_size\": 1\n },\n \"ssh_keys\": [\n \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV\"\n ],\n \"state\": \"pending\",\n \"storage\": \"01000000-0000-4000-8000-000160010100\",\n \"storage_encryption\": \"data-at-rest\",\n \"taints\": [\n {\n \"effect\": \"NoSchedule\",\n \"key\": \"environment\",\n \"value\": \"development\"\n }\n ],\n \"anti_affinity\": true,\n \"utility_network_access\": true,\n \"node_updates\": {\n \"kubernetes_patches\": true,\n \"schedule_dow\": \"Monday\",\n \"schedule_time\": \"06:00\"\n }\n },\n {\n \"count\": 8,\n \"kubelet_args\": [\n {\n \"key\": \"log-flush-frequency\",\n \"value\": \"15s\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"managedBy\",\n \"value\": \"exampleStagingTeam\"\n },\n {\n \"key\": \"environment\",\n \"value\": \"staging\"\n }\n ],\n \"name\": \"example-node-group-medium\",\n \"plan\": \"K8S-4xCPU-8GB\",\n \"custom_plan\": {\n \"memory\": 1,\n \"cores\": 1,\n \"storage_size\": 1\n },\n \"cloud_native_plan\": {\n \"storage_size\": 1\n },\n \"gpu_plan\": {\n \"storage_size\": 1\n },\n \"ssh_keys\": [\n \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV\"\n ],\n \"state\": \"running\",\n \"storage\": \"01000000-0000-4000-8000-000160010100\",\n \"storage_encryption\": \"data-at-rest\",\n \"taints\": [\n {\n \"effect\": \"NoSchedule\",\n \"key\": \"environment\",\n \"value\": \"staging\"\n }\n ],\n \"anti_affinity\": true,\n \"utility_network_access\": true,\n \"node_updates\": {\n \"kubernetes_patches\": true,\n \"schedule_dow\": \"Monday\",\n \"schedule_time\": \"06:00\"\n }\n }\n ],\n \"state\": \"running\",\n \"uuid\": \"11111111-1111-1111-1111-111111111111\",\n \"zone\": \"de-fra1\",\n \"plan\": \"development\",\n \"private_node_groups\": true,\n \"version\": \"version\",\n \"authentication\": [\n {\n \"name\": \"name\",\n \"issuer_url\": \"https://accounts.myoidcprovider.com\",\n \"discovery_url\": \"https://accounts.myoidcprovider.com/.well-known/openid-configuration\",\n \"audiences\": [\n \"client-id-123\"\n ],\n \"audience_match_policy\": \"MatchAny\",\n \"certificate_authority\": \"certificate_authority\",\n \"claim_mappings\": {\n \"extra\": [\n {\n \"key\": \"example.org/foo\",\n \"value_expression\": \"claims.some_claim\"\n }\n ]\n },\n \"claim_validation_rules\": [\n {\n \"claim\": \"hd\",\n \"required_value\": \"upcloud.com\",\n \"expression\": \"claims.hd == 'upcloud.com'\",\n \"message\": \"User must belong to the upcloud.com organization domain.\"\n }\n ],\n \"user_validation_rules\": [\n {\n \"expression\": \"!user.username.startsWith('system:')\",\n \"message\": \"Username must not start with the system: prefix.\"\n }\n ]\n }\n ],\n \"labels\": {\n \"key\": \"value\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "117edf67-a166-40e4-819f-77c14b06e194", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "40294bab-286d-43c7-81df-61f91db9f647", + "name": "Get kubeconfig - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/kubeconfig", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"kubeconfig\": \"apiVersion: v1\\nclusters:\\n- cluster:\\n certificate-authority-data: FAKEBASE64=\\n server: https://server\\n name: example-cluster\\ncontexts:\\n- context:\\n cluster: example-cluster\\n user: example-cluster-admin\\n name: example-cluster-admin@example-cluster\\ncurrent-context: example-cluster-admin@example-cluster\\nkind: Config\\npreferences: {}\\nusers:\\n- name: example-cluster-admin\\n user:\\n client-certificate-data: FAKEBASE64=\\n client-key-data: FAKEBASE64=\\n\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "40294bab-286d-43c7-81df-61f91db9f647", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1adc8628-cd97-4fa0-8225-6f8ed9462031", + "name": "Get available upgrades - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/available-upgrades", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"versions\": [\n \"versions\"\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1adc8628-cd97-4fa0-8225-6f8ed9462031", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "b769f662-8b00-4f9a-8159-77456586aa95", + "name": "Upgrade cluster - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/available-upgrades", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"version\": \"1.31\",\n \"strategy\": {\n \"type\": \"manual\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "b769f662-8b00-4f9a-8159-77456586aa95", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "58b91988-fe69-41a0-a3db-4dee84cbb007", + "name": "List node groups - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/node-groups", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"count\": 4,\n \"kubelet_args\": [\n {\n \"key\": \"log-flush-frequency\",\n \"value\": \"5s\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"managedBy\",\n \"value\": \"exampleDevelopmentTeam\"\n },\n {\n \"key\": \"environment\",\n \"value\": \"development\"\n }\n ],\n \"name\": \"small\",\n \"plan\": \"K8S-2xCPU-4GB\",\n \"custom_plan\": {\n \"memory\": 1,\n \"cores\": 1,\n \"storage_size\": 1,\n \"storage_tier\": \"maxiops\"\n },\n \"cloud_native_plan\": {\n \"storage_size\": 1,\n \"storage_tier\": \"maxiops\"\n },\n \"gpu_plan\": {\n \"storage_size\": 1,\n \"storage_tier\": \"maxiops\"\n },\n \"ssh_keys\": [\n \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV\"\n ],\n \"state\": \"running\",\n \"storage\": \"01000000-0000-4000-8000-000160010100\",\n \"storage_encryption\": \"data-at-rest\",\n \"taints\": [\n {\n \"effect\": \"NoSchedule\",\n \"key\": \"environment\",\n \"value\": \"development\"\n }\n ],\n \"anti_affinity\": true,\n \"utility_network_access\": true,\n \"node_updates\": {\n \"kubernetes_patches\": true,\n \"schedule_dow\": \"Monday\",\n \"schedule_time\": \"06:00\"\n }\n },\n {\n \"count\": 8,\n \"kubelet_args\": [\n {\n \"key\": \"log-flush-frequency\",\n \"value\": \"15s\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"managedBy\",\n \"value\": \"exampleStagingTeam\"\n },\n {\n \"key\": \"environment\",\n \"value\": \"staging\"\n }\n ],\n \"name\": \"medium\",\n \"plan\": \"K8S-4xCPU-8GB\",\n \"custom_plan\": {\n \"memory\": 1,\n \"cores\": 1,\n \"storage_size\": 1,\n \"storage_tier\": \"maxiops\"\n },\n \"cloud_native_plan\": {\n \"storage_size\": 1,\n \"storage_tier\": \"maxiops\"\n },\n \"gpu_plan\": {\n \"storage_size\": 1,\n \"storage_tier\": \"maxiops\"\n },\n \"ssh_keys\": [\n \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV\"\n ],\n \"state\": \"pending\",\n \"storage\": \"01000000-0000-4000-8000-000160010100\",\n \"storage_encryption\": \"data-at-rest\",\n \"taints\": [\n {\n \"effect\": \"NoSchedule\",\n \"key\": \"environment\",\n \"value\": \"staging\"\n }\n ],\n \"anti_affinity\": true,\n \"utility_network_access\": true,\n \"node_updates\": {\n \"kubernetes_patches\": true,\n \"schedule_dow\": \"Monday\",\n \"schedule_time\": \"06:00\"\n }\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "58b91988-fe69-41a0-a3db-4dee84cbb007", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ed7fa7f7-a7a0-4a05-9d6d-37111db77e48", + "name": "Create node group - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/node-groups", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"count\": 4,\n \"kubelet_args\": [\n {\n \"key\": \"log-flush-frequency\",\n \"value\": \"5s\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"managedBy\",\n \"value\": \"exampleDevelopmentTeam\"\n },\n {\n \"key\": \"environment\",\n \"value\": \"development\"\n }\n ],\n \"name\": \"small\",\n \"plan\": \"K8S-2xCPU-4GB\",\n \"custom_plan\": {\n \"memory\": 1,\n \"cores\": 1,\n \"storage_size\": 1,\n \"storage_tier\": \"maxiops\"\n },\n \"cloud_native_plan\": {\n \"storage_size\": 1,\n \"storage_tier\": \"maxiops\"\n },\n \"gpu_plan\": {\n \"storage_size\": 1,\n \"storage_tier\": \"maxiops\"\n },\n \"ssh_keys\": [\n \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV\"\n ],\n \"state\": \"pending\",\n \"storage\": \"01000000-0000-4000-8000-000160010100\",\n \"storage_encryption\": \"data-at-rest\",\n \"taints\": [\n {\n \"effect\": \"NoSchedule\",\n \"key\": \"environment\",\n \"value\": \"development\"\n }\n ],\n \"anti_affinity\": true,\n \"utility_network_access\": true,\n \"node_updates\": {\n \"kubernetes_patches\": true,\n \"schedule_dow\": \"Monday\",\n \"schedule_time\": \"06:00\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ed7fa7f7-a7a0-4a05-9d6d-37111db77e48", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "c0ddb699-271c-4a66-bd5e-1b36d1a5da4b", + "name": "Get node group details - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/node-groups/{name}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + }, + "name": { + "equalTo": "name" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"count\": 1,\n \"kubelet_args\": [\n {\n \"key\": \"key\",\n \"value\": \"value\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"key\",\n \"value\": \"value\"\n }\n ],\n \"name\": \"name\",\n \"plan\": \"plan\",\n \"custom_plan\": {\n \"memory\": 1,\n \"cores\": 1,\n \"storage_size\": 1,\n \"storage_tier\": \"maxiops\"\n },\n \"cloud_native_plan\": {\n \"storage_size\": 1,\n \"storage_tier\": \"maxiops\"\n },\n \"gpu_plan\": {\n \"storage_size\": 1,\n \"storage_tier\": \"maxiops\"\n },\n \"ssh_keys\": [\n \"ssh_keys\"\n ],\n \"state\": \"failed\",\n \"storage\": \"storage\",\n \"storage_encryption\": \"data-at-rest\",\n \"taints\": [\n {\n \"effect\": \"NoExecute\",\n \"key\": \"key\",\n \"value\": \"value\"\n }\n ],\n \"anti_affinity\": true,\n \"utility_network_access\": true,\n \"node_updates\": {\n \"kubernetes_patches\": true,\n \"schedule_dow\": \"Monday\",\n \"schedule_time\": \"06:00\"\n },\n \"nodes\": [\n {\n \"uuid\": \"uuid\",\n \"name\": \"name\",\n \"kubelet_version\": \"kubelet_version\",\n \"state\": \"pending\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "c0ddb699-271c-4a66-bd5e-1b36d1a5da4b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "c7715b0f-4472-4317-bca7-60ea26bb1043", + "name": "Delete node group - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/node-groups/{name}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + }, + "name": { + "equalTo": "name" + } + } + }, + "response": { + "status": 202, + "body": "{\n \"message\": \"deletion started for node group 'small'\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "c7715b0f-4472-4317-bca7-60ea26bb1043", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "c62b160a-874b-44f7-926f-a8e154242bcd", + "name": "Modify node group - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/node-groups/{name}", + "method": "PATCH", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + }, + "name": { + "equalTo": "name" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"count\": 16,\n \"kubelet_args\": [\n {\n \"key\": \"log-flush-frequency\",\n \"value\": \"5s\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"managedBy\",\n \"value\": \"exampleDevelopmentTeam\"\n },\n {\n \"key\": \"environment\",\n \"value\": \"development\"\n }\n ],\n \"name\": \"small\",\n \"plan\": \"K8S-2xCPU-4GB\",\n \"custom_plan\": {\n \"memory\": 1,\n \"cores\": 1,\n \"storage_size\": 1,\n \"storage_tier\": \"maxiops\"\n },\n \"cloud_native_plan\": {\n \"storage_size\": 1,\n \"storage_tier\": \"maxiops\"\n },\n \"gpu_plan\": {\n \"storage_size\": 1,\n \"storage_tier\": \"maxiops\"\n },\n \"ssh_keys\": [\n \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV\"\n ],\n \"state\": \"running\",\n \"storage\": \"01000000-0000-4000-8000-000160010100\",\n \"storage_encryption\": \"data-at-rest\",\n \"taints\": [\n {\n \"effect\": \"NoSchedule\",\n \"key\": \"environment\",\n \"value\": \"development\"\n }\n ],\n \"anti_affinity\": true,\n \"utility_network_access\": true,\n \"node_updates\": {\n \"kubernetes_patches\": true,\n \"schedule_dow\": \"Monday\",\n \"schedule_time\": \"06:00\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "c62b160a-874b-44f7-926f-a8e154242bcd", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "13c8a8a3-fbb0-470e-81d6-9634f07746d1", + "name": "Delete node group node - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/node-groups/{name}/{node-name}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + }, + "name": { + "equalTo": "name" + }, + "node-name": { + "equalTo": "node-name" + } + } + }, + "response": { + "status": 202, + "body": "{\n \"message\": \"deletion started for node group node 'small/node-xyz'\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "13c8a8a3-fbb0-470e-81d6-9634f07746d1", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "9a0545f5-4ff7-4b8e-9bca-1f64a62e7397", + "name": "List plans - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/plans", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"description\": \"K8S-2xCPU-4GB\",\n \"name\": \"small\"\n },\n {\n \"description\": \"K8S-4xCPU-8GB\",\n \"name\": \"medium\"\n },\n {\n \"description\": \"K8S-8xCPU-32GB\",\n \"name\": \"large\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "9a0545f5-4ff7-4b8e-9bca-1f64a62e7397", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "e0db34f2-3586-433f-b3a3-509777dbfd64", + "name": "List versions - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/versions", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"id\": \"1.26\",\n \"version\": \"1.26.4\"\n },\n {\n \"id\": \"1.27\",\n \"version\": \"1.27.2\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e0db34f2-3586-433f-b3a3-509777dbfd64", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "3aa098dc-357b-48a9-9dbf-697310f1f54c", + "name": "List cluster authentication entries - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/authentication", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"name\",\n \"issuer_url\": \"https://accounts.myoidcprovider.com\",\n \"discovery_url\": \"https://accounts.myoidcprovider.com/.well-known/openid-configuration\",\n \"audiences\": [\n \"client-id-123\"\n ],\n \"audience_match_policy\": \"MatchAny\",\n \"certificate_authority\": \"certificate_authority\",\n \"claim_mappings\": {\n \"username\": {\n \"claim\": \"email\",\n \"prefix\": \"oidc:\",\n \"expression\": \"claims.email\"\n },\n \"groups\": {\n \"claim\": \"email\",\n \"prefix\": \"oidc:\",\n \"expression\": \"claims.email\"\n },\n \"uid\": {\n \"claim\": \"sub\",\n \"expression\": \"claims.sub\"\n },\n \"extra\": [\n {\n \"key\": \"example.org/foo\",\n \"value_expression\": \"claims.some_claim\"\n }\n ]\n },\n \"claim_validation_rules\": [\n {\n \"claim\": \"hd\",\n \"required_value\": \"upcloud.com\",\n \"expression\": \"claims.hd == 'upcloud.com'\",\n \"message\": \"User must belong to the upcloud.com organization domain.\"\n }\n ],\n \"user_validation_rules\": [\n {\n \"expression\": \"!user.username.startsWith('system:')\",\n \"message\": \"Username must not start with the system: prefix.\"\n }\n ]\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "3aa098dc-357b-48a9-9dbf-697310f1f54c", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f3caf5af-04c3-4440-b954-127ac440ac98", + "name": "Create a cluster authentication entry - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/authentication", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"name\": \"name\",\n \"issuer_url\": \"https://accounts.myoidcprovider.com\",\n \"discovery_url\": \"https://accounts.myoidcprovider.com/.well-known/openid-configuration\",\n \"audiences\": [\n \"client-id-123\"\n ],\n \"audience_match_policy\": \"MatchAny\",\n \"certificate_authority\": \"certificate_authority\",\n \"claim_mappings\": {\n \"username\": {\n \"claim\": \"email\",\n \"prefix\": \"oidc:\",\n \"expression\": \"claims.email\"\n },\n \"groups\": {\n \"claim\": \"email\",\n \"prefix\": \"oidc:\",\n \"expression\": \"claims.email\"\n },\n \"uid\": {\n \"claim\": \"sub\",\n \"expression\": \"claims.sub\"\n },\n \"extra\": [\n {\n \"key\": \"example.org/foo\",\n \"value_expression\": \"claims.some_claim\"\n }\n ]\n },\n \"claim_validation_rules\": [\n {\n \"claim\": \"hd\",\n \"required_value\": \"upcloud.com\",\n \"expression\": \"claims.hd == 'upcloud.com'\",\n \"message\": \"User must belong to the upcloud.com organization domain.\"\n }\n ],\n \"user_validation_rules\": [\n {\n \"expression\": \"!user.username.startsWith('system:')\",\n \"message\": \"Username must not start with the system: prefix.\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f3caf5af-04c3-4440-b954-127ac440ac98", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "3d15ea6b-80a8-41dc-86d2-55159d9c328b", + "name": "Replace the full cluster authentication configuration - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/authentication", + "method": "PUT", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"name\",\n \"issuer_url\": \"https://accounts.myoidcprovider.com\",\n \"discovery_url\": \"https://accounts.myoidcprovider.com/.well-known/openid-configuration\",\n \"audiences\": [\n \"client-id-123\"\n ],\n \"audience_match_policy\": \"MatchAny\",\n \"certificate_authority\": \"certificate_authority\",\n \"claim_mappings\": {\n \"username\": {\n \"claim\": \"email\",\n \"prefix\": \"oidc:\",\n \"expression\": \"claims.email\"\n },\n \"groups\": {\n \"claim\": \"email\",\n \"prefix\": \"oidc:\",\n \"expression\": \"claims.email\"\n },\n \"uid\": {\n \"claim\": \"sub\",\n \"expression\": \"claims.sub\"\n },\n \"extra\": [\n {\n \"key\": \"example.org/foo\",\n \"value_expression\": \"claims.some_claim\"\n }\n ]\n },\n \"claim_validation_rules\": [\n {\n \"claim\": \"hd\",\n \"required_value\": \"upcloud.com\",\n \"expression\": \"claims.hd == 'upcloud.com'\",\n \"message\": \"User must belong to the upcloud.com organization domain.\"\n }\n ],\n \"user_validation_rules\": [\n {\n \"expression\": \"!user.username.startsWith('system:')\",\n \"message\": \"Username must not start with the system: prefix.\"\n }\n ]\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "3d15ea6b-80a8-41dc-86d2-55159d9c328b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "51812697-cfde-4199-8b0d-906c94e14619", + "name": "Import a full cluster authentication configuration - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/authentication/import", + "method": "PUT", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"name\",\n \"issuer_url\": \"https://accounts.myoidcprovider.com\",\n \"discovery_url\": \"https://accounts.myoidcprovider.com/.well-known/openid-configuration\",\n \"audiences\": [\n \"client-id-123\"\n ],\n \"audience_match_policy\": \"MatchAny\",\n \"certificate_authority\": \"certificate_authority\",\n \"claim_mappings\": {\n \"username\": {\n \"claim\": \"email\",\n \"prefix\": \"oidc:\",\n \"expression\": \"claims.email\"\n },\n \"groups\": {\n \"claim\": \"email\",\n \"prefix\": \"oidc:\",\n \"expression\": \"claims.email\"\n },\n \"uid\": {\n \"claim\": \"sub\",\n \"expression\": \"claims.sub\"\n },\n \"extra\": [\n {\n \"key\": \"example.org/foo\",\n \"value_expression\": \"claims.some_claim\"\n }\n ]\n },\n \"claim_validation_rules\": [\n {\n \"claim\": \"hd\",\n \"required_value\": \"upcloud.com\",\n \"expression\": \"claims.hd == 'upcloud.com'\",\n \"message\": \"User must belong to the upcloud.com organization domain.\"\n }\n ],\n \"user_validation_rules\": [\n {\n \"expression\": \"!user.username.startsWith('system:')\",\n \"message\": \"Username must not start with the system: prefix.\"\n }\n ]\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "51812697-cfde-4199-8b0d-906c94e14619", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4615cd2d-690d-4267-a88f-7db973bc2172", + "name": "Get a cluster authentication entry - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/authentication/{name}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + }, + "name": { + "equalTo": "name" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"name\",\n \"issuer_url\": \"https://accounts.myoidcprovider.com\",\n \"discovery_url\": \"https://accounts.myoidcprovider.com/.well-known/openid-configuration\",\n \"audiences\": [\n \"client-id-123\"\n ],\n \"audience_match_policy\": \"MatchAny\",\n \"certificate_authority\": \"certificate_authority\",\n \"claim_mappings\": {\n \"username\": {\n \"claim\": \"email\",\n \"prefix\": \"oidc:\",\n \"expression\": \"claims.email\"\n },\n \"groups\": {\n \"claim\": \"email\",\n \"prefix\": \"oidc:\",\n \"expression\": \"claims.email\"\n },\n \"uid\": {\n \"claim\": \"sub\",\n \"expression\": \"claims.sub\"\n },\n \"extra\": [\n {\n \"key\": \"example.org/foo\",\n \"value_expression\": \"claims.some_claim\"\n }\n ]\n },\n \"claim_validation_rules\": [\n {\n \"claim\": \"hd\",\n \"required_value\": \"upcloud.com\",\n \"expression\": \"claims.hd == 'upcloud.com'\",\n \"message\": \"User must belong to the upcloud.com organization domain.\"\n }\n ],\n \"user_validation_rules\": [\n {\n \"expression\": \"!user.username.startsWith('system:')\",\n \"message\": \"Username must not start with the system: prefix.\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4615cd2d-690d-4267-a88f-7db973bc2172", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "387912f8-839e-4e26-9325-849b962273dd", + "name": "Update a cluster authentication entry - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/authentication/{name}", + "method": "PUT", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + }, + "name": { + "equalTo": "name" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"name\",\n \"issuer_url\": \"https://accounts.myoidcprovider.com\",\n \"discovery_url\": \"https://accounts.myoidcprovider.com/.well-known/openid-configuration\",\n \"audiences\": [\n \"client-id-123\"\n ],\n \"audience_match_policy\": \"MatchAny\",\n \"certificate_authority\": \"certificate_authority\",\n \"claim_mappings\": {\n \"username\": {\n \"claim\": \"email\",\n \"prefix\": \"oidc:\",\n \"expression\": \"claims.email\"\n },\n \"groups\": {\n \"claim\": \"email\",\n \"prefix\": \"oidc:\",\n \"expression\": \"claims.email\"\n },\n \"uid\": {\n \"claim\": \"sub\",\n \"expression\": \"claims.sub\"\n },\n \"extra\": [\n {\n \"key\": \"example.org/foo\",\n \"value_expression\": \"claims.some_claim\"\n }\n ]\n },\n \"claim_validation_rules\": [\n {\n \"claim\": \"hd\",\n \"required_value\": \"upcloud.com\",\n \"expression\": \"claims.hd == 'upcloud.com'\",\n \"message\": \"User must belong to the upcloud.com organization domain.\"\n }\n ],\n \"user_validation_rules\": [\n {\n \"expression\": \"!user.username.startsWith('system:')\",\n \"message\": \"Username must not start with the system: prefix.\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "387912f8-839e-4e26-9325-849b962273dd", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d65fe227-a22a-4878-bdb6-9b003e373a74", + "name": "Delete a cluster authentication entry - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/authentication/{name}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + }, + "name": { + "equalTo": "name" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d65fe227-a22a-4878-bdb6-9b003e373a74", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "498105af-79cd-4481-bc53-c7b7e23461a8", + "name": "Get OIDC kubeconfig - default", + "request": { + "urlPathTemplate": "/1.3/kubernetes/{uuid}/authentication/{name}/kubeconfig", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "uuid" + }, + "name": { + "equalTo": "name" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"kubeconfig\": \"apiVersion: v1\\nclusters:\\n- cluster:\\n certificate-authority-data: FAKEBASE64=\\n server: https://server\\n name: example-cluster\\ncontexts:\\n- context:\\n cluster: example-cluster\\n user: example-cluster-admin\\n name: example-cluster-admin@example-cluster\\ncurrent-context: example-cluster-admin@example-cluster\\nkind: Config\\npreferences: {}\\nusers:\\n- name: example-cluster-admin\\n user:\\n client-certificate-data: FAKEBASE64=\\n client-key-data: FAKEBASE64=\\n\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "498105af-79cd-4481-bc53-c7b7e23461a8", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "c782d33a-403e-45a2-8032-a2822da3dc32", + "name": "List currencies - default", + "request": { + "urlPathTemplate": "/1.3/currency", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"currencies\": {\n \"currency\": [\n {\n \"code\": \"EUR\",\n \"rate\": 0.00846077,\n \"updated\": \"2017-12-14T10:00:00Z\"\n },\n {\n \"code\": \"GBP\",\n \"rate\": 0.00743236,\n \"updated\": \"2017-12-14T10:00:00Z\"\n },\n {\n \"code\": \"SGD\",\n \"rate\": 0.01347685,\n \"updated\": \"2017-12-14T10:00:00Z\"\n },\n {\n \"code\": \"USD\",\n \"rate\": 0.01,\n \"updated\": \"2017-12-15T06:44:47Z\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "c782d33a-403e-45a2-8032-a2822da3dc32", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "6c723115-c9ba-4cc4-b663-ac5f9479a765", + "name": "Get available passthrough devices - default", + "request": { + "urlPathTemplate": "/1.3/device/availability", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"fra1\": {\n \"gpu_plans\": {\n \"nvidia-a10\": {\n \"amount\": 1\n }\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "6c723115-c9ba-4cc4-b663-ac5f9479a765", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "1641b303-ce8b-46ca-9d67-7a28bfec8096", + "name": "List events - default", + "request": { + "urlPathTemplate": "/1.3/events/{server_uuid}/{offset},{count}", + "method": "GET", + "pathParameters": { + "server_uuid": { + "equalTo": "server_uuid" + }, + "offset": { + "equalTo": "1" + }, + "count": { + "equalTo": "1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"events\": {\n \"event\": [\n {\n \"email\": \"user@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"server\": \"00798b85-efdc-41ca-8021-f6ef457b8531\",\n \"time\": \"2024-02-23T12:34:56Z\",\n \"type\": \"server_start\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1641b303-ce8b-46ca-9d67-7a28bfec8096", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "21943e7b-b890-4927-8f0a-8915967f8a72", + "name": "List IP addresses - default", + "request": { + "urlPathTemplate": "/1.3/ip_address", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"access\": \"public\",\n \"address\": \"203.0.113.10\",\n \"family\": \"IPv4\",\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"ptr_record\": \"host.example.com\",\n \"server\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"zone\": \"fi-hel1\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "21943e7b-b890-4927-8f0a-8915967f8a72", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "f3222915-05c1-4579-9a01-05f47322e254", + "name": "Add an IP address - default", + "request": { + "urlPathTemplate": "/1.3/ip_address", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"ip_addresses\": [\n {\n \"access\": \"public\",\n \"account_id\": 1000000,\n \"address\": \"203.0.113.10\",\n \"delegated_to_account_id\": 1000000,\n \"family\": \"IPv4\",\n \"floating\": \"yes\",\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"part_of_plan\": \"yes\",\n \"ptr_record\": \"host.example.com\",\n \"release_policy\": \"release\",\n \"server\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"zone\": \"fi-hel1\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f3222915-05c1-4579-9a01-05f47322e254", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "c73f3b14-732a-4e1f-8af4-0ab7b8d93de2", + "name": "Bulk modify IP addresses - default", + "request": { + "urlPathTemplate": "/1.3/ip_address/bulk", + "method": "PATCH" + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "c73f3b14-732a-4e1f-8af4-0ab7b8d93de2", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2e53ae62-0be6-40bf-b1d4-9e2bd045d17d", + "name": "Get IP address - default", + "request": { + "urlPathTemplate": "/1.3/ip_address/{address}", + "method": "GET", + "pathParameters": { + "address": { + "equalTo": "address" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"ip_address\": {\n \"access\": \"public\",\n \"account_id\": 1000000,\n \"address\": \"address\",\n \"delegated_to_account_id\": 1000000,\n \"family\": \"IPv4\",\n \"floating\": \"yes\",\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"part_of_plan\": \"yes\",\n \"ptr_record\": \"ptr_record\",\n \"release_policy\": \"release\",\n \"server\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2e53ae62-0be6-40bf-b1d4-9e2bd045d17d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "66fc9908-ee97-4bae-a28d-9e1047b464ba", + "name": "Modify IP address - default", + "request": { + "urlPathTemplate": "/1.3/ip_address/{address}", + "method": "PUT", + "pathParameters": { + "address": { + "equalTo": "address" + } + } + }, + "response": { + "status": 202, + "body": "{\n \"ip_addresses\": [\n {\n \"access\": \"public\",\n \"account_id\": 1000000,\n \"address\": \"203.0.113.10\",\n \"delegated_to_account_id\": 1000000,\n \"family\": \"IPv4\",\n \"floating\": \"yes\",\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"part_of_plan\": \"yes\",\n \"ptr_record\": \"host.example.com\",\n \"release_policy\": \"release\",\n \"server\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"zone\": \"fi-hel1\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "66fc9908-ee97-4bae-a28d-9e1047b464ba", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "612fbf76-7a9b-4a46-b2f9-095c353b38b0", + "name": "Delete IP address - default", + "request": { + "urlPathTemplate": "/1.3/ip_address/{address}", + "method": "DELETE", + "pathParameters": { + "address": { + "equalTo": "address" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "612fbf76-7a9b-4a46-b2f9-095c353b38b0", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "6fec0814-89a2-4237-847c-542a66cd11e7", + "name": "Modify an IP address - default", + "request": { + "urlPathTemplate": "/1.3/ip_address/{address}", + "method": "PATCH", + "pathParameters": { + "address": { + "equalTo": "address" + } + } + }, + "response": { + "status": 202, + "body": "{\n \"ip_addresses\": [\n {\n \"access\": \"public\",\n \"account_id\": 1000000,\n \"address\": \"203.0.113.10\",\n \"delegated_to_account_id\": 1000000,\n \"family\": \"IPv4\",\n \"floating\": \"yes\",\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"part_of_plan\": \"yes\",\n \"ptr_record\": \"host.example.com\",\n \"release_policy\": \"release\",\n \"server\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"zone\": \"fi-hel1\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "6fec0814-89a2-4237-847c-542a66cd11e7", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "886f96a7-00a5-46e5-8819-621634c65b8e", + "name": "List peerings - default", + "request": { + "urlPathTemplate": "/1.3/network-peering", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"network_peerings\": {\n \"network_peering\": [\n {\n \"configured_status\": \"active\",\n \"name\": \"Peering A->B\",\n \"network\": {\n \"uuid\": \"03126dc1-a69f-4bc2-8b24-e31c22d64712\"\n },\n \"peer_network\": {\n \"uuid\": \"03585987-bf7d-4544-8e9b-5a1b4d74a333\"\n },\n \"state\": \"active\",\n \"uuid\": \"0f7984bc-5d72-4aaf-b587-90e6a8f32efc\",\n \"created_at\": \"2026-07-01T00:00:00Z\",\n \"updated_at\": \"2026-07-01T00:00:00Z\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "886f96a7-00a5-46e5-8819-621634c65b8e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "ec8db729-af2c-47af-98c4-f926613ea503", + "name": "Create peering - default", + "request": { + "urlPathTemplate": "/1.3/network-peering", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"configured_status\": \"active\",\n \"name\": \"Peering A->B\",\n \"network\": {\n \"ip_networks\": {\n \"ip_network\": [\n {\n \"address\": \"192.168.0.0/24\",\n \"family\": \"IPv4\"\n },\n {\n \"address\": \"fc02:c4f3::/64\",\n \"family\": \"IPv6\"\n }\n ]\n },\n \"uuid\": \"03126dc1-a69f-4bc2-8b24-e31c22d64712\"\n },\n \"peer_network\": {\n \"ip_networks\": {\n \"ip_network\": [\n {\n \"address\": \"192.168.99.0/24\",\n \"family\": \"IPv4\"\n },\n {\n \"address\": \"fc02:c4f3:99::/64\",\n \"family\": \"IPv6\"\n }\n ]\n },\n \"uuid\": \"03585987-bf7d-4544-8e9b-5a1b4d74a333\"\n },\n \"state\": \"active\",\n \"uuid\": \"0f7984bc-5d72-4aaf-b587-90e6a8f32efc\",\n \"created_at\": \"2026-07-01T00:00:00Z\",\n \"updated_at\": \"2026-07-01T00:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ec8db729-af2c-47af-98c4-f926613ea503", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "c81e27e1-fa24-4430-95e1-0d221867e221", + "name": "Get peering - default", + "request": { + "urlPathTemplate": "/1.3/network-peering/{peering_uuid}", + "method": "GET", + "pathParameters": { + "peering_uuid": { + "equalTo": "peering_uuid" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"configured_status\": \"active\",\n \"name\": \"Peering A->B\",\n \"network\": {\n \"ip_networks\": {\n \"ip_network\": [\n {\n \"address\": \"192.168.0.0/24\",\n \"family\": \"IPv4\"\n },\n {\n \"address\": \"fc02:c4f3::/64\",\n \"family\": \"IPv6\"\n }\n ]\n },\n \"uuid\": \"03126dc1-a69f-4bc2-8b24-e31c22d64712\"\n },\n \"peer_network\": {\n \"ip_networks\": {\n \"ip_network\": [\n {\n \"address\": \"192.168.99.0/24\",\n \"family\": \"IPv4\"\n },\n {\n \"address\": \"fc02:c4f3:99::/64\",\n \"family\": \"IPv6\"\n }\n ]\n },\n \"uuid\": \"03585987-bf7d-4544-8e9b-5a1b4d74a333\"\n },\n \"state\": \"active\",\n \"uuid\": \"0f7984bc-5d72-4aaf-b587-90e6a8f32efc\",\n \"created_at\": \"2026-07-01T00:00:00Z\",\n \"updated_at\": \"2026-07-01T00:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "c81e27e1-fa24-4430-95e1-0d221867e221", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "6ebe6afc-bf14-41bc-83df-96f55da1ac31", + "name": "Delete peering - default", + "request": { + "urlPathTemplate": "/1.3/network-peering/{peering_uuid}", + "method": "DELETE", + "pathParameters": { + "peering_uuid": { + "equalTo": "peering_uuid" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "6ebe6afc-bf14-41bc-83df-96f55da1ac31", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "df3e3aa5-3e26-408b-b709-82902372bf4f", + "name": "Modify peering - default", + "request": { + "urlPathTemplate": "/1.3/network-peering/{peering_uuid}", + "method": "PATCH", + "pathParameters": { + "peering_uuid": { + "equalTo": "peering_uuid" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"configured_status\": \"active\",\n \"name\": \"Peering A->B\",\n \"network\": {\n \"ip_networks\": {\n \"ip_network\": [\n {\n \"address\": \"192.168.0.0/24\",\n \"family\": \"IPv4\"\n },\n {\n \"address\": \"fc02:c4f3::/64\",\n \"family\": \"IPv6\"\n }\n ]\n },\n \"uuid\": \"03126dc1-a69f-4bc2-8b24-e31c22d64712\"\n },\n \"peer_network\": {\n \"ip_networks\": {\n \"ip_network\": [\n {\n \"address\": \"192.168.99.0/24\",\n \"family\": \"IPv4\"\n },\n {\n \"address\": \"fc02:c4f3:99::/64\",\n \"family\": \"IPv6\"\n }\n ]\n },\n \"uuid\": \"03585987-bf7d-4544-8e9b-5a1b4d74a333\"\n },\n \"state\": \"active\",\n \"uuid\": \"0f7984bc-5d72-4aaf-b587-90e6a8f32efc\",\n \"created_at\": \"2026-07-01T00:00:00Z\",\n \"updated_at\": \"2026-07-01T00:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "df3e3aa5-3e26-408b-b709-82902372bf4f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f62264bc-bb96-45d2-bdc9-e902ce18bea5", + "name": "List networks - default", + "request": { + "urlPathTemplate": "/1.3/network", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"networks\": {\n \"network\": [\n {\n \"name\": \"backend-net\",\n \"parent_network\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"router\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"servers\": {\n \"server\": [\n {\n \"title\": \"title\",\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n }\n ]\n },\n \"type\": \"private\",\n \"uuid\": \"8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a001\",\n \"zone\": \"fi-hel2\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f62264bc-bb96-45d2-bdc9-e902ce18bea5", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "8fe67c3d-a1a8-49fb-81cf-a18a13f42681", + "name": "Create SDN network - default", + "request": { + "urlPathTemplate": "/1.3/network", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"network\": {\n \"grt_export\": \"no\",\n \"ip_networks\": {\n \"ip_network\": [\n {\n \"address\": \"192.168.150.0/24\",\n \"dhcp\": \"yes\",\n \"dhcp_dns\": [\n \"192.168.150.1\",\n \"192.168.150.254\"\n ],\n \"family\": \"IPv4\",\n \"gateway\": \"192.168.150.1\"\n }\n ]\n },\n \"name\": \"Example network\",\n \"network_features\": [\n \"allow-linklocal-address\",\n \"allow-overlapping-ip-network\",\n \"managed-by-service\"\n ],\n \"parent_network\": \"037b0e4b-2734-4d5d-89ba-1737fc4593bf\",\n \"peerings\": {\n \"peering\": [\n {\n \"name\": \"Peering A->B\",\n \"state\": \"pending-peer\",\n \"uuid\": \"0fc82c18-1e5e-4076-afcd-3b85869800e7\"\n }\n ]\n },\n \"router\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"servers\": {\n \"server\": [\n {\n \"title\": \"title\",\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n }\n ]\n },\n \"services\": {\n \"service\": [\n {\n \"name\": \"OBJECT-STORAGE\",\n \"service_routes\": [\n \"10.10.10.0/24\"\n ]\n }\n ]\n },\n \"tags\": [\n \"tags\"\n ],\n \"type\": \"private\",\n \"uuid\": \"039a8811-e279-46c2-8e45-1962767f5a4c\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "8fe67c3d-a1a8-49fb-81cf-a18a13f42681", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "41a30f55-f794-4087-b3ee-b7d432ce4c53", + "name": "List interfaces - default", + "request": { + "urlPathTemplate": "/1.3/network/interface", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"interfaces\": {\n \"interface\": {\n \"bootable\": \"no\",\n \"ip_addresses\": [\n {\n \"ip_address\": {\n \"address\": \"10.0.0.10\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"keep\",\n \"dhcp_provided\": \"yes\"\n }\n }\n ],\n \"mac\": \"00:16:3e:12:34:56\",\n \"network\": \"8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a001\",\n \"source_ip_filtering\": \"yes\",\n \"server\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"type\": \"private\",\n \"uuid\": \"8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a003\"\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "41a30f55-f794-4087-b3ee-b7d432ce4c53", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "11bde083-b2df-4c7d-8f40-32e4c162dda1", + "name": "Create interface - default", + "request": { + "urlPathTemplate": "/1.3/network/interface", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"bootable\": \"no\",\n \"ip_addresses\": [\n {\n \"ip_address\": {\n \"address\": \"10.0.0.10\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"keep\",\n \"dhcp_provided\": \"yes\"\n }\n }\n ],\n \"mac\": \"00:16:3e:12:34:56\",\n \"network\": \"8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a001\",\n \"source_ip_filtering\": \"yes\",\n \"server\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"type\": \"private\",\n \"uuid\": \"8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a003\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "11bde083-b2df-4c7d-8f40-32e4c162dda1", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "be1ad08e-0480-4093-8685-c4cbaefec059", + "name": "Get interface - default", + "request": { + "urlPathTemplate": "/1.3/network/interface/{uuid}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"network\": {\n \"grt_export\": \"no\",\n \"ip_networks\": {\n \"ip_network\": [\n {\n \"address\": \"192.168.150.0/24\",\n \"dhcp\": \"yes\",\n \"dhcp_dns\": [\n \"192.168.150.1\",\n \"192.168.150.254\"\n ],\n \"family\": \"IPv4\",\n \"gateway\": \"192.168.150.1\"\n }\n ]\n },\n \"name\": \"Example network\",\n \"network_features\": [\n \"allow-linklocal-address\",\n \"allow-overlapping-ip-network\",\n \"managed-by-service\"\n ],\n \"parent_network\": \"037b0e4b-2734-4d5d-89ba-1737fc4593bf\",\n \"peerings\": {\n \"peering\": [\n {\n \"name\": \"Peering A->B\",\n \"state\": \"pending-peer\",\n \"uuid\": \"0fc82c18-1e5e-4076-afcd-3b85869800e7\"\n }\n ]\n },\n \"router\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"servers\": {\n \"server\": [\n {\n \"title\": \"title\",\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n }\n ]\n },\n \"services\": {\n \"service\": [\n {\n \"name\": \"OBJECT-STORAGE\",\n \"service_routes\": [\n \"10.10.10.0/24\"\n ]\n }\n ]\n },\n \"tags\": [\n \"tags\"\n ],\n \"type\": \"private\",\n \"uuid\": \"039a8811-e279-46c2-8e45-1962767f5a4c\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "be1ad08e-0480-4093-8685-c4cbaefec059", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "031c0c1f-22e0-40e9-91a6-ae49a87b1900", + "name": "Delete interface - default", + "request": { + "urlPathTemplate": "/1.3/network/interface/{uuid}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "031c0c1f-22e0-40e9-91a6-ae49a87b1900", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ddc6446c-a4a2-4b3a-80bc-3e817e88d144", + "name": "Get network - default", + "request": { + "urlPathTemplate": "/1.3/network/{uuid}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"network\": {\n \"grt_export\": \"no\",\n \"ip_networks\": {\n \"ip_network\": [\n {\n \"address\": \"192.168.150.0/24\",\n \"dhcp\": \"yes\",\n \"dhcp_dns\": [\n \"192.168.150.1\",\n \"192.168.150.254\"\n ],\n \"family\": \"IPv4\",\n \"gateway\": \"192.168.150.1\"\n }\n ]\n },\n \"name\": \"Example network\",\n \"network_features\": [\n \"allow-linklocal-address\",\n \"allow-overlapping-ip-network\",\n \"managed-by-service\"\n ],\n \"parent_network\": \"037b0e4b-2734-4d5d-89ba-1737fc4593bf\",\n \"peerings\": {\n \"peering\": [\n {\n \"name\": \"Peering A->B\",\n \"state\": \"pending-peer\",\n \"uuid\": \"0fc82c18-1e5e-4076-afcd-3b85869800e7\"\n }\n ]\n },\n \"router\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"servers\": {\n \"server\": [\n {\n \"title\": \"title\",\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n }\n ]\n },\n \"services\": {\n \"service\": [\n {\n \"name\": \"OBJECT-STORAGE\",\n \"service_routes\": [\n \"10.10.10.0/24\"\n ]\n }\n ]\n },\n \"tags\": [\n \"tags\"\n ],\n \"type\": \"private\",\n \"uuid\": \"039a8811-e279-46c2-8e45-1962767f5a4c\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ddc6446c-a4a2-4b3a-80bc-3e817e88d144", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f7d8cc4c-df69-4804-a4b2-234001e78717", + "name": "Modify network - default", + "request": { + "urlPathTemplate": "/1.3/network/{uuid}", + "method": "PUT", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"network\": {\n \"grt_export\": \"no\",\n \"ip_networks\": {\n \"ip_network\": [\n {\n \"address\": \"192.168.150.0/24\",\n \"dhcp\": \"yes\",\n \"dhcp_dns\": [\n \"192.168.150.1\",\n \"192.168.150.254\"\n ],\n \"family\": \"IPv4\",\n \"gateway\": \"192.168.150.1\"\n }\n ]\n },\n \"name\": \"Example network\",\n \"network_features\": [\n \"allow-linklocal-address\",\n \"allow-overlapping-ip-network\",\n \"managed-by-service\"\n ],\n \"parent_network\": \"037b0e4b-2734-4d5d-89ba-1737fc4593bf\",\n \"peerings\": {\n \"peering\": [\n {\n \"name\": \"Peering A->B\",\n \"state\": \"pending-peer\",\n \"uuid\": \"0fc82c18-1e5e-4076-afcd-3b85869800e7\"\n }\n ]\n },\n \"router\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"servers\": {\n \"server\": [\n {\n \"title\": \"title\",\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n }\n ]\n },\n \"services\": {\n \"service\": [\n {\n \"name\": \"OBJECT-STORAGE\",\n \"service_routes\": [\n \"10.10.10.0/24\"\n ]\n }\n ]\n },\n \"tags\": [\n \"tags\"\n ],\n \"type\": \"private\",\n \"uuid\": \"039a8811-e279-46c2-8e45-1962767f5a4c\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f7d8cc4c-df69-4804-a4b2-234001e78717", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "98021e57-e8f6-45c4-8c8e-9f0a67d1acf5", + "name": "Delete network - default", + "request": { + "urlPathTemplate": "/1.3/network/{uuid}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "98021e57-e8f6-45c4-8c8e-9f0a67d1acf5", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "36964c44-f9c4-48cc-9f13-511009a32d13", + "name": "List audit logs - default", + "request": { + "urlPathTemplate": "/1.3/audit-logs", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"audit_logs\": [\n {\n \"time\": \"2024-03-05T14:30:00Z\",\n \"auth_type\": \"api\",\n \"cloud_event_id\": \"01HQXYZ123456789ABCDEFGHJK\",\n \"upcloud_correlation_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"resource_type\": \"server\",\n \"resource_sub_type\": \"session-api-token\",\n \"action\": \"start\",\n \"origin\": \"api\",\n \"account_username\": \"john.doe\",\n \"ip_address\": \"192.168.1.100\",\n \"resource_id\": \"00798b85-efdc-41ca-8021-f6ef457b8531\",\n \"current_state\": {\n \"key\": \"value\"\n },\n \"previous_state\": {\n \"key\": \"value\"\n }\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "36964c44-f9c4-48cc-9f13-511009a32d13", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "24455e82-be8c-48af-a8ec-032c2df00721", + "name": "Export audit logs - default", + "request": { + "urlPathTemplate": "/1.3/audit-logs/export", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"audit_logs\": [\n {\n \"time\": \"2024-03-05T14:30:00Z\",\n \"auth_type\": \"api\",\n \"cloud_event_id\": \"01HQXYZ123456789ABCDEFGHJK\",\n \"upcloud_correlation_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"resource_type\": \"server\",\n \"resource_sub_type\": \"session-api-token\",\n \"action\": \"start\",\n \"origin\": \"api\",\n \"account_username\": \"john.doe\",\n \"ip_address\": \"192.168.1.100\",\n \"resource_id\": \"00798b85-efdc-41ca-8021-f6ef457b8531\",\n \"current_state\": {\n \"key\": \"value\"\n },\n \"previous_state\": {\n \"key\": \"value\"\n }\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "24455e82-be8c-48af-a8ec-032c2df00721", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "42bc9cf9-98ce-459b-87ee-bd90daaa0345", + "name": "Get event details - default", + "request": { + "urlPathTemplate": "/1.3/audit-logs/{cloudEventID}", + "method": "GET", + "pathParameters": { + "cloudEventID": { + "equalTo": "01HQXYZ123456789ABCDEFGHJK" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"time\": \"2024-03-05T14:30:00Z\",\n \"auth_type\": \"api\",\n \"cloud_event_id\": \"01HQXYZ123456789ABCDEFGHJK\",\n \"upcloud_correlation_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"resource_type\": \"server\",\n \"resource_sub_type\": \"session-api-token\",\n \"action\": \"start\",\n \"origin\": \"api\",\n \"account_username\": \"john.doe\",\n \"ip_address\": \"192.168.1.100\",\n \"resource_id\": \"00798b85-efdc-41ca-8021-f6ef457b8531\",\n \"current_state\": {\n \"key\": \"value\"\n },\n \"previous_state\": {\n \"key\": \"value\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "42bc9cf9-98ce-459b-87ee-bd90daaa0345", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "622e6e03-2166-4943-ac05-8719abf9fa13", + "name": "Get filter options - default", + "request": { + "urlPathTemplate": "/1.3/audit-logs/filter-options", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"resource_types\": [\n \"server\",\n \"storage\",\n \"account\",\n \"auth\"\n ],\n \"actions\": [\n \"create\",\n \"read\",\n \"update\",\n \"delete\"\n ],\n \"origins\": [\n \"api\",\n \"gui\",\n \"upcloud_internal\"\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "622e6e03-2166-4943-ac05-8719abf9fa13", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "7c700fc9-33e8-4ef1-b236-f4eba185c52e", + "name": "Get account list - default", + "request": { + "urlPathTemplate": "/1.3/partner/accounts", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"address\": \"Some street\",\n \"city\": \"Some city\",\n \"company\": \"Some company\",\n \"country\": \"FIN\",\n \"email\": \"some.user@example.com\",\n \"first_name\": \"Some\",\n \"last_name\": \"User\",\n \"phone\": \"+358.91234567\",\n \"postal_code\": \"00100\",\n \"state\": \"\",\n \"username\": \"somename\",\n \"vat_number\": \"FI24315605\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7c700fc9-33e8-4ef1-b236-f4eba185c52e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "f2f0a4c5-9963-41eb-b559-1e01629bf731", + "name": "Create new account - default", + "request": { + "urlPathTemplate": "/1.3/partner/accounts", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"address\": \"Some street\",\n \"city\": \"Some city\",\n \"company\": \"Some company\",\n \"country\": \"FIN\",\n \"email\": \"some.user@example.com\",\n \"first_name\": \"Some\",\n \"last_name\": \"User\",\n \"phone\": \"+358.91234567\",\n \"postal_code\": \"00100\",\n \"state\": \"\",\n \"username\": \"somename\",\n \"vat_number\": \"FI24315605\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f2f0a4c5-9963-41eb-b559-1e01629bf731", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "626e9ee3-9009-4351-a7cd-871d2a96c41e", + "name": "List permissions - default", + "request": { + "urlPathTemplate": "/1.3/permission", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"permissions\": {\n \"permission\": [\n {\n \"options\": {\n \"storage\": \"yes\"\n },\n \"target_identifier\": \"00e1d79f-d2d8-40ca-a68d-812655b34766\",\n \"target_type\": \"server\",\n \"user\": \"subaccount1\"\n },\n {\n \"target_identifier\": \"01f6d5e3-c3b2-41ba-912a-723ab2c12345\",\n \"target_type\": \"storage\",\n \"user\": \"subaccount2\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "626e9ee3-9009-4351-a7cd-871d2a96c41e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "14b65d65-18c7-49d3-8682-d40ec842cdf1", + "name": "Replace permissions - default", + "request": { + "urlPathTemplate": "/1.3/permission", + "method": "PUT" + }, + "response": { + "status": 200, + "body": "{\n \"permissions\": {\n \"permission\": [\n {\n \"options\": {\n \"storage\": \"yes\"\n },\n \"target_identifier\": \"00e1d79f-d2d8-40ca-a68d-812655b34766\",\n \"target_type\": \"server\",\n \"user\": \"subaccount1\"\n },\n {\n \"target_identifier\": \"01f6d5e3-c3b2-41ba-912a-723ab2c12345\",\n \"target_type\": \"storage\",\n \"user\": \"subaccount2\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "14b65d65-18c7-49d3-8682-d40ec842cdf1", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f257aab5-4850-4c12-a693-3524c590dafa", + "name": "Grant permission - default", + "request": { + "urlPathTemplate": "/1.3/permission/grant", + "method": "POST" + }, + "response": { + "status": 200, + "body": "{\n \"permission\": {\n \"options\": {\n \"storage\": \"yes\"\n },\n \"target_identifier\": \"00e1d79f-d2d8-40ca-a68d-812655b34766\",\n \"target_type\": \"server\",\n \"user\": \"test\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f257aab5-4850-4c12-a693-3524c590dafa", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ecbec16b-7d6d-42c9-8f8d-d33d2f1d5eac", + "name": "Revoke permission - default", + "request": { + "urlPathTemplate": "/1.3/permission/revoke", + "method": "POST" + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ecbec16b-7d6d-42c9-8f8d-d33d2f1d5eac", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "0a199cdb-3d1a-4534-b7f4-78d5d027c0bb", + "name": "Revoke all permissions by target - default", + "request": { + "urlPathTemplate": "/1.3/permission/revoke-all-from-target/{target_type}/{target_identifier}", + "method": "POST", + "pathParameters": { + "target_type": { + "equalTo": "target_type" + }, + "target_identifier": { + "equalTo": "target_identifier" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "0a199cdb-3d1a-4534-b7f4-78d5d027c0bb", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ee5419d8-aca0-43f9-8919-279b3d7b6c4e", + "name": "Revoke all permissions by user - default", + "request": { + "urlPathTemplate": "/1.3/permission/revoke-all-from-user/{user}", + "method": "POST", + "pathParameters": { + "user": { + "equalTo": "user" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ee5419d8-aca0-43f9-8919-279b3d7b6c4e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "b78acfa2-353d-4069-93ce-81db1b785327", + "name": "List available plans - default", + "request": { + "urlPathTemplate": "/1.3/plan", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"plans\": {\n \"plan\": [\n {\n \"core_number\": 1,\n \"memory_amount\": 1024,\n \"name\": \"1xCPU-1GB\",\n \"public_traffic_out\": 1024,\n \"storage_size\": 25,\n \"storage_tier\": \"maxiops\",\n \"gpu_model\": \"NVIDIA L40S\",\n \"family\": \"general_purpose\",\n \"current_offering\": \"yes\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "b78acfa2-353d-4069-93ce-81db1b785327", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "f55f010d-9b7e-4db0-b722-dd8525e25768", + "name": "Returns a price list. - default", + "request": { + "urlPathTemplate": "/1.3/price", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"prices\": {\n \"currency\": \"USD\",\n \"zone\": [\n {}\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f55f010d-9b7e-4db0-b722-dd8525e25768", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "dcc0452e-c1ba-4d79-911a-57bd79ee5476", + "name": "List routers - default", + "request": { + "urlPathTemplate": "/1.3/router", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"routers\": {\n \"router\": [\n {\n \"attached_network_gateways\": [\n {\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n }\n ],\n \"attached_networks\": {\n \"network\": [\n {\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n }\n ]\n },\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"name\": \"Example router\",\n \"static_routes\": [\n {\n \"name\": \"static-route-0\",\n \"nexthop\": \"192.168.1.1\",\n \"route\": \"0.0.0.0/0\",\n \"type\": \"user\"\n }\n ],\n \"type\": \"normal\",\n \"uuid\": \"04c0df35-2658-4b0c-8ac7-962090f4e92a\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "dcc0452e-c1ba-4d79-911a-57bd79ee5476", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "401f32d9-c476-4605-9c98-2790dd852caa", + "name": "Create router - default", + "request": { + "urlPathTemplate": "/1.3/router", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"router\": {\n \"attached_network_gateways\": [\n {\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n }\n ],\n \"attached_networks\": {\n \"network\": [\n {\n \"uuid\": \"03804f7f-828a-4610-867f-9d62cf9fc14f\"\n }\n ]\n },\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"name\": \"Example router\",\n \"static_routes\": [\n {\n \"name\": \"static-route-0\",\n \"nexthop\": \"192.168.1.1\",\n \"route\": \"0.0.0.0/0\",\n \"type\": \"user\"\n }\n ],\n \"type\": \"normal\",\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "401f32d9-c476-4605-9c98-2790dd852caa", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d37cc601-b7eb-45a2-9a33-2a30bef0c10a", + "name": "Get router - default", + "request": { + "urlPathTemplate": "/1.3/router/{router}", + "method": "GET", + "pathParameters": { + "router": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"router\": {\n \"attached_network_gateways\": [\n {\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n }\n ],\n \"attached_networks\": {\n \"network\": [\n {\n \"uuid\": \"03804f7f-828a-4610-867f-9d62cf9fc14f\"\n }\n ]\n },\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"name\": \"Example router\",\n \"static_routes\": [\n {\n \"name\": \"static-route-0\",\n \"nexthop\": \"192.168.1.1\",\n \"route\": \"0.0.0.0/0\",\n \"type\": \"user\"\n }\n ],\n \"type\": \"normal\",\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d37cc601-b7eb-45a2-9a33-2a30bef0c10a", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "54ba9131-6ec8-4c4f-91c1-4829d274af18", + "name": "Delete router - default", + "request": { + "urlPathTemplate": "/1.3/router/{router}", + "method": "DELETE", + "pathParameters": { + "router": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "54ba9131-6ec8-4c4f-91c1-4829d274af18", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "b258b4b5-64b2-4a90-aa09-5363211e456a", + "name": "Modify router - default", + "request": { + "urlPathTemplate": "/1.3/router/{router}", + "method": "PATCH", + "pathParameters": { + "router": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"router\": {\n \"attached_network_gateways\": [\n {\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n }\n ],\n \"attached_networks\": {\n \"network\": [\n {\n \"uuid\": \"03804f7f-828a-4610-867f-9d62cf9fc14f\"\n }\n ]\n },\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"name\": \"Example router\",\n \"static_routes\": [\n {\n \"name\": \"static-route-0\",\n \"nexthop\": \"192.168.1.1\",\n \"route\": \"0.0.0.0/0\",\n \"type\": \"user\"\n }\n ],\n \"type\": \"normal\",\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "b258b4b5-64b2-4a90-aa09-5363211e456a", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "fd583ca2-3042-45e7-a9c8-57dddbbbc394", + "name": "List server groups - default", + "request": { + "urlPathTemplate": "/1.3/server-group", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"server_groups\": {\n \"server_group\": [\n {\n \"anti_affinity\": \"yes\",\n \"anti_affinity_status\": [\n {\n \"uuid\": \"00fce2f9-f9f4-46ff-86af-9e60f131f5cb\",\n \"status\": \"met\"\n }\n ],\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"prod\"\n }\n ]\n },\n \"servers\": {\n \"server\": [\n \"00fce2f9-f9f4-46ff-86af-9e60f131f5cb\"\n ]\n },\n \"title\": \"edge-cluster-a\",\n \"uuid\": \"00fce2f9-f9f4-46ff-86af-9e60f131f5cb\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "fd583ca2-3042-45e7-a9c8-57dddbbbc394", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "dc610131-6857-494f-b15a-b62cb81063f7", + "name": "Create server group - default", + "request": { + "urlPathTemplate": "/1.3/server-group", + "method": "POST" + }, + "response": { + "status": 200, + "body": "{\n \"server_group\": {\n \"anti_affinity\": \"strict\",\n \"anti_affinity_status\": [\n {\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"status\": \"met\"\n }\n ],\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ]\n },\n \"servers\": {\n \"server\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"title\": \"title\",\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "dc610131-6857-494f-b15a-b62cb81063f7", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "3566bc55-5d8c-40b9-be8d-60c530743b9b", + "name": "Get server group details - default", + "request": { + "urlPathTemplate": "/1.3/server-group/{uuid}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"server_group\": {\n \"anti_affinity\": \"strict\",\n \"anti_affinity_status\": [\n {\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"status\": \"met\"\n }\n ],\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ]\n },\n \"servers\": {\n \"server\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"title\": \"title\",\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "3566bc55-5d8c-40b9-be8d-60c530743b9b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1d7ea946-b490-435d-8c89-9c2d72597224", + "name": "Delete server group - default", + "request": { + "urlPathTemplate": "/1.3/server-group/{uuid}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1d7ea946-b490-435d-8c89-9c2d72597224", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "520293f1-ba5d-46a4-adf6-e9f3a06d6b1f", + "name": "Modify server group - default", + "request": { + "urlPathTemplate": "/1.3/server-group/{uuid}", + "method": "PATCH", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"server_group\": {\n \"anti_affinity\": \"strict\",\n \"anti_affinity_status\": [\n {\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"status\": \"met\"\n }\n ],\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ]\n },\n \"servers\": {\n \"server\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"title\": \"title\",\n \"uuid\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "520293f1-ba5d-46a4-adf6-e9f3a06d6b1f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f8788d77-c563-4ded-8ade-01914db91a1c", + "name": "List server group members - default", + "request": { + "urlPathTemplate": "/1.3/server-group/{uuid}/servers", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"servers\": [\n \"00fce2f9-f9f4-46ff-86af-9e60f131f5cb\",\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f8788d77-c563-4ded-8ade-01914db91a1c", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "6b8435ab-8f50-4f6e-8a9b-76daeff4265e", + "name": "Add server to group - default", + "request": { + "urlPathTemplate": "/1.3/server-group/{uuid}/servers", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "6b8435ab-8f50-4f6e-8a9b-76daeff4265e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5c91f4f1-39a7-4044-a765-62514e1f3a69", + "name": "Remove server from group - default", + "request": { + "urlPathTemplate": "/1.3/server-group/{uuid}/servers/{server_uuid}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "server_uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5c91f4f1-39a7-4044-a765-62514e1f3a69", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5f0de7ff-8acc-40b6-9bee-d197fb492b3d", + "name": "List Cloud Servers - default", + "request": { + "urlPathTemplate": "/1.3/server", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"servers\": {\n \"server\": [\n {\n \"created\": 1705320000,\n \"core_number\": \"2\",\n \"host\": 7653311107,\n \"hostname\": \"web-1.example.com\",\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ]\n },\n \"license\": \"0\",\n \"memory_amount\": \"2048\",\n \"plan\": \"2xCPU-2GB\",\n \"plan_ipv4_bytes\": \"34253332\",\n \"plan_ipv6_bytes\": \"0\",\n \"simple_backup\": \"0100,dailies\",\n \"state\": \"started\",\n \"tags\": {\n \"tag\": [\n \"production\",\n \"web\"\n ]\n },\n \"title\": \"Production web server\",\n \"uuid\": \"007bf7bd-e3cf-4a10-bf01-4251dc7f3b65\",\n \"zone\": \"fi-hel1\",\n \"server_group\": \"0b3d85b4-b3be-46ca-a1e2-3b5d40d60fb1\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5f0de7ff-8acc-40b6-9bee-d197fb492b3d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "e7ea9d22-e340-48d3-bdd6-fb476c14ac28", + "name": "Create a new Cloud Server - default", + "request": { + "urlPathTemplate": "/1.3/server", + "method": "POST" + }, + "response": { + "status": 202, + "body": "{\n \"server\": {\n \"boot_order\": \"cdrom,disk\",\n \"core_number\": \"2\",\n \"created\": 1705320000,\n \"devices\": {\n \"device\": [\n {\n \"serial\": \"1723925007011\",\n \"type\": \"gpu\",\n \"model\": \"NVIDIA L40S\",\n \"metadata\": {\n \"serial\": \"1723925007011\",\n \"memory\": 48,\n \"cores\": 18176\n }\n }\n ]\n },\n \"firewall\": \"on\",\n \"firewall_private\": \"on\",\n \"firewall_private_default_incoming_action\": \"accept\",\n \"firewall_private_default_outgoing_action\": \"accept\",\n \"firewall_public_default_incoming_action\": \"accept\",\n \"firewall_public_default_outgoing_action\": \"accept\",\n \"host\": 7653311107,\n \"hostname\": \"my-server.example.com\",\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.10\",\n \"access\": \"utility\",\n \"family\": \"IPv4\"\n }\n ]\n },\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ]\n },\n \"license\": \"0\",\n \"memory_amount\": \"2048\",\n \"metadata\": \"yes\",\n \"networking\": {\n \"interfaces\": {\n \"interface\": [\n {\n \"bootable\": \"no\",\n \"index\": 4,\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.20\",\n \"dhcp_provided\": \"yes\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"release\"\n }\n ]\n },\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"network\": \"0374ce47-4303-4490-987d-32dc96cfd79b\",\n \"source_ip_filtering\": \"yes\",\n \"type\": \"private\"\n }\n ]\n }\n },\n \"nic_model\": \"virtio\",\n \"plan\": \"1xCPU-1GB\",\n \"plan_ipv4_bytes\": \"plan_ipv4_bytes\",\n \"plan_ipv6_bytes\": \"plan_ipv6_bytes\",\n \"password\": \"password\",\n \"progress\": \"progress\",\n \"remote_access_enabled\": \"yes\",\n \"remote_access_host\": \"remote_access_host\",\n \"remote_access_password\": \"A1b2C3d4\",\n \"remote_access_port\": \"remote_access_port\",\n \"remote_access_type\": \"vnc\",\n \"server_group\": \"0b3d85b4-b3be-46ca-a1e2-3b5d40d60fb1\",\n \"simple_backup\": \"0100,dailies\",\n \"state\": \"maintenance\",\n \"storage_devices\": {\n \"storage_device\": [\n {\n \"address\": \"virtio:0\",\n \"boot_disk\": \"1\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"storage\": \"012580a1-32a1-466e-a323-689ca16f2d43\",\n \"storage_encrypted\": \"yes\",\n \"storage_size\": 20,\n \"storage_title\": \"Operating system disk\",\n \"type\": \"disk\"\n }\n ]\n },\n \"tags\": [\n \"tags\"\n ],\n \"timezone\": \"timezone\",\n \"title\": \"My Server\",\n \"username\": \"username\",\n \"uuid\": \"007bf7bd-e3cf-4a10-bf01-4251dc7f3b65\",\n \"video_model\": \"vga\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e7ea9d22-e340-48d3-bdd6-fb476c14ac28", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "6d449f4b-c0a0-49fc-8f92-f7532138350e", + "name": "List Cloud Servers related to a private firewall ruleset - default", + "request": { + "urlPathTemplate": "/1.3/server/firewall_ruleset_relationships/private/{ruleset_uuid}", + "method": "GET", + "pathParameters": { + "ruleset_uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"servers\": [\n {\n \"attached_rulesets\": [\n {\n \"applied_version\": 3,\n \"created_at\": 1787652930,\n \"firewall_ruleset_uuid\": \"190f56d8-4b3f-4a89-9e5f-320fbc3d17c8\",\n \"last_applied_at\": 1787652932,\n \"server_uuid\": \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\",\n \"type\": \"private\",\n \"updated_at\": null,\n \"version\": 3\n }\n ],\n \"firewall\": \"on\",\n \"firewall_private\": \"on\",\n \"firewall_private_default_incoming_action\": \"drop\",\n \"firewall_private_default_outgoing_action\": \"accept\",\n \"title\": \"Application server\",\n \"uuid\": \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "6d449f4b-c0a0-49fc-8f92-f7532138350e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "fe421dbd-4d45-4625-8419-3b0a5125332d", + "name": "List Cloud Server labels - default", + "request": { + "urlPathTemplate": "/1.3/server/labels", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"key\": \"env\",\n \"value\": \"production\"\n },\n {\n \"key\": \"team\",\n \"value\": \"platform\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "fe421dbd-4d45-4625-8419-3b0a5125332d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "2e0fe79b-a233-4bb6-b5ba-0e1e08c3dafd", + "name": "Get Cloud Server details - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"server\": {\n \"boot_order\": \"disk\",\n \"core_number\": \"12\",\n \"created\": 1705320000,\n \"devices\": {\n \"device\": [\n {\n \"serial\": \"1723925007011\",\n \"type\": \"gpu\",\n \"model\": \"NVIDIA L40S\",\n \"metadata\": {\n \"serial\": \"1723925007011\",\n \"memory\": 48,\n \"cores\": 18176\n }\n }\n ]\n },\n \"firewall\": \"on\",\n \"firewall_private\": \"on\",\n \"firewall_private_default_incoming_action\": \"accept\",\n \"firewall_private_default_outgoing_action\": \"accept\",\n \"firewall_public_default_incoming_action\": \"accept\",\n \"firewall_public_default_outgoing_action\": \"accept\",\n \"host\": 7653311107,\n \"hostname\": \"server1.example.com\",\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.10\",\n \"access\": \"utility\",\n \"family\": \"IPv4\"\n }\n ]\n },\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"development\"\n }\n ]\n },\n \"license\": \"0\",\n \"memory_amount\": \"130048\",\n \"metadata\": \"yes\",\n \"networking\": {\n \"interfaces\": {\n \"interface\": [\n {\n \"bootable\": \"no\",\n \"index\": 4,\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.20\",\n \"dhcp_provided\": \"yes\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"release\"\n }\n ]\n },\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"network\": \"0374ce47-4303-4490-987d-32dc96cfd79b\",\n \"source_ip_filtering\": \"yes\",\n \"type\": \"private\"\n }\n ]\n }\n },\n \"nic_model\": \"virtio\",\n \"plan\": \"GPU-12xCPU-128GB-2xL40S\",\n \"plan_ipv4_bytes\": \"3565675343\",\n \"plan_ipv6_bytes\": \"4534432\",\n \"password\": \"password\",\n \"progress\": \"progress\",\n \"remote_access_enabled\": \"yes\",\n \"remote_access_host\": \"remote_access_host\",\n \"remote_access_password\": \"A1b2C3d4\",\n \"remote_access_port\": \"remote_access_port\",\n \"remote_access_type\": \"vnc\",\n \"server_group\": \"0b3d85b4-b3be-46ca-a1e2-3b5d40d60fb1\",\n \"simple_backup\": \"0100,dailies\",\n \"state\": \"started\",\n \"storage_devices\": {\n \"storage_device\": [\n {\n \"address\": \"virtio:0\",\n \"boot_disk\": \"1\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"storage\": \"012580a1-32a1-466e-a323-689ca16f2d43\",\n \"storage_encrypted\": \"yes\",\n \"storage_size\": 20,\n \"storage_title\": \"Operating system disk\",\n \"type\": \"disk\"\n }\n ]\n },\n \"tags\": {\n \"tag\": [\n \"DEV\",\n \"Ubuntu\"\n ]\n },\n \"timezone\": \"UTC\",\n \"title\": \"Development GPU server\",\n \"username\": \"username\",\n \"uuid\": \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\",\n \"video_model\": \"cirrus\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2e0fe79b-a233-4bb6-b5ba-0e1e08c3dafd", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e30d40c9-b795-4926-a38b-ba24b5926d92", + "name": "Modify an existing Cloud Server - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}", + "method": "PUT", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 202, + "body": "{\n \"server\": {\n \"boot_order\": \"disk\",\n \"core_number\": \"12\",\n \"created\": 1705320000,\n \"devices\": {\n \"device\": [\n {\n \"serial\": \"1723925007011\",\n \"type\": \"gpu\",\n \"model\": \"NVIDIA L40S\",\n \"metadata\": {\n \"serial\": \"1723925007011\",\n \"memory\": 48,\n \"cores\": 18176\n }\n }\n ]\n },\n \"firewall\": \"on\",\n \"firewall_private\": \"on\",\n \"firewall_private_default_incoming_action\": \"accept\",\n \"firewall_private_default_outgoing_action\": \"accept\",\n \"firewall_public_default_incoming_action\": \"accept\",\n \"firewall_public_default_outgoing_action\": \"accept\",\n \"host\": 7653311107,\n \"hostname\": \"server1.example.com\",\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.10\",\n \"access\": \"utility\",\n \"family\": \"IPv4\"\n }\n ]\n },\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"development\"\n }\n ]\n },\n \"license\": \"0\",\n \"memory_amount\": \"130048\",\n \"metadata\": \"yes\",\n \"networking\": {\n \"interfaces\": {\n \"interface\": [\n {\n \"bootable\": \"no\",\n \"index\": 4,\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.20\",\n \"dhcp_provided\": \"yes\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"release\"\n }\n ]\n },\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"network\": \"0374ce47-4303-4490-987d-32dc96cfd79b\",\n \"source_ip_filtering\": \"yes\",\n \"type\": \"private\"\n }\n ]\n }\n },\n \"nic_model\": \"virtio\",\n \"plan\": \"GPU-12xCPU-128GB-2xL40S\",\n \"plan_ipv4_bytes\": \"3565675343\",\n \"plan_ipv6_bytes\": \"4534432\",\n \"password\": \"password\",\n \"progress\": \"progress\",\n \"remote_access_enabled\": \"yes\",\n \"remote_access_host\": \"remote_access_host\",\n \"remote_access_password\": \"A1b2C3d4\",\n \"remote_access_port\": \"remote_access_port\",\n \"remote_access_type\": \"vnc\",\n \"server_group\": \"0b3d85b4-b3be-46ca-a1e2-3b5d40d60fb1\",\n \"simple_backup\": \"0100,dailies\",\n \"state\": \"started\",\n \"storage_devices\": {\n \"storage_device\": [\n {\n \"address\": \"virtio:0\",\n \"boot_disk\": \"1\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"storage\": \"012580a1-32a1-466e-a323-689ca16f2d43\",\n \"storage_encrypted\": \"yes\",\n \"storage_size\": 20,\n \"storage_title\": \"Operating system disk\",\n \"type\": \"disk\"\n }\n ]\n },\n \"tags\": {\n \"tag\": [\n \"DEV\",\n \"Ubuntu\"\n ]\n },\n \"timezone\": \"UTC\",\n \"title\": \"Development GPU server\",\n \"username\": \"username\",\n \"uuid\": \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\",\n \"video_model\": \"cirrus\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e30d40c9-b795-4926-a38b-ba24b5926d92", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "cb5d49f1-c13a-49ff-9f01-7a687e632ca9", + "name": "Delete a Cloud Server - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "cb5d49f1-c13a-49ff-9f01-7a687e632ca9", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "17f00e3e-ad03-4cc2-8580-edac8a9f76d8", + "name": "Attach a private firewall ruleset - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/attach_firewall_ruleset/private", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"firewall_ruleset_uuid\": \"190f56d8-4b3f-4a89-9e5f-320fbc3d17c8\",\n \"server_uuid\": \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\",\n \"type\": \"private\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "17f00e3e-ad03-4cc2-8580-edac8a9f76d8", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "885e2d8b-c913-48ff-ab39-6e6020c1dcaf", + "name": "Cancel a Cloud Server operation - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/cancel", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "885e2d8b-c913-48ff-ab39-6e6020c1dcaf", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "dd6ff4a0-30a6-44f7-954e-5fe5aae3a594", + "name": "Eject the CD-ROM image from a Cloud Server - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/cdrom/eject", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"server\": {\n \"boot_order\": \"disk\",\n \"core_number\": \"12\",\n \"created\": 1705320000,\n \"devices\": {\n \"device\": [\n {\n \"serial\": \"1723925007011\",\n \"type\": \"gpu\",\n \"model\": \"NVIDIA L40S\",\n \"metadata\": {\n \"serial\": \"1723925007011\",\n \"memory\": 48,\n \"cores\": 18176\n }\n }\n ]\n },\n \"firewall\": \"on\",\n \"firewall_private\": \"on\",\n \"firewall_private_default_incoming_action\": \"accept\",\n \"firewall_private_default_outgoing_action\": \"accept\",\n \"firewall_public_default_incoming_action\": \"accept\",\n \"firewall_public_default_outgoing_action\": \"accept\",\n \"host\": 7653311107,\n \"hostname\": \"server1.example.com\",\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.10\",\n \"access\": \"utility\",\n \"family\": \"IPv4\"\n }\n ]\n },\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"development\"\n }\n ]\n },\n \"license\": \"0\",\n \"memory_amount\": \"130048\",\n \"metadata\": \"yes\",\n \"networking\": {\n \"interfaces\": {\n \"interface\": [\n {\n \"bootable\": \"no\",\n \"index\": 4,\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.20\",\n \"dhcp_provided\": \"yes\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"release\"\n }\n ]\n },\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"network\": \"0374ce47-4303-4490-987d-32dc96cfd79b\",\n \"source_ip_filtering\": \"yes\",\n \"type\": \"private\"\n }\n ]\n }\n },\n \"nic_model\": \"virtio\",\n \"plan\": \"GPU-12xCPU-128GB-2xL40S\",\n \"plan_ipv4_bytes\": \"3565675343\",\n \"plan_ipv6_bytes\": \"4534432\",\n \"password\": \"password\",\n \"progress\": \"progress\",\n \"remote_access_enabled\": \"yes\",\n \"remote_access_host\": \"remote_access_host\",\n \"remote_access_password\": \"A1b2C3d4\",\n \"remote_access_port\": \"remote_access_port\",\n \"remote_access_type\": \"vnc\",\n \"server_group\": \"0b3d85b4-b3be-46ca-a1e2-3b5d40d60fb1\",\n \"simple_backup\": \"0100,dailies\",\n \"state\": \"started\",\n \"storage_devices\": {\n \"storage_device\": [\n {\n \"address\": \"virtio:0\",\n \"boot_disk\": \"1\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"storage\": \"012580a1-32a1-466e-a323-689ca16f2d43\",\n \"storage_encrypted\": \"yes\",\n \"storage_size\": 20,\n \"storage_title\": \"Operating system disk\",\n \"type\": \"disk\"\n }\n ]\n },\n \"tags\": {\n \"tag\": [\n \"DEV\",\n \"Ubuntu\"\n ]\n },\n \"timezone\": \"UTC\",\n \"title\": \"Development GPU server\",\n \"username\": \"username\",\n \"uuid\": \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\",\n \"video_model\": \"cirrus\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "dd6ff4a0-30a6-44f7-954e-5fe5aae3a594", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d45f3ba7-03f6-4213-b08d-26ca23ab4e3e", + "name": "Load a CD-ROM image into a Cloud Server - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/cdrom/load", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"server\": {\n \"boot_order\": \"disk\",\n \"core_number\": \"12\",\n \"created\": 1705320000,\n \"devices\": {\n \"device\": [\n {\n \"serial\": \"1723925007011\",\n \"type\": \"gpu\",\n \"model\": \"NVIDIA L40S\",\n \"metadata\": {\n \"serial\": \"1723925007011\",\n \"memory\": 48,\n \"cores\": 18176\n }\n }\n ]\n },\n \"firewall\": \"on\",\n \"firewall_private\": \"on\",\n \"firewall_private_default_incoming_action\": \"accept\",\n \"firewall_private_default_outgoing_action\": \"accept\",\n \"firewall_public_default_incoming_action\": \"accept\",\n \"firewall_public_default_outgoing_action\": \"accept\",\n \"host\": 7653311107,\n \"hostname\": \"server1.example.com\",\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.10\",\n \"access\": \"utility\",\n \"family\": \"IPv4\"\n }\n ]\n },\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"development\"\n }\n ]\n },\n \"license\": \"0\",\n \"memory_amount\": \"130048\",\n \"metadata\": \"yes\",\n \"networking\": {\n \"interfaces\": {\n \"interface\": [\n {\n \"bootable\": \"no\",\n \"index\": 4,\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.20\",\n \"dhcp_provided\": \"yes\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"release\"\n }\n ]\n },\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"network\": \"0374ce47-4303-4490-987d-32dc96cfd79b\",\n \"source_ip_filtering\": \"yes\",\n \"type\": \"private\"\n }\n ]\n }\n },\n \"nic_model\": \"virtio\",\n \"plan\": \"GPU-12xCPU-128GB-2xL40S\",\n \"plan_ipv4_bytes\": \"3565675343\",\n \"plan_ipv6_bytes\": \"4534432\",\n \"password\": \"password\",\n \"progress\": \"progress\",\n \"remote_access_enabled\": \"yes\",\n \"remote_access_host\": \"remote_access_host\",\n \"remote_access_password\": \"A1b2C3d4\",\n \"remote_access_port\": \"remote_access_port\",\n \"remote_access_type\": \"vnc\",\n \"server_group\": \"0b3d85b4-b3be-46ca-a1e2-3b5d40d60fb1\",\n \"simple_backup\": \"0100,dailies\",\n \"state\": \"started\",\n \"storage_devices\": {\n \"storage_device\": [\n {\n \"address\": \"virtio:0\",\n \"boot_disk\": \"1\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"storage\": \"012580a1-32a1-466e-a323-689ca16f2d43\",\n \"storage_encrypted\": \"yes\",\n \"storage_size\": 20,\n \"storage_title\": \"Operating system disk\",\n \"type\": \"disk\"\n }\n ]\n },\n \"tags\": {\n \"tag\": [\n \"DEV\",\n \"Ubuntu\"\n ]\n },\n \"timezone\": \"UTC\",\n \"title\": \"Development GPU server\",\n \"username\": \"username\",\n \"uuid\": \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\",\n \"video_model\": \"cirrus\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d45f3ba7-03f6-4213-b08d-26ca23ab4e3e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "7dd02499-505b-4b36-9e3b-13e0a10a67cb", + "name": "Detach a private firewall ruleset - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/detach_firewall_ruleset/private", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"firewall_ruleset_uuid\": \"190f56d8-4b3f-4a89-9e5f-320fbc3d17c8\",\n \"server_uuid\": \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\",\n \"type\": \"private\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7dd02499-505b-4b36-9e3b-13e0a10a67cb", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "8fbc0f7e-4d80-43e6-ae13-b200583688ab", + "name": "List firewall rules - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/firewall_rule", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"firewall_rules\": {\n \"firewall_rule\": [\n {\n \"action\": \"accept\",\n \"comment\": \"Allow SSH from the office network\",\n \"destination_address_end\": \"\",\n \"destination_address_start\": \"\",\n \"destination_port_end\": \"22\",\n \"destination_port_start\": \"22\",\n \"direction\": \"in\",\n \"family\": \"IPv4\",\n \"icmp_type\": \"\",\n \"position\": \"1\",\n \"protocol\": \"tcp\",\n \"source_address_end\": \"192.0.2.255\",\n \"source_address_start\": \"192.0.2.1\",\n \"source_port_end\": \"\",\n \"source_port_start\": \"\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "8fbc0f7e-4d80-43e6-ae13-b200583688ab", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "93750b30-20e8-4960-8185-cd7316e21b0c", + "name": "Create a firewall rule - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/firewall_rule", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"firewall_rule\": {\n \"action\": \"accept\",\n \"comment\": \"Allow SSH from the office network\",\n \"destination_address_end\": \"\",\n \"destination_address_start\": \"\",\n \"destination_port_end\": \"22\",\n \"destination_port_start\": \"22\",\n \"direction\": \"in\",\n \"family\": \"IPv4\",\n \"icmp_type\": \"\",\n \"position\": \"1\",\n \"protocol\": \"tcp\",\n \"source_address_end\": \"192.0.2.255\",\n \"source_address_start\": \"192.0.2.1\",\n \"source_port_end\": \"\",\n \"source_port_start\": \"\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "93750b30-20e8-4960-8185-cd7316e21b0c", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e760cc23-bf9d-4bb7-8751-a3e3c45bc8cb", + "name": "Replace firewall rules - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/firewall_rule", + "method": "PUT", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e760cc23-bf9d-4bb7-8751-a3e3c45bc8cb", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "8b08bf22-649e-4b4c-a4dc-c1aceb00f78b", + "name": "Get a firewall rule - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/firewall_rule/{position}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "position": { + "equalTo": "1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"firewall_rule\": {\n \"action\": \"accept\",\n \"comment\": \"Allow SSH from the office network\",\n \"destination_address_end\": \"\",\n \"destination_address_start\": \"\",\n \"destination_port_end\": \"22\",\n \"destination_port_start\": \"22\",\n \"direction\": \"in\",\n \"family\": \"IPv4\",\n \"icmp_type\": \"\",\n \"position\": \"1\",\n \"protocol\": \"tcp\",\n \"source_address_end\": \"192.0.2.255\",\n \"source_address_start\": \"192.0.2.1\",\n \"source_port_end\": \"\",\n \"source_port_start\": \"\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "8b08bf22-649e-4b4c-a4dc-c1aceb00f78b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "7fff356d-67e2-4767-a39b-3026e306dc3d", + "name": "Delete a firewall rule - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/firewall_rule/{position}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "position": { + "equalTo": "1" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7fff356d-67e2-4767-a39b-3026e306dc3d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1f25a654-fd57-42b7-9c7f-8d954d7231fe", + "name": "List private firewall ruleset relationships for a Cloud Server - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/firewall_ruleset_relationships/private", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"firewall_ruleset_relationships\": {\n \"private\": [\n {\n \"applied_version\": 3,\n \"created_at\": \"2026-08-25T10:15:30Z\",\n \"firewall_ruleset_uuid\": \"190f56d8-4b3f-4a89-9e5f-320fbc3d17c8\",\n \"last_applied_at\": \"2026-08-25T10:15:32Z\",\n \"server_uuid\": \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\",\n \"type\": \"private\",\n \"updated_at\": \"2026-07-01T00:00:00Z\",\n \"version\": 3\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1f25a654-fd57-42b7-9c7f-8d954d7231fe", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f6310d16-45a1-442c-9bfd-ba2dce32a74a", + "name": "List Cloud Server GPUs - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/gpus", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"gpus\": [\n {\n \"firmware\": \"92.00.18.00.01\",\n \"serial\": \"GPU-01234567\",\n \"part\": \"900-5G132-2500-000\",\n \"model\": \"NVIDIA RTX A5000\",\n \"memory_gib\": 24,\n \"cores\": 5888\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f6310d16-45a1-442c-9bfd-ba2dce32a74a", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4cf4a454-1b79-4d30-8f34-aeaeda510e23", + "name": "Get Cloud Server networking details - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/networking", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"networking\": {\n \"interfaces\": {\n \"interface\": [\n {\n \"bootable\": \"no\",\n \"index\": 4,\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.20\",\n \"dhcp_provided\": \"yes\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"release\"\n }\n ]\n },\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"network\": \"0374ce47-4303-4490-987d-32dc96cfd79b\",\n \"source_ip_filtering\": \"yes\",\n \"type\": \"private\"\n }\n ]\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4cf4a454-1b79-4d30-8f34-aeaeda510e23", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "3b13cc01-409f-4086-8888-bcaceeb4ee2f", + "name": "Add a network interface - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/networking/interface", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"interface\": {\n \"bootable\": \"no\",\n \"index\": 4,\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.20\",\n \"dhcp_provided\": \"yes\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"release\"\n }\n ]\n },\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"network\": \"0374ce47-4303-4490-987d-32dc96cfd79b\",\n \"source_ip_filtering\": \"yes\",\n \"type\": \"private\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "3b13cc01-409f-4086-8888-bcaceeb4ee2f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f7a1ae9c-eda8-4f17-bb59-414c20727454", + "name": "Modify a network interface - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/networking/interface/{index}", + "method": "PUT", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "index": { + "equalTo": "1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"interface\": {\n \"bootable\": \"no\",\n \"index\": 4,\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.20\",\n \"dhcp_provided\": \"yes\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"release\"\n }\n ]\n },\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"network\": \"0374ce47-4303-4490-987d-32dc96cfd79b\",\n \"source_ip_filtering\": \"yes\",\n \"type\": \"private\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f7a1ae9c-eda8-4f17-bb59-414c20727454", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ab137947-3c9a-4bc6-8170-7505a163337c", + "name": "Delete a network interface - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/networking/interface/{index}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "index": { + "equalTo": "1" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ab137947-3c9a-4bc6-8170-7505a163337c", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2b0596f1-2213-402f-92a1-cc756a574c90", + "name": "Add an IP address to a network interface - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/networking/interface/{index}/ip_address", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "index": { + "equalTo": "1" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"ip_address\": {\n \"address\": \"10.0.0.30\",\n \"dhcp_provided\": \"no\",\n \"family\": \"IPv4\",\n \"floating\": \"yes\",\n \"release_policy\": \"release\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2b0596f1-2213-402f-92a1-cc756a574c90", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "cbc89efd-52e1-4341-9720-660838190cba", + "name": "Delete an IP address from a network interface - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/networking/interface/{index}/ip_address/{ip}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "index": { + "equalTo": "1" + }, + "ip": { + "equalTo": "ip" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "cbc89efd-52e1-4341-9720-660838190cba", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "76f09da6-9574-4f56-aa33-e5bfb7af4770", + "name": "Rebuild a Cloud Server - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/rebuild", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 202, + "body": "{\n \"server\": {\n \"boot_order\": \"disk\",\n \"core_number\": \"12\",\n \"created\": 1705320000,\n \"devices\": {\n \"device\": [\n {\n \"serial\": \"1723925007011\",\n \"type\": \"gpu\",\n \"model\": \"NVIDIA L40S\",\n \"metadata\": {\n \"serial\": \"1723925007011\",\n \"memory\": 48,\n \"cores\": 18176\n }\n }\n ]\n },\n \"firewall\": \"on\",\n \"firewall_private\": \"on\",\n \"firewall_private_default_incoming_action\": \"accept\",\n \"firewall_private_default_outgoing_action\": \"accept\",\n \"firewall_public_default_incoming_action\": \"accept\",\n \"firewall_public_default_outgoing_action\": \"accept\",\n \"host\": 7653311107,\n \"hostname\": \"server1.example.com\",\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.10\",\n \"access\": \"utility\",\n \"family\": \"IPv4\"\n }\n ]\n },\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"development\"\n }\n ]\n },\n \"license\": \"0\",\n \"memory_amount\": \"130048\",\n \"metadata\": \"yes\",\n \"networking\": {\n \"interfaces\": {\n \"interface\": [\n {\n \"bootable\": \"no\",\n \"index\": 4,\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.20\",\n \"dhcp_provided\": \"yes\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"release\"\n }\n ]\n },\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"network\": \"0374ce47-4303-4490-987d-32dc96cfd79b\",\n \"source_ip_filtering\": \"yes\",\n \"type\": \"private\"\n }\n ]\n }\n },\n \"nic_model\": \"virtio\",\n \"plan\": \"GPU-12xCPU-128GB-2xL40S\",\n \"plan_ipv4_bytes\": \"3565675343\",\n \"plan_ipv6_bytes\": \"4534432\",\n \"password\": \"password\",\n \"progress\": \"progress\",\n \"remote_access_enabled\": \"yes\",\n \"remote_access_host\": \"remote_access_host\",\n \"remote_access_password\": \"A1b2C3d4\",\n \"remote_access_port\": \"remote_access_port\",\n \"remote_access_type\": \"vnc\",\n \"server_group\": \"0b3d85b4-b3be-46ca-a1e2-3b5d40d60fb1\",\n \"simple_backup\": \"0100,dailies\",\n \"state\": \"started\",\n \"storage_devices\": {\n \"storage_device\": [\n {\n \"address\": \"virtio:0\",\n \"boot_disk\": \"1\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"storage\": \"012580a1-32a1-466e-a323-689ca16f2d43\",\n \"storage_encrypted\": \"yes\",\n \"storage_size\": 20,\n \"storage_title\": \"Operating system disk\",\n \"type\": \"disk\"\n }\n ]\n },\n \"tags\": {\n \"tag\": [\n \"DEV\",\n \"Ubuntu\"\n ]\n },\n \"timezone\": \"UTC\",\n \"title\": \"Development GPU server\",\n \"username\": \"username\",\n \"uuid\": \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\",\n \"video_model\": \"cirrus\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "76f09da6-9574-4f56-aa33-e5bfb7af4770", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "a5e23f8c-e3a0-4465-9f6f-381da06d289d", + "name": "Relocate a Cloud Server to another zone - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/relocate", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"server\": {\n \"boot_order\": \"disk\",\n \"core_number\": \"12\",\n \"created\": 1705320000,\n \"devices\": {\n \"device\": [\n {\n \"serial\": \"1723925007011\",\n \"type\": \"gpu\",\n \"model\": \"NVIDIA L40S\",\n \"metadata\": {\n \"serial\": \"1723925007011\",\n \"memory\": 48,\n \"cores\": 18176\n }\n }\n ]\n },\n \"firewall\": \"on\",\n \"firewall_private\": \"on\",\n \"firewall_private_default_incoming_action\": \"accept\",\n \"firewall_private_default_outgoing_action\": \"accept\",\n \"firewall_public_default_incoming_action\": \"accept\",\n \"firewall_public_default_outgoing_action\": \"accept\",\n \"host\": 7653311107,\n \"hostname\": \"server1.example.com\",\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.10\",\n \"access\": \"utility\",\n \"family\": \"IPv4\"\n }\n ]\n },\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"development\"\n }\n ]\n },\n \"license\": \"0\",\n \"memory_amount\": \"130048\",\n \"metadata\": \"yes\",\n \"networking\": {\n \"interfaces\": {\n \"interface\": [\n {\n \"bootable\": \"no\",\n \"index\": 4,\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.20\",\n \"dhcp_provided\": \"yes\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"release\"\n }\n ]\n },\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"network\": \"0374ce47-4303-4490-987d-32dc96cfd79b\",\n \"source_ip_filtering\": \"yes\",\n \"type\": \"private\"\n }\n ]\n }\n },\n \"nic_model\": \"virtio\",\n \"plan\": \"GPU-12xCPU-128GB-2xL40S\",\n \"plan_ipv4_bytes\": \"3565675343\",\n \"plan_ipv6_bytes\": \"4534432\",\n \"password\": \"password\",\n \"progress\": \"progress\",\n \"remote_access_enabled\": \"yes\",\n \"remote_access_host\": \"remote_access_host\",\n \"remote_access_password\": \"A1b2C3d4\",\n \"remote_access_port\": \"remote_access_port\",\n \"remote_access_type\": \"vnc\",\n \"server_group\": \"0b3d85b4-b3be-46ca-a1e2-3b5d40d60fb1\",\n \"simple_backup\": \"0100,dailies\",\n \"state\": \"started\",\n \"storage_devices\": {\n \"storage_device\": [\n {\n \"address\": \"virtio:0\",\n \"boot_disk\": \"1\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"storage\": \"012580a1-32a1-466e-a323-689ca16f2d43\",\n \"storage_encrypted\": \"yes\",\n \"storage_size\": 20,\n \"storage_title\": \"Operating system disk\",\n \"type\": \"disk\"\n }\n ]\n },\n \"tags\": {\n \"tag\": [\n \"DEV\",\n \"Ubuntu\"\n ]\n },\n \"timezone\": \"UTC\",\n \"title\": \"Development GPU server\",\n \"username\": \"username\",\n \"uuid\": \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\",\n \"video_model\": \"cirrus\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a5e23f8c-e3a0-4465-9f6f-381da06d289d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "287660f5-81da-4cb6-83d1-d9dc021cc8e9", + "name": "Get remote access connection details - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/remote_access_details", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"server\": {\n \"state\": \"started\",\n \"vnc_host\": \"94.237.1.20\",\n \"vnc_password\": \"A1b2C3d4\",\n \"vnc_port\": 5901,\n \"remote_access_type\": \"vnc\",\n \"remote_access_enabled\": \"yes\",\n \"remote_access_password\": \"A1b2C3d4\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "287660f5-81da-4cb6-83d1-d9dc021cc8e9", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "7997d6b2-3a20-4e2a-9dac-93c519d08087", + "name": "Restart a Cloud Server - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/restart", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"server\": {\n \"boot_order\": \"disk\",\n \"core_number\": \"12\",\n \"created\": 1705320000,\n \"devices\": {\n \"device\": [\n {\n \"serial\": \"1723925007011\",\n \"type\": \"gpu\",\n \"model\": \"NVIDIA L40S\",\n \"metadata\": {\n \"serial\": \"1723925007011\",\n \"memory\": 48,\n \"cores\": 18176\n }\n }\n ]\n },\n \"firewall\": \"on\",\n \"firewall_private\": \"on\",\n \"firewall_private_default_incoming_action\": \"accept\",\n \"firewall_private_default_outgoing_action\": \"accept\",\n \"firewall_public_default_incoming_action\": \"accept\",\n \"firewall_public_default_outgoing_action\": \"accept\",\n \"host\": 7653311107,\n \"hostname\": \"server1.example.com\",\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.10\",\n \"access\": \"utility\",\n \"family\": \"IPv4\"\n }\n ]\n },\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"development\"\n }\n ]\n },\n \"license\": \"0\",\n \"memory_amount\": \"130048\",\n \"metadata\": \"yes\",\n \"networking\": {\n \"interfaces\": {\n \"interface\": [\n {\n \"bootable\": \"no\",\n \"index\": 4,\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.20\",\n \"dhcp_provided\": \"yes\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"release\"\n }\n ]\n },\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"network\": \"0374ce47-4303-4490-987d-32dc96cfd79b\",\n \"source_ip_filtering\": \"yes\",\n \"type\": \"private\"\n }\n ]\n }\n },\n \"nic_model\": \"virtio\",\n \"plan\": \"GPU-12xCPU-128GB-2xL40S\",\n \"plan_ipv4_bytes\": \"3565675343\",\n \"plan_ipv6_bytes\": \"4534432\",\n \"password\": \"password\",\n \"progress\": \"progress\",\n \"remote_access_enabled\": \"yes\",\n \"remote_access_host\": \"remote_access_host\",\n \"remote_access_password\": \"A1b2C3d4\",\n \"remote_access_port\": \"remote_access_port\",\n \"remote_access_type\": \"vnc\",\n \"server_group\": \"0b3d85b4-b3be-46ca-a1e2-3b5d40d60fb1\",\n \"simple_backup\": \"0100,dailies\",\n \"state\": \"started\",\n \"storage_devices\": {\n \"storage_device\": [\n {\n \"address\": \"virtio:0\",\n \"boot_disk\": \"1\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"storage\": \"012580a1-32a1-466e-a323-689ca16f2d43\",\n \"storage_encrypted\": \"yes\",\n \"storage_size\": 20,\n \"storage_title\": \"Operating system disk\",\n \"type\": \"disk\"\n }\n ]\n },\n \"tags\": {\n \"tag\": [\n \"DEV\",\n \"Ubuntu\"\n ]\n },\n \"timezone\": \"UTC\",\n \"title\": \"Development GPU server\",\n \"username\": \"username\",\n \"uuid\": \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\",\n \"video_model\": \"cirrus\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7997d6b2-3a20-4e2a-9dac-93c519d08087", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "200ce26f-499a-4127-aefa-7c26e03ba776", + "name": "Start a Cloud Server - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/start", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"server\": {\n \"boot_order\": \"disk\",\n \"core_number\": \"12\",\n \"created\": 1705320000,\n \"devices\": {\n \"device\": [\n {\n \"serial\": \"1723925007011\",\n \"type\": \"gpu\",\n \"model\": \"NVIDIA L40S\",\n \"metadata\": {\n \"serial\": \"1723925007011\",\n \"memory\": 48,\n \"cores\": 18176\n }\n }\n ]\n },\n \"firewall\": \"on\",\n \"firewall_private\": \"on\",\n \"firewall_private_default_incoming_action\": \"accept\",\n \"firewall_private_default_outgoing_action\": \"accept\",\n \"firewall_public_default_incoming_action\": \"accept\",\n \"firewall_public_default_outgoing_action\": \"accept\",\n \"host\": 7653311107,\n \"hostname\": \"server1.example.com\",\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.10\",\n \"access\": \"utility\",\n \"family\": \"IPv4\"\n }\n ]\n },\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"development\"\n }\n ]\n },\n \"license\": \"0\",\n \"memory_amount\": \"130048\",\n \"metadata\": \"yes\",\n \"networking\": {\n \"interfaces\": {\n \"interface\": [\n {\n \"bootable\": \"no\",\n \"index\": 4,\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.20\",\n \"dhcp_provided\": \"yes\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"release\"\n }\n ]\n },\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"network\": \"0374ce47-4303-4490-987d-32dc96cfd79b\",\n \"source_ip_filtering\": \"yes\",\n \"type\": \"private\"\n }\n ]\n }\n },\n \"nic_model\": \"virtio\",\n \"plan\": \"GPU-12xCPU-128GB-2xL40S\",\n \"plan_ipv4_bytes\": \"3565675343\",\n \"plan_ipv6_bytes\": \"4534432\",\n \"password\": \"password\",\n \"progress\": \"progress\",\n \"remote_access_enabled\": \"yes\",\n \"remote_access_host\": \"remote_access_host\",\n \"remote_access_password\": \"A1b2C3d4\",\n \"remote_access_port\": \"remote_access_port\",\n \"remote_access_type\": \"vnc\",\n \"server_group\": \"0b3d85b4-b3be-46ca-a1e2-3b5d40d60fb1\",\n \"simple_backup\": \"0100,dailies\",\n \"state\": \"started\",\n \"storage_devices\": {\n \"storage_device\": [\n {\n \"address\": \"virtio:0\",\n \"boot_disk\": \"1\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"storage\": \"012580a1-32a1-466e-a323-689ca16f2d43\",\n \"storage_encrypted\": \"yes\",\n \"storage_size\": 20,\n \"storage_title\": \"Operating system disk\",\n \"type\": \"disk\"\n }\n ]\n },\n \"tags\": {\n \"tag\": [\n \"DEV\",\n \"Ubuntu\"\n ]\n },\n \"timezone\": \"UTC\",\n \"title\": \"Development GPU server\",\n \"username\": \"username\",\n \"uuid\": \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\",\n \"video_model\": \"cirrus\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "200ce26f-499a-4127-aefa-7c26e03ba776", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "255d3c78-c4a7-4fbe-9041-394e1575f95c", + "name": "Get Cloud Server CPU statistics - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/stats/cpu", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"stats\": {\n \"daily\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 %\",\n \"current\": \"8 %\",\n \"title\": \"CPU usage %\",\n \"maximum\": \"37 %\",\n \"total\": \"51 seconds\"\n }\n ]\n }\n },\n \"monthly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 %\",\n \"current\": \"8 %\",\n \"title\": \"CPU usage %\",\n \"maximum\": \"37 %\",\n \"total\": \"51 seconds\"\n }\n ]\n }\n },\n \"yearly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 %\",\n \"current\": \"8 %\",\n \"title\": \"CPU usage %\",\n \"maximum\": \"37 %\",\n \"total\": \"51 seconds\"\n }\n ]\n }\n },\n \"weekly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 %\",\n \"current\": \"8 %\",\n \"title\": \"CPU usage %\",\n \"maximum\": \"37 %\",\n \"total\": \"51 seconds\"\n }\n ]\n }\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "255d3c78-c4a7-4fbe-9041-394e1575f95c", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "8e3a6b9b-cb16-4929-9cdf-7435b560adbc", + "name": "Get Cloud Server CPU statistics by period - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/stats/cpu/{period}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "period": { + "equalTo": "daily" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"stats\": {\n \"daily\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 %\",\n \"current\": \"8 %\",\n \"title\": \"CPU usage %\",\n \"maximum\": \"37 %\",\n \"total\": \"51 seconds\"\n }\n ]\n }\n },\n \"monthly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 %\",\n \"current\": \"8 %\",\n \"title\": \"CPU usage %\",\n \"maximum\": \"37 %\",\n \"total\": \"51 seconds\"\n }\n ]\n }\n },\n \"yearly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 %\",\n \"current\": \"8 %\",\n \"title\": \"CPU usage %\",\n \"maximum\": \"37 %\",\n \"total\": \"51 seconds\"\n }\n ]\n }\n },\n \"weekly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 %\",\n \"current\": \"8 %\",\n \"title\": \"CPU usage %\",\n \"maximum\": \"37 %\",\n \"total\": \"51 seconds\"\n }\n ]\n }\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "8e3a6b9b-cb16-4929-9cdf-7435b560adbc", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "02e11a53-d452-4863-b43b-b8e3a109f82f", + "name": "Get Cloud Server disk statistics - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/stats/disk/{type}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "type": { + "equalTo": "bytes" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"stats\": {\n \"daily\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"1.5 MiBps\",\n \"current\": \"2.0 MiBps\",\n \"title\": \"Read\",\n \"maximum\": \"4.0 MiBps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n },\n \"monthly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"1.5 MiBps\",\n \"current\": \"2.0 MiBps\",\n \"title\": \"Read\",\n \"maximum\": \"4.0 MiBps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n },\n \"yearly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"1.5 MiBps\",\n \"current\": \"2.0 MiBps\",\n \"title\": \"Read\",\n \"maximum\": \"4.0 MiBps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n },\n \"weekly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"1.5 MiBps\",\n \"current\": \"2.0 MiBps\",\n \"title\": \"Read\",\n \"maximum\": \"4.0 MiBps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "02e11a53-d452-4863-b43b-b8e3a109f82f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2c753376-ed36-4442-a2d8-b476fd5ce323", + "name": "Get Cloud Server disk statistics by period - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/stats/disk/{type}/{period}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "type": { + "equalTo": "bytes" + }, + "period": { + "equalTo": "daily" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"stats\": {\n \"daily\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"1.5 MiBps\",\n \"current\": \"2.0 MiBps\",\n \"title\": \"Read\",\n \"maximum\": \"4.0 MiBps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n },\n \"monthly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"1.5 MiBps\",\n \"current\": \"2.0 MiBps\",\n \"title\": \"Read\",\n \"maximum\": \"4.0 MiBps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n },\n \"yearly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"1.5 MiBps\",\n \"current\": \"2.0 MiBps\",\n \"title\": \"Read\",\n \"maximum\": \"4.0 MiBps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n },\n \"weekly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"1.5 MiBps\",\n \"current\": \"2.0 MiBps\",\n \"title\": \"Read\",\n \"maximum\": \"4.0 MiBps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2c753376-ed36-4442-a2d8-b476fd5ce323", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4f3abbdd-3ae1-4a22-89fd-ffdbd68342ab", + "name": "Get Cloud Server network statistics - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/stats/network/{type}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "type": { + "equalTo": "bytes" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"stats\": {\n \"daily\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 Mbps\",\n \"current\": \"8.5 Mbps\",\n \"title\": \"In\",\n \"maximum\": \"24 Mbps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n },\n \"monthly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 Mbps\",\n \"current\": \"8.5 Mbps\",\n \"title\": \"In\",\n \"maximum\": \"24 Mbps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n },\n \"yearly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 Mbps\",\n \"current\": \"8.5 Mbps\",\n \"title\": \"In\",\n \"maximum\": \"24 Mbps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n },\n \"weekly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 Mbps\",\n \"current\": \"8.5 Mbps\",\n \"title\": \"In\",\n \"maximum\": \"24 Mbps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4f3abbdd-3ae1-4a22-89fd-ffdbd68342ab", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "daa45bfe-b3a6-49cc-8947-c000a2227df6", + "name": "Get Cloud Server network statistics by network type - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/stats/network/{type}/{network}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "type": { + "equalTo": "bytes" + }, + "network": { + "equalTo": "public" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"stats\": {\n \"daily\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 Mbps\",\n \"current\": \"8.5 Mbps\",\n \"title\": \"In\",\n \"maximum\": \"24 Mbps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n },\n \"monthly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 Mbps\",\n \"current\": \"8.5 Mbps\",\n \"title\": \"In\",\n \"maximum\": \"24 Mbps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n },\n \"yearly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 Mbps\",\n \"current\": \"8.5 Mbps\",\n \"title\": \"In\",\n \"maximum\": \"24 Mbps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n },\n \"weekly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 Mbps\",\n \"current\": \"8.5 Mbps\",\n \"title\": \"In\",\n \"maximum\": \"24 Mbps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "daa45bfe-b3a6-49cc-8947-c000a2227df6", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "604053f1-ac50-41ee-81ab-01261b3b5c6d", + "name": "Get Cloud Server network statistics by network type and period - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/stats/network/{type}/{network}/{period}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "type": { + "equalTo": "bytes" + }, + "network": { + "equalTo": "public" + }, + "period": { + "equalTo": "daily" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"stats\": {\n \"daily\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 Mbps\",\n \"current\": \"8.5 Mbps\",\n \"title\": \"In\",\n \"maximum\": \"24 Mbps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n },\n \"monthly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 Mbps\",\n \"current\": \"8.5 Mbps\",\n \"title\": \"In\",\n \"maximum\": \"24 Mbps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n },\n \"yearly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 Mbps\",\n \"current\": \"8.5 Mbps\",\n \"title\": \"In\",\n \"maximum\": \"24 Mbps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n },\n \"weekly\": {\n \"summary\": {\n \"variable\": [\n {\n \"average\": \"12 Mbps\",\n \"current\": \"8.5 Mbps\",\n \"title\": \"In\",\n \"maximum\": \"24 Mbps\",\n \"total\": \"8.0 GiB\"\n }\n ]\n }\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "604053f1-ac50-41ee-81ab-01261b3b5c6d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d7ba8dfe-3ba4-4ada-9cca-eee93dd154b6", + "name": "Stop a Cloud Server - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/stop", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"server\": {\n \"boot_order\": \"disk\",\n \"core_number\": \"12\",\n \"created\": 1705320000,\n \"devices\": {\n \"device\": [\n {\n \"serial\": \"1723925007011\",\n \"type\": \"gpu\",\n \"model\": \"NVIDIA L40S\",\n \"metadata\": {\n \"serial\": \"1723925007011\",\n \"memory\": 48,\n \"cores\": 18176\n }\n }\n ]\n },\n \"firewall\": \"on\",\n \"firewall_private\": \"on\",\n \"firewall_private_default_incoming_action\": \"accept\",\n \"firewall_private_default_outgoing_action\": \"accept\",\n \"firewall_public_default_incoming_action\": \"accept\",\n \"firewall_public_default_outgoing_action\": \"accept\",\n \"host\": 7653311107,\n \"hostname\": \"server1.example.com\",\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.10\",\n \"access\": \"utility\",\n \"family\": \"IPv4\"\n }\n ]\n },\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"development\"\n }\n ]\n },\n \"license\": \"0\",\n \"memory_amount\": \"130048\",\n \"metadata\": \"yes\",\n \"networking\": {\n \"interfaces\": {\n \"interface\": [\n {\n \"bootable\": \"no\",\n \"index\": 4,\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.20\",\n \"dhcp_provided\": \"yes\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"release\"\n }\n ]\n },\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"network\": \"0374ce47-4303-4490-987d-32dc96cfd79b\",\n \"source_ip_filtering\": \"yes\",\n \"type\": \"private\"\n }\n ]\n }\n },\n \"nic_model\": \"virtio\",\n \"plan\": \"GPU-12xCPU-128GB-2xL40S\",\n \"plan_ipv4_bytes\": \"3565675343\",\n \"plan_ipv6_bytes\": \"4534432\",\n \"password\": \"password\",\n \"progress\": \"progress\",\n \"remote_access_enabled\": \"yes\",\n \"remote_access_host\": \"remote_access_host\",\n \"remote_access_password\": \"A1b2C3d4\",\n \"remote_access_port\": \"remote_access_port\",\n \"remote_access_type\": \"vnc\",\n \"server_group\": \"0b3d85b4-b3be-46ca-a1e2-3b5d40d60fb1\",\n \"simple_backup\": \"0100,dailies\",\n \"state\": \"started\",\n \"storage_devices\": {\n \"storage_device\": [\n {\n \"address\": \"virtio:0\",\n \"boot_disk\": \"1\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"storage\": \"012580a1-32a1-466e-a323-689ca16f2d43\",\n \"storage_encrypted\": \"yes\",\n \"storage_size\": 20,\n \"storage_title\": \"Operating system disk\",\n \"type\": \"disk\"\n }\n ]\n },\n \"tags\": {\n \"tag\": [\n \"DEV\",\n \"Ubuntu\"\n ]\n },\n \"timezone\": \"UTC\",\n \"title\": \"Development GPU server\",\n \"username\": \"username\",\n \"uuid\": \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\",\n \"video_model\": \"cirrus\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d7ba8dfe-3ba4-4ada-9cca-eee93dd154b6", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "06c29ec8-f82c-4a88-9b28-284ef976ff32", + "name": "Attach a storage device to a Cloud Server - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/storage/attach", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"server\": {\n \"boot_order\": \"disk\",\n \"core_number\": \"12\",\n \"created\": 1705320000,\n \"devices\": {\n \"device\": [\n {\n \"serial\": \"1723925007011\",\n \"type\": \"gpu\",\n \"model\": \"NVIDIA L40S\",\n \"metadata\": {\n \"serial\": \"1723925007011\",\n \"memory\": 48,\n \"cores\": 18176\n }\n }\n ]\n },\n \"firewall\": \"on\",\n \"firewall_private\": \"on\",\n \"firewall_private_default_incoming_action\": \"accept\",\n \"firewall_private_default_outgoing_action\": \"accept\",\n \"firewall_public_default_incoming_action\": \"accept\",\n \"firewall_public_default_outgoing_action\": \"accept\",\n \"host\": 7653311107,\n \"hostname\": \"server1.example.com\",\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.10\",\n \"access\": \"utility\",\n \"family\": \"IPv4\"\n }\n ]\n },\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"development\"\n }\n ]\n },\n \"license\": \"0\",\n \"memory_amount\": \"130048\",\n \"metadata\": \"yes\",\n \"networking\": {\n \"interfaces\": {\n \"interface\": [\n {\n \"bootable\": \"no\",\n \"index\": 4,\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.20\",\n \"dhcp_provided\": \"yes\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"release\"\n }\n ]\n },\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"network\": \"0374ce47-4303-4490-987d-32dc96cfd79b\",\n \"source_ip_filtering\": \"yes\",\n \"type\": \"private\"\n }\n ]\n }\n },\n \"nic_model\": \"virtio\",\n \"plan\": \"GPU-12xCPU-128GB-2xL40S\",\n \"plan_ipv4_bytes\": \"3565675343\",\n \"plan_ipv6_bytes\": \"4534432\",\n \"password\": \"password\",\n \"progress\": \"progress\",\n \"remote_access_enabled\": \"yes\",\n \"remote_access_host\": \"remote_access_host\",\n \"remote_access_password\": \"A1b2C3d4\",\n \"remote_access_port\": \"remote_access_port\",\n \"remote_access_type\": \"vnc\",\n \"server_group\": \"0b3d85b4-b3be-46ca-a1e2-3b5d40d60fb1\",\n \"simple_backup\": \"0100,dailies\",\n \"state\": \"started\",\n \"storage_devices\": {\n \"storage_device\": [\n {\n \"address\": \"virtio:0\",\n \"boot_disk\": \"1\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"storage\": \"012580a1-32a1-466e-a323-689ca16f2d43\",\n \"storage_encrypted\": \"yes\",\n \"storage_size\": 20,\n \"storage_title\": \"Operating system disk\",\n \"type\": \"disk\"\n }\n ]\n },\n \"tags\": {\n \"tag\": [\n \"DEV\",\n \"Ubuntu\"\n ]\n },\n \"timezone\": \"UTC\",\n \"title\": \"Development GPU server\",\n \"username\": \"username\",\n \"uuid\": \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\",\n \"video_model\": \"cirrus\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "06c29ec8-f82c-4a88-9b28-284ef976ff32", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "23456af4-93db-4849-b94e-087858ae3440", + "name": "Detach a storage device from a Cloud Server - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/storage/detach", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"server\": {\n \"boot_order\": \"disk\",\n \"core_number\": \"12\",\n \"created\": 1705320000,\n \"devices\": {\n \"device\": [\n {\n \"serial\": \"1723925007011\",\n \"type\": \"gpu\",\n \"model\": \"NVIDIA L40S\",\n \"metadata\": {\n \"serial\": \"1723925007011\",\n \"memory\": 48,\n \"cores\": 18176\n }\n }\n ]\n },\n \"firewall\": \"on\",\n \"firewall_private\": \"on\",\n \"firewall_private_default_incoming_action\": \"accept\",\n \"firewall_private_default_outgoing_action\": \"accept\",\n \"firewall_public_default_incoming_action\": \"accept\",\n \"firewall_public_default_outgoing_action\": \"accept\",\n \"host\": 7653311107,\n \"hostname\": \"server1.example.com\",\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.10\",\n \"access\": \"utility\",\n \"family\": \"IPv4\"\n }\n ]\n },\n \"labels\": {\n \"label\": [\n {\n \"key\": \"env\",\n \"value\": \"development\"\n }\n ]\n },\n \"license\": \"0\",\n \"memory_amount\": \"130048\",\n \"metadata\": \"yes\",\n \"networking\": {\n \"interfaces\": {\n \"interface\": [\n {\n \"bootable\": \"no\",\n \"index\": 4,\n \"ip_addresses\": {\n \"ip_address\": [\n {\n \"address\": \"10.0.0.20\",\n \"dhcp_provided\": \"yes\",\n \"family\": \"IPv4\",\n \"floating\": \"no\",\n \"release_policy\": \"release\"\n }\n ]\n },\n \"mac\": \"de:ff:ff:ff:cc:20\",\n \"network\": \"0374ce47-4303-4490-987d-32dc96cfd79b\",\n \"source_ip_filtering\": \"yes\",\n \"type\": \"private\"\n }\n ]\n }\n },\n \"nic_model\": \"virtio\",\n \"plan\": \"GPU-12xCPU-128GB-2xL40S\",\n \"plan_ipv4_bytes\": \"3565675343\",\n \"plan_ipv6_bytes\": \"4534432\",\n \"password\": \"password\",\n \"progress\": \"progress\",\n \"remote_access_enabled\": \"yes\",\n \"remote_access_host\": \"remote_access_host\",\n \"remote_access_password\": \"A1b2C3d4\",\n \"remote_access_port\": \"remote_access_port\",\n \"remote_access_type\": \"vnc\",\n \"server_group\": \"0b3d85b4-b3be-46ca-a1e2-3b5d40d60fb1\",\n \"simple_backup\": \"0100,dailies\",\n \"state\": \"started\",\n \"storage_devices\": {\n \"storage_device\": [\n {\n \"address\": \"virtio:0\",\n \"boot_disk\": \"1\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"storage\": \"012580a1-32a1-466e-a323-689ca16f2d43\",\n \"storage_encrypted\": \"yes\",\n \"storage_size\": 20,\n \"storage_title\": \"Operating system disk\",\n \"type\": \"disk\"\n }\n ]\n },\n \"tags\": {\n \"tag\": [\n \"DEV\",\n \"Ubuntu\"\n ]\n },\n \"timezone\": \"UTC\",\n \"title\": \"Development GPU server\",\n \"username\": \"username\",\n \"uuid\": \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\",\n \"video_model\": \"cirrus\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "23456af4-93db-4849-b94e-087858ae3440", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4a5a526d-fc92-477a-9a7d-af3514727f64", + "name": "Get VNC connection details - default", + "request": { + "urlPathTemplate": "/1.3/server/{uuid}/vnc_details", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"server\": {\n \"state\": \"started\",\n \"vnc_host\": \"94.237.1.20\",\n \"vnc_password\": \"A1b2C3d4\",\n \"vnc_port\": 5901,\n \"remote_access_type\": \"vnc\",\n \"remote_access_enabled\": \"yes\",\n \"remote_access_password\": \"A1b2C3d4\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4a5a526d-fc92-477a-9a7d-af3514727f64", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "c56f065f-4fd2-4b6a-b5b1-a060955be10d", + "name": "List server sizes - default", + "request": { + "urlPathTemplate": "/1.3/server_size", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"server_sizes\": {\n \"server_size\": [\n {\n \"core_number\": \"2\",\n \"memory_amount\": \"4096\"\n },\n {\n \"core_number\": \"4\",\n \"memory_amount\": \"8192\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "c56f065f-4fd2-4b6a-b5b1-a060955be10d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "447ba8a0-1927-4a7d-b172-13589292eed3", + "name": "Get server size limits - default", + "request": { + "urlPathTemplate": "/1.3/server_size/limits", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"server_size_limits\": {\n \"core_number_min\": 1,\n \"core_number_max\": 64,\n \"memory_amount_min\": 1024,\n \"memory_amount_max\": 524288,\n \"memory_amount_step\": 1024\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "447ba8a0-1927-4a7d-b172-13589292eed3", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "8a6aafcb-21b0-4cea-8d4a-c3da36939ef8", + "name": "List storage resources - default", + "request": { + "urlPathTemplate": "/1.3/storage", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"storages\": {\n \"storage\": [\n {\n \"access\": \"private\",\n \"encrypted\": \"no\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"created\": \"2025-02-27T05:50:50Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"size\": 50,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Production database\",\n \"type\": \"normal\",\n \"uuid\": \"01f3286c-a5ea-4670-8121-d0b9767d625b\",\n \"zone\": \"fi-hel1\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "8a6aafcb-21b0-4cea-8d4a-c3da36939ef8", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "e4337d16-52cb-4b04-b87f-8f8dd6580b02", + "name": "Create Block Storage - default", + "request": { + "urlPathTemplate": "/1.3/storage", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"storage\": {\n \"access\": \"private\",\n \"encrypted\": \"yes\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"backup_rule\": {\n \"interval\": \"daily\",\n \"time\": \"0400\",\n \"retention\": \"7\"\n },\n \"backups\": {\n \"backup\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"created\": \"2026-08-26T09:15:00Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"part_of_plan\": \"yes\",\n \"progress\": \"progress\",\n \"servers\": {\n \"server\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"size\": 50,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Production data\",\n \"type\": \"normal\",\n \"template_type\": \"cloud-init\",\n \"uuid\": \"01d4fcd4-e446-433b-8a9c-551a1284952e\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e4337d16-52cb-4b04-b87f-8f8dd6580b02", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4cd43f3b-c3e1-4cef-a6b9-ae67ec774b42", + "name": "List storage backups - default", + "request": { + "urlPathTemplate": "/1.3/storage/backup", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"storages\": {\n \"storage\": [\n {\n \"access\": \"private\",\n \"encrypted\": \"no\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"created\": \"2025-02-27T05:50:50Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"size\": 50,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Production database\",\n \"type\": \"normal\",\n \"uuid\": \"01f3286c-a5ea-4670-8121-d0b9767d625b\",\n \"zone\": \"fi-hel1\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4cd43f3b-c3e1-4cef-a6b9-ae67ec774b42", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "9b24a394-78ad-43b6-bfc6-3e45fbfd4434", + "name": "List CD-ROM images - default", + "request": { + "urlPathTemplate": "/1.3/storage/cdrom", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"storages\": {\n \"storage\": [\n {\n \"access\": \"private\",\n \"encrypted\": \"no\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"created\": \"2025-02-27T05:50:50Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"size\": 50,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Production database\",\n \"type\": \"normal\",\n \"uuid\": \"01f3286c-a5ea-4670-8121-d0b9767d625b\",\n \"zone\": \"fi-hel1\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "9b24a394-78ad-43b6-bfc6-3e45fbfd4434", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "ccbebee3-2f61-432a-9bc7-687644538443", + "name": "List favorite storage resources - default", + "request": { + "urlPathTemplate": "/1.3/storage/favorite", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"storages\": {\n \"storage\": [\n {\n \"access\": \"private\",\n \"encrypted\": \"no\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"created\": \"2025-02-27T05:50:50Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"size\": 50,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Production database\",\n \"type\": \"normal\",\n \"uuid\": \"01f3286c-a5ea-4670-8121-d0b9767d625b\",\n \"zone\": \"fi-hel1\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ccbebee3-2f61-432a-9bc7-687644538443", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "59cc78e9-35b4-4fd7-8bcc-5d9a4a21036b", + "name": "List normal Block Storage - default", + "request": { + "urlPathTemplate": "/1.3/storage/normal", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"storages\": {\n \"storage\": [\n {\n \"access\": \"private\",\n \"encrypted\": \"no\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"created\": \"2025-02-27T05:50:50Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"size\": 50,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Production database\",\n \"type\": \"normal\",\n \"uuid\": \"01f3286c-a5ea-4670-8121-d0b9767d625b\",\n \"zone\": \"fi-hel1\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "59cc78e9-35b4-4fd7-8bcc-5d9a4a21036b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "d5358061-e7c4-42db-b10e-72a668bdaad2", + "name": "List private storage resources - default", + "request": { + "urlPathTemplate": "/1.3/storage/private", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"storages\": {\n \"storage\": [\n {\n \"access\": \"private\",\n \"encrypted\": \"no\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"created\": \"2025-02-27T05:50:50Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"size\": 50,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Production database\",\n \"type\": \"normal\",\n \"uuid\": \"01f3286c-a5ea-4670-8121-d0b9767d625b\",\n \"zone\": \"fi-hel1\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d5358061-e7c4-42db-b10e-72a668bdaad2", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "db5d805b-5b11-4bcf-ba13-c0b32a57ff0e", + "name": "List public storage resources - default", + "request": { + "urlPathTemplate": "/1.3/storage/public", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"storages\": {\n \"storage\": [\n {\n \"access\": \"private\",\n \"encrypted\": \"no\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"created\": \"2025-02-27T05:50:50Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"size\": 50,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Production database\",\n \"type\": \"normal\",\n \"uuid\": \"01f3286c-a5ea-4670-8121-d0b9767d625b\",\n \"zone\": \"fi-hel1\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "db5d805b-5b11-4bcf-ba13-c0b32a57ff0e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "9ca0fb44-8315-4e60-aea1-87727037e6a7", + "name": "List storage templates - default", + "request": { + "urlPathTemplate": "/1.3/storage/template", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"storages\": {\n \"storage\": [\n {\n \"access\": \"private\",\n \"encrypted\": \"no\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"created\": \"2025-02-27T05:50:50Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"size\": 50,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Production database\",\n \"type\": \"normal\",\n \"uuid\": \"01f3286c-a5ea-4670-8121-d0b9767d625b\",\n \"zone\": \"fi-hel1\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "9ca0fb44-8315-4e60-aea1-87727037e6a7", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "d8830409-8435-4b83-a88d-d063a2919cf0", + "name": "List storage resources by type and access - default", + "request": { + "urlPathTemplate": "/1.3/storage/{type}/{access}", + "method": "GET", + "pathParameters": { + "type": { + "equalTo": "normal" + }, + "access": { + "equalTo": "public" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"storages\": {\n \"storage\": [\n {\n \"access\": \"private\",\n \"encrypted\": \"no\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"created\": \"2025-02-27T05:50:50Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"size\": 50,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Production database\",\n \"type\": \"normal\",\n \"uuid\": \"01f3286c-a5ea-4670-8121-d0b9767d625b\",\n \"zone\": \"fi-hel1\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d8830409-8435-4b83-a88d-d063a2919cf0", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "9e6acd20-6119-484c-90ef-43f71822532d", + "name": "Get storage resource details - default", + "request": { + "urlPathTemplate": "/1.3/storage/{uuid}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"storage\": {\n \"access\": \"private\",\n \"encrypted\": \"no\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"backup_rule\": {\n \"key\": \"value\"\n },\n \"backups\": {\n \"backup\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"created\": \"2026-08-26T09:15:00Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"part_of_plan\": \"yes\",\n \"progress\": \"progress\",\n \"servers\": {\n \"server\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"size\": 50,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Production data\",\n \"type\": \"normal\",\n \"template_type\": \"cloud-init\",\n \"uuid\": \"01d4fcd4-e446-433b-8a9c-551a1284952e\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "9e6acd20-6119-484c-90ef-43f71822532d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "74154ab9-6623-47ca-90e8-fa6a2caf0d6e", + "name": "Modify Block Storage - default", + "request": { + "urlPathTemplate": "/1.3/storage/{uuid}", + "method": "PUT", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"storage\": {\n \"access\": \"private\",\n \"encrypted\": \"no\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"backup_rule\": {\n \"key\": \"value\"\n },\n \"backups\": {\n \"backup\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"created\": \"2026-08-26T09:15:00Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"part_of_plan\": \"yes\",\n \"progress\": \"progress\",\n \"servers\": {\n \"server\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"size\": 60,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Production data expanded\",\n \"type\": \"normal\",\n \"template_type\": \"cloud-init\",\n \"uuid\": \"011d671f-e803-484d-920a-c25b4bb05c01\",\n \"zone\": \"fi-hel1\"\n },\n \"resize_backup\": {\n \"access\": \"private\",\n \"encrypted\": \"no\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"backup_rule\": {\n \"key\": \"value\"\n },\n \"backups\": {\n \"backup\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"created\": \"2026-08-26T09:15:00Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"part_of_plan\": \"yes\",\n \"progress\": \"progress\",\n \"servers\": {\n \"server\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"size\": 50,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Production data\",\n \"type\": \"normal\",\n \"template_type\": \"cloud-init\",\n \"uuid\": \"01d4fcd4-e446-433b-8a9c-551a1284952e\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "74154ab9-6623-47ca-90e8-fa6a2caf0d6e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "b90ba790-65c9-42ab-b468-c79d19602eb2", + "name": "Delete storage resource - default", + "request": { + "urlPathTemplate": "/1.3/storage/{uuid}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "b90ba790-65c9-42ab-b468-c79d19602eb2", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "32b97288-4f99-4b5e-90f3-4413bd189350", + "name": "Attach storage to a Cloud Server - default", + "request": { + "urlPathTemplate": "/1.3/storage/{uuid}/attach", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"storage\": {\n \"access\": \"private\",\n \"encrypted\": \"yes\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"backup_rule\": {\n \"key\": \"value\"\n },\n \"backups\": {\n \"backup\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"created\": \"2026-08-26T09:15:00Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"part_of_plan\": \"yes\",\n \"progress\": \"progress\",\n \"servers\": {\n \"server\": [\n \"009d64ef-31d1-4684-a26b-c86c955cbf46\"\n ]\n },\n \"size\": 50,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Production data\",\n \"type\": \"normal\",\n \"template_type\": \"cloud-init\",\n \"uuid\": \"01d4fcd4-e446-433b-8a9c-551a1284952e\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "32b97288-4f99-4b5e-90f3-4413bd189350", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d5a4ee16-bf0c-42b4-80f0-15ce25fcf30a", + "name": "Create on-demand backup - default", + "request": { + "urlPathTemplate": "/1.3/storage/{uuid}/backup", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"storage\": {\n \"access\": \"private\",\n \"encrypted\": \"yes\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"backup_rule\": {\n \"interval\": \"daily\",\n \"time\": \"0400\",\n \"retention\": \"7\"\n },\n \"backups\": {\n \"backup\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"created\": \"2026-08-26T09:20:00Z\",\n \"origin\": \"01d4fcd4-e446-433b-8a9c-551a1284952e\",\n \"part_of_plan\": \"yes\",\n \"progress\": \"0\",\n \"servers\": {\n \"server\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"size\": 50,\n \"state\": \"maintenance\",\n \"tier\": \"hdd\",\n \"title\": \"Manually created backup\",\n \"type\": \"backup\",\n \"template_type\": \"cloud-init\",\n \"uuid\": \"016d343b-14de-4b61-91ca-433dd1ea6c47\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d5a4ee16-bf0c-42b4-80f0-15ce25fcf30a", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "67591340-b7d9-4baa-9624-1e05dc19ebd9", + "name": "Cancel Block Storage operation - default", + "request": { + "urlPathTemplate": "/1.3/storage/{uuid}/cancel", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "67591340-b7d9-4baa-9624-1e05dc19ebd9", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "feb83224-61c9-41d8-9b68-393ffc2a21e6", + "name": "Clone Block Storage - default", + "request": { + "urlPathTemplate": "/1.3/storage/{uuid}/clone", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"storage\": {\n \"access\": \"private\",\n \"encrypted\": \"yes\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"backup_rule\": {\n \"interval\": \"daily\",\n \"time\": \"0400\",\n \"retention\": \"7\"\n },\n \"backups\": {\n \"backup\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"created\": \"2026-08-26T09:15:00Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"part_of_plan\": \"yes\",\n \"progress\": \"progress\",\n \"servers\": {\n \"server\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"size\": 50,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Production data\",\n \"type\": \"normal\",\n \"template_type\": \"cloud-init\",\n \"uuid\": \"01d4fcd4-e446-433b-8a9c-551a1284952e\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "feb83224-61c9-41d8-9b68-393ffc2a21e6", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "cf0892ec-da2a-45e6-90ba-4254b34922a2", + "name": "Detach storage from a Cloud Server - default", + "request": { + "urlPathTemplate": "/1.3/storage/{uuid}/detach", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"storage\": {\n \"access\": \"private\",\n \"encrypted\": \"yes\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"backup_rule\": {\n \"key\": \"value\"\n },\n \"backups\": {\n \"backup\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"created\": \"2026-08-26T09:15:00Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"part_of_plan\": \"yes\",\n \"progress\": \"progress\",\n \"servers\": {\n \"server\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"size\": 50,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Production data\",\n \"type\": \"normal\",\n \"template_type\": \"cloud-init\",\n \"uuid\": \"01d4fcd4-e446-433b-8a9c-551a1284952e\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "cf0892ec-da2a-45e6-90ba-4254b34922a2", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "3855c3f8-c362-45ea-86df-c67bea18b4bf", + "name": "Add storage resource to favorites - default", + "request": { + "urlPathTemplate": "/1.3/storage/{uuid}/favorite", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "3855c3f8-c362-45ea-86df-c67bea18b4bf", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "46ca0571-9df9-45ae-a586-f5d3004f9e92", + "name": "Remove storage resource from favorites - default", + "request": { + "urlPathTemplate": "/1.3/storage/{uuid}/favorite", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "46ca0571-9df9-45ae-a586-f5d3004f9e92", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ddbaa18f-577e-4937-9533-b78493a84264", + "name": "Get storage import details - default", + "request": { + "urlPathTemplate": "/1.3/storage/{uuid}/import", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"storage_import\": {\n \"client_content_length\": 0,\n \"client_content_type\": \"\",\n \"completed\": \"\",\n \"created\": \"2020-06-26T08:51:07Z\",\n \"direct_upload_url\": \"https://fi-hel1.img.upcloud.com/uploader/session/07a6c9a3-300e-4d0e-b935-624f3dbdff3f\",\n \"error_code\": \"\",\n \"error_message\": \"\",\n \"md5sum\": \"\",\n \"read_bytes\": 0,\n \"sha256sum\": \"\",\n \"source\": \"direct_upload\",\n \"source_location\": \"source_location\",\n \"state\": \"prepared\",\n \"uuid\": \"07a6c9a3-300e-4d0e-b935-624f3dbdff3f\",\n \"written_bytes\": 0\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ddbaa18f-577e-4937-9533-b78493a84264", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "95882ab1-fbe6-4234-b6af-cd18c28034db", + "name": "Create storage import - default", + "request": { + "urlPathTemplate": "/1.3/storage/{uuid}/import", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"storage_import\": {\n \"client_content_length\": 0,\n \"client_content_type\": \"\",\n \"completed\": \"\",\n \"created\": \"2020-06-26T08:51:07Z\",\n \"direct_upload_url\": \"https://fi-hel1.img.upcloud.com/uploader/session/07a6c9a3-300e-4d0e-b935-624f3dbdff3f\",\n \"error_code\": \"\",\n \"error_message\": \"\",\n \"md5sum\": \"\",\n \"read_bytes\": 0,\n \"sha256sum\": \"\",\n \"source\": \"direct_upload\",\n \"source_location\": \"source_location\",\n \"state\": \"prepared\",\n \"uuid\": \"07a6c9a3-300e-4d0e-b935-624f3dbdff3f\",\n \"written_bytes\": 0\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "95882ab1-fbe6-4234-b6af-cd18c28034db", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "312dbb75-239a-456b-8ca2-a0ae2a8175f9", + "name": "Cancel storage import - default", + "request": { + "urlPathTemplate": "/1.3/storage/{uuid}/import/cancel", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 202, + "body": "{\n \"storage_import\": {\n \"client_content_length\": 0,\n \"client_content_type\": \"\",\n \"completed\": \"\",\n \"created\": \"2020-06-26T08:51:07Z\",\n \"direct_upload_url\": \"https://fi-hel1.img.upcloud.com/uploader/session/07a6c9a3-300e-4d0e-b935-624f3dbdff3f\",\n \"error_code\": \"\",\n \"error_message\": \"\",\n \"md5sum\": \"\",\n \"read_bytes\": 0,\n \"sha256sum\": \"\",\n \"source\": \"direct_upload\",\n \"source_location\": \"source_location\",\n \"state\": \"prepared\",\n \"uuid\": \"07a6c9a3-300e-4d0e-b935-624f3dbdff3f\",\n \"written_bytes\": 0\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "312dbb75-239a-456b-8ca2-a0ae2a8175f9", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e975289a-b0f7-454d-92d1-66ad8ce6b01b", + "name": "Resize Block Storage partition and filesystem - default", + "request": { + "urlPathTemplate": "/1.3/storage/{uuid}/resize", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"resize_backup\": {\n \"access\": \"private\",\n \"encrypted\": \"no\",\n \"labels\": [\n {\n \"key\": \"env\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"backup_rule\": {\n \"interval\": \"daily\",\n \"time\": \"0400\",\n \"retention\": \"7\"\n },\n \"backups\": {\n \"backup\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"created\": \"2021-12-03T06:25:15Z\",\n \"origin\": \"017ca4cc-def2-458d-a797-7782959b30a7\",\n \"part_of_plan\": \"yes\",\n \"progress\": \"progress\",\n \"servers\": {\n \"server\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"size\": 100,\n \"state\": \"online\",\n \"tier\": \"maxiops\",\n \"title\": \"Resize Backup\",\n \"type\": \"backup\",\n \"template_type\": \"cloud-init\",\n \"uuid\": \"01beec3a-14ac-4f71-9c63-3338341121c3\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e975289a-b0f7-454d-92d1-66ad8ce6b01b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "74f414da-ae15-4ba2-8521-2531201c0a6e", + "name": "Restore Block Storage from backup - default", + "request": { + "urlPathTemplate": "/1.3/storage/{uuid}/restore", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "74f414da-ae15-4ba2-8521-2531201c0a6e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "3005975b-b532-4fc9-a935-5932598836fa", + "name": "Create template from Block Storage - default", + "request": { + "urlPathTemplate": "/1.3/storage/{uuid}/templatize", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"storage\": {\n \"access\": \"private\",\n \"encrypted\": \"yes\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"license\": 0,\n \"backup_rule\": {\n \"interval\": \"daily\",\n \"time\": \"0400\",\n \"retention\": \"7\"\n },\n \"backups\": {\n \"backup\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"created\": \"2026-08-26T09:25:00Z\",\n \"origin\": \"0414e0d7-4436-4037-9dd8-6eaf47dce599\",\n \"part_of_plan\": \"yes\",\n \"progress\": \"progress\",\n \"servers\": {\n \"server\": [\n \"0414e0d7-4436-4037-9dd8-6eaf47dce599\"\n ]\n },\n \"size\": 50,\n \"state\": \"maintenance\",\n \"tier\": \"maxiops\",\n \"title\": \"My server template\",\n \"type\": \"template\",\n \"template_type\": \"cloud-init\",\n \"uuid\": \"01be94b8-8f9f-44f7-99df-3d61051173c2\",\n \"zone\": \"fi-hel1\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "3005975b-b532-4fc9-a935-5932598836fa", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "09f37028-2ebe-4805-90a2-817f2f43f08e", + "name": "List existing tags - default", + "request": { + "urlPathTemplate": "/1.3/tag", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"tags\": {\n \"tag\": [\n {\n \"description\": \"Production servers\",\n \"name\": \"PROD\",\n \"servers\": {\n \"server\": [\n \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\"\n ]\n }\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "09f37028-2ebe-4805-90a2-817f2f43f08e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "e28c7687-0283-4390-b3be-59ea9ce517f8", + "name": "Create a new tag - default", + "request": { + "urlPathTemplate": "/1.3/tag", + "method": "POST" + }, + "response": { + "status": 200, + "body": "{\n \"tag\": {\n \"description\": \"Production servers\",\n \"name\": \"PROD\",\n \"servers\": {\n \"server\": [\n \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\"\n ]\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e28c7687-0283-4390-b3be-59ea9ce517f8", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "03dfdc73-751e-4fdd-9296-21b70fc1601f", + "name": "Get tag details - default", + "request": { + "urlPathTemplate": "/1.3/tag/{name}", + "method": "GET", + "pathParameters": { + "name": { + "equalTo": "DEV" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"tag\": {\n \"description\": \"Production servers\",\n \"name\": \"PROD\",\n \"servers\": {\n \"server\": [\n \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\"\n ]\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "03dfdc73-751e-4fdd-9296-21b70fc1601f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ff0ccec7-76a7-4904-ba7c-6372f8483a90", + "name": "Modify existing tag - default", + "request": { + "urlPathTemplate": "/1.3/tag/{name}", + "method": "PUT", + "pathParameters": { + "name": { + "equalTo": "DEV" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"tag\": {\n \"description\": \"Production servers\",\n \"name\": \"PROD\",\n \"servers\": {\n \"server\": [\n \"0077fa3d-32db-4b09-9f5f-30d9e9afb565\"\n ]\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ff0ccec7-76a7-4904-ba7c-6372f8483a90", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "c5627180-b26c-42a3-8e7b-1d8b44369a8d", + "name": "Delete a tag - default", + "request": { + "urlPathTemplate": "/1.3/tag/{name}", + "method": "DELETE", + "pathParameters": { + "name": { + "equalTo": "DEV" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "c5627180-b26c-42a3-8e7b-1d8b44369a8d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "aa502748-268b-40ea-be64-3954854fd96b", + "name": "List timezones - default", + "request": { + "urlPathTemplate": "/1.3/timezone", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"timezones\": {\n \"timezone\": [\n \"UTC\",\n \"Europe/Helsinki\",\n \"America/New_York\"\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "aa502748-268b-40ea-be64-3954854fd96b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "868f7c47-11a1-48f3-b069-baa9a3a509ff", + "name": "List API tokens - default", + "request": { + "urlPathTemplate": "/1.3/account/tokens", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"id\": \"0c848138-2559-4562-9520-b1f22c4ae751\",\n \"name\": \"token\",\n \"created_at\": \"2025-03-25T13:46:19Z\",\n \"expires_at\": \"2025-03-25T14:16:19Z\",\n \"last_used_at\": \"2025-11-30T08:03:15Z\",\n \"can_create_tokens\": true,\n \"gui\": false,\n \"allowed_ip_ranges\": [\n \"1.2.3.4\"\n ]\n },\n {\n \"id\": \"0cc50c9d-6a81-494b-af8c-f7271cfd4d22\",\n \"name\": \"token\",\n \"created_at\": \"2025-03-25T14:12:06Z\",\n \"expires_at\": \"2025-03-25T14:42:06Z\",\n \"last_used_at\": \"2025-03-25T14:12:33Z\",\n \"can_create_tokens\": true,\n \"gui\": false,\n \"allowed_ip_ranges\": [\n \"1.2.3.4\"\n ]\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "868f7c47-11a1-48f3-b069-baa9a3a509ff", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "1815f7fc-1333-4d07-aaaa-541a6a3fbfab", + "name": "Create an API token - default", + "request": { + "urlPathTemplate": "/1.3/account/tokens", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"id\": \"e7b3f8a0-4c2d-11ec-bf63-0242ac130002\",\n \"name\": \"my first token\",\n \"created_at\": \"2025-11-30T08:03:15Z\",\n \"expires_at\": \"2025-11-30T08:03:15Z\",\n \"last_used_at\": \"2025-11-30T08:03:15Z\",\n \"can_create_tokens\": false,\n \"gui\": false,\n \"allowed_ip_ranges\": [\n \"0.0.0.0/0\",\n \"::/0\"\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1815f7fc-1333-4d07-aaaa-541a6a3fbfab", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "73bb01ed-ba34-414f-9631-26c481e7ed38", + "name": "Get token details - default", + "request": { + "urlPathTemplate": "/1.3/account/tokens/{token-uuid}", + "method": "GET", + "pathParameters": { + "token-uuid": { + "equalTo": "token-uuid" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"id\": \"0c848138-2559-4562-9520-b1f22c4ae751\",\n \"name\": \"token\",\n \"created_at\": \"2025-03-25T13:46:19Z\",\n \"expires_at\": \"2025-03-25T14:16:19Z\",\n \"last_used_at\": \"2025-11-30T08:03:15Z\",\n \"can_create_tokens\": true,\n \"gui\": false,\n \"allowed_ip_ranges\": [\n \"1.2.3.4\"\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "73bb01ed-ba34-414f-9631-26c481e7ed38", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "495d3a9e-6016-49d9-be74-8f74c91d3b4a", + "name": "Revoke a token - default", + "request": { + "urlPathTemplate": "/1.3/account/tokens/{token-uuid}", + "method": "DELETE", + "pathParameters": { + "token-uuid": { + "equalTo": "token-uuid" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "495d3a9e-6016-49d9-be74-8f74c91d3b4a", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "958c6e21-d31a-4280-8828-e0a0485f7a5b", + "name": "List services - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"uuid\": \"1200ecde-db95-4d1c-9133-6508f3232567\",\n \"name\": \"example-service\",\n \"region\": \"europe-1\",\n \"configured_status\": \"started\",\n \"operational_state\": \"running\",\n \"networks\": [\n {\n \"family\": \"IPv4\",\n \"name\": \"example-public-network\",\n \"type\": \"public\",\n \"uuid\": \"03bec0ad-85c3-459e-824d-710f8f24f740\"\n },\n {\n \"family\": \"IPv4\",\n \"name\": \"example-private-network\",\n \"type\": \"private\",\n \"uuid\": \"03aa7245-2ff9-49c8-9f0e-7ca0270d71a4\"\n }\n ],\n \"usage\": {\n \"total_size_bytes\": 32414921734,\n \"total_objects\": 310499\n },\n \"labels\": [\n {\n \"key\": \"example-key\",\n \"value\": \"example-value\"\n }\n ],\n \"users\": [\n {\n \"username\": \"example_user\",\n \"arn\": \"urn:ecs:iam::123bbb5c6a4240409e07f7d89fe28891:user/example_user\",\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"access_keys\": [\n {\n \"access_key_id\": \"AKIA63F41D01345BB477\",\n \"created_at\": \"2023-05-07T20:52:19Z\",\n \"last_used_at\": \"2023-05-07T20:52:17Z\",\n \"secret_access_key\": \"uCkS3cr3tK3y1234567890abcdefghijklmnopqrstuvwxyz\",\n \"status\": \"Active\"\n }\n ],\n \"policies\": [\n {\n \"arn\": \"urn:ecs:iam:::policy/ECSS3FullAccess\",\n \"name\": \"ECSS3FullAccess\"\n },\n {\n \"arn\": \"urn:ecs:iam:::policy/IAMFullAccess\",\n \"name\": \"IAMFullAccess\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"foo\",\n \"value\": \"bar\"\n }\n ],\n \"permissions_boundary\": \"sample-policy\"\n }\n ],\n \"endpoints\": [\n {\n \"domain_name\": \"7mf5k.upbucket.com\",\n \"iam_url\": \"https://7mf5k.upbucket.com:4443/iam\",\n \"sts_url\": \"https://7mf5k.upbucket.com:4443/sts\",\n \"type\": \"public\"\n },\n {\n \"domain_name\": \"7mf5k-private.upbucket.com\",\n \"iam_url\": \"https://7mf5k-private.upbucket.com:4443/iam\",\n \"sts_url\": \"https://7mf5k-private.upbucket.com:4443/sts\",\n \"type\": \"private\"\n },\n {\n \"domain_name\": \"static.7mf5k.upbucket.com\",\n \"iam_url\": \"https://7mf5k.upbucket.com:4443/iam\",\n \"sts_url\": \"https://7mf5k.upbucket.com:4443/sts\",\n \"type\": \"public\"\n }\n ],\n \"custom_domains\": [\n {\n \"domain_name\": \"objects.example-company.com\",\n \"type\": \"public\"\n }\n ],\n \"static_websites\": [\n {\n \"domain_name\": \"abc123-static.upbucket.example.com\",\n \"bucket_name\": \"my-website\",\n \"bucket_prefix\": \"v2/\",\n \"index_document\": \"index.html\",\n \"spa_mode\": true,\n \"error_pages\": [\n {\n \"status_code\": 403,\n \"error_document\": \"errors/403.html\"\n },\n {\n \"status_code\": 404,\n \"error_document\": \"errors/404.html\"\n },\n {\n \"status_range\": {\n \"start\": 400,\n \"end\": 499\n },\n \"error_document\": \"errors/4xx.html\"\n }\n ],\n \"enabled\": true,\n \"created_at\": \"2025-10-28T10:00:00Z\",\n \"updated_at\": \"2025-10-28T12:00:00Z\"\n }\n ],\n \"state_messages\": [\n {\n \"operational_state\": \"setup-checkup\",\n \"message\": \"Certificate issuing is in progress for domains: example.com.\",\n \"created_at\": \"2025-01-16T11:20:40Z\",\n \"updated_at\": \"2025-01-16T11:20:40Z\"\n }\n ],\n \"termination_protection\": false,\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"updated_at\": \"2023-05-07T21:38:15Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "958c6e21-d31a-4280-8828-e0a0485f7a5b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "5f44913f-7677-49d8-8f47-673a46614c71", + "name": "Create service - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"uuid\": \"1200ecde-db95-4d1c-9133-6508f3232567\",\n \"name\": \"example-service\",\n \"region\": \"europe-1\",\n \"configured_status\": \"started\",\n \"operational_state\": \"setup-checkup\",\n \"networks\": [\n {\n \"family\": \"IPv4\",\n \"name\": \"example-public-network\",\n \"type\": \"public\",\n \"uuid\": \"03bec0ad-85c3-459e-824d-710f8f24f740\"\n },\n {\n \"family\": \"IPv4\",\n \"name\": \"example-private-network\",\n \"type\": \"private\",\n \"uuid\": \"03aa7245-2ff9-49c8-9f0e-7ca0270d71a4\"\n }\n ],\n \"usage\": {\n \"total_size_bytes\": 32414921734,\n \"total_objects\": 310499\n },\n \"labels\": [\n {\n \"key\": \"example-key\",\n \"value\": \"example-value\"\n }\n ],\n \"users\": [\n {\n \"username\": \"example_user\",\n \"arn\": \"urn:ecs:iam::123bbb5c6a4240409e07f7d89fe28891:user/example_user\",\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"access_keys\": [\n {\n \"access_key_id\": \"AKIA63F41D01345BB477\",\n \"created_at\": \"2023-05-07T20:52:19Z\",\n \"last_used_at\": \"2023-05-07T20:52:17Z\",\n \"secret_access_key\": \"uCkS3cr3tK3y1234567890abcdefghijklmnopqrstuvwxyz\",\n \"status\": \"Active\"\n }\n ],\n \"policies\": [\n {\n \"arn\": \"urn:ecs:iam:::policy/ECSS3FullAccess\",\n \"name\": \"ECSS3FullAccess\"\n },\n {\n \"arn\": \"urn:ecs:iam:::policy/IAMFullAccess\",\n \"name\": \"IAMFullAccess\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"foo\",\n \"value\": \"bar\"\n }\n ],\n \"permissions_boundary\": \"sample-policy\"\n }\n ],\n \"endpoints\": [\n {\n \"domain_name\": \"7mf5k.upbucket.com\",\n \"iam_url\": \"https://7mf5k.upbucket.com:4443/iam\",\n \"sts_url\": \"https://7mf5k.upbucket.com:4443/sts\",\n \"type\": \"public\",\n \"mode\": \"api\"\n },\n {\n \"domain_name\": \"7mf5k-private.upbucket.com\",\n \"iam_url\": \"https://7mf5k-private.upbucket.com:4443/iam\",\n \"sts_url\": \"https://7mf5k-private.upbucket.com:4443/sts\",\n \"type\": \"private\",\n \"mode\": \"api\"\n },\n {\n \"domain_name\": \"7mf5k-static.upbucket.com\",\n \"iam_url\": \"https://7mf5k.upbucket.com:4443/iam\",\n \"sts_url\": \"https://7mf5k.upbucket.com:4443/sts\",\n \"type\": \"public\",\n \"mode\": \"static-website\"\n }\n ],\n \"custom_domains\": [\n {\n \"domain_name\": \"example.com\",\n \"type\": \"public\",\n \"mode\": \"api\"\n }\n ],\n \"static_websites\": [\n {\n \"domain_name\": \"7mf5k-static.upbucket.com\",\n \"bucket_name\": \"my-website\",\n \"bucket_prefix\": \"\",\n \"index_document\": \"index.html\",\n \"spa_mode\": true,\n \"error_pages\": [\n {\n \"status_code\": 404,\n \"error_document\": \"404.html\"\n }\n ],\n \"enabled\": true,\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"updated_at\": \"2023-05-07T15:55:24Z\"\n }\n ],\n \"state_messages\": [\n {\n \"operational_state\": \"setup-checkup\",\n \"message\": \"Certificate issuing is in progress for domains: 7mf5k-private.upbucket.com, *.7mf5k-private.upbucket.com.\",\n \"code\": \"waiting_certificate_issuing\",\n \"created_at\": \"2025-01-16T11:20:40Z\",\n \"updated_at\": \"2025-01-16T11:20:40Z\"\n }\n ],\n \"termination_protection\": false,\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"updated_at\": \"2023-05-07T21:38:15Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5f44913f-7677-49d8-8f47-673a46614c71", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "0ba1394e-25c0-4c7b-96a9-fcdd5d6af151", + "name": "Get service details - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"1200ecde-db95-4d1c-9133-6508f3232567\",\n \"name\": \"example-service\",\n \"region\": \"europe-1\",\n \"configured_status\": \"started\",\n \"operational_state\": \"setup-checkup\",\n \"networks\": [\n {\n \"family\": \"IPv4\",\n \"name\": \"example-public-network\",\n \"type\": \"public\",\n \"uuid\": \"03bec0ad-85c3-459e-824d-710f8f24f740\"\n },\n {\n \"family\": \"IPv4\",\n \"name\": \"example-private-network\",\n \"type\": \"private\",\n \"uuid\": \"03aa7245-2ff9-49c8-9f0e-7ca0270d71a4\"\n }\n ],\n \"usage\": {\n \"total_size_bytes\": 32414921734,\n \"total_objects\": 310499\n },\n \"labels\": [\n {\n \"key\": \"example-key\",\n \"value\": \"example-value\"\n }\n ],\n \"users\": [\n {\n \"username\": \"example_user\",\n \"arn\": \"urn:ecs:iam::123bbb5c6a4240409e07f7d89fe28891:user/example_user\",\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"access_keys\": [\n {\n \"access_key_id\": \"AKIA63F41D01345BB477\",\n \"created_at\": \"2023-05-07T20:52:19Z\",\n \"last_used_at\": \"2023-05-07T20:52:17Z\",\n \"secret_access_key\": \"uCkS3cr3tK3y1234567890abcdefghijklmnopqrstuvwxyz\",\n \"status\": \"Active\"\n }\n ],\n \"policies\": [\n {\n \"arn\": \"urn:ecs:iam:::policy/ECSS3FullAccess\",\n \"name\": \"ECSS3FullAccess\"\n },\n {\n \"arn\": \"urn:ecs:iam:::policy/IAMFullAccess\",\n \"name\": \"IAMFullAccess\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"foo\",\n \"value\": \"bar\"\n }\n ],\n \"permissions_boundary\": \"sample-policy\"\n }\n ],\n \"endpoints\": [\n {\n \"domain_name\": \"7mf5k.upbucket.com\",\n \"iam_url\": \"https://7mf5k.upbucket.com:4443/iam\",\n \"sts_url\": \"https://7mf5k.upbucket.com:4443/sts\",\n \"type\": \"public\",\n \"mode\": \"api\"\n },\n {\n \"domain_name\": \"7mf5k-private.upbucket.com\",\n \"iam_url\": \"https://7mf5k-private.upbucket.com:4443/iam\",\n \"sts_url\": \"https://7mf5k-private.upbucket.com:4443/sts\",\n \"type\": \"private\",\n \"mode\": \"api\"\n },\n {\n \"domain_name\": \"7mf5k-static.upbucket.com\",\n \"iam_url\": \"https://7mf5k.upbucket.com:4443/iam\",\n \"sts_url\": \"https://7mf5k.upbucket.com:4443/sts\",\n \"type\": \"public\",\n \"mode\": \"static-website\"\n }\n ],\n \"custom_domains\": [\n {\n \"domain_name\": \"example.com\",\n \"type\": \"public\",\n \"mode\": \"api\"\n }\n ],\n \"static_websites\": [\n {\n \"domain_name\": \"7mf5k-static.upbucket.com\",\n \"bucket_name\": \"my-website\",\n \"bucket_prefix\": \"\",\n \"index_document\": \"index.html\",\n \"spa_mode\": true,\n \"error_pages\": [\n {\n \"status_code\": 404,\n \"error_document\": \"404.html\"\n }\n ],\n \"enabled\": true,\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"updated_at\": \"2023-05-07T15:55:24Z\"\n }\n ],\n \"state_messages\": [\n {\n \"operational_state\": \"setup-checkup\",\n \"message\": \"Certificate issuing is in progress for domains: 7mf5k-private.upbucket.com, *.7mf5k-private.upbucket.com.\",\n \"code\": \"waiting_certificate_issuing\",\n \"created_at\": \"2025-01-16T11:20:40Z\",\n \"updated_at\": \"2025-01-16T11:20:40Z\"\n }\n ],\n \"termination_protection\": false,\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"updated_at\": \"2023-05-07T21:38:15Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "0ba1394e-25c0-4c7b-96a9-fcdd5d6af151", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "8e0856f3-6505-450f-9d1c-95917ffc3401", + "name": "Replace service - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}", + "method": "PUT", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"1200ecde-db95-4d1c-9133-6508f3232567\",\n \"name\": \"example-service\",\n \"region\": \"europe-1\",\n \"configured_status\": \"started\",\n \"operational_state\": \"setup-checkup\",\n \"networks\": [\n {\n \"family\": \"IPv4\",\n \"name\": \"example-public-network\",\n \"type\": \"public\",\n \"uuid\": \"03bec0ad-85c3-459e-824d-710f8f24f740\"\n },\n {\n \"family\": \"IPv4\",\n \"name\": \"example-private-network\",\n \"type\": \"private\",\n \"uuid\": \"03aa7245-2ff9-49c8-9f0e-7ca0270d71a4\"\n }\n ],\n \"usage\": {\n \"total_size_bytes\": 32414921734,\n \"total_objects\": 310499\n },\n \"labels\": [\n {\n \"key\": \"example-key\",\n \"value\": \"example-value\"\n }\n ],\n \"users\": [\n {\n \"username\": \"example_user\",\n \"arn\": \"urn:ecs:iam::123bbb5c6a4240409e07f7d89fe28891:user/example_user\",\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"access_keys\": [\n {\n \"access_key_id\": \"AKIA63F41D01345BB477\",\n \"created_at\": \"2023-05-07T20:52:19Z\",\n \"last_used_at\": \"2023-05-07T20:52:17Z\",\n \"secret_access_key\": \"uCkS3cr3tK3y1234567890abcdefghijklmnopqrstuvwxyz\",\n \"status\": \"Active\"\n }\n ],\n \"policies\": [\n {\n \"arn\": \"urn:ecs:iam:::policy/ECSS3FullAccess\",\n \"name\": \"ECSS3FullAccess\"\n },\n {\n \"arn\": \"urn:ecs:iam:::policy/IAMFullAccess\",\n \"name\": \"IAMFullAccess\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"foo\",\n \"value\": \"bar\"\n }\n ],\n \"permissions_boundary\": \"sample-policy\"\n }\n ],\n \"endpoints\": [\n {\n \"domain_name\": \"7mf5k.upbucket.com\",\n \"iam_url\": \"https://7mf5k.upbucket.com:4443/iam\",\n \"sts_url\": \"https://7mf5k.upbucket.com:4443/sts\",\n \"type\": \"public\",\n \"mode\": \"api\"\n },\n {\n \"domain_name\": \"7mf5k-private.upbucket.com\",\n \"iam_url\": \"https://7mf5k-private.upbucket.com:4443/iam\",\n \"sts_url\": \"https://7mf5k-private.upbucket.com:4443/sts\",\n \"type\": \"private\",\n \"mode\": \"api\"\n },\n {\n \"domain_name\": \"7mf5k-static.upbucket.com\",\n \"iam_url\": \"https://7mf5k.upbucket.com:4443/iam\",\n \"sts_url\": \"https://7mf5k.upbucket.com:4443/sts\",\n \"type\": \"public\",\n \"mode\": \"static-website\"\n }\n ],\n \"custom_domains\": [\n {\n \"domain_name\": \"example.com\",\n \"type\": \"public\",\n \"mode\": \"api\"\n }\n ],\n \"static_websites\": [\n {\n \"domain_name\": \"7mf5k-static.upbucket.com\",\n \"bucket_name\": \"my-website\",\n \"bucket_prefix\": \"\",\n \"index_document\": \"index.html\",\n \"spa_mode\": true,\n \"error_pages\": [\n {\n \"status_code\": 404,\n \"error_document\": \"404.html\"\n }\n ],\n \"enabled\": true,\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"updated_at\": \"2023-05-07T15:55:24Z\"\n }\n ],\n \"state_messages\": [\n {\n \"operational_state\": \"setup-checkup\",\n \"message\": \"Certificate issuing is in progress for domains: 7mf5k-private.upbucket.com, *.7mf5k-private.upbucket.com.\",\n \"code\": \"waiting_certificate_issuing\",\n \"created_at\": \"2025-01-16T11:20:40Z\",\n \"updated_at\": \"2025-01-16T11:20:40Z\"\n }\n ],\n \"termination_protection\": false,\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"updated_at\": \"2023-05-07T21:38:15Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "8e0856f3-6505-450f-9d1c-95917ffc3401", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "acb046a1-8f74-443f-a6fb-4ac6dd4ec515", + "name": "Delete service - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "acb046a1-8f74-443f-a6fb-4ac6dd4ec515", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "989748f2-c2d7-44ef-8002-b6b5cd3e072c", + "name": "Modify service - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"1200ecde-db95-4d1c-9133-6508f3232567\",\n \"name\": \"example-service\",\n \"region\": \"europe-1\",\n \"configured_status\": \"started\",\n \"operational_state\": \"setup-checkup\",\n \"networks\": [\n {\n \"family\": \"IPv4\",\n \"name\": \"example-public-network\",\n \"type\": \"public\",\n \"uuid\": \"03bec0ad-85c3-459e-824d-710f8f24f740\"\n },\n {\n \"family\": \"IPv4\",\n \"name\": \"example-private-network\",\n \"type\": \"private\",\n \"uuid\": \"03aa7245-2ff9-49c8-9f0e-7ca0270d71a4\"\n }\n ],\n \"usage\": {\n \"total_size_bytes\": 32414921734,\n \"total_objects\": 310499\n },\n \"labels\": [\n {\n \"key\": \"example-key\",\n \"value\": \"example-value\"\n }\n ],\n \"users\": [\n {\n \"username\": \"example_user\",\n \"arn\": \"urn:ecs:iam::123bbb5c6a4240409e07f7d89fe28891:user/example_user\",\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"access_keys\": [\n {\n \"access_key_id\": \"AKIA63F41D01345BB477\",\n \"created_at\": \"2023-05-07T20:52:19Z\",\n \"last_used_at\": \"2023-05-07T20:52:17Z\",\n \"secret_access_key\": \"uCkS3cr3tK3y1234567890abcdefghijklmnopqrstuvwxyz\",\n \"status\": \"Active\"\n }\n ],\n \"policies\": [\n {\n \"arn\": \"urn:ecs:iam:::policy/ECSS3FullAccess\",\n \"name\": \"ECSS3FullAccess\"\n },\n {\n \"arn\": \"urn:ecs:iam:::policy/IAMFullAccess\",\n \"name\": \"IAMFullAccess\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"foo\",\n \"value\": \"bar\"\n }\n ],\n \"permissions_boundary\": \"sample-policy\"\n }\n ],\n \"endpoints\": [\n {\n \"domain_name\": \"7mf5k.upbucket.com\",\n \"iam_url\": \"https://7mf5k.upbucket.com:4443/iam\",\n \"sts_url\": \"https://7mf5k.upbucket.com:4443/sts\",\n \"type\": \"public\",\n \"mode\": \"api\"\n },\n {\n \"domain_name\": \"7mf5k-private.upbucket.com\",\n \"iam_url\": \"https://7mf5k-private.upbucket.com:4443/iam\",\n \"sts_url\": \"https://7mf5k-private.upbucket.com:4443/sts\",\n \"type\": \"private\",\n \"mode\": \"api\"\n },\n {\n \"domain_name\": \"7mf5k-static.upbucket.com\",\n \"iam_url\": \"https://7mf5k.upbucket.com:4443/iam\",\n \"sts_url\": \"https://7mf5k.upbucket.com:4443/sts\",\n \"type\": \"public\",\n \"mode\": \"static-website\"\n }\n ],\n \"custom_domains\": [\n {\n \"domain_name\": \"example.com\",\n \"type\": \"public\",\n \"mode\": \"api\"\n }\n ],\n \"static_websites\": [\n {\n \"domain_name\": \"7mf5k-static.upbucket.com\",\n \"bucket_name\": \"my-website\",\n \"bucket_prefix\": \"\",\n \"index_document\": \"index.html\",\n \"spa_mode\": true,\n \"error_pages\": [\n {\n \"status_code\": 404,\n \"error_document\": \"404.html\"\n }\n ],\n \"enabled\": true,\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"updated_at\": \"2023-05-07T15:55:24Z\"\n }\n ],\n \"state_messages\": [\n {\n \"operational_state\": \"setup-checkup\",\n \"message\": \"Certificate issuing is in progress for domains: 7mf5k-private.upbucket.com, *.7mf5k-private.upbucket.com.\",\n \"code\": \"waiting_certificate_issuing\",\n \"created_at\": \"2025-01-16T11:20:40Z\",\n \"updated_at\": \"2025-01-16T11:20:40Z\"\n }\n ],\n \"termination_protection\": false,\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"updated_at\": \"2023-05-07T21:38:15Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "989748f2-c2d7-44ef-8002-b6b5cd3e072c", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "a17746aa-2814-4af3-b980-18732dc4d970", + "name": "List networks - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/networks", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"family\": \"IPv4\",\n \"name\": \"example-public-network\",\n \"type\": \"public\",\n \"uuid\": \"03bec0ad-85c3-459e-824d-710f8f24f740\"\n },\n {\n \"family\": \"IPv4\",\n \"name\": \"example-private-network\",\n \"type\": \"private\",\n \"uuid\": \"03aa7245-2ff9-49c8-9f0e-7ca0270d71a4\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a17746aa-2814-4af3-b980-18732dc4d970", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "6078f8fa-2bc5-4da0-b94c-ca0a0ba62f6d", + "name": "Create network - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/networks", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"family\": \"IPv4\",\n \"name\": \"example-private-network\",\n \"type\": \"private\",\n \"uuid\": \"03bec0ad-85c3-459e-824d-710f8f24f740\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "6078f8fa-2bc5-4da0-b94c-ca0a0ba62f6d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "339af9a2-c77e-4c2b-9a8d-00285f56e634", + "name": "Get network details - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/networks/{network-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "network-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"family\": \"IPv4\",\n \"name\": \"example-private-network\",\n \"type\": \"private\",\n \"uuid\": \"03bec0ad-85c3-459e-824d-710f8f24f740\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "339af9a2-c77e-4c2b-9a8d-00285f56e634", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "151708e9-4761-4151-b042-12ee8ef69367", + "name": "Delete network - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/networks/{network-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "network-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "151708e9-4761-4151-b042-12ee8ef69367", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f0447f23-2f2d-495f-a0f6-16982c6275f2", + "name": "List custom domains - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/custom-domains", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"domain_name\": \"example.com\",\n \"type\": \"public\",\n \"mode\": \"api\"\n },\n {\n \"domain_name\": \"objects.example.com\",\n \"type\": \"public\",\n \"mode\": \"api\"\n },\n {\n \"domain_name\": \"static.example.com\",\n \"type\": \"public\",\n \"mode\": \"static-website\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f0447f23-2f2d-495f-a0f6-16982c6275f2", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "da48a518-ae3c-4b85-85fb-87dd2934d7ab", + "name": "Attach custom domain - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/custom-domains", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"domain_name\": \"example.com\",\n \"type\": \"public\",\n \"mode\": \"api\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "da48a518-ae3c-4b85-85fb-87dd2934d7ab", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e1233847-7e09-4343-b3de-90ec17b45dc5", + "name": "Get custom domain details - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/custom-domains/{custom-domain-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "custom-domain-name": { + "equalTo": "example.com" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"domain_name\": \"example.com\",\n \"type\": \"public\",\n \"mode\": \"api\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e1233847-7e09-4343-b3de-90ec17b45dc5", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4f519e99-46c8-40b4-a115-e8f456694351", + "name": "Delete custom domain - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/custom-domains/{custom-domain-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "custom-domain-name": { + "equalTo": "example.com" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4f519e99-46c8-40b4-a115-e8f456694351", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "73285f09-b51c-4468-9b87-691f0ed57e58", + "name": "Modify custom domain - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/custom-domains/{custom-domain-name}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "custom-domain-name": { + "equalTo": "example.com" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"domain_name\": \"example.com\",\n \"type\": \"public\",\n \"mode\": \"api\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "73285f09-b51c-4468-9b87-691f0ed57e58", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "09e11712-b7b6-477f-8fec-f20fd4dfdd8e", + "name": "List regions - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/regions", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"europe-1\",\n \"primary_zone\": \"fi-hel1\",\n \"zones\": [\n {\n \"name\": \"fi-hel1\"\n },\n {\n \"name\": \"de-fra1\"\n }\n ]\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "09e11712-b7b6-477f-8fec-f20fd4dfdd8e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "63df8b19-459f-4327-864b-c07f41f88d55", + "name": "Get region details - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/regions/{region-name}", + "method": "GET", + "pathParameters": { + "region-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"europe-1\",\n \"primary_zone\": \"fi-hel1\",\n \"zones\": [\n {\n \"name\": \"fi-hel1\"\n },\n {\n \"name\": \"de-fra1\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "63df8b19-459f-4327-864b-c07f41f88d55", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e70dbb6e-8f3e-4d17-9c7d-0ea57f1efd33", + "name": "Get service metrics - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/metrics", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"total_objects\": 1000,\n \"total_size_bytes\": 1073741824\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e70dbb6e-8f3e-4d17-9c7d-0ea57f1efd33", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "a8fe1696-7690-4884-ace8-a0e1f85078eb", + "name": "List bucket metrics - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/buckets", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"my-bucket-1\",\n \"total_objects\": 1000,\n \"total_size_bytes\": 1073741824,\n \"deleted\": false\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a8fe1696-7690-4884-ace8-a0e1f85078eb", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "9be0f2c9-b2df-49ad-8081-69790b358ad5", + "name": "Create bucket - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/buckets", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"name\": \"my-bucket-1\",\n \"total_objects\": 1000,\n \"total_size_bytes\": 1073741824,\n \"deleted\": false\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "9be0f2c9-b2df-49ad-8081-69790b358ad5", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "a3f29556-b1d9-408d-8010-a1566d81d630", + "name": "Delete bucket - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/buckets/{bucket-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "bucket-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a3f29556-b1d9-408d-8010-a1566d81d630", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "256b87e1-b59a-44b8-aec1-f3901b78b0ff", + "name": "List service metrics series - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/metrics/series", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"bytes_created\": 530000,\n \"bytes_deleted\": 244000,\n \"bytes_received\": 530000,\n \"bytes_total\": 7502000,\n \"bytes_transmitted\": 0,\n \"end_at\": \"2023-10-31T12:00:00Z\",\n \"objects_created\": 79,\n \"objects_deleted\": 40,\n \"objects_total\": 1237,\n \"start_at\": \"2023-10-31T11:00:00Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "256b87e1-b59a-44b8-aec1-f3901b78b0ff", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5fa97d56-09e1-4cee-a6bf-2ab7a4c2fc0a", + "name": "List labels - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/labels", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"key\": \"foo\",\n \"value\": \"bar\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5fa97d56-09e1-4cee-a6bf-2ab7a4c2fc0a", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "c543ac2a-f742-40f1-9899-73cd71884048", + "name": "Create label - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/labels", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"key\": \"foo\",\n \"value\": \"bar\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "c543ac2a-f742-40f1-9899-73cd71884048", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "64070cd5-d92f-47df-9869-6c7d0f1fbc12", + "name": "Get label details - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/labels/{label-key}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "environment" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"key\": \"foo\",\n \"value\": \"bar\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "64070cd5-d92f-47df-9869-6c7d0f1fbc12", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "afad9ce1-8ce1-405c-a4be-ba4765a23598", + "name": "Delete label - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/labels/{label-key}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "environment" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "afad9ce1-8ce1-405c-a4be-ba4765a23598", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "8730f2b6-c1e5-48ca-a522-4a189fc0b73a", + "name": "Modify label - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/labels/{label-key}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "environment" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"key\": \"foo\",\n \"value\": \"bar\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "8730f2b6-c1e5-48ca-a522-4a189fc0b73a", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "7b87e4c5-941c-46d6-8fc6-24c477286f5d", + "name": "List static website configurations - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/static-websites", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7b87e4c5-941c-46d6-8fc6-24c477286f5d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d234fdbb-a28e-4363-97d7-dd220cf0769f", + "name": "Create static website configuration - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/static-websites", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"domain_name\": \"abc123-static.upbucket.example.com\",\n \"bucket_name\": \"my-website\",\n \"bucket_prefix\": \"v2/\",\n \"index_document\": \"index.html\",\n \"spa_mode\": true,\n \"error_pages\": [\n {\n \"status_code\": 403,\n \"error_document\": \"errors/403.html\"\n },\n {\n \"status_code\": 404,\n \"error_document\": \"errors/404.html\"\n },\n {\n \"status_range\": {\n \"start\": 400,\n \"end\": 499\n },\n \"error_document\": \"errors/4xx.html\"\n }\n ],\n \"enabled\": true,\n \"created_at\": \"2025-10-28T10:00:00Z\",\n \"updated_at\": \"2025-10-28T12:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d234fdbb-a28e-4363-97d7-dd220cf0769f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2fb44a01-9ba6-4a0d-8c47-aab589fc4a9b", + "name": "Get static website configuration - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/static-websites/{custom-domain-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "custom-domain-name": { + "equalTo": "example.com" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"domain_name\": \"abc123-static.upbucket.example.com\",\n \"bucket_name\": \"my-website\",\n \"bucket_prefix\": \"v2/\",\n \"index_document\": \"index.html\",\n \"spa_mode\": true,\n \"error_pages\": [\n {\n \"status_code\": 403,\n \"error_document\": \"errors/403.html\"\n },\n {\n \"status_code\": 404,\n \"error_document\": \"errors/404.html\"\n },\n {\n \"status_range\": {\n \"start\": 400,\n \"end\": 499\n },\n \"error_document\": \"errors/4xx.html\"\n }\n ],\n \"enabled\": true,\n \"created_at\": \"2025-10-28T10:00:00Z\",\n \"updated_at\": \"2025-10-28T12:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2fb44a01-9ba6-4a0d-8c47-aab589fc4a9b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ba1b47ad-497d-4e1e-881e-c56674c1c148", + "name": "Delete static website configuration - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/static-websites/{custom-domain-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "custom-domain-name": { + "equalTo": "example.com" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ba1b47ad-497d-4e1e-881e-c56674c1c148", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "21361b2b-d12f-413c-9804-f39c8cb4ee1f", + "name": "Modify static website configuration - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/static-websites/{custom-domain-name}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "custom-domain-name": { + "equalTo": "example.com" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"domain_name\": \"abc123-static.upbucket.example.com\",\n \"bucket_name\": \"my-website\",\n \"bucket_prefix\": \"v2/\",\n \"index_document\": \"index.html\",\n \"spa_mode\": true,\n \"error_pages\": [\n {\n \"status_code\": 403,\n \"error_document\": \"errors/403.html\"\n },\n {\n \"status_code\": 404,\n \"error_document\": \"errors/404.html\"\n },\n {\n \"status_range\": {\n \"start\": 400,\n \"end\": 499\n },\n \"error_document\": \"errors/4xx.html\"\n }\n ],\n \"enabled\": true,\n \"created_at\": \"2025-10-28T10:00:00Z\",\n \"updated_at\": \"2025-10-28T12:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "21361b2b-d12f-413c-9804-f39c8cb4ee1f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "64765bf9-0da4-4d46-bcc9-dfffbacbf408", + "name": "List service domains - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/domains", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"domains\": [\n {\n \"domain\": \"unc38.local.upbucket.com\",\n \"type\": \"public\",\n \"active\": true,\n \"static_website_configured\": false\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "64765bf9-0da4-4d46-bcc9-dfffbacbf408", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "a084cb99-b7d9-4053-a702-c1aba9d7d343", + "name": "List users - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"username\": \"example_user\",\n \"arn\": \"urn:ecs:iam::123bbb5c6a4240409e07f7d89fe28891:user/example_user\",\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"access_keys\": [\n {\n \"access_key_id\": \"AKIA63F41D01345BB477\",\n \"created_at\": \"2023-05-07T20:52:19Z\",\n \"last_used_at\": \"2023-05-07T20:52:17Z\",\n \"secret_access_key\": \"uCkS3cr3tK3y1234567890abcdefghijklmnopqrstuvwxyz\",\n \"status\": \"Active\"\n }\n ],\n \"policies\": [\n {\n \"arn\": \"urn:ecs:iam:::policy/ECSS3FullAccess\",\n \"name\": \"ECSS3FullAccess\"\n },\n {\n \"arn\": \"urn:ecs:iam:::policy/IAMFullAccess\",\n \"name\": \"IAMFullAccess\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"foo\",\n \"value\": \"bar\"\n }\n ],\n \"permissions_boundary\": \"sample-policy\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a084cb99-b7d9-4053-a702-c1aba9d7d343", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "a1f0852f-4598-4ed3-a784-7dea965daa13", + "name": "Create user - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"username\": \"example_user\",\n \"arn\": \"urn:ecs:iam::123bbb5c6a4240409e07f7d89fe28891:user/example_user\",\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"access_keys\": [\n {\n \"access_key_id\": \"AKIA63F41D01345BB477\",\n \"created_at\": \"2023-05-07T20:52:19Z\",\n \"last_used_at\": \"2023-05-07T20:52:17Z\",\n \"secret_access_key\": \"uCkS3cr3tK3y1234567890abcdefghijklmnopqrstuvwxyz\",\n \"status\": \"Active\"\n }\n ],\n \"policies\": [\n {\n \"arn\": \"urn:ecs:iam:::policy/ECSS3FullAccess\",\n \"name\": \"ECSS3FullAccess\"\n },\n {\n \"arn\": \"urn:ecs:iam:::policy/IAMFullAccess\",\n \"name\": \"IAMFullAccess\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"foo\",\n \"value\": \"bar\"\n }\n ],\n \"permissions_boundary\": \"sample-policy\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a1f0852f-4598-4ed3-a784-7dea965daa13", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "051450e5-e1d9-4dde-b828-c1abd3dcd844", + "name": "Get user details - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"username\": \"example_user\",\n \"arn\": \"urn:ecs:iam::123bbb5c6a4240409e07f7d89fe28891:user/example_user\",\n \"created_at\": \"2023-05-07T15:55:24Z\",\n \"access_keys\": [\n {\n \"access_key_id\": \"AKIA63F41D01345BB477\",\n \"created_at\": \"2023-05-07T20:52:19Z\",\n \"last_used_at\": \"2023-05-07T20:52:17Z\",\n \"secret_access_key\": \"uCkS3cr3tK3y1234567890abcdefghijklmnopqrstuvwxyz\",\n \"status\": \"Active\"\n }\n ],\n \"policies\": [\n {\n \"arn\": \"urn:ecs:iam:::policy/ECSS3FullAccess\",\n \"name\": \"ECSS3FullAccess\"\n },\n {\n \"arn\": \"urn:ecs:iam:::policy/IAMFullAccess\",\n \"name\": \"IAMFullAccess\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"foo\",\n \"value\": \"bar\"\n }\n ],\n \"permissions_boundary\": \"sample-policy\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "051450e5-e1d9-4dde-b828-c1abd3dcd844", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "fd49348d-2825-49c0-bfe0-ff9ec504de51", + "name": "Delete user - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "fd49348d-2825-49c0-bfe0-ff9ec504de51", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "cff13c3f-c4e0-4302-97e4-6476d32025e1", + "name": "List access keys - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/access-keys", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"access_key_id\": \"UCK1234567890ABCDEF\",\n \"created_at\": \"2024-01-15T10:30:00Z\",\n \"last_used_at\": \"2024-01-20T14:22:15Z\",\n \"secret_access_key\": \"uCkS3cr3tK3y1234567890abcdefghijklmnopqrstuvwxyz\",\n \"status\": \"Active\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "cff13c3f-c4e0-4302-97e4-6476d32025e1", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "66bf28b6-687f-4b08-88b9-229e2c7f80b1", + "name": "Create access key - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/access-keys", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"access_key_id\": \"UCK1234567890ABCDEF\",\n \"created_at\": \"2024-01-15T10:30:00Z\",\n \"last_used_at\": \"2024-01-15T10:30:00Z\",\n \"secret_access_key\": \"uCkS3cr3tK3y1234567890abcdefghijklmnopqrstuvwxyz\",\n \"status\": \"Active\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "66bf28b6-687f-4b08-88b9-229e2c7f80b1", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "cc90bd04-50f0-4c0f-a07e-5668fbf76963", + "name": "Get access key details - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/access-keys/{access-key-id}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + }, + "access-key-id": { + "equalTo": "UCK1234567890ABCDEF" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"access_key_id\": \"UCK1234567890ABCDEF\",\n \"created_at\": \"2024-01-15T10:30:00Z\",\n \"last_used_at\": \"2024-01-20T14:22:15Z\",\n \"secret_access_key\": \"\",\n \"status\": \"Active\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "cc90bd04-50f0-4c0f-a07e-5668fbf76963", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "bffd1d33-a567-41ce-9ba9-228284513620", + "name": "Delete access key - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/access-keys/{access-key-id}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + }, + "access-key-id": { + "equalTo": "UCK1234567890ABCDEF" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "bffd1d33-a567-41ce-9ba9-228284513620", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "19d0b8da-8482-4f3e-b494-3c19ae872113", + "name": "Modify access key details - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/access-keys/{access-key-id}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + }, + "access-key-id": { + "equalTo": "UCK1234567890ABCDEF" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"access_key_id\": \"UCK1234567890ABCDEF\",\n \"created_at\": \"2024-01-15T10:30:00Z\",\n \"last_used_at\": \"2024-01-20T14:22:15Z\",\n \"secret_access_key\": \"\",\n \"status\": \"Active\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "19d0b8da-8482-4f3e-b494-3c19ae872113", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e675ebae-d7dc-4820-93f9-42047accafca", + "name": "List attached user policies - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/policies", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"arn\": \"arn:upcloud:iam::01234567-89ab-cdef-0123-456789abcdef:policy/ECSReadOnlyAccess\",\n \"name\": \"ECSReadOnlyAccess\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e675ebae-d7dc-4820-93f9-42047accafca", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "c35a7899-78cc-48cf-bae5-6ed884c70b22", + "name": "Attach user policy - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/policies", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "c35a7899-78cc-48cf-bae5-6ed884c70b22", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e9081c40-7442-457d-8da0-a7d9c355a5b5", + "name": "Detach user policy - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/policies/{nested-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + }, + "nested-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e9081c40-7442-457d-8da0-a7d9c355a5b5", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e098d771-fd42-48df-a5ac-b32b5a9b0a4c", + "name": "Get user inline policy - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/inline-policies/{user-policy-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + }, + "user-policy-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"document\": \"{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Action\\\":\\\"sts:AssumeRole\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Resource\\\":\\\"*\\\"}]}\",\n \"name\": \"ECSS3FullAccess\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e098d771-fd42-48df-a5ac-b32b5a9b0a4c", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "03e31ebe-a676-4f4d-a1a5-716d6387fc3e", + "name": "Delete user inline policy - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/inline-policies/{user-policy-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + }, + "user-policy-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "03e31ebe-a676-4f4d-a1a5-716d6387fc3e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "94296cee-9848-46c0-a2c5-f76e976e05f5", + "name": "List user inline policies - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/inline-policies", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"document\": \"{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Action\\\":\\\"sts:AssumeRole\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Resource\\\":\\\"*\\\"}]}\",\n \"name\": \"ECSS3FullAccess\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "94296cee-9848-46c0-a2c5-f76e976e05f5", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "67a047f7-baff-49d6-9773-32b43ecc9b7d", + "name": "Create user inline policy - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/inline-policies", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"document\": \"{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Action\\\":\\\"sts:AssumeRole\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Resource\\\":\\\"*\\\"}]}\",\n \"name\": \"ECSS3FullAccess\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "67a047f7-baff-49d6-9773-32b43ecc9b7d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1a665a03-1c25-446e-b3e2-2a078d33c989", + "name": "Get user tags - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/tags", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"key\": \"team\",\n \"value\": \"backend\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1a665a03-1c25-446e-b3e2-2a078d33c989", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "50d889dd-6e51-44e9-a65d-b832d9b452dc", + "name": "Replace user tags - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/tags", + "method": "PUT", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"key\": \"team\",\n \"value\": \"backend\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "50d889dd-6e51-44e9-a65d-b832d9b452dc", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1a9da7e8-a070-4ff5-85a0-f3698b457f1b", + "name": "Delete user tag - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/tags/{user-tag-key}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + }, + "user-tag-key": { + "equalTo": "environment" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1a9da7e8-a070-4ff5-85a0-f3698b457f1b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2c1dc296-5e5a-40ee-9d53-cee7fa7c2c85", + "name": "Create user permissions boundary - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/permissions-boundary", + "method": "PUT", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"sample-policy\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2c1dc296-5e5a-40ee-9d53-cee7fa7c2c85", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "018690af-a1c5-4fcb-a1fa-38bd239f48ff", + "name": "Delete user permissions boundary - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/users/{username}/permissions-boundary", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "018690af-a1c5-4fcb-a1fa-38bd239f48ff", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "6a8df48c-12a7-4e27-8d0b-6f575a131fe7", + "name": "List policy versions - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/policies/{policy-name}/versions", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "policy-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"create_date\": \"2024-03-25T12:47:40Z\",\n \"document\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Action%22%3A%5B%22*%22%5D%2C%22Resource%22%3A%22*%22%2C%22Effect%22%3A%22Deny%22%7D%5D%7D\",\n \"is_default\": false,\n \"version_id\": \"v4\"\n },\n {\n \"create_date\": \"2024-03-25T12:47:38Z\",\n \"document\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Action%22%3A%5B%22*%22%5D%2C%22Resource%22%3A%22*%22%2C%22Effect%22%3A%22Deny%22%7D%5D%7D\",\n \"is_default\": false,\n \"version_id\": \"v3\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "6a8df48c-12a7-4e27-8d0b-6f575a131fe7", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "b37df59c-d100-4758-8069-ef85ce76f49e", + "name": "Create policy version - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/policies/{policy-name}/versions", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "policy-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"create_date\": \"2024-02-05T11:06:16Z\",\n \"document\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Action%22%3A%5B%22%2A%22%5D%2C%22Effect%22%3A%22Deny%22%2C%22Resource%22%3A%22%2A%22%7D%5D%7D\",\n \"is_default\": true,\n \"version_id\": \"v2\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "b37df59c-d100-4758-8069-ef85ce76f49e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ffdc167e-198a-4af2-af1e-74c98053f0f3", + "name": "Get policy version - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/policies/{policy-name}/versions/{policy-version}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "policy-name": { + "equalTo": "my-object-storage" + }, + "policy-version": { + "equalTo": "v1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"create_date\": \"2024-02-05T11:06:16Z\",\n \"document\": \"%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Action%22%3A%5B%22%2A%22%5D%2C%22Effect%22%3A%22Deny%22%2C%22Resource%22%3A%22%2A%22%7D%5D%7D\",\n \"is_default\": true,\n \"version_id\": \"v2\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ffdc167e-198a-4af2-af1e-74c98053f0f3", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "805ebdec-0bfc-4f2a-a9f1-96be01d2b693", + "name": "Delete a policy version - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/policies/{policy-name}/versions/{policy-version}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "policy-name": { + "equalTo": "my-object-storage" + }, + "policy-version": { + "equalTo": "v1" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "805ebdec-0bfc-4f2a-a9f1-96be01d2b693", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f087349f-e432-4346-815b-52e1d2c40b02", + "name": "Get policy details - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/policies/{policy-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "policy-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"arn\": \"urn:ecs:iam:::policy/ECSS3FullAccess\",\n \"attachment_count\": 0,\n \"created_at\": \"2024-02-05T11:06:16Z\",\n \"default_version_id\": \"v1\",\n \"description\": \"Provides full access to all buckets.\",\n \"document\": \"%7B%0A++++%22Version%22%3A+%222012-10-17%22%2C%0A++++%22Statement%22%3A+%5B%0A++++++++%7B%0A++++++++++++%22Effect%22%3A+%22Allow%22%2C%0A++++++++++++%22Action%22%3A+%22s3%3A*%22%2C%0A++++++++++++%22Resource%22%3A+%22*%22%0A++++++++%7D%0A++++%5D%0A%7D\",\n \"name\": \"ECSS3FullAccess\",\n \"system\": true,\n \"updated_at\": \"2024-02-05T11:06:16Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f087349f-e432-4346-815b-52e1d2c40b02", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2ce73c40-0175-4d7d-863c-cee695f80a93", + "name": "Delete policy - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/policies/{policy-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "policy-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2ce73c40-0175-4d7d-863c-cee695f80a93", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "7ea03245-5387-45e7-b5b0-4f44203f54f1", + "name": "Set default policy version - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/policies/{policy-name}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "policy-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"arn\": \"urn:ecs:iam:::policy/ECSS3FullAccess\",\n \"attachment_count\": 0,\n \"created_at\": \"2024-02-05T11:06:16Z\",\n \"default_version_id\": \"v1\",\n \"description\": \"Provides full access to all buckets.\",\n \"document\": \"%7B%0A++++%22Version%22%3A+%222012-10-17%22%2C%0A++++%22Statement%22%3A+%5B%0A++++++++%7B%0A++++++++++++%22Effect%22%3A+%22Allow%22%2C%0A++++++++++++%22Action%22%3A+%22s3%3A*%22%2C%0A++++++++++++%22Resource%22%3A+%22*%22%0A++++++++%7D%0A++++%5D%0A%7D\",\n \"name\": \"ECSS3FullAccess\",\n \"system\": true,\n \"updated_at\": \"2024-02-05T11:06:16Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7ea03245-5387-45e7-b5b0-4f44203f54f1", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "60a6330a-6835-47f9-a2ba-afbef5cb2860", + "name": "List policies - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/policies", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"arn\": \"urn:ecs:iam:::policy/ECSDenyAll\",\n \"attachment_count\": 0,\n \"created_at\": \"2024-02-05T11:06:17Z\",\n \"default_version_id\": \"v1\",\n \"description\": \"Deny all access.\",\n \"document\": \"%7B%0A++++%22Version%22%3A+%222012-10-17%22%2C%0A++++%22Statement%22%3A+%5B%0A++++++++%7B%0A++++++++++++%22Effect%22%3A+%22Allow%22%2C%0A++++++++++++%22Action%22%3A+%22s3%3A*%22%2C%0A++++++++++++%22Resource%22%3A+%22*%22%0A++++++++%7D%0A++++%5D%0A%7D\",\n \"name\": \"ECSDenyAll\",\n \"system\": true,\n \"updated_at\": \"2024-02-05T11:06:17Z\"\n },\n {\n \"arn\": \"urn:ecs:iam:::policy/ECSS3FullAccess\",\n \"attachment_count\": 1,\n \"created_at\": \"2024-02-05T11:06:16Z\",\n \"default_version_id\": \"v1\",\n \"description\": \"Provides full access to all buckets.\",\n \"document\": \"%7B%0A++++%22Version%22%3A+%222012-10-17%22%2C%0A++++%22Statement%22%3A+%5B%0A++++++++%7B%0A++++++++++++%22Effect%22%3A+%22Allow%22%2C%0A++++++++++++%22Action%22%3A+%22s3%3A*%22%2C%0A++++++++++++%22Resource%22%3A+%22*%22%0A++++++++%7D%0A++++%5D%0A%7D\",\n \"name\": \"ECSS3FullAccess\",\n \"system\": true,\n \"updated_at\": \"2024-02-05T11:06:16Z\"\n },\n {\n \"arn\": \"urn:ecs:iam:::policy/ECSS3ReadOnlyAccess\",\n \"attachment_count\": 0,\n \"created_at\": \"2024-02-05T11:06:16Z\",\n \"default_version_id\": \"v1\",\n \"description\": \"Provides read only access to all buckets.\",\n \"document\": \"%7B%0A++++%22Version%22%3A+%222012-10-17%22%2C%0A++++%22Statement%22%3A+%5B%0A++++++++%7B%0A++++++++++++%22Effect%22%3A+%22Allow%22%2C%0A++++++++++++%22Action%22%3A+%22s3%3A*%22%2C%0A++++++++++++%22Resource%22%3A+%22*%22%0A++++++++%7D%0A++++%5D%0A%7D\",\n \"name\": \"ECSS3ReadOnlyAccess\",\n \"system\": true,\n \"updated_at\": \"2024-02-05T11:06:16Z\"\n },\n {\n \"arn\": \"urn:ecs:iam:::policy/IAMFullAccess\",\n \"attachment_count\": 1,\n \"created_at\": \"2024-02-05T11:06:16Z\",\n \"default_version_id\": \"v1\",\n \"description\": \"Provides full access to IAM.\",\n \"document\": \"%7B%0A++++%22Version%22%3A+%222012-10-17%22%2C%0A++++%22Statement%22%3A+%5B%0A++++++++%7B%0A++++++++++++%22Effect%22%3A+%22Allow%22%2C%0A++++++++++++%22Action%22%3A+%22s3%3A*%22%2C%0A++++++++++++%22Resource%22%3A+%22*%22%0A++++++++%7D%0A++++%5D%0A%7D\",\n \"name\": \"IAMFullAccess\",\n \"system\": true,\n \"updated_at\": \"2024-02-05T11:06:16Z\"\n },\n {\n \"arn\": \"urn:ecs:iam:::policy/IAMReadOnlyAccess\",\n \"attachment_count\": 0,\n \"created_at\": \"2024-02-05T11:06:16Z\",\n \"default_version_id\": \"v1\",\n \"description\": \"Provides read only access to IAM.\",\n \"document\": \"%7B%0A++++%22Version%22%3A+%222012-10-17%22%2C%0A++++%22Statement%22%3A+%5B%0A++++++++%7B%0A++++++++++++%22Effect%22%3A+%22Allow%22%2C%0A++++++++++++%22Action%22%3A+%22s3%3A*%22%2C%0A++++++++++++%22Resource%22%3A+%22*%22%0A++++++++%7D%0A++++%5D%0A%7D\",\n \"name\": \"IAMReadOnlyAccess\",\n \"system\": true,\n \"updated_at\": \"2024-02-05T11:06:16Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "60a6330a-6835-47f9-a2ba-afbef5cb2860", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5c9721fa-3370-4ba1-a378-31e6f14fc2d9", + "name": "Create policy - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/policies", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"arn\": \"urn:ecs:iam:::policy/ECSS3FullAccess\",\n \"attachment_count\": 0,\n \"created_at\": \"2024-02-05T11:06:16Z\",\n \"default_version_id\": \"v1\",\n \"description\": \"Provides full access to all buckets.\",\n \"document\": \"%7B%0A++++%22Version%22%3A+%222012-10-17%22%2C%0A++++%22Statement%22%3A+%5B%0A++++++++%7B%0A++++++++++++%22Effect%22%3A+%22Allow%22%2C%0A++++++++++++%22Action%22%3A+%22s3%3A*%22%2C%0A++++++++++++%22Resource%22%3A+%22*%22%0A++++++++%7D%0A++++%5D%0A%7D\",\n \"name\": \"ECSS3FullAccess\",\n \"system\": true,\n \"updated_at\": \"2024-02-05T11:06:16Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5c9721fa-3370-4ba1-a378-31e6f14fc2d9", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "b6cc42ae-d624-4a17-b1e3-6c1044b3f14b", + "name": "List IAM Group Policies - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/groups/{group-name}/policies", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "group-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"arn\": \"arn:upcloud:iam::01234567-89ab-cdef-0123-456789abcdef:policy/ECSReadOnlyAccess\",\n \"name\": \"ECSReadOnlyAccess\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "b6cc42ae-d624-4a17-b1e3-6c1044b3f14b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "c15a83cb-534b-4ddf-a45a-b8aa9db9146a", + "name": "Attach IAM Group Policy - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/groups/{group-name}/policies", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "group-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "c15a83cb-534b-4ddf-a45a-b8aa9db9146a", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "6157586c-41f5-44f5-b742-be0e20c4c441", + "name": "Detach IAM Group Policy - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/groups/{group-name}/policies/{policy-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "group-name": { + "equalTo": "my-object-storage" + }, + "policy-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "6157586c-41f5-44f5-b742-be0e20c4c441", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "832ed8a3-c565-4cb6-819f-13d7b5eb7a89", + "name": "List groups - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/groups", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"arn\": \"urn:ecs:iam::1263b59181cc4841969358b08ed70026:group/test-group\",\n \"created_at\": \"2024-04-15T16:28:45Z\",\n \"name\": \"test-group\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "832ed8a3-c565-4cb6-819f-13d7b5eb7a89", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "fc79b4b1-88ac-4b79-a4b2-33c0da37faaa", + "name": "Create group - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/groups", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"arn\": \"urn:ecs:iam::1263b59181cc4841969358b08ed70026:group/test-group\",\n \"created_at\": \"2024-04-15T16:28:45Z\",\n \"name\": \"test-group\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "fc79b4b1-88ac-4b79-a4b2-33c0da37faaa", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ac74d2ac-ecb8-4999-a6b8-e842b0bfd0a1", + "name": "Get group - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/groups/{group-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "group-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"arn\": \"urn:ecs:iam::1263b59181cc4841969358b08ed70026:group/test-group\",\n \"created_at\": \"2024-04-15T16:28:45Z\",\n \"name\": \"test-group\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ac74d2ac-ecb8-4999-a6b8-e842b0bfd0a1", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "fb1d52ca-d6a2-467c-b57b-2e2afffd5de9", + "name": "Delete group - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/groups/{group-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "group-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "fb1d52ca-d6a2-467c-b57b-2e2afffd5de9", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "c7137064-f5bc-4d33-8d62-26d279de606a", + "name": "Attach user to group - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/groups/{group-name}/users/{username}", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "group-name": { + "equalTo": "my-object-storage" + }, + "username": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "c7137064-f5bc-4d33-8d62-26d279de606a", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "8c526f3d-89f8-4242-9a8d-6027d076387e", + "name": "Remove user from group - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/groups/{group-name}/users/{username}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "group-name": { + "equalTo": "my-object-storage" + }, + "username": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "8c526f3d-89f8-4242-9a8d-6027d076387e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "bb393b14-351b-4b09-9943-ca40c0c122c4", + "name": "List group inline policies - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/groups/{group-name}/inline-policies", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "group-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"document\": \"{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Action\\\":\\\"sts:AssumeRole\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Resource\\\":\\\"*\\\"}]}\",\n \"name\": \"ECSS3FullAccess\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "bb393b14-351b-4b09-9943-ca40c0c122c4", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "550d9be3-dc3e-4ed5-b393-5c9d27a1f0ea", + "name": "Create group inline policy - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/groups/{group-name}/inline-policies", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "group-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"document\": \"{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Action\\\":\\\"sts:AssumeRole\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Resource\\\":\\\"*\\\"}]}\",\n \"name\": \"ECSS3FullAccess\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "550d9be3-dc3e-4ed5-b393-5c9d27a1f0ea", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "13b1402d-05ab-4ea7-abc5-b9e4b124a93b", + "name": "Get group inline policy - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/groups/{group-name}/inline-policies/{group-policy-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "group-name": { + "equalTo": "my-object-storage" + }, + "group-policy-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"document\": \"{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Action\\\":\\\"sts:AssumeRole\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Resource\\\":\\\"*\\\"}]}\",\n \"name\": \"ECSS3FullAccess\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "13b1402d-05ab-4ea7-abc5-b9e4b124a93b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "252e21b1-26fd-40f4-bb82-57c255505368", + "name": "Delete group inline policy - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/groups/{group-name}/inline-policies/{group-policy-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "group-name": { + "equalTo": "my-object-storage" + }, + "group-policy-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "252e21b1-26fd-40f4-bb82-57c255505368", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "acc4e45b-ce79-4910-a77e-22bd005f4177", + "name": "List Roles - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"arn\": \"urn:ecs:iam::12e8c7066c0445c284c1381f899bcee7:role/example\",\n \"assume_role_policy_document\": \"{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Action\\\":\\\"sts:AssumeRole\\\",\\\"Principal\\\":{\\\"AWS\\\":[\\\"urn:ecs:iam::12442a2fbc06434889edb631be2d0968:user/user1\\\"]},\\\"Effect\\\":\\\"Allow\\\",\\\"Resource\\\":\\\"*\\\"}]}\",\n \"created_at\": \"2024-09-19T12:43:24Z\",\n \"description\": \"An example role\",\n \"inline_policies\": [\n {\n \"name\": \"InlinePolicy\"\n }\n ],\n \"max_session_duration\": 36000,\n \"name\": \"example\",\n \"permissions_boundary\": \"SamplePolicy\",\n \"policies\": [\n {\n \"arn\": \"urn:ecs:iam::12e8c7066c0445c284c1381f899bcee7:policy/SamplePolicy\",\n \"name\": \"SamplePolicy\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"foo\",\n \"value\": \"bar\"\n }\n ]\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "acc4e45b-ce79-4910-a77e-22bd005f4177", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4baf3638-c411-4878-b547-2143f2975208", + "name": "Create Role - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"arn\": \"urn:ecs:iam::12e8c7066c0445c284c1381f899bcee7:role/example\",\n \"assume_role_policy_document\": \"{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Action\\\":\\\"sts:AssumeRole\\\",\\\"Principal\\\":{\\\"AWS\\\":[\\\"urn:ecs:iam::12442a2fbc06434889edb631be2d0968:user/user1\\\"]},\\\"Effect\\\":\\\"Allow\\\",\\\"Resource\\\":\\\"*\\\"}]}\",\n \"created_at\": \"2024-09-19T12:43:24Z\",\n \"description\": \"An example role\",\n \"inline_policies\": [\n {\n \"name\": \"InlinePolicy\"\n }\n ],\n \"max_session_duration\": 36000,\n \"name\": \"example\",\n \"permissions_boundary\": \"SamplePolicy\",\n \"policies\": [\n {\n \"arn\": \"urn:ecs:iam::12e8c7066c0445c284c1381f899bcee7:policy/SamplePolicy\",\n \"name\": \"SamplePolicy\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"tag1\",\n \"value\": \"key1\"\n },\n {\n \"key\": \"tag2\",\n \"value\": \"key2\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4baf3638-c411-4878-b547-2143f2975208", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "18fde295-b184-4500-826e-ddbe3259eefe", + "name": "Get Role - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles/{role-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "role-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"arn\": \"urn:ecs:iam::12e8c7066c0445c284c1381f899bcee7:role/example\",\n \"assume_role_policy_document\": \"{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Action\\\":\\\"sts:AssumeRole\\\",\\\"Principal\\\":{\\\"AWS\\\":[\\\"urn:ecs:iam::12442a2fbc06434889edb631be2d0968:user/user1\\\"]},\\\"Effect\\\":\\\"Allow\\\",\\\"Resource\\\":\\\"*\\\"}]}\",\n \"created_at\": \"2024-09-19T12:43:24Z\",\n \"description\": \"An example role\",\n \"inline_policies\": [\n {\n \"name\": \"InlinePolicy\"\n }\n ],\n \"max_session_duration\": 36000,\n \"name\": \"example\",\n \"permissions_boundary\": \"SamplePolicy\",\n \"policies\": [\n {\n \"arn\": \"urn:ecs:iam::12e8c7066c0445c284c1381f899bcee7:policy/SamplePolicy\",\n \"name\": \"SamplePolicy\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"tag1\",\n \"value\": \"key1\"\n },\n {\n \"key\": \"tag2\",\n \"value\": \"key2\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "18fde295-b184-4500-826e-ddbe3259eefe", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5c3f6b5f-23d3-4ede-bb78-230f906c6aba", + "name": "Delete Role - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles/{role-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "role-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5c3f6b5f-23d3-4ede-bb78-230f906c6aba", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1848f90b-0929-4e4b-af44-ac81bae88a5b", + "name": "Update Role - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles/{role-name}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "role-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"arn\": \"urn:ecs:iam::12e8c7066c0445c284c1381f899bcee7:role/example\",\n \"assume_role_policy_document\": \"{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Action\\\":\\\"sts:AssumeRole\\\",\\\"Principal\\\":{\\\"AWS\\\":[\\\"urn:ecs:iam::12442a2fbc06434889edb631be2d0968:user/user1\\\"]},\\\"Effect\\\":\\\"Allow\\\",\\\"Resource\\\":\\\"*\\\"}]}\",\n \"created_at\": \"2024-09-19T12:43:24Z\",\n \"description\": \"An example role\",\n \"inline_policies\": [\n {\n \"name\": \"InlinePolicy\"\n }\n ],\n \"max_session_duration\": 36000,\n \"name\": \"example\",\n \"permissions_boundary\": \"SamplePolicy\",\n \"policies\": [\n {\n \"arn\": \"urn:ecs:iam::12e8c7066c0445c284c1381f899bcee7:policy/SamplePolicy\",\n \"name\": \"SamplePolicy\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"tag1\",\n \"value\": \"key1\"\n },\n {\n \"key\": \"tag2\",\n \"value\": \"key2\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1848f90b-0929-4e4b-af44-ac81bae88a5b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "fc128331-321b-4dac-8ae1-282e1990408f", + "name": "List Role Inline Policies - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/inline-policies", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "role-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"document\": \"{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Action\\\":\\\"sts:AssumeRole\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Resource\\\":\\\"*\\\"}]}\",\n \"name\": \"ECSS3FullAccess\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "fc128331-321b-4dac-8ae1-282e1990408f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "538bccbc-baff-4366-85d1-cf0adc0fcfe5", + "name": "Create role inline policy - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/inline-policies", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "role-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"document\": \"{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Action\\\":\\\"sts:AssumeRole\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Resource\\\":\\\"*\\\"}]}\",\n \"name\": \"ECSS3FullAccess\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "538bccbc-baff-4366-85d1-cf0adc0fcfe5", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "524ef66d-896f-4ec4-9508-07ba7487124f", + "name": "Get Role Inline Policy - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/inline-policies/{role-policy-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "role-name": { + "equalTo": "my-object-storage" + }, + "role-policy-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"document\": \"{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Action\\\":\\\"sts:AssumeRole\\\",\\\"Effect\\\":\\\"Allow\\\",\\\"Resource\\\":\\\"*\\\"}]}\",\n \"name\": \"ECSS3FullAccess\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "524ef66d-896f-4ec4-9508-07ba7487124f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "c4b8e270-8192-40d2-bf18-a1fd3737a615", + "name": "Delete role inline policy - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/inline-policies/{role-policy-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "role-name": { + "equalTo": "my-object-storage" + }, + "role-policy-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "c4b8e270-8192-40d2-bf18-a1fd3737a615", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "29eafab7-029e-4eb7-8469-9ab097492edb", + "name": "Create role permissions boundary - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/permissions-boundary", + "method": "PUT", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "role-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"sample-policy\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "29eafab7-029e-4eb7-8469-9ab097492edb", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1732a951-28ca-47d6-aa7e-83dfa75e6bee", + "name": "Delete role permissions boundary - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/permissions-boundary", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "role-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1732a951-28ca-47d6-aa7e-83dfa75e6bee", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "9c6d2bb6-9c95-4b82-88e9-d5b9c7bf124b", + "name": "Assume Role Policy - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/assume-role-policy", + "method": "PUT", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "role-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"document\": \"{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"Service\\\":\\\"backup.upcloud.com\\\"},\\\"Action\\\":\\\"sts:AssumeRole\\\"}]}\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "9c6d2bb6-9c95-4b82-88e9-d5b9c7bf124b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "003bc943-aa70-40e8-bfde-aba54b9e296f", + "name": "List Attached Role Policies - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/policies", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "role-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"arn\": \"arn:upcloud:iam::01234567-89ab-cdef-0123-456789abcdef:policy/ECSReadOnlyAccess\",\n \"name\": \"ECSReadOnlyAccess\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "003bc943-aa70-40e8-bfde-aba54b9e296f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "88e6b8a9-bd3f-4bb1-81de-6fd21f7054c3", + "name": "Attach Policy To Role - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/policies", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "role-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "88e6b8a9-bd3f-4bb1-81de-6fd21f7054c3", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "020e2eac-aa58-43f3-8446-fbdbff430119", + "name": "Detach Policy From Role - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/policies/{role-policy-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "role-name": { + "equalTo": "my-object-storage" + }, + "role-policy-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "020e2eac-aa58-43f3-8446-fbdbff430119", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e53bc68c-1448-4550-926b-05008ddd10ee", + "name": "Get role tags - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/tags", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "role-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"key\": \"team\",\n \"value\": \"backend\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e53bc68c-1448-4550-926b-05008ddd10ee", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1157720b-0077-4ee7-b1c5-f3dea4400f81", + "name": "Replace role tags - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/tags", + "method": "PUT", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "role-name": { + "equalTo": "my-object-storage" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"key\": \"team\",\n \"value\": \"backend\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1157720b-0077-4ee7-b1c5-f3dea4400f81", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "8ded812b-2af0-45b3-907d-1332742e7321", + "name": "Delete role tag - default", + "request": { + "urlPathTemplate": "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/tags/{role-tag-key}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "role-name": { + "equalTo": "my-object-storage" + }, + "role-tag-key": { + "equalTo": "environment" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "8ded812b-2af0-45b3-907d-1332742e7321", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "469c65c3-fbba-492e-a48b-0e33ca6bbe10", + "name": "List services - default", + "request": { + "urlPathTemplate": "/1.3/file-storage", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"uuid\": \"17871d62-6964-4336-b68d-4a85a8ee10fe\",\n \"name\": \"test2\",\n \"zone\": \"fi-dev2\",\n \"configured_status\": \"started\",\n \"operational_state\": \"running\",\n \"size_gib\": 250,\n \"encrypted\": false,\n \"networks\": [\n {\n \"family\": \"IPv4\",\n \"ip_address\": \"10.10.10.50\",\n \"name\": \"net\",\n \"uuid\": \"0391f203-6eef-4a69-bfcc-fffffbdfdc32\"\n }\n ],\n \"shares\": [\n {\n \"name\": \"read\",\n \"path\": \"/public\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"*\",\n \"permission\": \"ro\"\n }\n ]\n },\n {\n \"name\": \"write\",\n \"path\": \"/project/data\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"10.10.10.0/24\",\n \"permission\": \"rw\"\n },\n {\n \"name\": \"test-name\",\n \"target\": \"local.domain\",\n \"permission\": \"rw\"\n }\n ]\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"state_messages\": [\n {}\n ],\n \"created_at\": \"2025-08-01T10:40:04Z\",\n \"updated_at\": \"2025-08-03T19:23:52Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "469c65c3-fbba-492e-a48b-0e33ca6bbe10", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "cd20dd4c-f83a-47f4-9818-5324dfa0e5a8", + "name": "Create service - default", + "request": { + "urlPathTemplate": "/1.3/file-storage", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"uuid\": \"17871d62-6964-4336-b68d-4a85a8ee10fe\",\n \"name\": \"test2\",\n \"zone\": \"fi-dev2\",\n \"configured_status\": \"started\",\n \"operational_state\": \"running\",\n \"size_gib\": 250,\n \"encrypted\": false,\n \"networks\": [\n {\n \"family\": \"IPv4\",\n \"ip_address\": \"10.10.10.50\",\n \"name\": \"net\",\n \"uuid\": \"0391f203-6eef-4a69-bfcc-fffffbdfdc32\"\n }\n ],\n \"shares\": [\n {\n \"name\": \"read\",\n \"path\": \"/public\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"*\",\n \"permission\": \"ro\"\n }\n ]\n },\n {\n \"name\": \"write\",\n \"path\": \"/project/data\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"10.10.10.0/24\",\n \"permission\": \"rw\"\n },\n {\n \"name\": \"test-name\",\n \"target\": \"local.domain\",\n \"permission\": \"rw\"\n }\n ]\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"state_messages\": [\n {\n \"operational_state\": \"operational_state\",\n \"message\": \"message\",\n \"code\": \"code\"\n }\n ],\n \"created_at\": \"2025-08-01T10:40:04Z\",\n \"updated_at\": \"2025-08-03T19:23:52Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "cd20dd4c-f83a-47f4-9818-5324dfa0e5a8", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d85c967b-7222-4e1d-97b0-3836b8e296c1", + "name": "Get service details - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"17871d62-6964-4336-b68d-4a85a8ee10fe\",\n \"name\": \"test2\",\n \"zone\": \"fi-dev2\",\n \"configured_status\": \"started\",\n \"operational_state\": \"running\",\n \"size_gib\": 250,\n \"encrypted\": false,\n \"networks\": [\n {\n \"family\": \"IPv4\",\n \"ip_address\": \"10.10.10.50\",\n \"name\": \"net\",\n \"uuid\": \"0391f203-6eef-4a69-bfcc-fffffbdfdc32\"\n }\n ],\n \"shares\": [\n {\n \"name\": \"read\",\n \"path\": \"/public\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"*\",\n \"permission\": \"ro\"\n }\n ]\n },\n {\n \"name\": \"write\",\n \"path\": \"/project/data\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"10.10.10.0/24\",\n \"permission\": \"rw\"\n },\n {\n \"name\": \"test-name\",\n \"target\": \"local.domain\",\n \"permission\": \"rw\"\n }\n ]\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"state_messages\": [\n {\n \"operational_state\": \"operational_state\",\n \"message\": \"message\",\n \"code\": \"code\"\n }\n ],\n \"created_at\": \"2025-08-01T10:40:04Z\",\n \"updated_at\": \"2025-08-03T19:23:52Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d85c967b-7222-4e1d-97b0-3836b8e296c1", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "25283a45-6993-4bb5-9d54-eb95d30f5984", + "name": "Replace service - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}", + "method": "PUT", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"17871d62-6964-4336-b68d-4a85a8ee10fe\",\n \"name\": \"test2\",\n \"zone\": \"fi-dev2\",\n \"configured_status\": \"started\",\n \"operational_state\": \"running\",\n \"size_gib\": 250,\n \"encrypted\": false,\n \"networks\": [\n {\n \"family\": \"IPv4\",\n \"ip_address\": \"10.10.10.50\",\n \"name\": \"net\",\n \"uuid\": \"0391f203-6eef-4a69-bfcc-fffffbdfdc32\"\n }\n ],\n \"shares\": [\n {\n \"name\": \"read\",\n \"path\": \"/public\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"*\",\n \"permission\": \"ro\"\n }\n ]\n },\n {\n \"name\": \"write\",\n \"path\": \"/project/data\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"10.10.10.0/24\",\n \"permission\": \"rw\"\n },\n {\n \"name\": \"test-name\",\n \"target\": \"local.domain\",\n \"permission\": \"rw\"\n }\n ]\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"state_messages\": [\n {\n \"operational_state\": \"operational_state\",\n \"message\": \"message\",\n \"code\": \"code\"\n }\n ],\n \"created_at\": \"2025-08-01T10:40:04Z\",\n \"updated_at\": \"2025-08-03T19:23:52Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "25283a45-6993-4bb5-9d54-eb95d30f5984", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "8875e801-e6a8-4127-ae0a-61e61fed5b67", + "name": "Delete service - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "8875e801-e6a8-4127-ae0a-61e61fed5b67", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5528ea35-8253-436d-92b4-0f15f9dae8ee", + "name": "Modify service - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"17871d62-6964-4336-b68d-4a85a8ee10fe\",\n \"name\": \"test2\",\n \"zone\": \"fi-dev2\",\n \"configured_status\": \"started\",\n \"operational_state\": \"running\",\n \"size_gib\": 250,\n \"encrypted\": false,\n \"networks\": [\n {\n \"family\": \"IPv4\",\n \"ip_address\": \"10.10.10.50\",\n \"name\": \"net\",\n \"uuid\": \"0391f203-6eef-4a69-bfcc-fffffbdfdc32\"\n }\n ],\n \"shares\": [\n {\n \"name\": \"read\",\n \"path\": \"/public\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"*\",\n \"permission\": \"ro\"\n }\n ]\n },\n {\n \"name\": \"write\",\n \"path\": \"/project/data\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"10.10.10.0/24\",\n \"permission\": \"rw\"\n },\n {\n \"name\": \"test-name\",\n \"target\": \"local.domain\",\n \"permission\": \"rw\"\n }\n ]\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"state_messages\": [\n {\n \"operational_state\": \"operational_state\",\n \"message\": \"message\",\n \"code\": \"code\"\n }\n ],\n \"created_at\": \"2025-08-01T10:40:04Z\",\n \"updated_at\": \"2025-08-03T19:23:52Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5528ea35-8253-436d-92b4-0f15f9dae8ee", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "b0beaf1e-b125-4293-946c-c5fa33790e4e", + "name": "List networks - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/networks", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"family\": \"IPv4\",\n \"ip_address\": \"192.168.147.250\",\n \"name\": \"test-name\",\n \"uuid\": \"03720d07-80a9-41ac-90b0-68a932109339\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "b0beaf1e-b125-4293-946c-c5fa33790e4e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "6406ea1e-70d4-4e15-8542-4984bad5f749", + "name": "Create network - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/networks", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"family\": \"IPv4\",\n \"ip_address\": \"192.168.147.250\",\n \"name\": \"test-name\",\n \"uuid\": \"03720d07-80a9-41ac-90b0-68a932109339\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "6406ea1e-70d4-4e15-8542-4984bad5f749", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "bd839f48-0989-4243-aff7-92bc8ba3e98d", + "name": "Get network details - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/networks/{network-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + }, + "network-name": { + "equalTo": "test-name" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"family\": \"IPv4\",\n \"ip_address\": \"192.168.147.250\",\n \"name\": \"test-name\",\n \"uuid\": \"03720d07-80a9-41ac-90b0-68a932109339\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "bd839f48-0989-4243-aff7-92bc8ba3e98d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e8485f1e-1abf-40c7-9008-650027a08d88", + "name": "Delete network - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/networks/{network-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + }, + "network-name": { + "equalTo": "test-name" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e8485f1e-1abf-40c7-9008-650027a08d88", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "bf43a481-3627-4fce-9b2f-745854650abe", + "name": "Modify network - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/networks/{network-name}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + }, + "network-name": { + "equalTo": "test-name" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"family\": \"IPv4\",\n \"ip_address\": \"192.168.147.250\",\n \"name\": \"test-name\",\n \"uuid\": \"03720d07-80a9-41ac-90b0-68a932109339\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "bf43a481-3627-4fce-9b2f-745854650abe", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "dc7dcf6a-779c-401a-a851-73b2fed790ba", + "name": "List shares - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/shares", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"write\",\n \"path\": \"/project/data\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"*\",\n \"permission\": \"rw\"\n }\n ]\n },\n {\n \"name\": \"read\",\n \"path\": \"/project/logs\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"192.168.147.0/24\",\n \"permission\": \"ro\"\n }\n ]\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "dc7dcf6a-779c-401a-a851-73b2fed790ba", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "acdd5b46-50e6-4844-a665-559804ddf610", + "name": "Create share - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/shares", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"name\": \"write\",\n \"path\": \"/project/data\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"*\",\n \"permission\": \"rw\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "acdd5b46-50e6-4844-a665-559804ddf610", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "9a24b9b3-dcca-4624-b9fe-9f93eb11a741", + "name": "Get share details - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/shares/{share-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + }, + "share-name": { + "equalTo": "test-name" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"write\",\n \"path\": \"/project/data\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"*\",\n \"permission\": \"rw\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "9a24b9b3-dcca-4624-b9fe-9f93eb11a741", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d35dc215-b42c-457a-a909-bf629ff6dab9", + "name": "Delete share - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/shares/{share-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + }, + "share-name": { + "equalTo": "test-name" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d35dc215-b42c-457a-a909-bf629ff6dab9", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "90ec26f6-9337-4b98-a4c1-e1285d9efd44", + "name": "Modify share - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/shares/{share-name}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + }, + "share-name": { + "equalTo": "test-name" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"write\",\n \"path\": \"/project/data\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"*\",\n \"permission\": \"rw\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "90ec26f6-9337-4b98-a4c1-e1285d9efd44", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "eece413f-4ac4-45b6-9c04-0dce6028339f", + "name": "List ACLs - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/shares/{share-name}/acl", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + }, + "share-name": { + "equalTo": "test-name" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"test-name-1\",\n \"target\": \"*\",\n \"permission\": \"rw\"\n },\n {\n \"name\": \"test-name-2\",\n \"target\": \"192.168.147.0/24\",\n \"permission\": \"ro\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "eece413f-4ac4-45b6-9c04-0dce6028339f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4b4c1d57-3ddf-4051-8ab9-4653c984d6f3", + "name": "Create ACL - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/shares/{share-name}/acl", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + }, + "share-name": { + "equalTo": "test-name" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"name\": \"test-name\",\n \"target\": \"*\",\n \"permission\": \"rw\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4b4c1d57-3ddf-4051-8ab9-4653c984d6f3", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "96fadfc8-e192-47b6-9886-6aba8daf947b", + "name": "Get ACL details - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/shares/{share-name}/acl/{acl-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + }, + "share-name": { + "equalTo": "test-name" + }, + "acl-name": { + "equalTo": "test-name" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"test-name\",\n \"target\": \"*\",\n \"permission\": \"rw\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "96fadfc8-e192-47b6-9886-6aba8daf947b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "056a57db-96cb-4b15-8af3-6b22c95ab68f", + "name": "Delete ACL - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/shares/{share-name}/acl/{acl-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + }, + "share-name": { + "equalTo": "test-name" + }, + "acl-name": { + "equalTo": "test-name" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "056a57db-96cb-4b15-8af3-6b22c95ab68f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "81d371e6-006e-4eff-9e83-92f4b68e0b5a", + "name": "Modify ACL - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/shares/{share-name}/acl/{acl-name}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + }, + "share-name": { + "equalTo": "test-name" + }, + "acl-name": { + "equalTo": "test-name" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"test-name\",\n \"target\": \"*\",\n \"permission\": \"rw\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "81d371e6-006e-4eff-9e83-92f4b68e0b5a", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "646a3155-1ae8-4ed8-a1f4-8b93c0b5cd1c", + "name": "List labels - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/labels", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "646a3155-1ae8-4ed8-a1f4-8b93c0b5cd1c", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2dfbd919-3e50-47b5-8b90-516ae491920f", + "name": "Create label - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/labels", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"key\": \"environment\",\n \"value\": \"production\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2dfbd919-3e50-47b5-8b90-516ae491920f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "6a19abc3-42f8-4d0d-adac-c522e1a8069f", + "name": "Get label details - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/labels/{label-key}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + }, + "label-key": { + "equalTo": "environment" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"key\": \"environment\",\n \"value\": \"production\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "6a19abc3-42f8-4d0d-adac-c522e1a8069f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "c2a46df6-7ff8-49aa-b0ad-984b15178b69", + "name": "Delete label - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/labels/{label-key}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + }, + "label-key": { + "equalTo": "environment" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "c2a46df6-7ff8-49aa-b0ad-984b15178b69", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "012274bc-a1aa-4bec-b649-d809a65b5945", + "name": "Modify label - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/labels/{label-key}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + }, + "label-key": { + "equalTo": "environment" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"key\": \"environment\",\n \"value\": \"production\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "012274bc-a1aa-4bec-b649-d809a65b5945", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ef406581-0cfd-4fcb-8af6-50b2799315c7", + "name": "Get service current state - default", + "request": { + "urlPathTemplate": "/1.3/file-storage/{service-uuid}/current-state", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "17fd43a5-a97e-44f7-98a8-0a787da67069" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"17871d62-6964-4336-b68d-4a85a8ee10fe\",\n \"name\": \"test2\",\n \"zone\": \"fi-dev2\",\n \"configured_status\": \"started\",\n \"operational_state\": \"running\",\n \"size_gib\": 250,\n \"encrypted\": false,\n \"networks\": [\n {\n \"family\": \"IPv4\",\n \"ip_address\": \"10.10.10.50\",\n \"name\": \"net\",\n \"uuid\": \"0391f203-6eef-4a69-bfcc-fffffbdfdc32\"\n }\n ],\n \"shares\": [\n {\n \"name\": \"read\",\n \"path\": \"/public\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"*\",\n \"permission\": \"ro\"\n }\n ]\n },\n {\n \"name\": \"write\",\n \"path\": \"/project/data\",\n \"acl\": [\n {\n \"name\": \"test-name\",\n \"target\": \"10.10.10.0/24\",\n \"permission\": \"rw\"\n },\n {\n \"name\": \"test-name\",\n \"target\": \"local.domain\",\n \"permission\": \"rw\"\n }\n ]\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"state_messages\": [\n {\n \"operational_state\": \"operational_state\",\n \"message\": \"message\",\n \"code\": \"code\"\n }\n ],\n \"created_at\": \"2025-08-01T10:40:04Z\",\n \"updated_at\": \"2025-08-03T19:23:52Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ef406581-0cfd-4fcb-8af6-50b2799315c7", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1dc24e89-c416-405f-bacf-02e4737b0322", + "name": "List database types - default", + "request": { + "urlPathTemplate": "/1.3/database/service-types", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"key\": {\n \"name\": \"postgresql\",\n \"description\": \"PostgreSQL - Object-Relational Database Management System\",\n \"latest_available_version\": \"18.1\",\n \"service_plans\": [\n {\n \"backup_config\": {\n \"interval\": 24,\n \"max_count\": 3,\n \"recovery_mode\": \"pitr\"\n },\n \"backup_config_pg\": {\n \"interval\": 24,\n \"max_count\": 3,\n \"recovery_mode\": \"pitr\"\n },\n \"backup_config_mysql\": {\n \"interval\": 24,\n \"max_count\": 7,\n \"recovery_mode\": \"point_in_time\"\n },\n \"backup_config_redis\": {\n \"interval\": 24,\n \"max_count\": 7,\n \"recovery_mode\": \"point_in_time\"\n },\n \"backup_config_valkey\": {\n \"interval\": 24,\n \"max_count\": 7,\n \"recovery_mode\": \"point_in_time\"\n },\n \"backup_config_opensearch\": {\n \"frequent_interval_minutes\": 15,\n \"frequent_oldest_age_minutes\": 60,\n \"infrequent_interval_minutes\": 240,\n \"infrequent_oldest_age_minutes\": 1440,\n \"recovery_mode\": \"point_in_time\"\n },\n \"node_count\": 1,\n \"zones\": {\n \"zone\": [\n {\n \"name\": \"au-syd1\"\n },\n {\n \"name\": \"de-fra1\"\n },\n {\n \"name\": \"es-mad1\"\n },\n {\n \"name\": \"fi-hel1\"\n },\n {\n \"name\": \"fi-hel2\"\n },\n {\n \"name\": \"nl-ams1\"\n },\n {\n \"name\": \"pl-waw1\"\n },\n {\n \"name\": \"se-sto1\"\n },\n {\n \"name\": \"sg-sin1\"\n },\n {\n \"name\": \"uk-lon1\"\n },\n {\n \"name\": \"us-chi1\"\n },\n {\n \"name\": \"us-nyc1\"\n },\n {\n \"name\": \"us-sjo1\"\n }\n ]\n },\n \"plan\": \"1x1xCPU-1GB-10GB\",\n \"core_number\": 1,\n \"storage_size\": 10240,\n \"memory_amount\": 1024,\n \"components\": {\n \"compute\": {\n \"name\": \"rdb.standard.2CPU-8GB\",\n \"family\": \"standard\",\n \"node_count\": 2,\n \"cpu\": 4,\n \"memory_gb\": 8\n },\n \"storage\": {\n \"included_gib\": 100,\n \"dynamic_storage_supported\": true,\n \"additional_gib\": 40,\n \"total_gib\": 140\n },\n \"backups\": {\n \"name\": \"regular\",\n \"retention_days\": 15\n }\n }\n }\n ],\n \"properties\": {\n \"automatic_utility_network_ip_filter\": {\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"sample-id\",\n \"createOnly\": false,\n \"default\": {\n \"foo\": \"bar\"\n },\n \"example\": {\n \"foo\": \"bar\"\n },\n \"maxLength\": 255,\n \"minLength\": 255,\n \"pattern\": \"^[a-zA-Z0-9_./:-]+(\\\\[[^\\\\]]+\\\\])?$\",\n \"title\": \"Sample Property\",\n \"type\": \"any string\",\n \"user_error\": \"Invalid input provided\",\n \"dependencies\": {\n \"required\": {\n \"required\": [\n \"host\",\n \"port\"\n ]\n }\n },\n \"required\": [\n \"host\",\n \"port\"\n ],\n \"maxItems\": 10,\n \"description\": \"This is a sample property used for demonstration purposes.\",\n \"maximum\": [\n {\n \"key\": \"value\"\n },\n {\n \"key\": \"value\"\n }\n ],\n \"additionalProperties\": true\n },\n \"ip_filter\": {\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"sample-id\",\n \"createOnly\": false,\n \"default\": {\n \"foo\": \"bar\"\n },\n \"example\": {\n \"foo\": \"bar\"\n },\n \"maxLength\": 255,\n \"minLength\": 255,\n \"pattern\": \"^[a-zA-Z0-9_./:-]+(\\\\[[^\\\\]]+\\\\])?$\",\n \"title\": \"Sample Property\",\n \"type\": \"any string\",\n \"user_error\": \"Invalid input provided\",\n \"dependencies\": {\n \"required\": {\n \"required\": [\n \"host\",\n \"port\"\n ]\n }\n },\n \"required\": [\n \"host\",\n \"port\"\n ],\n \"maxItems\": 10,\n \"description\": \"This is a sample property used for demonstration purposes.\",\n \"maximum\": [\n {\n \"key\": \"value\"\n },\n {\n \"key\": \"value\"\n }\n ],\n \"additionalProperties\": true\n },\n \"public_access\": {\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"sample-id\",\n \"createOnly\": false,\n \"default\": {\n \"foo\": \"bar\"\n },\n \"example\": {\n \"foo\": \"bar\"\n },\n \"maxLength\": 255,\n \"minLength\": 255,\n \"pattern\": \"^[a-zA-Z0-9_./:-]+(\\\\[[^\\\\]]+\\\\])?$\",\n \"title\": \"Sample Property\",\n \"type\": \"any string\",\n \"user_error\": \"Invalid input provided\",\n \"dependencies\": {\n \"required\": {\n \"required\": [\n \"host\",\n \"port\"\n ]\n }\n },\n \"required\": [\n \"host\",\n \"port\"\n ],\n \"maxItems\": 10,\n \"description\": \"This is a sample property used for demonstration purposes.\",\n \"maximum\": [\n {\n \"key\": \"value\"\n },\n {\n \"key\": \"value\"\n }\n ],\n \"additionalProperties\": true\n },\n \"version\": {\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"sample-id\",\n \"createOnly\": false,\n \"default\": {\n \"foo\": \"bar\"\n },\n \"example\": {\n \"foo\": \"bar\"\n },\n \"maxLength\": 255,\n \"minLength\": 255,\n \"pattern\": \"^[a-zA-Z0-9_./:-]+(\\\\[[^\\\\]]+\\\\])?$\",\n \"title\": \"Sample Property\",\n \"type\": \"any string\",\n \"user_error\": \"Invalid input provided\",\n \"dependencies\": {\n \"required\": {\n \"required\": [\n \"host\",\n \"port\"\n ]\n }\n },\n \"required\": [\n \"host\",\n \"port\"\n ],\n \"maxItems\": 10,\n \"description\": \"This is a sample property used for demonstration purposes.\",\n \"maximum\": [\n {\n \"key\": \"value\"\n },\n {\n \"key\": \"value\"\n }\n ],\n \"additionalProperties\": true\n }\n },\n \"dependencies\": {\n \"key\": {\n \"required\": [\n \"host\",\n \"port\"\n ]\n }\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1dc24e89-c416-405f-bacf-02e4737b0322", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "f6c2ee25-9bd5-40e1-b7c5-1a646ac822b9", + "name": "List database plans - default", + "request": { + "urlPathTemplate": "/1.3/database/plans", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"service_types\": [\n {\n \"type\": \"pg\",\n \"latest_version\": \"18.6\",\n \"componentised\": true,\n \"zones\": [\n \"fi-hel1\",\n \"de-fra1\"\n ],\n \"backup_tiers\": [\n \"regular\",\n \"extended\"\n ],\n \"node_counts\": [\n 1,\n 2,\n 3\n ],\n \"compute_shapes\": [\n {\n \"compute\": \"rdb.standard.2CPU-8GB\",\n \"family\": \"standard\",\n \"cpu\": 2,\n \"memory_gb\": 8,\n \"dynamic_storage_supported\": true,\n \"node_counts\": [\n 1,\n 2,\n 3\n ],\n \"backups\": [\n \"regular\"\n ],\n \"storage\": {\n \"step_gib\": 10,\n \"dynamic_max_multiplier\": 4,\n \"total_cap_gib\": 10240,\n \"options\": [\n {\n \"base_gib\": 80,\n \"max_gib\": 400\n }\n ]\n }\n }\n ]\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f6c2ee25-9bd5-40e1-b7c5-1a646ac822b9", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "25574bb8-5200-4422-94ce-ddeddf1dfa3c", + "name": "Get database type - default", + "request": { + "urlPathTemplate": "/1.3/database/service-types/{service-type-name}", + "method": "GET", + "pathParameters": { + "service-type-name": { + "equalTo": "mysql" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"postgresql\",\n \"description\": \"PostgreSQL - Object-Relational Database Management System\",\n \"latest_available_version\": \"18.1\",\n \"service_plans\": [\n {\n \"backup_config\": {\n \"interval\": 24,\n \"max_count\": 3,\n \"recovery_mode\": \"pitr\"\n },\n \"backup_config_pg\": {\n \"interval\": 24,\n \"max_count\": 3,\n \"recovery_mode\": \"pitr\"\n },\n \"backup_config_mysql\": {\n \"interval\": 24,\n \"max_count\": 7,\n \"recovery_mode\": \"point_in_time\"\n },\n \"backup_config_redis\": {\n \"interval\": 24,\n \"max_count\": 7,\n \"recovery_mode\": \"point_in_time\"\n },\n \"backup_config_valkey\": {\n \"interval\": 24,\n \"max_count\": 7,\n \"recovery_mode\": \"point_in_time\"\n },\n \"backup_config_opensearch\": {\n \"frequent_interval_minutes\": 15,\n \"frequent_oldest_age_minutes\": 60,\n \"infrequent_interval_minutes\": 240,\n \"infrequent_oldest_age_minutes\": 1440,\n \"recovery_mode\": \"point_in_time\"\n },\n \"node_count\": 1,\n \"zones\": {\n \"zone\": [\n {\n \"name\": \"au-syd1\"\n },\n {\n \"name\": \"de-fra1\"\n },\n {\n \"name\": \"es-mad1\"\n },\n {\n \"name\": \"fi-hel1\"\n },\n {\n \"name\": \"fi-hel2\"\n },\n {\n \"name\": \"nl-ams1\"\n },\n {\n \"name\": \"pl-waw1\"\n },\n {\n \"name\": \"se-sto1\"\n },\n {\n \"name\": \"sg-sin1\"\n },\n {\n \"name\": \"uk-lon1\"\n },\n {\n \"name\": \"us-chi1\"\n },\n {\n \"name\": \"us-nyc1\"\n },\n {\n \"name\": \"us-sjo1\"\n }\n ]\n },\n \"plan\": \"1x1xCPU-1GB-10GB\",\n \"core_number\": 1,\n \"storage_size\": 10240,\n \"memory_amount\": 1024,\n \"components\": {\n \"compute\": {\n \"name\": \"rdb.standard.2CPU-8GB\",\n \"family\": \"standard\",\n \"node_count\": 2,\n \"cpu\": 4,\n \"memory_gb\": 8\n },\n \"storage\": {\n \"included_gib\": 100,\n \"dynamic_storage_supported\": true,\n \"additional_gib\": 40,\n \"total_gib\": 140\n },\n \"backups\": {\n \"name\": \"regular\",\n \"retention_days\": 15\n }\n }\n }\n ],\n \"properties\": {\n \"automatic_utility_network_ip_filter\": {\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"sample-id\",\n \"createOnly\": false,\n \"default\": {\n \"foo\": \"bar\"\n },\n \"example\": {\n \"foo\": \"bar\"\n },\n \"maxLength\": 255,\n \"minLength\": 255,\n \"pattern\": \"^[a-zA-Z0-9_./:-]+(\\\\[[^\\\\]]+\\\\])?$\",\n \"title\": \"Sample Property\",\n \"type\": \"any string\",\n \"user_error\": \"Invalid input provided\",\n \"dependencies\": {\n \"required\": {\n \"required\": [\n \"host\",\n \"port\"\n ]\n }\n },\n \"required\": [\n \"host\",\n \"port\"\n ],\n \"maxItems\": 10,\n \"description\": \"This is a sample property used for demonstration purposes.\",\n \"minimum\": [\n {\n \"key\": \"value\"\n }\n ],\n \"maximum\": [\n {\n \"key\": \"value\"\n },\n {\n \"key\": \"value\"\n }\n ],\n \"additionalProperties\": true\n },\n \"ip_filter\": {\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"sample-id\",\n \"createOnly\": false,\n \"default\": {\n \"foo\": \"bar\"\n },\n \"example\": {\n \"foo\": \"bar\"\n },\n \"maxLength\": 255,\n \"minLength\": 255,\n \"pattern\": \"^[a-zA-Z0-9_./:-]+(\\\\[[^\\\\]]+\\\\])?$\",\n \"title\": \"Sample Property\",\n \"type\": \"any string\",\n \"user_error\": \"Invalid input provided\",\n \"dependencies\": {\n \"required\": {\n \"required\": [\n \"host\",\n \"port\"\n ]\n }\n },\n \"required\": [\n \"host\",\n \"port\"\n ],\n \"maxItems\": 10,\n \"description\": \"This is a sample property used for demonstration purposes.\",\n \"minimum\": [\n {\n \"key\": \"value\"\n }\n ],\n \"maximum\": [\n {\n \"key\": \"value\"\n },\n {\n \"key\": \"value\"\n }\n ],\n \"additionalProperties\": true\n },\n \"public_access\": {\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"sample-id\",\n \"createOnly\": false,\n \"default\": {\n \"foo\": \"bar\"\n },\n \"example\": {\n \"foo\": \"bar\"\n },\n \"maxLength\": 255,\n \"minLength\": 255,\n \"pattern\": \"^[a-zA-Z0-9_./:-]+(\\\\[[^\\\\]]+\\\\])?$\",\n \"title\": \"Sample Property\",\n \"type\": \"any string\",\n \"user_error\": \"Invalid input provided\",\n \"dependencies\": {\n \"required\": {\n \"required\": [\n \"host\",\n \"port\"\n ]\n }\n },\n \"required\": [\n \"host\",\n \"port\"\n ],\n \"maxItems\": 10,\n \"description\": \"This is a sample property used for demonstration purposes.\",\n \"minimum\": [\n {\n \"key\": \"value\"\n }\n ],\n \"maximum\": [\n {\n \"key\": \"value\"\n },\n {\n \"key\": \"value\"\n }\n ],\n \"additionalProperties\": true\n },\n \"version\": {\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"sample-id\",\n \"createOnly\": false,\n \"default\": {\n \"foo\": \"bar\"\n },\n \"example\": {\n \"foo\": \"bar\"\n },\n \"maxLength\": 255,\n \"minLength\": 255,\n \"pattern\": \"^[a-zA-Z0-9_./:-]+(\\\\[[^\\\\]]+\\\\])?$\",\n \"title\": \"Sample Property\",\n \"type\": \"any string\",\n \"user_error\": \"Invalid input provided\",\n \"dependencies\": {\n \"required\": {\n \"required\": [\n \"host\",\n \"port\"\n ]\n }\n },\n \"required\": [\n \"host\",\n \"port\"\n ],\n \"maxItems\": 10,\n \"description\": \"This is a sample property used for demonstration purposes.\",\n \"minimum\": [\n {\n \"key\": \"value\"\n }\n ],\n \"maximum\": [\n {\n \"key\": \"value\"\n },\n {\n \"key\": \"value\"\n }\n ],\n \"additionalProperties\": true\n }\n },\n \"dependencies\": {\n \"key\": {\n \"required\": [\n \"host\",\n \"port\"\n ]\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "25574bb8-5200-4422-94ce-ddeddf1dfa3c", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "44755e76-279c-4818-86b2-a2dccfa6a619", + "name": "List databases - default", + "request": { + "urlPathTemplate": "/1.3/database", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"zone\": \"fi-hel1\",\n \"name\": \"my-db\",\n \"title\": \"My Database Service\",\n \"type\": \"pg\",\n \"plan\": \"1x1xCPU-2GB-25GB\",\n \"plan_components\": {\n \"compute\": {\n \"name\": \"rdb.standard.2CPU-8GB\",\n \"family\": \"standard\",\n \"node_count\": 2,\n \"cpu\": 4,\n \"memory_gb\": 8\n },\n \"storage\": {\n \"included_gib\": 100,\n \"dynamic_storage_supported\": true,\n \"additional_gib\": 40,\n \"total_gib\": 140\n },\n \"backups\": {\n \"name\": \"regular\",\n \"retention_days\": 15\n }\n },\n \"additional_disk_space_gib\": 10,\n \"state\": \"running\",\n \"state_error\": {\n \"key\": \"value\"\n },\n \"powered\": true,\n \"termination_protection\": false,\n \"node_count\": 1,\n \"create_time\": \"2023-10-01T12:00:00Z\",\n \"update_time\": \"2023-10-10T12:00:00Z\",\n \"service_uri\": \"postgres://upadmin:example-prefix-project@pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com:11550/defaultdb?sslmode=require\",\n \"service_uri_params\": {\n \"key\": \"value\"\n },\n \"maintenance\": {\n \"dow\": \"Monday\",\n \"time\": \"02:00:00\",\n \"pending_updates\": [\n {\n \"deadline\": \"2022-01-21T12:21:00Z\",\n \"description\": \"description related to the update\",\n \"start_after\": \"2022-01-21T12:21:00Z\",\n \"start_at\": \"2022-10-21T12:21:00Z\"\n }\n ]\n },\n \"metadata\": {\n \"key\": \"value\"\n },\n \"properties\": {\n \"key\": \"value\"\n },\n \"networks\": [\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"name\": \"example-private-network\",\n \"family\": \"IPv4\",\n \"type\": \"private\",\n \"create_time\": \"2025-08-01T10:40:04Z\",\n \"update_time\": \"2025-08-01T10:40:04Z\"\n }\n ],\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"role\": \"master\",\n \"state\": \"running\",\n \"progress_updates\": [\n {\n \"completed\": false,\n \"current\": 45,\n \"max\": 100,\n \"min\": 0,\n \"phase\": \"prepare\",\n \"unit\": \"bytes_uncompressed\"\n }\n ]\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"backups\": [\n {\n \"backup_name\": \"pg-backup-2024-01-01\",\n \"backup_time\": \"2024-01-01T12:00:00Z\",\n \"data_size\": 36413440\n }\n ],\n \"components\": [\n {\n \"component\": \"pg\",\n \"host\": \"pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com\",\n \"port\": 1150,\n \"route\": \"dynamic\",\n \"usage\": \"replica\",\n \"ssl\": true\n }\n ],\n \"connection_pools\": [\n {\n \"connection_uri\": \"postgresql://user:password@hostname:5432/dbname\",\n \"database\": \"pg-db-1\",\n \"pool_mode\": \"session\",\n \"pool_name\": \"pool-2\",\n \"pool_size\": 10,\n \"username\": \"updamin\"\n }\n ],\n \"users\": [\n {\n \"username\": \"admin\",\n \"password\": \"my-password\",\n \"authentication\": \"caching_sha2_password\",\n \"type\": \"admin\",\n \"pg_access_control\": {\n \"allow_replication\": true\n },\n \"redis_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"valkey_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"opensearch_access_control\": {\n \"rules\": [\n {\n \"index\": \"log-*\",\n \"permission\": \"read\"\n }\n ]\n }\n }\n ],\n \"databases\": [\n {\n \"name\": \"postgres\",\n \"lc_collate\": \"en_US.UTF-8\",\n \"lc_ctype\": \"en_US.UTF-8\"\n }\n ],\n \"acls\": [\n {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"permission\": \"read-write\",\n \"topic\": \"sensors/temperature\",\n \"username\": \"user123\"\n }\n ],\n \"service_integrations\": [\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"type\": \"rsyslog\",\n \"source_name\": \"my-database\",\n \"source_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destination_name\": \"my-rsyslog-server\",\n \"destination_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"state\": \"active\",\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"status\": \"running\",\n \"errors\": [\n \"some error\"\n ],\n \"likely_error_cause\": \"some error\"\n }\n ],\n \"properties\": {\n \"key1\": \"value1\",\n \"key2\": 2,\n \"key3\": true\n }\n }\n ]\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "44755e76-279c-4818-86b2-a2dccfa6a619", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "915f4b18-8bf0-4e78-bb46-0f37494595ad", + "name": "Create database - default", + "request": { + "urlPathTemplate": "/1.3/database", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"zone\": \"fi-hel1\",\n \"name\": \"my-db\",\n \"title\": \"My Database Service\",\n \"type\": \"pg\",\n \"plan\": \"1x1xCPU-2GB-25GB\",\n \"plan_components\": {\n \"compute\": {\n \"name\": \"rdb.standard.2CPU-8GB\",\n \"family\": \"standard\",\n \"node_count\": 2,\n \"cpu\": 4,\n \"memory_gb\": 8\n },\n \"storage\": {\n \"included_gib\": 100,\n \"dynamic_storage_supported\": true,\n \"additional_gib\": 40,\n \"total_gib\": 140\n },\n \"backups\": {\n \"name\": \"regular\",\n \"retention_days\": 15,\n \"frequent\": {\n \"interval_minutes\": 60,\n \"retention_days\": 1\n },\n \"infrequent\": {\n \"interval_minutes\": 1440,\n \"retention_days\": 14\n }\n }\n },\n \"additional_disk_space_gib\": 10,\n \"state\": \"running\",\n \"state_error\": {\n \"key\": \"value\"\n },\n \"powered\": true,\n \"termination_protection\": false,\n \"node_count\": 1,\n \"create_time\": \"2023-10-01T12:00:00Z\",\n \"update_time\": \"2023-10-10T12:00:00Z\",\n \"service_uri\": \"postgres://upadmin:example-prefix-project@pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com:11550/defaultdb?sslmode=require\",\n \"service_uri_params\": {\n \"key\": \"value\"\n },\n \"maintenance\": {\n \"dow\": \"Monday\",\n \"time\": \"02:00:00\",\n \"pending_updates\": [\n {\n \"deadline\": \"2022-01-21T12:21:00Z\",\n \"description\": \"description related to the update\",\n \"start_after\": \"2022-01-21T12:21:00Z\",\n \"start_at\": \"2022-10-21T12:21:00Z\"\n }\n ]\n },\n \"metadata\": {\n \"key\": \"value\"\n },\n \"properties\": {\n \"key\": \"value\"\n },\n \"networks\": [\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"name\": \"example-private-network\",\n \"family\": \"IPv4\",\n \"type\": \"private\",\n \"create_time\": \"2025-08-01T10:40:04Z\",\n \"update_time\": \"2025-08-01T10:40:04Z\"\n }\n ],\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"role\": \"master\",\n \"state\": \"running\",\n \"progress_updates\": [\n {\n \"completed\": false,\n \"current\": 45,\n \"max\": 100,\n \"min\": 0,\n \"phase\": \"prepare\",\n \"unit\": \"bytes_uncompressed\"\n }\n ]\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"backups\": [\n {\n \"backup_name\": \"pg-backup-2024-01-01\",\n \"backup_time\": \"2024-01-01T12:00:00Z\",\n \"data_size\": 36413440\n }\n ],\n \"components\": [\n {\n \"component\": \"pg\",\n \"host\": \"pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com\",\n \"port\": 1150,\n \"route\": \"dynamic\",\n \"usage\": \"replica\",\n \"ssl\": true\n }\n ],\n \"connection_pools\": [\n {\n \"connection_uri\": \"postgresql://user:password@hostname:5432/dbname\",\n \"database\": \"pg-db-1\",\n \"pool_mode\": \"session\",\n \"pool_name\": \"pool-2\",\n \"pool_size\": 10,\n \"username\": \"updamin\"\n }\n ],\n \"users\": [\n {\n \"username\": \"admin\",\n \"password\": \"my-password\",\n \"authentication\": \"caching_sha2_password\",\n \"type\": \"admin\",\n \"pg_access_control\": {\n \"allow_replication\": true\n },\n \"redis_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"valkey_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"opensearch_access_control\": {\n \"rules\": [\n {\n \"index\": \"log-*\",\n \"permission\": \"read\"\n }\n ]\n }\n }\n ],\n \"databases\": [\n {\n \"name\": \"postgres\",\n \"lc_collate\": \"en_US.UTF-8\",\n \"lc_ctype\": \"en_US.UTF-8\"\n }\n ],\n \"acls\": [\n {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"permission\": \"read-write\",\n \"topic\": \"sensors/temperature\",\n \"username\": \"user123\"\n }\n ],\n \"service_integrations\": [\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"type\": \"rsyslog\",\n \"source_name\": \"my-database\",\n \"source_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destination_name\": \"my-rsyslog-server\",\n \"destination_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"state\": \"active\",\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"status\": \"running\",\n \"errors\": [\n \"some error\"\n ],\n \"likely_error_cause\": \"some error\"\n }\n ],\n \"properties\": {\n \"key1\": \"value1\",\n \"key2\": 2,\n \"key3\": true\n }\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "915f4b18-8bf0-4e78-bb46-0f37494595ad", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "6dde778a-c4c2-4d02-b1b4-a9ba07f51bd5", + "name": "Get database - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"zone\": \"fi-hel1\",\n \"name\": \"my-db\",\n \"title\": \"My Database Service\",\n \"type\": \"pg\",\n \"plan\": \"1x1xCPU-2GB-25GB\",\n \"plan_components\": {\n \"compute\": {\n \"name\": \"rdb.standard.2CPU-8GB\",\n \"family\": \"standard\",\n \"node_count\": 2,\n \"cpu\": 4,\n \"memory_gb\": 8\n },\n \"storage\": {\n \"included_gib\": 100,\n \"dynamic_storage_supported\": true,\n \"additional_gib\": 40,\n \"total_gib\": 140\n },\n \"backups\": {\n \"name\": \"regular\",\n \"retention_days\": 15,\n \"frequent\": {\n \"interval_minutes\": 60,\n \"retention_days\": 1\n },\n \"infrequent\": {\n \"interval_minutes\": 1440,\n \"retention_days\": 14\n }\n }\n },\n \"additional_disk_space_gib\": 10,\n \"state\": \"running\",\n \"state_error\": {\n \"key\": \"value\"\n },\n \"powered\": true,\n \"termination_protection\": false,\n \"node_count\": 1,\n \"create_time\": \"2023-10-01T12:00:00Z\",\n \"update_time\": \"2023-10-10T12:00:00Z\",\n \"service_uri\": \"postgres://upadmin:example-prefix-project@pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com:11550/defaultdb?sslmode=require\",\n \"service_uri_params\": {\n \"key\": \"value\"\n },\n \"maintenance\": {\n \"dow\": \"Monday\",\n \"time\": \"02:00:00\",\n \"pending_updates\": [\n {\n \"deadline\": \"2022-01-21T12:21:00Z\",\n \"description\": \"description related to the update\",\n \"start_after\": \"2022-01-21T12:21:00Z\",\n \"start_at\": \"2022-10-21T12:21:00Z\"\n }\n ]\n },\n \"metadata\": {\n \"key\": \"value\"\n },\n \"properties\": {\n \"key\": \"value\"\n },\n \"networks\": [\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"name\": \"example-private-network\",\n \"family\": \"IPv4\",\n \"type\": \"private\",\n \"create_time\": \"2025-08-01T10:40:04Z\",\n \"update_time\": \"2025-08-01T10:40:04Z\"\n }\n ],\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"role\": \"master\",\n \"state\": \"running\",\n \"progress_updates\": [\n {\n \"completed\": false,\n \"current\": 45,\n \"max\": 100,\n \"min\": 0,\n \"phase\": \"prepare\",\n \"unit\": \"bytes_uncompressed\"\n }\n ]\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"backups\": [\n {\n \"backup_name\": \"pg-backup-2024-01-01\",\n \"backup_time\": \"2024-01-01T12:00:00Z\",\n \"data_size\": 36413440\n }\n ],\n \"components\": [\n {\n \"component\": \"pg\",\n \"host\": \"pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com\",\n \"port\": 1150,\n \"route\": \"dynamic\",\n \"usage\": \"replica\",\n \"ssl\": true\n }\n ],\n \"connection_pools\": [\n {\n \"connection_uri\": \"postgresql://user:password@hostname:5432/dbname\",\n \"database\": \"pg-db-1\",\n \"pool_mode\": \"session\",\n \"pool_name\": \"pool-2\",\n \"pool_size\": 10,\n \"username\": \"updamin\"\n }\n ],\n \"users\": [\n {\n \"username\": \"admin\",\n \"password\": \"my-password\",\n \"authentication\": \"caching_sha2_password\",\n \"type\": \"admin\",\n \"pg_access_control\": {\n \"allow_replication\": true\n },\n \"redis_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"valkey_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"opensearch_access_control\": {\n \"rules\": [\n {\n \"index\": \"log-*\",\n \"permission\": \"read\"\n }\n ]\n }\n }\n ],\n \"databases\": [\n {\n \"name\": \"postgres\",\n \"lc_collate\": \"en_US.UTF-8\",\n \"lc_ctype\": \"en_US.UTF-8\"\n }\n ],\n \"acls\": [\n {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"permission\": \"read-write\",\n \"topic\": \"sensors/temperature\",\n \"username\": \"user123\"\n }\n ],\n \"service_integrations\": [\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"type\": \"rsyslog\",\n \"source_name\": \"my-database\",\n \"source_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destination_name\": \"my-rsyslog-server\",\n \"destination_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"state\": \"active\",\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"status\": \"running\",\n \"errors\": [\n \"some error\"\n ],\n \"likely_error_cause\": \"some error\"\n }\n ],\n \"properties\": {\n \"key1\": \"value1\",\n \"key2\": 2,\n \"key3\": true\n }\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "6dde778a-c4c2-4d02-b1b4-a9ba07f51bd5", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "19d3399d-8963-49b7-a034-3add2ac6153d", + "name": "Delete database - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "19d3399d-8963-49b7-a034-3add2ac6153d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5fec81ac-1e37-45a2-b6c8-a160106d4be1", + "name": "Modify database - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}", + "method": "PATCH", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"zone\": \"fi-hel1\",\n \"name\": \"my-db\",\n \"title\": \"My Database Service\",\n \"type\": \"pg\",\n \"plan\": \"1x1xCPU-2GB-25GB\",\n \"plan_components\": {\n \"compute\": {\n \"name\": \"rdb.standard.2CPU-8GB\",\n \"family\": \"standard\",\n \"node_count\": 2,\n \"cpu\": 4,\n \"memory_gb\": 8\n },\n \"storage\": {\n \"included_gib\": 100,\n \"dynamic_storage_supported\": true,\n \"additional_gib\": 40,\n \"total_gib\": 140\n },\n \"backups\": {\n \"name\": \"regular\",\n \"retention_days\": 15,\n \"frequent\": {\n \"interval_minutes\": 60,\n \"retention_days\": 1\n },\n \"infrequent\": {\n \"interval_minutes\": 1440,\n \"retention_days\": 14\n }\n }\n },\n \"additional_disk_space_gib\": 10,\n \"state\": \"running\",\n \"state_error\": {\n \"key\": \"value\"\n },\n \"powered\": true,\n \"termination_protection\": false,\n \"node_count\": 1,\n \"create_time\": \"2023-10-01T12:00:00Z\",\n \"update_time\": \"2023-10-10T12:00:00Z\",\n \"service_uri\": \"postgres://upadmin:example-prefix-project@pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com:11550/defaultdb?sslmode=require\",\n \"service_uri_params\": {\n \"key\": \"value\"\n },\n \"maintenance\": {\n \"dow\": \"Monday\",\n \"time\": \"02:00:00\",\n \"pending_updates\": [\n {\n \"deadline\": \"2022-01-21T12:21:00Z\",\n \"description\": \"description related to the update\",\n \"start_after\": \"2022-01-21T12:21:00Z\",\n \"start_at\": \"2022-10-21T12:21:00Z\"\n }\n ]\n },\n \"metadata\": {\n \"key\": \"value\"\n },\n \"properties\": {\n \"key\": \"value\"\n },\n \"networks\": [\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"name\": \"example-private-network\",\n \"family\": \"IPv4\",\n \"type\": \"private\",\n \"create_time\": \"2025-08-01T10:40:04Z\",\n \"update_time\": \"2025-08-01T10:40:04Z\"\n }\n ],\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"role\": \"master\",\n \"state\": \"running\",\n \"progress_updates\": [\n {\n \"completed\": false,\n \"current\": 45,\n \"max\": 100,\n \"min\": 0,\n \"phase\": \"prepare\",\n \"unit\": \"bytes_uncompressed\"\n }\n ]\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"backups\": [\n {\n \"backup_name\": \"pg-backup-2024-01-01\",\n \"backup_time\": \"2024-01-01T12:00:00Z\",\n \"data_size\": 36413440\n }\n ],\n \"components\": [\n {\n \"component\": \"pg\",\n \"host\": \"pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com\",\n \"port\": 1150,\n \"route\": \"dynamic\",\n \"usage\": \"replica\",\n \"ssl\": true\n }\n ],\n \"connection_pools\": [\n {\n \"connection_uri\": \"postgresql://user:password@hostname:5432/dbname\",\n \"database\": \"pg-db-1\",\n \"pool_mode\": \"session\",\n \"pool_name\": \"pool-2\",\n \"pool_size\": 10,\n \"username\": \"updamin\"\n }\n ],\n \"users\": [\n {\n \"username\": \"admin\",\n \"password\": \"my-password\",\n \"authentication\": \"caching_sha2_password\",\n \"type\": \"admin\",\n \"pg_access_control\": {\n \"allow_replication\": true\n },\n \"redis_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"valkey_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"opensearch_access_control\": {\n \"rules\": [\n {\n \"index\": \"log-*\",\n \"permission\": \"read\"\n }\n ]\n }\n }\n ],\n \"databases\": [\n {\n \"name\": \"postgres\",\n \"lc_collate\": \"en_US.UTF-8\",\n \"lc_ctype\": \"en_US.UTF-8\"\n }\n ],\n \"acls\": [\n {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"permission\": \"read-write\",\n \"topic\": \"sensors/temperature\",\n \"username\": \"user123\"\n }\n ],\n \"service_integrations\": [\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"type\": \"rsyslog\",\n \"source_name\": \"my-database\",\n \"source_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destination_name\": \"my-rsyslog-server\",\n \"destination_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"state\": \"active\",\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"status\": \"running\",\n \"errors\": [\n \"some error\"\n ],\n \"likely_error_cause\": \"some error\"\n }\n ],\n \"properties\": {\n \"key1\": \"value1\",\n \"key2\": 2,\n \"key3\": true\n }\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5fec81ac-1e37-45a2-b6c8-a160106d4be1", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "8115c1fe-7832-4d44-9cc3-3f557922edb8", + "name": "Modify database type - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/service-type", + "method": "PATCH", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"zone\": \"fi-hel1\",\n \"name\": \"my-db\",\n \"title\": \"My Database Service\",\n \"type\": \"pg\",\n \"plan\": \"1x1xCPU-2GB-25GB\",\n \"plan_components\": {\n \"compute\": {\n \"name\": \"rdb.standard.2CPU-8GB\",\n \"family\": \"standard\",\n \"node_count\": 2,\n \"cpu\": 4,\n \"memory_gb\": 8\n },\n \"storage\": {\n \"included_gib\": 100,\n \"dynamic_storage_supported\": true,\n \"additional_gib\": 40,\n \"total_gib\": 140\n },\n \"backups\": {\n \"name\": \"regular\",\n \"retention_days\": 15,\n \"frequent\": {\n \"interval_minutes\": 60,\n \"retention_days\": 1\n },\n \"infrequent\": {\n \"interval_minutes\": 1440,\n \"retention_days\": 14\n }\n }\n },\n \"additional_disk_space_gib\": 10,\n \"state\": \"running\",\n \"state_error\": {\n \"key\": \"value\"\n },\n \"powered\": true,\n \"termination_protection\": false,\n \"node_count\": 1,\n \"create_time\": \"2023-10-01T12:00:00Z\",\n \"update_time\": \"2023-10-10T12:00:00Z\",\n \"service_uri\": \"postgres://upadmin:example-prefix-project@pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com:11550/defaultdb?sslmode=require\",\n \"service_uri_params\": {\n \"key\": \"value\"\n },\n \"maintenance\": {\n \"dow\": \"Monday\",\n \"time\": \"02:00:00\",\n \"pending_updates\": [\n {\n \"deadline\": \"2022-01-21T12:21:00Z\",\n \"description\": \"description related to the update\",\n \"start_after\": \"2022-01-21T12:21:00Z\",\n \"start_at\": \"2022-10-21T12:21:00Z\"\n }\n ]\n },\n \"metadata\": {\n \"key\": \"value\"\n },\n \"properties\": {\n \"key\": \"value\"\n },\n \"networks\": [\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"name\": \"example-private-network\",\n \"family\": \"IPv4\",\n \"type\": \"private\",\n \"create_time\": \"2025-08-01T10:40:04Z\",\n \"update_time\": \"2025-08-01T10:40:04Z\"\n }\n ],\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"role\": \"master\",\n \"state\": \"running\",\n \"progress_updates\": [\n {\n \"completed\": false,\n \"current\": 45,\n \"max\": 100,\n \"min\": 0,\n \"phase\": \"prepare\",\n \"unit\": \"bytes_uncompressed\"\n }\n ]\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"backups\": [\n {\n \"backup_name\": \"pg-backup-2024-01-01\",\n \"backup_time\": \"2024-01-01T12:00:00Z\",\n \"data_size\": 36413440\n }\n ],\n \"components\": [\n {\n \"component\": \"pg\",\n \"host\": \"pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com\",\n \"port\": 1150,\n \"route\": \"dynamic\",\n \"usage\": \"replica\",\n \"ssl\": true\n }\n ],\n \"connection_pools\": [\n {\n \"connection_uri\": \"postgresql://user:password@hostname:5432/dbname\",\n \"database\": \"pg-db-1\",\n \"pool_mode\": \"session\",\n \"pool_name\": \"pool-2\",\n \"pool_size\": 10,\n \"username\": \"updamin\"\n }\n ],\n \"users\": [\n {\n \"username\": \"admin\",\n \"password\": \"my-password\",\n \"authentication\": \"caching_sha2_password\",\n \"type\": \"admin\",\n \"pg_access_control\": {\n \"allow_replication\": true\n },\n \"redis_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"valkey_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"opensearch_access_control\": {\n \"rules\": [\n {\n \"index\": \"log-*\",\n \"permission\": \"read\"\n }\n ]\n }\n }\n ],\n \"databases\": [\n {\n \"name\": \"postgres\",\n \"lc_collate\": \"en_US.UTF-8\",\n \"lc_ctype\": \"en_US.UTF-8\"\n }\n ],\n \"acls\": [\n {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"permission\": \"read-write\",\n \"topic\": \"sensors/temperature\",\n \"username\": \"user123\"\n }\n ],\n \"service_integrations\": [\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"type\": \"rsyslog\",\n \"source_name\": \"my-database\",\n \"source_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destination_name\": \"my-rsyslog-server\",\n \"destination_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"state\": \"active\",\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"status\": \"running\",\n \"errors\": [\n \"some error\"\n ],\n \"likely_error_cause\": \"some error\"\n }\n ],\n \"properties\": {\n \"key1\": \"value1\",\n \"key2\": 2,\n \"key3\": true\n }\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "8115c1fe-7832-4d44-9cc3-3f557922edb8", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "00c14588-70f2-4e73-9ac3-8041013f641e", + "name": "Clone database - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/clone", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"zone\": \"fi-hel1\",\n \"name\": \"my-db\",\n \"title\": \"My Database Service\",\n \"type\": \"pg\",\n \"plan\": \"1x1xCPU-2GB-25GB\",\n \"plan_components\": {\n \"compute\": {\n \"name\": \"rdb.standard.2CPU-8GB\",\n \"family\": \"standard\",\n \"node_count\": 2,\n \"cpu\": 4,\n \"memory_gb\": 8\n },\n \"storage\": {\n \"included_gib\": 100,\n \"dynamic_storage_supported\": true,\n \"additional_gib\": 40,\n \"total_gib\": 140\n },\n \"backups\": {\n \"name\": \"regular\",\n \"retention_days\": 15,\n \"frequent\": {\n \"interval_minutes\": 60,\n \"retention_days\": 1\n },\n \"infrequent\": {\n \"interval_minutes\": 1440,\n \"retention_days\": 14\n }\n }\n },\n \"additional_disk_space_gib\": 10,\n \"state\": \"running\",\n \"state_error\": {\n \"key\": \"value\"\n },\n \"powered\": true,\n \"termination_protection\": false,\n \"node_count\": 1,\n \"create_time\": \"2023-10-01T12:00:00Z\",\n \"update_time\": \"2023-10-10T12:00:00Z\",\n \"service_uri\": \"postgres://upadmin:example-prefix-project@pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com:11550/defaultdb?sslmode=require\",\n \"service_uri_params\": {\n \"key\": \"value\"\n },\n \"maintenance\": {\n \"dow\": \"Monday\",\n \"time\": \"02:00:00\",\n \"pending_updates\": [\n {\n \"deadline\": \"2022-01-21T12:21:00Z\",\n \"description\": \"description related to the update\",\n \"start_after\": \"2022-01-21T12:21:00Z\",\n \"start_at\": \"2022-10-21T12:21:00Z\"\n }\n ]\n },\n \"metadata\": {\n \"key\": \"value\"\n },\n \"properties\": {\n \"key\": \"value\"\n },\n \"networks\": [\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"name\": \"example-private-network\",\n \"family\": \"IPv4\",\n \"type\": \"private\",\n \"create_time\": \"2025-08-01T10:40:04Z\",\n \"update_time\": \"2025-08-01T10:40:04Z\"\n }\n ],\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"role\": \"master\",\n \"state\": \"running\",\n \"progress_updates\": [\n {\n \"completed\": false,\n \"current\": 45,\n \"max\": 100,\n \"min\": 0,\n \"phase\": \"prepare\",\n \"unit\": \"bytes_uncompressed\"\n }\n ]\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"backups\": [\n {\n \"backup_name\": \"pg-backup-2024-01-01\",\n \"backup_time\": \"2024-01-01T12:00:00Z\",\n \"data_size\": 36413440\n }\n ],\n \"components\": [\n {\n \"component\": \"pg\",\n \"host\": \"pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com\",\n \"port\": 1150,\n \"route\": \"dynamic\",\n \"usage\": \"replica\",\n \"ssl\": true\n }\n ],\n \"connection_pools\": [\n {\n \"connection_uri\": \"postgresql://user:password@hostname:5432/dbname\",\n \"database\": \"pg-db-1\",\n \"pool_mode\": \"session\",\n \"pool_name\": \"pool-2\",\n \"pool_size\": 10,\n \"username\": \"updamin\"\n }\n ],\n \"users\": [\n {\n \"username\": \"admin\",\n \"password\": \"my-password\",\n \"authentication\": \"caching_sha2_password\",\n \"type\": \"admin\",\n \"pg_access_control\": {\n \"allow_replication\": true\n },\n \"redis_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"valkey_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"opensearch_access_control\": {\n \"rules\": [\n {\n \"index\": \"log-*\",\n \"permission\": \"read\"\n }\n ]\n }\n }\n ],\n \"databases\": [\n {\n \"name\": \"postgres\",\n \"lc_collate\": \"en_US.UTF-8\",\n \"lc_ctype\": \"en_US.UTF-8\"\n }\n ],\n \"acls\": [\n {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"permission\": \"read-write\",\n \"topic\": \"sensors/temperature\",\n \"username\": \"user123\"\n }\n ],\n \"service_integrations\": [\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"type\": \"rsyslog\",\n \"source_name\": \"my-database\",\n \"source_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destination_name\": \"my-rsyslog-server\",\n \"destination_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"state\": \"active\",\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"status\": \"running\",\n \"errors\": [\n \"some error\"\n ],\n \"likely_error_cause\": \"some error\"\n }\n ],\n \"properties\": {\n \"key1\": \"value1\",\n \"key2\": 2,\n \"key3\": true\n }\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "00c14588-70f2-4e73-9ac3-8041013f641e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "7ea1987e-d579-4693-b866-cbe8a0e1950f", + "name": "List networks - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/networks", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"name\": \"example-private-network\",\n \"family\": \"IPv4\",\n \"type\": \"private\",\n \"create_time\": \"2025-08-01T10:40:04Z\",\n \"update_time\": \"2025-08-01T10:40:04Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7ea1987e-d579-4693-b866-cbe8a0e1950f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2817de4b-3676-470d-905e-ca04e8d3842d", + "name": "Create network - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/networks", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"name\": \"example-private-network\",\n \"family\": \"IPv4\",\n \"type\": \"private\",\n \"create_time\": \"2025-08-01T10:40:04Z\",\n \"update_time\": \"2025-08-01T10:40:04Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2817de4b-3676-470d-905e-ca04e8d3842d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "9cc97d94-53c4-471f-8371-0436273bce78", + "name": "Get network - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/networks/{network-name}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "network-name": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"name\": \"example-private-network\",\n \"family\": \"IPv4\",\n \"type\": \"private\",\n \"create_time\": \"2025-08-01T10:40:04Z\",\n \"update_time\": \"2025-08-01T10:40:04Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "9cc97d94-53c4-471f-8371-0436273bce78", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "52ff20d6-a2ec-46fb-b116-09de005236b5", + "name": "Delete network - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/networks/{network-name}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "network-name": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "52ff20d6-a2ec-46fb-b116-09de005236b5", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "497c63b0-0faf-4895-a576-e25b739107c3", + "name": "Upgrade database - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/upgrade", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"zone\": \"fi-hel1\",\n \"name\": \"my-db\",\n \"title\": \"My Database Service\",\n \"type\": \"pg\",\n \"plan\": \"1x1xCPU-2GB-25GB\",\n \"plan_components\": {\n \"compute\": {\n \"name\": \"rdb.standard.2CPU-8GB\",\n \"family\": \"standard\",\n \"node_count\": 2,\n \"cpu\": 4,\n \"memory_gb\": 8\n },\n \"storage\": {\n \"included_gib\": 100,\n \"dynamic_storage_supported\": true,\n \"additional_gib\": 40,\n \"total_gib\": 140\n },\n \"backups\": {\n \"name\": \"regular\",\n \"retention_days\": 15,\n \"frequent\": {\n \"interval_minutes\": 60,\n \"retention_days\": 1\n },\n \"infrequent\": {\n \"interval_minutes\": 1440,\n \"retention_days\": 14\n }\n }\n },\n \"additional_disk_space_gib\": 10,\n \"state\": \"running\",\n \"state_error\": {\n \"key\": \"value\"\n },\n \"powered\": true,\n \"termination_protection\": false,\n \"node_count\": 1,\n \"create_time\": \"2023-10-01T12:00:00Z\",\n \"update_time\": \"2023-10-10T12:00:00Z\",\n \"service_uri\": \"postgres://upadmin:example-prefix-project@pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com:11550/defaultdb?sslmode=require\",\n \"service_uri_params\": {\n \"key\": \"value\"\n },\n \"maintenance\": {\n \"dow\": \"Monday\",\n \"time\": \"02:00:00\",\n \"pending_updates\": [\n {\n \"deadline\": \"2022-01-21T12:21:00Z\",\n \"description\": \"description related to the update\",\n \"start_after\": \"2022-01-21T12:21:00Z\",\n \"start_at\": \"2022-10-21T12:21:00Z\"\n }\n ]\n },\n \"metadata\": {\n \"key\": \"value\"\n },\n \"properties\": {\n \"key\": \"value\"\n },\n \"networks\": [\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"name\": \"example-private-network\",\n \"family\": \"IPv4\",\n \"type\": \"private\",\n \"create_time\": \"2025-08-01T10:40:04Z\",\n \"update_time\": \"2025-08-01T10:40:04Z\"\n }\n ],\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"role\": \"master\",\n \"state\": \"running\",\n \"progress_updates\": [\n {\n \"completed\": false,\n \"current\": 45,\n \"max\": 100,\n \"min\": 0,\n \"phase\": \"prepare\",\n \"unit\": \"bytes_uncompressed\"\n }\n ]\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"backups\": [\n {\n \"backup_name\": \"pg-backup-2024-01-01\",\n \"backup_time\": \"2024-01-01T12:00:00Z\",\n \"data_size\": 36413440\n }\n ],\n \"components\": [\n {\n \"component\": \"pg\",\n \"host\": \"pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com\",\n \"port\": 1150,\n \"route\": \"dynamic\",\n \"usage\": \"replica\",\n \"ssl\": true\n }\n ],\n \"connection_pools\": [\n {\n \"connection_uri\": \"postgresql://user:password@hostname:5432/dbname\",\n \"database\": \"pg-db-1\",\n \"pool_mode\": \"session\",\n \"pool_name\": \"pool-2\",\n \"pool_size\": 10,\n \"username\": \"updamin\"\n }\n ],\n \"users\": [\n {\n \"username\": \"admin\",\n \"password\": \"my-password\",\n \"authentication\": \"caching_sha2_password\",\n \"type\": \"admin\",\n \"pg_access_control\": {\n \"allow_replication\": true\n },\n \"redis_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"valkey_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"opensearch_access_control\": {\n \"rules\": [\n {\n \"index\": \"log-*\",\n \"permission\": \"read\"\n }\n ]\n }\n }\n ],\n \"databases\": [\n {\n \"name\": \"postgres\",\n \"lc_collate\": \"en_US.UTF-8\",\n \"lc_ctype\": \"en_US.UTF-8\"\n }\n ],\n \"acls\": [\n {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"permission\": \"read-write\",\n \"topic\": \"sensors/temperature\",\n \"username\": \"user123\"\n }\n ],\n \"service_integrations\": [\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"type\": \"rsyslog\",\n \"source_name\": \"my-database\",\n \"source_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destination_name\": \"my-rsyslog-server\",\n \"destination_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"state\": \"active\",\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"status\": \"running\",\n \"errors\": [\n \"some error\"\n ],\n \"likely_error_cause\": \"some error\"\n }\n ],\n \"properties\": {\n \"key1\": \"value1\",\n \"key2\": 2,\n \"key3\": true\n }\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "497c63b0-0faf-4895-a576-e25b739107c3", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2d5c45b2-1a18-4136-9161-a4432dcb54d1", + "name": "List labels - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/labels", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2d5c45b2-1a18-4136-9161-a4432dcb54d1", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "afb6af05-c628-4d3e-8c63-5da5d9795b2a", + "name": "Create label - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/labels", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"key\": \"environment\",\n \"value\": \"production\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "afb6af05-c628-4d3e-8c63-5da5d9795b2a", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f242d76b-a528-4971-968a-741d3f4862d8", + "name": "Get label - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/labels/{label-key}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "foo" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"key\": \"environment\",\n \"value\": \"production\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f242d76b-a528-4971-968a-741d3f4862d8", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "9ca5f3c0-25a3-4c67-9dc3-c705d24bd442", + "name": "Delete label - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/labels/{label-key}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "foo" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "9ca5f3c0-25a3-4c67-9dc3-c705d24bd442", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5a923abb-a3ab-4fde-956b-33cc719867dd", + "name": "Modify label - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/labels/{label-key}", + "method": "PATCH", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "foo" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"key\": \"environment\",\n \"value\": \"production\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5a923abb-a3ab-4fde-956b-33cc719867dd", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "fd8124d3-2076-4ab8-894f-35327ca9d6b8", + "name": "Get available extensions - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/available-extensions", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"default_version\": \"1.12\",\n \"name\": \"pg_stat_statements\",\n \"versions\": [\n \"1.10\",\n \"1.11\",\n \"1.12\"\n ]\n },\n {\n \"default_version\": \"3.4.0\",\n \"name\": \"postgis\",\n \"versions\": [\n \"3.3.0\",\n \"3.4.0\"\n ]\n },\n {\n \"default_version\": \"0.8.1\",\n \"name\": \"vector\",\n \"versions\": [\n \"0.8.1\"\n ]\n },\n {\n \"default_version\": \"1.1\",\n \"name\": \"uuid-ossp\",\n \"versions\": [\n \"1.1\"\n ]\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "fd8124d3-2076-4ab8-894f-35327ca9d6b8", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f761b292-ced3-4339-b428-149852db0e9b", + "name": "Get available PostgreSQL extensions - default", + "request": { + "urlPathTemplate": "/1.3/database/pg/available-extensions", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"version\": \"16\",\n \"extensions\": [\n {\n \"default_version\": \"1.12\",\n \"name\": \"pg_stat_statements\",\n \"versions\": [\n \"1.10\",\n \"1.11\",\n \"1.12\"\n ]\n },\n {\n \"default_version\": \"3.4.0\",\n \"name\": \"postgis\",\n \"versions\": [\n \"3.3.0\",\n \"3.4.0\"\n ]\n }\n ]\n },\n {\n \"version\": \"15\",\n \"extensions\": [\n {\n \"default_version\": \"1.10\",\n \"name\": \"pg_stat_statements\",\n \"versions\": [\n \"1.9\",\n \"1.10\"\n ]\n },\n {\n \"default_version\": \"3.3.0\",\n \"name\": \"postgis\",\n \"versions\": [\n \"3.2.0\",\n \"3.3.0\"\n ]\n }\n ]\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f761b292-ced3-4339-b428-149852db0e9b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "167f428b-57b6-4124-a83d-d30f0bfad22e", + "name": "Get database type versions - default", + "request": { + "urlPathTemplate": "/1.3/database/versions", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"major_version\": \"8\",\n \"service_type\": \"mysql\",\n \"state\": \"available\",\n \"end_of_life_time\": \"2028-11-09T00:00:00Z\",\n \"availability_end_time\": \"2028-05-09T00:00:00Z\",\n \"availability_start_time\": \"2019-05-10T00:00:00Z\",\n \"termination_time\": \"2028-11-09T00:00:00Z\",\n \"upgrade_to_service_type\": \"2028-11-09T00:00:00Z\",\n \"upgrade_to_version\": \"2\",\n \"upstream_end_of_life_time\": \"2028-11-09T00:00:00Z\"\n },\n {\n \"major_version\": \"16\",\n \"service_type\": \"pg\",\n \"state\": \"available\",\n \"end_of_life_time\": \"2028-11-09T00:00:00Z\",\n \"availability_end_time\": \"2028-05-09T00:00:00Z\",\n \"availability_start_time\": \"2024-01-08T00:00:00Z\",\n \"termination_time\": \"2028-11-09T00:00:00Z\",\n \"upgrade_to_service_type\": \"2028-11-09T00:00:00Z\",\n \"upgrade_to_version\": \"2\",\n \"upstream_end_of_life_time\": \"2028-11-09T00:00:00Z\"\n },\n {\n \"major_version\": \"2\",\n \"service_type\": \"opensearch\",\n \"state\": \"available\",\n \"end_of_life_time\": \"2028-11-09T00:00:00Z\",\n \"availability_end_time\": \"2028-05-09T00:00:00Z\",\n \"availability_start_time\": \"2022-07-12T00:00:00Z\",\n \"termination_time\": \"2028-11-09T00:00:00Z\",\n \"upgrade_to_service_type\": \"2028-11-09T00:00:00Z\",\n \"upgrade_to_version\": \"2\",\n \"upstream_end_of_life_time\": \"2028-11-09T00:00:00Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "167f428b-57b6-4124-a83d-d30f0bfad22e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "ce64ba71-abdf-407b-8980-fde3b2e09c22", + "name": "Get access controls (OpenSearch) - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/access-control", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"access_control\": false,\n \"extended_access_control\": true\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ce64ba71-abdf-407b-8980-fde3b2e09c22", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "dfc12f17-9def-459e-9a7d-164e4249ddef", + "name": "Modify access controls (OpenSearch) - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/access-control", + "method": "PATCH", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"access_control\": false,\n \"extended_access_control\": true\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "dfc12f17-9def-459e-9a7d-164e4249ddef", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "b0af62fb-9480-421b-a95e-24ea32cd2e7f", + "name": "Get Security management status (OpenSearch) - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/security", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"security_plugin_admin_enabled\": true,\n \"security_plugin_available\": true,\n \"security_plugin_enabled\": true\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "b0af62fb-9480-421b-a95e-24ea32cd2e7f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e30d7ff2-ebc5-472b-bf1d-3eb85cad182d", + "name": "Enable Security management admin (OpenSearch) - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/security/admin", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"security_plugin_admin_enabled\": true,\n \"security_plugin_available\": true,\n \"security_plugin_enabled\": true\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e30d7ff2-ebc5-472b-bf1d-3eb85cad182d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "308cc9e2-a63e-4876-98e7-1ef4e7c5f42b", + "name": "Modify Security management admin password (OpenSearch) - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/security/admin", + "method": "PUT", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"security_plugin_admin_enabled\": true,\n \"security_plugin_available\": true,\n \"security_plugin_enabled\": true\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "308cc9e2-a63e-4876-98e7-1ef4e7c5f42b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ef3e64be-2a2a-4331-9f93-af06c0949c0d", + "name": "List integration endpoints - default", + "request": { + "urlPathTemplate": "/1.3/database/integration-endpoints", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"uuid\": \"20e86f48-2dcd-4a43-843d-3532ab112c1d\",\n \"name\": \"rsyslog\",\n \"type\": \"rsyslog\",\n \"properties\": {\n \"format\": \"rfc5424\",\n \"max_message_size\": 8192,\n \"port\": 514,\n \"sd\": \"\",\n \"server\": \"94.237.95.164\",\n \"tls\": false\n }\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ef3e64be-2a2a-4331-9f93-af06c0949c0d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "a227ab96-1510-4ec6-9077-899df205a7e6", + "name": "Create integration endpoint - default", + "request": { + "urlPathTemplate": "/1.3/database/integration-endpoints", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"uuid\": \"20e86f48-2dcd-4a43-843d-3532ab112c1d\",\n \"name\": \"rsyslog\",\n \"type\": \"rsyslog\",\n \"properties\": {\n \"format\": \"rfc5424\",\n \"max_message_size\": 8192,\n \"port\": 514,\n \"sd\": \"\",\n \"server\": \"94.237.95.164\",\n \"tls\": false\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a227ab96-1510-4ec6-9077-899df205a7e6", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2bc0dfaa-0f2b-4c98-9919-87e9a862e9cc", + "name": "Get integration endpoint - default", + "request": { + "urlPathTemplate": "/1.3/database/integration-endpoints/{integration-uuid}", + "method": "GET", + "pathParameters": { + "integration-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"20e86f48-2dcd-4a43-843d-3532ab112c1d\",\n \"name\": \"rsyslog\",\n \"type\": \"rsyslog\",\n \"properties\": {\n \"format\": \"rfc5424\",\n \"max_message_size\": 8192,\n \"port\": 514,\n \"sd\": \"\",\n \"server\": \"94.237.95.164\",\n \"tls\": false\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2bc0dfaa-0f2b-4c98-9919-87e9a862e9cc", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "348630f6-1c1b-480a-b3c4-5477ea07b57b", + "name": "Delete integration endpoint - default", + "request": { + "urlPathTemplate": "/1.3/database/integration-endpoints/{integration-uuid}", + "method": "DELETE", + "pathParameters": { + "integration-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "348630f6-1c1b-480a-b3c4-5477ea07b57b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4715e908-a01e-4ba4-872e-e477a90c0da5", + "name": "Modify integration endpoint - default", + "request": { + "urlPathTemplate": "/1.3/database/integration-endpoints/{integration-uuid}", + "method": "PATCH", + "pathParameters": { + "integration-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"20e86f48-2dcd-4a43-843d-3532ab112c1d\",\n \"name\": \"rsyslog\",\n \"type\": \"rsyslog\",\n \"properties\": {\n \"format\": \"rfc5424\",\n \"max_message_size\": 8192,\n \"port\": 514,\n \"sd\": \"\",\n \"server\": \"94.237.95.164\",\n \"tls\": false\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4715e908-a01e-4ba4-872e-e477a90c0da5", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "112e6a08-4c0b-48d8-86c4-d36adfe7cd46", + "name": "Get account CA certificate - default", + "request": { + "urlPathTemplate": "/1.3/database/certificate", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"certificate\": \"-----BEGIN CERTIFICATE-----\\naxxxxxxxxxxxxx+tkP9Uh9+PxxxxxcNAQEM\\nBQAwOjE4MDYGA1UEAwwvZWYzMTc1xxxxxxxxxx0YjM2OWIz\\nM2RkIFByb2plY3QgQ0EwHhcNMjEwMzMwMDgxNDU0WhcNMzEwMzI4MDgxNDU0WjA6\\nMTgwNgYDVQQDDC9lZjMxNzU1NC1lNzYzLTQ5ZjUtODI4Ni1lZDRiMzY5YjMzZGQg\\nUHJvamVjdCBDQTCCAaIwDQYJKoZIhvcNAQEBBQxxxxggGBAK1Vh4GR\\nlfxPZ3Icw8E1WlS5+9rADOdrstYtL3oiHBqzljmjvKf1Vuu0LLHtszWrCElOvoZ4\\nzhg6+yVIB9YcvTZJNU0BNlIilF0rafn/40pFjeKrtxxxxxxxxxxy48Hnk\\nMAiqoRyJ6hGRpYmKVip2sbMEtI+X9xQahlhlTMLo9082gS2hI5nvmhDqRiOlly28\\ntwr2I/nbsIao8pIE19bdptKVqrv9x+O51O2JK7NlyjxnJVaHS9Tv6z1gG0GZgzYW\\nkram1U8oTu72cjvGhMIBhgz7AlQ74PMtAub/eH4hipGU4LDZQiZ+9kCT+FCD9uAq\\nIq+ALiLPHTCaGiKTJYoerutgrmrz1HZp6RmxRc8Wk7MdPp8OHqSXUnewKSGlzEl3\\nhlJ5UMOVQ+tSDffAuvA6phUS0mmm1xxxxxxxxxxxxxxxMcrVE8AjbF5nkieOV0r6hIwIDAQAB\\noz8wPTAdBgNVHQ4EFxxxxgQUHTUNeVDpSFx8fjq9xxxxxxxxFDnqn8xY0iAwDwYDVR0TBAgwBgEB\\n/wIBADALBgNxxxxxxxxxxLtt8qOjsbvS\\nYZtePpqZjx7NkmFdScc0LOBj6oXFetcJlhLQKzrguQDi/trt29sxjZZ5zLnQufnE\\ns8IYtbclhDbF0qGG15oP8tYVRXfzKLHF4HfuMrdiyqzF/q6Qy0fVIiFWD7t1it8V\\nPLqlk9oFDL7xUnsZOfYcqv8Ct+aWE7L73gJVgUkDHP+gkdGTWKYm4zzYTLfqh1Iu\\nyivOjn+KSyjjtsJsOGUDZBkh215OMKPp4JpWQpgQeK6kjTnwuMwEYYFyhfu/z5wU\\nwN7z7Ad39fyGmQzkGbFXtP0te4MFElOVSkiHaB4T4lTM6690st6+uIhFI1Qo/oAY\\n30ybOpOTLF7FZxwY5Z+BTW27hytyECLkG3b4iKIqKsRIvlFkwKP8cfKjq7ImSbBG\\nOJ8JBcraffygrLznbJ2979Y9yN+n+8wW0xxxxxxxxxxov24snxDmm6fAMoO1\\nxBM7c2KZA5ZoZDefcz9e28r7xxxx==\\n-----END CERTIFICATE-----\\n\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "112e6a08-4c0b-48d8-86c4-d36adfe7cd46", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "71b25f5b-ca99-4496-80cb-fd87f3a8dc4d", + "name": "List all alerts - default", + "request": { + "urlPathTemplate": "/1.3/database/alerts", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"create_time\": \"2025-08-01T10:40:04Z\",\n \"event\": \"pg-disk-full\",\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"title\": \"pg-1x2xcpu-2\",\n \"service_type\": \"pg\",\n \"severity\": \"critical\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "71b25f5b-ca99-4496-80cb-fd87f3a8dc4d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "8e7b2dfa-0dd8-4ddf-83a6-d70fcbdc4aef", + "name": "Get database status - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/status", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"state\": \"running\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "8e7b2dfa-0dd8-4ddf-83a6-d70fcbdc4aef", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4893ca29-9e61-4050-9a5f-466069a549aa", + "name": "Get database versions - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/versions", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n \"12\",\n \"13\",\n \"14\",\n \"15\",\n \"16\"\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4893ca29-9e61-4050-9a5f-466069a549aa", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f7823814-ace9-4163-85f8-fa791227a068", + "name": "Start manual maintenance - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/start-maintenance", + "method": "PUT", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"errors\": [\n {\n \"message\": \"Invalid request\",\n \"more_info\": \"https://developers.upcloud.com/errors\",\n \"status\": 400\n }\n ],\n \"message\": \"An error occurred while processing your request.\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f7823814-ace9-4163-85f8-fa791227a068", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f04fc173-c0c5-4e0d-9cde-86625d05c2b4", + "name": "Enable temporary writes - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/enable-writes", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"errors\": [\n {\n \"message\": \"Invalid request\",\n \"more_info\": \"https://developers.upcloud.com/errors\",\n \"status\": 400\n }\n ],\n \"message\": \"An error occurred while processing your request.\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f04fc173-c0c5-4e0d-9cde-86625d05c2b4", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "6a84c9d0-dcfe-4903-8ef5-eae9edad9420", + "name": "Get database migration status - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/migration-status", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"error\": \"some error occurred\",\n \"method\": \"replication\",\n \"seconds_behind_master\": 0,\n \"source_active\": true,\n \"status\": \"done\",\n \"databases\": [\n {\n \"error\": \"some error occurred\",\n \"dbname\": \"defaultdb\",\n \"method\": \"replication\",\n \"status\": \"syncing\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "6a84c9d0-dcfe-4903-8ef5-eae9edad9420", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "36e1344c-7e5c-489a-9cd7-ed08b2bda2da", + "name": "Get database alerts - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/alerts", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"create_time\": \"2023-10-05T14:48:00Z\",\n \"event\": \"user_alert_os_too_many_shards.\",\n \"service_type\": \"opensearch\",\n \"severity\": \"warning\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "36e1344c-7e5c-489a-9cd7-ed08b2bda2da", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4cae2fe8-1ca4-4a7e-a438-f16e58f36f0f", + "name": "Get database metrics - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/metrics", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"key\": {\n \"data\": {\n \"cols\": [\n {\n \"label\": \"time\",\n \"type\": \"date\"\n },\n {\n \"label\": \"test-1 (master)\",\n \"type\": \"number\"\n },\n {\n \"label\": \"test-2 (standby)\",\n \"type\": \"number\"\n }\n ],\n \"rows\": [\n [\n \"2022-01-21T13:10:30Z\",\n 2.744682398273781,\n 3.054323473090861\n ],\n [\n \"2022-01-21T13:11:00Z\",\n 3.0735645433218366,\n 2.972423595745795\n ],\n [\n \"2022-01-21T13:11:30Z\",\n 2.61619694060839,\n 3.1358378052207883\n ],\n [\n \"2022-01-21T13:12:00Z\",\n 3.275132296130991,\n 4.196249043309251\n ]\n ]\n },\n \"hints\": {\n \"title\": \"CPU Usage Over Time\"\n }\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4cae2fe8-1ca4-4a7e-a438-f16e58f36f0f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f68a3a4b-7b93-4573-8d10-2a97e083c7a9", + "name": "Get query statistics (MySQL / PostgreSQL) - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/query-statistics", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"mysql\": [\n {\n \"avg_timer_wait\": 12345,\n \"count_star\": 100,\n \"digest\": \"abc123def456\",\n \"digest_text\": \"SELECT * FROM users WHERE id = ?\",\n \"first_seen\": \"2024-06-01T12:00:00Z\",\n \"last_seen\": \"2024-06-10T15:30:00Z\",\n \"max_timer_wait\": 54321,\n \"min_timer_wait\": 100,\n \"quantile_95\": 20000,\n \"quantile_99\": 30000,\n \"quantile_999\": 40000,\n \"query_sample_seen\": \"2024-06-05T10:00:00Z\",\n \"query_sample_text\": \"SELECT * FROM users WHERE id = 1\",\n \"query_sample_timer_wait\": 15000,\n \"schema_name\": \"my_database\",\n \"sum_created_tmp_disk_tables\": 2,\n \"sum_created_tmp_tables\": 5,\n \"sum_errors\": 0,\n \"sum_lock_time\": 1000,\n \"sum_no_good_index_used\": 1,\n \"sum_no_index_used\": 3,\n \"sum_rows_affected\": 10,\n \"sum_rows_examined\": 1000,\n \"sum_rows_sent\": 500,\n \"sum_select_full_join\": 0,\n \"sum_select_full_range_join\": 0,\n \"sum_select_range\": 2,\n \"sum_select_range_check\": 0,\n \"sum_select_scan\": 4,\n \"sum_sort_merge_passes\": 1,\n \"sum_sort_range\": 2,\n \"sum_sort_rows\": 100,\n \"sum_sort_scan\": 3,\n \"sum_timer_wait\": 20000,\n \"sum_warnings\": 0\n }\n ],\n \"pg\": [\n {\n \"blk_read_time\": 0,\n \"blk_write_time\": 0,\n \"calls\": 57425,\n \"database_name\": \"defaultdb\",\n \"local_blks_dirtied\": 0,\n \"local_blks_hit\": 0,\n \"local_blks_read\": 0,\n \"local_blks_written\": 0,\n \"max_time\": 133387,\n \"mean_time\": 1060,\n \"min_time\": 151,\n \"query\": \"COMMIT\",\n \"rows\": 0,\n \"shared_blks_dirtied\": 0,\n \"shared_blks_hit\": 0,\n \"shared_blks_read\": 0,\n \"shared_blks_written\": 0,\n \"stddev_time\": 0,\n \"temp_blks_read\": 0,\n \"temp_blks_written\": 0,\n \"total_time\": 60879904,\n \"user_name\": \"upadmin\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f68a3a4b-7b93-4573-8d10-2a97e083c7a9", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ef943a7b-6db7-4c53-93e8-4742f453bd67", + "name": "List logs - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/logs", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"first_log_offset\": \"123456\",\n \"offset\": \"123460\",\n \"logs\": [\n {\n \"hostname\": \"upcloud-doc-hostname\",\n \"msg\": \"[10-1] pid=3328089,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG: connection authorized: user=postgres database=defaultdb\",\n \"time\": \"2022-01-21T13:07:23Z\",\n \"service\": \"postgresql-13.service\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ef943a7b-6db7-4c53-93e8-4742f453bd67", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "78be6561-f033-4f9c-9261-405e2eb2861d", + "name": "List connection pools - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/connection-pools", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"connection_uri\": \"postgresql://user:password@hostname:5432/dbname\",\n \"database\": \"defaultdb\",\n \"pool_mode\": \"session\",\n \"pool_name\": \"pool-2\",\n \"pool_size\": 10,\n \"username\": \"updamin\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "78be6561-f033-4f9c-9261-405e2eb2861d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5f9d75da-eb68-43bb-b696-276fcf93714b", + "name": "Create connection pool - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/connection-pools", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"connection_uri\": \"postgresql://user:password@hostname:5432/dbname\",\n \"database\": \"defaultdb\",\n \"pool_mode\": \"session\",\n \"pool_name\": \"pool-2\",\n \"pool_size\": 10,\n \"username\": \"updamin\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5f9d75da-eb68-43bb-b696-276fcf93714b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "7f94fe8e-faa5-4bdd-a127-cc6519b82376", + "name": "Get connection pool - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/connection-pools/{pool-name}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "pool-name": { + "equalTo": "my-service" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"connection_uri\": \"postgresql://user:password@hostname:5432/dbname\",\n \"database\": \"defaultdb\",\n \"pool_mode\": \"session\",\n \"pool_name\": \"pool-2\",\n \"pool_size\": 10,\n \"username\": \"updamin\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7f94fe8e-faa5-4bdd-a127-cc6519b82376", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "bec6068c-39fc-4410-bf16-47c3fd15f986", + "name": "Delete connection pool - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/connection-pools/{pool-name}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "pool-name": { + "equalTo": "my-service" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "bec6068c-39fc-4410-bf16-47c3fd15f986", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "3072a627-4eb6-46d0-a448-ed5130dce8cd", + "name": "Modify connection pool - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/connection-pools/{pool-name}", + "method": "PATCH", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "pool-name": { + "equalTo": "my-service" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"connection_uri\": \"postgresql://user:password@hostname:5432/dbname\",\n \"database\": \"defaultdb\",\n \"pool_mode\": \"session\",\n \"pool_name\": \"pool-2\",\n \"pool_size\": 10,\n \"username\": \"updamin\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "3072a627-4eb6-46d0-a448-ed5130dce8cd", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "dfca8d9f-be0c-4087-8a2a-008306fd3979", + "name": "List indices (OpenSearch) - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/indices", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"create_time\": \"2023-05-11T13:24:10Z\",\n \"docs\": 1,\n \"health\": \"green\",\n \"index_name\": \".kibana_1\",\n \"number_of_replicas\": 0,\n \"number_of_shards\": 1,\n \"read_only_allow_delete\": false,\n \"size\": 5313,\n \"status\": \"open\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "dfca8d9f-be0c-4087-8a2a-008306fd3979", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "6a6ff308-4632-4327-b20b-b6b839eb3264", + "name": "Delete index (OpenSearch) - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/indices/{index-name}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "index-name": { + "equalTo": "my-service" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "6a6ff308-4632-4327-b20b-b6b839eb3264", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "19b8d99c-6e7f-45a4-8092-e219e33321ea", + "name": "List integrations - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/integrations", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"type\": \"rsyslog\",\n \"source_name\": \"my-database\",\n \"source_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destination_name\": \"my-rsyslog-server\",\n \"destination_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"state\": \"active\",\n \"state_error\": [\n {\n \"key\": \"value\"\n }\n ],\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"status\": \"running\",\n \"errors\": [\n \"some error\"\n ],\n \"likely_error_cause\": \"some error\"\n }\n ],\n \"properties\": {\n \"key1\": \"value1\",\n \"key2\": 2,\n \"key3\": true\n }\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "19b8d99c-6e7f-45a4-8092-e219e33321ea", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "808f8f2b-9dfc-414f-a8d7-b081ccc15cef", + "name": "Create integration - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/integrations", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"type\": \"rsyslog\",\n \"source_name\": \"my-database\",\n \"source_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destination_name\": \"my-rsyslog-server\",\n \"destination_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"state\": \"active\",\n \"state_error\": [\n {\n \"key\": \"value\"\n }\n ],\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"status\": \"running\",\n \"errors\": [\n \"some error\"\n ],\n \"likely_error_cause\": \"some error\"\n }\n ],\n \"properties\": {\n \"key1\": \"value1\",\n \"key2\": 2,\n \"key3\": true\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "808f8f2b-9dfc-414f-a8d7-b081ccc15cef", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "897d708c-0201-4655-bbb0-25898fcd7e45", + "name": "Get integration - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/integrations/{integration-uuid}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "integration-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"type\": \"rsyslog\",\n \"source_name\": \"my-database\",\n \"source_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destination_name\": \"my-rsyslog-server\",\n \"destination_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"state\": \"active\",\n \"state_error\": [\n {\n \"key\": \"value\"\n }\n ],\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"status\": \"running\",\n \"errors\": [\n \"some error\"\n ],\n \"likely_error_cause\": \"some error\"\n }\n ],\n \"properties\": {\n \"key1\": \"value1\",\n \"key2\": 2,\n \"key3\": true\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "897d708c-0201-4655-bbb0-25898fcd7e45", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2052437f-3c0e-40c9-a8f7-ead15ec8a903", + "name": "Delete integration - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/integrations/{integration-uuid}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "integration-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2052437f-3c0e-40c9-a8f7-ead15ec8a903", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e9bc5eb4-329a-4f77-bd55-89f5261beb4b", + "name": "Modify integration - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/integrations/{integration-uuid}", + "method": "PATCH", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "integration-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"type\": \"rsyslog\",\n \"source_name\": \"my-database\",\n \"source_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destination_name\": \"my-rsyslog-server\",\n \"destination_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"state\": \"active\",\n \"state_error\": [\n {\n \"key\": \"value\"\n }\n ],\n \"node_states\": [\n {\n \"name\": \"node-1\",\n \"status\": \"running\",\n \"errors\": [\n \"some error\"\n ],\n \"likely_error_cause\": \"some error\"\n }\n ],\n \"properties\": {\n \"key1\": \"value1\",\n \"key2\": 2,\n \"key3\": true\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e9bc5eb4-329a-4f77-bd55-89f5261beb4b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "09823ff4-0638-4b0a-a79e-0c7099bafab1", + "name": "List logical databases - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/databases", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"postgres\",\n \"lc_collate\": \"en_US.UTF-8\",\n \"lc_ctype\": \"en_US.UTF-8\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "09823ff4-0638-4b0a-a79e-0c7099bafab1", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "33c92227-bd50-4629-8c47-ed6f40f43a08", + "name": "Create logical database - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/databases", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"name\": \"postgres\",\n \"lc_collate\": \"en_US.UTF-8\",\n \"lc_ctype\": \"en_US.UTF-8\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "33c92227-bd50-4629-8c47-ed6f40f43a08", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "15a0d09a-1202-47de-b18d-935c1a9f9ab6", + "name": "Delete logical database - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/databases/{database-name}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "database-name": { + "equalTo": "my-service" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "15a0d09a-1202-47de-b18d-935c1a9f9ab6", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f0313333-274e-4765-9445-af5267228a33", + "name": "Get service peerings status - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/peering-status", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"create_time\": \"2023-10-05T14:48:00Z\",\n \"update_time\": \"2023-10-05T14:48:00Z\",\n \"state\": \"active\",\n \"network_peerings\": [\n {\n \"create_time\": \"2023-10-05T14:48:00Z\",\n \"update_time\": \"2023-10-05T14:48:00Z\",\n \"network_peer\": \"03196597-b972-4815-ba3a-85bb18365ced\",\n \"state\": \"active\",\n \"state_info\": \"The peering is in active state.\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f0313333-274e-4765-9445-af5267228a33", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5e7f997e-c858-4a02-9a5b-3db10f97a155", + "name": "List sessions - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/sessions", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"pg\": [\n {\n \"application_name\": \"client 1.5.14\",\n \"backend_start\": \"2025-09-21T12:34:56Z\",\n \"backend_type\": \"client backend\",\n \"backend_xid\": 742,\n \"backend_xmin\": 731,\n \"client_addr\": \"198.51.100.42\",\n \"client_hostname\": \"app-host.example.internal\",\n \"client_port\": 52344,\n \"datid\": 16384,\n \"datname\": \"defaultdb\",\n \"id\": \"3328089\",\n \"query\": \"SELECT name, setting FROM pg_settings WHERE source = $1\",\n \"query_duration\": \"00:00:01.234\",\n \"query_start\": \"2025-09-21T12:35:10Z\",\n \"state\": \"active\",\n \"state_change\": \"2025-09-21T12:35:10Z\",\n \"usename\": \"upadmin\",\n \"usesysid\": 10,\n \"wait_event\": \"ClientRead\",\n \"wait_event_type\": \"Client\",\n \"xact_start\": \"2025-09-21T12:35:05Z\"\n }\n ],\n \"mysql\": [\n {\n \"application_name\": \"my-app\",\n \"client_addr\": \"198.51.100.23\",\n \"datname\": \"defaultdb\",\n \"id\": \"3159\",\n \"query\": \"SELECT 1\",\n \"query_duration\": 125000000,\n \"state\": \"active\",\n \"usename\": \"appuser\"\n }\n ],\n \"redis\": [\n {\n \"active_channel_subscriptions\": 2,\n \"active_database\": \"0\",\n \"active_pattern_matching_channel_subscriptions\": 1,\n \"application_name\": \"my-app\",\n \"client_addr\": \"[fff0:fff0:fff0:fff0:0:fff0:fff0:fff0]:39956\",\n \"connection_age\": 2079483000000000,\n \"connection_idle\": 3000000000,\n \"flags\": [\n \"N\",\n \"U\"\n ],\n \"flags_raw\": \"NU\",\n \"id\": \"15\",\n \"multi_exec_commands\": -1,\n \"output_buffer\": 0,\n \"output_buffer_memory\": 0,\n \"output_list_length\": 0,\n \"query\": \"info\",\n \"query_buffer\": 0,\n \"query_buffer_free\": 0\n }\n ],\n \"valkey\": [\n {\n \"active_channel_subscriptions\": 2,\n \"active_database\": \"0\",\n \"active_pattern_matching_channel_subscriptions\": 1,\n \"application_name\": \"my-app\",\n \"client_addr\": \"[fff0:fff0:fff0:fff0:0:fff0:fff0:fff0]:39956\",\n \"connection_age\": 2079483000000000,\n \"connection_idle\": 3000000000,\n \"flags\": [\n \"N\",\n \"U\"\n ],\n \"flags_raw\": \"NU\",\n \"id\": \"15\",\n \"multi_exec_commands\": -1,\n \"output_buffer\": 0,\n \"output_buffer_memory\": 0,\n \"output_list_length\": 0,\n \"query\": \"info\",\n \"query_buffer\": 0,\n \"query_buffer_free\": 0\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5e7f997e-c858-4a02-9a5b-3db10f97a155", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "346c8ec6-49c4-434b-aed0-cbd7ea8b23f7", + "name": "Terminate session - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/sessions/{pid}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "pid": { + "equalTo": "1001" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "346c8ec6-49c4-434b-aed0-cbd7ea8b23f7", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d029fdd8-cbd9-45c1-ba75-d33d0988af4a", + "name": "Create task - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/tasks", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"create_time\": \"2022-10-04T12:21:42Z\",\n \"result\": \"All pre-checks passed successfully, preferred migration method will be [Replication]\",\n \"result_codes\": [\n {\n \"key\": \"value\"\n }\n ],\n \"ignore_dbs\": \"defaultdb\",\n \"operation\": \"mysql_migration_check\",\n \"success\": true,\n \"method\": \"Replication\",\n \"source_pg_version\": \"13\",\n \"target_pg_version\": \"14\",\n \"id\": \"9b39f10d-e356-437b-b907-d6d5574721b2\",\n \"operation_type\": \"async\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d029fdd8-cbd9-45c1-ba75-d33d0988af4a", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5b2eeee9-d4c9-48d4-b987-3bf6bef39106", + "name": "Get task - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/tasks/{task-id}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "task-id": { + "equalTo": "1001" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"create_time\": \"2022-10-04T12:21:42Z\",\n \"result\": \"ok *Clusters are compatible*\",\n \"result_codes\": [\n {\n \"key\": \"value\"\n }\n ],\n \"ignore_dbs\": \"defaultdb\",\n \"operation\": \"mysql_migration_check\",\n \"success\": true,\n \"method\": \"Replication\",\n \"source_pg_version\": \"13\",\n \"target_pg_version\": \"14\",\n \"id\": \"9b39f10d-e356-437b-b907-d6d5574721b2\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5b2eeee9-d4c9-48d4-b987-3bf6bef39106", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ed8c7f05-021d-427c-9b94-44e6bff94f9f", + "name": "List users - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/users", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"username\": \"admin\",\n \"password\": \"my-password\",\n \"authentication\": \"caching_sha2_password\",\n \"type\": \"admin\",\n \"pg_access_control\": {\n \"allow_replication\": true\n },\n \"redis_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"valkey_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"opensearch_access_control\": {\n \"rules\": [\n {\n \"index\": \"log-*\",\n \"permission\": \"read\"\n }\n ]\n }\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ed8c7f05-021d-427c-9b94-44e6bff94f9f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "41575524-bfe6-43c7-a83b-80a18ecbc6c2", + "name": "Create user - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/users", + "method": "POST", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"username\": \"admin\",\n \"password\": \"my-password\",\n \"authentication\": \"caching_sha2_password\",\n \"type\": \"admin\",\n \"pg_access_control\": {\n \"allow_replication\": true\n },\n \"redis_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"valkey_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"opensearch_access_control\": {\n \"rules\": [\n {\n \"index\": \"log-*\",\n \"permission\": \"read\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "41575524-bfe6-43c7-a83b-80a18ecbc6c2", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "9882b248-59a9-41d3-bcfb-b427b942d370", + "name": "Get user - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/users/{username}", + "method": "GET", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-service" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"username\": \"admin\",\n \"password\": \"my-password\",\n \"authentication\": \"caching_sha2_password\",\n \"type\": \"admin\",\n \"pg_access_control\": {\n \"allow_replication\": true\n },\n \"redis_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"valkey_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"opensearch_access_control\": {\n \"rules\": [\n {\n \"index\": \"log-*\",\n \"permission\": \"read\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "9882b248-59a9-41d3-bcfb-b427b942d370", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "7438338c-ae13-4d11-a719-461df15f6ee8", + "name": "Delete user - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/users/{username}", + "method": "DELETE", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-service" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7438338c-ae13-4d11-a719-461df15f6ee8", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2553c5ad-f059-46d5-8734-d09c982b4dea", + "name": "Modify user - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/users/{username}", + "method": "PATCH", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-service" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"username\": \"admin\",\n \"password\": \"my-password\",\n \"authentication\": \"caching_sha2_password\",\n \"type\": \"admin\",\n \"pg_access_control\": {\n \"allow_replication\": true\n },\n \"redis_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"valkey_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"opensearch_access_control\": {\n \"rules\": [\n {\n \"index\": \"log-*\",\n \"permission\": \"read\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2553c5ad-f059-46d5-8734-d09c982b4dea", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5a7df165-f0cc-499e-8e3b-86a9b5bb6ac2", + "name": "Modify user access control - default", + "request": { + "urlPathTemplate": "/1.3/database/{uuid}/users/{username}/access-control", + "method": "PATCH", + "pathParameters": { + "uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "username": { + "equalTo": "my-service" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"username\": \"admin\",\n \"password\": \"my-password\",\n \"authentication\": \"caching_sha2_password\",\n \"type\": \"admin\",\n \"pg_access_control\": {\n \"allow_replication\": true\n },\n \"redis_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"valkey_access_control\": {\n \"categories\": [\n \"@all\",\n \"@fast\"\n ],\n \"channels\": [\n \"news\",\n \"updates\"\n ],\n \"commands\": [\n \"GET\",\n \"SET\",\n \"DEL\"\n ],\n \"keys\": [\n \"user:*\",\n \"session:*\"\n ]\n },\n \"opensearch_access_control\": {\n \"rules\": [\n {\n \"index\": \"log-*\",\n \"permission\": \"read\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5a7df165-f0cc-499e-8e3b-86a9b5bb6ac2", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5bbe0fed-cab6-4c21-8350-e3834894bbd7", + "name": "List Plans - default", + "request": { + "urlPathTemplate": "/1.3/gateway/plans", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"gateway-service\",\n \"server_number\": 4,\n \"per_gateway_max_connections\": 5005000,\n \"supported_features\": [\n \"vpn\"\n ],\n \"vpn_tunnel_amount\": 50,\n \"per_gateway_bandwidth_mbps\": 5005,\n \"per_gateway_maximum_vpn_bandwidth_mbps\": 5005\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5bbe0fed-cab6-4c21-8350-e3834894bbd7", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "e6ebbf24-0d67-48bb-8ae6-9eabb87a757b", + "name": "Get Plan Details - default", + "request": { + "urlPathTemplate": "/1.3/gateway/plans/{plan-name}", + "method": "GET", + "pathParameters": { + "plan-name": { + "equalTo": "advanced" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"gateway-service\",\n \"server_number\": 4,\n \"per_gateway_max_connections\": 5005000,\n \"supported_features\": [\n \"vpn\"\n ],\n \"vpn_tunnel_amount\": 50,\n \"per_gateway_bandwidth_mbps\": 5005,\n \"per_gateway_maximum_vpn_bandwidth_mbps\": 5005\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e6ebbf24-0d67-48bb-8ae6-9eabb87a757b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4add6cbd-f712-41ca-925b-fd8c1e376686", + "name": "List Services - default", + "request": { + "urlPathTemplate": "/1.3/gateway", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"zone\": \"fi-hel1\",\n \"plan\": \"development-gwaas-1c2g\",\n \"features\": [\n \"vpn\"\n ],\n \"routers\": {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n },\n \"addresses\": [\n {\n \"name\": \"gateway-service\",\n \"address\": \"203.0.113.10\",\n \"provisioned_by\": \"service\"\n }\n ],\n \"connections\": [\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"type\": \"ipsec\",\n \"local_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"remote_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"tunnels\": [\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"local_address\": {\n \"name\": \"gateway-service\"\n },\n \"remote_address\": {\n \"address\": \"203.0.113.10\"\n },\n \"ipsec\": {\n \"authentication\": {\n \"authentication\": \"psk\"\n },\n \"phase1_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase2_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase1_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"phase2_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"ike_lifetime\": 30,\n \"rekey_time\": 30,\n \"child_rekey_time\": 60,\n \"dpd_delay\": 40,\n \"dpd_timeout\": 20,\n \"phase1_dh_group_numbers\": [\n 16,\n 18,\n 19\n ],\n \"phase2_dh_group_numbers\": [\n 14,\n 16,\n 18,\n 19\n ]\n },\n \"tunnel_internal_ip\": {\n \"ip\": {\n \"addr\": 0\n },\n \"hasParseError\": true\n },\n \"internal_peer_ping_interval\": 0,\n \"operational_state\": \"established\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\",\n \"tunnel_up\": true,\n \"tunnel_healthy\": true\n }\n ],\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n }\n ],\n \"configured_status\": \"started\",\n \"operational_state\": \"pending\",\n \"automatic_tunnel_internal_ip_allocation\": true,\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4add6cbd-f712-41ca-925b-fd8c1e376686", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "a41e124c-cd58-4d93-a54b-99a41ede3e0c", + "name": "Create Service - default", + "request": { + "urlPathTemplate": "/1.3/gateway", + "method": "POST" + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"zone\": \"fi-hel1\",\n \"plan\": \"development-gwaas-1c2g\",\n \"features\": [\n \"vpn\"\n ],\n \"routers\": {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n },\n \"addresses\": [\n {\n \"name\": \"gateway-service\",\n \"address\": \"203.0.113.10\",\n \"provisioned_by\": \"service\"\n }\n ],\n \"connections\": [\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"type\": \"ipsec\",\n \"local_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"remote_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"tunnels\": [\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"local_address\": {\n \"name\": \"gateway-service\"\n },\n \"remote_address\": {\n \"address\": \"203.0.113.10\"\n },\n \"ipsec\": {\n \"authentication\": {\n \"authentication\": \"psk\"\n },\n \"phase1_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase2_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase1_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"phase2_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"ike_lifetime\": 30,\n \"rekey_time\": 30,\n \"child_rekey_time\": 60,\n \"dpd_delay\": 40,\n \"dpd_timeout\": 20,\n \"phase1_dh_group_numbers\": [\n 16,\n 18,\n 19\n ],\n \"phase2_dh_group_numbers\": [\n 14,\n 16,\n 18,\n 19\n ]\n },\n \"tunnel_internal_ip\": {\n \"ip\": {\n \"addr\": 0\n },\n \"hasParseError\": true\n },\n \"internal_peer_ping_interval\": 0,\n \"operational_state\": \"established\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\",\n \"tunnel_up\": true,\n \"tunnel_healthy\": true\n }\n ],\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n }\n ],\n \"configured_status\": \"started\",\n \"operational_state\": \"pending\",\n \"automatic_tunnel_internal_ip_allocation\": true,\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a41e124c-cd58-4d93-a54b-99a41ede3e0c", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4173b8bc-9ec0-454b-afef-5ecfc920cfca", + "name": "Get Service Details - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"zone\": \"fi-hel1\",\n \"plan\": \"development-gwaas-1c2g\",\n \"features\": [\n \"vpn\"\n ],\n \"routers\": {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n },\n \"addresses\": [\n {\n \"name\": \"gateway-service\",\n \"address\": \"203.0.113.10\",\n \"provisioned_by\": \"service\"\n }\n ],\n \"connections\": [\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"type\": \"ipsec\",\n \"local_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"remote_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"tunnels\": [\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"local_address\": {\n \"name\": \"gateway-service\"\n },\n \"remote_address\": {\n \"address\": \"203.0.113.10\"\n },\n \"ipsec\": {\n \"authentication\": {\n \"authentication\": \"psk\"\n },\n \"phase1_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase2_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase1_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"phase2_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"ike_lifetime\": 30,\n \"rekey_time\": 30,\n \"child_rekey_time\": 60,\n \"dpd_delay\": 40,\n \"dpd_timeout\": 20,\n \"phase1_dh_group_numbers\": [\n 16,\n 18,\n 19\n ],\n \"phase2_dh_group_numbers\": [\n 14,\n 16,\n 18,\n 19\n ]\n },\n \"tunnel_internal_ip\": {\n \"ip\": {\n \"addr\": 0\n },\n \"hasParseError\": true\n },\n \"internal_peer_ping_interval\": 0,\n \"operational_state\": \"established\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\",\n \"tunnel_up\": true,\n \"tunnel_healthy\": true\n }\n ],\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n }\n ],\n \"configured_status\": \"started\",\n \"operational_state\": \"pending\",\n \"automatic_tunnel_internal_ip_allocation\": true,\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4173b8bc-9ec0-454b-afef-5ecfc920cfca", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "038d47d9-0cf2-4643-a5be-e8941b9438ae", + "name": "Replace Service - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}", + "method": "PUT", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"zone\": \"fi-hel1\",\n \"plan\": \"development-gwaas-1c2g\",\n \"features\": [\n \"vpn\"\n ],\n \"routers\": {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n },\n \"addresses\": [\n {\n \"name\": \"gateway-service\",\n \"address\": \"203.0.113.10\",\n \"provisioned_by\": \"service\"\n }\n ],\n \"connections\": [\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"type\": \"ipsec\",\n \"local_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"remote_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"tunnels\": [\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"local_address\": {\n \"name\": \"gateway-service\"\n },\n \"remote_address\": {\n \"address\": \"203.0.113.10\"\n },\n \"ipsec\": {\n \"authentication\": {\n \"authentication\": \"psk\"\n },\n \"phase1_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase2_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase1_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"phase2_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"ike_lifetime\": 30,\n \"rekey_time\": 30,\n \"child_rekey_time\": 60,\n \"dpd_delay\": 40,\n \"dpd_timeout\": 20,\n \"phase1_dh_group_numbers\": [\n 16,\n 18,\n 19\n ],\n \"phase2_dh_group_numbers\": [\n 14,\n 16,\n 18,\n 19\n ]\n },\n \"tunnel_internal_ip\": {\n \"ip\": {\n \"addr\": 0\n },\n \"hasParseError\": true\n },\n \"internal_peer_ping_interval\": 0,\n \"operational_state\": \"established\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\",\n \"tunnel_up\": true,\n \"tunnel_healthy\": true\n }\n ],\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n }\n ],\n \"configured_status\": \"started\",\n \"operational_state\": \"pending\",\n \"automatic_tunnel_internal_ip_allocation\": true,\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "038d47d9-0cf2-4643-a5be-e8941b9438ae", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "dc6c9215-f81e-4c2c-9e4c-ff1c001e60f6", + "name": "Delete Service - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "dc6c9215-f81e-4c2c-9e4c-ff1c001e60f6", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "7148c4a5-06a3-46c8-bcef-68cdd739787c", + "name": "Modify Service - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"zone\": \"fi-hel1\",\n \"plan\": \"development-gwaas-1c2g\",\n \"features\": [\n \"vpn\"\n ],\n \"routers\": {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n },\n \"addresses\": [\n {\n \"name\": \"gateway-service\",\n \"address\": \"203.0.113.10\",\n \"provisioned_by\": \"service\"\n }\n ],\n \"connections\": [\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"type\": \"ipsec\",\n \"local_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"remote_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"tunnels\": [\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"local_address\": {\n \"name\": \"gateway-service\"\n },\n \"remote_address\": {\n \"address\": \"203.0.113.10\"\n },\n \"ipsec\": {\n \"authentication\": {\n \"authentication\": \"psk\"\n },\n \"phase1_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase2_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase1_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"phase2_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"ike_lifetime\": 30,\n \"rekey_time\": 30,\n \"child_rekey_time\": 60,\n \"dpd_delay\": 40,\n \"dpd_timeout\": 20,\n \"phase1_dh_group_numbers\": [\n 16,\n 18,\n 19\n ],\n \"phase2_dh_group_numbers\": [\n 14,\n 16,\n 18,\n 19\n ]\n },\n \"tunnel_internal_ip\": {\n \"ip\": {\n \"addr\": 0\n },\n \"hasParseError\": true\n },\n \"internal_peer_ping_interval\": 0,\n \"operational_state\": \"established\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\",\n \"tunnel_up\": true,\n \"tunnel_healthy\": true\n }\n ],\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n }\n ],\n \"configured_status\": \"started\",\n \"operational_state\": \"pending\",\n \"automatic_tunnel_internal_ip_allocation\": true,\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7148c4a5-06a3-46c8-bcef-68cdd739787c", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "bd5fe145-46e6-4153-bccc-8e5aa4ba73fc", + "name": "Flush NAT - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/actions/nat-flush-connections", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "bd5fe145-46e6-4153-bccc-8e5aa4ba73fc", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d9a9ff06-4e9d-43e7-abe2-9769745de022", + "name": "List Connections - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/connections", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"type\": \"ipsec\",\n \"local_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"remote_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"tunnels\": [\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"local_address\": {\n \"name\": \"gateway-service\"\n },\n \"remote_address\": {\n \"address\": \"203.0.113.10\"\n },\n \"ipsec\": {\n \"authentication\": {\n \"authentication\": \"psk\"\n },\n \"phase1_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase2_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase1_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"phase2_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"ike_lifetime\": 30,\n \"rekey_time\": 30,\n \"child_rekey_time\": 60,\n \"dpd_delay\": 40,\n \"dpd_timeout\": 20,\n \"phase1_dh_group_numbers\": [\n 16,\n 18,\n 19\n ],\n \"phase2_dh_group_numbers\": [\n 14,\n 16,\n 18,\n 19\n ]\n },\n \"tunnel_internal_ip\": {\n \"ip\": {\n \"addr\": 0\n },\n \"hasParseError\": true\n },\n \"internal_peer_ping_interval\": 0,\n \"operational_state\": \"established\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\",\n \"tunnel_up\": true,\n \"tunnel_healthy\": true\n }\n ],\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d9a9ff06-4e9d-43e7-abe2-9769745de022", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "14496de2-c807-4e7c-9bf8-b9bff265236e", + "name": "Create Connection - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/connections", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"type\": \"ipsec\",\n \"local_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"remote_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"tunnels\": [\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"local_address\": {\n \"name\": \"gateway-service\"\n },\n \"remote_address\": {\n \"address\": \"203.0.113.10\"\n },\n \"ipsec\": {\n \"authentication\": {\n \"authentication\": \"psk\"\n },\n \"phase1_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase2_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase1_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"phase2_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"ike_lifetime\": 30,\n \"rekey_time\": 30,\n \"child_rekey_time\": 60,\n \"dpd_delay\": 40,\n \"dpd_timeout\": 20,\n \"phase1_dh_group_numbers\": [\n 16,\n 18,\n 19\n ],\n \"phase2_dh_group_numbers\": [\n 14,\n 16,\n 18,\n 19\n ]\n },\n \"tunnel_internal_ip\": {\n \"ip\": {\n \"addr\": 0\n },\n \"hasParseError\": true\n },\n \"internal_peer_ping_interval\": 0,\n \"operational_state\": \"established\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\",\n \"tunnel_up\": true,\n \"tunnel_healthy\": true\n }\n ],\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "14496de2-c807-4e7c-9bf8-b9bff265236e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "84550c82-79d1-4b34-b2ae-a4bb1f6beeed", + "name": "Get Connection Details - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/connections/{connection-uuid}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "connection-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"type\": \"ipsec\",\n \"local_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"remote_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"tunnels\": [\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"local_address\": {\n \"name\": \"gateway-service\"\n },\n \"remote_address\": {\n \"address\": \"203.0.113.10\"\n },\n \"ipsec\": {\n \"authentication\": {\n \"authentication\": \"psk\"\n },\n \"phase1_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase2_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase1_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"phase2_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"ike_lifetime\": 30,\n \"rekey_time\": 30,\n \"child_rekey_time\": 60,\n \"dpd_delay\": 40,\n \"dpd_timeout\": 20,\n \"phase1_dh_group_numbers\": [\n 16,\n 18,\n 19\n ],\n \"phase2_dh_group_numbers\": [\n 14,\n 16,\n 18,\n 19\n ]\n },\n \"tunnel_internal_ip\": {\n \"ip\": {\n \"addr\": 0\n },\n \"hasParseError\": true\n },\n \"internal_peer_ping_interval\": 0,\n \"operational_state\": \"established\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\",\n \"tunnel_up\": true,\n \"tunnel_healthy\": true\n }\n ],\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "84550c82-79d1-4b34-b2ae-a4bb1f6beeed", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4b65b2ae-c3ea-4a23-be00-59912a865ea0", + "name": "Delete Connection - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/connections/{connection-uuid}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "connection-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4b65b2ae-c3ea-4a23-be00-59912a865ea0", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2e732255-1a3c-4167-9918-e792187260d5", + "name": "Modify Connection - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/connections/{connection-uuid}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "connection-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"type\": \"ipsec\",\n \"local_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"remote_routes\": [\n {\n \"name\": \"gateway-service\",\n \"type\": \"static\",\n \"static_network\": \"10.0.0.0/24\"\n }\n ],\n \"tunnels\": [\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"local_address\": {\n \"name\": \"gateway-service\"\n },\n \"remote_address\": {\n \"address\": \"203.0.113.10\"\n },\n \"ipsec\": {\n \"authentication\": {\n \"authentication\": \"psk\"\n },\n \"phase1_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase2_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase1_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"phase2_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"ike_lifetime\": 30,\n \"rekey_time\": 30,\n \"child_rekey_time\": 60,\n \"dpd_delay\": 40,\n \"dpd_timeout\": 20,\n \"phase1_dh_group_numbers\": [\n 16,\n 18,\n 19\n ],\n \"phase2_dh_group_numbers\": [\n 14,\n 16,\n 18,\n 19\n ]\n },\n \"tunnel_internal_ip\": {\n \"ip\": {\n \"addr\": 0\n },\n \"hasParseError\": true\n },\n \"internal_peer_ping_interval\": 0,\n \"operational_state\": \"established\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\",\n \"tunnel_up\": true,\n \"tunnel_healthy\": true\n }\n ],\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2e732255-1a3c-4167-9918-e792187260d5", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d2e900f8-2c0b-48ba-99a6-dea0cd82f879", + "name": "List Tunnels - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/connections/{connection-uuid}/tunnels", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "connection-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"local_address\": {\n \"name\": \"gateway-service\"\n },\n \"remote_address\": {\n \"address\": \"203.0.113.10\"\n },\n \"ipsec\": {\n \"authentication\": {\n \"authentication\": \"psk\"\n },\n \"phase1_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase2_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase1_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"phase2_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"ike_lifetime\": 30,\n \"rekey_time\": 30,\n \"child_rekey_time\": 60,\n \"dpd_delay\": 40,\n \"dpd_timeout\": 20,\n \"phase1_dh_group_numbers\": [\n 16,\n 18,\n 19\n ],\n \"phase2_dh_group_numbers\": [\n 14,\n 16,\n 18,\n 19\n ]\n },\n \"tunnel_internal_ip\": {\n \"ip\": {\n \"addr\": 0\n },\n \"hasParseError\": true\n },\n \"internal_peer_ping_interval\": 0,\n \"operational_state\": \"established\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\",\n \"tunnel_up\": true,\n \"tunnel_healthy\": true\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d2e900f8-2c0b-48ba-99a6-dea0cd82f879", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2e9a77c4-44b0-40eb-b4bf-7c51c6105bf1", + "name": "Create Tunnel - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/connections/{connection-uuid}/tunnels", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "connection-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"local_address\": {\n \"name\": \"gateway-service\"\n },\n \"remote_address\": {\n \"address\": \"203.0.113.10\"\n },\n \"ipsec\": {\n \"authentication\": {\n \"authentication\": \"psk\"\n },\n \"phase1_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase2_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase1_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"phase2_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"ike_lifetime\": 30,\n \"rekey_time\": 30,\n \"child_rekey_time\": 60,\n \"dpd_delay\": 40,\n \"dpd_timeout\": 20,\n \"phase1_dh_group_numbers\": [\n 16,\n 18,\n 19\n ],\n \"phase2_dh_group_numbers\": [\n 14,\n 16,\n 18,\n 19\n ]\n },\n \"tunnel_internal_ip\": {\n \"ip\": {\n \"addr\": 0\n },\n \"hasParseError\": true\n },\n \"internal_peer_ping_interval\": 0,\n \"operational_state\": \"established\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\",\n \"tunnel_up\": true,\n \"tunnel_healthy\": true\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2e9a77c4-44b0-40eb-b4bf-7c51c6105bf1", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "0869235f-e9ba-4709-a4cb-be4987bdc5fd", + "name": "Get Tunnel Details - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/connections/{connection-uuid}/tunnels/{tunnel-uuid}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "connection-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "tunnel-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"local_address\": {\n \"name\": \"gateway-service\"\n },\n \"remote_address\": {\n \"address\": \"203.0.113.10\"\n },\n \"ipsec\": {\n \"authentication\": {\n \"authentication\": \"psk\"\n },\n \"phase1_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase2_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase1_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"phase2_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"ike_lifetime\": 30,\n \"rekey_time\": 30,\n \"child_rekey_time\": 60,\n \"dpd_delay\": 40,\n \"dpd_timeout\": 20,\n \"phase1_dh_group_numbers\": [\n 16,\n 18,\n 19\n ],\n \"phase2_dh_group_numbers\": [\n 14,\n 16,\n 18,\n 19\n ]\n },\n \"tunnel_internal_ip\": {\n \"ip\": {\n \"addr\": 0\n },\n \"hasParseError\": true\n },\n \"internal_peer_ping_interval\": 0,\n \"operational_state\": \"established\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\",\n \"tunnel_up\": true,\n \"tunnel_healthy\": true\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "0869235f-e9ba-4709-a4cb-be4987bdc5fd", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "7ddaa9da-0212-4fdc-a483-c2859ca600ea", + "name": "Delete Tunnel - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/connections/{connection-uuid}/tunnels/{tunnel-uuid}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "connection-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "tunnel-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7ddaa9da-0212-4fdc-a483-c2859ca600ea", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "a0d54116-389a-4199-bc6f-6a104a8ad052", + "name": "Modify Tunnel - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/connections/{connection-uuid}/tunnels/{tunnel-uuid}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "connection-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "tunnel-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"name\": \"gateway-service\",\n \"local_address\": {\n \"name\": \"gateway-service\"\n },\n \"remote_address\": {\n \"address\": \"203.0.113.10\"\n },\n \"ipsec\": {\n \"authentication\": {\n \"authentication\": \"psk\"\n },\n \"phase1_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase2_algorithms\": [\n \"aes128\",\n \"aes256\",\n \"aes128gcm128\",\n \"aes256gcm128\"\n ],\n \"phase1_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"phase2_integrity_algorithms\": [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n ],\n \"ike_lifetime\": 30,\n \"rekey_time\": 30,\n \"child_rekey_time\": 60,\n \"dpd_delay\": 40,\n \"dpd_timeout\": 20,\n \"phase1_dh_group_numbers\": [\n 16,\n 18,\n 19\n ],\n \"phase2_dh_group_numbers\": [\n 14,\n 16,\n 18,\n 19\n ]\n },\n \"tunnel_internal_ip\": {\n \"ip\": {\n \"addr\": 0\n },\n \"hasParseError\": true\n },\n \"internal_peer_ping_interval\": 0,\n \"operational_state\": \"established\",\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\",\n \"tunnel_up\": true,\n \"tunnel_healthy\": true\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a0d54116-389a-4199-bc6f-6a104a8ad052", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "3344bdaf-12b0-4fe9-9086-86a6e541d5c3", + "name": "List Service Labels - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/labels", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "3344bdaf-12b0-4fe9-9086-86a6e541d5c3", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e4a7aa7c-6349-493d-a8f8-8e86f0663acd", + "name": "Create Service Label - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/labels", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e4a7aa7c-6349-493d-a8f8-8e86f0663acd", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "7a2a9e16-a35e-4202-b9d3-80d9e2cfd1a5", + "name": "Get Service Label Details - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/labels/{label-key}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "environment" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"key\": \"environment\",\n \"value\": \"production\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7a2a9e16-a35e-4202-b9d3-80d9e2cfd1a5", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2b1b7b2a-6341-4673-90b3-853426b7b967", + "name": "Delete Service Label - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/labels/{label-key}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "environment" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2b1b7b2a-6341-4673-90b3-853426b7b967", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "a344566f-b5dd-4240-a495-de72cdcdff28", + "name": "Modify Service Label - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/labels/{label-key}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "environment" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a344566f-b5dd-4240-a495-de72cdcdff28", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "a6a40bb9-3f14-4967-a854-3afba8e26fab", + "name": "List Service Addresses - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/addresses", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"gateway-service\",\n \"address\": \"203.0.113.10\",\n \"provisioned_by\": \"service\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a6a40bb9-3f14-4967-a854-3afba8e26fab", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "92e58439-9dee-49f4-a551-6a495012a858", + "name": "Get Service Address Details - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/addresses/{address-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "address-name": { + "equalTo": "advanced" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"gateway-service\",\n \"address\": \"203.0.113.10\",\n \"provisioned_by\": \"service\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "92e58439-9dee-49f4-a551-6a495012a858", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "479e9a28-376d-4c8f-a14b-e1845c2169e9", + "name": "Modify Service Address - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/addresses/{address-name}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "address-name": { + "equalTo": "advanced" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"gateway-service\",\n \"address\": \"203.0.113.10\",\n \"provisioned_by\": \"service\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "479e9a28-376d-4c8f-a14b-e1845c2169e9", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "72fcdbb0-7c7f-4456-a521-4852f21d8d36", + "name": "Release Gateway Floating IP - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/addresses/{address-name}/release", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "address-name": { + "equalTo": "advanced" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "72fcdbb0-7c7f-4456-a521-4852f21d8d36", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e0c7ee80-5e13-4945-b6ae-c47f878430da", + "name": "Get Service Metrics - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/metrics", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"gateways\": [\n {\n \"name\": \"gateway-service\",\n \"active_connections\": 0,\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\",\n \"total_accepted_connections\": 0,\n \"total_rejected_sessions\": 0\n }\n ],\n \"ipsec_metrics\": {\n \"ike_sas\": [\n {\n \"name\": \"gateway-service\",\n \"tunnel_id\": 0,\n \"unique_id\": \"gateway-service\",\n \"version\": 0,\n \"operational_state\": \"idle\",\n \"internal_state\": \"uninitialized\",\n \"initator\": true,\n \"established\": 0,\n \"rekey_time\": 0,\n \"reauth_time\": 0,\n \"child_sas\": [\n {\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n }\n ],\n \"local_host\": \"203.0.113.10\",\n \"remote_host\": \"203.0.113.10\",\n \"local_id\": \"203.0.113.10\",\n \"remote_id\": \"203.0.113.10\",\n \"heuristic_state\": {\n \"tunnel_up\": true,\n \"tunnel_healthy\": true,\n \"last_down_message\": \"IKE SA is down due to network issues\",\n \"updated_at\": \"2025-03-26T12:34:56Z\",\n \"last_down_message_updated_at\": \"2025-03-26T12:34:56Z\",\n \"up_events\": 0,\n \"down_events\": 0,\n \"log_message_bad_events\": 0\n },\n \"created_at\": \"2025-03-26T12:34:56Z\",\n \"updated_at\": \"2025-03-26T12:34:56Z\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e0c7ee80-5e13-4945-b6ae-c47f878430da", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ab05f218-a078-4622-93dc-7a0f5f111325", + "name": "Create Service Log Session - default", + "request": { + "urlPathTemplate": "/1.3/gateway/{service-uuid}/logs", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"sessions\": [\n {\n \"session_id\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"token\": \"01234567-89ab-cdef-0123-456789abcdef\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ab05f218-a078-4622-93dc-7a0f5f111325", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "6ee365e9-18f2-41d4-bce3-34190ea29cee", + "name": "List load balancers - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"uuid\": \"b7a3f6a4-4a8f-4a5c-b7a5-9c9a1e5a6d3e\",\n \"name\": \"loadbalancer-prod-eu\",\n \"zone\": \"de-fra1\",\n \"plan\": \"medium\",\n \"configured_status\": \"configured\",\n \"operational_state\": \"running\",\n \"frontends\": [\n {\n \"name\": \"frontend-1\",\n \"port\": 80,\n \"mode\": \"http\",\n \"default_backend\": \"backend-1\",\n \"tls_configs\": [\n {\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"rules\": [\n {\n \"name\": \"redirect-to-https\",\n \"priority\": 1,\n \"matching_condition\": \"and\",\n \"matchers\": [\n {\n \"type\": \"path\",\n \"inverse\": false,\n \"match_src_ip\": {\n \"value\": \"192.168.1.0/24\"\n },\n \"match_src_port\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_body_size\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_cookie\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_url_param\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_request_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_response_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_http_status\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_http_method\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_path\": {\n \"method\": \"starts_with\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_host\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url_query\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_num_members_up\": {\n \"method\": \"greater_or_equal\",\n \"value\": 2,\n \"range_start\": 0,\n \"range_end\": 10,\n \"backend\": \"backend-1\"\n }\n }\n ],\n \"actions\": [\n {\n \"type\": \"set_forwarded_headers\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"set_request_header\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Forwarded-Proto\",\n \"value\": \"https\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"http_redirect\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"properties\": {\n \"inbound_proxy_protocol\": false,\n \"timeout_client\": 50000,\n \"http2_enabled\": true,\n \"frontend_id\": 301\n },\n \"networks\": [\n {\n \"name\": \"public-network\"\n },\n {\n \"name\": \"private-network\"\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-12-06T09:00:00Z\"\n }\n ],\n \"backends\": [\n {\n \"name\": \"api-backend\",\n \"members\": [\n {\n \"name\": \"member-1\",\n \"ip\": \"192.168.1.10\",\n \"port\": 8080,\n \"weight\": 10,\n \"max_sessions\": 100,\n \"type\": \"static\",\n \"enabled\": true,\n \"backup\": false,\n \"created_at\": \"2025-11-05T12:30:00Z\",\n \"updated_at\": \"2025-11-05T13:45:00Z\"\n }\n ],\n \"tls_configs\": [\n {\n \"name\": \"backend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"resolver\": \"resolver-default\",\n \"properties\": {\n \"backend_id\": 401,\n \"timeout_server\": 5000,\n \"timeout_tunnel\": 15000,\n \"health_check_type\": \"http\",\n \"health_check_interval\": 10,\n \"health_check_fall\": 3,\n \"health_check_rise\": 2,\n \"health_check_url\": \"/status\",\n \"health_check_expected_status\": 200,\n \"health_check_tls_verify\": true,\n \"health_check_on_down\": \"shutdown-sessions\",\n \"sticky_session_cookie_name\": \"SESSIONID\",\n \"sticky_session_cookie_attributes\": \"SameSite=Strict; Secure; HttpOnly\",\n \"tls_enabled\": true,\n \"tls_verify\": true,\n \"tls_use_system_ca\": false,\n \"http2_enabled\": true\n },\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:30:00Z\"\n }\n ],\n \"resolvers\": [\n {\n \"name\": \"default-resolver\",\n \"nameservers\": [\n \"94.237.127.9\",\n \"94.237.40.9\"\n ],\n \"retries\": 3,\n \"timeout\": 1000,\n \"timeout_retry\": 1500,\n \"cache_valid\": 86400,\n \"cache_invalid\": 60,\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"networks\": [\n {\n \"name\": \"public-network\",\n \"uuid\": \"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d\",\n \"type\": \"private\",\n \"family\": \"IPv4\",\n \"dns_name\": \"lb-network.local\",\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:15:00Z\"\n }\n ],\n \"ip_addresses\": [\n {\n \"address\": \"192.168.1.10\",\n \"network_name\": \"public-network\",\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:15:00Z\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"maintenance_dow\": \"tuesday\",\n \"maintenance_time\": \"02:00:00.000Z\",\n \"created_at\": \"2025-11-06T08:00:00Z\",\n \"updated_at\": \"2025-11-06T09:15:00Z\",\n \"network_uuid\": \"network_uuid\",\n \"dns_name\": \"dns_name\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "6ee365e9-18f2-41d4-bce3-34190ea29cee", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "7368419f-10ef-407a-bca5-bc769442e5b1", + "name": "Create load balancer - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"uuid\": \"b7a3f6a4-4a8f-4a5c-b7a5-9c9a1e5a6d3e\",\n \"name\": \"loadbalancer-prod-eu\",\n \"zone\": \"de-fra1\",\n \"plan\": \"medium\",\n \"configured_status\": \"configured\",\n \"operational_state\": \"running\",\n \"frontends\": [\n {\n \"name\": \"frontend-1\",\n \"port\": 80,\n \"mode\": \"http\",\n \"default_backend\": \"backend-1\",\n \"tls_configs\": [\n {\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"rules\": [\n {\n \"name\": \"redirect-to-https\",\n \"priority\": 1,\n \"matching_condition\": \"and\",\n \"matchers\": [\n {\n \"type\": \"path\",\n \"inverse\": false,\n \"match_src_ip\": {\n \"value\": \"192.168.1.0/24\"\n },\n \"match_src_port\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_body_size\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_cookie\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_url_param\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_request_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_response_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_http_status\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_http_method\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_path\": {\n \"method\": \"starts_with\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_host\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url_query\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_num_members_up\": {\n \"method\": \"greater_or_equal\",\n \"value\": 2,\n \"range_start\": 0,\n \"range_end\": 10,\n \"backend\": \"backend-1\"\n }\n }\n ],\n \"actions\": [\n {\n \"type\": \"set_forwarded_headers\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"set_request_header\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Forwarded-Proto\",\n \"value\": \"https\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"http_redirect\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"properties\": {\n \"inbound_proxy_protocol\": false,\n \"timeout_client\": 50000,\n \"http2_enabled\": true,\n \"frontend_id\": 301\n },\n \"networks\": [\n {\n \"name\": \"public-network\"\n },\n {\n \"name\": \"private-network\"\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-12-06T09:00:00Z\"\n }\n ],\n \"backends\": [\n {\n \"name\": \"api-backend\",\n \"members\": [\n {\n \"name\": \"member-1\",\n \"ip\": \"192.168.1.10\",\n \"port\": 8080,\n \"weight\": 10,\n \"max_sessions\": 100,\n \"type\": \"static\",\n \"enabled\": true,\n \"backup\": false,\n \"created_at\": \"2025-11-05T12:30:00Z\",\n \"updated_at\": \"2025-11-05T13:45:00Z\"\n }\n ],\n \"tls_configs\": [\n {\n \"name\": \"backend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"resolver\": \"resolver-default\",\n \"properties\": {\n \"backend_id\": 401,\n \"timeout_server\": 5000,\n \"timeout_tunnel\": 15000,\n \"health_check_type\": \"http\",\n \"health_check_interval\": 10,\n \"health_check_fall\": 3,\n \"health_check_rise\": 2,\n \"health_check_url\": \"/status\",\n \"health_check_expected_status\": 200,\n \"health_check_tls_verify\": true,\n \"health_check_on_down\": \"shutdown-sessions\",\n \"sticky_session_cookie_name\": \"SESSIONID\",\n \"sticky_session_cookie_attributes\": \"SameSite=Strict; Secure; HttpOnly\",\n \"tls_enabled\": true,\n \"tls_verify\": true,\n \"tls_use_system_ca\": false,\n \"http2_enabled\": true\n },\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:30:00Z\"\n }\n ],\n \"resolvers\": [\n {\n \"name\": \"default-resolver\",\n \"nameservers\": [\n \"94.237.127.9\",\n \"94.237.40.9\"\n ],\n \"retries\": 3,\n \"timeout\": 1000,\n \"timeout_retry\": 1500,\n \"cache_valid\": 86400,\n \"cache_invalid\": 60,\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"networks\": [\n {\n \"name\": \"public-network\",\n \"uuid\": \"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d\",\n \"type\": \"private\",\n \"family\": \"IPv4\",\n \"dns_name\": \"lb-network.local\",\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:15:00Z\"\n }\n ],\n \"ip_addresses\": [\n {\n \"address\": \"192.168.1.10\",\n \"network_name\": \"public-network\",\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:15:00Z\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"maintenance_dow\": \"tuesday\",\n \"maintenance_time\": \"02:00:00.000Z\",\n \"created_at\": \"2025-11-06T08:00:00Z\",\n \"updated_at\": \"2025-11-06T09:15:00Z\",\n \"network_uuid\": \"network_uuid\",\n \"dns_name\": \"dns_name\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7368419f-10ef-407a-bca5-bc769442e5b1", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "6ac0f95c-e68e-4c50-a0e4-00ff578c9305", + "name": "Get load balancer - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"b7a3f6a4-4a8f-4a5c-b7a5-9c9a1e5a6d3e\",\n \"name\": \"loadbalancer-prod-eu\",\n \"zone\": \"de-fra1\",\n \"plan\": \"medium\",\n \"configured_status\": \"configured\",\n \"operational_state\": \"running\",\n \"frontends\": [\n {\n \"name\": \"frontend-1\",\n \"port\": 80,\n \"mode\": \"http\",\n \"default_backend\": \"backend-1\",\n \"tls_configs\": [\n {\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"rules\": [\n {\n \"name\": \"redirect-to-https\",\n \"priority\": 1,\n \"matching_condition\": \"and\",\n \"matchers\": [\n {\n \"type\": \"path\",\n \"inverse\": false,\n \"match_src_ip\": {\n \"value\": \"192.168.1.0/24\"\n },\n \"match_src_port\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_body_size\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_cookie\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_url_param\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_request_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_response_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_http_status\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_http_method\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_path\": {\n \"method\": \"starts_with\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_host\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url_query\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_num_members_up\": {\n \"method\": \"greater_or_equal\",\n \"value\": 2,\n \"range_start\": 0,\n \"range_end\": 10,\n \"backend\": \"backend-1\"\n }\n }\n ],\n \"actions\": [\n {\n \"type\": \"set_forwarded_headers\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"set_request_header\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Forwarded-Proto\",\n \"value\": \"https\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"http_redirect\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"properties\": {\n \"inbound_proxy_protocol\": false,\n \"timeout_client\": 50000,\n \"http2_enabled\": true,\n \"frontend_id\": 301\n },\n \"networks\": [\n {\n \"name\": \"public-network\"\n },\n {\n \"name\": \"private-network\"\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-12-06T09:00:00Z\"\n }\n ],\n \"backends\": [\n {\n \"name\": \"api-backend\",\n \"members\": [\n {\n \"name\": \"member-1\",\n \"ip\": \"192.168.1.10\",\n \"port\": 8080,\n \"weight\": 10,\n \"max_sessions\": 100,\n \"type\": \"static\",\n \"enabled\": true,\n \"backup\": false,\n \"created_at\": \"2025-11-05T12:30:00Z\",\n \"updated_at\": \"2025-11-05T13:45:00Z\"\n }\n ],\n \"tls_configs\": [\n {\n \"name\": \"backend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"resolver\": \"resolver-default\",\n \"properties\": {\n \"backend_id\": 401,\n \"timeout_server\": 5000,\n \"timeout_tunnel\": 15000,\n \"health_check_type\": \"http\",\n \"health_check_interval\": 10,\n \"health_check_fall\": 3,\n \"health_check_rise\": 2,\n \"health_check_url\": \"/status\",\n \"health_check_expected_status\": 200,\n \"health_check_tls_verify\": true,\n \"health_check_on_down\": \"shutdown-sessions\",\n \"sticky_session_cookie_name\": \"SESSIONID\",\n \"sticky_session_cookie_attributes\": \"SameSite=Strict; Secure; HttpOnly\",\n \"tls_enabled\": true,\n \"tls_verify\": true,\n \"tls_use_system_ca\": false,\n \"http2_enabled\": true\n },\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:30:00Z\"\n }\n ],\n \"resolvers\": [\n {\n \"name\": \"default-resolver\",\n \"nameservers\": [\n \"94.237.127.9\",\n \"94.237.40.9\"\n ],\n \"retries\": 3,\n \"timeout\": 1000,\n \"timeout_retry\": 1500,\n \"cache_valid\": 86400,\n \"cache_invalid\": 60,\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"networks\": [\n {\n \"name\": \"public-network\",\n \"uuid\": \"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d\",\n \"type\": \"private\",\n \"family\": \"IPv4\",\n \"dns_name\": \"lb-network.local\",\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:15:00Z\"\n }\n ],\n \"ip_addresses\": [\n {\n \"address\": \"192.168.1.10\",\n \"network_name\": \"public-network\",\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:15:00Z\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"maintenance_dow\": \"tuesday\",\n \"maintenance_time\": \"02:00:00.000Z\",\n \"created_at\": \"2025-11-06T08:00:00Z\",\n \"updated_at\": \"2025-11-06T09:15:00Z\",\n \"network_uuid\": \"network_uuid\",\n \"dns_name\": \"dns_name\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "6ac0f95c-e68e-4c50-a0e4-00ff578c9305", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "60dba7d3-3204-4f7b-aa5f-b332e8ed8d17", + "name": "Replace load balancer - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}", + "method": "PUT", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"b7a3f6a4-4a8f-4a5c-b7a5-9c9a1e5a6d3e\",\n \"name\": \"loadbalancer-prod-eu\",\n \"zone\": \"de-fra1\",\n \"plan\": \"medium\",\n \"configured_status\": \"configured\",\n \"operational_state\": \"running\",\n \"frontends\": [\n {\n \"name\": \"frontend-1\",\n \"port\": 80,\n \"mode\": \"http\",\n \"default_backend\": \"backend-1\",\n \"tls_configs\": [\n {\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"rules\": [\n {\n \"name\": \"redirect-to-https\",\n \"priority\": 1,\n \"matching_condition\": \"and\",\n \"matchers\": [\n {\n \"type\": \"path\",\n \"inverse\": false,\n \"match_src_ip\": {\n \"value\": \"192.168.1.0/24\"\n },\n \"match_src_port\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_body_size\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_cookie\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_url_param\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_request_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_response_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_http_status\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_http_method\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_path\": {\n \"method\": \"starts_with\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_host\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url_query\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_num_members_up\": {\n \"method\": \"greater_or_equal\",\n \"value\": 2,\n \"range_start\": 0,\n \"range_end\": 10,\n \"backend\": \"backend-1\"\n }\n }\n ],\n \"actions\": [\n {\n \"type\": \"set_forwarded_headers\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"set_request_header\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Forwarded-Proto\",\n \"value\": \"https\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"http_redirect\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"properties\": {\n \"inbound_proxy_protocol\": false,\n \"timeout_client\": 50000,\n \"http2_enabled\": true,\n \"frontend_id\": 301\n },\n \"networks\": [\n {\n \"name\": \"public-network\"\n },\n {\n \"name\": \"private-network\"\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-12-06T09:00:00Z\"\n }\n ],\n \"backends\": [\n {\n \"name\": \"api-backend\",\n \"members\": [\n {\n \"name\": \"member-1\",\n \"ip\": \"192.168.1.10\",\n \"port\": 8080,\n \"weight\": 10,\n \"max_sessions\": 100,\n \"type\": \"static\",\n \"enabled\": true,\n \"backup\": false,\n \"created_at\": \"2025-11-05T12:30:00Z\",\n \"updated_at\": \"2025-11-05T13:45:00Z\"\n }\n ],\n \"tls_configs\": [\n {\n \"name\": \"backend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"resolver\": \"resolver-default\",\n \"properties\": {\n \"backend_id\": 401,\n \"timeout_server\": 5000,\n \"timeout_tunnel\": 15000,\n \"health_check_type\": \"http\",\n \"health_check_interval\": 10,\n \"health_check_fall\": 3,\n \"health_check_rise\": 2,\n \"health_check_url\": \"/status\",\n \"health_check_expected_status\": 200,\n \"health_check_tls_verify\": true,\n \"health_check_on_down\": \"shutdown-sessions\",\n \"sticky_session_cookie_name\": \"SESSIONID\",\n \"sticky_session_cookie_attributes\": \"SameSite=Strict; Secure; HttpOnly\",\n \"tls_enabled\": true,\n \"tls_verify\": true,\n \"tls_use_system_ca\": false,\n \"http2_enabled\": true\n },\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:30:00Z\"\n }\n ],\n \"resolvers\": [\n {\n \"name\": \"default-resolver\",\n \"nameservers\": [\n \"94.237.127.9\",\n \"94.237.40.9\"\n ],\n \"retries\": 3,\n \"timeout\": 1000,\n \"timeout_retry\": 1500,\n \"cache_valid\": 86400,\n \"cache_invalid\": 60,\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"networks\": [\n {\n \"name\": \"public-network\",\n \"uuid\": \"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d\",\n \"type\": \"private\",\n \"family\": \"IPv4\",\n \"dns_name\": \"lb-network.local\",\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:15:00Z\"\n }\n ],\n \"ip_addresses\": [\n {\n \"address\": \"192.168.1.10\",\n \"network_name\": \"public-network\",\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:15:00Z\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"maintenance_dow\": \"tuesday\",\n \"maintenance_time\": \"02:00:00.000Z\",\n \"created_at\": \"2025-11-06T08:00:00Z\",\n \"updated_at\": \"2025-11-06T09:15:00Z\",\n \"network_uuid\": \"network_uuid\",\n \"dns_name\": \"dns_name\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "60dba7d3-3204-4f7b-aa5f-b332e8ed8d17", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ec67acdd-e548-478b-ae30-38f6c8133d48", + "name": "Delete load balancer - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ec67acdd-e548-478b-ae30-38f6c8133d48", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "03b4a71c-4ba9-42b5-b0a0-6c8fb8d8a534", + "name": "Modify load balancer - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"b7a3f6a4-4a8f-4a5c-b7a5-9c9a1e5a6d3e\",\n \"name\": \"loadbalancer-prod-eu\",\n \"zone\": \"de-fra1\",\n \"plan\": \"medium\",\n \"configured_status\": \"configured\",\n \"operational_state\": \"running\",\n \"frontends\": [\n {\n \"name\": \"frontend-1\",\n \"port\": 80,\n \"mode\": \"http\",\n \"default_backend\": \"backend-1\",\n \"tls_configs\": [\n {\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"rules\": [\n {\n \"name\": \"redirect-to-https\",\n \"priority\": 1,\n \"matching_condition\": \"and\",\n \"matchers\": [\n {\n \"type\": \"path\",\n \"inverse\": false,\n \"match_src_ip\": {\n \"value\": \"192.168.1.0/24\"\n },\n \"match_src_port\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_body_size\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_cookie\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_url_param\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_request_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_response_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_http_status\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_http_method\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_path\": {\n \"method\": \"starts_with\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_host\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url_query\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_num_members_up\": {\n \"method\": \"greater_or_equal\",\n \"value\": 2,\n \"range_start\": 0,\n \"range_end\": 10,\n \"backend\": \"backend-1\"\n }\n }\n ],\n \"actions\": [\n {\n \"type\": \"set_forwarded_headers\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"set_request_header\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Forwarded-Proto\",\n \"value\": \"https\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"http_redirect\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"properties\": {\n \"inbound_proxy_protocol\": false,\n \"timeout_client\": 50000,\n \"http2_enabled\": true,\n \"frontend_id\": 301\n },\n \"networks\": [\n {\n \"name\": \"public-network\"\n },\n {\n \"name\": \"private-network\"\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-12-06T09:00:00Z\"\n }\n ],\n \"backends\": [\n {\n \"name\": \"api-backend\",\n \"members\": [\n {\n \"name\": \"member-1\",\n \"ip\": \"192.168.1.10\",\n \"port\": 8080,\n \"weight\": 10,\n \"max_sessions\": 100,\n \"type\": \"static\",\n \"enabled\": true,\n \"backup\": false,\n \"created_at\": \"2025-11-05T12:30:00Z\",\n \"updated_at\": \"2025-11-05T13:45:00Z\"\n }\n ],\n \"tls_configs\": [\n {\n \"name\": \"backend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"resolver\": \"resolver-default\",\n \"properties\": {\n \"backend_id\": 401,\n \"timeout_server\": 5000,\n \"timeout_tunnel\": 15000,\n \"health_check_type\": \"http\",\n \"health_check_interval\": 10,\n \"health_check_fall\": 3,\n \"health_check_rise\": 2,\n \"health_check_url\": \"/status\",\n \"health_check_expected_status\": 200,\n \"health_check_tls_verify\": true,\n \"health_check_on_down\": \"shutdown-sessions\",\n \"sticky_session_cookie_name\": \"SESSIONID\",\n \"sticky_session_cookie_attributes\": \"SameSite=Strict; Secure; HttpOnly\",\n \"tls_enabled\": true,\n \"tls_verify\": true,\n \"tls_use_system_ca\": false,\n \"http2_enabled\": true\n },\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:30:00Z\"\n }\n ],\n \"resolvers\": [\n {\n \"name\": \"default-resolver\",\n \"nameservers\": [\n \"94.237.127.9\",\n \"94.237.40.9\"\n ],\n \"retries\": 3,\n \"timeout\": 1000,\n \"timeout_retry\": 1500,\n \"cache_valid\": 86400,\n \"cache_invalid\": 60,\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"networks\": [\n {\n \"name\": \"public-network\",\n \"uuid\": \"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d\",\n \"type\": \"private\",\n \"family\": \"IPv4\",\n \"dns_name\": \"lb-network.local\",\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:15:00Z\"\n }\n ],\n \"ip_addresses\": [\n {\n \"address\": \"192.168.1.10\",\n \"network_name\": \"public-network\",\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:15:00Z\"\n }\n ],\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"maintenance_dow\": \"tuesday\",\n \"maintenance_time\": \"02:00:00.000Z\",\n \"created_at\": \"2025-11-06T08:00:00Z\",\n \"updated_at\": \"2025-11-06T09:15:00Z\",\n \"network_uuid\": \"network_uuid\",\n \"dns_name\": \"dns_name\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "03b4a71c-4ba9-42b5-b0a0-6c8fb8d8a534", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4e88c403-ebf9-4f0c-963c-746f0b9641df", + "name": "List load balancer frontends - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/frontends", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"frontend-1\",\n \"port\": 80,\n \"mode\": \"http\",\n \"default_backend\": \"backend-1\",\n \"tls_configs\": [\n {\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"rules\": [\n {\n \"name\": \"redirect-to-https\",\n \"priority\": 1,\n \"matching_condition\": \"and\",\n \"matchers\": [\n {\n \"type\": \"path\",\n \"inverse\": false,\n \"match_src_ip\": {\n \"value\": \"192.168.1.0/24\"\n },\n \"match_src_port\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_body_size\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_cookie\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_url_param\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_request_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_response_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_http_status\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_http_method\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_path\": {\n \"method\": \"starts_with\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_host\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url_query\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_num_members_up\": {\n \"method\": \"greater_or_equal\",\n \"value\": 2,\n \"range_start\": 0,\n \"range_end\": 10,\n \"backend\": \"backend-1\"\n }\n }\n ],\n \"actions\": [\n {\n \"type\": \"set_forwarded_headers\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"set_request_header\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Forwarded-Proto\",\n \"value\": \"https\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"http_redirect\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"properties\": {\n \"inbound_proxy_protocol\": false,\n \"timeout_client\": 50000,\n \"http2_enabled\": true,\n \"frontend_id\": 301\n },\n \"networks\": [\n {\n \"name\": \"public-network\"\n },\n {\n \"name\": \"private-network\"\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-12-06T09:00:00Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4e88c403-ebf9-4f0c-963c-746f0b9641df", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "21df24de-46a7-461a-852d-b1e36d8f26ae", + "name": "Create load balancer frontend - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/frontends", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"name\": \"frontend-1\",\n \"port\": 80,\n \"mode\": \"http\",\n \"default_backend\": \"backend-1\",\n \"tls_configs\": [\n {\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"rules\": [\n {\n \"name\": \"redirect-to-https\",\n \"priority\": 1,\n \"matching_condition\": \"and\",\n \"matchers\": [\n {\n \"type\": \"path\",\n \"inverse\": false,\n \"match_src_ip\": {\n \"value\": \"192.168.1.0/24\"\n },\n \"match_src_port\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_body_size\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_cookie\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_url_param\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_request_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_response_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_http_status\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_http_method\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_path\": {\n \"method\": \"starts_with\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_host\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url_query\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_num_members_up\": {\n \"method\": \"greater_or_equal\",\n \"value\": 2,\n \"range_start\": 0,\n \"range_end\": 10,\n \"backend\": \"backend-1\"\n }\n }\n ],\n \"actions\": [\n {\n \"type\": \"set_forwarded_headers\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"set_request_header\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Forwarded-Proto\",\n \"value\": \"https\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"http_redirect\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"properties\": {\n \"inbound_proxy_protocol\": false,\n \"timeout_client\": 50000,\n \"http2_enabled\": true,\n \"frontend_id\": 301\n },\n \"networks\": [\n {\n \"name\": \"public-network\"\n },\n {\n \"name\": \"private-network\"\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-12-06T09:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "21df24de-46a7-461a-852d-b1e36d8f26ae", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "35149e18-039f-4f86-84f8-73586c61b0be", + "name": "Get load balancer frontend - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "frontend-name": { + "equalTo": "example-frontend-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"frontend-1\",\n \"port\": 80,\n \"mode\": \"http\",\n \"default_backend\": \"backend-1\",\n \"tls_configs\": [\n {\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"rules\": [\n {\n \"name\": \"redirect-to-https\",\n \"priority\": 1,\n \"matching_condition\": \"and\",\n \"matchers\": [\n {\n \"type\": \"path\",\n \"inverse\": false,\n \"match_src_ip\": {\n \"value\": \"192.168.1.0/24\"\n },\n \"match_src_port\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_body_size\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_cookie\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_url_param\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_request_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_response_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_http_status\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_http_method\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_path\": {\n \"method\": \"starts_with\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_host\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url_query\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_num_members_up\": {\n \"method\": \"greater_or_equal\",\n \"value\": 2,\n \"range_start\": 0,\n \"range_end\": 10,\n \"backend\": \"backend-1\"\n }\n }\n ],\n \"actions\": [\n {\n \"type\": \"set_forwarded_headers\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"set_request_header\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Forwarded-Proto\",\n \"value\": \"https\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"http_redirect\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"properties\": {\n \"inbound_proxy_protocol\": false,\n \"timeout_client\": 50000,\n \"http2_enabled\": true,\n \"frontend_id\": 301\n },\n \"networks\": [\n {\n \"name\": \"public-network\"\n },\n {\n \"name\": \"private-network\"\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-12-06T09:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "35149e18-039f-4f86-84f8-73586c61b0be", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "9d0a5ff5-51a8-424b-992b-2c72a99e131f", + "name": "Delete load balancer frontend - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "frontend-name": { + "equalTo": "example-frontend-1" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "9d0a5ff5-51a8-424b-992b-2c72a99e131f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2a01e17c-ce17-4174-a034-82cc326212b6", + "name": "Modify load balancer frontend - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "frontend-name": { + "equalTo": "example-frontend-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"frontend-1\",\n \"port\": 80,\n \"mode\": \"http\",\n \"default_backend\": \"backend-1\",\n \"tls_configs\": [\n {\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"rules\": [\n {\n \"name\": \"redirect-to-https\",\n \"priority\": 1,\n \"matching_condition\": \"and\",\n \"matchers\": [\n {\n \"type\": \"path\",\n \"inverse\": false,\n \"match_src_ip\": {\n \"value\": \"192.168.1.0/24\"\n },\n \"match_src_port\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_body_size\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_cookie\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_url_param\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_request_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_response_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_http_status\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_http_method\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_path\": {\n \"method\": \"starts_with\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_host\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url_query\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_num_members_up\": {\n \"method\": \"greater_or_equal\",\n \"value\": 2,\n \"range_start\": 0,\n \"range_end\": 10,\n \"backend\": \"backend-1\"\n }\n }\n ],\n \"actions\": [\n {\n \"type\": \"set_forwarded_headers\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"set_request_header\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Forwarded-Proto\",\n \"value\": \"https\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"http_redirect\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"properties\": {\n \"inbound_proxy_protocol\": false,\n \"timeout_client\": 50000,\n \"http2_enabled\": true,\n \"frontend_id\": 301\n },\n \"networks\": [\n {\n \"name\": \"public-network\"\n },\n {\n \"name\": \"private-network\"\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-12-06T09:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2a01e17c-ce17-4174-a034-82cc326212b6", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1e11c448-4da8-432f-9c8c-afbf08752b0c", + "name": "List load balancer frontend TLS configs - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}/tls-configs", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "frontend-name": { + "equalTo": "example-frontend-1" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1e11c448-4da8-432f-9c8c-afbf08752b0c", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "265f0ed6-0aed-4b8d-b4dd-cf63ccd63f91", + "name": "Create load balancer frontend TLS config - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}/tls-configs", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "frontend-name": { + "equalTo": "example-frontend-1" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "265f0ed6-0aed-4b8d-b4dd-cf63ccd63f91", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1c5dde58-5c3d-4436-a29f-4a1710fdf077", + "name": "Get load balancer frontend TLS config - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}/tls-configs/{tls-config-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "frontend-name": { + "equalTo": "example-frontend-1" + }, + "tls-config-name": { + "equalTo": "example-tls-config-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1c5dde58-5c3d-4436-a29f-4a1710fdf077", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1e7dd888-eee7-4fc8-87aa-3ae33219e263", + "name": "Delete load balancer frontend TLS config - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}/tls-configs/{tls-config-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "frontend-name": { + "equalTo": "example-frontend-1" + }, + "tls-config-name": { + "equalTo": "example-tls-config-1" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1e7dd888-eee7-4fc8-87aa-3ae33219e263", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d38609aa-5622-4977-a03f-770e887d7b00", + "name": "Modify load balancer frontend TLS config - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}/tls-configs/{tls-config-name}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "frontend-name": { + "equalTo": "example-frontend-1" + }, + "tls-config-name": { + "equalTo": "example-tls-config-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d38609aa-5622-4977-a03f-770e887d7b00", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ee34f351-5dbe-4e29-830d-3931a9619f22", + "name": "List load balancer rules - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}/rules", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "frontend-name": { + "equalTo": "example-frontend-1" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"redirect-to-https\",\n \"priority\": 1,\n \"matching_condition\": \"and\",\n \"matchers\": [\n {\n \"type\": \"path\",\n \"inverse\": false,\n \"match_src_ip\": {\n \"value\": \"192.168.1.0/24\"\n },\n \"match_src_port\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_body_size\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_cookie\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_url_param\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_request_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_response_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_http_status\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_http_method\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_path\": {\n \"method\": \"starts_with\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_host\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url_query\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_num_members_up\": {\n \"method\": \"greater_or_equal\",\n \"value\": 2,\n \"range_start\": 0,\n \"range_end\": 10,\n \"backend\": \"backend-1\"\n }\n }\n ],\n \"actions\": [\n {\n \"type\": \"set_forwarded_headers\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"set_request_header\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Forwarded-Proto\",\n \"value\": \"https\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"http_redirect\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ee34f351-5dbe-4e29-830d-3931a9619f22", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1f25b497-2088-4627-8219-4fdac4c249a2", + "name": "Create load balancer rule - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}/rules", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "frontend-name": { + "equalTo": "example-frontend-1" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"name\": \"redirect-to-https\",\n \"priority\": 1,\n \"matching_condition\": \"and\",\n \"matchers\": [\n {\n \"type\": \"path\",\n \"inverse\": false,\n \"match_src_ip\": {\n \"value\": \"192.168.1.0/24\"\n },\n \"match_src_port\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_body_size\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_cookie\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_url_param\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_request_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_response_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_http_status\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_http_method\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_path\": {\n \"method\": \"starts_with\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_host\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url_query\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_num_members_up\": {\n \"method\": \"greater_or_equal\",\n \"value\": 2,\n \"range_start\": 0,\n \"range_end\": 10,\n \"backend\": \"backend-1\"\n }\n }\n ],\n \"actions\": [\n {\n \"type\": \"set_forwarded_headers\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"set_request_header\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Forwarded-Proto\",\n \"value\": \"https\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"http_redirect\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1f25b497-2088-4627-8219-4fdac4c249a2", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "3db9dc3c-a33f-42a0-97fb-f0eee20bd875", + "name": "Get load balancer rule - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}/rules/{rule-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "frontend-name": { + "equalTo": "example-frontend-1" + }, + "rule-name": { + "equalTo": "example-rule-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"redirect-to-https\",\n \"priority\": 1,\n \"matching_condition\": \"and\",\n \"matchers\": [\n {\n \"type\": \"path\",\n \"inverse\": false,\n \"match_src_ip\": {\n \"value\": \"192.168.1.0/24\"\n },\n \"match_src_port\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_body_size\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_cookie\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_url_param\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_request_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_response_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_http_status\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_http_method\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_path\": {\n \"method\": \"starts_with\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_host\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url_query\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_num_members_up\": {\n \"method\": \"greater_or_equal\",\n \"value\": 2,\n \"range_start\": 0,\n \"range_end\": 10,\n \"backend\": \"backend-1\"\n }\n }\n ],\n \"actions\": [\n {\n \"type\": \"set_forwarded_headers\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"set_request_header\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Forwarded-Proto\",\n \"value\": \"https\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"http_redirect\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "3db9dc3c-a33f-42a0-97fb-f0eee20bd875", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "98381693-822b-4c4a-b1b0-456190d59446", + "name": "Replace load balancer rule - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}/rules/{rule-name}", + "method": "PUT", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "frontend-name": { + "equalTo": "example-frontend-1" + }, + "rule-name": { + "equalTo": "example-rule-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"redirect-to-https\",\n \"priority\": 1,\n \"matching_condition\": \"and\",\n \"matchers\": [\n {\n \"type\": \"path\",\n \"inverse\": false,\n \"match_src_ip\": {\n \"value\": \"192.168.1.0/24\"\n },\n \"match_src_port\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_body_size\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_cookie\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_url_param\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_request_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_response_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_http_status\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_http_method\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_path\": {\n \"method\": \"starts_with\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_host\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url_query\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_num_members_up\": {\n \"method\": \"greater_or_equal\",\n \"value\": 2,\n \"range_start\": 0,\n \"range_end\": 10,\n \"backend\": \"backend-1\"\n }\n }\n ],\n \"actions\": [\n {\n \"type\": \"set_forwarded_headers\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"set_request_header\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Forwarded-Proto\",\n \"value\": \"https\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"http_redirect\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "98381693-822b-4c4a-b1b0-456190d59446", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "b8b161a1-e3e7-4938-a599-5aa3336f8c3e", + "name": "Delete load balancer rule - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}/rules/{rule-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "frontend-name": { + "equalTo": "example-frontend-1" + }, + "rule-name": { + "equalTo": "example-rule-1" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "b8b161a1-e3e7-4938-a599-5aa3336f8c3e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ea504344-39b1-4ee7-add9-32f4c3b830ef", + "name": "Modify load balancer rule - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}/rules/{rule-name}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "frontend-name": { + "equalTo": "example-frontend-1" + }, + "rule-name": { + "equalTo": "example-rule-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"redirect-to-https\",\n \"priority\": 1,\n \"matching_condition\": \"and\",\n \"matchers\": [\n {\n \"type\": \"path\",\n \"inverse\": false,\n \"match_src_ip\": {\n \"value\": \"192.168.1.0/24\"\n },\n \"match_src_port\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_body_size\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_cookie\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_url_param\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_request_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_response_header\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true,\n \"name\": \"Authorization\"\n },\n \"match_http_status\": {\n \"method\": \"greater_or_equal\",\n \"value\": 100,\n \"range_start\": 0,\n \"range_end\": 1024\n },\n \"match_http_method\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_path\": {\n \"method\": \"starts_with\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_host\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_url_query\": {\n \"method\": \"contains\",\n \"value\": \"/api\",\n \"ignore_case\": true\n },\n \"match_num_members_up\": {\n \"method\": \"greater_or_equal\",\n \"value\": 2,\n \"range_start\": 0,\n \"range_end\": 10,\n \"backend\": \"backend-1\"\n }\n }\n ],\n \"actions\": [\n {\n \"type\": \"set_forwarded_headers\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"set_request_header\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Forwarded-Proto\",\n \"value\": \"https\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n },\n {\n \"type\": \"http_redirect\",\n \"action_use_backend\": {\n \"backend\": \"api-backend\"\n },\n \"action_http_return\": {\n \"status\": 403,\n \"content_type\": \"text/plain\",\n \"payload\": \"QWNjZXNzIERlbmllZAo=\"\n },\n \"action_http_redirect\": {\n \"location\": \"https://example.com\",\n \"status\": 301\n },\n \"action_tcp_reject\": {\n \"key\": \"value\"\n },\n \"action_set_forwarded_headers\": {\n \"key\": \"value\"\n },\n \"action_set_request_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_set_response_header\": {\n \"header\": \"X-Custom-Header\",\n \"value\": \"Processed-By-UpCloud-LB\"\n },\n \"action_http_rewrite_path\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n },\n \"action_http_rewrite_uri\": {\n \"match_pattern\": \"^/api/(.*)$\",\n \"rewrite_to\": \"/v2/\\\\1\"\n }\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ea504344-39b1-4ee7-add9-32f4c3b830ef", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "9007d233-95f8-4444-a80e-4fdc00b96ee4", + "name": "List load balancer backends - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/backends", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"api-backend\",\n \"members\": [\n {\n \"name\": \"member-1\",\n \"ip\": \"192.168.1.10\",\n \"port\": 8080,\n \"weight\": 10,\n \"max_sessions\": 100,\n \"type\": \"static\",\n \"enabled\": true,\n \"backup\": false,\n \"created_at\": \"2025-11-05T12:30:00Z\",\n \"updated_at\": \"2025-11-05T13:45:00Z\"\n }\n ],\n \"tls_configs\": [\n {\n \"name\": \"backend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"resolver\": \"resolver-default\",\n \"properties\": {\n \"backend_id\": 401,\n \"outbound_proxy_protocol\": \"v1\",\n \"timeout_server\": 5000,\n \"timeout_tunnel\": 15000,\n \"health_check_type\": \"http\",\n \"health_check_interval\": 10,\n \"health_check_fall\": 3,\n \"health_check_rise\": 2,\n \"health_check_url\": \"/status\",\n \"health_check_expected_status\": 200,\n \"health_check_tls_verify\": true,\n \"health_check_on_down\": \"shutdown-sessions\",\n \"sticky_session_cookie_name\": \"SESSIONID\",\n \"sticky_session_cookie_attributes\": \"SameSite=Strict; Secure; HttpOnly\",\n \"tls_enabled\": true,\n \"tls_verify\": true,\n \"tls_use_system_ca\": false,\n \"http2_enabled\": true\n },\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:30:00Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "9007d233-95f8-4444-a80e-4fdc00b96ee4", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "93641ec7-1eca-4d57-a793-65ffadc6d0f1", + "name": "Create load balancer backend - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/backends", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"name\": \"api-backend\",\n \"members\": [\n {\n \"name\": \"member-1\",\n \"ip\": \"192.168.1.10\",\n \"port\": 8080,\n \"weight\": 10,\n \"max_sessions\": 100,\n \"type\": \"static\",\n \"enabled\": true,\n \"backup\": false,\n \"created_at\": \"2025-11-05T12:30:00Z\",\n \"updated_at\": \"2025-11-05T13:45:00Z\"\n }\n ],\n \"tls_configs\": [\n {\n \"name\": \"backend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"resolver\": \"resolver-default\",\n \"properties\": {\n \"backend_id\": 401,\n \"outbound_proxy_protocol\": \"v1\",\n \"timeout_server\": 5000,\n \"timeout_tunnel\": 15000,\n \"health_check_type\": \"http\",\n \"health_check_interval\": 10,\n \"health_check_fall\": 3,\n \"health_check_rise\": 2,\n \"health_check_url\": \"/status\",\n \"health_check_expected_status\": 200,\n \"health_check_tls_verify\": true,\n \"health_check_on_down\": \"shutdown-sessions\",\n \"sticky_session_cookie_name\": \"SESSIONID\",\n \"sticky_session_cookie_attributes\": \"SameSite=Strict; Secure; HttpOnly\",\n \"tls_enabled\": true,\n \"tls_verify\": true,\n \"tls_use_system_ca\": false,\n \"http2_enabled\": true\n },\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:30:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "93641ec7-1eca-4d57-a793-65ffadc6d0f1", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "fe3c0ed2-e61f-416c-b9cc-95fdda6cd059", + "name": "Get load balancer backend - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/backends/{backend-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "backend-name": { + "equalTo": "backend-infra" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"api-backend\",\n \"members\": [\n {\n \"name\": \"member-1\",\n \"ip\": \"192.168.1.10\",\n \"port\": 8080,\n \"weight\": 10,\n \"max_sessions\": 100,\n \"type\": \"static\",\n \"enabled\": true,\n \"backup\": false,\n \"created_at\": \"2025-11-05T12:30:00Z\",\n \"updated_at\": \"2025-11-05T13:45:00Z\"\n }\n ],\n \"tls_configs\": [\n {\n \"name\": \"backend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"resolver\": \"resolver-default\",\n \"properties\": {\n \"backend_id\": 401,\n \"outbound_proxy_protocol\": \"v1\",\n \"timeout_server\": 5000,\n \"timeout_tunnel\": 15000,\n \"health_check_type\": \"http\",\n \"health_check_interval\": 10,\n \"health_check_fall\": 3,\n \"health_check_rise\": 2,\n \"health_check_url\": \"/status\",\n \"health_check_expected_status\": 200,\n \"health_check_tls_verify\": true,\n \"health_check_on_down\": \"shutdown-sessions\",\n \"sticky_session_cookie_name\": \"SESSIONID\",\n \"sticky_session_cookie_attributes\": \"SameSite=Strict; Secure; HttpOnly\",\n \"tls_enabled\": true,\n \"tls_verify\": true,\n \"tls_use_system_ca\": false,\n \"http2_enabled\": true\n },\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:30:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "fe3c0ed2-e61f-416c-b9cc-95fdda6cd059", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "3623842b-4cb9-45c4-be78-c56b083e3680", + "name": "Delete load balancer backend - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/backends/{backend-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "backend-name": { + "equalTo": "backend-infra" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "3623842b-4cb9-45c4-be78-c56b083e3680", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5b4bfd3c-3c4c-4185-a562-b9d42577caec", + "name": "Modify load balancer backend - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/backends/{backend-name}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "backend-name": { + "equalTo": "backend-infra" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"api-backend\",\n \"members\": [\n {\n \"name\": \"member-1\",\n \"ip\": \"192.168.1.10\",\n \"port\": 8080,\n \"weight\": 10,\n \"max_sessions\": 100,\n \"type\": \"static\",\n \"enabled\": true,\n \"backup\": false,\n \"created_at\": \"2025-11-05T12:30:00Z\",\n \"updated_at\": \"2025-11-05T13:45:00Z\"\n }\n ],\n \"tls_configs\": [\n {\n \"name\": \"backend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ],\n \"resolver\": \"resolver-default\",\n \"properties\": {\n \"backend_id\": 401,\n \"outbound_proxy_protocol\": \"v1\",\n \"timeout_server\": 5000,\n \"timeout_tunnel\": 15000,\n \"health_check_type\": \"http\",\n \"health_check_interval\": 10,\n \"health_check_fall\": 3,\n \"health_check_rise\": 2,\n \"health_check_url\": \"/status\",\n \"health_check_expected_status\": 200,\n \"health_check_tls_verify\": true,\n \"health_check_on_down\": \"shutdown-sessions\",\n \"sticky_session_cookie_name\": \"SESSIONID\",\n \"sticky_session_cookie_attributes\": \"SameSite=Strict; Secure; HttpOnly\",\n \"tls_enabled\": true,\n \"tls_verify\": true,\n \"tls_use_system_ca\": false,\n \"http2_enabled\": true\n },\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:30:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5b4bfd3c-3c4c-4185-a562-b9d42577caec", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "7db3d783-c189-4095-a37e-4623349dba67", + "name": "List load balancer members - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/backends/{backend-name}/members", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "backend-name": { + "equalTo": "backend-infra" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"member-1\",\n \"ip\": \"192.168.1.10\",\n \"port\": 8080,\n \"weight\": 10,\n \"max_sessions\": 100,\n \"type\": \"static\",\n \"enabled\": true,\n \"backup\": false,\n \"created_at\": \"2025-11-05T12:30:00Z\",\n \"updated_at\": \"2025-11-05T13:45:00Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7db3d783-c189-4095-a37e-4623349dba67", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "64736f6d-ed03-4448-89a3-4fcaa7250050", + "name": "Create load balancer member - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/backends/{backend-name}/members", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "backend-name": { + "equalTo": "backend-infra" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"name\": \"member-1\",\n \"ip\": \"192.168.1.10\",\n \"port\": 8080,\n \"weight\": 10,\n \"max_sessions\": 100,\n \"type\": \"static\",\n \"enabled\": true,\n \"backup\": false,\n \"created_at\": \"2025-11-05T12:30:00Z\",\n \"updated_at\": \"2025-11-05T13:45:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "64736f6d-ed03-4448-89a3-4fcaa7250050", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1175adea-b199-452e-9899-3e9f50d8756f", + "name": "Get load balancer member - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/backends/{backend-name}/members/{member-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "backend-name": { + "equalTo": "backend-infra" + }, + "member-name": { + "equalTo": "dev-member" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"member-1\",\n \"ip\": \"192.168.1.10\",\n \"port\": 8080,\n \"weight\": 10,\n \"max_sessions\": 100,\n \"type\": \"static\",\n \"enabled\": true,\n \"backup\": false,\n \"created_at\": \"2025-11-05T12:30:00Z\",\n \"updated_at\": \"2025-11-05T13:45:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1175adea-b199-452e-9899-3e9f50d8756f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f8e5f389-706e-4b1f-933b-abd34fc4cd1f", + "name": "Delete load balancer member - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/backends/{backend-name}/members/{member-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "backend-name": { + "equalTo": "backend-infra" + }, + "member-name": { + "equalTo": "dev-member" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f8e5f389-706e-4b1f-933b-abd34fc4cd1f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d9472439-7e47-4d55-be37-91795af8026e", + "name": "Modify load balancer member - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/backends/{backend-name}/members/{member-name}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "backend-name": { + "equalTo": "backend-infra" + }, + "member-name": { + "equalTo": "dev-member" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"member-1\",\n \"ip\": \"192.168.1.10\",\n \"port\": 8080,\n \"weight\": 10,\n \"max_sessions\": 100,\n \"type\": \"static\",\n \"enabled\": true,\n \"backup\": false,\n \"created_at\": \"2025-11-05T12:30:00Z\",\n \"updated_at\": \"2025-11-05T13:45:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d9472439-7e47-4d55-be37-91795af8026e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "a7fe891d-1e85-4b11-bc2f-66d31d8488f4", + "name": "List load balancer backend TLS configs - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/backends/{backend-name}/tls-configs", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "backend-name": { + "equalTo": "backend-infra" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a7fe891d-1e85-4b11-bc2f-66d31d8488f4", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "052d2eee-4faf-4be8-9e3b-abb2bd2b4dfa", + "name": "Create load balancer backend TLS config - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/backends/{backend-name}/tls-configs", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "backend-name": { + "equalTo": "backend-infra" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "052d2eee-4faf-4be8-9e3b-abb2bd2b4dfa", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e7f97580-83ef-459c-b6d7-df923723ad92", + "name": "Get load balancer backend TLS config - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/backends/{backend-name}/tls-configs/{tls-config-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "backend-name": { + "equalTo": "backend-infra" + }, + "tls-config-name": { + "equalTo": "example-tls-config-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e7f97580-83ef-459c-b6d7-df923723ad92", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d7d65167-2149-409f-9e26-ee903df22a4c", + "name": "Delete load balancer backend TLS config - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/backends/{backend-name}/tls-configs/{tls-config-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "backend-name": { + "equalTo": "backend-infra" + }, + "tls-config-name": { + "equalTo": "example-tls-config-1" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d7d65167-2149-409f-9e26-ee903df22a4c", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1c96b7c8-39e1-40ec-ae42-be339a7f1ec4", + "name": "Modify load balancer backend TLS config - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/backends/{backend-name}/tls-configs/{tls-config-name}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "backend-name": { + "equalTo": "backend-infra" + }, + "tls-config-name": { + "equalTo": "example-tls-config-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1c96b7c8-39e1-40ec-ae42-be339a7f1ec4", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1bfc39f1-3676-4411-8df5-bb2f35ea9444", + "name": "Modify load balancer network - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/networks/{network-name}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "network-name": { + "equalTo": "example-network-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"public-network\",\n \"uuid\": \"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d\",\n \"type\": \"private\",\n \"family\": \"IPv4\",\n \"dns_name\": \"lb-network.local\",\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:15:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1bfc39f1-3676-4411-8df5-bb2f35ea9444", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "231178d6-cbec-4bdf-bf99-0ff5678acf15", + "name": "List load balancer IP addresses - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/ip-addresses", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"address\": \"192.168.1.10\",\n \"network_name\": \"public-network\",\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:15:00Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "231178d6-cbec-4bdf-bf99-0ff5678acf15", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "715659cc-9d76-4927-83a5-777905c5893d", + "name": "Create load balancer IP address - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/ip-addresses", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"address\": \"192.168.1.10\",\n \"network_name\": \"public-network\",\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:15:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "715659cc-9d76-4927-83a5-777905c5893d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "28562382-bca5-4db1-a4b9-cb3cfb9e338c", + "name": "Get load balancer IP address - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/ip-addresses/{ip-address}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "ip-address": { + "equalTo": "192.168.1.1" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"address\": \"192.168.1.10\",\n \"network_name\": \"public-network\",\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:15:00Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "28562382-bca5-4db1-a4b9-cb3cfb9e338c", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "edb78901-e859-4540-8b3c-6513446d3ec1", + "name": "Delete load balancer IP address - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/ip-addresses/{ip-address}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "ip-address": { + "equalTo": "192.168.1.1" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "edb78901-e859-4540-8b3c-6513446d3ec1", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "59ba1bca-f7d1-4bd8-9c60-17ad80d2e137", + "name": "List load balancer resolvers - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/resolvers", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"default-resolver\",\n \"nameservers\": [\n \"94.237.127.9\",\n \"94.237.40.9\"\n ],\n \"retries\": 3,\n \"timeout\": 1000,\n \"timeout_retry\": 1500,\n \"cache_valid\": 86400,\n \"cache_invalid\": 60,\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "59ba1bca-f7d1-4bd8-9c60-17ad80d2e137", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5e053f15-b45e-460d-9685-f1d90c5ffcc5", + "name": "Create load balancer resolver - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/resolvers", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"name\": \"default-resolver\",\n \"nameservers\": [\n \"94.237.127.9\",\n \"94.237.40.9\"\n ],\n \"retries\": 3,\n \"timeout\": 1000,\n \"timeout_retry\": 1500,\n \"cache_valid\": 86400,\n \"cache_invalid\": 60,\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5e053f15-b45e-460d-9685-f1d90c5ffcc5", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "a8a82bd5-4612-46a5-8a5b-78c9b91081e5", + "name": "Get load balancer resolver - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/resolvers/{resolver-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "resolver-name": { + "equalTo": "example-resolver-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"default-resolver\",\n \"nameservers\": [\n \"94.237.127.9\",\n \"94.237.40.9\"\n ],\n \"retries\": 3,\n \"timeout\": 1000,\n \"timeout_retry\": 1500,\n \"cache_valid\": 86400,\n \"cache_invalid\": 60,\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a8a82bd5-4612-46a5-8a5b-78c9b91081e5", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "1f54fa77-c0a7-4eba-9ab8-c916b40492ce", + "name": "Delete load balancer resolver - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/resolvers/{resolver-name}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "resolver-name": { + "equalTo": "example-resolver-1" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "1f54fa77-c0a7-4eba-9ab8-c916b40492ce", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "75314b35-ed7d-4f6e-98e7-9a0e9ea9d4fb", + "name": "Modify load balancer resolver - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/resolvers/{resolver-name}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "resolver-name": { + "equalTo": "example-resolver-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"default-resolver\",\n \"nameservers\": [\n \"94.237.127.9\",\n \"94.237.40.9\"\n ],\n \"retries\": 3,\n \"timeout\": 1000,\n \"timeout_retry\": 1500,\n \"cache_valid\": 86400,\n \"cache_invalid\": 60,\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "75314b35-ed7d-4f6e-98e7-9a0e9ea9d4fb", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5b09c24f-12be-407f-913f-98a536795b40", + "name": "List load balancer labels - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/labels", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5b09c24f-12be-407f-913f-98a536795b40", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "bd49518f-49f5-41e1-8896-f9ffd11aad09", + "name": "Create load balancer label - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/labels", + "method": "POST", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"key\": \"environment\",\n \"value\": \"production\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "bd49518f-49f5-41e1-8896-f9ffd11aad09", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "df1c9525-3187-4de7-902c-7e049ba61871", + "name": "Get load balancer label - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/labels/{label-key}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "example-key-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"key\": \"environment\",\n \"value\": \"production\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "df1c9525-3187-4de7-902c-7e049ba61871", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "a13d28a2-d399-41ca-81ab-37c9b0fbb73f", + "name": "Delete load balancer label - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/labels/{label-key}", + "method": "DELETE", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "example-key-1" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a13d28a2-d399-41ca-81ab-37c9b0fbb73f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "3457461d-7873-416b-951e-c5afea480fbc", + "name": "Modify load balancer label - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/labels/{label-key}", + "method": "PATCH", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "example-key-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"key\": \"environment\",\n \"value\": \"production\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "3457461d-7873-416b-951e-c5afea480fbc", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2245511f-61d2-423f-b2e9-610191bb6ee0", + "name": "Get load balancer metrics - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/metrics", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"frontends\": [\n {\n \"total_http_requests\": 12500,\n \"total_denied_requests\": 35,\n \"total_intercepted_requests\": 12,\n \"total_request_bytes\": 12543000,\n \"total_response_bytes\": 11789000,\n \"total_denied_responses\": 2,\n \"total_http_responses_1xx\": 5,\n \"total_http_responses_2xx\": 984,\n \"total_http_responses_3xx\": 45,\n \"total_http_responses_4xx\": 22,\n \"total_http_responses_5xx\": 8,\n \"total_http_responses_other\": 0,\n \"total_sessions\": 1100,\n \"session_rate\": 25,\n \"current_sessions\": 4,\n \"frontend_id\": 301,\n \"name\": \"frontend-http\",\n \"request_rate\": 120,\n \"total_denied_connections\": 5,\n \"total_denied_sessions\": 3,\n \"total_invalid_requests\": 7,\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"backends\": [\n {\n \"avg_connection_time_ms\": 12,\n \"avg_queue_time_ms\": 5,\n \"avg_server_response_time_ms\": 28,\n \"avg_total_time_ms\": 45,\n \"total_failed_checks_transitions\": 3,\n \"total_client_aborted\": 12,\n \"total_failed_connections\": 5,\n \"total_invalid_responses\": 2,\n \"total_routed_requests\": 14892,\n \"total_server_aborted\": 4,\n \"total_server_redispatches\": 7,\n \"total_server_connection_retries\": 9,\n \"connections_waiting\": 1,\n \"total_request_bytes\": 12543000,\n \"total_response_bytes\": 11789000,\n \"total_denied_responses\": 2,\n \"total_http_responses_1xx\": 5,\n \"total_http_responses_2xx\": 984,\n \"total_http_responses_3xx\": 45,\n \"total_http_responses_4xx\": 22,\n \"total_http_responses_5xx\": 8,\n \"total_http_responses_other\": 0,\n \"total_sessions\": 1100,\n \"session_rate\": 25,\n \"current_sessions\": 4,\n \"backend_id\": 401,\n \"name\": \"backend-api\",\n \"downtime_s\": 45,\n \"active_servers\": 3,\n \"backup_servers\": 1,\n \"members\": [\n {\n \"avg_connection_time_ms\": 12,\n \"avg_queue_time_ms\": 5,\n \"avg_server_response_time_ms\": 28,\n \"avg_total_time_ms\": 45,\n \"total_failed_checks_transitions\": 3,\n \"total_client_aborted\": 12,\n \"total_failed_connections\": 5,\n \"total_invalid_responses\": 2,\n \"total_routed_requests\": 14892,\n \"total_server_aborted\": 4,\n \"total_server_redispatches\": 7,\n \"total_server_connection_retries\": 9,\n \"connections_waiting\": 1,\n \"total_request_bytes\": 12543000,\n \"total_response_bytes\": 11789000,\n \"total_denied_responses\": 2,\n \"total_http_responses_1xx\": 5,\n \"total_http_responses_2xx\": 984,\n \"total_http_responses_3xx\": 45,\n \"total_http_responses_4xx\": 22,\n \"total_http_responses_5xx\": 8,\n \"total_http_responses_other\": 0,\n \"total_sessions\": 1100,\n \"session_rate\": 25,\n \"current_sessions\": 4,\n \"member_id\": 101,\n \"name\": \"backend-member-1\",\n \"backend_id\": 401,\n \"status\": \"up\",\n \"check_status\": \"checking\",\n \"check_http_code\": 200,\n \"last_check_content\": \"OK\",\n \"last_check_desc\": \"Health check passed successfully.\",\n \"total_failed_checks\": 2,\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2245511f-61d2-423f-b2e9-610191bb6ee0", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4ed738f5-091c-4bd5-81ca-44a26d7d8135", + "name": "Get load balancer metrics series - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/metrics/series", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"frontends\": [\n {\n \"total_http_requests\": 12500,\n \"total_denied_requests\": 35,\n \"total_intercepted_requests\": 12,\n \"total_request_bytes\": 12543000,\n \"total_response_bytes\": 11789000,\n \"total_denied_responses\": 2,\n \"total_http_responses_1xx\": 5,\n \"total_http_responses_2xx\": 984,\n \"total_http_responses_3xx\": 45,\n \"total_http_responses_4xx\": 22,\n \"total_http_responses_5xx\": 8,\n \"total_http_responses_other\": 0,\n \"total_sessions\": 1100,\n \"session_rate\": 25,\n \"current_sessions\": 4,\n \"frontend_id\": 301,\n \"name\": \"frontend-http\",\n \"request_rate\": 120,\n \"total_denied_connections\": 5,\n \"total_denied_sessions\": 3,\n \"total_invalid_requests\": 7,\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"backends\": [\n {\n \"avg_connection_time_ms\": 12,\n \"avg_queue_time_ms\": 5,\n \"avg_server_response_time_ms\": 28,\n \"avg_total_time_ms\": 45,\n \"total_failed_checks_transitions\": 3,\n \"total_client_aborted\": 12,\n \"total_failed_connections\": 5,\n \"total_invalid_responses\": 2,\n \"total_routed_requests\": 14892,\n \"total_server_aborted\": 4,\n \"total_server_redispatches\": 7,\n \"total_server_connection_retries\": 9,\n \"connections_waiting\": 1,\n \"total_request_bytes\": 12543000,\n \"total_response_bytes\": 11789000,\n \"total_denied_responses\": 2,\n \"total_http_responses_1xx\": 5,\n \"total_http_responses_2xx\": 984,\n \"total_http_responses_3xx\": 45,\n \"total_http_responses_4xx\": 22,\n \"total_http_responses_5xx\": 8,\n \"total_http_responses_other\": 0,\n \"total_sessions\": 1100,\n \"session_rate\": 25,\n \"current_sessions\": 4,\n \"backend_id\": 401,\n \"name\": \"backend-api\",\n \"downtime_s\": 45,\n \"active_servers\": 3,\n \"backup_servers\": 1,\n \"members\": [\n {\n \"avg_connection_time_ms\": 12,\n \"avg_queue_time_ms\": 5,\n \"avg_server_response_time_ms\": 28,\n \"avg_total_time_ms\": 45,\n \"total_failed_checks_transitions\": 3,\n \"total_client_aborted\": 12,\n \"total_failed_connections\": 5,\n \"total_invalid_responses\": 2,\n \"total_routed_requests\": 14892,\n \"total_server_aborted\": 4,\n \"total_server_redispatches\": 7,\n \"total_server_connection_retries\": 9,\n \"connections_waiting\": 1,\n \"total_request_bytes\": 12543000,\n \"total_response_bytes\": 11789000,\n \"total_denied_responses\": 2,\n \"total_http_responses_1xx\": 5,\n \"total_http_responses_2xx\": 984,\n \"total_http_responses_3xx\": 45,\n \"total_http_responses_4xx\": 22,\n \"total_http_responses_5xx\": 8,\n \"total_http_responses_other\": 0,\n \"total_sessions\": 1100,\n \"session_rate\": 25,\n \"current_sessions\": 4,\n \"member_id\": 101,\n \"name\": \"backend-member-1\",\n \"backend_id\": 401,\n \"status\": \"up\",\n \"check_status\": \"checking\",\n \"check_http_code\": 200,\n \"last_check_content\": \"OK\",\n \"last_check_desc\": \"Health check passed successfully.\",\n \"total_failed_checks\": 2,\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T09:30:00Z\"\n }\n ]\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4ed738f5-091c-4bd5-81ca-44a26d7d8135", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "75177dcb-5f5b-4044-bb6d-ea8c2e32abfc", + "name": "Get load balancer frontend combined metrics series - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/metrics/series/frontends", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"start_at\": \"2025-11-06T09:00:00Z\",\n \"end_at\": \"2025-11-06T09:05:00Z\",\n \"frontends\": [\n \"frontend-http\",\n \"frontend-https\"\n ],\n \"denied_connections\": 15,\n \"denied_sessions\": 8,\n \"invalid_requests\": 12,\n \"request_bytes\": 15432000,\n \"response_bytes\": 14321000,\n \"denied_responses\": 6,\n \"http_responses_1xx\": 2,\n \"http_responses_2xx\": 940,\n \"http_responses_3xx\": 47,\n \"http_responses_4xx\": 33,\n \"http_responses_5xx\": 12,\n \"http_responses_other\": 0,\n \"sessions\": 1040,\n \"http_requests\": 15000,\n \"denied_requests\": 28,\n \"intercepted_requests\": 9\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "75177dcb-5f5b-4044-bb6d-ea8c2e32abfc", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "e1170597-5c6f-49ed-83fa-2a9ddd0bbbc8", + "name": "Get load balancer frontend metrics series - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/metrics/series/frontends/{frontend-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "frontend-name": { + "equalTo": "example-frontend-1" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"start_at\": \"2025-11-06T09:00:00Z\",\n \"end_at\": \"2025-11-06T09:05:00Z\",\n \"frontends\": [\n \"frontend-http\",\n \"frontend-https\"\n ],\n \"denied_connections\": 15,\n \"denied_sessions\": 8,\n \"invalid_requests\": 12,\n \"request_bytes\": 15432000,\n \"response_bytes\": 14321000,\n \"denied_responses\": 6,\n \"http_responses_1xx\": 2,\n \"http_responses_2xx\": 940,\n \"http_responses_3xx\": 47,\n \"http_responses_4xx\": 33,\n \"http_responses_5xx\": 12,\n \"http_responses_other\": 0,\n \"sessions\": 1040,\n \"http_requests\": 15000,\n \"denied_requests\": 28,\n \"intercepted_requests\": 9\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "e1170597-5c6f-49ed-83fa-2a9ddd0bbbc8", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "73fdce4c-0872-411b-a70f-7d885269863f", + "name": "Get load balancer backend combined metrics series - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/metrics/series/backends", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"start_at\": \"2025-11-06T09:00:00Z\",\n \"end_at\": \"2025-11-06T10:00:00Z\",\n \"backends\": [\n \"backend-api\",\n \"backend-web\"\n ],\n \"request_bytes\": 12345678,\n \"response_bytes\": 11876543,\n \"denied_responses\": 12,\n \"http_responses_1xx\": 2,\n \"http_responses_2xx\": 9500,\n \"http_responses_3xx\": 35,\n \"http_responses_4xx\": 18,\n \"http_responses_5xx\": 6,\n \"http_responses_other\": 0,\n \"sessions\": 220,\n \"downtime\": 45,\n \"failed_checks_transitions\": 3,\n \"client_aborted\": 5,\n \"failed_connections\": 2,\n \"invalid_responses\": 1,\n \"routed_requests\": 15200,\n \"server_aborted\": 2,\n \"server_redispatches\": 3,\n \"server_connection_retries\": 4\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "73fdce4c-0872-411b-a70f-7d885269863f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "331e637e-ebdd-49a1-a260-42582f672eb9", + "name": "Get load balancer backend metrics series - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/metrics/series/backends/{backend-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "backend-name": { + "equalTo": "backend-infra" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"start_at\": \"2025-11-06T09:00:00Z\",\n \"end_at\": \"2025-11-06T10:00:00Z\",\n \"backends\": [\n \"backend-api\",\n \"backend-web\"\n ],\n \"request_bytes\": 12345678,\n \"response_bytes\": 11876543,\n \"denied_responses\": 12,\n \"http_responses_1xx\": 2,\n \"http_responses_2xx\": 9500,\n \"http_responses_3xx\": 35,\n \"http_responses_4xx\": 18,\n \"http_responses_5xx\": 6,\n \"http_responses_other\": 0,\n \"sessions\": 220,\n \"downtime\": 45,\n \"failed_checks_transitions\": 3,\n \"client_aborted\": 5,\n \"failed_connections\": 2,\n \"invalid_responses\": 1,\n \"routed_requests\": 15200,\n \"server_aborted\": 2,\n \"server_redispatches\": 3,\n \"server_connection_retries\": 4\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "331e637e-ebdd-49a1-a260-42582f672eb9", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "be9f6643-edce-4d12-8c32-f7cf464077d2", + "name": "Get load balancer member combined metrics series - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/metrics/series/backends/{backend-name}/members", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "backend-name": { + "equalTo": "backend-infra" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"start_at\": \"2025-11-06T09:00:00Z\",\n \"end_at\": \"2025-11-06T10:00:00Z\",\n \"members\": [\n \"backend-member-1\",\n \"backend-member-2\"\n ],\n \"request_bytes\": 12345678,\n \"response_bytes\": 11876543,\n \"denied_responses\": 12,\n \"http_responses_1xx\": 2,\n \"http_responses_2xx\": 9500,\n \"http_responses_3xx\": 35,\n \"http_responses_4xx\": 18,\n \"http_responses_5xx\": 6,\n \"http_responses_other\": 0,\n \"sessions\": 220,\n \"downtime\": 45,\n \"failed_checks_transitions\": 3,\n \"client_aborted\": 7,\n \"failed_connections\": 2,\n \"invalid_responses\": 1,\n \"routed_requests\": 10234,\n \"server_aborted\": 4,\n \"server_redispatches\": 5,\n \"server_connection_retries\": 9,\n \"failed_checks\": 15\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "be9f6643-edce-4d12-8c32-f7cf464077d2", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d238fd99-3e6b-4f59-bbab-ff229af39198", + "name": "Get load balancer member metrics series - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/{service-uuid}/metrics/series/backends/{backend-name}/members/{member-name}", + "method": "GET", + "pathParameters": { + "service-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "backend-name": { + "equalTo": "backend-infra" + }, + "member-name": { + "equalTo": "dev-member" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"start_at\": \"2025-11-06T09:00:00Z\",\n \"end_at\": \"2025-11-06T10:00:00Z\",\n \"members\": [\n \"backend-member-1\",\n \"backend-member-2\"\n ],\n \"request_bytes\": 12345678,\n \"response_bytes\": 11876543,\n \"denied_responses\": 12,\n \"http_responses_1xx\": 2,\n \"http_responses_2xx\": 9500,\n \"http_responses_3xx\": 35,\n \"http_responses_4xx\": 18,\n \"http_responses_5xx\": 6,\n \"http_responses_other\": 0,\n \"sessions\": 220,\n \"downtime\": 45,\n \"failed_checks_transitions\": 3,\n \"client_aborted\": 7,\n \"failed_connections\": 2,\n \"invalid_responses\": 1,\n \"routed_requests\": 10234,\n \"server_aborted\": 4,\n \"server_redispatches\": 5,\n \"server_connection_retries\": 9,\n \"failed_checks\": 15\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d238fd99-3e6b-4f59-bbab-ff229af39198", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "673b4401-b9d4-440e-816a-1b06466bb7b2", + "name": "List load balancer certificate bundles - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/certificate-bundles", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"uuid\": \"8d2f4a1e-0e3f-44a9-a0f5-9b8c84e9c701\",\n \"name\": \"mydomain-cert-bundle\",\n \"tls_type\": \"dynamic\",\n \"operational_state\": \"setup-challenge\",\n \"certificate\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t...\",\n \"intermediates\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t...\",\n \"hostnames\": [\n \"example.com\",\n \"www.example.com\"\n ],\n \"challenge_problems\": [\n {\n \"hostname\": \"example.com\",\n \"problem\": {\n \"type\": \"https://api.example.com/problems/dns-lookup-failed\",\n \"title\": \"DNS lookup failed\",\n \"detail\": \"The DNS resolver could not resolve the domain name 'example.com'.\",\n \"status\": 400,\n \"invalid_params\": [\n {\n \"name\": \"hostnames[0]\",\n \"reason\": \"Invalid domain name format\"\n }\n ],\n \"correlation_id\": \"req-7b39a1c9b6a14e07b9d4c2a4c5d8b7f2\"\n }\n }\n ],\n \"key_type\": \"rsa\",\n \"services\": [\n {\n \"uuid\": \"d9f1b2a4-5c8d-4b73-91e0-8d5a0dc2e734\",\n \"name\": \"customer-service-lb\",\n \"frontends\": [\n {\n \"name\": \"frontend-http\",\n \"tls_configs\": [\n {\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ]\n }\n ],\n \"backends\": [\n {\n \"name\": \"backend-app\",\n \"tls_configs\": [\n {\n \"name\": \"backend-tls-config\",\n \"certificate_bundle_uuid\": \"b1a5f3d8-2b3e-4b61-981f-d42cfb9a43e2\",\n \"created_at\": \"2025-11-06T10:45:00Z\",\n \"updated_at\": \"2025-11-06T11:20:00Z\"\n }\n ]\n }\n ],\n \"deleted\": false\n }\n ],\n \"not_before\": \"2025-11-06T09:00:00Z\",\n \"not_after\": \"2026-11-06T09:00:00Z\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "673b4401-b9d4-440e-816a-1b06466bb7b2", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "7a25bbbb-b08f-4951-9145-56f7b05b045d", + "name": "Create load balancer certificate bundle - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/certificate-bundles", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"uuid\": \"8d2f4a1e-0e3f-44a9-a0f5-9b8c84e9c701\",\n \"name\": \"mydomain-cert-bundle\",\n \"tls_type\": \"dynamic\",\n \"operational_state\": \"setup-challenge\",\n \"certificate\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t...\",\n \"intermediates\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t...\",\n \"hostnames\": [\n \"example.com\",\n \"www.example.com\"\n ],\n \"challenge_problems\": [\n {\n \"hostname\": \"example.com\",\n \"problem\": {\n \"type\": \"https://api.example.com/problems/dns-lookup-failed\",\n \"title\": \"DNS lookup failed\",\n \"detail\": \"The DNS resolver could not resolve the domain name 'example.com'.\",\n \"status\": 400,\n \"invalid_params\": [\n {\n \"name\": \"hostnames[0]\",\n \"reason\": \"Invalid domain name format\"\n }\n ],\n \"correlation_id\": \"req-7b39a1c9b6a14e07b9d4c2a4c5d8b7f2\"\n }\n }\n ],\n \"key_type\": \"rsa\",\n \"services\": [\n {\n \"uuid\": \"d9f1b2a4-5c8d-4b73-91e0-8d5a0dc2e734\",\n \"name\": \"customer-service-lb\",\n \"frontends\": [\n {\n \"name\": \"frontend-http\",\n \"tls_configs\": [\n {\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ]\n }\n ],\n \"backends\": [\n {\n \"name\": \"backend-app\",\n \"tls_configs\": [\n {\n \"name\": \"backend-tls-config\",\n \"certificate_bundle_uuid\": \"b1a5f3d8-2b3e-4b61-981f-d42cfb9a43e2\",\n \"created_at\": \"2025-11-06T10:45:00Z\",\n \"updated_at\": \"2025-11-06T11:20:00Z\"\n }\n ]\n }\n ],\n \"deleted\": false\n }\n ],\n \"not_before\": \"2025-11-06T09:00:00Z\",\n \"not_after\": \"2026-11-06T09:00:00Z\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7a25bbbb-b08f-4951-9145-56f7b05b045d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "742856f8-2da5-44d6-b2bc-dbaa315dc8c4", + "name": "Get load balancer certificate bundle - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/certificate-bundles/{bundle-uuid}", + "method": "GET", + "pathParameters": { + "bundle-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"8d2f4a1e-0e3f-44a9-a0f5-9b8c84e9c701\",\n \"name\": \"mydomain-cert-bundle\",\n \"tls_type\": \"dynamic\",\n \"operational_state\": \"setup-challenge\",\n \"certificate\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t...\",\n \"intermediates\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t...\",\n \"hostnames\": [\n \"example.com\",\n \"www.example.com\"\n ],\n \"challenge_problems\": [\n {\n \"hostname\": \"example.com\",\n \"problem\": {\n \"type\": \"https://api.example.com/problems/dns-lookup-failed\",\n \"title\": \"DNS lookup failed\",\n \"detail\": \"The DNS resolver could not resolve the domain name 'example.com'.\",\n \"status\": 400,\n \"invalid_params\": [\n {\n \"name\": \"hostnames[0]\",\n \"reason\": \"Invalid domain name format\"\n }\n ],\n \"correlation_id\": \"req-7b39a1c9b6a14e07b9d4c2a4c5d8b7f2\"\n }\n }\n ],\n \"key_type\": \"rsa\",\n \"services\": [\n {\n \"uuid\": \"d9f1b2a4-5c8d-4b73-91e0-8d5a0dc2e734\",\n \"name\": \"customer-service-lb\",\n \"frontends\": [\n {\n \"name\": \"frontend-http\",\n \"tls_configs\": [\n {\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ]\n }\n ],\n \"backends\": [\n {\n \"name\": \"backend-app\",\n \"tls_configs\": [\n {\n \"name\": \"backend-tls-config\",\n \"certificate_bundle_uuid\": \"b1a5f3d8-2b3e-4b61-981f-d42cfb9a43e2\",\n \"created_at\": \"2025-11-06T10:45:00Z\",\n \"updated_at\": \"2025-11-06T11:20:00Z\"\n }\n ]\n }\n ],\n \"deleted\": false\n }\n ],\n \"not_before\": \"2025-11-06T09:00:00Z\",\n \"not_after\": \"2026-11-06T09:00:00Z\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "742856f8-2da5-44d6-b2bc-dbaa315dc8c4", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "a178e981-b2ea-4f88-94af-6f2b38131372", + "name": "Delete load balancer certificate bundle - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/certificate-bundles/{bundle-uuid}", + "method": "DELETE", + "pathParameters": { + "bundle-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a178e981-b2ea-4f88-94af-6f2b38131372", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "9fd5cbd0-fabc-46ae-8528-92da052b4c80", + "name": "Modify load balancer certificate bundle - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/certificate-bundles/{bundle-uuid}", + "method": "PATCH", + "pathParameters": { + "bundle-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"8d2f4a1e-0e3f-44a9-a0f5-9b8c84e9c701\",\n \"name\": \"mydomain-cert-bundle\",\n \"tls_type\": \"dynamic\",\n \"operational_state\": \"setup-challenge\",\n \"certificate\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t...\",\n \"intermediates\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t...\",\n \"hostnames\": [\n \"example.com\",\n \"www.example.com\"\n ],\n \"challenge_problems\": [\n {\n \"hostname\": \"example.com\",\n \"problem\": {\n \"type\": \"https://api.example.com/problems/dns-lookup-failed\",\n \"title\": \"DNS lookup failed\",\n \"detail\": \"The DNS resolver could not resolve the domain name 'example.com'.\",\n \"status\": 400,\n \"invalid_params\": [\n {\n \"name\": \"hostnames[0]\",\n \"reason\": \"Invalid domain name format\"\n }\n ],\n \"correlation_id\": \"req-7b39a1c9b6a14e07b9d4c2a4c5d8b7f2\"\n }\n }\n ],\n \"key_type\": \"rsa\",\n \"services\": [\n {\n \"uuid\": \"d9f1b2a4-5c8d-4b73-91e0-8d5a0dc2e734\",\n \"name\": \"customer-service-lb\",\n \"frontends\": [\n {\n \"name\": \"frontend-http\",\n \"tls_configs\": [\n {\n \"name\": \"frontend-tls-config\",\n \"certificate_bundle_uuid\": \"a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001\",\n \"created_at\": \"2025-11-06T10:15:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n }\n ]\n }\n ],\n \"backends\": [\n {\n \"name\": \"backend-app\",\n \"tls_configs\": [\n {\n \"name\": \"backend-tls-config\",\n \"certificate_bundle_uuid\": \"b1a5f3d8-2b3e-4b61-981f-d42cfb9a43e2\",\n \"created_at\": \"2025-11-06T10:45:00Z\",\n \"updated_at\": \"2025-11-06T11:20:00Z\"\n }\n ]\n }\n ],\n \"deleted\": false\n }\n ],\n \"not_before\": \"2025-11-06T09:00:00Z\",\n \"not_after\": \"2026-11-06T09:00:00Z\",\n \"labels\": [\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n ],\n \"created_at\": \"2025-11-06T09:00:00Z\",\n \"updated_at\": \"2025-11-06T11:00:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "9fd5cbd0-fabc-46ae-8528-92da052b4c80", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "d1ff1040-56bb-4cdb-9a5a-136cca097208", + "name": "List load balancer certificate bundle labels - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/certificate-bundles/{bundle-uuid}/labels", + "method": "GET", + "pathParameters": { + "bundle-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"key\": \"environment\",\n \"value\": \"production\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d1ff1040-56bb-4cdb-9a5a-136cca097208", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5e034825-0e09-4167-828b-d1e8a169087e", + "name": "Create load balancer certificate bundle label - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/certificate-bundles/{bundle-uuid}/labels", + "method": "POST", + "pathParameters": { + "bundle-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"key\": \"environment\",\n \"value\": \"production\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5e034825-0e09-4167-828b-d1e8a169087e", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f4506584-aa75-438c-a034-b3f1449df759", + "name": "Get load balancer certificate bundle label - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/certificate-bundles/{bundle-uuid}/labels/{label-key}", + "method": "GET", + "pathParameters": { + "bundle-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "example-key-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"key\": \"environment\",\n \"value\": \"production\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f4506584-aa75-438c-a034-b3f1449df759", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ea163ae5-53e9-4a4a-8d8a-f0f782c9f842", + "name": "Delete load balancer certificate bundle label - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/certificate-bundles/{bundle-uuid}/labels/{label-key}", + "method": "DELETE", + "pathParameters": { + "bundle-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "example-key-1" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ea163ae5-53e9-4a4a-8d8a-f0f782c9f842", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5af61e9a-28be-4e40-be46-5502bcbf2ea0", + "name": "Modify load balancer certificate bundle label - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/certificate-bundles/{bundle-uuid}/labels/{label-key}", + "method": "PATCH", + "pathParameters": { + "bundle-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "example-key-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"key\": \"environment\",\n \"value\": \"production\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5af61e9a-28be-4e40-be46-5502bcbf2ea0", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "ab7ee460-dfde-4e6b-a1a8-674c04c68493", + "name": "Get load balancer DNS challenge domain - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/certificate-bundles/dns-challenge-domain", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"domain\": \"_acme-challenge.example.upcloudlb.com\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "ab7ee460-dfde-4e6b-a1a8-674c04c68493", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "4194779b-3241-46d7-9a43-c5d602c59b75", + "name": "List load balancer plans - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/plans", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"name\": \"development\",\n \"server_number\": 2,\n \"per_server_max_sessions\": 100\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4194779b-3241-46d7-9a43-c5d602c59b75", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "71a052f2-b434-4353-b9b7-7262138b5503", + "name": "Get load balancer plan - default", + "request": { + "urlPathTemplate": "/1.3/load-balancer/plans/{plan-name}", + "method": "GET", + "pathParameters": { + "plan-name": { + "equalTo": "example-plan-1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"name\": \"development\",\n \"server_number\": 2,\n \"per_server_max_sessions\": 100\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "71a052f2-b434-4353-b9b7-7262138b5503", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "67bd397d-a2b8-4a9e-9070-87d1b966aa63", + "name": "List firewall rulesets - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"uuid\": \"1200ecde-db95-4d1c-9133-6508f3232567\",\n \"name\": \"example_stateless_firewall_ruleset\",\n \"description\": \"Example stateless firewall ruleset\",\n \"stateful\": false,\n \"version\": 1,\n \"enabled\": true,\n \"default_dns_rules_enabled\": false,\n \"labels\": [\n {\n \"key\": \"example-key\",\n \"value\": \"example-value\"\n }\n ],\n \"server_uuid\": \"03aa7245-2ff9-49c8-9f0e-7ca0270d71a4\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\"\n },\n {\n \"uuid\": \"1200ecde-db95-4d1c-9133-6508f3232445\",\n \"name\": \"example_stateful_firewall_ruleset\",\n \"description\": \"Example stateful firewall ruleset\",\n \"stateful\": true,\n \"version\": 1,\n \"enabled\": true,\n \"default_dns_rules_enabled\": false,\n \"labels\": [\n {\n \"key\": \"example-key\",\n \"value\": \"example-value\"\n }\n ],\n \"server_uuid\": \"01234567-89ab-cdef-0123-456789abcdef\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "67bd397d-a2b8-4a9e-9070-87d1b966aa63", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "091c4d34-2502-4b04-8876-fda6c753743d", + "name": "Create firewall ruleset - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset", + "method": "POST" + }, + "response": { + "status": 201, + "body": "{\n \"uuid\": \"1200ecde-db95-4d1c-9133-6508f3232567\",\n \"name\": \"example_firewall_ruleset\",\n \"description\": \"Example stateless firewall ruleset\",\n \"stateful\": false,\n \"version\": 1,\n \"enabled\": true,\n \"default_dns_rules_enabled\": false,\n \"labels\": [\n {\n \"key\": \"example-key\",\n \"value\": \"example-value\"\n }\n ],\n \"server_uuid\": \"03aa7245-2ff9-49c8-9f0e-7ca0270d71a4\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "091c4d34-2502-4b04-8876-fda6c753743d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "eee7f66c-b701-4690-8b86-eae03451d4ac", + "name": "Get firewall ruleset details - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/{ruleset-uuid}", + "method": "GET", + "pathParameters": { + "ruleset-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"1200ecde-db95-4d1c-9133-6508f3232567\",\n \"name\": \"example_firewall_ruleset\",\n \"description\": \"Example stateless firewall ruleset\",\n \"stateful\": false,\n \"version\": 1,\n \"enabled\": true,\n \"default_dns_rules_enabled\": false,\n \"labels\": [\n {\n \"key\": \"example-key\",\n \"value\": \"example-value\"\n }\n ],\n \"server_uuid\": \"03aa7245-2ff9-49c8-9f0e-7ca0270d71a4\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "eee7f66c-b701-4690-8b86-eae03451d4ac", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "cdeadaa4-8010-4d5c-a127-ff407a67bc1f", + "name": "Delete firewall ruleset - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/{ruleset-uuid}", + "method": "DELETE", + "pathParameters": { + "ruleset-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "cdeadaa4-8010-4d5c-a127-ff407a67bc1f", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "2a835fb5-c0d6-4295-ba00-778d1696caae", + "name": "Modify firewall ruleset - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/{ruleset-uuid}", + "method": "PATCH", + "pathParameters": { + "ruleset-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"1200ecde-db95-4d1c-9133-6508f3232567\",\n \"name\": \"example_firewall_ruleset\",\n \"description\": \"Example stateless firewall ruleset\",\n \"stateful\": false,\n \"version\": 1,\n \"enabled\": true,\n \"default_dns_rules_enabled\": false,\n \"labels\": [\n {\n \"key\": \"example-key\",\n \"value\": \"example-value\"\n }\n ],\n \"server_uuid\": \"03aa7245-2ff9-49c8-9f0e-7ca0270d71a4\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "2a835fb5-c0d6-4295-ba00-778d1696caae", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "bc461053-5729-439b-9780-9d90103a67a2", + "name": "Restore firewall ruleset - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/{ruleset-uuid}/restore/{ruleset-version}", + "method": "PATCH", + "pathParameters": { + "ruleset-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "ruleset-version": { + "equalTo": "1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"1200ecde-db95-4d1c-9133-6508f3232567\",\n \"name\": \"example_firewall_ruleset\",\n \"description\": \"Example stateless firewall ruleset\",\n \"stateful\": false,\n \"version\": 1,\n \"enabled\": true,\n \"default_dns_rules_enabled\": false,\n \"labels\": [\n {\n \"key\": \"example-key\",\n \"value\": \"example-value\"\n }\n ],\n \"server_uuid\": \"03aa7245-2ff9-49c8-9f0e-7ca0270d71a4\",\n \"created_at\": \"2024-01-15T09:30:00Z\",\n \"updated_at\": \"2024-01-15T09:30:00Z\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "bc461053-5729-439b-9780-9d90103a67a2", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "a3c80fc7-b2b1-4edd-bd89-32da40de4134", + "name": "List firewall ruleset rules - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/{ruleset-uuid}/rule", + "method": "GET", + "pathParameters": { + "ruleset-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"rules\": [\n {\n \"uuid\": \"16e7d7fc-9a90-4f42-83f5-ea0396f1592b\",\n \"enabled\": false,\n \"action\": \"accept\",\n \"comment\": \"comment\",\n \"destination_address_start\": \"destination_address_start\",\n \"destination_address_end\": \"destination_address_end\",\n \"destination_port_start\": 1000000,\n \"destination_port_end\": 1000000,\n \"destination_address_cidr\": \"destination_address_cidr\",\n \"direction\": \"in\",\n \"family\": \"IPv4\",\n \"icmp_type\": 1000000,\n \"position\": 1000000,\n \"protocol\": \"tcp\",\n \"source_address_start\": \"source_address_start\",\n \"source_address_end\": \"source_address_end\",\n \"source_port_start\": 1000000,\n \"source_port_end\": 1000000,\n \"source_address_cidr\": \"source_address_cidr\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "a3c80fc7-b2b1-4edd-bd89-32da40de4134", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "592fdc30-b3ab-4027-aca4-f19931918b88", + "name": "Create firewall ruleset rule - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/{ruleset-uuid}/rule", + "method": "POST", + "pathParameters": { + "ruleset-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"uuid\": \"16e7d7fc-9a90-4f42-83f5-ea0396f1592b\",\n \"enabled\": false,\n \"action\": \"accept\",\n \"comment\": \"comment\",\n \"destination_address_start\": \"destination_address_start\",\n \"destination_address_end\": \"destination_address_end\",\n \"destination_port_start\": 1000000,\n \"destination_port_end\": 1000000,\n \"destination_address_cidr\": \"destination_address_cidr\",\n \"direction\": \"in\",\n \"family\": \"IPv4\",\n \"icmp_type\": 1000000,\n \"position\": 1000000,\n \"protocol\": \"tcp\",\n \"source_address_start\": \"source_address_start\",\n \"source_address_end\": \"source_address_end\",\n \"source_port_start\": 1000000,\n \"source_port_end\": 1000000,\n \"source_address_cidr\": \"source_address_cidr\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "592fdc30-b3ab-4027-aca4-f19931918b88", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "949783e5-982f-4cca-84ad-10b2a77648c4", + "name": "Create multiple firewall ruleset rules - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/{ruleset-uuid}/rule", + "method": "PUT", + "pathParameters": { + "ruleset-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"rules\": [\n {\n \"uuid\": \"16e7d7fc-9a90-4f42-83f5-ea0396f1592b\",\n \"enabled\": false,\n \"action\": \"accept\",\n \"comment\": \"comment\",\n \"destination_address_start\": \"destination_address_start\",\n \"destination_address_end\": \"destination_address_end\",\n \"destination_port_start\": 1000000,\n \"destination_port_end\": 1000000,\n \"destination_address_cidr\": \"destination_address_cidr\",\n \"direction\": \"in\",\n \"family\": \"IPv4\",\n \"icmp_type\": 1000000,\n \"position\": 1000000,\n \"protocol\": \"tcp\",\n \"source_address_start\": \"source_address_start\",\n \"source_address_end\": \"source_address_end\",\n \"source_port_start\": 1000000,\n \"source_port_end\": 1000000,\n \"source_address_cidr\": \"source_address_cidr\"\n }\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "949783e5-982f-4cca-84ad-10b2a77648c4", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "36a11d9b-9c7b-456d-9623-d987a2a78677", + "name": "Get firewall ruleset rule details - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/{ruleset-uuid}/rule/{rule-id}", + "method": "GET", + "pathParameters": { + "ruleset-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "rule-id": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"16e7d7fc-9a90-4f42-83f5-ea0396f1592b\",\n \"enabled\": false,\n \"action\": \"accept\",\n \"comment\": \"comment\",\n \"destination_address_start\": \"destination_address_start\",\n \"destination_address_end\": \"destination_address_end\",\n \"destination_port_start\": 1000000,\n \"destination_port_end\": 1000000,\n \"destination_address_cidr\": \"destination_address_cidr\",\n \"direction\": \"in\",\n \"family\": \"IPv4\",\n \"icmp_type\": 1000000,\n \"position\": 1000000,\n \"protocol\": \"tcp\",\n \"source_address_start\": \"source_address_start\",\n \"source_address_end\": \"source_address_end\",\n \"source_port_start\": 1000000,\n \"source_port_end\": 1000000,\n \"source_address_cidr\": \"source_address_cidr\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "36a11d9b-9c7b-456d-9623-d987a2a78677", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "637b9759-22ce-4098-ae06-3714ac6569fc", + "name": "Delete firewall ruleset rule - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/{ruleset-uuid}/rule/{rule-id}", + "method": "DELETE", + "pathParameters": { + "ruleset-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "rule-id": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "637b9759-22ce-4098-ae06-3714ac6569fc", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4dfa6969-e5b7-4820-ad04-58e73439dd79", + "name": "Modify firewall ruleset rule - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/{ruleset-uuid}/rule/{rule-id}", + "method": "PATCH", + "pathParameters": { + "ruleset-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "rule-id": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"uuid\": \"16e7d7fc-9a90-4f42-83f5-ea0396f1592b\",\n \"enabled\": false,\n \"action\": \"accept\",\n \"comment\": \"comment\",\n \"destination_address_start\": \"destination_address_start\",\n \"destination_address_end\": \"destination_address_end\",\n \"destination_port_start\": 1000000,\n \"destination_port_end\": 1000000,\n \"destination_address_cidr\": \"destination_address_cidr\",\n \"direction\": \"in\",\n \"family\": \"IPv4\",\n \"icmp_type\": 1000000,\n \"position\": 1000000,\n \"protocol\": \"tcp\",\n \"source_address_start\": \"source_address_start\",\n \"source_address_end\": \"source_address_end\",\n \"source_port_start\": 1000000,\n \"source_port_end\": 1000000,\n \"source_address_cidr\": \"source_address_cidr\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4dfa6969-e5b7-4820-ad04-58e73439dd79", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "dbfb8f95-e74c-4d02-93fa-5bc91a03c396", + "name": "List firewall ruleset labels - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/{ruleset-uuid}/labels", + "method": "GET", + "pathParameters": { + "ruleset-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"key\": \"foo\",\n \"value\": \"bar\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "dbfb8f95-e74c-4d02-93fa-5bc91a03c396", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "37b7bc9e-8f95-40a9-911c-02d485f9389d", + "name": "Create firewall ruleset label - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/{ruleset-uuid}/labels", + "method": "POST", + "pathParameters": { + "ruleset-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"key\": \"foo\",\n \"value\": \"bar\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "37b7bc9e-8f95-40a9-911c-02d485f9389d", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "4194b6dc-8c3f-45e4-a5d8-a38d08fc47df", + "name": "List servers attached to a firewall ruleset - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/{ruleset-uuid}/servers", + "method": "GET", + "pathParameters": { + "ruleset-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "[\n {\n \"key\": \"foo\",\n \"value\": \"bar\"\n }\n]", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "4194b6dc-8c3f-45e4-a5d8-a38d08fc47df", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "7a37c156-0a1b-4878-b972-2cacb87a7e37", + "name": "Get firewall ruleset label details - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/{ruleset-uuid}/labels/{label-key}", + "method": "GET", + "pathParameters": { + "ruleset-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "environment" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"key\": \"foo\",\n \"value\": \"bar\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "7a37c156-0a1b-4878-b972-2cacb87a7e37", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "3ae6b6f7-21e4-4493-8905-e4bf6b9c8980", + "name": "Delete firewall ruleset label - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/{ruleset-uuid}/labels/{label-key}", + "method": "DELETE", + "pathParameters": { + "ruleset-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "environment" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "3ae6b6f7-21e4-4493-8905-e4bf6b9c8980", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "f5d56075-567d-48b5-9fe5-b82b6d5e18fb", + "name": "Modify firewall ruleset label - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/{ruleset-uuid}/labels/{label-key}", + "method": "PATCH", + "pathParameters": { + "ruleset-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "label-key": { + "equalTo": "environment" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"key\": \"foo\",\n \"value\": \"bar\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "f5d56075-567d-48b5-9fe5-b82b6d5e18fb", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5bbbe553-457c-4b47-87e8-da2c2289c2bd", + "name": "List server firewall rules - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/server/{server-uuid}/firewall-rule", + "method": "GET", + "pathParameters": { + "server-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"firewall_rules\": {\n \"firewall_rule\": [\n {\n \"direction\": \"in\",\n \"action\": \"accept\",\n \"family\": \"IPv4\",\n \"protocol\": \"tcp\"\n },\n {\n \"direction\": \"out\",\n \"action\": \"drop\",\n \"family\": \"IPv4\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5bbbe553-457c-4b47-87e8-da2c2289c2bd", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "5b373155-9fc1-49e5-97d9-a151399ec1e4", + "name": "Create server firewall rule - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/server/{server-uuid}/firewall-rule", + "method": "POST", + "pathParameters": { + "server-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 201, + "body": "{\n \"firewall_rule\": {\n \"direction\": \"in\",\n \"action\": \"accept\",\n \"position\": 1000000,\n \"family\": \"IPv4\",\n \"protocol\": \"tcp\",\n \"enabled\": \"enabled\",\n \"icmp_type\": 1000000,\n \"destination_port_start\": 1000000,\n \"destination_port_end\": 1000000,\n \"source_port_start\": 1000000,\n \"source_port_end\": 1000000,\n \"destination_address_start\": \"destination_address_start\",\n \"destination_address_end\": \"destination_address_end\",\n \"source_address_start\": \"source_address_start\",\n \"source_address_end\": \"source_address_end\",\n \"comment\": \"comment\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "5b373155-9fc1-49e5-97d9-a151399ec1e4", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "57926009-752c-42e8-b070-3b79414108f1", + "name": "Create multiple server firewall rules - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/server/{server-uuid}/firewall-rule", + "method": "PUT", + "pathParameters": { + "server-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"firewall_rules\": {\n \"firewall_rule\": [\n {\n \"direction\": \"in\",\n \"action\": \"accept\",\n \"family\": \"IPv4\",\n \"protocol\": \"tcp\"\n },\n {\n \"direction\": \"out\",\n \"action\": \"drop\",\n \"family\": \"IPv4\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "57926009-752c-42e8-b070-3b79414108f1", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "803c0366-1959-4bf9-b791-6200aa2cfdd2", + "name": "Get server firewall rule details - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/server/{server-uuid}/firewall-rule/{position}", + "method": "GET", + "pathParameters": { + "server-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "position": { + "equalTo": "1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"firewall_rule\": {\n \"direction\": \"in\",\n \"action\": \"accept\",\n \"position\": 1000000,\n \"family\": \"IPv4\",\n \"protocol\": \"tcp\",\n \"enabled\": \"enabled\",\n \"icmp_type\": 1000000,\n \"destination_port_start\": 1000000,\n \"destination_port_end\": 1000000,\n \"source_port_start\": 1000000,\n \"source_port_end\": 1000000,\n \"destination_address_start\": \"destination_address_start\",\n \"destination_address_end\": \"destination_address_end\",\n \"source_address_start\": \"source_address_start\",\n \"source_address_end\": \"source_address_end\",\n \"comment\": \"comment\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "803c0366-1959-4bf9-b791-6200aa2cfdd2", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "3837f600-6664-40e1-898b-bd762a04d4bf", + "name": "Delete server firewall rule - default", + "request": { + "urlPathTemplate": "/1.3/firewall-ruleset/server/{server-uuid}/firewall-rule/{position}", + "method": "DELETE", + "pathParameters": { + "server-uuid": { + "equalTo": "01234567-89ab-cdef-0123-456789abcdef" + }, + "position": { + "equalTo": "1" + } + } + }, + "response": { + "status": 200, + "body": "\"\"", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "3837f600-6664-40e1-898b-bd762a04d4bf", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, + { + "id": "b204f132-9881-4c37-819c-1c1add7e2efe", + "name": "List VNC keymaps - default", + "request": { + "urlPathTemplate": "/1.3/vnc_keymap", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"keymaps\": {\n \"keymap\": [\n \"fi\",\n \"us\",\n \"de\"\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "b204f132-9881-4c37-819c-1c1add7e2efe", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "d2fa0f8c-4956-4792-8ca5-aaa78138adfe", + "name": "List zones - default", + "request": { + "urlPathTemplate": "/1.3/zone", + "method": "GET" + }, + "response": { + "status": 200, + "body": "{\n \"zones\": {\n \"zone\": [\n {\n \"description\": \"Germany, Frankfurt\",\n \"id\": \"de-fra1\",\n \"public\": \"yes\"\n },\n {\n \"description\": \"Finland, Helsinki\",\n \"id\": \"fi-hel2\",\n \"public\": \"no\"\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "d2fa0f8c-4956-4792-8ca5-aaa78138adfe", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + }, + "postServeActions": [] + }, + { + "id": "cb23728e-8a9e-4ddf-920f-284734679be0", + "name": "List VLANs in a zone - default", + "request": { + "urlPathTemplate": "/1.3/zone/{zone}/vlans", + "method": "GET", + "pathParameters": { + "zone": { + "equalTo": "fi-hel1" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"zone_vlans\": {\n \"vlan\": [\n {\n \"id\": 100,\n \"access\": \"public\",\n \"description\": \"default public vlan\",\n \"default\": 1\n }\n ]\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "cb23728e-8a9e-4ddf-920f-284734679be0", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + } + ], + "meta": { + "total": 487 + } +} \ No newline at end of file diff --git a/generator/README-docs.md b/generator/README-docs.md new file mode 100644 index 00000000..d8d191b6 --- /dev/null +++ b/generator/README-docs.md @@ -0,0 +1,37 @@ +# PHP SDK documentation + +Fern's `fern/sdk/reference.md` targets GitHub's Markdown renderer. GitHub Pages +uses Jekyll and Kramdown, which need explicit parsing boundaries around nested +HTML. Do not enable `parse_block_html` globally: it also parses inline summaries +as blocks and can expose closing tags as text. + +`python3 generator/scripts/prepare_docs.py` prepares all existing snapshots and +rebuilds the landing page. It preserves fenced PHP examples, removes Fern's +presentation-only definition-list wrappers, keeps summaries as HTML, and enables +Markdown only inside each method disclosure. Service headings have explicit IDs +shared by the landing page and sidebar. Running it again produces no changes. +The original Fern reference remains untouched. + +For a new release, the docs-update workflow runs: + +```sh +python3 generator/scripts/prepare_docs.py --version v0.0.65 +``` + +This copies the current Fern reference to `latest` and the supplied version, +then prepares every snapshot. Without `--version`, existing snapshots retain +their original API content. + +To validate the same renderer used by GitHub Pages: + +```sh +cd docs +bundle install +bundle exec jekyll build --destination ../_site +cd .. +python3 generator/tests/check_docs_site.py _site +``` + +The documentation validation workflow checks rendered links, service IDs, and +method disclosures. The custom layout and stylesheet are in `docs/_layouts/` +and `docs/assets/`; publishing continues to use the repository's Pages setup. diff --git a/generator/config/placeholder.txt b/generator/config/placeholder.txt new file mode 100644 index 00000000..b3a42524 --- /dev/null +++ b/generator/config/placeholder.txt @@ -0,0 +1 @@ +placeholder \ No newline at end of file diff --git a/generator/openapi/placeholder.txt b/generator/openapi/placeholder.txt new file mode 100644 index 00000000..b3a42524 --- /dev/null +++ b/generator/openapi/placeholder.txt @@ -0,0 +1 @@ +placeholder \ No newline at end of file diff --git a/generator/openapi/spec.json b/generator/openapi/spec.json new file mode 100644 index 00000000..2c77a3d3 --- /dev/null +++ b/generator/openapi/spec.json @@ -0,0 +1,76147 @@ +{ + "openapi": "3.1.1", + "info": { + "summary": "Manage your UpCloud account and resources.", + "title": "UpCloud API", + "description": "UpCloud is a leading European cloud service provider with a global cloud platform spanning four continents. UpCloud offers Cloud Servers, Managed Kubernetes, Managed Databases, Object Storage and more. This API can be used to manage your UpCloud account and resources programmatically.\n\n> **Note:** This document is a work-in-progress preview, provided for early access and feedback. It is subject to change without notice, including backwards incompatible changes, for example for tooling such as code generators.", + "termsOfService": "https://upcloud.com/terms-of-service/", + "contact": { + "name": "UpCloud", + "url": "https://upcloud.com", + "email": "hello@upcloud.com" + }, + "license": { + "name": "MIT", + "url": "https://spdx.org/licenses/MIT.html" + }, + "version": "0.0.105" + }, + "servers": [ + { + "url": "https://api.upcloud.com" + } + ], + "paths": { + "/1.3/account": { + "get": { + "tags": [ + "account" + ], + "summary": "Account details", + "description": "Returns account details for the authenticated user", + "operationId": "accountDetails", + "responses": { + "200": { + "$ref": "#/components/responses/accountDetails200" + }, + "default": { + "$ref": "#/components/responses/accountDetailsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/account/billing/summary/{year}-{month}": { + "get": { + "tags": [ + "account" + ], + "summary": "Get monthly billing summary with resource details", + "description": "Returns a billing summary grouped by resource, including billing detail changes during the specified month. The API user must have permission to read billing details.", + "operationId": "getMonthlyDetailedBillingSummary", + "parameters": [ + { + "$ref": "#/components/parameters/accountGetMonthlyDetailedBillingSummaryYear" + }, + { + "$ref": "#/components/parameters/accountGetMonthlyDetailedBillingSummaryMonth" + }, + { + "$ref": "#/components/parameters/accountGetMonthlyDetailedBillingSummaryUsername" + }, + { + "$ref": "#/components/parameters/accountGetMonthlyDetailedBillingSummaryResourceId" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/accountGetMonthlyDetailedBillingSummary200" + }, + "default": { + "$ref": "#/components/responses/accountGetMonthlyDetailedBillingSummaryDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/account/billing_summary/{year}-{month}": { + "get": { + "tags": [ + "account" + ], + "summary": "Get monthly billing summary", + "description": "Returns a billing summary for the specified month. The API user must have permission to read billing details. This endpoint is deprecated; use the monthly billing summary with resource details instead.", + "operationId": "getMonthlyBillingSummary", + "parameters": [ + { + "$ref": "#/components/parameters/accountGetMonthlyBillingSummaryYear" + }, + { + "$ref": "#/components/parameters/accountGetMonthlyBillingSummaryMonth" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/accountGetMonthlyBillingSummary200" + }, + "default": { + "$ref": "#/components/responses/accountGetMonthlyBillingSummaryDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/account/current_network_usage": { + "get": { + "tags": [ + "account" + ], + "summary": "Get current network usage", + "description": "Returns the latest Network Transfer Pool usage report for the account.", + "operationId": "getCurrentNetworkUsage", + "responses": { + "200": { + "$ref": "#/components/responses/accountGetCurrentNetworkUsage200" + }, + "default": { + "$ref": "#/components/responses/accountGetCurrentNetworkUsageDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/account/list": { + "get": { + "tags": [ + "account" + ], + "summary": "List accounts", + "description": "Returns the main account and its subaccounts. Account listing is available only to the main account.", + "operationId": "listAccounts", + "parameters": [ + { + "$ref": "#/components/parameters/listAccountsLabel" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listAccounts200" + }, + "default": { + "$ref": "#/components/responses/listAccountsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/account/ms_lma": { + "post": { + "tags": [ + "account" + ], + "summary": "Create Microsoft LMA signing link", + "description": "Create a new Microsoft LMA signing link", + "operationId": "createMSLMASigningLink", + "responses": { + "201": { + "$ref": "#/components/responses/accountCreateMSLMASigningLink201" + }, + "default": { + "$ref": "#/components/responses/accountCreateMSLMASigningLinkDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/account/network_top_usage": { + "get": { + "tags": [ + "account" + ], + "summary": "Get top network usage", + "description": "Returns the resources with the highest network usage.", + "operationId": "getAccountNetworkTopUsage", + "parameters": [ + { + "$ref": "#/components/parameters/getAccountNetworkTopUsageFrom" + }, + { + "$ref": "#/components/parameters/getAccountNetworkTopUsageTo" + }, + { + "$ref": "#/components/parameters/getAccountNetworkTopUsageService" + }, + { + "$ref": "#/components/parameters/getAccountNetworkTopUsageZone" + }, + { + "$ref": "#/components/parameters/getAccountNetworkTopUsageAccumulate" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getAccountNetworkTopUsage200" + }, + "default": { + "$ref": "#/components/responses/getAccountNetworkTopUsageDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/account/network_usage": { + "get": { + "tags": [ + "account" + ], + "summary": "Get network transfer statistics", + "description": "Returns network transfer statistics. JSON responses support a maximum time window of 31 days; CSV responses have no time-window limit. Select the output format with the Accept header using application/json or text/csv.", + "operationId": "getAccountNetworkUsage", + "parameters": [ + { + "$ref": "#/components/parameters/getAccountNetworkUsageFrom" + }, + { + "$ref": "#/components/parameters/getAccountNetworkUsageTo" + }, + { + "$ref": "#/components/parameters/getAccountNetworkUsageAccumulate" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getAccountNetworkUsage200" + }, + "default": { + "$ref": "#/components/responses/getAccountNetworkUsageDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/account/resource-usage": { + "get": { + "tags": [ + "account" + ], + "summary": "Get resource usage", + "description": "Returns current resource usage counts for the account.", + "operationId": "getAccountResourceUsage", + "responses": { + "200": { + "$ref": "#/components/responses/getAccountResourceUsage200" + }, + "default": { + "$ref": "#/components/responses/getAccountResourceUsageDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/account/resource_billing_summary/{resource_id}/{year}-{month}": { + "get": { + "tags": [ + "account" + ], + "summary": "Get monthly resource billing summary", + "description": "Returns a billing summary for one resource during the specified month. The API user must have permission to read billing details.", + "operationId": "getMonthlyResourceBillingSummary", + "parameters": [ + { + "$ref": "#/components/parameters/accountGetMonthlyResourceBillingSummaryResourceId" + }, + { + "$ref": "#/components/parameters/accountGetMonthlyResourceBillingSummaryYear" + }, + { + "$ref": "#/components/parameters/accountGetMonthlyResourceBillingSummaryMonth" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/accountGetMonthlyResourceBillingSummary200" + }, + "default": { + "$ref": "#/components/responses/accountGetMonthlyResourceBillingSummaryDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/account/resource_network_usage": { + "get": { + "tags": [ + "account" + ], + "summary": "Get resource transfer statistics", + "description": "Returns network transfer statistics grouped by resource, service, and zone. JSON responses support a maximum time window of 31 days; CSV responses have no time-window limit. Select the output format with the Accept header using application/json or text/csv.", + "operationId": "getAccountResourceNetworkUsage", + "parameters": [ + { + "$ref": "#/components/parameters/getAccountResourceNetworkUsageFrom" + }, + { + "$ref": "#/components/parameters/getAccountResourceNetworkUsageTo" + }, + { + "$ref": "#/components/parameters/getAccountResourceNetworkUsageService" + }, + { + "$ref": "#/components/parameters/getAccountResourceNetworkUsageResourceId" + }, + { + "$ref": "#/components/parameters/getAccountResourceNetworkUsageZone" + }, + { + "$ref": "#/components/parameters/getAccountResourceNetworkUsageAccumulate" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getAccountResourceNetworkUsage200" + }, + "default": { + "$ref": "#/components/responses/getAccountResourceNetworkUsageDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/account/sub": { + "post": { + "tags": [ + "account" + ], + "summary": "Create subaccount", + "description": "Creates a subaccount for the authenticated main account.", + "operationId": "createSubaccount", + "requestBody": { + "$ref": "#/components/requestBodies/createSubaccount" + }, + "responses": { + "204": { + "$ref": "#/components/responses/createSubaccount204" + }, + "default": { + "$ref": "#/components/responses/createSubaccountDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/account/sub/{username}": { + "delete": { + "tags": [ + "account" + ], + "summary": "Delete subaccount", + "description": "Deletes a subaccount from the authenticated main account.", + "operationId": "deleteSubaccount", + "parameters": [ + { + "$ref": "#/components/parameters/deleteSubaccountUsername" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteSubaccount204" + }, + "default": { + "$ref": "#/components/responses/deleteSubaccountDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/kubernetes": { + "get": { + "tags": [ + "kubernetes" + ], + "summary": "List clusters", + "description": "Returns a list of Kubernetes clusters.", + "operationId": "listKubernetesClusters", + "responses": { + "200": { + "$ref": "#/components/responses/kubernetesGetClusters" + }, + "400": { + "$ref": "#/components/responses/kubernetesBadRequest" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "post": { + "tags": [ + "kubernetes" + ], + "summary": "Create cluster", + "description": "Creates a new Kubernetes cluster.", + "operationId": "createKubernetesCluster", + "requestBody": { + "$ref": "#/components/requestBodies/kubernetesPostCluster" + }, + "responses": { + "201": { + "$ref": "#/components/responses/kubernetesPostCluster" + }, + "400": { + "$ref": "#/components/responses/kubernetesBadRequest" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "422": { + "$ref": "#/components/responses/kubernetesUnProcessableEntity" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + } + }, + "/1.3/kubernetes/{uuid}": { + "get": { + "tags": [ + "kubernetes" + ], + "summary": "Get cluster details", + "description": "Returns Kubernetes cluster details by given `uuid`.", + "operationId": "getKubernetesCluster", + "responses": { + "200": { + "$ref": "#/components/responses/kubernetesGetCluster" + }, + "400": { + "$ref": "#/components/responses/kubernetesBadRequest" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "delete": { + "tags": [ + "kubernetes" + ], + "summary": "Delete cluster", + "description": "Deletes an existing Kubernetes cluster by given `uuid`.", + "operationId": "deleteKubernetesCluster", + "responses": { + "202": { + "$ref": "#/components/responses/kubernetesDeleteCluster" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "patch": { + "tags": [ + "kubernetes" + ], + "summary": "Modify cluster", + "description": "Modifies an existing Kubernetes cluster by given `{uuid}`.", + "operationId": "modifyKubernetesCluster", + "requestBody": { + "$ref": "#/components/requestBodies/kubernetesPatchCluster" + }, + "responses": { + "200": { + "$ref": "#/components/responses/kubernetesPatchCluster" + }, + "400": { + "$ref": "#/components/responses/kubernetesBadRequest" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/kubernetesUuid" + } + ] + }, + "/1.3/kubernetes/{uuid}/kubeconfig": { + "get": { + "tags": [ + "kubernetes" + ], + "summary": "Get kubeconfig", + "description": "Returns kubeconfig for Kubernetes cluster by given `{uuid}`.", + "operationId": "getKubernetesClusterKubeconfig", + "responses": { + "200": { + "$ref": "#/components/responses/kubernetesGetClusterKubeconfig" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/kubernetesUuid" + } + ] + }, + "/1.3/kubernetes/{uuid}/available-upgrades": { + "get": { + "tags": [ + "kubernetes" + ], + "summary": "Get available upgrades", + "description": "Returns a list of available versions that can be used to upgrade the cluster.", + "operationId": "getKubernetesClusterAvailableUpgrades", + "responses": { + "200": { + "$ref": "#/components/responses/kubernetesGetAvailableUpgrades" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "post": { + "tags": [ + "kubernetes" + ], + "summary": "Upgrade cluster", + "description": "Upgrades an existing Kubernetes cluster to specific version.", + "operationId": "upgradeKubernetesCluster", + "requestBody": { + "$ref": "#/components/requestBodies/kubernetesPostUpgrade" + }, + "responses": { + "201": { + "$ref": "#/components/responses/kubernetesPostUpgrade" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "422": { + "$ref": "#/components/responses/kubernetesUnProcessableEntity" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/kubernetesUuid" + } + ] + }, + "/1.3/kubernetes/{uuid}/node-groups": { + "get": { + "tags": [ + "kubernetes" + ], + "summary": "List node groups", + "description": "Returns a list of available node groups of an existing Kubernetes cluster. Cluster is identified by given `{uuid}`.\n\nA node group is a uniform set of worker nodes attached to a cluster.\n", + "operationId": "listKubernetesClusterNodeGroups", + "responses": { + "200": { + "$ref": "#/components/responses/kubernetesGetNodeGroups" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "post": { + "tags": [ + "kubernetes" + ], + "summary": "Create node group", + "description": "Creates a new node group to an existing Kubernetes cluster. Cluster is identified by given `{uuid}`.", + "operationId": "createKubernetesClusterNodeGroup", + "requestBody": { + "$ref": "#/components/requestBodies/kubernetesPostNodeGroup" + }, + "responses": { + "201": { + "$ref": "#/components/responses/kubernetesPostNodeGroup" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "422": { + "$ref": "#/components/responses/kubernetesUnProcessableEntity" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/kubernetesUuid" + } + ] + }, + "/1.3/kubernetes/{uuid}/node-groups/{name}": { + "get": { + "tags": [ + "kubernetes" + ], + "summary": "Get node group details", + "description": "Returns node group details by given `{node_group_name}`. Cluster is identified by given `{uuid}`.", + "operationId": "getKubernetesClusterNodeGroup", + "responses": { + "200": { + "$ref": "#/components/responses/kubernetesGetNodeGroupDetails" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "delete": { + "tags": [ + "kubernetes" + ], + "summary": "Delete node group", + "description": "Deletes an existing node group by given Kubernetes cluster `{uuid}` and `{node_group_name}`.", + "operationId": "deleteKubernetesClusterNodeGroup", + "responses": { + "202": { + "$ref": "#/components/responses/kubernetesDeleteNodeGroup" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "patch": { + "tags": [ + "kubernetes" + ], + "summary": "Modify node group", + "description": "Modifies an existing node group of a cluster. Cluster is identified by given `{uuid}` and node group by `{node_group_name}`.", + "operationId": "modifyKubernetesClusterNodeGroup", + "requestBody": { + "$ref": "#/components/requestBodies/kubernetesPatchNodeGroup" + }, + "responses": { + "200": { + "$ref": "#/components/responses/kubernetesPatchNodeGroup" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "422": { + "$ref": "#/components/responses/kubernetesUnProcessableEntity" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/kubernetesUuid" + }, + { + "$ref": "#/components/parameters/kubernetesName" + } + ] + }, + "/1.3/kubernetes/{uuid}/node-groups/{name}/{node-name}": { + "delete": { + "tags": [ + "kubernetes" + ], + "summary": "Delete node group node", + "description": "Deletes a node group node from a cluster (experimental). Cluster is identified by given `{uuid}`, node group by `{name}`, and node by `{node-name}`.", + "operationId": "deleteKubernetesClusterNodeGroupNode", + "responses": { + "202": { + "$ref": "#/components/responses/kubernetesDeleteNodeGroupNode" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/kubernetesUuid" + }, + { + "$ref": "#/components/parameters/kubernetesName" + }, + { + "$ref": "#/components/parameters/kubernetesNodeName" + } + ] + }, + "/1.3/kubernetes/plans": { + "get": { + "tags": [ + "kubernetes" + ], + "summary": "List plans", + "description": "Returns a list of available Kubernetes cluster plans.", + "operationId": "listKubernetesPlans", + "responses": { + "200": { + "$ref": "#/components/responses/kubernetesGetPlan" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + } + }, + "/1.3/kubernetes/versions": { + "get": { + "tags": [ + "kubernetes" + ], + "summary": "List versions", + "description": "Returns a list of available Kubernetes cluster versions.", + "operationId": "listKubernetesVersions", + "responses": { + "200": { + "$ref": "#/components/responses/kubernetesGetVersion" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + } + }, + "/1.3/kubernetes/{uuid}/authentication": { + "get": { + "tags": [ + "kubernetes" + ], + "summary": "List cluster authentication entries", + "description": "Returns all OIDC authentication issuer configurations for a cluster.", + "operationId": "listClusterAuthentication", + "parameters": [ + { + "$ref": "#/components/parameters/kubernetesUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/kubernetesListClusterAuthentication200" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "put": { + "tags": [ + "kubernetes" + ], + "summary": "Replace the full cluster authentication configuration", + "description": "Replaces the entire set of OIDC authentication issuer configurations for a cluster with the supplied JSON list of issuers. The full set is validated before being applied. An empty list clears all issuers.\n", + "operationId": "setClusterAuthentication", + "parameters": [ + { + "$ref": "#/components/parameters/kubernetesUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/kubernetesSetClusterAuthentication" + }, + "responses": { + "200": { + "$ref": "#/components/responses/kubernetesSetClusterAuthentication200" + }, + "400": { + "$ref": "#/components/responses/kubernetesBadRequest" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "post": { + "tags": [ + "kubernetes" + ], + "summary": "Create a cluster authentication entry", + "description": "Creates a new OIDC authentication issuer configuration. The new entry is validated together with the cluster's existing entries before being applied. Fails if an entry with the same name already exists.\n", + "operationId": "createClusterAuthentication", + "parameters": [ + { + "$ref": "#/components/parameters/kubernetesUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/kubernetesCreateClusterAuthentication" + }, + "responses": { + "201": { + "$ref": "#/components/responses/kubernetesCreateClusterAuthentication201" + }, + "400": { + "$ref": "#/components/responses/kubernetesBadRequest" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "409": { + "$ref": "#/components/responses/kubernetesConflict" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + } + }, + "/1.3/kubernetes/{uuid}/authentication/import": { + "put": { + "tags": [ + "kubernetes" + ], + "summary": "Import a full cluster authentication configuration", + "description": "Replaces the entire set of OIDC authentication issuer configurations for a cluster with the supplied native kube-apiserver v1 AuthenticationConfiguration YAML document. Issuers are named deterministically from their issuer URL host. The top-level `anonymous` field is not supported and any configuration that would drop data is rejected.\n", + "operationId": "importClusterAuthentication", + "parameters": [ + { + "$ref": "#/components/parameters/kubernetesUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/kubernetesImportClusterAuthentication" + }, + "responses": { + "200": { + "$ref": "#/components/responses/kubernetesImportClusterAuthentication200" + }, + "400": { + "$ref": "#/components/responses/kubernetesBadRequest" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + } + }, + "/1.3/kubernetes/{uuid}/authentication/{name}": { + "get": { + "tags": [ + "kubernetes" + ], + "summary": "Get a cluster authentication entry", + "operationId": "getClusterAuthentication", + "parameters": [ + { + "$ref": "#/components/parameters/kubernetesUuid" + }, + { + "$ref": "#/components/parameters/kubernetesName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/kubernetesGetClusterAuthentication200" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "put": { + "tags": [ + "kubernetes" + ], + "summary": "Update a cluster authentication entry", + "description": "Updates an existing OIDC authentication issuer configuration. The name in the path is authoritative. The updated entry is validated together with the cluster's other entries before being applied.\n", + "operationId": "updateClusterAuthentication", + "parameters": [ + { + "$ref": "#/components/parameters/kubernetesUuid" + }, + { + "$ref": "#/components/parameters/kubernetesName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/kubernetesUpdateClusterAuthentication" + }, + "responses": { + "200": { + "$ref": "#/components/responses/kubernetesUpdateClusterAuthentication200" + }, + "400": { + "$ref": "#/components/responses/kubernetesBadRequest" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + }, + "delete": { + "tags": [ + "kubernetes" + ], + "summary": "Delete a cluster authentication entry", + "description": "Removes an OIDC authentication issuer configuration by name.", + "operationId": "deleteClusterAuthentication", + "parameters": [ + { + "$ref": "#/components/parameters/kubernetesUuid" + }, + { + "$ref": "#/components/parameters/kubernetesName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/kubernetesDeleteClusterAuthentication204" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + } + }, + "/1.3/kubernetes/{uuid}/authentication/{name}/kubeconfig": { + "get": { + "tags": [ + "kubernetes" + ], + "summary": "Get OIDC kubeconfig", + "description": "Returns a kubeconfig for the cluster whose user authenticates via the kubelogin (`kubectl oidc-login`) exec credential plugin, using the cluster's configured OIDC issuer identified by the `name` path parameter. The plugin (kubelogin) must be installed on the client. No long-lived credential is embedded. The OIDC client secret and any provider-specific kubelogin flags are not injected by the server; the returned kubeconfig includes comments describing how to add them.\n", + "operationId": "getKubernetesClusterOIDCKubeconfig", + "parameters": [ + { + "$ref": "#/components/parameters/kubernetesUuid" + }, + { + "$ref": "#/components/parameters/kubernetesName" + }, + { + "$ref": "#/components/parameters/getKubernetesClusterOIDCKubeconfigAudience" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/kubernetesGetClusterKubeconfig" + }, + "400": { + "$ref": "#/components/responses/kubernetesBadRequest" + }, + "401": { + "$ref": "#/components/responses/kubernetesUnAuthorized" + }, + "404": { + "$ref": "#/components/responses/kubernetesNotFound" + }, + "default": { + "$ref": "#/components/responses/kubernetesInternalServerError" + } + } + } + }, + "/1.3/currency": { + "get": { + "tags": [ + "currency" + ], + "summary": "List currencies", + "description": "Retrieves a list of supported currencies and their exchange rates relative to the account credit currency.", + "operationId": "listCurrencies", + "responses": { + "200": { + "$ref": "#/components/responses/currencyListCurrencies200" + }, + "default": { + "$ref": "#/components/responses/currencyListCurrenciesDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/device/availability": { + "get": { + "tags": [ + "device" + ], + "summary": "Get available passthrough devices", + "description": "Returns a list of available passthrough devices.", + "operationId": "getAvailablePassthroughDevices", + "parameters": [ + { + "$ref": "#/components/parameters/getAvailablePassthroughDevicesZone" + }, + { + "$ref": "#/components/parameters/getAvailablePassthroughDevicesType" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getAvailablePassthroughDevices200" + }, + "default": { + "$ref": "#/components/responses/getAvailablePassthroughDevicesDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/events/{server_uuid}/{offset},{count}": { + "get": { + "tags": [ + "events" + ], + "summary": "List events", + "description": "Retrieves a list of events.", + "operationId": "listEvents", + "parameters": [ + { + "$ref": "#/components/parameters/listEventsServerUuid" + }, + { + "$ref": "#/components/parameters/listEventsOffset" + }, + { + "$ref": "#/components/parameters/listEventsCount" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listEvents200" + }, + "default": { + "$ref": "#/components/responses/listEventsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/ip_address": { + "get": { + "tags": [ + "ip_address" + ], + "summary": "List IP addresses", + "description": "Retrieves a list of IP addresses.", + "operationId": "listIPAddresses", + "responses": { + "200": { + "$ref": "#/components/responses/listIPAddresses200" + }, + "default": { + "$ref": "#/components/responses/listIPAddressesDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "ip_address" + ], + "summary": "Add an IP address", + "description": "Adds a new IP address.", + "operationId": "addIPAddress", + "requestBody": { + "$ref": "#/components/requestBodies/addIPAddress" + }, + "responses": { + "201": { + "$ref": "#/components/responses/addIPAddress201" + }, + "409": { + "$ref": "#/components/responses/addIPAddress409" + }, + "default": { + "$ref": "#/components/responses/addIPAddressDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/ip_address/bulk": { + "patch": { + "tags": [ + "ip_address" + ], + "summary": "Bulk modify IP addresses", + "description": "Modifies attributes of multiple IP addresses in a single request.", + "operationId": "bulkModifyIPAddresses", + "requestBody": { + "$ref": "#/components/requestBodies/bulkModifyIPAddresses" + }, + "responses": { + "204": { + "$ref": "#/components/responses/bulkModifyIPAddresses204" + }, + "default": { + "$ref": "#/components/responses/bulkModifyIPAddressesDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/ip_address/{address}": { + "get": { + "tags": [ + "ip_address" + ], + "summary": "Get IP address", + "description": "Retrieves details of a specific IP address.", + "operationId": "getIPAddressDetails", + "parameters": [ + { + "$ref": "#/components/parameters/getIPAddressDetailsAddress" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getIPAddressDetails200" + }, + "default": { + "$ref": "#/components/responses/getIPAddressDetailsDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "put": { + "tags": [ + "ip_address" + ], + "summary": "Modify IP address", + "description": "Modifies attributes of a specific IP address.", + "operationId": "modifyIPAddress", + "parameters": [ + { + "$ref": "#/components/parameters/modifyIPAddressAddress" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyIPAddress" + }, + "responses": { + "202": { + "$ref": "#/components/responses/modifyIPAddress202" + }, + "default": { + "$ref": "#/components/responses/modifyIPAddressDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "ip_address" + ], + "summary": "Delete IP address", + "description": "Deletes a specific IP address.", + "operationId": "deleteIPAddress", + "parameters": [ + { + "$ref": "#/components/parameters/deleteIPAddressAddress" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteIPAddress204" + }, + "default": { + "$ref": "#/components/responses/deleteIPAddressDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "ip_address" + ], + "summary": "Modify an IP address", + "description": "Modifies attributes of a specific IP address.", + "operationId": "patchModifyIPAddress", + "parameters": [ + { + "$ref": "#/components/parameters/patchModifyIPAddressAddress" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/patchModifyIPAddress" + }, + "responses": { + "202": { + "$ref": "#/components/responses/patchModifyIPAddress202" + }, + "default": { + "$ref": "#/components/responses/patchModifyIPAddressDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/network-peering": { + "get": { + "tags": [ + "network-peering" + ], + "summary": "List peerings", + "description": "Get a list of all peerings within the current account. Only peerings that refer to a network that the current\naccount has access are returned.\n\nIt is also possible to filter network peering with label URL parameters, e.g.\n`?label=env` or `?label=env%3Dprod`. The URL parameter can be given multiple\ntimes to add more filters (e.g. `?label=env%3Dprod&label=v2`), where\nonly network peering that match all labels are returned.\nLabel keys are matched case insensitively.\n", + "operationId": "listNetworkPeerings", + "parameters": [ + { + "$ref": "#/components/parameters/listNetworkPeeringsUuid" + }, + { + "$ref": "#/components/parameters/listNetworkPeeringsNetworkUuidLocal" + }, + { + "$ref": "#/components/parameters/listNetworkPeeringsNetworkUuidPeer" + }, + { + "$ref": "#/components/parameters/listNetworkPeeringsLabel" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listNetworkPeerings200" + }, + "default": { + "$ref": "#/components/responses/listNetworkPeeringsDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "network-peering" + ], + "summary": "Create peering", + "description": "Network peerings are used to enable traffic between two networks that can be on different main accounts.\nThe peering must be established both ways before it's considered as active. Peering is only supported between networks\nof type `private`.\n\n**Note**: you should only create peering between accounts and networks you trust. There is no limits on what traffic\ncan flow. The server firewall **has no effect** for `private` type networks.\n\nIt is required that both networks have a *Router* attached to the network.\n", + "operationId": "createNetworkPeering", + "requestBody": { + "$ref": "#/components/requestBodies/createNetworkPeering" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createNetworkPeering201" + }, + "400": { + "$ref": "#/components/responses/createNetworkPeering400" + }, + "404": { + "$ref": "#/components/responses/createNetworkPeering404" + }, + "409": { + "$ref": "#/components/responses/createNetworkPeering409" + }, + "default": { + "$ref": "#/components/responses/createNetworkPeeringDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/network-peering/{peering_uuid}": { + "get": { + "tags": [ + "network-peering" + ], + "summary": "Get peering", + "description": "Returns the state of an existing network peering.\n\nNote that the `peer_network` field only contains the network details if the peering has been defined by both accounts.\n", + "operationId": "getNetworkPeering", + "parameters": [ + { + "$ref": "#/components/parameters/getNetworkPeeringPeeringUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getNetworkPeering200" + }, + "404": { + "$ref": "#/components/responses/getNetworkPeering404" + }, + "default": { + "$ref": "#/components/responses/getNetworkPeeringDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "network-peering" + ], + "summary": "Delete peering", + "description": "Deletes a network peering. It is required that the peering is in `disabled` state before delete is possible.\n", + "operationId": "deleteNetworkPeering", + "parameters": [ + { + "$ref": "#/components/parameters/deleteNetworkPeeringPeeringUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteNetworkPeering204" + }, + "404": { + "$ref": "#/components/responses/deleteNetworkPeering404" + }, + "default": { + "$ref": "#/components/responses/deleteNetworkPeeringDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "network-peering" + ], + "summary": "Modify peering", + "description": "Modifies attributes of an existing network peering.", + "operationId": "modifyNetworkPeering", + "parameters": [ + { + "$ref": "#/components/parameters/modifyNetworkPeeringPeeringUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyNetworkPeering" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyNetworkPeering200" + }, + "400": { + "$ref": "#/components/responses/modifyNetworkPeering400" + }, + "404": { + "$ref": "#/components/responses/modifyNetworkPeering404" + }, + "default": { + "$ref": "#/components/responses/modifyNetworkPeeringDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/network": { + "get": { + "tags": [ + "network" + ], + "summary": "List networks", + "description": "Get a list of all networks.\n\nIt is also possible to filter networks with label URL parameters, e.g.\n`?label=env` or `?label=env%3Dprod`. URL parameter can be given multiple\ntimes to add more filters (e.g. `?label=env%3Dprod&label=v2`), where\nonly networks that match all labels are returned.\nLabel keys are matched case insensitively.\n", + "operationId": "listNetworks", + "parameters": [ + { + "$ref": "#/components/parameters/listNetworksLabel" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listNetworks200" + }, + "default": { + "$ref": "#/components/responses/listNetworksDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "network" + ], + "summary": "Create SDN network", + "description": "Creates a new SDN private network that cloud servers from the same zone can be attached to.", + "operationId": "createNetwork", + "requestBody": { + "$ref": "#/components/requestBodies/createNetwork" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createNetwork201" + }, + "default": { + "$ref": "#/components/responses/createNetworkDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/network/interface": { + "get": { + "tags": [ + "network" + ], + "summary": "List interfaces", + "description": "Retrieves a list of network interfaces.", + "operationId": "listNetworkInterfaces", + "responses": { + "200": { + "$ref": "#/components/responses/listNetworkInterfaces200" + }, + "default": { + "$ref": "#/components/responses/listNetworkInterfacesDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "network" + ], + "summary": "Create interface", + "description": "Creates a new network interface.", + "operationId": "createNetworkInterface", + "requestBody": { + "$ref": "#/components/requestBodies/createNetworkInterface" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createNetworkInterface201" + }, + "default": { + "$ref": "#/components/responses/createNetworkInterfaceDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/network/interface/{uuid}": { + "get": { + "tags": [ + "network" + ], + "summary": "Get interface", + "description": "Retrieves details of a specific network interface.", + "operationId": "getNetworkInterfaceDetails", + "parameters": [ + { + "$ref": "#/components/parameters/getNetworkInterfaceDetailsUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getNetworkInterfaceDetails200" + }, + "default": { + "$ref": "#/components/responses/getNetworkInterfaceDetailsDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "network" + ], + "summary": "Delete interface", + "description": "Deletes a specific network interface.", + "operationId": "deleteNetworkInterface", + "parameters": [ + { + "$ref": "#/components/parameters/deleteNetworkInterfaceUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteNetworkInterface204" + }, + "default": { + "$ref": "#/components/responses/deleteNetworkInterfaceDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/network/{uuid}": { + "get": { + "tags": [ + "network" + ], + "summary": "Get network", + "description": "Retrieves details of a specific network.", + "operationId": "getNetworkDetails", + "parameters": [ + { + "$ref": "#/components/parameters/getNetworkDetailsUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getNetworkDetails200" + }, + "default": { + "$ref": "#/components/responses/getNetworkDetailsDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "put": { + "tags": [ + "network" + ], + "summary": "Modify network", + "description": "Modifies the details of a specific SDN private network. The Utility and public networks cannot be modified.\n", + "operationId": "modifyNetwork", + "parameters": [ + { + "$ref": "#/components/parameters/modifyNetworkUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyNetwork" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyNetwork200" + }, + "default": { + "$ref": "#/components/responses/modifyNetworkDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "network" + ], + "summary": "Delete network", + "description": "Deletes an SDN private network. All attached cloud servers must first be detached before SDN private networks can be deleted. Utility and public networks can only be detached from servers by [Releasing the corresponding IP addresses](https://upcloudltd.github.io/upcloud-openapi-spec/api/ip-address#delete-ip-address).\n", + "operationId": "deleteNetwork", + "parameters": [ + { + "$ref": "#/components/parameters/deleteNetworkUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteNetwork204" + }, + "default": { + "$ref": "#/components/responses/deleteNetworkDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/audit-logs": { + "get": { + "tags": [ + "audit-logs" + ], + "summary": "List audit logs", + "description": "Returns a list of audit log rows according to the query parameters. Note that this endpoint is paginated by default and the list is limited in results.\n\nPagination\nUpcloud-Total-Count header is included in the response to indicate the total number of audit logs available with the current query parameters (excluding limit and offset). The total count can be used for a number of pagination strategies. limit and offset query parameters can be used to finally paginate the results.", + "operationId": "listAuditLogs", + "parameters": [ + { + "$ref": "#/components/parameters/listAuditLogsQ" + }, + { + "$ref": "#/components/parameters/listAuditLogsLimit" + }, + { + "$ref": "#/components/parameters/listAuditLogsOffset" + }, + { + "$ref": "#/components/parameters/listAuditLogsActions" + }, + { + "$ref": "#/components/parameters/listAuditLogsOrigins" + }, + { + "$ref": "#/components/parameters/listAuditLogsResourceTypes" + }, + { + "$ref": "#/components/parameters/listAuditLogsCreatedAfter" + }, + { + "$ref": "#/components/parameters/listAuditLogsCreatedBefore" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listAuditLogs200" + }, + "default": { + "$ref": "#/components/responses/listAuditLogsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/audit-logs/export": { + "get": { + "tags": [ + "audit-logs" + ], + "summary": "Export audit logs", + "description": "Export all audit logs for the authenticated account as CSV or JSON (up to 180 day limit). Note: Use the format parameter to specify output format; only JSON schema is documented here.", + "operationId": "exportAuditLogs", + "parameters": [ + { + "$ref": "#/components/parameters/exportAuditLogsFormat" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/exportAuditLogs200" + }, + "default": { + "$ref": "#/components/responses/exportAuditLogsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/audit-logs/{cloudEventID}": { + "get": { + "tags": [ + "audit-logs" + ], + "summary": "Get event details", + "description": "Returns details of a single audit log event by its cloud event ID.", + "operationId": "getAuditLog", + "parameters": [ + { + "$ref": "#/components/parameters/auditLogsGetAuditLogCloudEventID" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/auditLogsGetAuditLog200" + }, + "default": { + "$ref": "#/components/responses/auditLogsGetAuditLogDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/audit-logs/filter-options": { + "get": { + "tags": [ + "audit-logs" + ], + "summary": "Get filter options", + "description": "Returns lists of available resource types, actions, and origins for filtering.", + "operationId": "getFilterOptions", + "responses": { + "200": { + "$ref": "#/components/responses/auditLogsGetFilterOptions200" + }, + "default": { + "$ref": "#/components/responses/auditLogsGetFilterOptionsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/partner/accounts": { + "get": { + "tags": [ + "partner" + ], + "summary": "Get account list", + "description": "Returns list of accounts associated with the partner.", + "operationId": "listPartnerAccounts", + "responses": { + "200": { + "$ref": "#/components/responses/listPartnerAccounts200" + }, + "default": { + "$ref": "#/components/responses/listPartnerAccountsDefault" + } + } + }, + "post": { + "tags": [ + "partner" + ], + "summary": "Create new account", + "description": "Creates new UpCloud account that will be linked to partner's existing invoicing.", + "operationId": "createPartnerAccount", + "requestBody": { + "$ref": "#/components/requestBodies/createPartnerAccount" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createPartnerAccount201" + }, + "400": { + "$ref": "#/components/responses/createPartnerAccount400" + }, + "403": { + "$ref": "#/components/responses/createPartnerAccount403" + }, + "409": { + "$ref": "#/components/responses/createPartnerAccount409" + }, + "default": { + "$ref": "#/components/responses/createPartnerAccountDefault" + } + } + } + }, + "/1.3/permission": { + "get": { + "tags": [ + "permission" + ], + "summary": "List permissions", + "description": "Retrieves a list of permissions for sub-accounts to access resources owned by the main account.", + "operationId": "listPermissions", + "responses": { + "200": { + "$ref": "#/components/responses/listPermissions200" + }, + "default": { + "$ref": "#/components/responses/listPermissionsDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "put": { + "tags": [ + "permission" + ], + "summary": "Replace permissions", + "description": "Replaces the entire set of permissions for sub-accounts to access resources owned by the main account.", + "operationId": "replacePermissions", + "requestBody": { + "$ref": "#/components/requestBodies/replacePermissions" + }, + "responses": { + "200": { + "$ref": "#/components/responses/replacePermissions200" + }, + "default": { + "$ref": "#/components/responses/replacePermissionsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/permission/grant": { + "post": { + "tags": [ + "permission" + ], + "summary": "Grant permission", + "description": "Grants a permission for a sub-account to access a resource owned by the main account.", + "operationId": "grantPermission", + "parameters": [ + { + "$ref": "#/components/parameters/grantPermissionSkipTargetCheck" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/grantPermission" + }, + "responses": { + "200": { + "$ref": "#/components/responses/grantPermission200" + }, + "default": { + "$ref": "#/components/responses/grantPermissionDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/permission/revoke": { + "post": { + "tags": [ + "permission" + ], + "summary": "Revoke permission", + "description": "Revokes a permission for a sub-account to access a resource owned by the main account.", + "operationId": "revokePermission", + "requestBody": { + "$ref": "#/components/requestBodies/revokePermission" + }, + "responses": { + "204": { + "$ref": "#/components/responses/revokePermission204" + }, + "default": { + "$ref": "#/components/responses/revokePermissionDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/permission/revoke-all-from-target/{target_type}/{target_identifier}": { + "post": { + "tags": [ + "permission" + ], + "summary": "Revoke all permissions by target", + "description": "Revokes all permissions for sub-accounts to access a specific resource owned by the main account.", + "operationId": "revokeAllPermissionsByTarget", + "parameters": [ + { + "$ref": "#/components/parameters/revokeAllPermissionsByTargetTargetType" + }, + { + "$ref": "#/components/parameters/revokeAllPermissionsByTargetTargetIdentifier" + }, + { + "$ref": "#/components/parameters/revokeAllPermissionsByTargetMainAccountId" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/revokeAllPermissionsByTarget204" + }, + "default": { + "$ref": "#/components/responses/revokeAllPermissionsByTargetDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/permission/revoke-all-from-user/{user}": { + "post": { + "tags": [ + "permission" + ], + "summary": "Revoke all permissions by user", + "description": "Revokes all permissions for a specific sub-account to access any resources owned by the main account.", + "operationId": "revokeAllPermissionsByUser", + "parameters": [ + { + "$ref": "#/components/parameters/revokeAllPermissionsByUserUser" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/revokeAllPermissionsByUser204" + }, + "default": { + "$ref": "#/components/responses/revokeAllPermissionsByUserDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/plan": { + "get": { + "tags": [ + "plan" + ], + "summary": "List available plans", + "description": "Returns a list of available plans. All plans are available in all zones but pricing may differ. See _List prices_ for how to obtain current price list.\n\nIn addition to listed plans, server can be freely configured with \"custom\" plan which allows freely scalable CPU cores, memory amount and storage resources. __Note!__ Custom plans are available for new customers through contact with sales.\n", + "operationId": "listPlans", + "responses": { + "200": { + "$ref": "#/components/responses/listPlans200" + }, + "default": { + "$ref": "#/components/responses/listPlansDefault" + } + } + } + }, + "/1.3/price": { + "get": { + "tags": [ + "price" + ], + "summary": "Returns a price list.", + "description": "Returns a price list.", + "operationId": "getPrice", + "parameters": [ + { + "$ref": "#/components/parameters/getPriceZone" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getPrice200" + }, + "400": { + "$ref": "#/components/responses/getPrice400" + }, + "default": { + "$ref": "#/components/responses/getPriceDefault" + } + } + } + }, + "/1.3/router": { + "get": { + "tags": [ + "router" + ], + "summary": "List routers", + "description": "Returns a list of all available routers associated with the current account.\n\nIt is also possible to filter routers with label URL parameters, e.g.\n`?label=env` or `?label=env%3Dprod`. URL parameter can be given multiple\ntimes to add more filters (e.g. `?label=env%3Dprod&label=v2`), where\nonly routers that match all labels are returned.\nLabel keys are matched case insensitively.\n", + "operationId": "listRouters", + "parameters": [ + { + "$ref": "#/components/parameters/listRoutersLabel" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listRouters200" + }, + "default": { + "$ref": "#/components/responses/listRoutersDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "router" + ], + "summary": "Create router", + "description": "Creates a new router.\nRouters can be used to connect multiple Private Networks. Cloud Servers on any attached network can communicate\ndirectly with each other.\n", + "operationId": "createRouter", + "requestBody": { + "$ref": "#/components/requestBodies/createRouter" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createRouter201" + }, + "400": { + "$ref": "#/components/responses/createRouter400" + }, + "409": { + "$ref": "#/components/responses/createRouter409" + }, + "default": { + "$ref": "#/components/responses/createRouterDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/router/{router}": { + "get": { + "tags": [ + "router" + ], + "summary": "Get router", + "description": "Retrieves details of a specific router.", + "operationId": "getRouter", + "parameters": [ + { + "$ref": "#/components/parameters/getRouterRouter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getRouter200" + }, + "404": { + "$ref": "#/components/responses/getRouter404" + }, + "default": { + "$ref": "#/components/responses/getRouterDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "router" + ], + "summary": "Delete router", + "description": "Deletes a specific router.", + "operationId": "deleteRouter", + "parameters": [ + { + "$ref": "#/components/parameters/deleteRouterRouter" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteRouter204" + }, + "404": { + "$ref": "#/components/responses/deleteRouter404" + }, + "409": { + "$ref": "#/components/responses/deleteRouter409" + }, + "default": { + "$ref": "#/components/responses/deleteRouterDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "router" + ], + "summary": "Modify router", + "description": "Modifies attributes of a specific router.\nModifications to static routes of type `service` will be ignored.\n", + "operationId": "modifyRouter", + "parameters": [ + { + "$ref": "#/components/parameters/modifyRouterRouter" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyRouter" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyRouter200" + }, + "400": { + "$ref": "#/components/responses/modifyRouter400" + }, + "404": { + "$ref": "#/components/responses/modifyRouter404" + }, + "409": { + "$ref": "#/components/responses/modifyRouter409" + }, + "default": { + "$ref": "#/components/responses/modifyRouterDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server-group": { + "get": { + "tags": [ + "server-group" + ], + "summary": "List server groups", + "description": "Retrieves a list of server groups.", + "operationId": "listServerGroups", + "parameters": [ + { + "$ref": "#/components/parameters/listServerGroupsLabel" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listServerGroups200" + }, + "default": { + "$ref": "#/components/responses/listServerGroupsDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "server-group" + ], + "summary": "Create server group", + "description": "Creates a new server group.", + "operationId": "createServerGroup", + "requestBody": { + "$ref": "#/components/requestBodies/createServerGroup" + }, + "responses": { + "200": { + "$ref": "#/components/responses/createServerGroup200" + }, + "default": { + "$ref": "#/components/responses/createServerGroupDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server-group/{uuid}": { + "get": { + "tags": [ + "server-group" + ], + "summary": "Get server group details", + "description": "Retrieves details of a specific server group.", + "operationId": "getServerGroup", + "parameters": [ + { + "$ref": "#/components/parameters/getServerGroupUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getServerGroup200" + }, + "default": { + "$ref": "#/components/responses/getServerGroupDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "server-group" + ], + "summary": "Delete server group", + "description": "Deletes a specific server group.", + "operationId": "deleteServerGroup", + "parameters": [ + { + "$ref": "#/components/parameters/deleteServerGroupUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteServerGroup204" + }, + "default": { + "$ref": "#/components/responses/deleteServerGroupDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "server-group" + ], + "summary": "Modify server group", + "description": "Modifies an existing server group.", + "operationId": "modifyServerGroup", + "parameters": [ + { + "$ref": "#/components/parameters/modifyServerGroupUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyServerGroup" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyServerGroup200" + }, + "default": { + "$ref": "#/components/responses/modifyServerGroupDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server-group/{uuid}/servers": { + "get": { + "tags": [ + "server-group" + ], + "summary": "List server group members", + "description": "Retrieves a list of servers that are members of a specific server group.", + "operationId": "listServerGroupMembers", + "parameters": [ + { + "$ref": "#/components/parameters/listServerGroupMembersUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listServerGroupMembers200" + }, + "default": { + "$ref": "#/components/responses/listServerGroupMembersDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "server-group" + ], + "summary": "Add server to group", + "description": "Adds a server to a specific server group.", + "operationId": "addServerToGroup", + "parameters": [ + { + "$ref": "#/components/parameters/serverGroupAddServerToGroupUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/serverGroupAddServerToGroup" + }, + "responses": { + "204": { + "$ref": "#/components/responses/serverGroupAddServerToGroup204" + }, + "default": { + "$ref": "#/components/responses/serverGroupAddServerToGroupDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server-group/{uuid}/servers/{server_uuid}": { + "delete": { + "tags": [ + "server-group" + ], + "summary": "Remove server from group", + "description": "Removes a server from a specific server group.", + "operationId": "removeServerFromGroup", + "parameters": [ + { + "$ref": "#/components/parameters/serverGroupRemoveServerFromGroupUuid" + }, + { + "$ref": "#/components/parameters/serverGroupRemoveServerFromGroupServerUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/serverGroupRemoveServerFromGroup204" + }, + "default": { + "$ref": "#/components/responses/serverGroupRemoveServerFromGroupDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server": { + "get": { + "tags": [ + "server" + ], + "summary": "List Cloud Servers", + "description": "Returns the most relevant information for Cloud Servers associated with the current account.", + "operationId": "listServers", + "parameters": [ + { + "$ref": "#/components/parameters/listServersLabel" + }, + { + "$ref": "#/components/parameters/listServersUuid" + }, + { + "$ref": "#/components/parameters/listServersHost" + }, + { + "$ref": "#/components/parameters/listServersDevice" + }, + { + "$ref": "#/components/parameters/listServersState" + }, + { + "$ref": "#/components/parameters/listServersTag" + }, + { + "$ref": "#/components/parameters/listServersSearch" + }, + { + "$ref": "#/components/parameters/listServersSortBy" + }, + { + "$ref": "#/components/parameters/listServersOrderBy" + }, + { + "$ref": "#/components/parameters/listServersLimit" + }, + { + "$ref": "#/components/parameters/listServersOffset" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listServers200" + }, + "400": { + "$ref": "#/components/responses/listServers400" + }, + "403": { + "$ref": "#/components/responses/listServers403" + }, + "404": { + "$ref": "#/components/responses/listServers404" + }, + "409": { + "$ref": "#/components/responses/listServers409" + }, + "default": { + "$ref": "#/components/responses/listServersDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "server" + ], + "summary": "Create a new Cloud Server", + "description": "Creates a new Cloud Server", + "operationId": "createServer", + "requestBody": { + "$ref": "#/components/requestBodies/createServer" + }, + "responses": { + "202": { + "$ref": "#/components/responses/createServer202" + }, + "400": { + "$ref": "#/components/responses/createServer400" + }, + "403": { + "$ref": "#/components/responses/createServer403" + }, + "404": { + "$ref": "#/components/responses/createServer404" + }, + "409": { + "$ref": "#/components/responses/createServer409" + }, + "default": { + "$ref": "#/components/responses/createServerDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/firewall_ruleset_relationships/private/{ruleset_uuid}": { + "get": { + "tags": [ + "server" + ], + "summary": "List Cloud Servers related to a private firewall ruleset", + "description": "Return Cloud Servers visible to the authenticated account that are related to a private firewall ruleset, including each Cloud Server's private ruleset relationships.", + "operationId": "listFirewallRulesetRelationships", + "parameters": [ + { + "$ref": "#/components/parameters/serverListFirewallRulesetRelationshipsRulesetUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/serverListFirewallRulesetRelationships200" + }, + "400": { + "$ref": "#/components/responses/serverListFirewallRulesetRelationships400" + }, + "default": { + "$ref": "#/components/responses/serverListFirewallRulesetRelationshipsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/labels": { + "get": { + "tags": [ + "server" + ], + "summary": "List Cloud Server labels", + "description": "Returns the unique label key-value pairs used by Cloud Servers accessible to the current account.", + "operationId": "getLabels", + "responses": { + "200": { + "$ref": "#/components/responses/serverGetLabels200" + }, + "default": { + "$ref": "#/components/responses/serverGetLabelsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}": { + "get": { + "tags": [ + "server" + ], + "summary": "Get Cloud Server details", + "description": "Returns detailed information about a Cloud Server.", + "operationId": "getServer", + "parameters": [ + { + "$ref": "#/components/parameters/getServerUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getServer200" + }, + "400": { + "$ref": "#/components/responses/getServer400" + }, + "403": { + "$ref": "#/components/responses/getServer403" + }, + "404": { + "$ref": "#/components/responses/getServer404" + }, + "default": { + "$ref": "#/components/responses/getServerDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "put": { + "tags": [ + "server" + ], + "summary": "Modify an existing Cloud Server", + "description": "Modifies an existing Cloud Server configuration.", + "operationId": "modifyServer", + "parameters": [ + { + "$ref": "#/components/parameters/modifyServerUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyServer" + }, + "responses": { + "202": { + "$ref": "#/components/responses/modifyServer202" + }, + "400": { + "$ref": "#/components/responses/modifyServer400" + }, + "403": { + "$ref": "#/components/responses/modifyServer403" + }, + "404": { + "$ref": "#/components/responses/modifyServer404" + }, + "409": { + "$ref": "#/components/responses/modifyServer409" + }, + "default": { + "$ref": "#/components/responses/modifyServerDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "server" + ], + "summary": "Delete a Cloud Server", + "description": "Deletes a stopped Cloud Server and releases its IP addresses. Deleting backups requires deleting the associated storage devices.", + "operationId": "deleteServer", + "parameters": [ + { + "$ref": "#/components/parameters/deleteServerUuid" + }, + { + "$ref": "#/components/parameters/deleteServerStorages" + }, + { + "$ref": "#/components/parameters/deleteServerBackups" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteServer204" + }, + "400": { + "$ref": "#/components/responses/deleteServer400" + }, + "403": { + "$ref": "#/components/responses/deleteServer403" + }, + "404": { + "$ref": "#/components/responses/deleteServer404" + }, + "409": { + "$ref": "#/components/responses/deleteServer409" + }, + "default": { + "$ref": "#/components/responses/deleteServerDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/attach_firewall_ruleset/private": { + "post": { + "tags": [ + "server" + ], + "summary": "Attach a private firewall ruleset", + "description": "Attach a private, stateful firewall ruleset to a Cloud Server. The latest ruleset version is selected and applied to private network interfaces.", + "operationId": "attachPrivateFirewallRuleset", + "parameters": [ + { + "$ref": "#/components/parameters/serverAttachPrivateFirewallRulesetUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/serverAttachPrivateFirewallRuleset" + }, + "responses": { + "200": { + "$ref": "#/components/responses/serverAttachPrivateFirewallRuleset200" + }, + "400": { + "$ref": "#/components/responses/serverAttachPrivateFirewallRuleset400" + }, + "403": { + "$ref": "#/components/responses/serverAttachPrivateFirewallRuleset403" + }, + "404": { + "$ref": "#/components/responses/serverAttachPrivateFirewallRuleset404" + }, + "409": { + "$ref": "#/components/responses/serverAttachPrivateFirewallRuleset409" + }, + "default": { + "$ref": "#/components/responses/serverAttachPrivateFirewallRulesetDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/cancel": { + "post": { + "tags": [ + "server" + ], + "summary": "Cancel a Cloud Server operation", + "description": "Cancels an operation while the Cloud Server is in maintenance state.", + "operationId": "cancelServerOperation", + "parameters": [ + { + "$ref": "#/components/parameters/cancelServerOperationUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/cancelServerOperation204" + }, + "400": { + "$ref": "#/components/responses/cancelServerOperation400" + }, + "403": { + "$ref": "#/components/responses/cancelServerOperation403" + }, + "404": { + "$ref": "#/components/responses/cancelServerOperation404" + }, + "409": { + "$ref": "#/components/responses/cancelServerOperation409" + }, + "default": { + "$ref": "#/components/responses/cancelServerOperationDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/cdrom/eject": { + "post": { + "tags": [ + "server" + ], + "summary": "Eject the CD-ROM image from a Cloud Server", + "description": "Eject the storage from the Cloud Server's attached CD-ROM device.", + "operationId": "ejectCDROM", + "parameters": [ + { + "$ref": "#/components/parameters/serverEjectCDROMUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/serverEjectCDROM200" + }, + "400": { + "$ref": "#/components/responses/serverEjectCDROM400" + }, + "403": { + "$ref": "#/components/responses/serverEjectCDROM403" + }, + "404": { + "$ref": "#/components/responses/serverEjectCDROM404" + }, + "409": { + "$ref": "#/components/responses/serverEjectCDROM409" + }, + "511": { + "$ref": "#/components/responses/serverEjectCDROM511" + }, + "default": { + "$ref": "#/components/responses/serverEjectCDROMDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/cdrom/load": { + "post": { + "tags": [ + "server" + ], + "summary": "Load a CD-ROM image into a Cloud Server", + "description": "Load a storage of type normal or cdrom into the Cloud Server's attached CD-ROM device. If media is already loaded, it is ejected first.", + "operationId": "loadCDROM", + "parameters": [ + { + "$ref": "#/components/parameters/serverLoadCDROMUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/serverLoadCDROM" + }, + "responses": { + "200": { + "$ref": "#/components/responses/serverLoadCDROM200" + }, + "400": { + "$ref": "#/components/responses/serverLoadCDROM400" + }, + "403": { + "$ref": "#/components/responses/serverLoadCDROM403" + }, + "404": { + "$ref": "#/components/responses/serverLoadCDROM404" + }, + "409": { + "$ref": "#/components/responses/serverLoadCDROM409" + }, + "511": { + "$ref": "#/components/responses/serverLoadCDROM511" + }, + "default": { + "$ref": "#/components/responses/serverLoadCDROMDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/detach_firewall_ruleset/private": { + "post": { + "tags": [ + "server" + ], + "summary": "Detach a private firewall ruleset", + "description": "Detach a private firewall ruleset from a Cloud Server and reapply private-interface firewall rules.", + "operationId": "detachPrivateFirewallRuleset", + "parameters": [ + { + "$ref": "#/components/parameters/serverDetachPrivateFirewallRulesetUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/serverDetachPrivateFirewallRuleset" + }, + "responses": { + "200": { + "$ref": "#/components/responses/serverDetachPrivateFirewallRuleset200" + }, + "400": { + "$ref": "#/components/responses/serverDetachPrivateFirewallRuleset400" + }, + "403": { + "$ref": "#/components/responses/serverDetachPrivateFirewallRuleset403" + }, + "404": { + "$ref": "#/components/responses/serverDetachPrivateFirewallRuleset404" + }, + "409": { + "$ref": "#/components/responses/serverDetachPrivateFirewallRuleset409" + }, + "default": { + "$ref": "#/components/responses/serverDetachPrivateFirewallRulesetDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/firewall_rule": { + "get": { + "tags": [ + "server" + ], + "summary": "List firewall rules", + "description": "Return the Cloud Server firewall rules in evaluation order. Changes to firewall rules can take 1-2 minutes to take effect.", + "operationId": "listFirewallRules", + "parameters": [ + { + "$ref": "#/components/parameters/serverListFirewallRulesUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/serverListFirewallRules200" + }, + "400": { + "$ref": "#/components/responses/serverListFirewallRules400" + }, + "403": { + "$ref": "#/components/responses/serverListFirewallRules403" + }, + "404": { + "$ref": "#/components/responses/serverListFirewallRules404" + }, + "default": { + "$ref": "#/components/responses/serverListFirewallRulesDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "put": { + "tags": [ + "server" + ], + "summary": "Replace firewall rules", + "description": "Replace the Cloud Server's complete firewall rule chain. Array order determines rule positions. Changes can take 1-2 minutes to take effect.", + "operationId": "updateFirewallRules", + "parameters": [ + { + "$ref": "#/components/parameters/serverUpdateFirewallRulesUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/serverUpdateFirewallRules" + }, + "responses": { + "204": { + "$ref": "#/components/responses/serverUpdateFirewallRules204" + }, + "400": { + "$ref": "#/components/responses/serverUpdateFirewallRules400" + }, + "403": { + "$ref": "#/components/responses/serverUpdateFirewallRules403" + }, + "404": { + "$ref": "#/components/responses/serverUpdateFirewallRules404" + }, + "409": { + "$ref": "#/components/responses/serverUpdateFirewallRules409" + }, + "default": { + "$ref": "#/components/responses/serverUpdateFirewallRulesDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "server" + ], + "summary": "Create a firewall rule", + "description": "Create a firewall rule. Rules are evaluated in position order; if position is omitted, the rule is appended. Changes can take 1-2 minutes to take effect.", + "operationId": "createFirewallRule", + "parameters": [ + { + "$ref": "#/components/parameters/serverCreateFirewallRuleUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/serverCreateFirewallRule" + }, + "responses": { + "201": { + "$ref": "#/components/responses/serverCreateFirewallRule201" + }, + "400": { + "$ref": "#/components/responses/serverCreateFirewallRule400" + }, + "403": { + "$ref": "#/components/responses/serverCreateFirewallRule403" + }, + "404": { + "$ref": "#/components/responses/serverCreateFirewallRule404" + }, + "409": { + "$ref": "#/components/responses/serverCreateFirewallRule409" + }, + "default": { + "$ref": "#/components/responses/serverCreateFirewallRuleDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/firewall_rule/{position}": { + "get": { + "tags": [ + "server" + ], + "summary": "Get a firewall rule", + "description": "Return the firewall rule at the specified one-based position in the Cloud Server rule chain.", + "operationId": "getFirewallRule", + "parameters": [ + { + "$ref": "#/components/parameters/serverGetFirewallRuleUuid" + }, + { + "$ref": "#/components/parameters/serverGetFirewallRulePosition" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/serverGetFirewallRule200" + }, + "400": { + "$ref": "#/components/responses/serverGetFirewallRule400" + }, + "403": { + "$ref": "#/components/responses/serverGetFirewallRule403" + }, + "404": { + "$ref": "#/components/responses/serverGetFirewallRule404" + }, + "default": { + "$ref": "#/components/responses/serverGetFirewallRuleDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "server" + ], + "summary": "Delete a firewall rule", + "description": "Delete the firewall rule at the specified one-based position. Remaining rules are renumbered. Changes can take 1-2 minutes to take effect.", + "operationId": "deleteFirewallRule", + "parameters": [ + { + "$ref": "#/components/parameters/serverDeleteFirewallRuleUuid" + }, + { + "$ref": "#/components/parameters/serverDeleteFirewallRulePosition" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/serverDeleteFirewallRule204" + }, + "400": { + "$ref": "#/components/responses/serverDeleteFirewallRule400" + }, + "403": { + "$ref": "#/components/responses/serverDeleteFirewallRule403" + }, + "404": { + "$ref": "#/components/responses/serverDeleteFirewallRule404" + }, + "409": { + "$ref": "#/components/responses/serverDeleteFirewallRule409" + }, + "default": { + "$ref": "#/components/responses/serverDeleteFirewallRuleDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/firewall_ruleset_relationships/private": { + "get": { + "tags": [ + "server" + ], + "summary": "List private firewall ruleset relationships for a Cloud Server", + "description": "Return all private firewall ruleset relationships configured for a Cloud Server.", + "operationId": "listPrivateFirewallRulesetRelationships", + "parameters": [ + { + "$ref": "#/components/parameters/serverListPrivateFirewallRulesetRelationshipsUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/serverListPrivateFirewallRulesetRelationships200" + }, + "400": { + "$ref": "#/components/responses/serverListPrivateFirewallRulesetRelationships400" + }, + "403": { + "$ref": "#/components/responses/serverListPrivateFirewallRulesetRelationships403" + }, + "404": { + "$ref": "#/components/responses/serverListPrivateFirewallRulesetRelationships404" + }, + "default": { + "$ref": "#/components/responses/serverListPrivateFirewallRulesetRelationshipsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/gpus": { + "get": { + "tags": [ + "server" + ], + "summary": "List Cloud Server GPUs", + "description": "Returns GPUs attached to a Cloud Server.", + "operationId": "listServerGPUs", + "parameters": [ + { + "$ref": "#/components/parameters/listServerGPUsUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listServerGPUs200" + }, + "400": { + "$ref": "#/components/responses/listServerGPUs400" + }, + "403": { + "$ref": "#/components/responses/listServerGPUs403" + }, + "404": { + "$ref": "#/components/responses/listServerGPUs404" + }, + "default": { + "$ref": "#/components/responses/listServerGPUsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/networking": { + "get": { + "tags": [ + "server" + ], + "summary": "Get Cloud Server networking details", + "description": "Return all network interfaces and IP addresses configured for a Cloud Server.", + "operationId": "getServerNetworking", + "parameters": [ + { + "$ref": "#/components/parameters/getServerNetworkingUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getServerNetworking200" + }, + "400": { + "$ref": "#/components/responses/getServerNetworking400" + }, + "403": { + "$ref": "#/components/responses/getServerNetworking403" + }, + "404": { + "$ref": "#/components/responses/getServerNetworking404" + }, + "default": { + "$ref": "#/components/responses/getServerNetworkingDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/networking/interface": { + "post": { + "tags": [ + "server" + ], + "summary": "Add a network interface", + "description": "Add a network interface to a stopped Cloud Server. A private interface must identify the SDN network to attach. The combined limit of network interfaces and storage devices is 24.", + "operationId": "addServerInterface", + "parameters": [ + { + "$ref": "#/components/parameters/addServerInterfaceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/addServerInterface" + }, + "responses": { + "201": { + "$ref": "#/components/responses/addServerInterface201" + }, + "400": { + "$ref": "#/components/responses/addServerInterface400" + }, + "403": { + "$ref": "#/components/responses/addServerInterface403" + }, + "404": { + "$ref": "#/components/responses/addServerInterface404" + }, + "409": { + "$ref": "#/components/responses/addServerInterface409" + }, + "default": { + "$ref": "#/components/responses/addServerInterfaceDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/networking/interface/{index}": { + "put": { + "tags": [ + "server" + ], + "summary": "Modify a network interface", + "description": "Modify the IP addresses, source IP filtering, boot setting, or index of a network interface on a stopped Cloud Server. Changing the interface network or type is not supported.", + "operationId": "modifyServerInterface", + "parameters": [ + { + "$ref": "#/components/parameters/modifyServerInterfaceUuid" + }, + { + "$ref": "#/components/parameters/modifyServerInterfaceIndex" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyServerInterface" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyServerInterface200" + }, + "400": { + "$ref": "#/components/responses/modifyServerInterface400" + }, + "403": { + "$ref": "#/components/responses/modifyServerInterface403" + }, + "404": { + "$ref": "#/components/responses/modifyServerInterface404" + }, + "409": { + "$ref": "#/components/responses/modifyServerInterface409" + }, + "default": { + "$ref": "#/components/responses/modifyServerInterfaceDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "server" + ], + "summary": "Delete a network interface", + "description": "Delete a network interface from a stopped Cloud Server. IP addresses attached to the interface are released according to their release policies.", + "operationId": "deleteServerInterface", + "parameters": [ + { + "$ref": "#/components/parameters/deleteServerInterfaceUuid" + }, + { + "$ref": "#/components/parameters/deleteServerInterfaceIndex" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteServerInterface204" + }, + "400": { + "$ref": "#/components/responses/deleteServerInterface400" + }, + "403": { + "$ref": "#/components/responses/deleteServerInterface403" + }, + "404": { + "$ref": "#/components/responses/deleteServerInterface404" + }, + "409": { + "$ref": "#/components/responses/deleteServerInterface409" + }, + "default": { + "$ref": "#/components/responses/deleteServerInterfaceDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/networking/interface/{index}/ip_address": { + "post": { + "tags": [ + "server" + ], + "summary": "Add an IP address to a network interface", + "description": "Add an IPv4 or IPv6 address to a private network interface. The interface cannot contain addresses from both families and can have at most five addresses.", + "operationId": "addServerInterfaceIpAddress", + "parameters": [ + { + "$ref": "#/components/parameters/addServerInterfaceIpAddressUuid" + }, + { + "$ref": "#/components/parameters/addServerInterfaceIpAddressIndex" + }, + { + "$ref": "#/components/parameters/addServerInterfaceIpAddressForce" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/addServerInterfaceIpAddress" + }, + "responses": { + "201": { + "$ref": "#/components/responses/addServerInterfaceIpAddress201" + }, + "400": { + "$ref": "#/components/responses/addServerInterfaceIpAddress400" + }, + "403": { + "$ref": "#/components/responses/addServerInterfaceIpAddress403" + }, + "404": { + "$ref": "#/components/responses/addServerInterfaceIpAddress404" + }, + "409": { + "$ref": "#/components/responses/addServerInterfaceIpAddress409" + }, + "default": { + "$ref": "#/components/responses/addServerInterfaceIpAddressDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/networking/interface/{index}/ip_address/{ip}": { + "delete": { + "tags": [ + "server" + ], + "summary": "Delete an IP address from a network interface", + "description": "Delete an IP address from a private network interface. At least one IP address must remain attached to the interface.", + "operationId": "deleteServerInterfaceIpAddress", + "parameters": [ + { + "$ref": "#/components/parameters/deleteServerInterfaceIpAddressUuid" + }, + { + "$ref": "#/components/parameters/deleteServerInterfaceIpAddressIndex" + }, + { + "$ref": "#/components/parameters/deleteServerInterfaceIpAddressIp" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteServerInterfaceIpAddress204" + }, + "400": { + "$ref": "#/components/responses/deleteServerInterfaceIpAddress400" + }, + "403": { + "$ref": "#/components/responses/deleteServerInterfaceIpAddress403" + }, + "404": { + "$ref": "#/components/responses/deleteServerInterfaceIpAddress404" + }, + "409": { + "$ref": "#/components/responses/deleteServerInterfaceIpAddress409" + }, + "default": { + "$ref": "#/components/responses/deleteServerInterfaceIpAddressDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/rebuild": { + "post": { + "tags": [ + "server" + ], + "summary": "Rebuild a Cloud Server", + "description": "Reinstalls a stopped Cloud Server from a public template.", + "operationId": "rebuildServer", + "parameters": [ + { + "$ref": "#/components/parameters/rebuildServerUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/rebuildServer" + }, + "responses": { + "202": { + "$ref": "#/components/responses/rebuildServer202" + }, + "400": { + "$ref": "#/components/responses/rebuildServer400" + }, + "403": { + "$ref": "#/components/responses/rebuildServer403" + }, + "404": { + "$ref": "#/components/responses/rebuildServer404" + }, + "409": { + "$ref": "#/components/responses/rebuildServer409" + }, + "default": { + "$ref": "#/components/responses/rebuildServerDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/relocate": { + "post": { + "tags": [ + "server" + ], + "summary": "Relocate a Cloud Server to another zone", + "description": "Relocates a stopped Cloud Server to another zone in the same physical location (datacenter).", + "operationId": "relocateServer", + "parameters": [ + { + "$ref": "#/components/parameters/relocateServerUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/relocateServer" + }, + "responses": { + "200": { + "$ref": "#/components/responses/relocateServer200" + }, + "400": { + "$ref": "#/components/responses/relocateServer400" + }, + "403": { + "$ref": "#/components/responses/relocateServer403" + }, + "404": { + "$ref": "#/components/responses/relocateServer404" + }, + "409": { + "$ref": "#/components/responses/relocateServer409" + }, + "default": { + "$ref": "#/components/responses/relocateServerDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/remote_access_details": { + "get": { + "tags": [ + "server" + ], + "summary": "Get remote access connection details", + "description": "Returns remote access settings and VNC connection details for a Cloud Server.", + "operationId": "getRemoteAccessDetails", + "parameters": [ + { + "$ref": "#/components/parameters/serverGetRemoteAccessDetailsUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/serverGetRemoteAccessDetails200" + }, + "400": { + "$ref": "#/components/responses/serverGetRemoteAccessDetails400" + }, + "403": { + "$ref": "#/components/responses/serverGetRemoteAccessDetails403" + }, + "404": { + "$ref": "#/components/responses/serverGetRemoteAccessDetails404" + }, + "default": { + "$ref": "#/components/responses/serverGetRemoteAccessDetailsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/restart": { + "post": { + "tags": [ + "server" + ], + "summary": "Restart a Cloud Server", + "description": "Stops and starts a Cloud Server in started state.", + "operationId": "restartServer", + "parameters": [ + { + "$ref": "#/components/parameters/restartServerUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/restartServer" + }, + "responses": { + "200": { + "$ref": "#/components/responses/restartServer200" + }, + "400": { + "$ref": "#/components/responses/restartServer400" + }, + "403": { + "$ref": "#/components/responses/restartServer403" + }, + "404": { + "$ref": "#/components/responses/restartServer404" + }, + "409": { + "$ref": "#/components/responses/restartServer409" + }, + "default": { + "$ref": "#/components/responses/restartServerDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/start": { + "post": { + "tags": [ + "server" + ], + "summary": "Start a Cloud Server", + "description": "Starts a Cloud Server in stopped state.", + "operationId": "startServer", + "parameters": [ + { + "$ref": "#/components/parameters/startServerUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/startServer" + }, + "responses": { + "200": { + "$ref": "#/components/responses/startServer200" + }, + "400": { + "$ref": "#/components/responses/startServer400" + }, + "403": { + "$ref": "#/components/responses/startServer403" + }, + "404": { + "$ref": "#/components/responses/startServer404" + }, + "409": { + "$ref": "#/components/responses/startServer409" + }, + "default": { + "$ref": "#/components/responses/startServerDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/stats/cpu": { + "get": { + "tags": [ + "server" + ], + "summary": "Get Cloud Server CPU statistics", + "description": "Returns CPU usage statistics for all supported periods.", + "operationId": "getCPUStats", + "parameters": [ + { + "$ref": "#/components/parameters/serverGetCPUStatsUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/serverGetCPUStats200" + }, + "400": { + "$ref": "#/components/responses/serverGetCPUStats400" + }, + "403": { + "$ref": "#/components/responses/serverGetCPUStats403" + }, + "404": { + "$ref": "#/components/responses/serverGetCPUStats404" + }, + "default": { + "$ref": "#/components/responses/serverGetCPUStatsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/stats/cpu/{period}": { + "get": { + "tags": [ + "server" + ], + "summary": "Get Cloud Server CPU statistics by period", + "description": "Returns CPU usage statistics for the selected period.", + "operationId": "getCPUStatsByPeriod", + "parameters": [ + { + "$ref": "#/components/parameters/serverGetCPUStatsByPeriodUuid" + }, + { + "$ref": "#/components/parameters/serverGetCPUStatsByPeriodPeriod" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/serverGetCPUStatsByPeriod200" + }, + "400": { + "$ref": "#/components/responses/serverGetCPUStatsByPeriod400" + }, + "403": { + "$ref": "#/components/responses/serverGetCPUStatsByPeriod403" + }, + "404": { + "$ref": "#/components/responses/serverGetCPUStatsByPeriod404" + }, + "default": { + "$ref": "#/components/responses/serverGetCPUStatsByPeriodDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/stats/disk/{type}": { + "get": { + "tags": [ + "server" + ], + "summary": "Get Cloud Server disk statistics", + "description": "Returns aggregate disk read and write statistics for all supported periods.", + "operationId": "getDiskStats", + "parameters": [ + { + "$ref": "#/components/parameters/serverGetDiskStatsUuid" + }, + { + "$ref": "#/components/parameters/serverGetDiskStatsType" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/serverGetDiskStats200" + }, + "400": { + "$ref": "#/components/responses/serverGetDiskStats400" + }, + "403": { + "$ref": "#/components/responses/serverGetDiskStats403" + }, + "404": { + "$ref": "#/components/responses/serverGetDiskStats404" + }, + "default": { + "$ref": "#/components/responses/serverGetDiskStatsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/stats/disk/{type}/{period}": { + "get": { + "tags": [ + "server" + ], + "summary": "Get Cloud Server disk statistics by period", + "description": "Returns aggregate disk read and write statistics for the selected period.", + "operationId": "getDiskStatsByPeriod", + "parameters": [ + { + "$ref": "#/components/parameters/serverGetDiskStatsByPeriodUuid" + }, + { + "$ref": "#/components/parameters/serverGetDiskStatsByPeriodType" + }, + { + "$ref": "#/components/parameters/serverGetDiskStatsByPeriodPeriod" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/serverGetDiskStatsByPeriod200" + }, + "400": { + "$ref": "#/components/responses/serverGetDiskStatsByPeriod400" + }, + "403": { + "$ref": "#/components/responses/serverGetDiskStatsByPeriod403" + }, + "404": { + "$ref": "#/components/responses/serverGetDiskStatsByPeriod404" + }, + "default": { + "$ref": "#/components/responses/serverGetDiskStatsByPeriodDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/stats/network/{type}": { + "get": { + "tags": [ + "server" + ], + "summary": "Get Cloud Server network statistics", + "description": "Returns aggregate inbound and outbound network statistics for all interfaces and periods.", + "operationId": "getNetworkStats", + "parameters": [ + { + "$ref": "#/components/parameters/serverGetNetworkStatsUuid" + }, + { + "$ref": "#/components/parameters/serverGetNetworkStatsType" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/serverGetNetworkStats200" + }, + "400": { + "$ref": "#/components/responses/serverGetNetworkStats400" + }, + "403": { + "$ref": "#/components/responses/serverGetNetworkStats403" + }, + "404": { + "$ref": "#/components/responses/serverGetNetworkStats404" + }, + "default": { + "$ref": "#/components/responses/serverGetNetworkStatsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/stats/network/{type}/{network}": { + "get": { + "tags": [ + "server" + ], + "summary": "Get Cloud Server network statistics by network type", + "description": "Returns inbound and outbound network statistics for the selected network type and all periods.", + "operationId": "getNetworkStatsByNetwork", + "parameters": [ + { + "$ref": "#/components/parameters/serverGetNetworkStatsByNetworkUuid" + }, + { + "$ref": "#/components/parameters/serverGetNetworkStatsByNetworkType" + }, + { + "$ref": "#/components/parameters/serverGetNetworkStatsByNetworkNetwork" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/serverGetNetworkStatsByNetwork200" + }, + "400": { + "$ref": "#/components/responses/serverGetNetworkStatsByNetwork400" + }, + "403": { + "$ref": "#/components/responses/serverGetNetworkStatsByNetwork403" + }, + "404": { + "$ref": "#/components/responses/serverGetNetworkStatsByNetwork404" + }, + "default": { + "$ref": "#/components/responses/serverGetNetworkStatsByNetworkDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/stats/network/{type}/{network}/{period}": { + "get": { + "tags": [ + "server" + ], + "summary": "Get Cloud Server network statistics by network type and period", + "description": "Returns inbound and outbound network statistics for the selected network type and period.", + "operationId": "getNetworkStatsByNetworkAndPeriod", + "parameters": [ + { + "$ref": "#/components/parameters/serverGetNetworkStatsByNetworkAndPeriodUuid" + }, + { + "$ref": "#/components/parameters/serverGetNetworkStatsByNetworkAndPeriodType" + }, + { + "$ref": "#/components/parameters/serverGetNetworkStatsByNetworkAndPeriodNetwork" + }, + { + "$ref": "#/components/parameters/serverGetNetworkStatsByNetworkAndPeriodPeriod" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/serverGetNetworkStatsByNetworkAndPeriod200" + }, + "400": { + "$ref": "#/components/responses/serverGetNetworkStatsByNetworkAndPeriod400" + }, + "403": { + "$ref": "#/components/responses/serverGetNetworkStatsByNetworkAndPeriod403" + }, + "404": { + "$ref": "#/components/responses/serverGetNetworkStatsByNetworkAndPeriod404" + }, + "default": { + "$ref": "#/components/responses/serverGetNetworkStatsByNetworkAndPeriodDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/stop": { + "post": { + "tags": [ + "server" + ], + "summary": "Stop a Cloud Server", + "description": "Stops a Cloud Server in started state.", + "operationId": "stopServer", + "parameters": [ + { + "$ref": "#/components/parameters/stopServerUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/stopServer" + }, + "responses": { + "200": { + "$ref": "#/components/responses/stopServer200" + }, + "400": { + "$ref": "#/components/responses/stopServer400" + }, + "403": { + "$ref": "#/components/responses/stopServer403" + }, + "404": { + "$ref": "#/components/responses/stopServer404" + }, + "409": { + "$ref": "#/components/responses/stopServer409" + }, + "default": { + "$ref": "#/components/responses/stopServerDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/storage/attach": { + "post": { + "tags": [ + "server" + ], + "summary": "Attach a storage device to a Cloud Server", + "description": "Attach a storage resource as a disk or CD-ROM device to a Cloud Server. SCSI and virtio disks can be attached while the Cloud Server is started; IDE and CD-ROM devices require a stopped Cloud Server. An empty CD-ROM device can be attached without specifying a storage resource.", + "operationId": "attachStorageDevice", + "parameters": [ + { + "$ref": "#/components/parameters/serverAttachStorageDeviceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/serverAttachStorageDevice" + }, + "responses": { + "200": { + "$ref": "#/components/responses/serverAttachStorageDevice200" + }, + "400": { + "$ref": "#/components/responses/serverAttachStorageDevice400" + }, + "403": { + "$ref": "#/components/responses/serverAttachStorageDevice403" + }, + "404": { + "$ref": "#/components/responses/serverAttachStorageDevice404" + }, + "409": { + "$ref": "#/components/responses/serverAttachStorageDevice409" + }, + "default": { + "$ref": "#/components/responses/serverAttachStorageDeviceDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/storage/detach": { + "post": { + "tags": [ + "server" + ], + "summary": "Detach a storage device from a Cloud Server", + "description": "Detach a storage device identified by its device address or storage resource UUID. IDE and CD-ROM devices cannot be detached while the Cloud Server is started.", + "operationId": "detachStorageDevice", + "parameters": [ + { + "$ref": "#/components/parameters/serverDetachStorageDeviceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/serverDetachStorageDevice" + }, + "responses": { + "200": { + "$ref": "#/components/responses/serverDetachStorageDevice200" + }, + "400": { + "$ref": "#/components/responses/serverDetachStorageDevice400" + }, + "403": { + "$ref": "#/components/responses/serverDetachStorageDevice403" + }, + "404": { + "$ref": "#/components/responses/serverDetachStorageDevice404" + }, + "409": { + "$ref": "#/components/responses/serverDetachStorageDevice409" + }, + "511": { + "$ref": "#/components/responses/serverDetachStorageDevice511" + }, + "default": { + "$ref": "#/components/responses/serverDetachStorageDeviceDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server/{uuid}/vnc_details": { + "get": { + "tags": [ + "server" + ], + "summary": "Get VNC connection details", + "description": "Returns VNC connection details and remote access settings for a Cloud Server.", + "operationId": "getVNCDetails", + "parameters": [ + { + "$ref": "#/components/parameters/serverGetVNCDetailsUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/serverGetVNCDetails200" + }, + "400": { + "$ref": "#/components/responses/serverGetVNCDetails400" + }, + "403": { + "$ref": "#/components/responses/serverGetVNCDetails403" + }, + "404": { + "$ref": "#/components/responses/serverGetVNCDetails404" + }, + "default": { + "$ref": "#/components/responses/serverGetVNCDetailsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server_size": { + "get": { + "tags": [ + "server_size" + ], + "summary": "List server sizes", + "description": "Retrieves a list of available server sizes (combinations of memory and CPU cores).", + "operationId": "listServerSizes", + "responses": { + "200": { + "$ref": "#/components/responses/listServerSizes200" + }, + "default": { + "$ref": "#/components/responses/listServerSizesDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/server_size/limits": { + "get": { + "tags": [ + "server_size" + ], + "summary": "Get server size limits", + "description": "Retrieves the minimum and maximum limits for server sizes, including any zone-specific limits for private zones.", + "operationId": "getServerSizeLimits", + "responses": { + "200": { + "$ref": "#/components/responses/getServerSizeLimits200" + }, + "default": { + "$ref": "#/components/responses/getServerSizeLimitsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage": { + "get": { + "tags": [ + "storage" + ], + "summary": "List storage resources", + "description": "Returns all storage resources accessible to the account. The results can be filtered by labels or a title and UUID search, sorted, and paginated.", + "operationId": "getStorageList", + "parameters": [ + { + "$ref": "#/components/parameters/getStorageListLabel" + }, + { + "$ref": "#/components/parameters/getStorageListSearch" + }, + { + "$ref": "#/components/parameters/getStorageListSortBy" + }, + { + "$ref": "#/components/parameters/getStorageListOrderBy" + }, + { + "$ref": "#/components/parameters/getStorageListLimit" + }, + { + "$ref": "#/components/parameters/getStorageListOffset" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getStorageList200" + }, + "400": { + "$ref": "#/components/responses/getStorageList400" + }, + "default": { + "$ref": "#/components/responses/getStorageListDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "storage" + ], + "summary": "Create Block Storage", + "description": "Creates a block storage resource in a specific zone. The new block storage is not attached to a Cloud Server.", + "operationId": "createStorage", + "requestBody": { + "$ref": "#/components/requestBodies/createStorage" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createStorage201" + }, + "default": { + "$ref": "#/components/responses/createStorageDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/backup": { + "get": { + "tags": [ + "storage" + ], + "summary": "List storage backups", + "description": "Returns accessible storage resources whose type is `backup`.", + "operationId": "getStorageListByBackup", + "parameters": [ + { + "$ref": "#/components/parameters/getStorageListByBackupLabel" + }, + { + "$ref": "#/components/parameters/getStorageListByBackupSearch" + }, + { + "$ref": "#/components/parameters/getStorageListByBackupSortBy" + }, + { + "$ref": "#/components/parameters/getStorageListByBackupOrderBy" + }, + { + "$ref": "#/components/parameters/getStorageListByBackupLimit" + }, + { + "$ref": "#/components/parameters/getStorageListByBackupOffset" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getStorageListByBackup200" + }, + "400": { + "$ref": "#/components/responses/getStorageListByBackup400" + }, + "default": { + "$ref": "#/components/responses/getStorageListByBackupDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/cdrom": { + "get": { + "tags": [ + "storage" + ], + "summary": "List CD-ROM images", + "description": "Returns accessible storage resources whose type is `cdrom`.", + "operationId": "getStorageListByCdrom", + "parameters": [ + { + "$ref": "#/components/parameters/getStorageListByCdromLabel" + }, + { + "$ref": "#/components/parameters/getStorageListByCdromSearch" + }, + { + "$ref": "#/components/parameters/getStorageListByCdromSortBy" + }, + { + "$ref": "#/components/parameters/getStorageListByCdromOrderBy" + }, + { + "$ref": "#/components/parameters/getStorageListByCdromLimit" + }, + { + "$ref": "#/components/parameters/getStorageListByCdromOffset" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getStorageListByCdrom200" + }, + "400": { + "$ref": "#/components/responses/getStorageListByCdrom400" + }, + "default": { + "$ref": "#/components/responses/getStorageListByCdromDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/favorite": { + "get": { + "tags": [ + "storage" + ], + "summary": "List favorite storage resources", + "description": "Returns the public templates and CD-ROM images that the account has marked as favorites.", + "operationId": "getFavoriteStorageList", + "responses": { + "200": { + "$ref": "#/components/responses/getFavoriteStorageList200" + }, + "default": { + "$ref": "#/components/responses/getFavoriteStorageListDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/normal": { + "get": { + "tags": [ + "storage" + ], + "summary": "List normal Block Storage", + "description": "Returns accessible Block Storage resources whose type is `normal`.", + "operationId": "getStorageListByNormal", + "parameters": [ + { + "$ref": "#/components/parameters/getStorageListByNormalLabel" + }, + { + "$ref": "#/components/parameters/getStorageListByNormalSearch" + }, + { + "$ref": "#/components/parameters/getStorageListByNormalSortBy" + }, + { + "$ref": "#/components/parameters/getStorageListByNormalOrderBy" + }, + { + "$ref": "#/components/parameters/getStorageListByNormalLimit" + }, + { + "$ref": "#/components/parameters/getStorageListByNormalOffset" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getStorageListByNormal200" + }, + "400": { + "$ref": "#/components/responses/getStorageListByNormal400" + }, + "default": { + "$ref": "#/components/responses/getStorageListByNormalDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/private": { + "get": { + "tags": [ + "storage" + ], + "summary": "List private storage resources", + "description": "Returns accessible storage resources whose access type is `private`.", + "operationId": "getStorageListByPrivateAccess", + "parameters": [ + { + "$ref": "#/components/parameters/getStorageListByPrivateAccessLabel" + }, + { + "$ref": "#/components/parameters/getStorageListByPrivateAccessSearch" + }, + { + "$ref": "#/components/parameters/getStorageListByPrivateAccessSortBy" + }, + { + "$ref": "#/components/parameters/getStorageListByPrivateAccessOrderBy" + }, + { + "$ref": "#/components/parameters/getStorageListByPrivateAccessLimit" + }, + { + "$ref": "#/components/parameters/getStorageListByPrivateAccessOffset" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getStorageListByPrivateAccess200" + }, + "400": { + "$ref": "#/components/responses/getStorageListByPrivateAccess400" + }, + "default": { + "$ref": "#/components/responses/getStorageListByPrivateAccessDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/public": { + "get": { + "tags": [ + "storage" + ], + "summary": "List public storage resources", + "description": "Returns accessible storage resources whose access type is `public`.", + "operationId": "getStorageListByPublicAccess", + "parameters": [ + { + "$ref": "#/components/parameters/getStorageListByPublicAccessLabel" + }, + { + "$ref": "#/components/parameters/getStorageListByPublicAccessSearch" + }, + { + "$ref": "#/components/parameters/getStorageListByPublicAccessSortBy" + }, + { + "$ref": "#/components/parameters/getStorageListByPublicAccessOrderBy" + }, + { + "$ref": "#/components/parameters/getStorageListByPublicAccessLimit" + }, + { + "$ref": "#/components/parameters/getStorageListByPublicAccessOffset" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getStorageListByPublicAccess200" + }, + "400": { + "$ref": "#/components/responses/getStorageListByPublicAccess400" + }, + "default": { + "$ref": "#/components/responses/getStorageListByPublicAccessDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/template": { + "get": { + "tags": [ + "storage" + ], + "summary": "List storage templates", + "description": "Returns accessible storage resources whose type is `template`.", + "operationId": "getStorageListByTemplate", + "parameters": [ + { + "$ref": "#/components/parameters/getStorageListByTemplateLabel" + }, + { + "$ref": "#/components/parameters/getStorageListByTemplateSearch" + }, + { + "$ref": "#/components/parameters/getStorageListByTemplateSortBy" + }, + { + "$ref": "#/components/parameters/getStorageListByTemplateOrderBy" + }, + { + "$ref": "#/components/parameters/getStorageListByTemplateLimit" + }, + { + "$ref": "#/components/parameters/getStorageListByTemplateOffset" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getStorageListByTemplate200" + }, + "400": { + "$ref": "#/components/responses/getStorageListByTemplate400" + }, + "default": { + "$ref": "#/components/responses/getStorageListByTemplateDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/{type}/{access}": { + "get": { + "tags": [ + "storage" + ], + "summary": "List storage resources by type and access", + "description": "Returns accessible storage resources matching both the requested storage type and access type.", + "operationId": "getStorageListByTypeAndAccess", + "parameters": [ + { + "$ref": "#/components/parameters/getStorageListByTypeAndAccessType" + }, + { + "$ref": "#/components/parameters/getStorageListByTypeAndAccessAccess" + }, + { + "$ref": "#/components/parameters/getStorageListByTypeAndAccessLabel" + }, + { + "$ref": "#/components/parameters/getStorageListByTypeAndAccessSearch" + }, + { + "$ref": "#/components/parameters/getStorageListByTypeAndAccessSortBy" + }, + { + "$ref": "#/components/parameters/getStorageListByTypeAndAccessOrderBy" + }, + { + "$ref": "#/components/parameters/getStorageListByTypeAndAccessLimit" + }, + { + "$ref": "#/components/parameters/getStorageListByTypeAndAccessOffset" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getStorageListByTypeAndAccess200" + }, + "400": { + "$ref": "#/components/responses/getStorageListByTypeAndAccess400" + }, + "default": { + "$ref": "#/components/responses/getStorageListByTypeAndAccessDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/{uuid}": { + "get": { + "tags": [ + "storage" + ], + "summary": "Get storage resource details", + "description": "Returns detailed information about a storage resource, including its current state, attachments, labels, and backup configuration when applicable.", + "operationId": "getStorageInfo", + "parameters": [ + { + "$ref": "#/components/parameters/getStorageInfoUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getStorageInfo200" + }, + "404": { + "$ref": "#/components/responses/getStorageInfo404" + }, + "default": { + "$ref": "#/components/responses/getStorageInfoDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "put": { + "tags": [ + "storage" + ], + "summary": "Modify Block Storage", + "description": "Modifies a block storage title, labels, automatic backup rule, or size. A new size must be greater than the current size. Set `filesystem_resize` to `yes` to also resize the last partition and its supported filesystem after increasing the block storage size.", + "operationId": "modifyStorage", + "parameters": [ + { + "$ref": "#/components/parameters/modifyStorageUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyStorage" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyStorage200" + }, + "default": { + "$ref": "#/components/responses/modifyStorageDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "storage" + ], + "summary": "Delete storage resource", + "description": "Schedules an unattached private storage resource for deletion. Associated backups are kept by default unless another backup policy is selected.", + "operationId": "deleteStorage", + "parameters": [ + { + "$ref": "#/components/parameters/deleteStorageUuid" + }, + { + "$ref": "#/components/parameters/deleteStorageBackups" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteStorage204" + }, + "default": { + "$ref": "#/components/responses/deleteStorageDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/{uuid}/attach": { + "post": { + "tags": [ + "storage" + ], + "summary": "Attach storage to a Cloud Server", + "description": "Attaches the storage resource to a Cloud Server in the same zone. The device defaults to a disk at the next available address. IDE and CD-ROM devices can be attached only while the Cloud Server is stopped; SCSI and VirtIO disks can also be attached while it is running.", + "operationId": "attachStorageToServer", + "parameters": [ + { + "$ref": "#/components/parameters/attachStorageToServerUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/attachStorageToServer" + }, + "responses": { + "200": { + "$ref": "#/components/responses/attachStorageToServer200" + }, + "default": { + "$ref": "#/components/responses/attachStorageToServerDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/{uuid}/backup": { + "post": { + "tags": [ + "storage" + ], + "summary": "Create on-demand backup", + "description": "Creates a point-in-time backup of private normal block storage. The operation is asynchronous: the source block storage is `backuping` while the backup is created, and the returned backup remains in `maintenance` until it is ready.", + "operationId": "createOnDemandBackup", + "parameters": [ + { + "$ref": "#/components/parameters/storageCreateOnDemandBackupUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/storageCreateOnDemandBackup" + }, + "responses": { + "201": { + "$ref": "#/components/responses/storageCreateOnDemandBackup201" + }, + "default": { + "$ref": "#/components/responses/storageCreateOnDemandBackupDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/{uuid}/cancel": { + "post": { + "tags": [ + "storage" + ], + "summary": "Cancel Block Storage operation", + "description": "Requests cancellation of an interruptible operation on block storage in the `maintenance` state. For a running clone, cancellation removes the incomplete copy and returns the source block storage to the `online` state.", + "operationId": "cancelStorageOperation", + "parameters": [ + { + "$ref": "#/components/parameters/cancelStorageOperationUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/cancelStorageOperation204" + }, + "default": { + "$ref": "#/components/responses/cancelStorageOperationDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/{uuid}/clone": { + "post": { + "tags": [ + "storage" + ], + "summary": "Clone Block Storage", + "description": "Creates a Block Storage copy of a storage resource. Cloning is asynchronous: the returned block storage remains in the `maintenance` state until the operation completes and can be monitored with the storage resource details endpoint.", + "operationId": "cloneStorage", + "parameters": [ + { + "$ref": "#/components/parameters/cloneStorageUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/cloneStorage" + }, + "responses": { + "201": { + "$ref": "#/components/responses/cloneStorage201" + }, + "404": { + "$ref": "#/components/responses/cloneStorage404" + }, + "default": { + "$ref": "#/components/responses/cloneStorageDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/{uuid}/detach": { + "post": { + "tags": [ + "storage" + ], + "summary": "Detach storage from a Cloud Server", + "description": "Detaches the storage resource from its attached Cloud Server. IDE and CD-ROM devices can be detached only while the Cloud Server is stopped; SCSI and VirtIO disks can also be detached while it is running. If the storage resource is already detached, it is returned unchanged.", + "operationId": "detachStorageFromServer", + "parameters": [ + { + "$ref": "#/components/parameters/detachStorageFromServerUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/detachStorageFromServer200" + }, + "default": { + "$ref": "#/components/responses/detachStorageFromServerDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/{uuid}/favorite": { + "post": { + "tags": [ + "storage" + ], + "summary": "Add storage resource to favorites", + "description": "Adds an accessible storage resource to the account's favorites. The operation succeeds if the storage resource is already a favorite.", + "operationId": "addStorageToFavorites", + "parameters": [ + { + "$ref": "#/components/parameters/addStorageToFavoritesUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/addStorageToFavorites204" + }, + "default": { + "$ref": "#/components/responses/addStorageToFavoritesDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "storage" + ], + "summary": "Remove storage resource from favorites", + "description": "Removes an accessible storage resource from the account's favorites. The operation succeeds if the storage resource is not a favorite.", + "operationId": "removeStorageFromFavorites", + "parameters": [ + { + "$ref": "#/components/parameters/removeStorageFromFavoritesUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/removeStorageFromFavorites204" + }, + "default": { + "$ref": "#/components/responses/removeStorageFromFavoritesDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/{uuid}/import": { + "get": { + "tags": [ + "storage" + ], + "summary": "Get storage import details", + "description": "Returns details of the latest import task for a storage resource, including its state, transferred byte counts, checksums, and any error information.", + "operationId": "getStorageImportDetails", + "parameters": [ + { + "$ref": "#/components/parameters/getStorageImportDetailsUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getStorageImportDetails200" + }, + "404": { + "$ref": "#/components/responses/getStorageImportDetails404" + }, + "default": { + "$ref": "#/components/responses/getStorageImportDetailsDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "storage" + ], + "summary": "Create storage import", + "description": "Creates an asynchronous task that imports a raw disk image into existing Block Storage from an HTTP URL or a temporary direct-upload URL. Attached Cloud Servers must be stopped.", + "operationId": "createStorageImport", + "parameters": [ + { + "$ref": "#/components/parameters/createStorageImportUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createStorageImport" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createStorageImport201" + }, + "400": { + "$ref": "#/components/responses/createStorageImport400" + }, + "409": { + "$ref": "#/components/responses/createStorageImport409" + }, + "503": { + "$ref": "#/components/responses/createStorageImport503" + }, + "default": { + "$ref": "#/components/responses/createStorageImportDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/{uuid}/import/cancel": { + "post": { + "tags": [ + "storage" + ], + "summary": "Cancel storage import", + "description": "Requests cancellation of an ongoing storage import. The task enters the `cancelling` state while imported data is rolled back when necessary.", + "operationId": "cancelStorageImport", + "parameters": [ + { + "$ref": "#/components/parameters/cancelStorageImportUuid" + } + ], + "responses": { + "202": { + "$ref": "#/components/responses/cancelStorageImport202" + }, + "404": { + "$ref": "#/components/responses/cancelStorageImport404" + }, + "409": { + "$ref": "#/components/responses/cancelStorageImport409" + }, + "default": { + "$ref": "#/components/responses/cancelStorageImportDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/{uuid}/resize": { + "post": { + "tags": [ + "storage" + ], + "summary": "Resize Block Storage partition and filesystem", + "description": "Resizes the last partition and its supported filesystem to use the block storage capacity already available. A backup is created before the operation and returned on success. Increase the block storage capacity first with the modify block storage endpoint.", + "operationId": "resizeStorage", + "parameters": [ + { + "$ref": "#/components/parameters/resizeStorageUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/resizeStorage200" + }, + "default": { + "$ref": "#/components/responses/resizeStorageDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/{uuid}/restore": { + "post": { + "tags": [ + "storage" + ], + "summary": "Restore Block Storage from backup", + "description": "Starts restoring the backup identified by `uuid` to its origin block storage. If the origin block storage is attached to a Cloud Server, the Cloud Server must be stopped.", + "operationId": "restoreStorageFromBackup", + "parameters": [ + { + "$ref": "#/components/parameters/restoreStorageFromBackupUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/restoreStorageFromBackup204" + }, + "default": { + "$ref": "#/components/responses/restoreStorageFromBackupDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/storage/{uuid}/templatize": { + "post": { + "tags": [ + "storage" + ], + "summary": "Create template from Block Storage", + "description": "Creates a private template from private normal block storage. The operation is asynchronous: the returned template remains in `maintenance` until it is ready. Deployments from the template use the source block storage tier.", + "operationId": "createTemplateFromStorage", + "parameters": [ + { + "$ref": "#/components/parameters/createTemplateFromStorageUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createTemplateFromStorage" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createTemplateFromStorage201" + }, + "default": { + "$ref": "#/components/responses/createTemplateFromStorageDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/tag": { + "get": { + "tags": [ + "tag" + ], + "summary": "List existing tags", + "description": "Returns all existing tags with their properties and servers tagged.", + "operationId": "listTags", + "responses": { + "200": { + "$ref": "#/components/responses/listTags200" + }, + "default": { + "$ref": "#/components/responses/listTagsDefault" + } + } + }, + "post": { + "tags": [ + "tag" + ], + "summary": "Create a new tag", + "description": "Creates a new tag. Existing servers can be tagged in same request.", + "operationId": "createTag", + "requestBody": { + "$ref": "#/components/requestBodies/createTag" + }, + "responses": { + "200": { + "$ref": "#/components/responses/createTag200" + }, + "400": { + "$ref": "#/components/responses/createTag400" + }, + "403": { + "$ref": "#/components/responses/createTag403" + }, + "409": { + "$ref": "#/components/responses/createTag409" + }, + "default": { + "$ref": "#/components/responses/createTagDefault" + } + } + } + }, + "/1.3/tag/{name}": { + "get": { + "tags": [ + "tag" + ], + "summary": "Get tag details", + "description": "Returns details for a specific tag.", + "operationId": "getTag", + "parameters": [ + { + "$ref": "#/components/parameters/getTagName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getTag200" + }, + "400": { + "$ref": "#/components/responses/getTag400" + }, + "403": { + "$ref": "#/components/responses/getTag403" + }, + "404": { + "$ref": "#/components/responses/getTag404" + }, + "default": { + "$ref": "#/components/responses/getTagDefault" + } + } + }, + "put": { + "tags": [ + "tag" + ], + "summary": "Modify existing tag", + "description": "Changes attributes of an existing tag", + "operationId": "modifyTag", + "parameters": [ + { + "$ref": "#/components/parameters/modifyTagName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyTag" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyTag200" + }, + "400": { + "$ref": "#/components/responses/modifyTag400" + }, + "403": { + "$ref": "#/components/responses/modifyTag403" + }, + "404": { + "$ref": "#/components/responses/modifyTag404" + }, + "default": { + "$ref": "#/components/responses/modifyTagDefault" + } + } + }, + "delete": { + "tags": [ + "tag" + ], + "summary": "Delete a tag", + "description": "Deletes a specific tag.", + "operationId": "deleteTag", + "parameters": [ + { + "$ref": "#/components/parameters/deleteTagName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteTag204" + }, + "400": { + "$ref": "#/components/responses/deleteTag400" + }, + "403": { + "$ref": "#/components/responses/deleteTag403" + }, + "404": { + "$ref": "#/components/responses/deleteTag404" + }, + "default": { + "$ref": "#/components/responses/deleteTagDefault" + } + } + } + }, + "/1.3/timezone": { + "get": { + "tags": [ + "timezone" + ], + "summary": "List timezones", + "description": "Retrieves a list of supported timezones.", + "operationId": "listTimezones", + "responses": { + "200": { + "$ref": "#/components/responses/listTimezones200" + }, + "default": { + "$ref": "#/components/responses/listTimezonesDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/account/tokens": { + "get": { + "tags": [ + "account-tokens" + ], + "summary": "List API tokens", + "description": "List all tokens for the currently authorized account.\nThe tokens are returned in a paged format, with the default page size being 20.\nThe maximum page size is 100.\n", + "operationId": "listTokens", + "parameters": [ + { + "$ref": "#/components/parameters/accountTokensListTokensLimit" + }, + { + "$ref": "#/components/parameters/accountTokensListTokensOffset" + }, + { + "$ref": "#/components/parameters/accountTokensListTokensGui" + }, + { + "$ref": "#/components/parameters/accountTokensListTokensSort" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/accountTokensListTokens200" + }, + "401": { + "$ref": "#/components/responses/accountTokensListTokens401" + }, + "default": { + "$ref": "#/components/responses/accountTokensListTokensDefault" + } + } + }, + "post": { + "tags": [ + "account-tokens" + ], + "summary": "Create an API token", + "description": "Create a new API token. Maximum token validity is 24*365h=8760h (~1 year).\nAttribute allowed_ip_prefixes allows defining a list of CIDR/IP addresses from where the token is accepted.\nEmpty list denies access from everywhere. If unset, the default list will be the IP filters of the account. If no IP filters are defined for the account either, the default will be [\"0.0.0.0/0\", \"::0/0\"], i.e. allow from any address.\n", + "operationId": "createToken", + "requestBody": { + "$ref": "#/components/requestBodies/accountTokensCreateToken" + }, + "responses": { + "201": { + "$ref": "#/components/responses/accountTokensCreateToken201" + }, + "400": { + "$ref": "#/components/responses/accountTokensCreateToken400" + }, + "401": { + "$ref": "#/components/responses/accountTokensCreateToken401" + }, + "403": { + "$ref": "#/components/responses/accountTokensCreateToken403" + }, + "409": { + "$ref": "#/components/responses/accountTokensCreateToken409" + }, + "default": { + "$ref": "#/components/responses/accountTokensCreateTokenDefault" + } + } + } + }, + "/1.3/account/tokens/{token-uuid}": { + "get": { + "tags": [ + "account-tokens" + ], + "summary": "Get token details", + "description": "Get the details of a specific API token.", + "operationId": "getToken", + "parameters": [ + { + "$ref": "#/components/parameters/accountTokensGetTokenTokenUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/accountTokensGetToken200" + }, + "401": { + "$ref": "#/components/responses/accountTokensGetToken401" + }, + "404": { + "$ref": "#/components/responses/accountTokensGetToken404" + }, + "default": { + "$ref": "#/components/responses/accountTokensGetTokenDefault" + } + } + }, + "delete": { + "tags": [ + "account-tokens" + ], + "summary": "Revoke a token", + "description": "Revoke a specific API token.", + "operationId": "revokeToken", + "parameters": [ + { + "$ref": "#/components/parameters/accountTokensRevokeTokenTokenUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/accountTokensRevokeToken204" + }, + "401": { + "$ref": "#/components/responses/accountTokensRevokeToken401" + }, + "404": { + "$ref": "#/components/responses/accountTokensRevokeToken404" + }, + "default": { + "$ref": "#/components/responses/accountTokensRevokeTokenDefault" + } + } + } + }, + "/1.3/object-storage-2": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List services", + "description": "Returns a list of object storage services.", + "operationId": "listObjectStorages", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStoragesLimit" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStoragesOffset" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStoragesSort" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorages200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStoragesDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Create service", + "description": "Creates a new object storage service.", + "operationId": "createObjectStorage", + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2CreateObjectStorage" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createObjectStorage201" + }, + "default": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get service details", + "description": "Returns object storage service details by given {service_uuid}.", + "operationId": "getObjectStorage", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getObjectStorage200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageDefault" + } + } + }, + "put": { + "tags": [ + "object-storage-2" + ], + "summary": "Replace service", + "description": "Replaces existing object storage service by given {service_uuid}.", + "operationId": "replaceObjectStorage", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ReplaceObjectStorageServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2ReplaceObjectStorage" + }, + "responses": { + "200": { + "$ref": "#/components/responses/replaceObjectStorage200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ReplaceObjectStorageDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete service", + "description": "Deletes existing object storage service by given {service_uuid}.", + "operationId": "deleteObjectStorage", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageForce" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteObjectStorage204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageDefault" + } + } + }, + "patch": { + "tags": [ + "object-storage-2" + ], + "summary": "Modify service", + "description": "Modifies existing object storage service by given {service_uuid}.", + "operationId": "modifyObjectStorage", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ModifyObjectStorageServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2ModifyObjectStorage" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyObjectStorage200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ModifyObjectStorageDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/networks": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List networks", + "description": "Returns a list of available service networks by given {service_uuid}.", + "operationId": "listObjectStorageNetworks", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageNetworksServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageNetworks200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageNetworksDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Create network", + "description": "Creates a new service network by given {service_uuid}.", + "operationId": "createObjectStorageNetwork", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageNetworkServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2CreateObjectStorageNetwork" + }, + "responses": { + "201": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageNetwork201" + }, + "default": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageNetworkDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/networks/{network-name}": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get network details", + "description": "Returns service network details by given {service_uuid} and {network_name}.", + "operationId": "getObjectStorageNetwork", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageNetworkServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageNetworkNetworkName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageNetwork200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageNetworkDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete network", + "description": "Deletes existing network by given {service_uuid} and {network_name}.", + "operationId": "deleteObjectStorageNetwork", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageNetworkServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageNetworkNetworkName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageNetwork204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageNetworkDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/custom-domains": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List custom domains", + "description": "Returns a list of custom domains attached to a service by given {service_uuid}.", + "operationId": "listObjectStorageCustomDomains", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageCustomDomainsServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageCustomDomains200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageCustomDomainsDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Attach custom domain", + "description": "Attaches a new custom domain to the service identified by {service_uuid}.", + "operationId": "attachObjectStorageCustomDomain", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2AttachObjectStorageCustomDomainServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2AttachObjectStorageCustomDomain" + }, + "responses": { + "201": { + "$ref": "#/components/responses/objectStorage2AttachObjectStorageCustomDomain201" + }, + "default": { + "$ref": "#/components/responses/objectStorage2AttachObjectStorageCustomDomainDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/custom-domains/{custom-domain-name}": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get custom domain details", + "description": "Returns custom domain details by given {service_uuid} and {domain_name}.", + "operationId": "getObjectStorageCustomDomain", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageCustomDomainServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageCustomDomainCustomDomainName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageCustomDomain200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageCustomDomainDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete custom domain", + "description": "Deletes existing custom domain by given {service_uuid} and {domain_name}.", + "operationId": "deleteObjectStorageCustomDomain", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageCustomDomainServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageCustomDomainCustomDomainName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageCustomDomain204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageCustomDomainDefault" + } + } + }, + "patch": { + "tags": [ + "object-storage-2" + ], + "summary": "Modify custom domain", + "description": "Modifies existing custom domain by given {service_uuid} and {domain_name}.", + "operationId": "modifyObjectStorageCustomDomain", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ModifyObjectStorageCustomDomainServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2ModifyObjectStorageCustomDomainCustomDomainName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2ModifyObjectStorageCustomDomain" + }, + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ModifyObjectStorageCustomDomain200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ModifyObjectStorageCustomDomainDefault" + } + } + } + }, + "/1.3/object-storage-2/regions": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List regions", + "description": "Returns a list of available managed object storage regions.", + "operationId": "listObjectStorageRegions", + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageRegions200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageRegionsDefault" + } + } + } + }, + "/1.3/object-storage-2/regions/{region-name}": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get region details", + "description": "Returns object storage region details by given {name}.", + "operationId": "getObjectStorageRegion", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageRegionRegionName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageRegion200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageRegionDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/metrics": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get service metrics", + "description": "Returns object storage metrics by given {service_uuid}.", + "operationId": "getObjectStorageMetrics", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageMetricsServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageMetrics200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageMetricsDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/buckets": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List bucket metrics", + "description": "Returns metrics for buckets within a service.", + "operationId": "listObjectStorageBucketMetrics", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageBucketMetricsServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageBucketMetricsLimit" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageBucketMetricsOffset" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageBucketMetrics200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageBucketMetricsDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Create bucket", + "description": "Creates a new service bucket by the given {service_uuid}.", + "operationId": "createObjectStorageBucket", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageBucketServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2CreateObjectStorageBucket" + }, + "responses": { + "201": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageBucket201" + }, + "default": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageBucketDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/buckets/{bucket-name}": { + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete bucket", + "description": "Deletes an existing bucket by given {service_uuid} and {bucket_name}. This API call will remove all objects from the bucket permanently and cannot be reversed.", + "operationId": "deleteObjectStorageBucket", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageBucketServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageBucketBucketName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageBucket204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageBucketDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/metrics/series": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List service metrics series", + "description": "Returns Object Storage instance metrics series by a given {service_uuid}.", + "operationId": "listObjectStorageMetricsSeries", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageMetricsSeriesServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageMetricsSeriesFrom" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageMetricsSeriesTo" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageMetricsSeriesInterval" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageMetricsSeriesSort" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageMetricsSeriesLimit" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageMetricsSeriesOffset" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageMetricsSeries200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageMetricsSeriesDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/labels": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List labels", + "description": "Returns a list of available service labels by given {service_uuid}.", + "operationId": "listObjectStorageLabels", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageLabelsServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageLabels200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageLabelsDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Create label", + "description": "Creates a new label by given {service_uuid}. Labels are used for service filtering.", + "operationId": "createObjectStorageLabel", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageLabelServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2CreateObjectStorageLabel" + }, + "responses": { + "201": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageLabel201" + }, + "default": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageLabelDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/labels/{label-key}": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get label details", + "description": "Returns label details by given {service_uuid} and {key}.", + "operationId": "getObjectStorageLabel", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageLabelServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageLabelLabelKey" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageLabel200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageLabelDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete label", + "description": "Deletes existing label by given {service_uuid} and {key}.", + "operationId": "deleteObjectStorageLabel", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageLabelServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageLabelLabelKey" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageLabel204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageLabelDefault" + } + } + }, + "patch": { + "tags": [ + "object-storage-2" + ], + "summary": "Modify label", + "description": "Modifies existing label by given {service_uuid} and {key}.", + "operationId": "modifyObjectStorageLabel", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ModifyObjectStorageLabelServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2ModifyObjectStorageLabelLabelKey" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2ModifyObjectStorageLabel" + }, + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ModifyObjectStorageLabel200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ModifyObjectStorageLabelDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/static-websites": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List static website configurations", + "description": "Returns all static website configurations for a service along with available domains.", + "operationId": "listObjectStorageStaticWebsites", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageStaticWebsitesServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageStaticWebsites200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageStaticWebsitesDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Create static website configuration", + "description": "Creates a new static website hosting configuration for a domain.", + "operationId": "createObjectStorageStaticWebsite", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageStaticWebsiteServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2CreateObjectStorageStaticWebsite" + }, + "responses": { + "201": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageStaticWebsite201" + }, + "default": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageStaticWebsiteDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/static-websites/{custom-domain-name}": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get static website configuration", + "description": "Returns a static website configuration for a specific domain.", + "operationId": "getObjectStorageStaticWebsite", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageStaticWebsiteServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageStaticWebsiteCustomDomainName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageStaticWebsite200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageStaticWebsiteDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete static website configuration", + "description": "Deletes a static website configuration.", + "operationId": "deleteObjectStorageStaticWebsite", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageStaticWebsiteServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageStaticWebsiteCustomDomainName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageStaticWebsite204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageStaticWebsiteDefault" + } + } + }, + "patch": { + "tags": [ + "object-storage-2" + ], + "summary": "Modify static website configuration", + "description": "Updates an existing static website configuration.", + "operationId": "modifyObjectStorageStaticWebsite", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ModifyObjectStorageStaticWebsiteServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2ModifyObjectStorageStaticWebsiteCustomDomainName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2ModifyObjectStorageStaticWebsite" + }, + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ModifyObjectStorageStaticWebsite200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ModifyObjectStorageStaticWebsiteDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/domains": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List service domains", + "description": "Returns all domains associated with this service (public endpoint, private endpoint, custom domains) along with their static website hosting status.", + "operationId": "listObjectStorageDomains", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageDomainsServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageDomains200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageDomainsDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/users": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List users", + "description": "Returns a list of available service users by given {service_uuid}.", + "operationId": "listObjectStorageUsers", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageUsersServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageUsers200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageUsersDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Create user", + "description": "Creates a new service user by given {service_uuid}.", + "operationId": "createObjectStorageUser", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageUserServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2CreateObjectStorageUser" + }, + "responses": { + "201": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageUser201" + }, + "default": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageUserDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/users/{username}": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get user details", + "description": "Returns service user details by given {service_uuid} and {username}.", + "operationId": "getObjectStorageUser", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageUserServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageUserUsername" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageUser200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageUserDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete user", + "description": "Deletes existing user by given {service_uuid} and {username}.", + "operationId": "deleteObjectStorageUser", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageUserServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageUserUsername" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageUser204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageUserDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/users/{username}/access-keys": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List access keys", + "description": "Returns a list of available access keys for a user.", + "operationId": "listObjectStorageAccessKeys", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageAccessKeysServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageAccessKeysUsername" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageAccessKeys200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageAccessKeysDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Create access key", + "description": "Creates a new access key by given {service_uuid} and {username}.", + "operationId": "createObjectStorageAccessKey", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageAccessKeyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageAccessKeyUsername" + } + ], + "responses": { + "201": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageAccessKey201" + }, + "default": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageAccessKeyDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/users/{username}/access-keys/{access-key-id}": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get access key details", + "description": "Returns access key details by given {service_uuid}, {username}, and {access-key-id}.", + "operationId": "getObjectStorageAccessKeyDetails", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageAccessKeyDetailsServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageAccessKeyDetailsUsername" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageAccessKeyDetailsAccessKeyId" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageAccessKeyDetails200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageAccessKeyDetailsDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete access key", + "description": "Deletes existing access key by given {service_uuid}, {username}, and {access-key-id}.", + "operationId": "deleteObjectStorageAccessKey", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageAccessKeyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageAccessKeyUsername" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageAccessKeyAccessKeyId" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageAccessKey204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageAccessKeyDefault" + } + } + }, + "patch": { + "tags": [ + "object-storage-2" + ], + "summary": "Modify access key details", + "description": "Modifies access key details.", + "operationId": "modifyObjectStorageAccessKeyDetails", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ModifyObjectStorageAccessKeyDetailsServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2ModifyObjectStorageAccessKeyDetailsUsername" + }, + { + "$ref": "#/components/parameters/objectStorage2ModifyObjectStorageAccessKeyDetailsAccessKeyId" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2ModifyObjectStorageAccessKeyDetails" + }, + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ModifyObjectStorageAccessKeyDetails200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ModifyObjectStorageAccessKeyDetailsDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/users/{username}/policies": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List attached user policies", + "description": "Returns a list of attached user policies for a user.", + "operationId": "listObjectStorageAttachedUserPolicies", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageAttachedUserPoliciesServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageAttachedUserPoliciesUsername" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageAttachedUserPolicies200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageAttachedUserPoliciesDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Attach user policy", + "description": "Attach a policy to a user.", + "operationId": "attachObjectStorageUserPolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2AttachObjectStorageUserPolicyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2AttachObjectStorageUserPolicyUsername" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2AttachObjectStorageUserPolicy" + }, + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2AttachObjectStorageUserPolicy204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2AttachObjectStorageUserPolicyDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/users/{username}/policies/{nested-name}": { + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Detach user policy", + "description": "Detach a policy from a user.", + "operationId": "detachObjectStorageUserPolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DetachObjectStorageUserPolicyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DetachObjectStorageUserPolicyUsername" + }, + { + "$ref": "#/components/parameters/objectStorage2DetachObjectStorageUserPolicyNestedName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DetachObjectStorageUserPolicy204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DetachObjectStorageUserPolicyDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/users/{username}/inline-policies/{user-policy-name}": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get user inline policy", + "description": "Get the user inline policy by the given {service_uuid}, {username} and {policy_name}.", + "operationId": "getObjectStorageUserInlinePolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageUserInlinePolicyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageUserInlinePolicyUsername" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageUserInlinePolicyUserPolicyName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageUserInlinePolicy200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageUserInlinePolicyDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete user inline policy", + "description": "Deletes the user inline policy by the given {service_uuid}, {username}, and {policy_name}.", + "operationId": "deleteObjectStorageUserInlinePolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageUserInlinePolicyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageUserInlinePolicyUsername" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageUserInlinePolicyUserPolicyName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageUserInlinePolicy204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageUserInlinePolicyDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/users/{username}/inline-policies": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List user inline policies", + "description": "Lists the user inline policies by the given {service_uuid}, and {username}.", + "operationId": "listObjectStorageUserInlinePolicies", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageUserInlinePoliciesServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageUserInlinePoliciesUsername" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageUserInlinePolicies200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageUserInlinePoliciesDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Create user inline policy", + "description": "Creates a user inline policy by the given {service_uuid}, and {username}.", + "operationId": "createObjectStorageUserInlinePolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageUserInlinePolicyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageUserInlinePolicyUsername" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2CreateObjectStorageUserInlinePolicy" + }, + "responses": { + "201": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageUserInlinePolicy201" + }, + "default": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageUserInlinePolicyDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/users/{username}/tags": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get user tags", + "description": "Returns a user's tags by the given {service_uuid}, and {username}.", + "operationId": "getObjectStorageUserTags", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageUserTagsServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageUserTagsUsername" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageUserTags200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageUserTagsDefault" + } + } + }, + "put": { + "tags": [ + "object-storage-2" + ], + "summary": "Replace user tags", + "description": "Replaces a user's tags by the given {service_uuid}, and {username}.", + "operationId": "replaceObjectStorageUserTags", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ReplaceObjectStorageUserTagsServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2ReplaceObjectStorageUserTagsUsername" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2ReplaceObjectStorageUserTags" + }, + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ReplaceObjectStorageUserTags200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ReplaceObjectStorageUserTagsDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/users/{username}/tags/{user-tag-key}": { + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete user tag", + "description": "Deletes a user's tag by the given {service_uuid}, {username}, and {tag_key}.", + "operationId": "deleteObjectStorageUserTag", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageUserTagServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageUserTagUsername" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageUserTagUserTagKey" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageUserTag204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageUserTagDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/users/{username}/permissions-boundary": { + "put": { + "tags": [ + "object-storage-2" + ], + "summary": "Create user permissions boundary", + "description": "Creates a user's permissions boundary by the given {service_uuid}, and {username}.", + "operationId": "createObjectStorageUserPermissionsBoundary", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageUserPermissionsBoundaryServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageUserPermissionsBoundaryUsername" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2CreateObjectStorageUserPermissionsBoundary" + }, + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageUserPermissionsBoundary200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageUserPermissionsBoundaryDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete user permissions boundary", + "description": "Deletes a user's permissions boundary by the given {service_uuid}, and {username}.", + "operationId": "deleteObjectStorageUserPermissionsBoundary", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageUserPermissionsBoundaryServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageUserPermissionsBoundaryUsername" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageUserPermissionsBoundary204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageUserPermissionsBoundaryDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/policies/{policy-name}/versions": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List policy versions", + "description": "Lists policy versions given by {service_uuid}, and {policy_name}.", + "operationId": "listObjectStoragePolicyVersions", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStoragePolicyVersionsServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStoragePolicyVersionsPolicyName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStoragePolicyVersions200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStoragePolicyVersionsDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Create policy version", + "description": "Creates a policy version by the given {service_uuid}, and {policy_name}.", + "operationId": "createObjectStoragePolicyVersion", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStoragePolicyVersionServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStoragePolicyVersionPolicyName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2CreateObjectStoragePolicyVersion" + }, + "responses": { + "201": { + "$ref": "#/components/responses/objectStorage2CreateObjectStoragePolicyVersion201" + }, + "default": { + "$ref": "#/components/responses/objectStorage2CreateObjectStoragePolicyVersionDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/policies/{policy-name}/versions/{policy-version}": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get policy version", + "description": "Get a single policy version by the given {service_uuid}, {policy_name}, and {policy_version}.", + "operationId": "getObjectStoragePolicyVersion", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStoragePolicyVersionServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStoragePolicyVersionPolicyName" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStoragePolicyVersionPolicyVersion" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStoragePolicyVersion200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStoragePolicyVersionDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete a policy version", + "description": "Deletes a policy version by the given {service_uuid}, {policy_name}, and {policy_version}.", + "operationId": "deleteObjectStoragePolicyVersion", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStoragePolicyVersionServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStoragePolicyVersionPolicyName" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStoragePolicyVersionPolicyVersion" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStoragePolicyVersion204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStoragePolicyVersionDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/policies/{policy-name}": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get policy details", + "description": "Returns service policy details by given {service_uuid} and {policy_name}.", + "operationId": "getObjectStoragePolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStoragePolicyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStoragePolicyPolicyName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStoragePolicy200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStoragePolicyDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete policy", + "description": "Deletes existing policy by given {service_uuid} and {policy_name}.", + "operationId": "deleteObjectStoragePolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStoragePolicyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStoragePolicyPolicyName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStoragePolicy204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStoragePolicyDefault" + } + } + }, + "patch": { + "tags": [ + "object-storage-2" + ], + "summary": "Set default policy version", + "description": "Sets the default version for a policy. Note: This is mapped from ModifyPolicyVersion handler.", + "operationId": "setObjectStorageDefaultPolicyVersion", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2SetObjectStorageDefaultPolicyVersionServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2SetObjectStorageDefaultPolicyVersionPolicyName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2SetObjectStorageDefaultPolicyVersion" + }, + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2SetObjectStorageDefaultPolicyVersion200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2SetObjectStorageDefaultPolicyVersionDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/policies": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List policies", + "description": "Returns a list of available service policies by given {service_uuid}.", + "operationId": "listObjectStoragePolicies", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStoragePoliciesServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStoragePolicies200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStoragePoliciesDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Create policy", + "description": "Creates a new service policy by given {service_uuid}.", + "operationId": "createObjectStoragePolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStoragePolicyServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2CreateObjectStoragePolicy" + }, + "responses": { + "201": { + "$ref": "#/components/responses/objectStorage2CreateObjectStoragePolicy201" + }, + "default": { + "$ref": "#/components/responses/objectStorage2CreateObjectStoragePolicyDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/groups/{group-name}/policies": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List IAM Group Policies", + "description": "Lists IAM policies attached to a group.", + "operationId": "listObjectStorageIAMGroupPolicies", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageIAMGroupPoliciesServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageIAMGroupPoliciesGroupName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageIAMGroupPolicies200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageIAMGroupPoliciesDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Attach IAM Group Policy", + "description": "Attaches a policy to a group.", + "operationId": "attachObjectStorageIAMGroupPolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2AttachObjectStorageIAMGroupPolicyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2AttachObjectStorageIAMGroupPolicyGroupName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2AttachObjectStorageIAMGroupPolicy" + }, + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2AttachObjectStorageIAMGroupPolicy204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2AttachObjectStorageIAMGroupPolicyDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/groups/{group-name}/policies/{policy-name}": { + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Detach IAM Group Policy", + "description": "Detaches a policy from a group.", + "operationId": "detachObjectStorageIAMGroupPolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DetachObjectStorageIAMGroupPolicyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DetachObjectStorageIAMGroupPolicyGroupName" + }, + { + "$ref": "#/components/parameters/objectStorage2DetachObjectStorageIAMGroupPolicyPolicyName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DetachObjectStorageIAMGroupPolicy204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DetachObjectStorageIAMGroupPolicyDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/groups": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List groups", + "description": "Returns a list of available service groups by given {service_uuid}.", + "operationId": "listObjectStorageGroups", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageGroupsServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageGroups200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageGroupsDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Create group", + "description": "Creates an iam group.", + "operationId": "createObjectStorageGroup", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageGroupServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2CreateObjectStorageGroup" + }, + "responses": { + "201": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageGroup201" + }, + "default": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageGroupDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/groups/{group-name}": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get group", + "description": "Get a single group identified by {service_uuid}, and {group_name}.", + "operationId": "getObjectStorageGroup", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageGroupServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageGroupGroupName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageGroup200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageGroupDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete group", + "description": "Deletes a group identified by {group_name}.", + "operationId": "deleteObjectStorageGroup", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageGroupServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageGroupGroupName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageGroup204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageGroupDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/groups/{group-name}/users/{username}": { + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Attach user to group", + "description": "Attaches an iam user to a group identified by {group_name}, and {username}.", + "operationId": "attachObjectStorageUserToGroup", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2AttachObjectStorageUserToGroupServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2AttachObjectStorageUserToGroupGroupName" + }, + { + "$ref": "#/components/parameters/objectStorage2AttachObjectStorageUserToGroupUsername" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2AttachObjectStorageUserToGroup204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2AttachObjectStorageUserToGroupDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Remove user from group", + "description": "Removes an iam user from the group identified by {group_name}, and {username}.", + "operationId": "removeObjectStorageUserFromGroup", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2RemoveObjectStorageUserFromGroupServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2RemoveObjectStorageUserFromGroupGroupName" + }, + { + "$ref": "#/components/parameters/objectStorage2RemoveObjectStorageUserFromGroupUsername" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2RemoveObjectStorageUserFromGroup204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2RemoveObjectStorageUserFromGroupDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/groups/{group-name}/inline-policies": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List group inline policies", + "description": "Lists the group inline policies by the given {service_uuid}, and {group_name}.", + "operationId": "listObjectStorageGroupInlinePolicies", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageGroupInlinePoliciesServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageGroupInlinePoliciesGroupName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageGroupInlinePolicies200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageGroupInlinePoliciesDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Create group inline policy", + "description": "Creates a group inline policy by the given {service_uuid}, and {group_name}.", + "operationId": "createObjectStorageGroupInlinePolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageGroupInlinePolicyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageGroupInlinePolicyGroupName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2CreateObjectStorageGroupInlinePolicy" + }, + "responses": { + "201": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageGroupInlinePolicy201" + }, + "default": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageGroupInlinePolicyDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/groups/{group-name}/inline-policies/{group-policy-name}": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get group inline policy", + "description": "Get the group inline policy by the given {service_uuid}, {group_name} and {policy_name}.", + "operationId": "getObjectStorageGroupInlinePolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageGroupInlinePolicyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageGroupInlinePolicyGroupName" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageGroupInlinePolicyGroupPolicyName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageGroupInlinePolicy200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageGroupInlinePolicyDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete group inline policy", + "description": "Deletes the group inline policy by the given {service_uuid}, {group_name}, and {policy_name}.", + "operationId": "deleteObjectStorageGroupInlinePolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageGroupInlinePolicyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageGroupInlinePolicyGroupName" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageGroupInlinePolicyGroupPolicyName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageGroupInlinePolicy204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageGroupInlinePolicyDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/roles": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List Roles", + "description": "Lists the roles.", + "operationId": "listObjectStorageRoles", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageRolesServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageRoles200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageRolesDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Create Role", + "description": "Creates a service IAM role.", + "operationId": "createObjectStorageRole", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageRoleServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2CreateObjectStorageRole" + }, + "responses": { + "201": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageRole201" + }, + "default": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageRoleDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/roles/{role-name}": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get Role", + "description": "Get a single role identified by {service_uuid}, and {role_name}.", + "operationId": "getObjectStorageRole", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageRoleServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageRoleRoleName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageRole200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageRoleDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete Role", + "description": "Deletes a service's IAM role.", + "operationId": "deleteObjectStorageRole", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageRoleServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageRoleRoleName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageRole204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageRoleDefault" + } + } + }, + "patch": { + "tags": [ + "object-storage-2" + ], + "summary": "Update Role", + "description": "Updates a service's IAM role.", + "operationId": "updateObjectStorageRole", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2UpdateObjectStorageRoleServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2UpdateObjectStorageRoleRoleName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2UpdateObjectStorageRole" + }, + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2UpdateObjectStorageRole200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2UpdateObjectStorageRoleDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/inline-policies": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List Role Inline Policies", + "description": "Returns a list of role inline policies by the given {service_uuid}, and {role_name}.", + "operationId": "listObjectStorageRoleInlinePolicies", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageRoleInlinePoliciesServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageRoleInlinePoliciesRoleName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageRoleInlinePolicies200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageRoleInlinePoliciesDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Create role inline policy", + "description": "Creates a role inline policy by the given {service_uuid}, and {role_name}.", + "operationId": "createObjectStorageRoleInlinePolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageRoleInlinePolicyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageRoleInlinePolicyRoleName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2CreateObjectStorageRoleInlinePolicy" + }, + "responses": { + "201": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageRoleInlinePolicy201" + }, + "default": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageRoleInlinePolicyDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/inline-policies/{role-policy-name}": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get Role Inline Policy", + "description": "Returns a role's inline policy by the given {service_uuid}, {role_name}, and {policy_name}.", + "operationId": "getObjectStorageRoleInlinePolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageRoleInlinePolicyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageRoleInlinePolicyRoleName" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageRoleInlinePolicyRolePolicyName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageRoleInlinePolicy200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageRoleInlinePolicyDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete role inline policy", + "description": "Delete a role inline policy by the given {service_uuid}, {role_name} and {policy_name}.", + "operationId": "deleteObjectStorageRoleInlinePolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageRoleInlinePolicyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageRoleInlinePolicyRoleName" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageRoleInlinePolicyRolePolicyName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageRoleInlinePolicy204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageRoleInlinePolicyDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/permissions-boundary": { + "put": { + "tags": [ + "object-storage-2" + ], + "summary": "Create role permissions boundary", + "description": "Creates a role policy's permissions boundary by the given {service_uuid}, and {role_name}.", + "operationId": "createObjectStorageRolePermissionsBoundary", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageRolePermissionsBoundaryServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2CreateObjectStorageRolePermissionsBoundaryRoleName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2CreateObjectStorageRolePermissionsBoundary" + }, + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageRolePermissionsBoundary200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2CreateObjectStorageRolePermissionsBoundaryDefault" + } + } + }, + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete role permissions boundary", + "description": "Deletes a role permissions boundary by the given {service_uuid}, and {role_name}.", + "operationId": "deleteObjectStorageRolePermissionsBoundary", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageRolePermissionsBoundaryServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageRolePermissionsBoundaryRoleName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageRolePermissionsBoundary204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageRolePermissionsBoundaryDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/assume-role-policy": { + "put": { + "tags": [ + "object-storage-2" + ], + "summary": "Assume Role Policy", + "description": "Assume a role policy by the given {service_uuid}, and {role_name}.", + "operationId": "assumeObjectStorageRolePolicy", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2AssumeObjectStorageRolePolicyServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2AssumeObjectStorageRolePolicyRoleName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2AssumeObjectStorageRolePolicy" + }, + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2AssumeObjectStorageRolePolicy200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2AssumeObjectStorageRolePolicyDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/policies": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "List Attached Role Policies", + "description": "Lists all policies attached to a service's IAM role.", + "operationId": "listObjectStorageAttachedRolePolicies", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageAttachedRolePoliciesServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2ListObjectStorageAttachedRolePoliciesRoleName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageAttachedRolePolicies200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ListObjectStorageAttachedRolePoliciesDefault" + } + } + }, + "post": { + "tags": [ + "object-storage-2" + ], + "summary": "Attach Policy To Role", + "description": "Attaches a policy to a service's IAM role.", + "operationId": "attachObjectStoragePolicyToRole", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2AttachObjectStoragePolicyToRoleServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2AttachObjectStoragePolicyToRoleRoleName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2AttachObjectStoragePolicyToRole" + }, + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2AttachObjectStoragePolicyToRole204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2AttachObjectStoragePolicyToRoleDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/policies/{role-policy-name}": { + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Detach Policy From Role", + "description": "Detaches a policy from a service's IAM role.", + "operationId": "detachObjectStoragePolicyFromRole", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DetachObjectStoragePolicyFromRoleServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DetachObjectStoragePolicyFromRoleRoleName" + }, + { + "$ref": "#/components/parameters/objectStorage2DetachObjectStoragePolicyFromRoleRolePolicyName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DetachObjectStoragePolicyFromRole204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DetachObjectStoragePolicyFromRoleDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/tags": { + "get": { + "tags": [ + "object-storage-2" + ], + "summary": "Get role tags", + "description": "Returns a role's tags by the given {service_uuid}, and {role_name}.", + "operationId": "getObjectStorageRoleTags", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageRoleTagsServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2GetObjectStorageRoleTagsRoleName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageRoleTags200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2GetObjectStorageRoleTagsDefault" + } + } + }, + "put": { + "tags": [ + "object-storage-2" + ], + "summary": "Replace role tags", + "description": "Replaces a role's tags by the given {service_uuid}, and {role_name}.", + "operationId": "replaceObjectStorageRoleTags", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2ReplaceObjectStorageRoleTagsServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2ReplaceObjectStorageRoleTagsRoleName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/objectStorage2ReplaceObjectStorageRoleTags" + }, + "responses": { + "200": { + "$ref": "#/components/responses/objectStorage2ReplaceObjectStorageRoleTags200" + }, + "default": { + "$ref": "#/components/responses/objectStorage2ReplaceObjectStorageRoleTagsDefault" + } + } + } + }, + "/1.3/object-storage-2/{service-uuid}/roles/{role-name}/tags/{role-tag-key}": { + "delete": { + "tags": [ + "object-storage-2" + ], + "summary": "Delete role tag", + "description": "Deletes a role's tag by the given {service_uuid}, {role_name}, and {tag_key}.", + "operationId": "deleteObjectStorageRoleTag", + "parameters": [ + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageRoleTagServiceUuid" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageRoleTagRoleName" + }, + { + "$ref": "#/components/parameters/objectStorage2DeleteObjectStorageRoleTagRoleTagKey" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageRoleTag204" + }, + "default": { + "$ref": "#/components/responses/objectStorage2DeleteObjectStorageRoleTagDefault" + } + } + } + }, + "/1.3/file-storage": { + "get": { + "tags": [ + "file-storage" + ], + "summary": "List services", + "description": "Returns a list of File Storage services.", + "operationId": "listFileStorages", + "parameters": [ + { + "$ref": "#/components/parameters/listFileStoragesLimit" + }, + { + "$ref": "#/components/parameters/listFileStoragesOffset" + }, + { + "$ref": "#/components/parameters/listFileStoragesSort" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listFileStorages200" + }, + "default": { + "$ref": "#/components/responses/listFileStoragesDefault" + } + } + }, + "post": { + "tags": [ + "file-storage" + ], + "summary": "Create service", + "description": "Creates a new File Storage service.", + "operationId": "createFileStorage", + "requestBody": { + "$ref": "#/components/requestBodies/createFileStorage" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createFileStorage201" + }, + "default": { + "$ref": "#/components/responses/createFileStorageDefault" + } + } + } + }, + "/1.3/file-storage/{service-uuid}": { + "get": { + "tags": [ + "file-storage" + ], + "summary": "Get service details", + "description": "Returns managed File Storage details by given {service_uuid}.", + "operationId": "getFileStorage", + "parameters": [ + { + "$ref": "#/components/parameters/getFileStorageServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getFileStorage200" + }, + "default": { + "$ref": "#/components/responses/getFileStorageDefault" + } + } + }, + "put": { + "tags": [ + "file-storage" + ], + "summary": "Replace service", + "description": "Replaces existing File Storage service by given {service_uuid}.", + "operationId": "replaceFileStorage", + "parameters": [ + { + "$ref": "#/components/parameters/replaceFileStorageServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/replaceFileStorage" + }, + "responses": { + "200": { + "$ref": "#/components/responses/replaceFileStorage200" + }, + "default": { + "$ref": "#/components/responses/replaceFileStorageDefault" + } + } + }, + "delete": { + "tags": [ + "file-storage" + ], + "summary": "Delete service", + "description": "Deletes existing File Storage service by given {service_uuid}.", + "operationId": "deleteFileStorage", + "parameters": [ + { + "$ref": "#/components/parameters/deleteFileStorageServiceUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteFileStorage204" + }, + "default": { + "$ref": "#/components/responses/deleteFileStorageDefault" + } + } + }, + "patch": { + "tags": [ + "file-storage" + ], + "summary": "Modify service", + "description": "Modifies existing File Storage service by given {service_uuid}.", + "operationId": "modifyFileStorage", + "parameters": [ + { + "$ref": "#/components/parameters/modifyFileStorageServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyFileStorage" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyFileStorage200" + }, + "default": { + "$ref": "#/components/responses/modifyFileStorageDefault" + } + } + } + }, + "/1.3/file-storage/{service-uuid}/networks": { + "get": { + "tags": [ + "file-storage" + ], + "summary": "List networks", + "description": "Returns a list of available service networks by given {service_uuid}.", + "operationId": "listFileStorageNetworks", + "parameters": [ + { + "$ref": "#/components/parameters/listFileStorageNetworksServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listFileStorageNetworks200" + }, + "default": { + "$ref": "#/components/responses/listFileStorageNetworksDefault" + } + } + }, + "post": { + "tags": [ + "file-storage" + ], + "summary": "Create network", + "description": "Creates a new service network by given {service_uuid}.", + "operationId": "createFileStorageNetwork", + "parameters": [ + { + "$ref": "#/components/parameters/createFileStorageNetworkServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createFileStorageNetwork" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createFileStorageNetwork201" + }, + "default": { + "$ref": "#/components/responses/createFileStorageNetworkDefault" + } + } + } + }, + "/1.3/file-storage/{service-uuid}/networks/{network-name}": { + "get": { + "tags": [ + "file-storage" + ], + "summary": "Get network details", + "description": "Returns service network details by given {service_uuid} and {network_name}.", + "operationId": "getFileStorageNetwork", + "parameters": [ + { + "$ref": "#/components/parameters/getFileStorageNetworkServiceUuid" + }, + { + "$ref": "#/components/parameters/getFileStorageNetworkNetworkName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getFileStorageNetwork200" + }, + "default": { + "$ref": "#/components/responses/getFileStorageNetworkDefault" + } + } + }, + "delete": { + "tags": [ + "file-storage" + ], + "summary": "Delete network", + "description": "Deletes existing network by given {service_uuid} and {network_name}.", + "operationId": "deleteFileStorageNetwork", + "parameters": [ + { + "$ref": "#/components/parameters/deleteFileStorageNetworkServiceUuid" + }, + { + "$ref": "#/components/parameters/deleteFileStorageNetworkNetworkName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteFileStorageNetwork204" + }, + "default": { + "$ref": "#/components/responses/deleteFileStorageNetworkDefault" + } + } + }, + "patch": { + "tags": [ + "file-storage" + ], + "summary": "Modify network", + "description": "Modifies existing service network by given {service_uuid} and {network_name}.", + "operationId": "modifyFileStorageNetwork", + "parameters": [ + { + "$ref": "#/components/parameters/modifyFileStorageNetworkServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyFileStorageNetworkNetworkName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyFileStorageNetwork" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyFileStorageNetwork200" + }, + "default": { + "$ref": "#/components/responses/modifyFileStorageNetworkDefault" + } + } + } + }, + "/1.3/file-storage/{service-uuid}/shares": { + "get": { + "tags": [ + "file-storage" + ], + "summary": "List shares", + "description": "Returns a list of available service shares by given {service_uuid}.", + "operationId": "listFileStorageShares", + "parameters": [ + { + "$ref": "#/components/parameters/listFileStorageSharesServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listFileStorageShares200" + }, + "default": { + "$ref": "#/components/responses/listFileStorageSharesDefault" + } + } + }, + "post": { + "tags": [ + "file-storage" + ], + "summary": "Create share", + "description": "Creates a new service share by given {service_uuid}.", + "operationId": "createFileStorageShare", + "parameters": [ + { + "$ref": "#/components/parameters/createFileStorageShareServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createFileStorageShare" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createFileStorageShare201" + }, + "default": { + "$ref": "#/components/responses/createFileStorageShareDefault" + } + } + } + }, + "/1.3/file-storage/{service-uuid}/shares/{share-name}": { + "get": { + "tags": [ + "file-storage" + ], + "summary": "Get share details", + "description": "Returns service share details by given {service_uuid} and {share_name}.", + "operationId": "getFileStorageShare", + "parameters": [ + { + "$ref": "#/components/parameters/getFileStorageShareServiceUuid" + }, + { + "$ref": "#/components/parameters/getFileStorageShareShareName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getFileStorageShare200" + }, + "default": { + "$ref": "#/components/responses/getFileStorageShareDefault" + } + } + }, + "delete": { + "tags": [ + "file-storage" + ], + "summary": "Delete share", + "description": "Deletes existing share by given {service_uuid} and {share_name}.", + "operationId": "deleteFileStorageShare", + "parameters": [ + { + "$ref": "#/components/parameters/deleteFileStorageShareServiceUuid" + }, + { + "$ref": "#/components/parameters/deleteFileStorageShareShareName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteFileStorageShare204" + }, + "default": { + "$ref": "#/components/responses/deleteFileStorageShareDefault" + } + } + }, + "patch": { + "tags": [ + "file-storage" + ], + "summary": "Modify share", + "description": "Modifies existing service share by given {service_uuid} and {share_name}.", + "operationId": "modifyFileStorageShare", + "parameters": [ + { + "$ref": "#/components/parameters/modifyFileStorageShareServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyFileStorageShareShareName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyFileStorageShare" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyFileStorageShare200" + }, + "default": { + "$ref": "#/components/responses/modifyFileStorageShareDefault" + } + } + } + }, + "/1.3/file-storage/{service-uuid}/shares/{share-name}/acl": { + "get": { + "tags": [ + "file-storage" + ], + "summary": "List ACLs", + "description": "Returns a list of available ACLs by given {service_uuid} and {share_name}.", + "operationId": "listFileStorageAcls", + "parameters": [ + { + "$ref": "#/components/parameters/listFileStorageAclsServiceUuid" + }, + { + "$ref": "#/components/parameters/listFileStorageAclsShareName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listFileStorageAcls200" + }, + "default": { + "$ref": "#/components/responses/listFileStorageAclsDefault" + } + } + }, + "post": { + "tags": [ + "file-storage" + ], + "summary": "Create ACL", + "description": "Creates a new share ACL by given {service_uuid} and {share_name}.", + "operationId": "createFileStorageAcl", + "parameters": [ + { + "$ref": "#/components/parameters/createFileStorageAclServiceUuid" + }, + { + "$ref": "#/components/parameters/createFileStorageAclShareName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createFileStorageAcl" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createFileStorageAcl201" + }, + "default": { + "$ref": "#/components/responses/createFileStorageAclDefault" + } + } + } + }, + "/1.3/file-storage/{service-uuid}/shares/{share-name}/acl/{acl-name}": { + "get": { + "tags": [ + "file-storage" + ], + "summary": "Get ACL details", + "description": "Returns ACL details by given {service_uuid}, {share_name} and {acl_name}.", + "operationId": "getFileStorageAcl", + "parameters": [ + { + "$ref": "#/components/parameters/getFileStorageAclServiceUuid" + }, + { + "$ref": "#/components/parameters/getFileStorageAclShareName" + }, + { + "$ref": "#/components/parameters/getFileStorageAclAclName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getFileStorageAcl200" + }, + "default": { + "$ref": "#/components/responses/getFileStorageAclDefault" + } + } + }, + "delete": { + "tags": [ + "file-storage" + ], + "summary": "Delete ACL", + "description": "Deletes existing ACL by given {service_uuid}, {share_name} and {acl_name}.", + "operationId": "deleteFileStorageAcl", + "parameters": [ + { + "$ref": "#/components/parameters/deleteFileStorageAclServiceUuid" + }, + { + "$ref": "#/components/parameters/deleteFileStorageAclShareName" + }, + { + "$ref": "#/components/parameters/deleteFileStorageAclAclName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteFileStorageAcl204" + }, + "default": { + "$ref": "#/components/responses/deleteFileStorageAclDefault" + } + } + }, + "patch": { + "tags": [ + "file-storage" + ], + "summary": "Modify ACL", + "description": "Modifies existing ACL by given {service_uuid}, {share_name} and {acl_name}.", + "operationId": "modifyFileStorageAcl", + "parameters": [ + { + "$ref": "#/components/parameters/modifyFileStorageAclServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyFileStorageAclShareName" + }, + { + "$ref": "#/components/parameters/modifyFileStorageAclAclName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyFileStorageAcl" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyFileStorageAcl200" + }, + "default": { + "$ref": "#/components/responses/modifyFileStorageAclDefault" + } + } + } + }, + "/1.3/file-storage/{service-uuid}/labels": { + "get": { + "tags": [ + "file-storage" + ], + "summary": "List labels", + "description": "Returns a list of available service labels by given {service_uuid}.", + "operationId": "listFileStorageLabels", + "parameters": [ + { + "$ref": "#/components/parameters/listFileStorageLabelsServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listFileStorageLabels200" + }, + "default": { + "$ref": "#/components/responses/listFileStorageLabelsDefault" + } + } + }, + "post": { + "tags": [ + "file-storage" + ], + "summary": "Create label", + "description": "Creates a new label by given {service_uuid}. Labels are used for service filtering.", + "operationId": "createFileStorageLabel", + "parameters": [ + { + "$ref": "#/components/parameters/createFileStorageLabelServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createFileStorageLabel" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createFileStorageLabel201" + }, + "default": { + "$ref": "#/components/responses/createFileStorageLabelDefault" + } + } + } + }, + "/1.3/file-storage/{service-uuid}/labels/{label-key}": { + "get": { + "tags": [ + "file-storage" + ], + "summary": "Get label details", + "description": "Returns label details by given {service_uuid} and {key}.", + "operationId": "getFileStorageLabel", + "parameters": [ + { + "$ref": "#/components/parameters/getFileStorageLabelServiceUuid" + }, + { + "$ref": "#/components/parameters/getFileStorageLabelLabelKey" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getFileStorageLabel200" + }, + "default": { + "$ref": "#/components/responses/getFileStorageLabelDefault" + } + } + }, + "delete": { + "tags": [ + "file-storage" + ], + "summary": "Delete label", + "description": "Deletes existing label by given {service_uuid} and {key}.", + "operationId": "deleteFileStorageLabel", + "parameters": [ + { + "$ref": "#/components/parameters/deleteFileStorageLabelServiceUuid" + }, + { + "$ref": "#/components/parameters/deleteFileStorageLabelLabelKey" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteFileStorageLabel204" + }, + "default": { + "$ref": "#/components/responses/deleteFileStorageLabelDefault" + } + } + }, + "patch": { + "tags": [ + "file-storage" + ], + "summary": "Modify label", + "description": "Modifies existing label by given {service_uuid} and {key}.", + "operationId": "modifyFileStorageLabel", + "parameters": [ + { + "$ref": "#/components/parameters/modifyFileStorageLabelServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyFileStorageLabelLabelKey" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyFileStorageLabel" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyFileStorageLabel200" + }, + "default": { + "$ref": "#/components/responses/modifyFileStorageLabelDefault" + } + } + } + }, + "/1.3/file-storage/{service-uuid}/current-state": { + "get": { + "tags": [ + "file-storage" + ], + "summary": "Get service current state", + "description": "Returns the current state of the File Storage service by given {service_uuid}.", + "operationId": "getFileStorageCurrentState", + "parameters": [ + { + "$ref": "#/components/parameters/getFileStorageCurrentStateServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getFileStorageCurrentState200" + }, + "default": { + "$ref": "#/components/responses/getFileStorageCurrentStateDefault" + } + } + } + }, + "/1.3/database/service-types": { + "get": { + "tags": [ + "database" + ], + "summary": "List database types", + "description": "Returns a list of available database types. Contains available legacy plans, zones, database versions supported and the configuration properties for each database. PostgreSQL and MySQL componentised (rdb.*) plans are selected with the plan_* request fields instead of a listed plan name.", + "operationId": "listDatabaseTypes", + "responses": { + "200": { + "$ref": "#/components/responses/listDatabaseTypes200" + }, + "default": { + "$ref": "#/components/responses/listDatabaseTypesDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/plans": { + "get": { + "tags": [ + "database" + ], + "summary": "List database plans", + "description": "Lists available componentised database plans", + "operationId": "listDatabasePlans", + "responses": { + "200": { + "$ref": "#/components/responses/listDatabasePlans200" + }, + "default": { + "$ref": "#/components/responses/listDatabasePlansDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/service-types/{service-type-name}": { + "get": { + "tags": [ + "database" + ], + "summary": "Get database type", + "description": "Returns database type details by given {database_type}. Contains available legacy plans, zones, database versions supported and configuration properties. PostgreSQL and MySQL componentised (rdb.*) plans are selected with the plan_* request fields instead of a listed plan name.", + "operationId": "getDatabaseType", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseTypeServiceTypeName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseType200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseTypeDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database": { + "get": { + "tags": [ + "database" + ], + "summary": "List databases", + "description": "Returns a list of all available Managed Database services. Depending on their database type, Managed Databases services will have different details.", + "operationId": "listDatabases", + "parameters": [ + { + "$ref": "#/components/parameters/listDatabasesLimit" + }, + { + "$ref": "#/components/parameters/listDatabasesOffset" + }, + { + "$ref": "#/components/parameters/listDatabasesSort" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listDatabases200" + }, + "default": { + "$ref": "#/components/responses/listDatabasesDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "database" + ], + "summary": "Create database", + "description": "Creates a new Managed Database instance. New databases are started by default. An initial backup is created automatically on startup and the API will be fully functional only after this backup has been created. The creation might take a while. Note that different databases have different properties that can be passed on creation. For PostgreSQL and MySQL, select the plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines.", + "operationId": "createDatabase", + "requestBody": { + "$ref": "#/components/requestBodies/createDatabase" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createDatabase201" + }, + "default": { + "$ref": "#/components/responses/createDatabaseDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}": { + "get": { + "tags": [ + "database" + ], + "summary": "Get database", + "description": "Returns details of a Managed Database service by its {uuid}.", + "operationId": "getDatabase", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabase200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "database" + ], + "summary": "Delete database", + "description": "Deletes a specified Managed Database. All data will be erased and lost, including backups. If the service is not powered off, it will be powered off before deletion. The state of the service can be anything.", + "operationId": "deleteDatabase", + "parameters": [ + { + "$ref": "#/components/parameters/deleteDatabaseUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteDatabase204" + }, + "default": { + "$ref": "#/components/responses/deleteDatabaseDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "database" + ], + "summary": "Modify database", + "description": "Modifies Managed Database service details by its {uuid} including upgrading plans, migration to other zones and database type-specific configurations. For PostgreSQL and MySQL, change the plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines.", + "operationId": "modifyDatabase", + "parameters": [ + { + "$ref": "#/components/parameters/modifyDatabaseUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyDatabase" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyDatabase200" + }, + "default": { + "$ref": "#/components/responses/modifyDatabaseDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/service-type": { + "patch": { + "tags": [ + "database" + ], + "summary": "Modify database type", + "description": "Update a service's type by the given {service-uuid}.", + "operationId": "modifyDatabaseType", + "parameters": [ + { + "$ref": "#/components/parameters/modifyDatabaseTypeUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyDatabaseType" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyDatabaseType200" + }, + "default": { + "$ref": "#/components/responses/modifyDatabaseTypeDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/clone": { + "post": { + "tags": [ + "database" + ], + "summary": "Clone database", + "description": "Creates a clone of a Managed Database service based on its {uuid}. It is possible to change location, plans and use the point in time feature to clone your service at a specific time using your backups. For PostgreSQL and MySQL, select the clone's plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines.", + "operationId": "cloneDatabase", + "parameters": [ + { + "$ref": "#/components/parameters/cloneDatabaseUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/cloneDatabase" + }, + "responses": { + "201": { + "$ref": "#/components/responses/cloneDatabase201" + }, + "default": { + "$ref": "#/components/responses/cloneDatabaseDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/networks": { + "get": { + "tags": [ + "database" + ], + "summary": "List networks", + "description": "Returns a list of attached SDN networks to a Managed Database service by its {uuid}.", + "operationId": "listDatabaseNetworks", + "parameters": [ + { + "$ref": "#/components/parameters/listDatabaseNetworksUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listDatabaseNetworks200" + }, + "default": { + "$ref": "#/components/responses/listDatabaseNetworksDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "database" + ], + "summary": "Create network", + "description": "Attaches an SDN network to a Managed Database service by its {uuid}.", + "operationId": "createDatabaseNetwork", + "parameters": [ + { + "$ref": "#/components/parameters/createDatabaseNetworkUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createDatabaseNetwork" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createDatabaseNetwork201" + }, + "default": { + "$ref": "#/components/responses/createDatabaseNetworkDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/networks/{network-name}": { + "get": { + "tags": [ + "database" + ], + "summary": "Get network", + "description": "Returns the attached SDN network details to service by its {uuid} and {network_name}.", + "operationId": "getDatabaseNetwork", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseNetworkUuid" + }, + { + "$ref": "#/components/parameters/getDatabaseNetworkNetworkName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseNetwork200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseNetworkDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "database" + ], + "summary": "Delete network", + "description": "Detaches an existing SDN network from a Managed Database service by its {uuid} and {network_name}.", + "operationId": "deleteDatabaseNetwork", + "parameters": [ + { + "$ref": "#/components/parameters/deleteDatabaseNetworkUuid" + }, + { + "$ref": "#/components/parameters/deleteDatabaseNetworkNetworkName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteDatabaseNetwork204" + }, + "default": { + "$ref": "#/components/responses/deleteDatabaseNetworkDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/upgrade": { + "post": { + "tags": [ + "database" + ], + "summary": "Upgrade database", + "description": "Upgrades your PostgreSQL Managed Database service database to a newer major version. Downgrades are not permitted.", + "operationId": "upgradeDatabase", + "parameters": [ + { + "$ref": "#/components/parameters/upgradeDatabaseUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/upgradeDatabase" + }, + "responses": { + "201": { + "$ref": "#/components/responses/upgradeDatabase201" + }, + "default": { + "$ref": "#/components/responses/upgradeDatabaseDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/labels": { + "get": { + "tags": [ + "database" + ], + "summary": "List labels", + "description": "Returns a list of available service labels by given {service_uuid}.", + "operationId": "listDatabaseLabels", + "parameters": [ + { + "$ref": "#/components/parameters/listDatabaseLabelsUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listDatabaseLabels200" + }, + "default": { + "$ref": "#/components/responses/listDatabaseLabelsDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "database" + ], + "summary": "Create label", + "description": "Creates a new label by given {service_uuid}. Labels used for service filtering.", + "operationId": "createDatabaseLabel", + "parameters": [ + { + "$ref": "#/components/parameters/createDatabaseLabelUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createDatabaseLabel" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createDatabaseLabel201" + }, + "default": { + "$ref": "#/components/responses/createDatabaseLabelDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/labels/{label-key}": { + "get": { + "tags": [ + "database" + ], + "summary": "Get label", + "description": "Returns label details by given {service_uuid} and {key}.", + "operationId": "getDatabaseLabel", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseLabelUuid" + }, + { + "$ref": "#/components/parameters/getDatabaseLabelLabelKey" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseLabel200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseLabelDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "database" + ], + "summary": "Delete label", + "description": "Deletes existing label by given {service_uuid} and {key}.", + "operationId": "deleteDatabaseLabel", + "parameters": [ + { + "$ref": "#/components/parameters/deleteDatabaseLabelUuid" + }, + { + "$ref": "#/components/parameters/deleteDatabaseLabelLabelKey" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteDatabaseLabel204" + }, + "default": { + "$ref": "#/components/responses/deleteDatabaseLabelDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "database" + ], + "summary": "Modify label", + "description": "Modifies existing label by given {service_uuid} and {key}.", + "operationId": "modifyDatabaseLabel", + "parameters": [ + { + "$ref": "#/components/parameters/modifyDatabaseLabelUuid" + }, + { + "$ref": "#/components/parameters/modifyDatabaseLabelLabelKey" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyDatabaseLabel" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyDatabaseLabel200" + }, + "default": { + "$ref": "#/components/responses/modifyDatabaseLabelDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/available-extensions": { + "get": { + "tags": [ + "database" + ], + "summary": "Get available extensions", + "description": "Returns a list of available PostgreSQL extensions for the Managed Database service by its {service-uuid}. Only supported for PostgreSQL services.", + "operationId": "getDatabaseAvailableExtensions", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseAvailableExtensionsUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseAvailableExtensions200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseAvailableExtensionsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/pg/available-extensions": { + "get": { + "tags": [ + "database" + ], + "summary": "Get available PostgreSQL extensions", + "description": "Returns a list of available PostgreSQL extensions grouped by PostgreSQL version.", + "operationId": "getPGAvailableExtensions", + "responses": { + "200": { + "$ref": "#/components/responses/databaseGetPGAvailableExtensions200" + }, + "default": { + "$ref": "#/components/responses/databaseGetPGAvailableExtensionsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/versions": { + "get": { + "tags": [ + "database" + ], + "summary": "Get database type versions", + "description": "Returns a list of supported Managed Database service versions.", + "operationId": "getDatabaseTypeVersions", + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseTypeVersions200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseTypeVersionsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/access-control": { + "get": { + "tags": [ + "database" + ], + "summary": "Get access controls (OpenSearch)", + "description": "Return access controls settings for the OpenSearch Managed Database service {uuid}.", + "operationId": "getDatabaseAccessControl", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseAccessControlUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseAccessControl200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseAccessControlDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "database" + ], + "summary": "Modify access controls (OpenSearch)", + "description": "Modifies the user {username} access control for the Managed Database service {uuid}.", + "operationId": "modifyDatabaseAccessControl", + "parameters": [ + { + "$ref": "#/components/parameters/modifyDatabaseAccessControlUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyDatabaseAccessControl" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyDatabaseAccessControl200" + }, + "default": { + "$ref": "#/components/responses/modifyDatabaseAccessControlDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/security": { + "get": { + "tags": [ + "database" + ], + "summary": "Get Security management status (OpenSearch)", + "description": "Returns Security management status for the OpenSearch Managed Database service {uuid}.", + "operationId": "getDatabaseSecurity", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseSecurityUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseSecurity200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseSecurityDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/security/admin": { + "put": { + "tags": [ + "database" + ], + "summary": "Modify Security management admin password (OpenSearch)", + "description": "Modifies Security management admin password for the OpenSearch Managed Database service {uuid}.", + "operationId": "modifyDatabaseSecurityAdmin", + "parameters": [ + { + "$ref": "#/components/parameters/modifyDatabaseSecurityAdminUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyDatabaseSecurityAdmin" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyDatabaseSecurityAdmin200" + }, + "default": { + "$ref": "#/components/responses/modifyDatabaseSecurityAdminDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "database" + ], + "summary": "Enable Security management admin (OpenSearch)", + "description": "Enables Security management admin for the OpenSearch Managed Database service {uuid}.", + "operationId": "enableDatabaseSecurityAdmin", + "parameters": [ + { + "$ref": "#/components/parameters/enableDatabaseSecurityAdminUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/enableDatabaseSecurityAdmin" + }, + "responses": { + "201": { + "$ref": "#/components/responses/enableDatabaseSecurityAdmin201" + }, + "default": { + "$ref": "#/components/responses/enableDatabaseSecurityAdminDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/integration-endpoints": { + "get": { + "tags": [ + "database" + ], + "summary": "List integration endpoints", + "description": "Returns a list of available integration endpoints.", + "operationId": "listDatabaseIntegrationEndpoints", + "responses": { + "200": { + "$ref": "#/components/responses/listDatabaseIntegrationEndpoints200" + }, + "default": { + "$ref": "#/components/responses/listDatabaseIntegrationEndpointsDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "database" + ], + "summary": "Create integration endpoint", + "description": "Creates a new integration endpoint.", + "operationId": "createDatabaseIntegrationEndpoint", + "requestBody": { + "$ref": "#/components/requestBodies/createDatabaseIntegrationEndpoint" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createDatabaseIntegrationEndpoint201" + }, + "default": { + "$ref": "#/components/responses/createDatabaseIntegrationEndpointDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/integration-endpoints/{integration-uuid}": { + "get": { + "tags": [ + "database" + ], + "summary": "Get integration endpoint", + "description": "Returns integration endpoint details by given {integration-uuid}.", + "operationId": "getDatabaseIntegrationEndpoint", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseIntegrationEndpointIntegrationUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseIntegrationEndpoint200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseIntegrationEndpointDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "database" + ], + "summary": "Delete integration endpoint", + "description": "Deletes existing integration endpoint by given {integration-uuid}.", + "operationId": "deleteDatabaseIntegrationEndpoint", + "parameters": [ + { + "$ref": "#/components/parameters/deleteDatabaseIntegrationEndpointIntegrationUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteDatabaseIntegrationEndpoint204" + }, + "default": { + "$ref": "#/components/responses/deleteDatabaseIntegrationEndpointDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "database" + ], + "summary": "Modify integration endpoint", + "description": "Modifies existing integration endpoint by given {integration-uuid}.", + "operationId": "modifyDatabaseIntegrationEndpoint", + "parameters": [ + { + "$ref": "#/components/parameters/modifyDatabaseIntegrationEndpointIntegrationUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyDatabaseIntegrationEndpoint" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyDatabaseIntegrationEndpoint200" + }, + "default": { + "$ref": "#/components/responses/modifyDatabaseIntegrationEndpointDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/certificate": { + "get": { + "tags": [ + "database" + ], + "summary": "Get account CA certificate", + "description": "Returns the CA certificate. Every customer main account has a private Certificate Authority (CA) that signs certificates for internal use. Managed Database service types, such as PostgreSQL, use it for external connections. To access these services, you must download and configure the certificate on your browser or client.", + "operationId": "getDatabaseAccountCA", + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseAccountCA200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseAccountCADefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/alerts": { + "get": { + "tags": [ + "database" + ], + "summary": "List all alerts", + "description": "Returns all the alerts associated with your Managed Database services.", + "operationId": "listDatabaseAlerts", + "responses": { + "200": { + "$ref": "#/components/responses/listDatabaseAlerts200" + }, + "default": { + "$ref": "#/components/responses/listDatabaseAlertsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/status": { + "get": { + "tags": [ + "database" + ], + "summary": "Get database status", + "description": "Get a service's status by the given {service-uuid}.", + "operationId": "getDatabaseStatus", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseStatusUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseStatus200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseStatusDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/versions": { + "get": { + "tags": [ + "database" + ], + "summary": "Get database versions", + "description": "Returns available versions of the Managed Database service by its {uuid}.", + "operationId": "getDatabaseVersions", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseVersionsUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseVersions200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseVersionsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/start-maintenance": { + "put": { + "tags": [ + "database" + ], + "summary": "Start manual maintenance", + "description": "Start maintenance updates for your Managed Database service if any updates are pending.", + "operationId": "startDatabaseManualMaintenance", + "parameters": [ + { + "$ref": "#/components/parameters/startDatabaseManualMaintenanceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/startDatabaseManualMaintenance200" + }, + "default": { + "$ref": "#/components/responses/startDatabaseManualMaintenanceDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/enable-writes": { + "post": { + "tags": [ + "database" + ], + "summary": "Enable temporary writes", + "description": "Enable temporary writes by the given {service-uuid}.", + "operationId": "enableDatabaseTemporaryWrites", + "parameters": [ + { + "$ref": "#/components/parameters/enableDatabaseTemporaryWritesUuid" + } + ], + "responses": { + "201": { + "$ref": "#/components/responses/enableDatabaseTemporaryWrites201" + }, + "default": { + "$ref": "#/components/responses/enableDatabaseTemporaryWritesDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/migration-status": { + "get": { + "tags": [ + "database" + ], + "summary": "Get database migration status", + "description": "Returns details about the migration progress over time of a Managed database service by its {uuid}.", + "operationId": "getDatabaseMigrationStatus", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseMigrationStatusUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseMigrationStatus200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseMigrationStatusDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/alerts": { + "get": { + "tags": [ + "database" + ], + "summary": "Get database alerts", + "description": "Returns alerts for Managed Database service identified by `{uuid}`.", + "operationId": "getDatabaseAlerts", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseAlertsUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseAlerts200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseAlertsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/metrics": { + "get": { + "tags": [ + "database" + ], + "summary": "Get database metrics", + "description": "Returns metrics related to a Managed Database service by its {uuid} and query parameter {period}.", + "operationId": "getDatabaseMetrics", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseMetricsUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseMetrics200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseMetricsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/query-statistics": { + "get": { + "tags": [ + "database" + ], + "summary": "Get query statistics (MySQL / PostgreSQL)", + "description": "Returns a list of query statistics for the Managed Database service by its {uuid} and optional query parameters {limit}, {offset} and {order}. Query statistics will differ depending on the database type.", + "operationId": "getDatabaseQueryStatistics", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseQueryStatisticsUuid" + }, + { + "$ref": "#/components/parameters/getDatabaseQueryStatisticsLimit" + }, + { + "$ref": "#/components/parameters/getDatabaseQueryStatisticsOffset" + }, + { + "$ref": "#/components/parameters/getDatabaseQueryStatisticsOrder" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseQueryStatistics200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseQueryStatisticsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/logs": { + "get": { + "tags": [ + "database" + ], + "summary": "List logs", + "description": "Returns Managed Database service system-level logs by its {uuid} and optional query parameters {limit}, {offset} and {order}.", + "operationId": "getDatabaseLogs", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseLogsUuid" + }, + { + "$ref": "#/components/parameters/getDatabaseLogsLimit" + }, + { + "$ref": "#/components/parameters/getDatabaseLogsOffset" + }, + { + "$ref": "#/components/parameters/getDatabaseLogsOrder" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseLogs200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseLogsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/connection-pools": { + "get": { + "tags": [ + "database" + ], + "summary": "List connection pools", + "description": "Returns a list of available connection pools for a Managed Database service. Connection pools are available only for PostgreSQL database services.", + "operationId": "listDatabaseConnectionPools", + "parameters": [ + { + "$ref": "#/components/parameters/listDatabaseConnectionPoolsUuid" + }, + { + "$ref": "#/components/parameters/listDatabaseConnectionPoolsSort" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listDatabaseConnectionPools200" + }, + "default": { + "$ref": "#/components/responses/listDatabaseConnectionPoolsDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "database" + ], + "summary": "Create connection pool", + "description": "Creates a connection pool for the Managed Database service {uuid}. Connection pool endpoints are for PostgreSQL Managed Databases only.", + "operationId": "createDatabaseConnectionPool", + "parameters": [ + { + "$ref": "#/components/parameters/createDatabaseConnectionPoolUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createDatabaseConnectionPool" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createDatabaseConnectionPool201" + }, + "default": { + "$ref": "#/components/responses/createDatabaseConnectionPoolDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/connection-pools/{pool-name}": { + "get": { + "tags": [ + "database" + ], + "summary": "Get connection pool", + "description": "Returns the connection pool {pool-name} details for the Managed Database service {uuid}.", + "operationId": "getDatabaseConnectionPool", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseConnectionPoolUuid" + }, + { + "$ref": "#/components/parameters/getDatabaseConnectionPoolPoolName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseConnectionPool200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseConnectionPoolDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "database" + ], + "summary": "Delete connection pool", + "description": "Deletes the connection pool {pool-name} for the Managed Database service {uuid}.", + "operationId": "deleteDatabaseConnectionPool", + "parameters": [ + { + "$ref": "#/components/parameters/deleteDatabaseConnectionPoolUuid" + }, + { + "$ref": "#/components/parameters/deleteDatabaseConnectionPoolPoolName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteDatabaseConnectionPool204" + }, + "default": { + "$ref": "#/components/responses/deleteDatabaseConnectionPoolDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "database" + ], + "summary": "Modify connection pool", + "description": "Modifies the connection pool {pool-name} for the Managed Database service {uuid}.", + "operationId": "modifyDatabaseConnectionPool", + "parameters": [ + { + "$ref": "#/components/parameters/modifyDatabaseConnectionPoolUuid" + }, + { + "$ref": "#/components/parameters/modifyDatabaseConnectionPoolPoolName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyDatabaseConnectionPool" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyDatabaseConnectionPool200" + }, + "default": { + "$ref": "#/components/responses/modifyDatabaseConnectionPoolDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/indices": { + "get": { + "tags": [ + "database" + ], + "summary": "List indices (OpenSearch)", + "description": "Returns a list of available indices for a Managed Database service {uuid}.", + "operationId": "listDatabaseIndices", + "parameters": [ + { + "$ref": "#/components/parameters/listDatabaseIndicesUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listDatabaseIndices200" + }, + "default": { + "$ref": "#/components/responses/listDatabaseIndicesDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/indices/{index-name}": { + "delete": { + "tags": [ + "database" + ], + "summary": "Delete index (OpenSearch)", + "description": "Deletes the index {index_name} for the Managed Database service {uuid}.", + "operationId": "deleteDatabaseIndex", + "parameters": [ + { + "$ref": "#/components/parameters/deleteDatabaseIndexUuid" + }, + { + "$ref": "#/components/parameters/deleteDatabaseIndexIndexName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteDatabaseIndex204" + }, + "default": { + "$ref": "#/components/responses/deleteDatabaseIndexDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/integrations": { + "get": { + "tags": [ + "database" + ], + "summary": "List integrations", + "description": "Returns a list of available service integrations by given {service-uuid}.", + "operationId": "listDatabaseIntegrations", + "parameters": [ + { + "$ref": "#/components/parameters/listDatabaseIntegrationsUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listDatabaseIntegrations200" + }, + "default": { + "$ref": "#/components/responses/listDatabaseIntegrationsDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "database" + ], + "summary": "Create integration", + "description": "Creates a new integration by given {service-uuid}.", + "operationId": "createDatabaseIntegration", + "parameters": [ + { + "$ref": "#/components/parameters/createDatabaseIntegrationUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createDatabaseIntegration" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createDatabaseIntegration201" + }, + "default": { + "$ref": "#/components/responses/createDatabaseIntegrationDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/integrations/{integration-uuid}": { + "get": { + "tags": [ + "database" + ], + "summary": "Get integration", + "description": "Returns integration details by given {service-uuid} and {integration-uuid}.", + "operationId": "getDatabaseIntegration", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseIntegrationUuid" + }, + { + "$ref": "#/components/parameters/getDatabaseIntegrationIntegrationUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseIntegration200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseIntegrationDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "database" + ], + "summary": "Delete integration", + "description": "Deletes existing integration by given {service-uuid} and {integration-uuid}.", + "operationId": "deleteDatabaseIntegration", + "parameters": [ + { + "$ref": "#/components/parameters/deleteDatabaseIntegrationUuid" + }, + { + "$ref": "#/components/parameters/deleteDatabaseIntegrationIntegrationUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteDatabaseIntegration204" + }, + "default": { + "$ref": "#/components/responses/deleteDatabaseIntegrationDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "database" + ], + "summary": "Modify integration", + "description": "Modifies existing integration by given {service-uuid} and {integration-uuid}.", + "operationId": "modifyDatabaseIntegration", + "parameters": [ + { + "$ref": "#/components/parameters/modifyDatabaseIntegrationUuid" + }, + { + "$ref": "#/components/parameters/modifyDatabaseIntegrationIntegrationUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyDatabaseIntegration" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyDatabaseIntegration200" + }, + "default": { + "$ref": "#/components/responses/modifyDatabaseIntegrationDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/databases": { + "get": { + "tags": [ + "database" + ], + "summary": "List logical databases", + "description": "Returns a list of logical databases for a Managed Database service identified by {uuid}.", + "operationId": "listDatabaseLogicalDatabases", + "parameters": [ + { + "$ref": "#/components/parameters/listDatabaseLogicalDatabasesUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listDatabaseLogicalDatabases200" + }, + "default": { + "$ref": "#/components/responses/listDatabaseLogicalDatabasesDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "database" + ], + "summary": "Create logical database", + "description": "Creates a new logical database for the Managed Database service {uuid}.", + "operationId": "createDatabaseLogicalDatabase", + "parameters": [ + { + "$ref": "#/components/parameters/createDatabaseLogicalDatabaseUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createDatabaseLogicalDatabase" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createDatabaseLogicalDatabase201" + }, + "default": { + "$ref": "#/components/responses/createDatabaseLogicalDatabaseDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/databases/{database-name}": { + "delete": { + "tags": [ + "database" + ], + "summary": "Delete logical database", + "description": "Deletes the logical database {database_name} from the Managed Database service {uuid}.", + "operationId": "deleteDatabaseLogicalDatabase", + "parameters": [ + { + "$ref": "#/components/parameters/deleteDatabaseLogicalDatabaseUuid" + }, + { + "$ref": "#/components/parameters/deleteDatabaseLogicalDatabaseDatabaseName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteDatabaseLogicalDatabase204" + }, + "default": { + "$ref": "#/components/responses/deleteDatabaseLogicalDatabaseDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/peering-status": { + "get": { + "tags": [ + "database" + ], + "summary": "Get service peerings status", + "description": "Returns networks peering status for a service by its {uuid}. Only available for services using SDN private networks.", + "operationId": "getDatabasePeeringsStatus", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabasePeeringsStatusUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabasePeeringsStatus200" + }, + "default": { + "$ref": "#/components/responses/getDatabasePeeringsStatusDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/sessions": { + "get": { + "tags": [ + "database" + ], + "summary": "List sessions", + "description": "Returns a list of current sessions details for your Managed Database service by its {uuid} and optional query parameters {limit}, {offset} and {order}.", + "operationId": "getDatabaseSessions", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseSessionsUuid" + }, + { + "$ref": "#/components/parameters/getDatabaseSessionsLimit" + }, + { + "$ref": "#/components/parameters/getDatabaseSessionsOffset" + }, + { + "$ref": "#/components/parameters/getDatabaseSessionsOrder" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseSessions200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseSessionsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/sessions/{pid}": { + "delete": { + "tags": [ + "database" + ], + "summary": "Terminate session", + "description": "Terminates a sessions or kills a running query for a Managed Database service by its {uuid}, session {pid} and optional query parameter {terminate}.", + "operationId": "terminateDatabaseSession", + "parameters": [ + { + "$ref": "#/components/parameters/terminateDatabaseSessionUuid" + }, + { + "$ref": "#/components/parameters/terminateDatabaseSessionPid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/terminateDatabaseSession204" + }, + "default": { + "$ref": "#/components/responses/terminateDatabaseSessionDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/tasks": { + "post": { + "tags": [ + "database" + ], + "summary": "Create task", + "description": "Creates a task that checks for potential errors before starting a migration or upgrade for a Managed Database service by its {uuid}.", + "operationId": "createDatabaseTask", + "parameters": [ + { + "$ref": "#/components/parameters/createDatabaseTaskUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createDatabaseTask" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createDatabaseTask201" + }, + "default": { + "$ref": "#/components/responses/createDatabaseTaskDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/tasks/{task-id}": { + "get": { + "tags": [ + "database" + ], + "summary": "Get task", + "description": "Returns task details of a Managed Database service by its {uuid} and the task {id} obtained from Create Managed Database task.", + "operationId": "getDatabaseTask", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseTaskUuid" + }, + { + "$ref": "#/components/parameters/getDatabaseTaskTaskId" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseTask200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseTaskDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/users": { + "get": { + "tags": [ + "database" + ], + "summary": "List users", + "description": "Returns a list of database users associated with the Managed Database service {uuid}.", + "operationId": "listDatabaseUsers", + "parameters": [ + { + "$ref": "#/components/parameters/listDatabaseUsersUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listDatabaseUsers200" + }, + "default": { + "$ref": "#/components/responses/listDatabaseUsersDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "database" + ], + "summary": "Create user", + "description": "Creates a new user for the Managed Database service {uuid}.", + "operationId": "createDatabaseUser", + "parameters": [ + { + "$ref": "#/components/parameters/createDatabaseUserUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createDatabaseUser" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createDatabaseUser201" + }, + "default": { + "$ref": "#/components/responses/createDatabaseUserDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/users/{username}": { + "get": { + "tags": [ + "database" + ], + "summary": "Get user", + "description": "Returns the user {username} details for the Managed Database service {uuid}.", + "operationId": "getDatabaseUser", + "parameters": [ + { + "$ref": "#/components/parameters/getDatabaseUserUuid" + }, + { + "$ref": "#/components/parameters/getDatabaseUserUsername" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getDatabaseUser200" + }, + "default": { + "$ref": "#/components/responses/getDatabaseUserDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "database" + ], + "summary": "Delete user", + "description": "Deletes the user {username} from the Managed Database service {uuid}.", + "operationId": "deleteDatabaseUser", + "parameters": [ + { + "$ref": "#/components/parameters/deleteDatabaseUserUuid" + }, + { + "$ref": "#/components/parameters/deleteDatabaseUserUsername" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteDatabaseUser204" + }, + "default": { + "$ref": "#/components/responses/deleteDatabaseUserDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "database" + ], + "summary": "Modify user", + "description": "Modifies the user {username} details for the Managed Database service {uuid}.", + "operationId": "modifyDatabaseUser", + "parameters": [ + { + "$ref": "#/components/parameters/modifyDatabaseUserUuid" + }, + { + "$ref": "#/components/parameters/modifyDatabaseUserUsername" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyDatabaseUser" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyDatabaseUser200" + }, + "default": { + "$ref": "#/components/responses/modifyDatabaseUserDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/database/{uuid}/users/{username}/access-control": { + "patch": { + "tags": [ + "database" + ], + "summary": "Modify user access control", + "description": "Return access controls settings for the OpenSearch Managed Database service {uuid}.", + "operationId": "modifyDatabaseUserAccessControl", + "parameters": [ + { + "$ref": "#/components/parameters/modifyDatabaseUserAccessControlUuid" + }, + { + "$ref": "#/components/parameters/modifyDatabaseUserAccessControlUsername" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyDatabaseUserAccessControl" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyDatabaseUserAccessControl200" + }, + "default": { + "$ref": "#/components/responses/modifyDatabaseUserAccessControlDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/gateway/plans": { + "get": { + "tags": [ + "gateway" + ], + "summary": "List Plans", + "description": "List available plans.", + "operationId": "listGatewayPlans", + "parameters": [ + { + "$ref": "#/components/parameters/listGatewayPlansLimit" + }, + { + "$ref": "#/components/parameters/listGatewayPlansOffset" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listGatewayPlans200" + }, + "default": { + "$ref": "#/components/responses/listGatewayPlansDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/gateway/plans/{plan-name}": { + "get": { + "tags": [ + "gateway" + ], + "summary": "Get Plan Details", + "description": "Get plan details.", + "operationId": "getGatewayPlan", + "parameters": [ + { + "$ref": "#/components/parameters/getGatewayPlanPlanName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getGatewayPlan200" + }, + "default": { + "$ref": "#/components/responses/getGatewayPlanDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/gateway": { + "get": { + "tags": [ + "gateway" + ], + "summary": "List Services", + "description": "List available services.", + "operationId": "listGatewayServices", + "parameters": [ + { + "$ref": "#/components/parameters/listGatewayServicesLimit" + }, + { + "$ref": "#/components/parameters/listGatewayServicesOffset" + }, + { + "$ref": "#/components/parameters/listGatewayServicesSort" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listGatewayServices200" + }, + "default": { + "$ref": "#/components/responses/listGatewayServicesDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "gateway" + ], + "summary": "Create Service", + "description": "Create a new service.", + "operationId": "createGatewayService", + "requestBody": { + "$ref": "#/components/requestBodies/createGatewayService" + }, + "responses": { + "200": { + "$ref": "#/components/responses/createGatewayService200" + }, + "default": { + "$ref": "#/components/responses/createGatewayServiceDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/gateway/{service-uuid}": { + "get": { + "tags": [ + "gateway" + ], + "summary": "Get Service Details", + "description": "Get service details.", + "operationId": "getGatewayService", + "parameters": [ + { + "$ref": "#/components/parameters/getGatewayServiceServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getGatewayService200" + }, + "default": { + "$ref": "#/components/responses/getGatewayServiceDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "put": { + "tags": [ + "gateway" + ], + "summary": "Replace Service", + "description": "Replace service configuration.", + "operationId": "replaceGatewayService", + "parameters": [ + { + "$ref": "#/components/parameters/replaceGatewayServiceServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/replaceGatewayService" + }, + "responses": { + "200": { + "$ref": "#/components/responses/replaceGatewayService200" + }, + "default": { + "$ref": "#/components/responses/replaceGatewayServiceDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "gateway" + ], + "summary": "Delete Service", + "description": "Deletes existing service by given {service-identifier}.", + "operationId": "deleteGatewayService", + "parameters": [ + { + "$ref": "#/components/parameters/deleteGatewayServiceServiceUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteGatewayService204" + }, + "default": { + "$ref": "#/components/responses/deleteGatewayServiceDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "gateway" + ], + "summary": "Modify Service", + "description": "Modify service configuration.", + "operationId": "modifyGatewayService", + "parameters": [ + { + "$ref": "#/components/parameters/modifyGatewayServiceServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyGatewayService" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyGatewayService200" + }, + "default": { + "$ref": "#/components/responses/modifyGatewayServiceDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/gateway/{service-uuid}/actions/nat-flush-connections": { + "patch": { + "tags": [ + "gateway" + ], + "summary": "Flush NAT", + "description": "Flush NAT rules.", + "operationId": "flushGatewayNat", + "parameters": [ + { + "$ref": "#/components/parameters/flushGatewayNatServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/flushGatewayNat200" + }, + "default": { + "$ref": "#/components/responses/flushGatewayNatDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/gateway/{service-uuid}/connections": { + "get": { + "tags": [ + "gateway" + ], + "summary": "List Connections", + "description": "List available connections for service.", + "operationId": "listGatewayConnections", + "parameters": [ + { + "$ref": "#/components/parameters/listGatewayConnectionsServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listGatewayConnections200" + }, + "default": { + "$ref": "#/components/responses/listGatewayConnectionsDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "gateway" + ], + "summary": "Create Connection", + "description": "Create a new connection.", + "operationId": "createGatewayConnection", + "parameters": [ + { + "$ref": "#/components/parameters/createGatewayConnectionServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createGatewayConnection" + }, + "responses": { + "200": { + "$ref": "#/components/responses/createGatewayConnection200" + }, + "default": { + "$ref": "#/components/responses/createGatewayConnectionDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/gateway/{service-uuid}/connections/{connection-uuid}": { + "get": { + "tags": [ + "gateway" + ], + "summary": "Get Connection Details", + "description": "Get connection details.", + "operationId": "getGatewayConnection", + "parameters": [ + { + "$ref": "#/components/parameters/getGatewayConnectionServiceUuid" + }, + { + "$ref": "#/components/parameters/getGatewayConnectionConnectionUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getGatewayConnection200" + }, + "default": { + "$ref": "#/components/responses/getGatewayConnectionDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "gateway" + ], + "summary": "Delete Connection", + "description": "Deletes existing connection by given {connection-identifier}.", + "operationId": "deleteGatewayConnection", + "parameters": [ + { + "$ref": "#/components/parameters/deleteGatewayConnectionServiceUuid" + }, + { + "$ref": "#/components/parameters/deleteGatewayConnectionConnectionUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteGatewayConnection204" + }, + "default": { + "$ref": "#/components/responses/deleteGatewayConnectionDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "gateway" + ], + "summary": "Modify Connection", + "description": "Modify connection configuration.", + "operationId": "modifyGatewayConnection", + "parameters": [ + { + "$ref": "#/components/parameters/modifyGatewayConnectionServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyGatewayConnectionConnectionUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyGatewayConnection" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyGatewayConnection200" + }, + "default": { + "$ref": "#/components/responses/modifyGatewayConnectionDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/gateway/{service-uuid}/connections/{connection-uuid}/tunnels": { + "get": { + "tags": [ + "gateway" + ], + "summary": "List Tunnels", + "description": "List available tunnels for service.", + "operationId": "listGatewayTunnels", + "parameters": [ + { + "$ref": "#/components/parameters/listGatewayTunnelsServiceUuid" + }, + { + "$ref": "#/components/parameters/listGatewayTunnelsConnectionUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listGatewayTunnels200" + }, + "default": { + "$ref": "#/components/responses/listGatewayTunnelsDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "gateway" + ], + "summary": "Create Tunnel", + "description": "Create a new tunnel.", + "operationId": "createGatewayTunnel", + "parameters": [ + { + "$ref": "#/components/parameters/createGatewayTunnelServiceUuid" + }, + { + "$ref": "#/components/parameters/createGatewayTunnelConnectionUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createGatewayTunnel" + }, + "responses": { + "200": { + "$ref": "#/components/responses/createGatewayTunnel200" + }, + "default": { + "$ref": "#/components/responses/createGatewayTunnelDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/gateway/{service-uuid}/connections/{connection-uuid}/tunnels/{tunnel-uuid}": { + "get": { + "tags": [ + "gateway" + ], + "summary": "Get Tunnel Details", + "description": "Get tunnel details.", + "operationId": "getGatewayTunnel", + "parameters": [ + { + "$ref": "#/components/parameters/getGatewayTunnelServiceUuid" + }, + { + "$ref": "#/components/parameters/getGatewayTunnelConnectionUuid" + }, + { + "$ref": "#/components/parameters/getGatewayTunnelTunnelUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getGatewayTunnel200" + }, + "default": { + "$ref": "#/components/responses/getGatewayTunnelDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "gateway" + ], + "summary": "Delete Tunnel", + "description": "Deletes existing tunnel by given {tunnel-identifier}.", + "operationId": "deleteGatewayTunnel", + "parameters": [ + { + "$ref": "#/components/parameters/deleteGatewayTunnelServiceUuid" + }, + { + "$ref": "#/components/parameters/deleteGatewayTunnelConnectionUuid" + }, + { + "$ref": "#/components/parameters/deleteGatewayTunnelTunnelUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteGatewayTunnel204" + }, + "default": { + "$ref": "#/components/responses/deleteGatewayTunnelDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "gateway" + ], + "summary": "Modify Tunnel", + "description": "Modify tunnel configuration.", + "operationId": "modifyGatewayTunnel", + "parameters": [ + { + "$ref": "#/components/parameters/modifyGatewayTunnelServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyGatewayTunnelConnectionUuid" + }, + { + "$ref": "#/components/parameters/modifyGatewayTunnelTunnelUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyGatewayTunnel" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyGatewayTunnel200" + }, + "default": { + "$ref": "#/components/responses/modifyGatewayTunnelDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/gateway/{service-uuid}/labels": { + "get": { + "tags": [ + "gateway" + ], + "summary": "List Service Labels", + "description": "List available service labels for service.", + "operationId": "listGatewayServiceLabels", + "parameters": [ + { + "$ref": "#/components/parameters/listGatewayServiceLabelsServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listGatewayServiceLabels200" + }, + "default": { + "$ref": "#/components/responses/listGatewayServiceLabelsDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "gateway" + ], + "summary": "Create Service Label", + "description": "Create a new service label.", + "operationId": "createGatewayServiceLabel", + "parameters": [ + { + "$ref": "#/components/parameters/createGatewayServiceLabelServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createGatewayServiceLabel" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createGatewayServiceLabel201" + }, + "default": { + "$ref": "#/components/responses/createGatewayServiceLabelDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/gateway/{service-uuid}/labels/{label-key}": { + "get": { + "tags": [ + "gateway" + ], + "summary": "Get Service Label Details", + "description": "Get service label details.", + "operationId": "getGatewayServiceLabel", + "parameters": [ + { + "$ref": "#/components/parameters/getGatewayServiceLabelServiceUuid" + }, + { + "$ref": "#/components/parameters/getGatewayServiceLabelLabelKey" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getGatewayServiceLabel200" + }, + "default": { + "$ref": "#/components/responses/getGatewayServiceLabelDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "gateway" + ], + "summary": "Delete Service Label", + "description": "Deletes existing service label by given {service-label-identifier}.", + "operationId": "deleteGatewayServiceLabel", + "parameters": [ + { + "$ref": "#/components/parameters/deleteGatewayServiceLabelServiceUuid" + }, + { + "$ref": "#/components/parameters/deleteGatewayServiceLabelLabelKey" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteGatewayServiceLabel204" + }, + "default": { + "$ref": "#/components/responses/deleteGatewayServiceLabelDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "gateway" + ], + "summary": "Modify Service Label", + "description": "Modify service label configuration.", + "operationId": "modifyGatewayServiceLabel", + "parameters": [ + { + "$ref": "#/components/parameters/modifyGatewayServiceLabelServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyGatewayServiceLabelLabelKey" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyGatewayServiceLabel" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyGatewayServiceLabel200" + }, + "default": { + "$ref": "#/components/responses/modifyGatewayServiceLabelDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/gateway/{service-uuid}/addresses": { + "get": { + "tags": [ + "gateway" + ], + "summary": "List Service Addresses", + "description": "List available service addresses for service.", + "operationId": "listGatewayAddresses", + "parameters": [ + { + "$ref": "#/components/parameters/listGatewayAddressesServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listGatewayAddresses200" + }, + "default": { + "$ref": "#/components/responses/listGatewayAddressesDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/gateway/{service-uuid}/addresses/{address-name}": { + "get": { + "tags": [ + "gateway" + ], + "summary": "Get Service Address Details", + "description": "Get service address details.", + "operationId": "getGatewayAddress", + "parameters": [ + { + "$ref": "#/components/parameters/getGatewayAddressServiceUuid" + }, + { + "$ref": "#/components/parameters/getGatewayAddressAddressName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getGatewayAddress200" + }, + "default": { + "$ref": "#/components/responses/getGatewayAddressDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "gateway" + ], + "summary": "Modify Service Address", + "description": "Modify existing service address by given {service-address-identifier}.", + "operationId": "modifyGatewayAddress", + "parameters": [ + { + "$ref": "#/components/parameters/modifyGatewayAddressServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyGatewayAddressAddressName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyGatewayAddress" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyGatewayAddress200" + }, + "default": { + "$ref": "#/components/responses/modifyGatewayAddressDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/gateway/{service-uuid}/addresses/{address-name}/release": { + "post": { + "tags": [ + "gateway" + ], + "summary": "Release Gateway Floating IP", + "description": "Release the user-provisioned Floating IP of an existing service address by given {service-address-identifier}, reverting it to a service-provisioned address while keeping the same name.", + "operationId": "releaseGatewayFloatingIp", + "parameters": [ + { + "$ref": "#/components/parameters/releaseGatewayFloatingIpServiceUuid" + }, + { + "$ref": "#/components/parameters/releaseGatewayFloatingIpAddressName" + } + ], + "responses": { + "202": { + "$ref": "#/components/responses/releaseGatewayFloatingIp202" + }, + "default": { + "$ref": "#/components/responses/releaseGatewayFloatingIpDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/gateway/{service-uuid}/metrics": { + "get": { + "tags": [ + "gateway" + ], + "summary": "Get Service Metrics", + "description": "List available service metrics for service.", + "operationId": "getGatewayMetrics", + "parameters": [ + { + "$ref": "#/components/parameters/getGatewayMetricsServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getGatewayMetrics200" + }, + "default": { + "$ref": "#/components/responses/getGatewayMetricsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/gateway/{service-uuid}/logs": { + "post": { + "tags": [ + "gateway" + ], + "summary": "Create Service Log Session", + "description": "Create a new service log session.", + "operationId": "createGatewayServiceLogSession", + "parameters": [ + { + "$ref": "#/components/parameters/createGatewayServiceLogSessionServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createGatewayServiceLogSession" + }, + "responses": { + "200": { + "$ref": "#/components/responses/createGatewayServiceLogSession200" + }, + "default": { + "$ref": "#/components/responses/createGatewayServiceLogSessionDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/load-balancer": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "List load balancers", + "description": "Returns a list of available load balancer services.", + "operationId": "listLoadBalancers", + "parameters": [ + { + "$ref": "#/components/parameters/listLoadBalancersLimit" + }, + { + "$ref": "#/components/parameters/listLoadBalancersOffset" + }, + { + "$ref": "#/components/parameters/listLoadBalancersSort" + }, + { + "$ref": "#/components/parameters/listLoadBalancersLabel" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listLoadBalancers200" + }, + "default": { + "$ref": "#/components/responses/listLoadBalancersDefault" + } + } + }, + "post": { + "tags": [ + "load-balancer" + ], + "summary": "Create load balancer", + "description": "Creates a new load balancer service.", + "operationId": "createLoadBalancer", + "requestBody": { + "$ref": "#/components/requestBodies/createLoadBalancer" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createLoadBalancer201" + }, + "default": { + "$ref": "#/components/responses/createLoadBalancerDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer", + "description": "Returns load balancer service details by given {service-uuid}.", + "operationId": "getLoadBalancer", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancer200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerDefault" + } + } + }, + "put": { + "tags": [ + "load-balancer" + ], + "summary": "Replace load balancer", + "description": "Replaces existing load balancer service by given {service-uuid}.", + "operationId": "replaceLoadBalancer", + "parameters": [ + { + "$ref": "#/components/parameters/replaceLoadBalancerServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/replaceLoadBalancer" + }, + "responses": { + "200": { + "$ref": "#/components/responses/replaceLoadBalancer200" + }, + "default": { + "$ref": "#/components/responses/replaceLoadBalancerDefault" + } + } + }, + "delete": { + "tags": [ + "load-balancer" + ], + "summary": "Delete load balancer", + "description": "Deletes existing load balancer service by given {service-uuid}.", + "operationId": "deleteLoadBalancer", + "parameters": [ + { + "$ref": "#/components/parameters/deleteLoadBalancerServiceUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteLoadBalancer204" + }, + "default": { + "$ref": "#/components/responses/deleteLoadBalancerDefault" + } + } + }, + "patch": { + "tags": [ + "load-balancer" + ], + "summary": "Modify load balancer", + "description": "Modifies existing load balancer service by given {service-uuid}.", + "operationId": "modifyLoadBalancer", + "parameters": [ + { + "$ref": "#/components/parameters/modifyLoadBalancerServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyLoadBalancer" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyLoadBalancer200" + }, + "default": { + "$ref": "#/components/responses/modifyLoadBalancerDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/frontends": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "List load balancer frontends", + "description": "Returns a list of available service frontends by given {service-uuid}.", + "operationId": "listLoadBalancerFrontends", + "parameters": [ + { + "$ref": "#/components/parameters/listLoadBalancerFrontendsServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listLoadBalancerFrontends200" + }, + "default": { + "$ref": "#/components/responses/listLoadBalancerFrontendsDefault" + } + } + }, + "post": { + "tags": [ + "load-balancer" + ], + "summary": "Create load balancer frontend", + "description": "Creates a new service frontend by given {service-uuid}.", + "operationId": "createLoadBalancerFrontend", + "parameters": [ + { + "$ref": "#/components/parameters/createLoadBalancerFrontendServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createLoadBalancerFrontend" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createLoadBalancerFrontend201" + }, + "default": { + "$ref": "#/components/responses/createLoadBalancerFrontendDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer frontend", + "description": "Returns service frontend details by given {service-uuid} and {frontend-name}.", + "operationId": "getLoadBalancerFrontend", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerFrontendServiceUuid" + }, + { + "$ref": "#/components/parameters/getLoadBalancerFrontendFrontendName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerFrontend200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerFrontendDefault" + } + } + }, + "delete": { + "tags": [ + "load-balancer" + ], + "summary": "Delete load balancer frontend", + "description": "Deletes existing frontend by given {service-uuid} and {frontend-name}.", + "operationId": "deleteLoadBalancerFrontend", + "parameters": [ + { + "$ref": "#/components/parameters/deleteLoadBalancerFrontendServiceUuid" + }, + { + "$ref": "#/components/parameters/deleteLoadBalancerFrontendFrontendName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteLoadBalancerFrontend204" + }, + "default": { + "$ref": "#/components/responses/deleteLoadBalancerFrontendDefault" + } + } + }, + "patch": { + "tags": [ + "load-balancer" + ], + "summary": "Modify load balancer frontend", + "description": "Modifies existing service frontend by given {service-uuid} and {frontend-name}.", + "operationId": "modifyLoadBalancerFrontend", + "parameters": [ + { + "$ref": "#/components/parameters/modifyLoadBalancerFrontendServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyLoadBalancerFrontendFrontendName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyLoadBalancerFrontend" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyLoadBalancerFrontend200" + }, + "default": { + "$ref": "#/components/responses/modifyLoadBalancerFrontendDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}/tls-configs": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "List load balancer frontend TLS configs", + "description": "Returns a list of available frontend TLS configs by given {service-uuid} and {frontend-name}.", + "operationId": "listLoadBalancerFrontendTlsConfigs", + "parameters": [ + { + "$ref": "#/components/parameters/listLoadBalancerFrontendTlsConfigsServiceUuid" + }, + { + "$ref": "#/components/parameters/listLoadBalancerFrontendTlsConfigsFrontendName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listLoadBalancerFrontendTlsConfigs200" + }, + "default": { + "$ref": "#/components/responses/listLoadBalancerFrontendTlsConfigsDefault" + } + } + }, + "post": { + "tags": [ + "load-balancer" + ], + "summary": "Create load balancer frontend TLS config", + "description": "Creates a new TLS config by given {service-uuid} and {frontend-name}.", + "operationId": "createLoadBalancerFrontendTlsConfig", + "parameters": [ + { + "$ref": "#/components/parameters/createLoadBalancerFrontendTlsConfigServiceUuid" + }, + { + "$ref": "#/components/parameters/createLoadBalancerFrontendTlsConfigFrontendName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createLoadBalancerFrontendTlsConfig" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createLoadBalancerFrontendTlsConfig201" + }, + "default": { + "$ref": "#/components/responses/createLoadBalancerFrontendTlsConfigDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}/tls-configs/{tls-config-name}": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer frontend TLS config", + "description": "Returns frontend TLS config details by given {service-uuid}, {frontend-name}, and {tls-config-name}.", + "operationId": "getLoadBalancerFrontendTlsConfig", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerFrontendTlsConfigServiceUuid" + }, + { + "$ref": "#/components/parameters/getLoadBalancerFrontendTlsConfigFrontendName" + }, + { + "$ref": "#/components/parameters/getLoadBalancerFrontendTlsConfigTlsConfigName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerFrontendTlsConfig200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerFrontendTlsConfigDefault" + } + } + }, + "delete": { + "tags": [ + "load-balancer" + ], + "summary": "Delete load balancer frontend TLS config", + "description": "Deletes existing TLS config by given {service-uuid}, {frontend-name}, and {tls-config-name}.", + "operationId": "deleteLoadBalancerFrontendTlsConfig", + "parameters": [ + { + "$ref": "#/components/parameters/deleteLoadBalancerFrontendTlsConfigServiceUuid" + }, + { + "$ref": "#/components/parameters/deleteLoadBalancerFrontendTlsConfigFrontendName" + }, + { + "$ref": "#/components/parameters/deleteLoadBalancerFrontendTlsConfigTlsConfigName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteLoadBalancerFrontendTlsConfig204" + }, + "default": { + "$ref": "#/components/responses/deleteLoadBalancerFrontendTlsConfigDefault" + } + } + }, + "patch": { + "tags": [ + "load-balancer" + ], + "summary": "Modify load balancer frontend TLS config", + "description": "Modifies existing TLS config by given {service-uuid}, {frontend-name}, and {tls-config-name}.", + "operationId": "modifyLoadBalancerFrontendTlsConfig", + "parameters": [ + { + "$ref": "#/components/parameters/modifyLoadBalancerFrontendTlsConfigServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyLoadBalancerFrontendTlsConfigFrontendName" + }, + { + "$ref": "#/components/parameters/modifyLoadBalancerFrontendTlsConfigTlsConfigName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyLoadBalancerFrontendTlsConfig" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyLoadBalancerFrontendTlsConfig200" + }, + "default": { + "$ref": "#/components/responses/modifyLoadBalancerFrontendTlsConfigDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}/rules": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "List load balancer rules", + "description": "Returns a list of available frontend rules by given {service-uuid} and {frontend-name}.", + "operationId": "listLoadBalancerRules", + "parameters": [ + { + "$ref": "#/components/parameters/listLoadBalancerRulesServiceUuid" + }, + { + "$ref": "#/components/parameters/listLoadBalancerRulesFrontendName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listLoadBalancerRules200" + }, + "default": { + "$ref": "#/components/responses/listLoadBalancerRulesDefault" + } + } + }, + "post": { + "tags": [ + "load-balancer" + ], + "summary": "Create load balancer rule", + "description": "Creates a new rule by given {service-uuid} and {frontend-name}.", + "operationId": "createLoadBalancerRule", + "parameters": [ + { + "$ref": "#/components/parameters/createLoadBalancerRuleServiceUuid" + }, + { + "$ref": "#/components/parameters/createLoadBalancerRuleFrontendName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createLoadBalancerRule" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createLoadBalancerRule201" + }, + "default": { + "$ref": "#/components/responses/createLoadBalancerRuleDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/frontends/{frontend-name}/rules/{rule-name}": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer rule", + "description": "Returns frontend rule details by given {service-uuid}, {frontend-name}, and {rule-name}.", + "operationId": "getLoadBalancerRule", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerRuleServiceUuid" + }, + { + "$ref": "#/components/parameters/getLoadBalancerRuleFrontendName" + }, + { + "$ref": "#/components/parameters/getLoadBalancerRuleRuleName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerRule200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerRuleDefault" + } + } + }, + "put": { + "tags": [ + "load-balancer" + ], + "summary": "Replace load balancer rule", + "description": "Replaces existing rule by given {service-uuid}, {frontend-name}, and {rule-name}.", + "operationId": "replaceLoadBalancerRule", + "parameters": [ + { + "$ref": "#/components/parameters/replaceLoadBalancerRuleServiceUuid" + }, + { + "$ref": "#/components/parameters/replaceLoadBalancerRuleFrontendName" + }, + { + "$ref": "#/components/parameters/replaceLoadBalancerRuleRuleName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/replaceLoadBalancerRule" + }, + "responses": { + "200": { + "$ref": "#/components/responses/replaceLoadBalancerRule200" + }, + "default": { + "$ref": "#/components/responses/replaceLoadBalancerRuleDefault" + } + } + }, + "delete": { + "tags": [ + "load-balancer" + ], + "summary": "Delete load balancer rule", + "description": "Deletes existing rule by given {service-uuid}, {frontend-name}, and {rule-name}.", + "operationId": "deleteLoadBalancerRule", + "parameters": [ + { + "$ref": "#/components/parameters/deleteLoadBalancerRuleServiceUuid" + }, + { + "$ref": "#/components/parameters/deleteLoadBalancerRuleFrontendName" + }, + { + "$ref": "#/components/parameters/deleteLoadBalancerRuleRuleName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteLoadBalancerRule204" + }, + "default": { + "$ref": "#/components/responses/deleteLoadBalancerRuleDefault" + } + } + }, + "patch": { + "tags": [ + "load-balancer" + ], + "summary": "Modify load balancer rule", + "description": "Modifies existing rule by given {service-uuid}, {frontend-name}, and {rule-name}.", + "operationId": "modifyLoadBalancerRule", + "parameters": [ + { + "$ref": "#/components/parameters/modifyLoadBalancerRuleServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyLoadBalancerRuleFrontendName" + }, + { + "$ref": "#/components/parameters/modifyLoadBalancerRuleRuleName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyLoadBalancerRule" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyLoadBalancerRule200" + }, + "default": { + "$ref": "#/components/responses/modifyLoadBalancerRuleDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/backends": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "List load balancer backends", + "description": "Returns a list of available service backends by given {service-uuid}.", + "operationId": "listLoadBalancerBackends", + "parameters": [ + { + "$ref": "#/components/parameters/listLoadBalancerBackendsServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listLoadBalancerBackends200" + }, + "default": { + "$ref": "#/components/responses/listLoadBalancerBackendsDefault" + } + } + }, + "post": { + "tags": [ + "load-balancer" + ], + "summary": "Create load balancer backend", + "description": "Creates a new backend by given {service-uuid}.", + "operationId": "createLoadBalancerBackend", + "parameters": [ + { + "$ref": "#/components/parameters/createLoadBalancerBackendServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createLoadBalancerBackend" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createLoadBalancerBackend201" + }, + "default": { + "$ref": "#/components/responses/createLoadBalancerBackendDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/backends/{backend-name}": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer backend", + "description": "Returns service backend details by given {service-uuid} and {backend-name}.", + "operationId": "getLoadBalancerBackend", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerBackendServiceUuid" + }, + { + "$ref": "#/components/parameters/getLoadBalancerBackendBackendName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerBackend200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerBackendDefault" + } + } + }, + "delete": { + "tags": [ + "load-balancer" + ], + "summary": "Delete load balancer backend", + "description": "Deletes existing backend by given {service-uuid} and {backend-name}.", + "operationId": "deleteLoadBalancerBackend", + "parameters": [ + { + "$ref": "#/components/parameters/deleteLoadBalancerBackendServiceUuid" + }, + { + "$ref": "#/components/parameters/deleteLoadBalancerBackendBackendName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteLoadBalancerBackend204" + }, + "default": { + "$ref": "#/components/responses/deleteLoadBalancerBackendDefault" + } + } + }, + "patch": { + "tags": [ + "load-balancer" + ], + "summary": "Modify load balancer backend", + "description": "Modifies existing backend by given {service-uuid} and {backend-name}.", + "operationId": "modifyLoadBalancerBackend", + "parameters": [ + { + "$ref": "#/components/parameters/modifyLoadBalancerBackendServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyLoadBalancerBackendBackendName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyLoadBalancerBackend" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyLoadBalancerBackend200" + }, + "default": { + "$ref": "#/components/responses/modifyLoadBalancerBackendDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/backends/{backend-name}/members": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "List load balancer members", + "description": "Returns a list of available backend members by given {service-uuid} and {backend-name}.", + "operationId": "listLoadBalancerMembers", + "parameters": [ + { + "$ref": "#/components/parameters/listLoadBalancerMembersServiceUuid" + }, + { + "$ref": "#/components/parameters/listLoadBalancerMembersBackendName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listLoadBalancerMembers200" + }, + "default": { + "$ref": "#/components/responses/listLoadBalancerMembersDefault" + } + } + }, + "post": { + "tags": [ + "load-balancer" + ], + "summary": "Create load balancer member", + "description": "Creates a new member by given {service-uuid} and {backend-name}.", + "operationId": "createLoadBalancerMember", + "parameters": [ + { + "$ref": "#/components/parameters/createLoadBalancerMemberServiceUuid" + }, + { + "$ref": "#/components/parameters/createLoadBalancerMemberBackendName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createLoadBalancerMember" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createLoadBalancerMember201" + }, + "default": { + "$ref": "#/components/responses/createLoadBalancerMemberDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/backends/{backend-name}/members/{member-name}": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer member", + "description": "Returns backend member details by given {service-uuid}, {backend-name} and {member-name}.", + "operationId": "getLoadBalancerMember", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerMemberServiceUuid" + }, + { + "$ref": "#/components/parameters/getLoadBalancerMemberBackendName" + }, + { + "$ref": "#/components/parameters/getLoadBalancerMemberMemberName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerMember200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerMemberDefault" + } + } + }, + "delete": { + "tags": [ + "load-balancer" + ], + "summary": "Delete load balancer member", + "description": "Deletes existing member by given {service-uuid}, {backend-name} and {member-name}.", + "operationId": "deleteLoadBalancerMember", + "parameters": [ + { + "$ref": "#/components/parameters/deleteLoadBalancerMemberServiceUuid" + }, + { + "$ref": "#/components/parameters/deleteLoadBalancerMemberBackendName" + }, + { + "$ref": "#/components/parameters/deleteLoadBalancerMemberMemberName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteLoadBalancerMember204" + }, + "default": { + "$ref": "#/components/responses/deleteLoadBalancerMemberDefault" + } + } + }, + "patch": { + "tags": [ + "load-balancer" + ], + "summary": "Modify load balancer member", + "description": "Modifies existing member by given {service-uuid}, {backend-name} and {member-name}.", + "operationId": "modifyLoadBalancerMember", + "parameters": [ + { + "$ref": "#/components/parameters/modifyLoadBalancerMemberServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyLoadBalancerMemberBackendName" + }, + { + "$ref": "#/components/parameters/modifyLoadBalancerMemberMemberName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyLoadBalancerMember" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyLoadBalancerMember200" + }, + "default": { + "$ref": "#/components/responses/modifyLoadBalancerMemberDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/backends/{backend-name}/tls-configs": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "List load balancer backend TLS configs", + "description": "Returns a list of available backend TLS configs by given {service-uuid} and {backend-name}.", + "operationId": "listLoadBalancerBackendTlsConfigs", + "parameters": [ + { + "$ref": "#/components/parameters/listLoadBalancerBackendTlsConfigsServiceUuid" + }, + { + "$ref": "#/components/parameters/listLoadBalancerBackendTlsConfigsBackendName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listLoadBalancerBackendTlsConfigs200" + }, + "default": { + "$ref": "#/components/responses/listLoadBalancerBackendTlsConfigsDefault" + } + } + }, + "post": { + "tags": [ + "load-balancer" + ], + "summary": "Create load balancer backend TLS config", + "description": "Creates a new TLS config by given {service-uuid} and {backend-name}.", + "operationId": "createLoadBalancerBackendTlsConfig", + "parameters": [ + { + "$ref": "#/components/parameters/createLoadBalancerBackendTlsConfigServiceUuid" + }, + { + "$ref": "#/components/parameters/createLoadBalancerBackendTlsConfigBackendName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createLoadBalancerBackendTlsConfig" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createLoadBalancerBackendTlsConfig201" + }, + "default": { + "$ref": "#/components/responses/createLoadBalancerBackendTlsConfigDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/backends/{backend-name}/tls-configs/{tls-config-name}": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer backend TLS config", + "description": "Returns backend TLS config details by given {service-uuid}, {backend-name}, and {tls-config-name}.", + "operationId": "getLoadBalancerBackendTlsConfig", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerBackendTlsConfigServiceUuid" + }, + { + "$ref": "#/components/parameters/getLoadBalancerBackendTlsConfigBackendName" + }, + { + "$ref": "#/components/parameters/getLoadBalancerBackendTlsConfigTlsConfigName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerBackendTlsConfig200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerBackendTlsConfigDefault" + } + } + }, + "delete": { + "tags": [ + "load-balancer" + ], + "summary": "Delete load balancer backend TLS config", + "description": "Deletes existing TLS config by given {service-uuid}, {backend-name}, and {tls-config-name}.", + "operationId": "deleteLoadBalancerBackendTlsConfig", + "parameters": [ + { + "$ref": "#/components/parameters/deleteLoadBalancerBackendTlsConfigServiceUuid" + }, + { + "$ref": "#/components/parameters/deleteLoadBalancerBackendTlsConfigBackendName" + }, + { + "$ref": "#/components/parameters/deleteLoadBalancerBackendTlsConfigTlsConfigName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteLoadBalancerBackendTlsConfig204" + }, + "default": { + "$ref": "#/components/responses/deleteLoadBalancerBackendTlsConfigDefault" + } + } + }, + "patch": { + "tags": [ + "load-balancer" + ], + "summary": "Modify load balancer backend TLS config", + "description": "Modifies existing TLS config by given {service-uuid}, {backend-name}, and {tls-config-name}.", + "operationId": "modifyLoadBalancerBackendTlsConfig", + "parameters": [ + { + "$ref": "#/components/parameters/modifyLoadBalancerBackendTlsConfigServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyLoadBalancerBackendTlsConfigBackendName" + }, + { + "$ref": "#/components/parameters/modifyLoadBalancerBackendTlsConfigTlsConfigName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyLoadBalancerBackendTlsConfig" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyLoadBalancerBackendTlsConfig200" + }, + "default": { + "$ref": "#/components/responses/modifyLoadBalancerBackendTlsConfigDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/networks/{network-name}": { + "patch": { + "tags": [ + "load-balancer" + ], + "summary": "Modify load balancer network", + "description": "Modifies existing service network by given {service-uuid} and {network-name}.", + "operationId": "modifyLoadBalancerNetwork", + "parameters": [ + { + "$ref": "#/components/parameters/modifyLoadBalancerNetworkServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyLoadBalancerNetworkNetworkName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyLoadBalancerNetwork" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyLoadBalancerNetwork200" + }, + "default": { + "$ref": "#/components/responses/modifyLoadBalancerNetworkDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/ip-addresses": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "List load balancer IP addresses", + "description": "Returns a list of available IP addresses by given {service-uuid}.", + "operationId": "listLoadBalancerIpAddresses", + "parameters": [ + { + "$ref": "#/components/parameters/listLoadBalancerIpAddressesServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listLoadBalancerIpAddresses200" + }, + "default": { + "$ref": "#/components/responses/listLoadBalancerIpAddressesDefault" + } + } + }, + "post": { + "tags": [ + "load-balancer" + ], + "summary": "Create load balancer IP address", + "description": "Attach a floating public IPv4 address to the service using the specified {service-uuid}. The number of attachable floating IPv4 addresses is limited to the number of nodes in the plan, and all addresses must be in the same zone as the service and detached.\n\nNote: Floating public IPv4 addresses have configurable release policies. When the service is deleted or an IP address is detached, addresses with the keep policy will be converted to detached floating IPs that remain available in your account. Addresses with the release policy will be automatically deleted. For more details, see IP Addresses.", + "operationId": "createLoadBalancerIpAddress", + "parameters": [ + { + "$ref": "#/components/parameters/createLoadBalancerIpAddressServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createLoadBalancerIpAddress" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createLoadBalancerIpAddress201" + }, + "default": { + "$ref": "#/components/responses/createLoadBalancerIpAddressDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/ip-addresses/{ip-address}": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer IP address", + "description": "Returns IP address details by given {service-uuid} and {ip-address}.", + "operationId": "getLoadBalancerIpAddress", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerIpAddressServiceUuid" + }, + { + "$ref": "#/components/parameters/getLoadBalancerIpAddressIpAddress" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerIpAddress200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerIpAddressDefault" + } + } + }, + "delete": { + "tags": [ + "load-balancer" + ], + "summary": "Delete load balancer IP address", + "description": "Detach a floating public IPv4 address from the service by given {service-uuid} and {address}. \n\t\t\t\tDepending on the release policy, the customer retains the floating IP if the policy is set to keep. \n\t\t\t\tIf the policy is set to release, the floating IP will be deleted.", + "operationId": "deleteLoadBalancerIpAddress", + "parameters": [ + { + "$ref": "#/components/parameters/deleteLoadBalancerIpAddressServiceUuid" + }, + { + "$ref": "#/components/parameters/deleteLoadBalancerIpAddressIpAddress" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteLoadBalancerIpAddress204" + }, + "default": { + "$ref": "#/components/responses/deleteLoadBalancerIpAddressDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/resolvers": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "List load balancer resolvers", + "description": "Returns a list of available service domain name resolvers by given {service-uuid}.", + "operationId": "listLoadBalancerResolvers", + "parameters": [ + { + "$ref": "#/components/parameters/listLoadBalancerResolversServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listLoadBalancerResolvers200" + }, + "default": { + "$ref": "#/components/responses/listLoadBalancerResolversDefault" + } + } + }, + "post": { + "tags": [ + "load-balancer" + ], + "summary": "Create load balancer resolver", + "description": "Creates a new resolver by given {service-uuid}.\n\nResolver is a DNS server usually residing in a user's private network. It's used to resolve IPs for backend members of type dynamic.", + "operationId": "createLoadBalancerResolver", + "parameters": [ + { + "$ref": "#/components/parameters/createLoadBalancerResolverServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createLoadBalancerResolver" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createLoadBalancerResolver201" + }, + "default": { + "$ref": "#/components/responses/createLoadBalancerResolverDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/resolvers/{resolver-name}": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer resolver", + "description": "Returns backend resolver details by given {service-uuid} and {resolver-name}.", + "operationId": "getLoadBalancerResolver", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerResolverServiceUuid" + }, + { + "$ref": "#/components/parameters/getLoadBalancerResolverResolverName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerResolver200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerResolverDefault" + } + } + }, + "delete": { + "tags": [ + "load-balancer" + ], + "summary": "Delete load balancer resolver", + "description": "Deletes existing resolver by given {service-uuid} and {resolver-name}.", + "operationId": "deleteLoadBalancerResolver", + "parameters": [ + { + "$ref": "#/components/parameters/deleteLoadBalancerResolverServiceUuid" + }, + { + "$ref": "#/components/parameters/deleteLoadBalancerResolverResolverName" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteLoadBalancerResolver204" + }, + "default": { + "$ref": "#/components/responses/deleteLoadBalancerResolverDefault" + } + } + }, + "patch": { + "tags": [ + "load-balancer" + ], + "summary": "Modify load balancer resolver", + "description": "Modifies existing resolver by given {service-uuid} and {resolver-name}.", + "operationId": "modifyLoadBalancerResolver", + "parameters": [ + { + "$ref": "#/components/parameters/modifyLoadBalancerResolverServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyLoadBalancerResolverResolverName" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyLoadBalancerResolver" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyLoadBalancerResolver200" + }, + "default": { + "$ref": "#/components/responses/modifyLoadBalancerResolverDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/labels": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "List load balancer labels", + "description": "Returns a list of available service labels by given {service-uuid}.", + "operationId": "listLoadBalancerLabels", + "parameters": [ + { + "$ref": "#/components/parameters/listLoadBalancerLabelsServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listLoadBalancerLabels200" + }, + "default": { + "$ref": "#/components/responses/listLoadBalancerLabelsDefault" + } + } + }, + "post": { + "tags": [ + "load-balancer" + ], + "summary": "Create load balancer label", + "description": "Creates a new label by given {service-uuid}.\n\nLabels used for service filtering.\n\nService labels usage examples\nBelow are some examples of what certain GET requests might look like.\n\nexact match: GET /1.3/load-balancer?label=env%3Dstaging\nexistence: GET /1.3/load-balancer?label=env\nmultiple: GET /1.3/load-balancer?label=env&label=foo%3Dbar\n", + "operationId": "createLoadBalancerLabel", + "parameters": [ + { + "$ref": "#/components/parameters/createLoadBalancerLabelServiceUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createLoadBalancerLabel" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createLoadBalancerLabel201" + }, + "default": { + "$ref": "#/components/responses/createLoadBalancerLabelDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/labels/{label-key}": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer label", + "description": "Returns label details by given {service-uuid} and {label-key}.", + "operationId": "getLoadBalancerLabel", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerLabelServiceUuid" + }, + { + "$ref": "#/components/parameters/getLoadBalancerLabelLabelKey" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerLabel200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerLabelDefault" + } + } + }, + "delete": { + "tags": [ + "load-balancer" + ], + "summary": "Delete load balancer label", + "description": "Deletes existing label by given {service-uuid} and {label-key}.", + "operationId": "deleteLoadBalancerLabel", + "parameters": [ + { + "$ref": "#/components/parameters/deleteLoadBalancerLabelServiceUuid" + }, + { + "$ref": "#/components/parameters/deleteLoadBalancerLabelLabelKey" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteLoadBalancerLabel204" + }, + "default": { + "$ref": "#/components/responses/deleteLoadBalancerLabelDefault" + } + } + }, + "patch": { + "tags": [ + "load-balancer" + ], + "summary": "Modify load balancer label", + "description": "Modifies existing label by given {service-uuid} and {label-key}.", + "operationId": "modifyLoadBalancerLabel", + "parameters": [ + { + "$ref": "#/components/parameters/modifyLoadBalancerLabelServiceUuid" + }, + { + "$ref": "#/components/parameters/modifyLoadBalancerLabelLabelKey" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyLoadBalancerLabel" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyLoadBalancerLabel200" + }, + "default": { + "$ref": "#/components/responses/modifyLoadBalancerLabelDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/metrics": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer metrics", + "description": "Returns service metrics by given {service-uuid}.", + "operationId": "getLoadBalancerMetrics", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerMetricsServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerMetrics200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerMetricsDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/metrics/series": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer metrics series", + "description": "Returns service metric series by given {service-uuid}.", + "operationId": "getLoadBalancerMetricsSeries", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerMetricsSeriesServiceUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerMetricsSeries200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerMetricsSeriesDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/metrics/series/frontends": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer frontend combined metrics series", + "description": "Returns combined frontend metric series by given {service-uuid}.", + "operationId": "getLoadBalancerFrontendCombinedMetricsSeries", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerFrontendCombinedMetricsSeriesServiceUuid" + }, + { + "$ref": "#/components/parameters/getLoadBalancerFrontendCombinedMetricsSeriesSort" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerFrontendCombinedMetricsSeries200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerFrontendCombinedMetricsSeriesDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/metrics/series/frontends/{frontend-name}": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer frontend metrics series", + "description": "Returns frontend metric series by given {service-uuid} and {frontend-name}.", + "operationId": "getLoadBalancerFrontendMetricsSeries", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerFrontendMetricsSeriesServiceUuid" + }, + { + "$ref": "#/components/parameters/getLoadBalancerFrontendMetricsSeriesFrontendName" + }, + { + "$ref": "#/components/parameters/getLoadBalancerFrontendMetricsSeriesSort" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerFrontendMetricsSeries200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerFrontendMetricsSeriesDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/metrics/series/backends": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer backend combined metrics series", + "description": "Returns combined backend metric series by given {service-uuid}.", + "operationId": "getLoadBalancerBackendCombinedMetricsSeries", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerBackendCombinedMetricsSeriesServiceUuid" + }, + { + "$ref": "#/components/parameters/getLoadBalancerBackendCombinedMetricsSeriesSort" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerBackendCombinedMetricsSeries200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerBackendCombinedMetricsSeriesDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/metrics/series/backends/{backend-name}": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer backend metrics series", + "description": "Returns backend metric series by given {service-uuid} and {backend-name}.", + "operationId": "getLoadBalancerBackendMetricsSeries", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerBackendMetricsSeriesServiceUuid" + }, + { + "$ref": "#/components/parameters/getLoadBalancerBackendMetricsSeriesBackendName" + }, + { + "$ref": "#/components/parameters/getLoadBalancerBackendMetricsSeriesSort" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerBackendMetricsSeries200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerBackendMetricsSeriesDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/metrics/series/backends/{backend-name}/members": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer member combined metrics series", + "description": "Returns combined backend members metric series by given {service-uuid} and {backend-name}.", + "operationId": "getLoadBalancerMemberCombinedMetricsSeries", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerMemberCombinedMetricsSeriesServiceUuid" + }, + { + "$ref": "#/components/parameters/getLoadBalancerMemberCombinedMetricsSeriesBackendName" + }, + { + "$ref": "#/components/parameters/getLoadBalancerMemberCombinedMetricsSeriesSort" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerMemberCombinedMetricsSeries200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerMemberCombinedMetricsSeriesDefault" + } + } + } + }, + "/1.3/load-balancer/{service-uuid}/metrics/series/backends/{backend-name}/members/{member-name}": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer member metrics series", + "description": "Returns backend member metric series by given {service-uuid}, {backend-name}, and {member-name}.", + "operationId": "getLoadBalancerMemberMetricsSeries", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerMemberMetricsSeriesServiceUuid" + }, + { + "$ref": "#/components/parameters/getLoadBalancerMemberMetricsSeriesBackendName" + }, + { + "$ref": "#/components/parameters/getLoadBalancerMemberMetricsSeriesMemberName" + }, + { + "$ref": "#/components/parameters/getLoadBalancerMemberMetricsSeriesSort" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerMemberMetricsSeries200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerMemberMetricsSeriesDefault" + } + } + } + }, + "/1.3/load-balancer/certificate-bundles": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "List load balancer certificate bundles", + "description": "Returns a list of available certificate bundles.", + "operationId": "listLoadBalancerCertificateBundles", + "parameters": [ + { + "$ref": "#/components/parameters/listLoadBalancerCertificateBundlesLimit" + }, + { + "$ref": "#/components/parameters/listLoadBalancerCertificateBundlesOffset" + }, + { + "$ref": "#/components/parameters/listLoadBalancerCertificateBundlesLabel" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listLoadBalancerCertificateBundles200" + }, + "default": { + "$ref": "#/components/responses/listLoadBalancerCertificateBundlesDefault" + } + } + }, + "post": { + "tags": [ + "load-balancer" + ], + "summary": "Create load balancer certificate bundle", + "description": "Creates a new certificate bundle.", + "operationId": "createLoadBalancerCertificateBundle", + "requestBody": { + "$ref": "#/components/requestBodies/createLoadBalancerCertificateBundle" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createLoadBalancerCertificateBundle201" + }, + "default": { + "$ref": "#/components/responses/createLoadBalancerCertificateBundleDefault" + } + } + } + }, + "/1.3/load-balancer/certificate-bundles/{bundle-uuid}": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer certificate bundle", + "description": "Returns certificate bundle details by given {bundle-uuid}.", + "operationId": "getLoadBalancerCertificateBundle", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerCertificateBundleBundleUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerCertificateBundle200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerCertificateBundleDefault" + } + } + }, + "delete": { + "tags": [ + "load-balancer" + ], + "summary": "Delete load balancer certificate bundle", + "description": "Deletes existing certificate bundle by given {bundle-uuid}.", + "operationId": "deleteLoadBalancerCertificateBundle", + "parameters": [ + { + "$ref": "#/components/parameters/deleteLoadBalancerCertificateBundleBundleUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteLoadBalancerCertificateBundle204" + }, + "default": { + "$ref": "#/components/responses/deleteLoadBalancerCertificateBundleDefault" + } + } + }, + "patch": { + "tags": [ + "load-balancer" + ], + "summary": "Modify load balancer certificate bundle", + "description": "Modifies existing a manual, dynamic or authority certificate bundle by given {bundle-uuid}.", + "operationId": "modifyLoadBalancerCertificateBundle", + "parameters": [ + { + "$ref": "#/components/parameters/modifyLoadBalancerCertificateBundleBundleUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyLoadBalancerCertificateBundle" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyLoadBalancerCertificateBundle200" + }, + "default": { + "$ref": "#/components/responses/modifyLoadBalancerCertificateBundleDefault" + } + } + } + }, + "/1.3/load-balancer/certificate-bundles/{bundle-uuid}/labels": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "List load balancer certificate bundle labels", + "description": "Returns a list of available certificate bundle labels by given {bundle-uuid}.", + "operationId": "listLoadBalancerCertificateBundleLabels", + "parameters": [ + { + "$ref": "#/components/parameters/listLoadBalancerCertificateBundleLabelsBundleUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listLoadBalancerCertificateBundleLabels200" + }, + "default": { + "$ref": "#/components/responses/listLoadBalancerCertificateBundleLabelsDefault" + } + } + }, + "post": { + "tags": [ + "load-balancer" + ], + "summary": "Create load balancer certificate bundle label", + "description": "Creates a new label by given {bundle-uuid}.\n\nLabels used for certificate bundles filtering.\n\nCertificate bundle labels usage examples\nBelow are some examples of what certain GET requests might look like.\n\nexact match: GET /1.3/load-balancer/certificate-bundles?label=env%3Dstaging\nexistence: GET /1.3/load-balancer/certificate-bundles?label=env\nmultiple: GET /1.3/load-balancer/certificate-bundles?label=env&label=foo%3Dbar", + "operationId": "createLoadBalancerCertificateBundleLabel", + "parameters": [ + { + "$ref": "#/components/parameters/createLoadBalancerCertificateBundleLabelBundleUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createLoadBalancerCertificateBundleLabel" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createLoadBalancerCertificateBundleLabel201" + }, + "default": { + "$ref": "#/components/responses/createLoadBalancerCertificateBundleLabelDefault" + } + } + } + }, + "/1.3/load-balancer/certificate-bundles/{bundle-uuid}/labels/{label-key}": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer certificate bundle label", + "description": "Returns label details by given {bundle-uuid} and {label-key}.", + "operationId": "getLoadBalancerCertificateBundleLabel", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerCertificateBundleLabelBundleUuid" + }, + { + "$ref": "#/components/parameters/getLoadBalancerCertificateBundleLabelLabelKey" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerCertificateBundleLabel200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerCertificateBundleLabelDefault" + } + } + }, + "delete": { + "tags": [ + "load-balancer" + ], + "summary": "Delete load balancer certificate bundle label", + "description": "Deletes existing label by given {bundle-uuid} and {label-key}.", + "operationId": "deleteLoadBalancerCertificateBundleLabel", + "parameters": [ + { + "$ref": "#/components/parameters/deleteLoadBalancerCertificateBundleLabelBundleUuid" + }, + { + "$ref": "#/components/parameters/deleteLoadBalancerCertificateBundleLabelLabelKey" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteLoadBalancerCertificateBundleLabel204" + }, + "default": { + "$ref": "#/components/responses/deleteLoadBalancerCertificateBundleLabelDefault" + } + } + }, + "patch": { + "tags": [ + "load-balancer" + ], + "summary": "Modify load balancer certificate bundle label", + "description": "Modifies existing label by given {bundle-uuid} and {label-key}.", + "operationId": "modifyLoadBalancerCertificateBundleLabel", + "parameters": [ + { + "$ref": "#/components/parameters/modifyLoadBalancerCertificateBundleLabelBundleUuid" + }, + { + "$ref": "#/components/parameters/modifyLoadBalancerCertificateBundleLabelLabelKey" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyLoadBalancerCertificateBundleLabel" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyLoadBalancerCertificateBundleLabel200" + }, + "default": { + "$ref": "#/components/responses/modifyLoadBalancerCertificateBundleLabelDefault" + } + } + } + }, + "/1.3/load-balancer/certificate-bundles/dns-challenge-domain": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer DNS challenge domain", + "description": "Returns DNS challenge domain.\n\nThis can be used to validate domain ownership using the ACME challenge method. To validate your domain, you need to add CNAME record to the domain provided by this API to your DNS settings. The name/host of the CNAME record should be _acme-challenge or _acme-challenge.mysubdomain if you are setting up a subdomain called mysubdomain. The target/points to of the record needs to be set to the value returned by this API.", + "operationId": "getLoadBalancerDnsChallengeDomain", + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerDnsChallengeDomain200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerDnsChallengeDomainDefault" + } + } + } + }, + "/1.3/load-balancer/plans": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "List load balancer plans", + "description": "Returns a list of available load balancer plans.", + "operationId": "listLoadBalancerPlans", + "parameters": [ + { + "$ref": "#/components/parameters/listLoadBalancerPlansLimit" + }, + { + "$ref": "#/components/parameters/listLoadBalancerPlansOffset" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listLoadBalancerPlans200" + }, + "default": { + "$ref": "#/components/responses/listLoadBalancerPlansDefault" + } + } + } + }, + "/1.3/load-balancer/plans/{plan-name}": { + "get": { + "tags": [ + "load-balancer" + ], + "summary": "Get load balancer plan", + "description": "Returns load balancer plan details by given {plan-name}.", + "operationId": "getLoadBalancerPlan", + "parameters": [ + { + "$ref": "#/components/parameters/getLoadBalancerPlanPlanName" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getLoadBalancerPlan200" + }, + "default": { + "$ref": "#/components/responses/getLoadBalancerPlanDefault" + } + } + } + }, + "/1.3/firewall-ruleset": { + "get": { + "tags": [ + "firewall-ruleset" + ], + "summary": "List firewall rulesets", + "description": "Returns a list of firewall rulesets.", + "operationId": "listFirewallRulesets", + "parameters": [ + { + "$ref": "#/components/parameters/listFirewallRulesetsLimit" + }, + { + "$ref": "#/components/parameters/listFirewallRulesetsOffset" + }, + { + "$ref": "#/components/parameters/listFirewallRulesetsSort" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listFirewallRulesets200" + }, + "default": { + "$ref": "#/components/responses/listFirewallRulesetsDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Create firewall ruleset", + "description": "Creates a new firewall ruleset.", + "operationId": "createFirewallRuleset", + "requestBody": { + "$ref": "#/components/requestBodies/createFirewallRuleset" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createFirewallRuleset201" + }, + "default": { + "$ref": "#/components/responses/createFirewallRulesetDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/firewall-ruleset/{ruleset-uuid}": { + "get": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Get firewall ruleset details", + "description": "Returns firewall ruleset details by given {ruleset-uuid}.", + "operationId": "getFirewallRuleset", + "parameters": [ + { + "$ref": "#/components/parameters/getFirewallRulesetRulesetUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getFirewallRuleset200" + }, + "default": { + "$ref": "#/components/responses/getFirewallRulesetDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Delete firewall ruleset", + "description": "Deletes existing firewall ruleset by given {ruleset-uuid}.", + "operationId": "deleteFirewallRuleset", + "parameters": [ + { + "$ref": "#/components/parameters/deleteFirewallRulesetRulesetUuid" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteFirewallRuleset204" + }, + "default": { + "$ref": "#/components/responses/deleteFirewallRulesetDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Modify firewall ruleset", + "description": "Modifies existing firewall ruleset by given {ruleset-uuid}.", + "operationId": "modifyFirewallRuleset", + "parameters": [ + { + "$ref": "#/components/parameters/modifyFirewallRulesetRulesetUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyFirewallRuleset" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyFirewallRuleset200" + }, + "default": { + "$ref": "#/components/responses/modifyFirewallRulesetDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/firewall-ruleset/{ruleset-uuid}/restore/{ruleset-version}": { + "patch": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Restore firewall ruleset", + "description": "Restores existing firewall ruleset by given {ruleset-uuid} and {ruleset-version}.", + "operationId": "restoreFirewallRuleset", + "parameters": [ + { + "$ref": "#/components/parameters/restoreFirewallRulesetRulesetUuid" + }, + { + "$ref": "#/components/parameters/restoreFirewallRulesetRulesetVersion" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/restoreFirewallRuleset200" + }, + "default": { + "$ref": "#/components/responses/restoreFirewallRulesetDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/firewall-ruleset/{ruleset-uuid}/rule": { + "get": { + "tags": [ + "firewall-ruleset" + ], + "summary": "List firewall ruleset rules", + "description": "Returns firewall ruleset rules.", + "operationId": "listFirewallRulesetRules", + "parameters": [ + { + "$ref": "#/components/parameters/listFirewallRulesetRulesRulesetUuid" + }, + { + "$ref": "#/components/parameters/listFirewallRulesetRulesLimit" + }, + { + "$ref": "#/components/parameters/listFirewallRulesetRulesOffset" + }, + { + "$ref": "#/components/parameters/listFirewallRulesetRulesSort" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listFirewallRulesetRules200" + }, + "default": { + "$ref": "#/components/responses/listFirewallRulesetRulesDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "put": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Create multiple firewall ruleset rules", + "description": "Creates multiple firewall ruleset rules by the given {ruleset-uuid}.", + "operationId": "createMultipleFirewallRulesetRule", + "parameters": [ + { + "$ref": "#/components/parameters/createMultipleFirewallRulesetRuleRulesetUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createMultipleFirewallRulesetRule" + }, + "responses": { + "200": { + "$ref": "#/components/responses/createMultipleFirewallRulesetRule200" + }, + "default": { + "$ref": "#/components/responses/createMultipleFirewallRulesetRuleDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Create firewall ruleset rule", + "description": "Creates a new firewall ruleset rule by the given {ruleset-uuid}.", + "operationId": "createFirewallRulesetRule", + "parameters": [ + { + "$ref": "#/components/parameters/createFirewallRulesetRuleRulesetUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createFirewallRulesetRule" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createFirewallRulesetRule201" + }, + "default": { + "$ref": "#/components/responses/createFirewallRulesetRuleDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/firewall-ruleset/{ruleset-uuid}/rule/{rule-id}": { + "get": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Get firewall ruleset rule details", + "description": "Returns firewall ruleset rule details.", + "operationId": "getFirewallRulesetRule", + "parameters": [ + { + "$ref": "#/components/parameters/getFirewallRulesetRuleRulesetUuid" + }, + { + "$ref": "#/components/parameters/getFirewallRulesetRuleRuleId" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getFirewallRulesetRule200" + }, + "default": { + "$ref": "#/components/responses/getFirewallRulesetRuleDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Delete firewall ruleset rule", + "description": "Deletes an existing rule by given {ruleset-uuid} and {rule-uuid}.", + "operationId": "deleteFirewallRulesetRule", + "parameters": [ + { + "$ref": "#/components/parameters/deleteFirewallRulesetRuleRulesetUuid" + }, + { + "$ref": "#/components/parameters/deleteFirewallRulesetRuleRuleId" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteFirewallRulesetRule204" + }, + "default": { + "$ref": "#/components/responses/deleteFirewallRulesetRuleDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Modify firewall ruleset rule", + "description": "Modifies existing firewall ruleset rule by given {ruleset_uuid} and {rule-uuid}.", + "operationId": "modifyFirewallRulesetRule", + "parameters": [ + { + "$ref": "#/components/parameters/modifyFirewallRulesetRuleRulesetUuid" + }, + { + "$ref": "#/components/parameters/modifyFirewallRulesetRuleRuleId" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyFirewallRulesetRule" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyFirewallRulesetRule200" + }, + "default": { + "$ref": "#/components/responses/modifyFirewallRulesetRuleDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/firewall-ruleset/{ruleset-uuid}/labels": { + "get": { + "tags": [ + "firewall-ruleset" + ], + "summary": "List firewall ruleset labels", + "description": "Returns a list of available firewall ruleset labels by given {ruleset-uuid}.", + "operationId": "listFirewallRulesetLabels", + "parameters": [ + { + "$ref": "#/components/parameters/listFirewallRulesetLabelsRulesetUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listFirewallRulesetLabels200" + }, + "default": { + "$ref": "#/components/responses/listFirewallRulesetLabelsDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Create firewall ruleset label", + "description": "Creates a new label by given {ruleset-uuid}. Labels are used for group filtering.", + "operationId": "createFirewallRulesetLabel", + "parameters": [ + { + "$ref": "#/components/parameters/createFirewallRulesetLabelRulesetUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createFirewallRulesetLabel" + }, + "responses": { + "201": { + "$ref": "#/components/responses/createFirewallRulesetLabel201" + }, + "default": { + "$ref": "#/components/responses/createFirewallRulesetLabelDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/firewall-ruleset/{ruleset-uuid}/servers": { + "get": { + "tags": [ + "firewall-ruleset" + ], + "summary": "List servers attached to a firewall ruleset", + "description": "Returns a list of servers that are attached to the firewall ruleset by given {ruleset-uuid}.", + "operationId": "listFirewallRulesetAttachedServers", + "parameters": [ + { + "$ref": "#/components/parameters/listFirewallRulesetAttachedServersRulesetUuid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listFirewallRulesetAttachedServers200" + }, + "default": { + "$ref": "#/components/responses/listFirewallRulesetAttachedServersDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/firewall-ruleset/{ruleset-uuid}/labels/{label-key}": { + "get": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Get firewall ruleset label details", + "description": "Returns label details by given {ruleset-uuid} and {label-key}.", + "operationId": "getFirewallRulesetLabel", + "parameters": [ + { + "$ref": "#/components/parameters/getFirewallRulesetLabelRulesetUuid" + }, + { + "$ref": "#/components/parameters/getFirewallRulesetLabelLabelKey" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/getFirewallRulesetLabel200" + }, + "default": { + "$ref": "#/components/responses/getFirewallRulesetLabelDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Delete firewall ruleset label", + "description": "Deletes existing label by given {ruleset-uuid} and {label-key}.", + "operationId": "deleteFirewallRulesetLabel", + "parameters": [ + { + "$ref": "#/components/parameters/deleteFirewallRulesetLabelRulesetUuid" + }, + { + "$ref": "#/components/parameters/deleteFirewallRulesetLabelLabelKey" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/deleteFirewallRulesetLabel204" + }, + "default": { + "$ref": "#/components/responses/deleteFirewallRulesetLabelDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "patch": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Modify firewall ruleset label", + "description": "Modifies existing label by given {ruleset-uuid} and {label-key}.", + "operationId": "modifyFirewallRulesetLabel", + "parameters": [ + { + "$ref": "#/components/parameters/modifyFirewallRulesetLabelRulesetUuid" + }, + { + "$ref": "#/components/parameters/modifyFirewallRulesetLabelLabelKey" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/modifyFirewallRulesetLabel" + }, + "responses": { + "200": { + "$ref": "#/components/responses/modifyFirewallRulesetLabel200" + }, + "default": { + "$ref": "#/components/responses/modifyFirewallRulesetLabelDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/firewall-ruleset/server/{server-uuid}/firewall-rule": { + "get": { + "tags": [ + "firewall-ruleset" + ], + "summary": "List server firewall rules", + "description": "Returns a list of server firewall rules.", + "operationId": "listServerFirewallRule", + "parameters": [ + { + "$ref": "#/components/parameters/firewallRulesetListServerFirewallRuleServerUuid" + }, + { + "$ref": "#/components/parameters/firewallRulesetListServerFirewallRuleLimit" + }, + { + "$ref": "#/components/parameters/firewallRulesetListServerFirewallRuleOffset" + }, + { + "$ref": "#/components/parameters/firewallRulesetListServerFirewallRuleSort" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/firewallRulesetListServerFirewallRule200" + }, + "default": { + "$ref": "#/components/responses/firewallRulesetListServerFirewallRuleDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "put": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Create multiple server firewall rules", + "description": "Creates multiple server firewall rules by given {server-uuid}.", + "operationId": "createMultipleServerFirewallRules", + "parameters": [ + { + "$ref": "#/components/parameters/firewallRulesetCreateMultipleServerFirewallRulesServerUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/firewallRulesetCreateMultipleServerFirewallRules" + }, + "responses": { + "200": { + "$ref": "#/components/responses/firewallRulesetCreateMultipleServerFirewallRules200" + }, + "400": { + "$ref": "#/components/responses/firewallRulesetCreateMultipleServerFirewallRules400" + }, + "403": { + "$ref": "#/components/responses/firewallRulesetCreateMultipleServerFirewallRules403" + }, + "404": { + "$ref": "#/components/responses/firewallRulesetCreateMultipleServerFirewallRules404" + }, + "409": { + "$ref": "#/components/responses/firewallRulesetCreateMultipleServerFirewallRules409" + }, + "default": { + "$ref": "#/components/responses/firewallRulesetCreateMultipleServerFirewallRulesDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "post": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Create server firewall rule", + "description": "Creates a new server firewall rule.", + "operationId": "createServerFirewallRule", + "parameters": [ + { + "$ref": "#/components/parameters/firewallRulesetCreateServerFirewallRuleServerUuid" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/firewallRulesetCreateServerFirewallRule" + }, + "responses": { + "201": { + "$ref": "#/components/responses/firewallRulesetCreateServerFirewallRule201" + }, + "400": { + "$ref": "#/components/responses/firewallRulesetCreateServerFirewallRule400" + }, + "403": { + "$ref": "#/components/responses/firewallRulesetCreateServerFirewallRule403" + }, + "404": { + "$ref": "#/components/responses/firewallRulesetCreateServerFirewallRule404" + }, + "409": { + "$ref": "#/components/responses/firewallRulesetCreateServerFirewallRule409" + }, + "default": { + "$ref": "#/components/responses/firewallRulesetCreateServerFirewallRuleDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/firewall-ruleset/server/{server-uuid}/firewall-rule/{position}": { + "get": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Get server firewall rule details", + "description": "Returns server firewall rule details by given {server-uuid} and {position}.", + "operationId": "getServerFirewallRule", + "parameters": [ + { + "$ref": "#/components/parameters/firewallRulesetGetServerFirewallRuleServerUuid" + }, + { + "$ref": "#/components/parameters/firewallRulesetGetServerFirewallRulePosition" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/firewallRulesetGetServerFirewallRule200" + }, + "default": { + "$ref": "#/components/responses/firewallRulesetGetServerFirewallRuleDefault" + } + }, + "x-upcloud-visibility": "public" + }, + "delete": { + "tags": [ + "firewall-ruleset" + ], + "summary": "Delete server firewall rule", + "description": "Deletes existing server firewall rule by given {server-uuid} and {position}.", + "operationId": "deleteServerFirewallRule", + "parameters": [ + { + "$ref": "#/components/parameters/firewallRulesetDeleteServerFirewallRuleServerUuid" + }, + { + "$ref": "#/components/parameters/firewallRulesetDeleteServerFirewallRulePosition" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/firewallRulesetDeleteServerFirewallRule204" + }, + "400": { + "$ref": "#/components/responses/firewallRulesetDeleteServerFirewallRule400" + }, + "403": { + "$ref": "#/components/responses/firewallRulesetDeleteServerFirewallRule403" + }, + "404": { + "$ref": "#/components/responses/firewallRulesetDeleteServerFirewallRule404" + }, + "409": { + "$ref": "#/components/responses/firewallRulesetDeleteServerFirewallRule409" + }, + "default": { + "$ref": "#/components/responses/firewallRulesetDeleteServerFirewallRuleDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/vnc_keymap": { + "get": { + "tags": [ + "vnc_keymap" + ], + "summary": "List VNC keymaps", + "description": "Retrieves a list of supported VNC keymaps.", + "operationId": "listVNCKeymaps", + "responses": { + "200": { + "$ref": "#/components/responses/listVNCKeymaps200" + }, + "default": { + "$ref": "#/components/responses/listVNCKeymapsDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/zone": { + "get": { + "tags": [ + "zone" + ], + "summary": "List zones", + "description": "Retrieves a list of zones.", + "operationId": "listZones", + "responses": { + "200": { + "$ref": "#/components/responses/listZones200" + }, + "default": { + "$ref": "#/components/responses/listZonesDefault" + } + }, + "x-upcloud-visibility": "public" + } + }, + "/1.3/zone/{zone}/vlans": { + "get": { + "tags": [ + "zone" + ], + "summary": "List VLANs in a zone", + "description": "Retrieves a list of VLANs in a specific zone.", + "operationId": "listZoneVLANs", + "parameters": [ + { + "$ref": "#/components/parameters/listZoneVLANsZone" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listZoneVLANs200" + }, + "default": { + "$ref": "#/components/responses/listZoneVLANsDefault" + } + } + } + } + }, + "components": { + "schemas": { + "createSubaccountRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "sub_account": { + "type": "object", + "properties": { + "username": { + "$ref": "#/components/schemas/accountUserName" + }, + "password": { + "type": "string", + "format": "password" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "company": { + "type": "string" + }, + "vat_number": { + "type": "string" + }, + "address": { + "type": "string" + }, + "postal_code": { + "type": "string" + }, + "city": { + "type": "string" + }, + "state": { + "type": "string" + }, + "country": { + "$ref": "#/components/schemas/accountCountryCode" + }, + "email": { + "type": "string", + "format": "email" + }, + "phone": { + "$ref": "#/components/schemas/accountPhoneNumber" + }, + "language": { + "$ref": "#/components/schemas/accountLanguageCode" + }, + "currency": { + "$ref": "#/components/schemas/accountCurrencyCode" + }, + "timezone": { + "type": "string" + }, + "allow_api": { + "$ref": "#/components/schemas/accountBooleanYesno" + }, + "allow_gui": { + "$ref": "#/components/schemas/accountBooleanYesno" + }, + "roles": { + "type": "object", + "properties": { + "role": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "role" + ], + "additionalProperties": false + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/accountLabel" + } + }, + "ip_filters": { + "type": "object", + "properties": { + "ip_filter": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "ip_filter" + ], + "additionalProperties": false + }, + "server_access": { + "type": "object", + "additionalProperties": true + }, + "storage_access": { + "type": "object", + "additionalProperties": true + }, + "network_access": { + "type": "object", + "additionalProperties": true + }, + "tag_access": { + "type": "object", + "additionalProperties": true + }, + "enable_3rd_party_services": { + "$ref": "#/components/schemas/accountBooleanYesno" + } + }, + "required": [ + "username", + "email", + "phone", + "language", + "timezone" + ], + "additionalProperties": false + } + }, + "required": [ + "sub_account" + ], + "additionalProperties": false, + "description": "Request for creating a subaccount.", + "example": { + "sub_account": { + "first_name": "first", + "last_name": "last", + "company": "my company name", + "address": "my address", + "postal_code": "00130", + "city": "Helsinki", + "state": "", + "country": "FIN", + "phone": "+358.31245434", + "email": "user@example.com", + "vat_number": "my vat number", + "timezone": "Europe/Helsinki", + "username": "myusername", + "password": "mysecr3tPassword", + "currency": "EUR", + "language": "en", + "roles": { + "role": [ + "technical", + "billing", + "aux_billing" + ] + }, + "allow_gui": "no", + "allow_api": "yes", + "network_access": { + "network": [] + }, + "server_access": { + "server": [] + }, + "storage_access": { + "storage": [] + }, + "tag_access": { + "tag": [] + }, + "ip_filters": { + "ip_filter": [] + }, + "labels": [ + { + "key": "department", + "value": "it" + } + ] + } + } + }, + "account": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "account": { + "$ref": "#/components/schemas/accountDetails" + } + }, + "required": [ + "account" + ], + "additionalProperties": false, + "description": "Response schema containing account details.", + "example": { + "account": { + "username": "apiuser01", + "credits": 125, + "credits_breakdown": { + "account_credits": { + "debt_credits": 0, + "max_debt": 0, + "paid_credits": 25 + }, + "account_free_credits": { + "breakdown": [ + { + "free_credit_type": "other", + "free_credits": 100, + "free_credits_expire": "2027-08-11T11:00:41Z" + } + ] + }, + "total_credits": 125 + }, + "resource_limits": { + "managed_databases": 5, + "network_peerings": 20, + "file_storages": 10, + "managed_kubernetes": 5, + "tags": 200, + "cores": 64, + "cloud_server_dev_1xcpu_1gb_10gb_plans": 0, + "cloud_server_dev_1xcpu_1gb_plans": 0, + "storage_hdd": 10240, + "networks": 100, + "network_gateways_essentials": 20, + "network_gateways": 20, + "storage_ssd": 20480, + "load_balancers_essentials": 20, + "load_balancers": 20, + "gpus": 8, + "detached_interfaces": 100, + "detached_floating_ips": 50, + "managed_object_storages": 50, + "memory": 524288, + "ntp_excess_gib": 100, + "public_ipv4": 64, + "public_ipv6": 64, + "routers": 20, + "storage_maxiops": 10240, + "storage_standard": 20480, + "storage_total": 40960 + } + } + } + }, + "accountDetails": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "resource_limits": { + "$ref": "#/components/schemas/accountResourceLimits" + }, + "username": { + "$ref": "#/components/schemas/accountUserName" + }, + "credits": { + "$ref": "#/components/schemas/accountCredits" + }, + "credits_breakdown": { + "$ref": "#/components/schemas/accountCreditsBreakdown" + }, + "trial_mode": { + "$ref": "#/components/schemas/accountBoolean01" + } + }, + "required": [ + "username", + "resource_limits" + ], + "additionalProperties": true, + "description": "Detailed account information and limits.", + "example": { + "username": "apiuser01", + "credits": 125, + "credits_breakdown": { + "account_credits": { + "debt_credits": 0, + "max_debt": 0, + "paid_credits": 25 + }, + "account_free_credits": { + "breakdown": [ + { + "free_credit_type": "other", + "free_credits": 100, + "free_credits_expire": "2027-08-11T11:00:41Z" + } + ] + }, + "total_credits": 125 + }, + "resource_limits": { + "managed_databases": 5, + "network_peerings": 20, + "file_storages": 10, + "managed_kubernetes": 5, + "tags": 200, + "cores": 64, + "cloud_server_dev_1xcpu_1gb_10gb_plans": 0, + "cloud_server_dev_1xcpu_1gb_plans": 0, + "storage_hdd": 10240, + "networks": 100, + "network_gateways_essentials": 20, + "network_gateways": 20, + "storage_ssd": 20480, + "load_balancers_essentials": 20, + "load_balancers": 20, + "gpus": 8, + "detached_interfaces": 100, + "detached_floating_ips": 50, + "managed_object_storages": 50, + "memory": 524288, + "ntp_excess_gib": 100, + "public_ipv4": 64, + "public_ipv6": 64, + "routers": 20, + "storage_maxiops": 10240, + "storage_standard": 20480, + "storage_total": 40960 + } + } + }, + "accounts": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "accounts": { + "type": "object", + "properties": { + "account": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "main", + "sub" + ] + }, + "username": { + "$ref": "#/components/schemas/accountUserName" + }, + "roles": { + "type": "object", + "properties": { + "role": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "role" + ], + "additionalProperties": false + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/accountLabel" + } + } + }, + "required": [ + "type", + "username", + "roles", + "labels" + ], + "additionalProperties": false + } + } + }, + "required": [ + "account" + ], + "additionalProperties": false + } + }, + "required": [ + "accounts" + ], + "additionalProperties": false, + "description": "Main account and subaccounts accessible to the authenticated account.", + "example": { + "accounts": { + "account": [ + { + "labels": [], + "roles": { + "role": [ + "technical" + ] + }, + "type": "mymain", + "username": "test" + }, + { + "labels": [], + "roles": { + "role": [ + "technical" + ] + }, + "type": "sub", + "username": "my_sub_account" + }, + { + "labels": [ + { + "key": "to_be_removed", + "value": "after 2022-31-12" + } + ], + "roles": { + "role": [] + }, + "type": "sub", + "username": "my_temp_account" + }, + { + "labels": [], + "roles": { + "role": [ + "billing" + ] + }, + "type": "sub", + "username": "my_billing_account" + } + ] + } + } + }, + "accountUserName": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 64, + "minLength": 4, + "description": "Username for an account." + }, + "accountRfc3339Datetime": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "2026-07-01T00:00:00Z", + "2026-07-31T23:59:59Z" + ], + "format": "date-time", + "description": "Datetime in RFC 3339 format" + }, + "accountResourceNetworkUsageType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "load_balancer_private", + "load_balancer_private_vlan", + "load_balancer_public", + "network_gateway_private", + "network_gateway_private_vlan", + "network_gateway_public", + "object_storage_v2_private", + "object_storage_v2_public", + "server_private", + "server_private_vlan", + "server_public" + ], + "description": "Network usage type for resource" + }, + "accountZone": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "fi-hel1", + "de-fra1", + "us-nyc1" + ], + "maxLength": 15, + "minLength": 2, + "pattern": "^[a-z][a-z0-9-]{0,14}[a-z0-9]$", + "description": "Zone identifier" + }, + "accountUsageAccumulateParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "hour", + "day" + ], + "description": "Usage accumulator hour or day parameter" + }, + "accountUuid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$", + "format": "uuid", + "description": "Universally unique identifier", + "example": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "accountCountryCode": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^[A-Z]{3}$", + "description": "ISO 3166-1 Alpha-3 code" + }, + "accountPhoneNumber": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "description": "Phone number in international format." + }, + "accountLanguageCode": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^[a-z]{2}$", + "description": "ISO 639-1 code" + }, + "accountCurrencyCode": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^[A-Z]{3}$", + "description": "ISO 4217 code" + }, + "accountBooleanYesno": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "yes", + "no" + ], + "description": "Boolean value represented as yes/no", + "example": "yes" + }, + "accountLabel": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Label key used to classify the resource" + }, + "value": { + "type": "string", + "description": "Value associated with the label key" + } + }, + "required": [ + "key", + "value" + ], + "additionalProperties": false, + "description": "A key/value pair to label and categorize resources", + "example": { + "key": "env", + "value": "production" + } + }, + "accountResourceLimits": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "managed_databases": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of managed databases allowed." + }, + "network_peerings": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of network peerings allowed." + }, + "file_storages": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of file storage instances allowed." + }, + "managed_container_registries": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of managed container registries allowed." + }, + "managed_kubernetes": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of managed Kubernetes clusters allowed." + }, + "tags": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of tags allowed." + }, + "cores": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of CPU cores allowed." + }, + "cloud_server_dev_1xcpu_1gb_10gb_plans": { + "type": [ + "integer", + "null" + ], + "minimum": 0, + "format": "int64", + "description": "The maximum number of cloud server dev 1xCPU 1GB 10GB plans allowed." + }, + "cloud_server_dev_1xcpu_1gb_plans": { + "type": [ + "integer", + "null" + ], + "minimum": 0, + "format": "int64", + "description": "The maximum number of cloud server dev 1xCPU 1GB 10GB plans allowed." + }, + "storage_hdd": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum amount of HDD storage (in GiB) allowed." + }, + "networks": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of networks allowed." + }, + "network_gateways_essentials": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of essential network gateways allowed." + }, + "network_gateways": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of network gateways allowed." + }, + "storage_ssd": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum amount of SSD storage (in GiB) allowed." + }, + "load_balancers_essentials": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of essential load balancers allowed." + }, + "load_balancers": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of load balancers allowed." + }, + "gpus": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of GPUs allowed." + }, + "detached_interfaces": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of detached network interfaces allowed." + }, + "detached_floating_ips": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of detached floating IPs allowed." + }, + "managed_object_storages": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of managed object storage instances allowed." + }, + "memory": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum amount of memory (in MiB) allowed." + }, + "ntp_excess_gib": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum amount of excess NTP data (in GiB) allowed." + }, + "public_ipv4": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of public IPv4 addresses allowed." + }, + "public_ipv6": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of public IPv6 addresses allowed." + }, + "routers": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum number of routers allowed." + }, + "storage_maxiops": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum amount of MaxiOPS storage (in GiB) allowed." + }, + "storage_standard": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum amount of standard storage (in GiB) allowed." + }, + "storage_total": { + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The maximum total amount of storage (in GiB) allowed." + }, + "type": {}, + "required": {}, + "additionalProperties": {} + }, + "description": "Per-resource quota limits for an account." + }, + "accountCredits": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "number", + "format": "double", + "description": "Current account credit balance." + }, + "accountCreditsBreakdown": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "account_credits": { + "type": "object", + "properties": { + "debt_credits": { + "type": "number", + "description": "Outstanding debt credits." + }, + "max_debt": { + "type": "number", + "description": "Maximum allowed debt." + }, + "paid_credits": { + "type": "number", + "description": "Paid credits on the account." + } + }, + "required": [ + "debt_credits", + "max_debt", + "paid_credits" + ], + "description": "Paid and debt credits on the account." + }, + "account_free_credits": { + "type": "object", + "properties": { + "breakdown": { + "type": "array", + "items": { + "type": "object", + "properties": { + "free_credit_type": { + "type": "string", + "description": "Type identifier for the free credit grant." + }, + "free_credits": { + "type": "number", + "format": "double", + "description": "Amount of free credits." + }, + "free_credits_expire": { + "type": "string", + "format": "date-time", + "description": "Expiry date-time of the free credits in ISO 8601 format. Absent if the credits do not expire." + } + }, + "required": [ + "free_credit_type", + "free_credits" + ] + }, + "description": "List of individual free credit grants." + } + }, + "required": [ + "breakdown" + ], + "description": "Free credits allocated to the account." + }, + "total_credits": { + "type": "number", + "format": "double", + "description": "Total combined credit balance." + } + }, + "required": [ + "account_credits", + "account_free_credits", + "total_credits" + ], + "description": "Detailed breakdown of account credits." + }, + "accountBoolean01": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1 + ], + "description": "Schema for boolean-like values encoded as 0 or 1." + }, + "accountError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "accountBillingSummary": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "currency": { + "$ref": "#/components/schemas/accountCurrencyCode" + }, + "total_amount": { + "type": "number" + } + }, + "additionalProperties": true, + "description": "Monthly billing totals grouped by resource type and subtype.", + "example": { + "currency": "EUR", + "managed_databases": { + "managed_database": { + "resources": [ + { + "amount": 15.10223, + "details": [ + { + "amount": 15.10223, + "hours": 420, + "plan": "1x1xCPU-2GB-25GB", + "zone": "fi-hel2" + } + ], + "hours": 420, + "resource_id": "09001a4d-b525-4ab8-835d-000000000000" + } + ], + "total_amount": 15.10223 + }, + "total_amount": 15.10223 + }, + "managed_object_storages": { + "managed_object_storage": { + "resources": [ + { + "amount": 5.03384, + "details": [ + { + "amount": 5.03384, + "billable_size_gib": 500, + "hours": 420, + "zone": "fi-hel2" + } + ], + "hours": 420, + "resource_id": "127ee42a-8304-477c-84e1-000000000000" + } + ], + "total_amount": 5.03384 + }, + "total_amount": 5.03384 + }, + "servers": { + "server": { + "resources": [ + { + "amount": 16.18091, + "details": [ + { + "amount": 16.18091, + "hours": 420, + "labels": [ + { + "key": "test", + "value": "" + } + ], + "plan": "2xCPU-4GB", + "zone": "fi-hel2" + } + ], + "hours": 420, + "resource_id": "001c2caa-00dc-4eff-9321-000000000000" + }, + { + "amount": 16.10386, + "details": [ + { + "amount": 16.10386, + "hours": 418, + "labels": [ + { + "key": "test2", + "value": "" + } + ], + "plan": "2xCPU-4GB", + "zone": "fi-hel2" + }, + { + "amount": 0.9288, + "hours": 12, + "labels": [ + { + "key": "test2", + "value": "" + } + ], + "plan": "4xCPU-8GB", + "zone": "fi-hel2" + } + ], + "hours": 430, + "resource_id": "0010cf04-3608-4512-b4de-000000000000" + } + ], + "total_amount": 33.21357 + }, + "total_amount": 33.21357 + }, + "total_amount": 53.34964 + } + }, + "accountBillingSummaryResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "billing": { + "$ref": "#/components/schemas/accountBillingSummary" + } + }, + "required": [ + "billing" + ], + "additionalProperties": false, + "description": "Response containing a monthly billing summary.", + "example": { + "billing": { + "currency": "EUR", + "networks": { + "bandwidth": { + "total_amount": 52.136 + }, + "total_amount": 52.136 + }, + "managed_databases": { + "managed_database": { + "total_amount": 80.13127 + }, + "total_amount": 80.13127 + }, + "managed_object_storages": { + "managed_object_storage": { + "total_amount": 2.2253 + }, + "total_amount": 2.2253 + }, + "servers": { + "server": { + "total_amount": 28.05132 + }, + "total_amount": 28.05132 + }, + "storages": { + "storage": { + "total_amount": 3.6224 + }, + "total_amount": 3.6224 + }, + "total_amount": 166.16629 + } + } + }, + "accountCurrentNetworkUsage": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "stats": { + "type": "object", + "properties": { + "current_network_usage": { + "type": "object", + "properties": { + "updated": { + "$ref": "#/components/schemas/accountRfc3339Datetime" + }, + "accumulated_quota_bytes": { + "type": "integer", + "format": "int64" + }, + "total_sent_bytes": { + "type": "integer", + "format": "int64" + }, + "hourly_quota_increase_bytes": { + "type": "integer", + "format": "int64" + }, + "projected_monthly_quota_bytes": { + "type": "integer", + "format": "int64" + } + }, + "required": [ + "updated", + "accumulated_quota_bytes", + "total_sent_bytes", + "hourly_quota_increase_bytes", + "projected_monthly_quota_bytes" + ], + "additionalProperties": false + } + }, + "required": [ + "current_network_usage" + ], + "additionalProperties": false + } + }, + "required": [ + "stats" + ], + "additionalProperties": false, + "description": "Current Fair Transfer Policy usage for an account.", + "example": { + "stats": { + "current_network_usage": { + "accumulated_quota_bytes": 3546328504778, + "hourly_quota_increase_bytes": 10577635230, + "projected_monthly_quota_bytes": 7777382596778, + "total_sent_bytes": 13682943146, + "updated": "2020-10-15T07:00:00Z" + } + } + } + }, + "accountCreateMsLmaSigningLinkResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "signing_status": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "initiated": { + "type": "string", + "examples": [ + "2026-07-29T11:00:00Z" + ], + "format": "date-time" + }, + "signed_at": { + "type": "string", + "examples": [ + "2026-07-29T11:05:00Z" + ], + "format": "date-time" + }, + "signing_link": { + "type": "string", + "format": "uri" + }, + "state": { + "type": "string", + "enum": [ + "initiated", + "waiting", + "completed", + "canceled" + ] + } + }, + "required": [ + "id", + "state", + "initiated", + "signing_link", + "signed_at" + ], + "example": { + "id": "mslma_1234567890", + "initiated": "2026-07-29T11:00:00Z", + "signed_at": "2026-07-29T11:05:00Z", + "signing_link": "https://example.com/sign/mslma_1234567890", + "state": "completed" + } + } + }, + "description": "Response schema for Microsoft LMA signing link creation.", + "example": { + "signing_status": { + "id": "mslma_1234567890", + "initiated": "2026-07-29T11:00:00Z", + "signed_at": "2026-07-29T11:05:00Z", + "signing_link": "https://example.com/sign/mslma_1234567890", + "state": "completed" + } + } + }, + "accountResourceNetworkUsage": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "stats": { + "type": "object", + "properties": { + "stat": { + "type": "array", + "items": { + "type": "object", + "properties": { + "resource_id": { + "$ref": "#/components/schemas/accountUuid" + }, + "service": { + "$ref": "#/components/schemas/accountResourceNetworkUsageType" + }, + "zone": { + "$ref": "#/components/schemas/accountZone" + }, + "start_time": { + "$ref": "#/components/schemas/accountRfc3339Datetime" + }, + "sent_bytes": { + "type": [ + "integer", + "null" + ], + "format": "int64" + } + }, + "required": [ + "resource_id", + "service", + "zone", + "start_time", + "sent_bytes" + ], + "additionalProperties": false + } + } + }, + "required": [ + "stat" + ], + "additionalProperties": false + } + }, + "required": [ + "stats" + ], + "additionalProperties": false, + "description": "Network usage statistics grouped by resource.", + "example": { + "stats": { + "stat": [ + { + "resource_id": "00777436-a6f8-43af-9daf-89e8e6833a7a", + "sent_bytes": 10094, + "service": "server_public", + "start_time": "2020-09-07T00:00:00Z", + "zone": "de-fra1" + }, + { + "resource_id": "00777436-a6f8-43af-9daf-89e8e6833a7a", + "sent_bytes": 35174050, + "service": "server_public", + "start_time": "2020-09-08T00:00:00Z", + "zone": "de-fra1" + }, + { + "resource_id": "00777436-a6f8-43af-9daf-89e8e6833a7a", + "sent_bytes": 32790622, + "service": "server_public", + "start_time": "2020-09-09T00:00:00Z", + "zone": "de-fra1" + } + ] + } + } + }, + "accountNetworkUsage": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "stats": { + "type": "object", + "properties": { + "stat": { + "type": "array", + "items": { + "type": "object", + "properties": { + "start_time": { + "$ref": "#/components/schemas/accountRfc3339Datetime" + }, + "sent_bytes": { + "type": "integer", + "format": "int64" + }, + "total_sent_bytes": { + "type": "integer", + "format": "int64" + }, + "accumulated_quota_bytes": { + "type": "integer", + "format": "int64" + }, + "projected_monthly_quota_bytes": { + "type": "integer", + "format": "int64" + }, + "quota_increase_bytes": { + "type": "integer", + "format": "int64" + } + }, + "required": [ + "start_time", + "sent_bytes", + "total_sent_bytes", + "accumulated_quota_bytes", + "projected_monthly_quota_bytes", + "quota_increase_bytes" + ], + "additionalProperties": false + } + } + }, + "required": [ + "stat" + ], + "additionalProperties": false + } + }, + "required": [ + "stats" + ], + "additionalProperties": false, + "description": "Account network usage and Fair Transfer Policy quota statistics.", + "example": { + "stats": { + "stat": [ + { + "accumulated_quota_bytes": 6352371508013, + "projected_monthly_quota_bytes": 6362243967561, + "quota_increase_bytes": 9872459548, + "sent_bytes": 1254, + "start_time": "2020-09-30T22:00:00Z", + "total_sent_bytes": 225149331390 + }, + { + "accumulated_quota_bytes": 6362243967561, + "projected_monthly_quota_bytes": 6362243967561, + "quota_increase_bytes": 9872459548, + "sent_bytes": 1254, + "start_time": "2020-09-30T23:00:00Z", + "total_sent_bytes": 225149332644 + }, + { + "accumulated_quota_bytes": 9872459548, + "projected_monthly_quota_bytes": 7345109903712, + "quota_increase_bytes": 9872459548, + "sent_bytes": 906, + "start_time": "2020-10-01T00:00:00Z", + "total_sent_bytes": 906 + } + ] + } + } + }, + "accountResourceUsage": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "additionalProperties": { + "type": "integer", + "minimum": 0 + }, + "description": "Current account resource usage keyed by resource limit name." + }, + "accountResourceBillingSummaryResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "billing": { + "type": "object", + "properties": { + "currency": { + "$ref": "#/components/schemas/accountCurrencyCode" + }, + "daily_sums": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "details": { + "type": "object", + "additionalProperties": true + }, + "total_amount": { + "type": "number" + } + }, + "additionalProperties": false + } + }, + "required": [ + "billing" + ], + "additionalProperties": false, + "description": "Response containing the monthly billing summary for a resource.", + "example": { + "billing": { + "daily_sums": { + "2019-12-02": 3.33684, + "2019-12-03": 52.77344, + "2019-12-04": 1.07424, + "2019-12-05": 1.07424, + "2019-12-06": 1.07424, + "2019-12-07": 1.07424, + "2019-12-08": 1.07424, + "2019-12-09": 1.07424, + "2019-12-12": 3.22272, + "2019-12-13": 0.58188 + }, + "details": { + "hours": 792, + "plan": "1xCPU-1GB", + "resource_id": "00ce9363-9065-4c2a-9d66-3b0c762f556b", + "title": "My Glorious Server", + "type": "server", + "zone": "fi-hel1" + }, + "total_amount": 66.36032 + } + } + }, + "kubernetesVersion": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/kubernetesClusterVersion" + }, + "version": { + "type": "string", + "description": "Kubernetes semantic version" + } + }, + "required": [ + "id", + "version" + ], + "description": "Kubernetes version" + }, + "kubernetesVersions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/kubernetesVersion" + }, + "description": "List of Kubernetes versions" + }, + "kubernetesAuthenticationConfigurationYAML": { + "type": "string", + "description": "kube-apiserver v1 AuthenticationConfiguration YAML document" + }, + "kubernetesAccepted": { + "type": "object", + "properties": { + "message": { + "$ref": "#/components/schemas/kubernetesMessage" + } + }, + "description": "Message" + }, + "kubernetesCluster": { + "type": "object", + "properties": { + "control_plane_ip_filter": { + "$ref": "#/components/schemas/kubernetesIPBlocks" + }, + "name": { + "$ref": "#/components/schemas/kubernetesName" + }, + "network": { + "$ref": "#/components/schemas/kubernetesNetwork" + }, + "network_cidr": { + "$ref": "#/components/schemas/kubernetesNetworkCIDR" + }, + "storage_encryption": { + "$ref": "#/components/schemas/kubernetesDefaultStorageEncryption" + }, + "node_groups": { + "$ref": "#/components/schemas/kubernetesNodeGroups" + }, + "state": { + "$ref": "#/components/schemas/kubernetesClusterState" + }, + "uuid": { + "$ref": "#/components/schemas/kubernetesUuid" + }, + "zone": { + "$ref": "#/components/schemas/kubernetesZone" + }, + "plan": { + "$ref": "#/components/schemas/kubernetesClusterPlan" + }, + "private_node_groups": { + "$ref": "#/components/schemas/kubernetesPrivateNodeGroups" + }, + "version": { + "$ref": "#/components/schemas/kubernetesClusterVersion" + }, + "authentication": { + "$ref": "#/components/schemas/kubernetesAuthenticationConfiguration" + }, + "labels": {} + }, + "required": [ + "name", + "network", + "zone", + "version", + "labels" + ], + "description": "Kubernetes cluster" + }, + "kubernetesClusterAvailableUpgrades": { + "type": "object", + "properties": { + "versions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/kubernetesClusterVersion" + } + } + }, + "required": [ + "versions" + ] + }, + "kubernetesClusterAvailableUpgradesPost": { + "type": "object", + "properties": { + "version": { + "$ref": "#/components/schemas/kubernetesClusterVersion" + }, + "strategy": { + "$ref": "#/components/schemas/kubernetesClusterUpgradeStrategy" + } + }, + "required": [ + "version" + ] + }, + "kubernetesClusterKubeconfig": { + "type": "object", + "properties": { + "kubeconfig": { + "$ref": "#/components/schemas/kubernetesKubeconfig" + } + }, + "required": [ + "kubeconfig" + ], + "description": "Kubernetes cluster kubeconfig" + }, + "kubernetesClusterPatch": { + "type": "object", + "properties": { + "control_plane_ip_filter": { + "$ref": "#/components/schemas/kubernetesIPBlocks" + }, + "labels": {}, + "plan": { + "$ref": "#/components/schemas/kubernetesClusterPlan" + } + }, + "required": [ + "labels" + ] + }, + "kubernetesClusters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/kubernetesCluster" + }, + "description": "List of Kubernetes clusters" + }, + "kubernetesClusterState": { + "type": "string", + "enum": [ + "failed", + "pending", + "running", + "terminated", + "terminating", + "unknown", + "suspended", + "upgrading", + "upgrade-pending", + "upgrade-failed" + ], + "description": "Cluster operational state" + }, + "kubernetesNodeState": { + "type": "string", + "enum": [ + "pending", + "failed", + "running", + "terminating", + "unknown" + ], + "description": "Node operational state" + }, + "kubernetesCount": { + "type": "integer", + "maximum": 16, + "minimum": 0, + "format": "int32", + "description": "Amount of nodes in a node group" + }, + "kubernetesDescription": { + "type": "string", + "description": "Plan description" + }, + "kubernetesEffect": { + "type": "string", + "enum": [ + "NoExecute", + "NoSchedule", + "PreferNoSchedule" + ], + "description": "Taint effect" + }, + "kubernetesError": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/kubernetesErrorType" + }, + "title": { + "$ref": "#/components/schemas/kubernetesErrorTitle" + }, + "status": { + "$ref": "#/components/schemas/kubernetesErrorStatus" + }, + "invalid_params": { + "$ref": "#/components/schemas/kubernetesErrorInvalidParams" + }, + "correlation_id": { + "$ref": "#/components/schemas/kubernetesErrorCorrelationID" + } + }, + "required": [ + "type", + "title", + "status", + "correlation_id" + ], + "description": "Response error" + }, + "kubernetesErrorType": { + "type": "string", + "description": "URI to a page describing the problem" + }, + "kubernetesErrorTitle": { + "type": "string", + "description": "human-readable description of the error" + }, + "kubernetesErrorInvalidParams": { + "type": "string", + "description": "list of parameters describing a specific part(s) of the request that caused the error" + }, + "kubernetesErrorCorrelationID": { + "type": "string", + "description": "unique string that identifies the request that caused the error" + }, + "kubernetesErrorStatus": { + "type": "integer", + "format": "int32", + "description": "HTTP Status code" + }, + "kubernetesIPBlock": { + "type": "string", + "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}($|/(0-32))$", + "description": "IP prefix of a single IPv4 address or a network CIDR" + }, + "kubernetesIPBlocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/kubernetesIPBlock" + }, + "maxItems": 100, + "uniqueItems": true, + "description": "List of IP blocks" + }, + "kubernetesKey": { + "type": "string", + "description": "Key of a key-value pair" + }, + "kubernetesKubeconfig": { + "type": "string", + "description": "Kubeconfig" + }, + "kubernetesKubeletArg": { + "type": "object", + "properties": { + "key": { + "$ref": "#/components/schemas/kubernetesKey" + }, + "value": { + "$ref": "#/components/schemas/kubernetesValue" + } + }, + "required": [ + "key", + "value" + ], + "description": "Kubelet argument presented as key-value pair" + }, + "kubernetesKubeletArgs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/kubernetesKubeletArg" + }, + "description": "List of Kubelet arguments" + }, + "kubernetesLabel": { + "type": "object", + "properties": { + "key": { + "$ref": "#/components/schemas/kubernetesKey" + }, + "value": { + "$ref": "#/components/schemas/kubernetesValue" + } + }, + "required": [ + "key" + ], + "description": "Label for identifying node groups, presented as key-value pair" + }, + "kubernetesLabels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/kubernetesLabel" + }, + "uniqueItems": true, + "description": "List of labels" + }, + "kubernetesMessage": { + "type": "string", + "description": "Message text content" + }, + "kubernetesName": { + "type": "string", + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "description": "Name" + }, + "kubernetesNodeName": { + "type": "string", + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "description": "Node name" + }, + "kubernetesNetwork": { + "type": "string", + "minLength": 1, + "description": "Network UUID" + }, + "kubernetesNetworkCIDR": { + "type": "string", + "description": "CIDR of the given network" + }, + "kubernetesNodeGroup": { + "type": "object", + "properties": { + "count": { + "$ref": "#/components/schemas/kubernetesCount" + }, + "kubelet_args": { + "$ref": "#/components/schemas/kubernetesKubeletArgs" + }, + "labels": { + "$ref": "#/components/schemas/kubernetesLabels" + }, + "name": { + "$ref": "#/components/schemas/kubernetesName" + }, + "plan": { + "$ref": "#/components/schemas/kubernetesNodeGroupPlan" + }, + "custom_plan": { + "$ref": "#/components/schemas/kubernetesNodeGroupCustomPlan" + }, + "cloud_native_plan": { + "$ref": "#/components/schemas/kubernetesNodeGroupCloudNativePlan" + }, + "gpu_plan": { + "$ref": "#/components/schemas/kubernetesNodeGroupGPUPlan" + }, + "ssh_keys": { + "$ref": "#/components/schemas/kubernetesSshKeys" + }, + "state": { + "$ref": "#/components/schemas/kubernetesNodeGroupState" + }, + "storage": { + "$ref": "#/components/schemas/kubernetesStorage" + }, + "storage_encryption": { + "$ref": "#/components/schemas/kubernetesStorageEncryption" + }, + "taints": { + "$ref": "#/components/schemas/kubernetesTaints" + }, + "anti_affinity": { + "$ref": "#/components/schemas/kubernetesAntiAffinity" + }, + "utility_network_access": { + "$ref": "#/components/schemas/kubernetesUtilityNetworkAccess" + }, + "node_updates": { + "$ref": "#/components/schemas/kubernetesNodeUpdates" + } + }, + "required": [ + "count", + "name", + "plan" + ], + "description": "Node group for a Kubernetes cluster" + }, + "kubernetesNodeGroupPatch": { + "type": "object", + "properties": { + "count": { + "$ref": "#/components/schemas/kubernetesCount" + } + }, + "required": [ + "count" + ] + }, + "kubernetesNodeGroups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/kubernetesNodeGroup" + }, + "maxItems": 16, + "uniqueItems": true, + "description": "List of node groups" + }, + "kubernetesNodeGroupState": { + "type": "string", + "enum": [ + "failed", + "pending", + "running", + "terminating", + "unknown", + "scaling-up", + "scaling-down" + ], + "description": "Node group operational state" + }, + "kubernetesPlan": { + "type": "object", + "properties": { + "description": { + "$ref": "#/components/schemas/kubernetesDescription" + }, + "name": { + "$ref": "#/components/schemas/kubernetesName" + } + }, + "required": [ + "description", + "name" + ], + "description": "Plan to assign to a node group" + }, + "kubernetesPlans": { + "type": "array", + "items": { + "$ref": "#/components/schemas/kubernetesPlan" + }, + "description": "List of plans" + }, + "kubernetesNodeGroupPlan": { + "type": "string", + "description": "Node group plan" + }, + "kubernetesNodeGroupCloudNativePlan": { + "type": "object", + "properties": { + "storage_size": { + "$ref": "#/components/schemas/kubernetesStorageSize" + }, + "storage_tier": { + "$ref": "#/components/schemas/kubernetesStorageTier" + } + }, + "required": [ + "storage_size" + ], + "description": "Node group cloud native plan properties" + }, + "kubernetesNodeGroupGPUPlan": { + "type": "object", + "properties": { + "storage_size": { + "$ref": "#/components/schemas/kubernetesStorageSize" + }, + "storage_tier": { + "$ref": "#/components/schemas/kubernetesStorageTier" + } + }, + "required": [ + "storage_size" + ], + "description": "Node group GPU plan properties" + }, + "kubernetesNodeGroupCustomPlan": { + "type": "object", + "properties": { + "memory": { + "type": "integer", + "maximum": 131072, + "minimum": 1024, + "format": "int32", + "description": "The amount of memory in megabytes to assign to individual node group node when using custom plan" + }, + "cores": { + "type": "integer", + "maximum": 20, + "minimum": 1, + "format": "int32", + "description": "The number of CPU cores dedicated to individual node group nodes when using custom plan" + }, + "storage_size": { + "$ref": "#/components/schemas/kubernetesStorageSize" + }, + "storage_tier": { + "$ref": "#/components/schemas/kubernetesStorageTier" + } + }, + "required": [ + "cores", + "memory", + "storage_size" + ], + "description": "Node group custom plan properties" + }, + "kubernetesStorageSize": { + "type": "integer", + "maximum": 1024, + "minimum": 25, + "format": "int32", + "description": "The size of the storage device in gigabytes." + }, + "kubernetesStorageTier": { + "type": "string", + "enum": [ + "maxiops", + "hdd", + "standard" + ], + "description": "The storage tier to use.", + "default": "maxiops" + }, + "kubernetesStorageEncryption": { + "type": "string", + "enum": [ + "data-at-rest", + "none" + ], + "description": "The storage encryption strategy." + }, + "kubernetesDefaultStorageEncryption": { + "allOf": [ + { + "$ref": "#/components/schemas/kubernetesStorageEncryption" + }, + { + "description": "The default storage encryption strategy for all node groups." + }, + {} + ] + }, + "kubernetesSshKey": { + "type": "string", + "pattern": "^ssh-[0-9A-Za-z]+ AAAA[0-9A-Za-z+/]+[=]{0,3}[ ]?([^@]+@[^@]+)?$", + "description": "Public SSH key for accessing the nodes in a group" + }, + "kubernetesSshKeys": { + "type": "array", + "items": { + "$ref": "#/components/schemas/kubernetesSshKey" + }, + "uniqueItems": true, + "description": "List of public SSH keys" + }, + "kubernetesStorage": { + "type": "string", + "format": "uuid", + "description": "Storage UUID to use as a template" + }, + "kubernetesTaint": { + "type": "object", + "properties": { + "effect": { + "$ref": "#/components/schemas/kubernetesEffect" + }, + "key": { + "$ref": "#/components/schemas/kubernetesKey" + }, + "value": { + "$ref": "#/components/schemas/kubernetesValue" + } + }, + "required": [ + "effect", + "key", + "value" + ], + "description": "Kubernetes taint to assign to nodes in a group" + }, + "kubernetesTaints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/kubernetesTaint" + }, + "description": "List of taints" + }, + "kubernetesUuid": { + "type": "string", + "format": "uuid", + "description": "UUID" + }, + "kubernetesValue": { + "type": "string", + "maxLength": 255, + "description": "Value of a key-value pair" + }, + "kubernetesZone": { + "type": "string", + "minLength": 1, + "description": "UpCloud zone to provision the Kubernetes cluster in" + }, + "kubernetesClusterVersion": { + "type": "string", + "description": "Kubernetes version identifier", + "default": "1.26" + }, + "kubernetesClusterUpgradeStrategy": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/kubernetesClusterUpgradeStrategyType" + } + }, + "required": [ + "type" + ], + "description": "upgrade strategy for node group upgrades" + }, + "kubernetesClusterUpgradeStrategyType": { + "type": "string", + "enum": [ + "rolling-update", + "manual" + ], + "description": "upgrade strategy type", + "default": "manual" + }, + "kubernetesClusterPlan": { + "type": "string", + "enum": [ + "development", + "production-small", + "dev-md", + "prod-md", + "prod-md-ha" + ], + "description": "Cluster plan", + "default": "development" + }, + "kubernetesAntiAffinity": { + "type": "boolean", + "description": "Enable anti-affinity policies", + "default": false + }, + "kubernetesPrivateNodeGroups": { + "type": "boolean", + "description": "Enable private node groups", + "default": false + }, + "kubernetesNodeGroupDetails": { + "allOf": [ + { + "$ref": "#/components/schemas/kubernetesNodeGroup" + }, + { + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/kubernetesNode" + }, + "description": "List of node group nodes (experimental)" + } + }, + "required": [ + "nodes" + ] + } + ], + "properties": { + "name": { + "$ref": "#/components/schemas/kubernetesName" + } + }, + "description": "Kubernetes cluster node" + }, + "kubernetesNode": { + "properties": { + "uuid": { + "type": "string", + "format": "uuid", + "description": "Node UUID" + }, + "name": { + "$ref": "#/components/schemas/kubernetesName" + }, + "kubelet_version": { + "$ref": "#/components/schemas/kubernetesClusterVersion" + }, + "state": { + "$ref": "#/components/schemas/kubernetesNodeState" + } + }, + "required": [ + "uuid", + "name", + "state", + "kubelet_version" + ], + "description": "Kubernetes cluster node" + }, + "kubernetesUtilityNetworkAccess": { + "type": "boolean", + "description": "Enable utility network access", + "default": true + }, + "kubernetesNodeUpdates": { + "properties": { + "kubernetes_patches": { + "type": "boolean", + "description": "Include Kubernetes package patch updates (kubeadm, kubectl, kubelet)", + "default": false + }, + "schedule_dow": { + "type": "string", + "enum": [ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday", + "daily" + ], + "description": "The day of the week on which updates will be performed" + }, + "schedule_time": { + "type": "string", + "description": "The time at which the updates will be applied in UTC (HH:MM).", + "example": "06:00" + } + }, + "required": [ + "kubernetes_patches", + "schedule_dow", + "schedule_time" + ], + "description": "Enable periodic package updates on node" + }, + "kubernetesAuthenticationConfiguration": { + "type": "array", + "items": { + "$ref": "#/components/schemas/kubernetesAuthenticationIssuerConfig" + }, + "description": "List of OIDC issuers and their claim validation rules." + }, + "kubernetesAuthenticationIssuerConfig": { + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/kubernetesName" + }, + "issuer_url": { + "type": "string", + "format": "uri", + "example": "https://accounts.myoidcprovider.com" + }, + "discovery_url": { + "type": "string", + "format": "uri", + "example": "https://accounts.myoidcprovider.com/.well-known/openid-configuration" + }, + "audiences": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Accepted audiences for tokens from this issuer. The first audience is used as the OIDC client id in generated kubeconfigs by default; the OIDC kubeconfig endpoint's `audience` query parameter can select a different one.\n", + "example": [ + "client-id-123" + ] + }, + "audience_match_policy": { + "type": "string", + "enum": [ + "MatchAny", + "" + ], + "default": "" + }, + "certificate_authority": { + "type": "string", + "description": "Base64-encoded PEM certificate authority bundle." + }, + "claim_mappings": { + "$ref": "#/components/schemas/kubernetesClaimMappings" + }, + "claim_validation_rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/kubernetesClaimValidationRule" + } + }, + "user_validation_rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/kubernetesUserValidationRule" + } + } + }, + "required": [ + "name", + "issuer_url", + "audiences" + ] + }, + "kubernetesClaimMappings": { + "type": "object", + "properties": { + "username": { + "$ref": "#/components/schemas/kubernetesPrefixedClaimOrExpression" + }, + "groups": { + "$ref": "#/components/schemas/kubernetesPrefixedClaimOrExpression" + }, + "uid": { + "$ref": "#/components/schemas/kubernetesClaimOrExpression" + }, + "extra": { + "type": "array", + "items": { + "$ref": "#/components/schemas/kubernetesExtraMapping" + } + } + }, + "description": "Rules for mapping token claims to Kubernetes user attributes." + }, + "kubernetesPrefixedClaimOrExpression": { + "type": "object", + "properties": { + "claim": { + "type": "string", + "description": "JWT claim to use. Mutually exclusive with expression.", + "example": "email" + }, + "prefix": { + "type": "string", + "description": "Prefix prepended to the claim's value. Must be set (may be empty) when claim is set. Mutually exclusive with expression.\n", + "nullable": true, + "example": "oidc:" + }, + "expression": { + "type": "string", + "description": "CEL expression producing the attribute value. Mutually exclusive with claim and prefix.", + "example": "claims.email" + } + }, + "description": "Maps a user attribute from either a JWT claim (optionally prefixed) or a CEL expression. Claim and expression are mutually exclusive.\n" + }, + "kubernetesClaimOrExpression": { + "type": "object", + "properties": { + "claim": { + "type": "string", + "description": "JWT claim to use. Mutually exclusive with expression.", + "example": "sub" + }, + "expression": { + "type": "string", + "description": "CEL expression producing the attribute value. Mutually exclusive with claim.", + "example": "claims.sub" + } + }, + "description": "Maps a user attribute from either a JWT claim or a CEL expression. Claim and expression are mutually exclusive.\n" + }, + "kubernetesClaimValidationRule": { + "type": "object", + "properties": { + "claim": { + "type": "string", + "example": "hd" + }, + "required_value": { + "type": "string", + "example": "upcloud.com" + }, + "expression": { + "type": "string", + "example": "claims.hd == 'upcloud.com'" + }, + "message": { + "type": "string", + "example": "User must belong to the upcloud.com organization domain." + } + }, + "description": "CEL expression used to validate a token claim." + }, + "kubernetesExtraMapping": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Domain-prefixed, lowercase key for the extra attribute, e.g. example.org/foo.\n", + "example": "example.org/foo" + }, + "value_expression": { + "type": "string", + "description": "CEL expression producing the extra attribute value (string or string array).", + "example": "claims.some_claim" + } + }, + "required": [ + "key", + "value_expression" + ], + "description": "Maps a token claim to an extra user attribute using a CEL expression." + }, + "kubernetesUserValidationRule": { + "type": "object", + "properties": { + "expression": { + "type": "string", + "example": "!user.username.startsWith('system:')" + }, + "message": { + "type": "string", + "example": "Username must not start with the system: prefix." + } + }, + "required": [ + "expression" + ], + "description": "CEL expression applied to the final authenticated user." + }, + "currencyCode": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^[A-Z]{3}$", + "description": "ISO 4217 code" + }, + "currencyCurrencies": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "currencies": { + "type": "object", + "properties": { + "currency": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "$ref": "#/components/schemas/currencyCode" + }, + "rate": { + "type": "number", + "examples": [ + 0.01 + ], + "format": "double" + }, + "updated": { + "type": "string", + "examples": [ + "2017-12-15T06:44:47Z" + ], + "format": "date-time" + } + }, + "required": [ + "code", + "rate", + "updated" + ], + "example": { + "code": "USD", + "rate": 0.01, + "updated": "2017-12-15T06:44:47Z" + } + }, + "additionalProperties": false, + "description": "List of supported currency rate entries." + } + }, + "required": [ + "currency" + ], + "additionalProperties": false, + "description": "Wrapped collection of currency rate entries.", + "example": { + "currency": [ + { + "code": "EUR", + "rate": 0.00846077, + "updated": "2017-12-14T10:00:00Z" + }, + { + "code": "GBP", + "rate": 0.00743236, + "updated": "2017-12-14T10:00:00Z" + } + ] + } + } + }, + "required": [ + "currencies" + ], + "additionalProperties": false, + "description": "Response schema for listing supported currencies and exchange rates.", + "example": { + "currencies": { + "currency": [ + { + "code": "EUR", + "rate": 0.00846077, + "updated": "2017-12-14T10:00:00Z" + }, + { + "code": "GBP", + "rate": 0.00743236, + "updated": "2017-12-14T10:00:00Z" + }, + { + "code": "SGD", + "rate": 0.01347685, + "updated": "2017-12-14T10:00:00Z" + }, + { + "code": "USD", + "rate": 0.01, + "updated": "2017-12-15T06:44:47Z" + } + ] + } + } + }, + "currencyError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "devices": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "gpu_plans": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "amount": { + "type": "integer", + "minimum": 0, + "format": "int64", + "example": 1 + } + }, + "required": [ + "amount" + ], + "example": { + "amount": 1 + } + }, + "description": "Available GPU plans in the zone.", + "example": { + "nvidia-a10": { + "amount": 1 + } + } + } + }, + "description": "Availability grouped by zone.", + "example": { + "gpu_plans": { + "nvidia-a10": { + "amount": 1 + } + } + } + }, + "description": "Zone device availability", + "example": { + "fra1": { + "gpu_plans": { + "nvidia-a10": { + "amount": 1 + } + } + } + } + }, + "deviceError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "events": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "events": { + "type": "object", + "examples": [ + { + "event": [ + { + "email": "user@example.com", + "first_name": "John", + "last_name": "Doe", + "server": "00798b85-efdc-41ca-8021-f6ef457b8531", + "time": "2024-02-23T12:34:56Z", + "type": "server_start" + } + ] + } + ], + "properties": { + "event": { + "type": "array", + "items": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "server": { + "$ref": "#/components/schemas/eventsUuid" + }, + "time": { + "type": "string", + "examples": [ + "2024-02-23T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the event occurred" + }, + "type": { + "$ref": "#/components/schemas/eventsEventType" + } + }, + "required": [ + "server", + "time", + "type" + ] + }, + "description": "List of events associated with servers" + } + }, + "required": [ + "event" + ] + } + }, + "description": "Server event type" + }, + "eventsUuid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$", + "format": "uuid", + "description": "Universally unique identifier", + "example": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "eventsEventType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "server_create", + "server_error", + "server_modify", + "server_shutdown", + "server_start", + "server_start_init", + "server_stop" + ], + "description": "Server event type" + }, + "eventsError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "ipAddress": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "type": "string", + "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}$", + "description": "IPv4 address" + }, + { + "type": "string", + "pattern": "^[a-fA-F0-9:]+$", + "description": "IPv6 address" + } + ], + "description": "IP address", + "example": "10.0.0.20" + }, + "addIpAddressRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "ip_address": { + "type": "object", + "properties": { + "access": { + "type": "string" + }, + "family": { + "$ref": "#/components/schemas/ipAddressIpFamily" + }, + "floating": { + "$ref": "#/components/schemas/ipAddressBooleanYesno" + }, + "mac": { + "$ref": "#/components/schemas/ipAddressMacAddress" + }, + "prefix": { + "type": "string" + }, + "release_policy": { + "$ref": "#/components/schemas/ipAddressIpReleasePolicy" + }, + "server": { + "$ref": "#/components/schemas/ipAddressUuid" + }, + "vlan_id": { + "type": "string" + }, + "zone": { + "$ref": "#/components/schemas/ipAddressZone" + } + }, + "required": [ + "access", + "family" + ] + } + }, + "required": [ + "ip_address" + ], + "description": "Schema for adding an IP address to a server" + }, + "bulkPatchIpAddressesRequestV1.3": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "ip_addresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/ipAddress" + }, + "main_account_id": { + "$ref": "#/components/schemas/ipAddressAccountId" + }, + "delegated_to_account_id": { + "$ref": "#/components/schemas/ipAddressAccountId" + }, + "release_policy": { + "$ref": "#/components/schemas/ipAddressIpReleasePolicy" + } + }, + "required": [ + "address", + "main_account_id", + "delegated_to_account_id", + "release_policy" + ], + "additionalProperties": false + } + } + }, + "required": [ + "ip_addresses" + ], + "additionalProperties": false, + "description": "Request schema for bulk patching IP addresses" + }, + "modifyIpAddressRequestV1.0": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "ip_address": { + "type": "object", + "properties": { + "floating": { + "$ref": "#/components/schemas/ipAddressBooleanYesno" + }, + "ptr_record": { + "type": "string", + "example": "host.example.com" + }, + "vlan_id": { + "type": "string" + } + }, + "required": [ + "ptr_record" + ], + "example": { + "ptr_record": "host.example.com" + } + } + }, + "required": [ + "ip_address" + ], + "description": "Request schema for modifying an IP address", + "example": { + "ip_address": { + "ptr_record": "host.example.com" + } + } + }, + "patchIpAddressRequestV1.3": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "ip_address": { + "type": "object", + "properties": { + "ptr_record": { + "$ref": "#/components/schemas/ipAddressPtrRecord" + }, + "mac": { + "$ref": "#/components/schemas/ipAddressMacAddress" + }, + "release_policy": { + "$ref": "#/components/schemas/ipAddressIpReleasePolicy" + } + } + } + }, + "required": [ + "ip_address" + ], + "description": "Request schema for modifying an IP address" + }, + "ipAddressesResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "ip_addresses": { + "type": "object", + "properties": { + "ip_address": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ipAddressDetails" + }, + "description": "List of IP addresses" + } + }, + "required": [ + "ip_address" + ], + "example": { + "ip_address": [ + { + "access": "public", + "address": "203.0.113.10", + "family": "IPv4", + "ptr_record": "host.example.com" + } + ] + } + } + }, + "required": [ + "ip_addresses" + ], + "additionalProperties": false, + "description": "Request schema for IP address operations", + "example": { + "ip_addresses": { + "ip_address": [ + { + "access": "public", + "address": "203.0.113.10", + "family": "IPv4", + "ptr_record": "host.example.com" + } + ] + } + } + }, + "ipAddressDetails": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "access": { + "$ref": "#/components/schemas/ipAddressNetworkType" + }, + "account_id": { + "$ref": "#/components/schemas/ipAddressAccountId" + }, + "address": { + "$ref": "#/components/schemas/ipAddress" + }, + "delegated_to_account_id": { + "$ref": "#/components/schemas/ipAddressDelegatedToAccountId" + }, + "family": { + "$ref": "#/components/schemas/ipAddressIpFamily" + }, + "floating": { + "$ref": "#/components/schemas/ipAddressBooleanYesno" + }, + "mac": { + "$ref": "#/components/schemas/ipAddressMacAddress" + }, + "part_of_plan": { + "$ref": "#/components/schemas/ipAddressBooleanYesno" + }, + "ptr_record": { + "type": "string" + }, + "release_policy": { + "$ref": "#/components/schemas/ipAddressIpReleasePolicy" + }, + "server": { + "$ref": "#/components/schemas/ipAddressUuid" + }, + "zone": { + "$ref": "#/components/schemas/ipAddressZone" + } + }, + "required": [ + "access", + "address" + ], + "additionalProperties": false, + "description": "Details of an IP address" + }, + "ipAddressRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "ip_addresses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ipAddressDetails" + }, + "description": "List of IP addresses to operate on", + "example": [ + { + "access": "public", + "address": "203.0.113.10", + "family": "IPv4", + "ptr_record": "host.example.com" + } + ] + } + }, + "required": [ + "ip_addresses" + ], + "description": "Request schema for IP address operations", + "example": { + "ip_addresses": [ + { + "access": "public", + "address": "203.0.113.10", + "family": "IPv4", + "ptr_record": "host.example.com" + } + ] + } + }, + "ipAddressResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "ip_address": { + "$ref": "#/components/schemas/ipAddressDetails" + } + }, + "required": [ + "ip_address" + ], + "additionalProperties": false, + "description": "Request schema for IP address operations" + }, + "ipAddressIpFamily": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "IPv4", + "IPv6" + ], + "description": "IP address family", + "example": "IPv4" + }, + "ipAddressBooleanYesno": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "yes", + "no" + ], + "description": "Boolean value represented as yes/no", + "example": "yes" + }, + "ipAddressMacAddress": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$", + "description": "MAC address", + "example": "de:ff:ff:ff:cc:20" + }, + "ipAddressIpReleasePolicy": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "release", + "keep" + ], + "description": "Action taken when the resource using the address is deleted: release deletes the address, while keep preserves it as a detached floating IP address", + "example": "release" + }, + "ipAddressUuid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$", + "format": "uuid", + "description": "Universally unique identifier", + "example": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "ipAddressZone": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "fi-hel1", + "de-fra1", + "us-nyc1" + ], + "maxLength": 15, + "minLength": 2, + "pattern": "^[a-z][a-z0-9-]{0,14}[a-z0-9]$", + "description": "Zone identifier" + }, + "ipAddressAccountId": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "minimum": 1, + "format": "int64", + "description": "Unique numeric identifier of an account." + }, + "ipAddressPtrRecord": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string" + }, + "ipAddressNetworkType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "public", + "utility", + "private" + ], + "description": "Network access type", + "example": "public" + }, + "ipAddressDelegatedToAccountId": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": [ + "integer", + "null" + ], + "format": "int64", + "description": "Attached to a resource that is delegated to another account. Null means not delegated." + }, + "ipAddressError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "networkPeeringCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "configured_status": { + "type": "string", + "enum": [ + "active", + "disabled" + ], + "default": "active" + }, + "name": { + "type": "string", + "example": "Peering A->B" + }, + "network": { + "type": "object", + "properties": { + "uuid": { + "$ref": "#/components/schemas/networkPeeringUuid" + } + }, + "required": [ + "uuid" + ], + "description": "Describes the local side of the peering" + }, + "peer_network": { + "type": "object", + "properties": { + "uuid": { + "$ref": "#/components/schemas/networkPeeringUuid" + } + }, + "required": [ + "uuid" + ], + "description": "Describes the peer side of the peering" + } + }, + "required": [ + "name", + "network", + "peer_network" + ], + "additionalProperties": false, + "description": "Describes the mutable properties when creating a network-peering between two networks", + "example": { + "configured_status": "active", + "name": "Peering A->B", + "network": { + "uuid": "03126dc1-a69f-4bc2-8b24-e31c22d64712" + }, + "peer_network": { + "uuid": "03585987-bf7d-4544-8e9b-5a1b4d74a333" + } + } + }, + "networkPeeringModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "configured_status": { + "enum": [ + "active", + "disabled" + ] + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "description": "Describes the mutable properties when modifying a network-peering", + "example": { + "configured_status": "disabled", + "name": "Peering A->B modified" + } + }, + "networkPeerings": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "network_peerings": { + "type": "object", + "properties": { + "network_peering": { + "type": "array", + "items": { + "$ref": "#/components/schemas/networkPeering" + } + } + }, + "required": [ + "network_peering" + ], + "additionalProperties": false, + "example": { + "network_peering": [ + { + "configured_status": "active", + "name": "Peering A->B", + "network": { + "uuid": "03126dc1-a69f-4bc2-8b24-e31c22d64712" + }, + "peer_network": { + "uuid": "03585987-bf7d-4544-8e9b-5a1b4d74a333" + }, + "state": "active", + "uuid": "0f7984bc-5d72-4aaf-b587-90e6a8f32efc", + "created_at": "2026-07-01T00:00:00Z" + } + ] + } + } + }, + "required": [ + "network_peerings" + ], + "additionalProperties": false, + "description": "Network peerings", + "example": { + "network_peerings": { + "network_peering": [ + { + "configured_status": "active", + "name": "Peering A->B", + "network": { + "uuid": "03126dc1-a69f-4bc2-8b24-e31c22d64712" + }, + "peer_network": { + "uuid": "03585987-bf7d-4544-8e9b-5a1b4d74a333" + }, + "state": "active", + "uuid": "0f7984bc-5d72-4aaf-b587-90e6a8f32efc", + "created_at": "2026-07-01T00:00:00Z" + } + ] + } + } + }, + "networkPeering": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "configured_status": { + "type": "string", + "enum": [ + "active", + "disabled" + ] + }, + "name": { + "$ref": "#/components/schemas/networkPeeringName" + }, + "network": { + "type": "object", + "properties": { + "ip_networks": { + "type": "object", + "properties": { + "ip_network": { + "type": "array", + "items": { + "properties": { + "address": { + "$ref": "#/components/schemas/networkPeeringIpCidr" + }, + "family": { + "$ref": "#/components/schemas/networkPeeringIpFamily" + } + } + } + } + } + }, + "uuid": { + "$ref": "#/components/schemas/networkPeeringUuid" + } + }, + "description": "Describes the local side of the peering" + }, + "peer_network": { + "type": "object", + "properties": { + "ip_networks": { + "type": "object", + "properties": { + "ip_network": { + "type": "array", + "items": { + "properties": { + "address": { + "$ref": "#/components/schemas/networkPeeringIpCidr" + }, + "family": { + "$ref": "#/components/schemas/networkPeeringIpFamily" + } + } + } + } + }, + "description": "note: only visible if both sides have a peering defined" + }, + "uuid": { + "$ref": "#/components/schemas/networkPeeringUuid" + } + }, + "description": "Describes the peer side of the peering" + }, + "state": { + "$ref": "#/components/schemas/networkPeeringState" + }, + "uuid": { + "$ref": "#/components/schemas/networkPeeringUuid" + }, + "created_at": { + "oneOf": [ + { + "$ref": "#/components/schemas/networkPeeringRfc3339Datetime" + }, + { + "type": "null" + } + ], + "description": "When the network peering was created" + }, + "updated_at": { + "oneOf": [ + { + "$ref": "#/components/schemas/networkPeeringRfc3339Datetime" + }, + { + "type": "null" + } + ], + "description": "When the network peering was last updated. Null until the first modification." + } + }, + "description": "Network peering object describes a peering relationship between two networks", + "example": { + "configured_status": "active", + "name": "Peering A->B", + "network": { + "ip_networks": { + "ip_network": [ + { + "address": "192.168.0.0/24", + "family": "IPv4" + }, + { + "address": "fc02:c4f3::/64", + "family": "IPv6" + } + ] + }, + "uuid": "03126dc1-a69f-4bc2-8b24-e31c22d64712" + }, + "peer_network": { + "ip_networks": { + "ip_network": [ + { + "address": "192.168.99.0/24", + "family": "IPv4" + }, + { + "address": "fc02:c4f3:99::/64", + "family": "IPv6" + } + ] + }, + "uuid": "03585987-bf7d-4544-8e9b-5a1b4d74a333" + }, + "state": "active", + "uuid": "0f7984bc-5d72-4aaf-b587-90e6a8f32efc", + "created_at": "2026-07-01T00:00:00Z" + } + }, + "networkPeeringName": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 255, + "minLength": 1, + "description": "Name of a network peering relationship." + }, + "networkPeeringState": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "active", + "pending-peer", + "provisioning", + "conflict-subnet", + "missing-local-router", + "missing-peer-router", + "deleted-peer-network", + "disabled", + "peer-disabled", + "error" + ], + "description": "Current lifecycle state of a network peering." + }, + "networkPeeringUuid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$", + "format": "uuid", + "description": "Universally unique identifier", + "example": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "networkPeeringIpCidr": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "cidr", + "description": "IP CIDR" + }, + "networkPeeringIpFamily": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "IPv4", + "IPv6" + ], + "description": "IP address family", + "example": "IPv4" + }, + "networkPeeringRfc3339Datetime": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "2026-07-01T00:00:00Z", + "2026-07-31T23:59:59Z" + ], + "format": "date-time", + "description": "Datetime in RFC 3339 format" + }, + "networkPeeringError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "createNetworkRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "network": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/networkType" + }, + "name": { + "type": "string", + "example": "backend-net" + }, + "zone": { + "$ref": "#/components/schemas/networkZone" + }, + "router": { + "$ref": "#/components/schemas/networkUuid" + }, + "ip_networks": { + "type": "object", + "properties": { + "ip_network": { + "type": "array", + "items": { + "type": "object", + "properties": { + "family": { + "$ref": "#/components/schemas/networkIpFamily" + }, + "address": { + "$ref": "#/components/schemas/networkIpCidr" + }, + "gateway": { + "$ref": "#/components/schemas/networkIpAddress" + }, + "dhcp": { + "$ref": "#/components/schemas/networkBooleanYesno" + }, + "dhcp_default_route": { + "$ref": "#/components/schemas/networkBooleanYesno" + }, + "dhcp_dns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/networkIpAddress" + } + }, + "dhcp_routes": { + "type": "array", + "items": { + "type": "string" + } + }, + "dhcp_bootfile_url": { + "$ref": "#/components/schemas/networkBootfileUrl" + }, + "dhcp_routes_configuration": { + "type": "object", + "properties": { + "effective_routes_auto_population": { + "type": "object", + "properties": { + "enabled": { + "$ref": "#/components/schemas/networkBooleanYesno" + }, + "exclude_by_source": { + "type": "array", + "items": { + "type": "string" + } + }, + "filter_by_destination": { + "type": "array", + "items": { + "$ref": "#/components/schemas/networkIpCidr" + } + }, + "filter_by_route_type": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "required": [ + "family", + "address", + "dhcp" + ] + } + } + }, + "required": [ + "ip_network" + ] + }, + "labels": { + "$ref": "#/components/schemas/networkLabels" + } + }, + "required": [ + "type", + "name", + "zone", + "ip_networks" + ], + "example": { + "type": "private", + "name": "backend-net", + "zone": "fi-hel2", + "ip_networks": { + "ip_network": [ + { + "family": "IPv4", + "address": "10.0.0.0/24", + "dhcp": "yes" + } + ] + } + } + } + }, + "required": [ + "network" + ], + "description": "Request schema for creating a network", + "example": { + "network": { + "type": "private", + "name": "backend-net", + "zone": "fi-hel2", + "ip_networks": { + "ip_network": [ + { + "family": "IPv4", + "address": "10.0.0.0/24", + "dhcp": "yes" + } + ] + } + } + } + }, + "networkType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "public", + "utility", + "private" + ], + "description": "Network access type", + "example": "public" + }, + "modifyNetworkRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "network": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/networkType" + }, + "name": { + "type": "string" + }, + "zone": { + "$ref": "#/components/schemas/networkZone" + }, + "tags": { + "$ref": "#/components/schemas/networkTags" + }, + "labels": { + "$ref": "#/components/schemas/networkLabels" + }, + "router": { + "$ref": "#/components/schemas/networkUuid" + }, + "grt_export": { + "$ref": "#/components/schemas/networkBoolean01" + }, + "parent_network": { + "type": "string" + }, + "ip_networks": { + "type": "object", + "properties": { + "ip_network": { + "type": "array", + "items": { + "type": "object", + "properties": { + "family": { + "$ref": "#/components/schemas/networkIpFamily" + }, + "address": { + "$ref": "#/components/schemas/networkIpCidr" + }, + "gateway": { + "$ref": "#/components/schemas/networkIpAddress" + }, + "dhcp": { + "type": "string" + }, + "dhcp_default_route": { + "type": "string" + }, + "dhcp_dns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/networkIpAddress" + } + }, + "dhcp_routes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/networkIpCidr" + } + }, + "dhcp_bootfile_url": { + "type": "string" + } + }, + "required": [ + "family", + "address" + ] + } + } + }, + "required": [ + "ip_network" + ] + }, + "network_features": { + "$ref": "#/components/schemas/networkFeatures" + }, + "main_account_id": { + "$ref": "#/components/schemas/networkAccountId" + } + }, + "required": [ + "type", + "name", + "zone", + "tags", + "labels", + "router", + "grt_export", + "parent_network", + "ip_networks", + "network_features", + "main_account_id" + ] + } + }, + "required": [ + "network" + ], + "description": "Request schema for modifying a network" + }, + "networkFeatures": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "allow-linklocal-address", + "allow-overlapping-ip-network", + "managed-by-service", + "allow-cgnat-address" + ], + "description": "Features available for a network" + }, + "networks": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "networks": { + "type": "object", + "properties": { + "network": { + "type": "array", + "items": { + "$ref": "#/components/schemas/networkDetails" + } + } + }, + "required": [ + "network" + ], + "additionalProperties": false, + "description": "Container object for network items.", + "example": { + "network": [ + { + "uuid": "8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a001", + "name": "backend-net", + "type": "private", + "zone": "fi-hel2" + } + ] + } + } + }, + "required": [ + "networks" + ], + "additionalProperties": false, + "description": "Response schema containing a list of networks.", + "example": { + "networks": { + "network": [ + { + "uuid": "8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a001", + "name": "backend-net", + "type": "private", + "zone": "fi-hel2" + } + ] + } + } + }, + "networkDetails": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "grt_export": { + "$ref": "#/components/schemas/networkBooleanYesno" + }, + "ip_networks": { + "type": "object", + "properties": { + "ip_network": { + "type": "array", + "items": { + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/networkIpCidr" + }, + "dhcp": { + "$ref": "#/components/schemas/networkBooleanYesno" + }, + "dhcp_bootfile_url": { + "$ref": "#/components/schemas/networkBootfileUrl" + }, + "dhcp_default_route": { + "$ref": "#/components/schemas/networkBooleanYesno" + }, + "dhcp_dns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/networkIpAddress" + } + }, + "dhcp_routes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/networkIpCidr" + } + }, + "family": { + "$ref": "#/components/schemas/networkIpFamily" + }, + "gateway": { + "$ref": "#/components/schemas/networkIpAddress" + } + }, + "required": [ + "family", + "address" + ] + } + } + }, + "required": [ + "ip_network" + ] + }, + "name": { + "type": "string" + }, + "network_features": { + "type": "array", + "items": { + "type": "string" + } + }, + "parent_network": { + "$ref": "#/components/schemas/networkUuid" + }, + "peerings": { + "type": "object", + "properties": { + "peering": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/networkPeeringName" + }, + "state": { + "$ref": "#/components/schemas/networkPeeringState" + }, + "uuid": { + "$ref": "#/components/schemas/networkUuid" + } + } + } + } + }, + "description": "List of network peerings the network is part of" + }, + "router": { + "$ref": "#/components/schemas/networkUuid" + }, + "servers": { + "type": "object", + "properties": { + "server": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "uuid": { + "$ref": "#/components/schemas/networkUuid" + } + }, + "required": [ + "uuid", + "title" + ] + } + } + }, + "required": [ + "server" + ] + }, + "services": { + "type": "object", + "properties": { + "service": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "service_routes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/networkIpCidr" + } + } + }, + "required": [ + "name", + "service_routes" + ] + } + } + }, + "required": [ + "service" + ], + "description": "List of services this network is joined to" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "$ref": "#/components/schemas/networkType" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "zone": { + "$ref": "#/components/schemas/networkZone" + } + }, + "required": [ + "name", + "zone" + ], + "description": "Detailed network resource attributes.", + "example": { + "evi": 1234, + "grt_export": "no", + "ip_networks": { + "ip_network": [ + { + "family": "IPv4", + "address": "192.168.150.0/24", + "dhcp": "yes", + "dhcp_dns": [ + "192.168.150.1", + "192.168.150.254" + ], + "gateway": "192.168.150.1" + } + ] + }, + "name": "Example network", + "network_features": [ + "allow-linklocal-address", + "allow-overlapping-ip-network", + "managed-by-service" + ], + "parent_network": "037b0e4b-2734-4d5d-89ba-1737fc4593bf", + "peerings": { + "peering": [ + { + "name": "Peering A->B", + "state": "pending-peer", + "uuid": "0fc82c18-1e5e-4076-afcd-3b85869800e7" + } + ] + }, + "router": "0414e0d7-4436-4037-9dd8-6eaf47dce599", + "services": { + "service": [ + { + "name": "OBJECT-STORAGE", + "service_routes": [ + "10.10.10.0/24" + ] + } + ] + }, + "type": "private", + "uuid": "039a8811-e279-46c2-8e45-1962767f5a4c", + "zone": "fi-hel1" + } + }, + "network": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "network": { + "$ref": "#/components/schemas/networkDetails" + } + }, + "required": [ + "network" + ], + "additionalProperties": false, + "description": "Response schema containing a single network." + }, + "networkLabel": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Label key used to classify the resource" + }, + "value": { + "type": "string", + "description": "Value associated with the label key" + } + }, + "required": [ + "key", + "value" + ], + "additionalProperties": false, + "description": "A key/value pair to label and categorize resources", + "example": { + "key": "env", + "value": "production" + } + }, + "networkAccountId": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "minimum": 1, + "format": "int64", + "description": "Unique numeric identifier of an account." + }, + "networkUuid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$", + "format": "uuid", + "description": "Universally unique identifier", + "example": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "networkZone": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "fi-hel1", + "de-fra1", + "us-nyc1" + ], + "maxLength": 15, + "minLength": 2, + "pattern": "^[a-z][a-z0-9-]{0,14}[a-z0-9]$", + "description": "Zone identifier" + }, + "networkIpFamily": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "IPv4", + "IPv6" + ], + "description": "IP address family", + "example": "IPv4" + }, + "networkIpCidr": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "cidr", + "description": "IP CIDR" + }, + "networkIpAddress": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "type": "string", + "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}$", + "description": "IPv4 address" + }, + { + "type": "string", + "pattern": "^[a-fA-F0-9:]+$", + "description": "IPv6 address" + } + ], + "description": "IP address", + "example": "10.0.0.20" + }, + "networkBooleanYesno": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "yes", + "no" + ], + "description": "Boolean value represented as yes/no", + "example": "yes" + }, + "networkBootfileUrl": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "url", + "description": "HTTP or HTTPS URL for DHCP bootfile delivery." + }, + "networkLabels": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "label": { + "type": "array", + "items": { + "$ref": "#/components/schemas/networkLabel" + } + } + }, + "description": "Collection of key/value labels for a resource.", + "example": { + "label": [ + { + "key": "env", + "value": "prod" + }, + { + "key": "team", + "value": "network" + } + ] + } + }, + "networkCreateInterfaceRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "main_account_id": { + "$ref": "#/components/schemas/networkAccountId" + }, + "interface": { + "type": "object", + "properties": { + "bootable": { + "$ref": "#/components/schemas/networkBooleanYesno" + }, + "network": { + "type": "string" + }, + "source_ip_filtering": { + "$ref": "#/components/schemas/networkBooleanYesno" + }, + "type": { + "$ref": "#/components/schemas/networkType" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + }, + "visible": { + "$ref": "#/components/schemas/networkBooleanYesno" + } + }, + "required": [ + "key", + "value", + "visible" + ] + } + } + }, + "required": [ + "type", + "network", + "source_ip_filtering", + "bootable" + ] + } + }, + "description": "Request schema for creating a network interface", + "example": { + "main_account_id": 123456, + "interface": { + "type": "private", + "network": "8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a001", + "source_ip_filtering": "yes", + "bootable": "no" + } + } + }, + "networkTags": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "tags": { + "type": "object", + "properties": { + "tag": { + "type": "array", + "items": { + "type": "object", + "properties": { + "description": { + "$ref": "#/components/schemas/networkDescription" + }, + "name": { + "$ref": "#/components/schemas/networkName" + }, + "servers": { + "$ref": "#/components/schemas/networkServers" + } + }, + "required": [ + "name", + "servers" + ] + } + } + }, + "required": [ + "tag" + ], + "example": { + "tag": [ + { + "name": "PROD", + "description": "Production servers", + "servers": { + "server": [ + "0077fa3d-32db-4b09-9f5f-30d9e9afb565" + ] + } + } + ] + } + } + }, + "required": [ + "tags" + ], + "description": "Container object for resource tags.", + "example": { + "tags": { + "tag": [ + { + "name": "PROD", + "description": "Production servers", + "servers": { + "server": [ + "0077fa3d-32db-4b09-9f5f-30d9e9afb565" + ] + } + } + ] + } + } + }, + "networkDescription": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "Development servers", + "Production servers", + "Private environment", + "Quality Assurance environment", + "Web servers", + "Database servers" + ], + "description": "Human-readable description for a tag." + }, + "networkName": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "DEV", + "PROD", + "private", + "QA", + "webserver", + "database" + ], + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9_]{1,32}$", + "description": "Short name used to identify a tag." + }, + "networkServers": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "server": { + "type": "array", + "items": { + "type": "string", + "examples": [ + "0077fa3d-32db-4b09-9f5f-30d9e9afb565", + "00c78863-db86-44ea-af70-d6edc4d162bf" + ], + "format": "uuid", + "description": "Unique identifier of the server." + } + } + }, + "description": "List of servers associated with the tag.", + "example": { + "server": [ + "0077fa3d-32db-4b09-9f5f-30d9e9afb565", + "00c78863-db86-44ea-af70-d6edc4d162bf" + ] + } + }, + "networkBoolean01": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1 + ], + "description": "Schema for boolean-like values encoded as 0 or 1." + }, + "networkError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "networkInterfaces": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "interfaces": { + "type": "object", + "properties": { + "interface": { + "$ref": "#/components/schemas/networkInterface" + } + }, + "required": [ + "interface" + ], + "example": { + "interface": { + "uuid": "8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a003", + "type": "private", + "network": "8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a001", + "mac": "00:16:3e:12:34:56", + "source_ip_filtering": "yes", + "bootable": "no", + "ip_addresses": [ + { + "ip_address": { + "address": "10.0.0.10", + "family": "IPv4", + "floating": "no", + "release_policy": "keep", + "dhcp_provided": "yes" + } + } + ] + } + } + } + }, + "required": [ + "interfaces" + ], + "description": "Response schema for listing network interfaces", + "example": { + "interfaces": { + "interface": { + "uuid": "8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a003", + "type": "private", + "network": "8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a001", + "mac": "00:16:3e:12:34:56", + "source_ip_filtering": "yes", + "bootable": "no", + "ip_addresses": [ + { + "ip_address": { + "address": "10.0.0.10", + "family": "IPv4", + "floating": "no", + "release_policy": "keep", + "dhcp_provided": "yes" + } + } + ] + } + } + } + }, + "networkInterface": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "bootable": { + "$ref": "#/components/schemas/networkBooleanYesno" + }, + "ip_addresses": { + "type": "array", + "items": { + "type": "object" + }, + "example": [ + { + "ip_address": { + "address": "10.0.0.10", + "family": "IPv4", + "floating": "no", + "release_policy": "keep", + "dhcp_provided": "yes" + } + } + ] + }, + "mac": { + "type": "string" + }, + "network": { + "type": "string" + }, + "source_ip_filtering": { + "$ref": "#/components/schemas/networkBooleanYesno" + }, + "server": { + "$ref": "#/components/schemas/networkUuid" + }, + "type": { + "$ref": "#/components/schemas/networkType" + }, + "uuid": { + "$ref": "#/components/schemas/networkUuid" + } + }, + "required": [ + "uuid", + "type", + "network", + "mac", + "source_ip_filtering", + "bootable", + "ip_addresses" + ], + "description": "Response schema for listing network interfaces", + "example": { + "uuid": "8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a003", + "type": "private", + "network": "8f6d1ec2-8f5e-4b67-8fcb-6fa9c1a8a001", + "mac": "00:16:3e:12:34:56", + "source_ip_filtering": "yes", + "bootable": "no", + "ip_addresses": [ + { + "ip_address": { + "address": "10.0.0.10", + "family": "IPv4", + "floating": "no", + "release_policy": "keep", + "dhcp_provided": "yes" + } + } + ] + } + }, + "auditLogsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "audit_logs": [] + } + ], + "properties": { + "audit_logs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/auditLogsAuditLog" + }, + "description": "List of audit log events" + } + }, + "title": "Audit Logs Response", + "required": [ + "audit_logs" + ], + "description": "Response schema for a list of audit logs" + }, + "auditLogsQueryParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "my_account", + "192.168.1.1", + "00798b85-efdc-41ca-8021-f6ef457b8531" + ], + "title": "QueryParameter", + "description": "Search string" + }, + "auditLogsLimitParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "examples": [ + 50, + 100 + ], + "title": "LimitParameter", + "maximum": 200, + "minimum": 1, + "format": "int32", + "description": "Number of results to return", + "default": 50 + }, + "auditLogsOffsetParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "examples": [ + 0, + 50, + 100 + ], + "title": "OffsetParameter", + "minimum": 0, + "format": "int32", + "description": "Page for retrieved results. Note: 0 and 1 retrieve the same first page results. (default 0)", + "default": 0 + }, + "auditLogsActionsParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + "create", + "update", + "delete" + ] + ], + "items": { + "type": "string", + "enum": [ + "create", + "read", + "update", + "delete", + "access-granted", + "access-granted-kubeconfig", + "access-modified", + "access-update", + "maintenance-start", + "writes-enable", + "attach", + "clone", + "detach", + "login", + "logout", + "start", + "stop", + "owner-change" + ] + }, + "title": "ActionsParameter", + "description": "List of actions to filter by" + }, + "auditLogsOriginsParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + "api", + "gui" + ] + ], + "items": { + "type": "string", + "enum": [ + "api", + "gui", + "upcloud_internal" + ] + }, + "title": "OriginsParameter", + "description": "List of origins to filter by" + }, + "auditLogsResourceTypesParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + "server", + "storage", + "network" + ] + ], + "items": { + "type": "string", + "enum": [ + "account", + "auth", + "init-script", + "managed-database", + "managed-loadbalancer", + "managed-loadbalancer-certificate-bundle", + "managed-object-storage", + "network-gateway", + "server", + "storage", + "uks", + "ssh-key" + ] + }, + "title": "ResourceTypesParameter", + "description": "List of resource types to filter by" + }, + "auditLogsCreatedAfterParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "2024-01-01T00:00:00Z" + ], + "title": "CreatedAfterParameter", + "format": "date-time", + "description": "List audit logs created after the given timestamp (including the time of timestamp). Format: ISO timestamp eg. 2024-01-01T23:45:56Z" + }, + "auditLogsCreatedBeforeParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "2024-12-31T23:59:59Z" + ], + "title": "CreatedBeforeParameter", + "format": "date-time", + "description": "List audit logs created before the given timestamp (including the time of timestamp). Format: ISO timestamp eg. 2024-01-01T23:45:56Z" + }, + "auditLogsFormatParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "csv", + "json" + ], + "title": "FormatParameter", + "enum": [ + "csv", + "json" + ], + "description": "Export format", + "default": "csv" + }, + "auditLogsCloudEventIDParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "01HQXYZ123456789ABCDEFGHJK" + ], + "title": "CloudEventIDParameter", + "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$", + "description": "Cloud event ID (ULID format)" + }, + "auditLogsAuditLog": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "time": "2024-03-05T14:30:00Z", + "auth_type": "api", + "cloud_event_id": "01HQXYZ123456789ABCDEFGHJK", + "upcloud_correlation_id": "550e8400-e29b-41d4-a716-446655440000", + "resource_type": "server", + "action": "start", + "origin": "api", + "account_username": "john.doe", + "ip_address": "192.168.1.100", + "resource_id": "00798b85-efdc-41ca-8021-f6ef457b8531" + } + ], + "properties": { + "time": { + "type": "string", + "examples": [ + "2024-03-05T14:30:00Z" + ], + "format": "date-time", + "description": "Timestamp of the event" + }, + "auth_type": { + "type": "string", + "examples": [ + "api", + "gui", + "basic_auth" + ], + "description": "Authentication type used (e.g., 'gui', 'api', 'basic_auth')" + }, + "cloud_event_id": { + "type": "string", + "examples": [ + "01HQXYZ123456789ABCDEFGHJK" + ], + "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$", + "description": "Cloud event ID in ULID format" + }, + "upcloud_correlation_id": { + "type": "string", + "examples": [ + "550e8400-e29b-41d4-a716-446655440000" + ], + "description": "UpCloud correlation ID for request tracing" + }, + "resource_type": { + "type": "string", + "examples": [ + "server", + "storage", + "network-gateway" + ], + "enum": [ + "account", + "auth", + "init-script", + "managed-database", + "managed-loadbalancer", + "managed-loadbalancer-certificate-bundle", + "managed-object-storage", + "network-gateway", + "server", + "storage", + "uks", + "ssh-key" + ], + "description": "Type of resource affected" + }, + "resource_sub_type": { + "type": "string", + "examples": [ + "session-api-token", + "subaccount-api-token" + ], + "description": "Subtype of resource affected (e.g., 'session-api-token')" + }, + "action": { + "type": "string", + "examples": [ + "create", + "update", + "delete" + ], + "enum": [ + "create", + "read", + "update", + "delete", + "access-granted", + "access-granted-kubeconfig", + "access-modified", + "access-update", + "maintenance-start", + "writes-enable", + "attach", + "clone", + "detach", + "login", + "logout", + "start", + "stop", + "owner-change" + ], + "description": "Action performed" + }, + "origin": { + "type": "string", + "examples": [ + "api", + "gui" + ], + "enum": [ + "api", + "gui", + "upcloud_internal" + ], + "description": "Origin of the request" + }, + "account_username": { + "type": "string", + "examples": [ + "john.doe" + ], + "description": "Username that performed the action" + }, + "ip_address": { + "type": "string", + "examples": [ + "192.168.1.100", + "2001:0db8:85a3:0000:0000:8a2e:0370:7334" + ], + "description": "IP address of the request origin (IPv4 or IPv6). May be masked for internal UpCloud services." + }, + "resource_id": { + "type": "string", + "examples": [ + "00000000-0000-4000-8000-000000000000", + "12345" + ], + "description": "ID of the affected resource. May be hidden for sensitive resources like auth and account." + }, + "current_state": { + "type": "object", + "additionalProperties": true, + "description": "Current state of the resource after the action (only present for create/update actions). Structure varies by resource_type." + }, + "previous_state": { + "type": "object", + "additionalProperties": true, + "description": "Previous state of the resource before the action (only present for update/delete actions). Structure varies by resource_type." + } + }, + "title": "Audit Log", + "required": [ + "time", + "auth_type", + "cloud_event_id", + "upcloud_correlation_id", + "resource_type", + "action", + "origin", + "account_username" + ], + "description": "A single audit log event" + }, + "auditLogsErrorResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_INVALID_CREDENTIALS", + "title": "Invalid user type.", + "correlation_id": "01KV86B1B4ETX8WJD05P4HF412", + "status": 401 + } + ], + "properties": { + "type": { + "type": "string", + "examples": [ + "https://developers.upcloud.com/1.3/errors#INTERNAL_SERVER_ERROR" + ], + "format": "uri", + "description": "A URI reference that uniquely identifies the problem type only in the context of the provided API. It is neither recommended to be dereferenceable and point to a human-readable documentation nor globally unique for the problem type." + }, + "title": { + "type": "string", + "examples": [ + "Internal server error." + ], + "description": "A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized." + }, + "detail": { + "type": "string", + "examples": [ + "Invalid parameters." + ], + "description": "A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized." + }, + "status": { + "type": "integer", + "maximum": 599, + "minimum": 200, + "format": "int32", + "description": "The HTTP status code generated by the origin server for this occurrence of the problem." + }, + "invalid_params": { + "type": "array", + "examples": [ + [ + { + "name": "expires_at", + "reason": "Token expiration time must be in the future." + } + ] + ], + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "name", + "reason" + ] + } + }, + "correlation_id": { + "type": "string", + "examples": [ + "01JQV2ETY2K6HHE1KZFY9E1CYC" + ], + "description": "A unique identifier for the request. This identifier is generated by the server and can be used to track the request in the server logs. It is useful for debugging and support purposes." + } + }, + "required": [ + "type", + "title", + "status" + ], + "additionalProperties": false, + "description": "JSON Problem Details for HTTP APIs" + }, + "auditLogsFilterOptionsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "resource_types": [ + "server", + "storage", + "network", + "auth" + ], + "actions": [ + "create", + "read", + "update", + "delete" + ], + "origins": [ + "api", + "gui", + "upcloud_internal" + ] + } + ], + "properties": { + "resource_types": { + "type": "array", + "examples": [ + [ + "server", + "storage", + "network-gateway" + ] + ], + "items": { + "type": "string", + "enum": [ + "account", + "auth", + "init-script", + "managed-database", + "managed-loadbalancer", + "managed-loadbalancer-certificate-bundle", + "managed-object-storage", + "network-gateway", + "server", + "storage", + "uks", + "ssh-key" + ] + }, + "description": "List of available resource types" + }, + "actions": { + "type": "array", + "examples": [ + [ + "create", + "update", + "delete" + ] + ], + "items": { + "type": "string", + "enum": [ + "create", + "read", + "update", + "delete", + "access-granted", + "access-granted-kubeconfig", + "access-modified", + "access-update", + "maintenance-start", + "writes-enable", + "attach", + "clone", + "detach", + "login", + "logout", + "start", + "stop", + "owner-change" + ] + }, + "description": "List of available actions" + }, + "origins": { + "type": "array", + "examples": [ + [ + "api", + "gui", + "upcloud_internal" + ] + ], + "items": { + "type": "string", + "enum": [ + "api", + "gui", + "upcloud_internal" + ] + }, + "description": "List of available origins" + } + }, + "title": "Filter Options Response", + "required": [ + "resource_types", + "actions", + "origins" + ], + "description": "Available filter options for audit logs" + }, + "partnerCreateAccount": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "username": { + "type": "string", + "examples": [ + "newuser" + ] + }, + "password": { + "type": "string", + "examples": [ + "superSecret123" + ] + }, + "contact_details": { + "type": "object", + "properties": { + "address": { + "type": "string", + "examples": [ + "Some street" + ] + }, + "city": { + "type": "string", + "examples": [ + "Some city" + ] + }, + "company": { + "type": "string", + "examples": [ + "Some company" + ] + }, + "country": { + "type": "string", + "examples": [ + "FIN" + ], + "format": "iso-3166-1-alpha-3" + }, + "email": { + "type": "string", + "examples": [ + "some.user@example.com" + ], + "format": "email" + }, + "first_name": { + "type": "string", + "examples": [ + "Some" + ] + }, + "last_name": { + "type": "string", + "examples": [ + "User" + ] + }, + "phone": { + "type": "string", + "examples": [ + "+358.91234567" + ] + }, + "postal_code": { + "type": "string", + "examples": [ + "00100" + ] + }, + "state": { + "type": "string", + "examples": [ + "" + ], + "description": "State or province, if applicable. Required for some countries." + }, + "vat_number": { + "type": "string", + "examples": [ + "FI24315605" + ] + } + }, + "required": [ + "country", + "email", + "first_name", + "last_name", + "phone" + ] + } + }, + "required": [ + "username", + "password" + ], + "description": "Request payload for creating a partner-managed account." + }, + "partnerAccounts": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/partnerAccount" + }, + "description": "Collection of partner-managed accounts." + }, + "partnerAccount": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "address": { + "type": "string", + "examples": [ + "Some street" + ] + }, + "city": { + "type": "string", + "examples": [ + "Some city" + ] + }, + "company": { + "type": "string", + "examples": [ + "Some company" + ] + }, + "country": { + "type": "string", + "examples": [ + "FIN" + ], + "format": "iso-3166-1-alpha-3" + }, + "email": { + "type": "string", + "examples": [ + "some.user@example.com" + ], + "format": "email" + }, + "first_name": { + "type": "string", + "examples": [ + "Some" + ] + }, + "last_name": { + "type": "string", + "examples": [ + "User" + ] + }, + "phone": { + "type": "string", + "examples": [ + "+358.91234567" + ] + }, + "postal_code": { + "type": "string", + "examples": [ + "00100" + ] + }, + "state": { + "type": "string", + "examples": [ + "" + ] + }, + "username": { + "type": "string", + "examples": [ + "somename" + ] + }, + "vat_number": { + "type": "string", + "examples": [ + "FI24315605" + ] + } + }, + "required": [ + "username" + ], + "description": "Partner-managed account details." + }, + "partnerError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "partnerError400": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "oneOf": [ + { + "$ref": "#/components/schemas/partnerError400AddressInvalid" + }, + { + "$ref": "#/components/schemas/partnerError400CityInvalid" + }, + { + "$ref": "#/components/schemas/partnerError400CompanyInvalid" + }, + { + "$ref": "#/components/schemas/partnerError400CountryInvalid" + }, + { + "$ref": "#/components/schemas/partnerError400CountryMissing" + }, + { + "$ref": "#/components/schemas/partnerError400EmailInvalid" + }, + { + "$ref": "#/components/schemas/partnerError400EmailMissing" + }, + { + "$ref": "#/components/schemas/partnerError400FirstNameInvalid" + }, + { + "$ref": "#/components/schemas/partnerError400FirstNameMissing" + }, + { + "$ref": "#/components/schemas/partnerError400LastNameInvalid" + }, + { + "$ref": "#/components/schemas/partnerError400LastNameMissing" + }, + { + "$ref": "#/components/schemas/partnerError400PasswordInvalid" + }, + { + "$ref": "#/components/schemas/partnerError400PasswordMissing" + }, + { + "$ref": "#/components/schemas/partnerError400PhoneInvalid" + }, + { + "$ref": "#/components/schemas/partnerError400PhoneMissing" + }, + { + "$ref": "#/components/schemas/partnerError400PostalCodeInvalid" + }, + { + "$ref": "#/components/schemas/partnerError400PostalCodeMissing" + } + ], + "discriminator": { + "propertyName": "error_code", + "mapping": { + "ADDRESS_INVALID": "#/components/schemas/partnerError400AddressInvalid", + "CITY_INVALID": "#/components/schemas/partnerError400CityInvalid", + "COMPANY_INVALID": "#/components/schemas/partnerError400CompanyInvalid", + "COUNTRY_INVALID": "#/components/schemas/partnerError400CountryInvalid", + "COUNTRY_MISSING": "#/components/schemas/partnerError400CountryMissing", + "EMAIL_INVALID": "#/components/schemas/partnerError400EmailInvalid", + "EMAIL_MISSING": "#/components/schemas/partnerError400EmailMissing", + "FIRST_NAME_INVALID": "#/components/schemas/partnerError400FirstNameInvalid", + "FIRST_NAME_MISSING": "#/components/schemas/partnerError400FirstNameMissing", + "LAST_NAME_INVALID": "#/components/schemas/partnerError400LastNameInvalid", + "LAST_NAME_MISSING": "#/components/schemas/partnerError400LastNameMissing", + "PASSWORD_INVALID": "#/components/schemas/partnerError400PasswordInvalid", + "PASSWORD_MISSING": "#/components/schemas/partnerError400PasswordMissing", + "PHONE_INVALID": "#/components/schemas/partnerError400PhoneInvalid", + "PHONE_MISSING": "#/components/schemas/partnerError400PhoneMissing", + "POSTAL_CODE_INVALID": "#/components/schemas/partnerError400PostalCodeInvalid", + "POSTAL_CODE_MISSING": "#/components/schemas/partnerError400PostalCodeMissing" + } + }, + "example": { + "error_code": "EMAIL_INVALID", + "error_message": "The attribute email has an invalid value." + } + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "400 Bad Request errors for partner account creation.", + "example": { + "error": { + "error_code": "EMAIL_INVALID", + "error_message": "The attribute email has an invalid value." + } + } + }, + "partnerError400AddressInvalid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "ADDRESS_INVALID" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute address has an invalid value." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute address has an invalid value." + }, + "partnerError400CityInvalid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "CITY_INVALID" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute city has an invalid value." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute city has an invalid value." + }, + "partnerError400CompanyInvalid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "COMPANY_INVALID" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute company has an invalid value." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute company has an invalid value." + }, + "partnerError400CountryInvalid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "COUNTRY_INVALID" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute country has an invalid value." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute country has an invalid value." + }, + "partnerError400CountryMissing": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "COUNTRY_MISSING" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute country is missing." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute country is missing from the request." + }, + "partnerError400EmailInvalid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "EMAIL_INVALID" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute email has an invalid value." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute email has an invalid value." + }, + "partnerError400EmailMissing": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "EMAIL_MISSING" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute email is missing." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute email is missing from the request." + }, + "partnerError400FirstNameInvalid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "FIRST_NAME_INVALID" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute first_name has an invalid value." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute first_name has an invalid value." + }, + "partnerError400FirstNameMissing": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "FIRST_NAME_MISSING" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute first_name is missing." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute first_name is missing from the request." + }, + "partnerError400LastNameInvalid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "LAST_NAME_INVALID" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute last_name has an invalid value." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute last_name has an invalid value." + }, + "partnerError400LastNameMissing": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "LAST_NAME_MISSING" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute last_name is missing." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute last_name is missing from the request." + }, + "partnerError400PasswordInvalid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "PASSWORD_INVALID" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute password has an invalid value." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute password has an invalid value." + }, + "partnerError400PasswordMissing": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "PASSWORD_MISSING" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute password is missing." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute password is missing from the request." + }, + "partnerError400PhoneInvalid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "PHONE_INVALID" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute phone has an invalid value." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute phone has an invalid value." + }, + "partnerError400PhoneMissing": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "PHONE_MISSING" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute phone is missing." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute phone is missing from the request." + }, + "partnerError400PostalCodeInvalid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "POSTAL_CODE_INVALID" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute postal_code has an invalid value." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute postal_code has an invalid value." + }, + "partnerError400PostalCodeMissing": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "POSTAL_CODE_MISSING" + }, + "error_message": { + "type": "string", + "examples": [ + "The attribute postal_code is missing." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false, + "description": "The attribute postal_code is missing from the request." + }, + "partnerError403": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "ACCOUNT_CREATION_LIMIT_REACHED" + }, + "error_message": { + "type": "string", + "examples": [ + "Partner account creation limit has been reached." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "403 Forbidden errors for partner account creation." + }, + "partnerError409": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "ACCOUNT_EXISTS" + }, + "error_message": { + "type": "string", + "examples": [ + "An account using the given username already exists." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "409 Conflict errors for partner account creation." + }, + "permission": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "permission": { + "$ref": "#/components/schemas/permissionDocument" + } + }, + "description": "A single permission object." + }, + "permissionDocument": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "options": { + "type": "object", + "description": "Target specific options." + }, + "target_identifier": { + "$ref": "#/components/schemas/permissionTargetIdentifier" + }, + "target_type": { + "$ref": "#/components/schemas/permissionTargetType" + }, + "user": { + "$ref": "#/components/schemas/permissionUserName" + } + }, + "required": [ + "user", + "target_type", + "target_identifier" + ], + "additionalProperties": false, + "description": "Permission document defining access rights for a sub-account to a specific resource.", + "example": { + "options": { + "storage": "yes" + }, + "target_identifier": "00e1d79f-d2d8-40ca-a68d-812655b34766", + "target_type": "server", + "user": "test" + } + }, + "permissionTargetIdentifier": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "description": "Target identifying string. This is type specific and in most cases is a UUID4. Wildcard value \"*\" can be used to\nreference all target resources.\n" + }, + "permissionTargetType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + "server", + "storage", + "network", + "router", + "object_storage", + "managed_database", + "managed_object_storage", + "managed_loadbalancer", + "managed_kubernetes", + "interface", + "network_gateway", + "tag_access", + "managed_container_registry", + "file_storage", + "ssh_key" + ], + "description": "Type of the target to grant permission to" + }, + "permissions": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "permissions": { + "type": "object", + "properties": { + "permission": { + "type": "array", + "items": { + "$ref": "#/components/schemas/permissionDocument" + } + } + }, + "required": [ + "permission" + ], + "additionalProperties": false + } + }, + "required": [ + "permissions" + ], + "additionalProperties": false, + "description": "List of permissions.", + "example": { + "permissions": { + "permission": [ + { + "user": "subaccount1", + "target_type": "server", + "target_identifier": "00e1d79f-d2d8-40ca-a68d-812655b34766", + "options": { + "storage": "yes" + } + }, + { + "user": "subaccount2", + "target_type": "storage", + "target_identifier": "01f6d5e3-c3b2-41ba-912a-723ab2c12345" + } + ] + } + } + }, + "permissionUserName": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 64, + "minLength": 4, + "description": "Username for an account." + }, + "permissionError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "plan": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "plans": { + "type": "object", + "properties": { + "plan": { + "type": "array", + "items": { + "type": "object", + "properties": { + "core_number": { + "$ref": "#/components/schemas/planCoreNumber" + }, + "memory_amount": { + "$ref": "#/components/schemas/planMemoryAmount" + }, + "name": { + "$ref": "#/components/schemas/planName" + }, + "public_traffic_out": { + "$ref": "#/components/schemas/planPublicTrafficOut" + }, + "storage_size": { + "$ref": "#/components/schemas/planStorageSize" + }, + "storage_tier": { + "$ref": "#/components/schemas/planStorageTier" + }, + "gpu_amount": { + "$ref": "#/components/schemas/planGpuAmount" + }, + "gpu_model": { + "$ref": "#/components/schemas/planGpuModel" + }, + "family": { + "$ref": "#/components/schemas/planFamily" + }, + "current_offering": { + "$ref": "#/components/schemas/planBooleanYesno" + } + }, + "required": [ + "core_number", + "memory_amount", + "name", + "family", + "current_offering" + ], + "additionalProperties": false + }, + "example": [ + { + "core_number": 1, + "memory_amount": 1024, + "name": "1xCPU-1GB", + "public_traffic_out": 1024, + "storage_size": 25, + "storage_tier": "maxiops", + "family": "general_purpose", + "current_offering": "yes" + } + ] + } + }, + "required": [ + "plan" + ], + "additionalProperties": false, + "example": { + "plan": [ + { + "core_number": 1, + "memory_amount": 1024, + "name": "1xCPU-1GB", + "public_traffic_out": 1024, + "storage_size": 25, + "storage_tier": "maxiops", + "family": "general_purpose", + "current_offering": "yes" + } + ] + } + } + }, + "required": [ + "plans" + ], + "additionalProperties": false, + "description": "List response containing available server plans.", + "example": { + "plans": { + "plan": [ + { + "core_number": 1, + "memory_amount": 1024, + "name": "1xCPU-1GB", + "public_traffic_out": 1024, + "storage_size": 25, + "storage_tier": "maxiops", + "family": "general_purpose", + "current_offering": "yes" + } + ] + } + } + }, + "planName": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "1xCPU-1GB", + "DEV-1xCPU-4GB", + "CLOUDNATIVE-1xCPU-8GB", + "GPU-12xCPU-128GB-2xL40S" + ], + "maxLength": 255, + "minLength": 1, + "description": "Server plan identifier" + }, + "planFamily": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "general_purpose", + "cloud_native" + ], + "enum": [ + "general_purpose", + "developer", + "cloud_native", + "gpu", + "starter", + "premium" + ], + "description": "The plan family identifier. Plan families group plans by their intended use case." + }, + "planCoreNumber": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "format": "int64", + "description": "The number of CPU cores included in the plan, represented as a positive integer. This value must be greater than zero." + }, + "planMemoryAmount": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "format": "int64", + "description": "The amount of memory included in the plan, measured in mebibytes (MiB)." + }, + "planPublicTrafficOut": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "The amount of public traffic out included in the plan, measured in gigabytes (GB)." + }, + "planStorageSize": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "format": "int64", + "description": "The block storage size for the plan in gibibytes (GiB). The value is 0 if the plan does not include block storage." + }, + "planStorageTier": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": [ + "string", + "null" + ], + "examples": [ + "hdd", + "standard", + "maxiops", + null + ], + "description": "Block storage performance and pricing tier. `maxiops` is high-performance block storage, `standard` is general-purpose block storage, and `hdd` is the API name for the high-capacity Archive tier. The value can be null when a plan does not include block storage." + }, + "planGpuAmount": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "format": "int64", + "description": "The number of GPUs included in the plan." + }, + "planGpuModel": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "NVIDIA L40S" + ], + "description": "The GPU model included in the plan." + }, + "planBooleanYesno": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "yes", + "no" + ], + "description": "Boolean value represented as yes/no", + "example": "yes" + }, + "planError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "prices": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "prices": { + "type": "object", + "properties": { + "currency": { + "$ref": "#/components/schemas/priceCurrency" + }, + "zone": { + "type": "array", + "items": { + "$ref": "#/components/schemas/zonePrices" + } + } + }, + "required": [ + "currency", + "zone" + ], + "example": { + "currency": "USD", + "zone": [ + { + "server_cores": { + "amount": 1, + "price": 2.4 + }, + "server_memory": { + "amount": 1024, + "price": 3.84 + } + } + ] + } + } + }, + "required": [ + "prices" + ], + "description": "Price list for UpCloud resources and services.", + "example": { + "prices": { + "currency": "USD", + "zone": [ + { + "server_cores": { + "amount": 1, + "price": 2.4 + }, + "server_memory": { + "amount": 1024, + "price": 3.84 + }, + "storage": { + "amount": 1, + "price": 0.04 + } + } + ] + } + } + }, + "zonePrices": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "items": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int32" + }, + "price": { + "type": "number", + "format": "double" + } + }, + "required": [ + "amount", + "price" + ], + "additionalProperties": false + } + } + }, + "description": "Pricing information organized by zone." + }, + "priceCurrency": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^[A-Z]{3}$", + "description": "ISO 4217 code" + }, + "priceError400": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "examples": [ + "PRICE_INVALID" + ], + "enum": [ + "PRICE_INVALID" + ] + }, + "message": { + "type": "string", + "examples": [ + "The price ID is invalid" + ] + } + }, + "required": [ + "code", + "message" + ] + } + }, + "required": [ + "error" + ], + "description": "Invalid price request error." + }, + "priceError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "routerCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "router": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "Example router" + }, + "static_routes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$" + }, + "nexthop": { + "oneOf": [ + { + "$ref": "#/components/schemas/routerIpAddress" + }, + { + "type": "string", + "enum": [ + "no-nexthop" + ] + } + ] + }, + "route": { + "$ref": "#/components/schemas/routerIpCidr" + } + }, + "required": [ + "nexthop", + "route" + ], + "additionalProperties": false + }, + "description": "Static routes that will be added to the routing table of the SDN router", + "example": [ + { + "name": "static-route-0", + "nexthop": "192.168.1.1", + "route": "0.0.0.0/0" + } + ] + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/routerLabel" + } + } + }, + "required": [ + "name" + ], + "additionalProperties": false, + "example": { + "name": "Example router", + "static_routes": [ + { + "name": "static-route-0", + "nexthop": "192.168.1.1", + "route": "0.0.0.0/0" + } + ] + } + } + }, + "required": [ + "router" + ], + "additionalProperties": false, + "description": "Request schema for creating a router", + "example": { + "router": { + "name": "Example router", + "static_routes": [ + { + "name": "static-route-0", + "nexthop": "192.168.1.1", + "route": "0.0.0.0/0" + } + ] + } + } + }, + "routerType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "normal", + "service" + ], + "description": "Type of the router.", + "example": "normal" + }, + "routerModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "router": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "Example router" + }, + "static_routes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$" + }, + "nexthop": { + "oneOf": [ + { + "$ref": "#/components/schemas/routerIpAddress" + }, + { + "type": "string", + "enum": [ + "no-nexthop" + ] + } + ] + }, + "route": { + "$ref": "#/components/schemas/routerIpCidr" + } + }, + "required": [ + "nexthop", + "route" + ], + "additionalProperties": false + }, + "description": "Static routes that will be added to the routing table of the SDN router", + "example": [ + { + "name": "static-route-0", + "nexthop": "192.168.1.1", + "route": "0.0.0.0/0" + } + ] + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/routerLabel" + } + } + }, + "additionalProperties": false, + "example": { + "name": "Example router", + "static_routes": [ + { + "name": "static-route-0", + "nexthop": "192.168.1.1", + "route": "0.0.0.0/0" + } + ] + } + } + }, + "required": [ + "router" + ], + "additionalProperties": false, + "description": "Request schema for modifying a router", + "example": { + "router": { + "name": "Example router", + "labels": [ + { + "key": "service", + "value": "postgres cluster connectivity" + } + ], + "static_routes": [] + } + } + }, + "routers": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "routers": { + "type": "object", + "properties": { + "router": { + "type": "array", + "items": { + "$ref": "#/components/schemas/routerDetails" + } + } + }, + "required": [ + "router" + ], + "additionalProperties": false, + "example": { + "router": [ + { + "attached_network_gateways": [], + "attached_networks": { + "network": [] + }, + "labels": [], + "name": "Example router", + "static_routes": [], + "type": "normal", + "uuid": "04c0df35-2658-4b0c-8ac7-962090f4e92a" + } + ] + } + } + }, + "required": [ + "routers" + ], + "additionalProperties": false, + "description": "A list of routers", + "example": { + "routers": { + "router": [ + { + "attached_network_gateways": [], + "attached_networks": { + "network": [] + }, + "labels": [], + "name": "Example router", + "static_routes": [], + "type": "normal", + "uuid": "04c0df35-2658-4b0c-8ac7-962090f4e92a" + } + ] + } + } + }, + "routerDetails": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "attached_network_gateways": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "$ref": "#/components/schemas/routerUuid" + } + }, + "required": [ + "uuid" + ], + "additionalProperties": false + }, + "description": "Gateways of the networks attached to the router." + }, + "attached_networks": { + "type": "object", + "properties": { + "network": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "$ref": "#/components/schemas/routerUuid" + } + }, + "required": [ + "uuid" + ] + } + } + }, + "required": [ + "network" + ], + "description": "Networks attached to the router.", + "example": { + "network": [ + { + "uuid": "03804f7f-828a-4610-867f-9d62cf9fc14f" + } + ] + } + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/routerLabel" + } + }, + "name": { + "type": "string", + "example": "Example router" + }, + "static_routes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/routerRouteNexthop" + }, + "example": [ + { + "name": "static-route-0", + "nexthop": "192.168.1.1", + "route": "0.0.0.0/0", + "type": "user" + } + ] + }, + "type": { + "$ref": "#/components/schemas/routerType" + }, + "uuid": { + "$ref": "#/components/schemas/routerUuid" + } + }, + "required": [ + "uuid", + "name", + "type", + "attached_networks", + "static_routes", + "labels", + "attached_network_gateways" + ], + "additionalProperties": false, + "description": "Router describes a virtual router that can route between SDN networks", + "example": { + "attached_network_gateways": [], + "attached_networks": { + "network": [ + { + "uuid": "03804f7f-828a-4610-867f-9d62cf9fc14f" + } + ] + }, + "name": "Example router", + "static_routes": [ + { + "name": "static-route-0", + "nexthop": "192.168.1.1", + "route": "0.0.0.0/0", + "type": "user" + } + ], + "labels": [], + "type": "normal", + "uuid": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + } + }, + "router": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "router": { + "$ref": "#/components/schemas/routerDetails" + } + }, + "required": [ + "router" + ], + "additionalProperties": false, + "description": "Schema for a single router" + }, + "routerLabel": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Label key used to classify the resource" + }, + "value": { + "type": "string", + "description": "Value associated with the label key" + } + }, + "required": [ + "key", + "value" + ], + "additionalProperties": false, + "description": "A key/value pair to label and categorize resources", + "example": { + "key": "env", + "value": "production" + } + }, + "routerUuid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$", + "format": "uuid", + "description": "Universally unique identifier", + "example": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "routerIpAddress": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "type": "string", + "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}$", + "description": "IPv4 address" + }, + { + "type": "string", + "pattern": "^[a-fA-F0-9:]+$", + "description": "IPv6 address" + } + ], + "description": "IP address", + "example": "10.0.0.20" + }, + "routerIpCidr": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "cidr", + "description": "IP CIDR" + }, + "routerRouteNexthop": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "name": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$" + }, + "nexthop": { + "oneOf": [ + { + "$ref": "#/components/schemas/routerIpAddress" + }, + { + "type": "string", + "enum": [ + "no-nexthop" + ] + } + ] + }, + "route": { + "$ref": "#/components/schemas/routerIpCidr" + }, + "type": { + "$ref": "#/components/schemas/routerStaticRouteType" + } + }, + "required": [ + "name", + "nexthop", + "route", + "type" + ], + "additionalProperties": false, + "description": "Static route with nexthop information." + }, + "routerStaticRouteType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "user", + "service" + ], + "description": "Type of static route.", + "example": "user" + }, + "routerError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "serverGroupModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "server_group": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The name of the server group", + "example": "edge-cluster-a" + }, + "servers": { + "$ref": "#/components/schemas/serverGroupServers" + }, + "labels": { + "type": "object", + "properties": { + "label": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverGroupLabel" + } + } + }, + "description": "Labels to categorize the server group", + "example": { + "label": [ + { + "key": "env", + "value": "prod" + } + ] + } + }, + "anti_affinity": { + "$ref": "#/components/schemas/serverGroupAntiAffinity" + } + }, + "additionalProperties": false, + "example": { + "title": "edge-cluster-a", + "servers": { + "servers": [ + "00fce2f9-f9f4-46ff-86af-9e60f131f5cb" + ] + }, + "labels": { + "label": [ + { + "key": "env", + "value": "prod" + } + ] + }, + "anti_affinity": "yes" + } + } + }, + "required": [ + "server_group" + ], + "additionalProperties": false, + "description": "A schema for creating/modifying a server group", + "example": { + "server_group": { + "title": "edge-cluster-a", + "servers": { + "servers": [ + "00fce2f9-f9f4-46ff-86af-9e60f131f5cb" + ] + }, + "labels": { + "label": [ + { + "key": "env", + "value": "prod" + } + ] + }, + "anti_affinity": "yes" + } + } + }, + "serverGroups": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "server_groups": { + "type": "object", + "properties": { + "server_group": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverGroupDetails" + } + } + }, + "required": [ + "server_group" + ], + "additionalProperties": false, + "example": { + "server_group": [ + { + "anti_affinity": "yes", + "anti_affinity_status": [ + { + "uuid": "00fce2f9-f9f4-46ff-86af-9e60f131f5cb", + "status": "met" + } + ], + "labels": { + "label": [ + { + "key": "env", + "value": "prod" + } + ] + }, + "servers": { + "server": [ + "00fce2f9-f9f4-46ff-86af-9e60f131f5cb" + ] + }, + "title": "edge-cluster-a", + "uuid": "00fce2f9-f9f4-46ff-86af-9e60f131f5cb" + } + ] + } + } + }, + "required": [ + "server_groups" + ], + "additionalProperties": false, + "description": "List of server groups", + "example": { + "server_groups": { + "server_group": [ + { + "anti_affinity": "yes", + "anti_affinity_status": [ + { + "uuid": "00fce2f9-f9f4-46ff-86af-9e60f131f5cb", + "status": "met" + } + ], + "labels": { + "label": [ + { + "key": "env", + "value": "prod" + } + ] + }, + "servers": { + "server": [ + "00fce2f9-f9f4-46ff-86af-9e60f131f5cb" + ] + }, + "title": "edge-cluster-a", + "uuid": "00fce2f9-f9f4-46ff-86af-9e60f131f5cb" + } + ] + } + } + }, + "serverGroupDetails": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "anti_affinity": { + "$ref": "#/components/schemas/serverGroupAntiAffinity" + }, + "anti_affinity_status": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverGroupAntiAffinityStatus" + } + }, + "labels": { + "type": "object", + "properties": { + "label": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverGroupLabel" + } + } + }, + "required": [ + "label" + ], + "additionalProperties": false, + "description": "List of labels associated with the server group." + }, + "servers": { + "type": "object", + "properties": { + "server": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverGroupUuid" + } + } + }, + "required": [ + "server" + ], + "additionalProperties": false, + "description": "List of servers associated with the server group." + }, + "title": { + "type": "string" + }, + "uuid": { + "$ref": "#/components/schemas/serverGroupUuid" + } + }, + "required": [ + "uuid", + "title", + "anti_affinity", + "anti_affinity_status", + "labels", + "servers" + ], + "additionalProperties": false, + "description": "Details of a server group" + }, + "serverGroup": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "server_group": { + "$ref": "#/components/schemas/serverGroupDetails" + } + }, + "required": [ + "server_group" + ], + "additionalProperties": false, + "description": "A single server group" + }, + "serverGroupLabel": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Label key used to classify the resource" + }, + "value": { + "type": "string", + "description": "Value associated with the label key" + } + }, + "required": [ + "key", + "value" + ], + "additionalProperties": false, + "description": "A key/value pair to label and categorize resources", + "example": { + "key": "env", + "value": "production" + } + }, + "serverGroupUuid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$", + "format": "uuid", + "description": "Universally unique identifier", + "example": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "serverGroupServers": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverGroupUuid" + } + } + }, + "required": [ + "servers" + ], + "additionalProperties": false, + "description": "List of server UUIDs in the server group", + "example": { + "servers": [ + "00fce2f9-f9f4-46ff-86af-9e60f131f5cb", + "0414e0d7-4436-4037-9dd8-6eaf47dce599" + ] + } + }, + "serverGroupAntiAffinity": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "strict", + "yes", + "no" + ], + "description": "Anti-affinity policy for server groups. Possible values are 'strict', 'yes', or 'no'. 'strict' ensures that no two servers in the group are placed on the same physical host. 'yes' indicates a preference for anti-affinity but does not guarantee it. 'no' means there is no anti-affinity requirement.", + "default": "no" + }, + "serverGroupServerAdd": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "server": { + "type": "object", + "properties": { + "uuid": { + "$ref": "#/components/schemas/serverGroupUuid" + } + }, + "required": [ + "uuid" + ], + "additionalProperties": false + } + }, + "required": [ + "server" + ], + "additionalProperties": false, + "description": "Schema for adding a server to a server group" + }, + "serverGroupAntiAffinityStatus": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "uuid": { + "$ref": "#/components/schemas/serverGroupUuid" + }, + "status": { + "type": "string", + "enum": [ + "met", + "unmet" + ], + "description": "Indicates whether the anti-affinity policy is currently being met ('met') or not ('unmet')" + } + }, + "required": [ + "uuid", + "status" + ], + "additionalProperties": false, + "description": "Status of anti-affinity policy" + }, + "serverGroupError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "serverTagList": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "description": "One or more tag names. Use commas to match any tag, or colons to require all tags.", + "example": "prod,web" + }, + "createServer": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "server": { + "type": "object", + "properties": { + "avoid_host": { + "$ref": "#/components/schemas/serverEncodedHostId" + }, + "boot_order": { + "$ref": "#/components/schemas/serverBootOrder" + }, + "core_number": { + "$ref": "#/components/schemas/serverCoreNumber" + }, + "firewall": { + "$ref": "#/components/schemas/serverBooleanOnoff" + }, + "host": { + "$ref": "#/components/schemas/serverEncodedHostId" + }, + "hostname": { + "$ref": "#/components/schemas/serverHostname" + }, + "ip_addresses": { + "$ref": "#/components/schemas/serverIpAddresses" + }, + "labels": { + "$ref": "#/components/schemas/serverLabels" + }, + "login_user": { + "$ref": "#/components/schemas/serverLoginUser" + }, + "memory_amount": { + "$ref": "#/components/schemas/serverMemoryAmount" + }, + "networking": { + "$ref": "#/components/schemas/serverCreateNetworking" + }, + "nic_model": { + "$ref": "#/components/schemas/serverNicModel" + }, + "password_delivery": { + "$ref": "#/components/schemas/serverPasswordDelivery" + }, + "plan": { + "$ref": "#/components/schemas/serverPlan" + }, + "server_group": { + "$ref": "#/components/schemas/serverServerGroup" + }, + "simple_backup": { + "$ref": "#/components/schemas/serverSimpleBackup" + }, + "metadata": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "devices": { + "$ref": "#/components/schemas/serverCreateDevices" + }, + "remote_access_enabled": { + "$ref": "#/components/schemas/serverRemoteAccessEnabled" + }, + "remote_access_password": { + "$ref": "#/components/schemas/serverRemoteAccessPassword" + }, + "remote_access_type": { + "$ref": "#/components/schemas/serverRemoteAccessType" + }, + "storage_devices": { + "$ref": "#/components/schemas/serverStorageDevices" + }, + "timezone": { + "$ref": "#/components/schemas/serverTimezone" + }, + "title": { + "$ref": "#/components/schemas/serverTitle" + }, + "user_data": { + "$ref": "#/components/schemas/serverUserData" + }, + "video_model": { + "$ref": "#/components/schemas/serverVideoModel" + }, + "vnc_keymap": { + "$ref": "#/components/schemas/serverVncKeymap" + }, + "zone": { + "$ref": "#/components/schemas/serverZone" + } + }, + "required": [ + "title", + "zone", + "hostname", + "storage_devices" + ], + "additionalProperties": false + } + }, + "required": [ + "server" + ], + "additionalProperties": false, + "description": "Cloud Server creation parameters", + "example": { + "server": { + "hostname": "my-server.example.com", + "title": "My Server", + "zone": "fi-hel1", + "plan": "1xCPU-1GB", + "metadata": "yes", + "networking": { + "interfaces": { + "interface": [ + { + "ip_addresses": { + "ip_address": [ + { + "family": "IPv4" + } + ] + }, + "type": "public" + }, + { + "ip_addresses": { + "ip_address": [ + { + "family": "IPv4" + } + ] + }, + "type": "utility" + }, + { + "ip_addresses": { + "ip_address": [ + { + "family": "IPv4" + } + ] + }, + "network": "03000000-0000-4000-8000-000000000000", + "type": "private" + } + ] + } + }, + "login_user": { + "username": "upclouduser", + "ssh_keys": { + "ssh_key": [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO3t5AQcuv4+KxJ5rC75N8bW/e7eOq0k5Y2L7V1oH3Z5 user@example.com" + ] + } + }, + "storage_devices": { + "storage_device": [ + { + "action": "clone", + "storage": "01000000-0000-4000-8000-000020080100", + "size": 30, + "tier": "maxiops", + "title": "Debian Trixie" + } + ] + } + } + } + }, + "serverServerGroup": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": [ + "string", + "null" + ], + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", + "description": "UUID of the server group containing the Cloud Server, or null when the Cloud Server is not in a group.", + "example": "0b3d85b4-b3be-46ca-a1e2-3b5d40d60fb1" + }, + "modifyServer": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "server": { + "type": "object", + "properties": { + "boot_order": { + "$ref": "#/components/schemas/serverBootOrder" + }, + "core_number": { + "$ref": "#/components/schemas/serverCoreNumber" + }, + "firewall": { + "$ref": "#/components/schemas/serverBooleanOnoff" + }, + "firewall_private": { + "$ref": "#/components/schemas/serverBooleanOnoff" + }, + "firewall_private_default_incoming_action": { + "type": "string", + "enum": [ + "accept", + "drop" + ] + }, + "firewall_private_default_outgoing_action": { + "type": "string", + "enum": [ + "accept", + "drop" + ] + }, + "firewall_public_default_incoming_action": { + "type": "string", + "enum": [ + "accept", + "drop" + ] + }, + "firewall_public_default_outgoing_action": { + "type": "string", + "enum": [ + "accept", + "drop" + ] + }, + "hostname": { + "$ref": "#/components/schemas/serverHostname" + }, + "labels": { + "$ref": "#/components/schemas/serverLabels" + }, + "memory_amount": { + "$ref": "#/components/schemas/serverMemoryAmount" + }, + "metadata": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "nic_model": { + "$ref": "#/components/schemas/serverNicModel" + }, + "plan": { + "$ref": "#/components/schemas/serverPlan" + }, + "remote_access_enabled": { + "$ref": "#/components/schemas/serverRemoteAccessEnabled" + }, + "remote_access_password": { + "$ref": "#/components/schemas/serverRemoteAccessPassword" + }, + "remote_access_type": { + "$ref": "#/components/schemas/serverRemoteAccessType" + }, + "simple_backup": { + "$ref": "#/components/schemas/serverSimpleBackup" + }, + "timezone": { + "$ref": "#/components/schemas/serverTimezone" + }, + "title": { + "$ref": "#/components/schemas/serverTitle" + }, + "video_model": { + "$ref": "#/components/schemas/serverVideoModel" + }, + "vnc_keymap": { + "$ref": "#/components/schemas/serverVncKeymap" + } + }, + "minProperties": 1, + "additionalProperties": false + } + }, + "required": [ + "server" + ], + "additionalProperties": false, + "description": "Fields that can be changed on an existing Cloud Server", + "example": { + "server": { + "core_number": 8, + "memory_amount": 16384, + "plan": "custom" + } + } + }, + "serverRebuild": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "server_rebuild": { + "type": "object", + "properties": { + "clone_source": { + "type": "string", + "format": "uuid", + "description": "UUID of the public template used for the new system disk." + }, + "delete_detached_disk": { + "$ref": "#/components/schemas/serverLegacyBoolean" + }, + "detach_disk": { + "type": "string", + "format": "uuid", + "description": "UUID of the storage to detach before rebuilding." + }, + "encrypted": { + "$ref": "#/components/schemas/serverLegacyBoolean" + }, + "login_user": { + "type": "object", + "properties": { + "create_password": { + "$ref": "#/components/schemas/serverLegacyBoolean" + }, + "ssh_keys": { + "type": "object", + "properties": { + "ssh_key": { + "type": "array", + "items": { + "type": "string" + }, + "description": "SSH public keys in OpenSSH format." + } + }, + "required": [ + "ssh_key" + ], + "additionalProperties": false + }, + "username": { + "type": "string", + "description": "Login username." + } + }, + "additionalProperties": false + }, + "password_delivery": { + "type": "string", + "enum": [ + "email", + "sms", + "none" + ], + "description": "One-time password delivery method." + }, + "storage_title": { + "type": "string", + "description": "Title of the new system storage." + }, + "user_data": { + "type": "string", + "description": "User data supplied to cloud-init." + } + }, + "required": [ + "clone_source" + ], + "additionalProperties": false + } + }, + "required": [ + "server_rebuild" + ], + "additionalProperties": false, + "description": "Rebuild Cloud Server request", + "example": { + "server_rebuild": { + "clone_source": "01000000-0000-4000-8000-000020050100", + "delete_detached_disk": "yes", + "detach_disk": "0169b4f8-051c-4a86-9484-f5b798249949", + "encrypted": "yes", + "login_user": { + "create_password": "no", + "ssh_keys": { + "ssh_key": [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEexamplekey user@example" + ] + }, + "username": "debian" + }, + "password_delivery": "none", + "storage_title": "Rebuilt system disk" + } + } + }, + "relocateServer": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "zone": { + "$ref": "#/components/schemas/serverZone" + } + }, + "required": [ + "zone" + ], + "additionalProperties": false, + "description": "Relocate Cloud Server request", + "example": { + "zone": "fi-hel2" + } + }, + "restartServer": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "restart_server": { + "type": "object", + "anyOf": [ + { + "properties": { + "stop_type": { + "const": "hard" + } + }, + "required": [ + "stop_type" + ] + }, + { + "required": [ + "timeout" + ] + } + ], + "properties": { + "host": { + "$ref": "#/components/schemas/serverEncodedHostId" + }, + "reason": { + "$ref": "#/components/schemas/serverReason" + }, + "stop_type": { + "type": "string", + "enum": [ + "soft", + "hard" + ], + "description": "Type of stop performed before starting again." + }, + "timeout": { + "type": "string", + "pattern": "^(?:[1-9]|[1-9][0-9]|[1-5][0-9]{2}|600)$", + "description": "Soft-stop timeout in seconds." + }, + "timeout_action": { + "type": "string", + "enum": [ + "destroy", + "ignore" + ], + "description": "Action when the soft-stop timeout expires.", + "default": "ignore" + } + }, + "additionalProperties": false + } + }, + "required": [ + "restart_server" + ], + "additionalProperties": false, + "description": "Restart Cloud Server request", + "example": { + "restart_server": { + "stop_type": "soft", + "timeout": "60", + "timeout_action": "destroy" + } + } + }, + "startServer": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "server": { + "type": "object", + "properties": { + "avoid_host": { + "$ref": "#/components/schemas/serverEncodedHostId" + }, + "host": { + "$ref": "#/components/schemas/serverEncodedHostId" + }, + "reason": { + "$ref": "#/components/schemas/serverReason" + }, + "start_type": { + "type": "string", + "enum": [ + "sync", + "async" + ], + "description": "Whether to wait for the Cloud Server to start." + } + }, + "additionalProperties": false + } + }, + "required": [ + "server" + ], + "additionalProperties": false, + "description": "Start Cloud Server request", + "example": { + "server": { + "host": 8055964291, + "start_type": "sync" + } + } + }, + "stopServer": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "stop_server": { + "type": "object", + "properties": { + "reason": { + "$ref": "#/components/schemas/serverReason" + }, + "stop_type": { + "type": "string", + "enum": [ + "soft", + "hard" + ], + "description": "Type of stop operation." + }, + "timeout": { + "type": "string", + "pattern": "^(?:[1-9]|[1-9][0-9]|[1-5][0-9]{2}|600)$", + "description": "Soft-stop timeout in seconds." + } + }, + "additionalProperties": false + } + }, + "required": [ + "stop_server" + ], + "additionalProperties": false, + "description": "Stop Cloud Server request", + "example": { + "stop_server": { + "stop_type": "soft", + "timeout": "60" + } + } + }, + "getServerList": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "servers": { + "type": "object", + "properties": { + "server": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverInGetServerList" + } + } + } + } + }, + "required": [ + "servers" + ], + "additionalProperties": false, + "description": "Schema for the Cloud Server list response.", + "example": { + "servers": { + "server": [ + { + "core_number": "2", + "created": 1705320000, + "hostname": "web-1.example.com", + "license": "0", + "memory_amount": "2048", + "plan": "2xCPU-2GB", + "labels": { + "label": [ + { + "key": "env", + "value": "production" + } + ] + }, + "plan_ipv4_bytes": "34253332", + "plan_ipv6_bytes": "0", + "simple_backup": "0100,dailies", + "state": "started", + "tags": { + "tag": [ + "production", + "web" + ] + }, + "title": "Production web server", + "uuid": "007bf7bd-e3cf-4a10-bf01-4251dc7f3b65", + "zone": "fi-hel1" + } + ] + } + } + }, + "serverInGetServerList": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "created": { + "$ref": "#/components/schemas/serverCreated" + }, + "core_number": { + "type": "string", + "description": "Number of CPU cores allocated to the Cloud Server." + }, + "host": { + "$ref": "#/components/schemas/serverEncodedHostId" + }, + "hostname": { + "type": "string", + "description": "Hostname configured for the Cloud Server." + }, + "labels": { + "type": "object", + "properties": { + "label": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverLabel" + } + } + }, + "description": "Labels assigned to the Cloud Server." + }, + "license": { + "type": "string", + "description": "Hourly operating system license charge in credits." + }, + "memory_amount": { + "type": "string", + "description": "Amount of memory allocated to the Cloud Server, in MiB." + }, + "plan": { + "$ref": "#/components/schemas/serverPlanName" + }, + "plan_ipv4_bytes": { + "type": "string", + "description": "Public IPv4 outbound traffic used during the current billing month, in bytes." + }, + "plan_ipv6_bytes": { + "type": "string", + "description": "Public IPv6 outbound traffic used during the current billing month, in bytes." + }, + "progress": { + "type": "string", + "description": "Progress percentage for an operation that places the Cloud Server in maintenance state." + }, + "simple_backup": { + "$ref": "#/components/schemas/serverSimpleBackup" + }, + "state": { + "$ref": "#/components/schemas/serverState" + }, + "tags": { + "$ref": "#/components/schemas/serverTags" + }, + "title": { + "type": "string", + "description": "Display title of the Cloud Server." + }, + "uuid": { + "$ref": "#/components/schemas/serverUuid" + }, + "zone": { + "$ref": "#/components/schemas/serverZone" + }, + "server_group": { + "$ref": "#/components/schemas/serverServerGroup" + } + }, + "required": [ + "created", + "hostname", + "core_number", + "license", + "memory_amount", + "state", + "title", + "uuid", + "zone" + ], + "additionalProperties": false, + "description": "Schema for a Cloud Server item returned in Cloud Server list responses.", + "example": { + "core_number": "2", + "created": 1705320000, + "hostname": "web-1.example.com", + "license": "0", + "memory_amount": "2048", + "labels": { + "label": [ + { + "key": "env", + "value": "production" + } + ] + }, + "plan": "2xCPU-2GB", + "plan_ipv4_bytes": "34253332", + "plan_ipv6_bytes": "0", + "simple_backup": "0100,dailies", + "state": "started", + "tags": { + "tag": [ + "production", + "web" + ] + }, + "title": "Production web server", + "uuid": "007bf7bd-e3cf-4a10-bf01-4251dc7f3b65", + "zone": "fi-hel1" + } + }, + "serverState": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "started", + "stopped", + "maintenance", + "error", + "pending_delete" + ], + "description": "Current state of the Cloud Server", + "example": "started" + }, + "serverTags": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "object", + "properties": { + "tag": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "tag" + ], + "additionalProperties": false + } + ], + "description": "tags can be an empty array or an object with a tag array", + "example": { + "tag": [] + } + }, + "createServerResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "server": { + "$ref": "#/components/schemas/serverDetails" + } + }, + "required": [ + "server" + ], + "additionalProperties": false, + "description": "Newly created Cloud Server and optional one-time login credentials", + "example": { + "server": { + "core_number": "2", + "created": 1705320000, + "hostname": "my-server.example.com", + "license": "0", + "memory_amount": "2048", + "state": "maintenance", + "title": "My Server", + "uuid": "007bf7bd-e3cf-4a10-bf01-4251dc7f3b65", + "zone": "fi-hel1" + } + } + }, + "serverDetails": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "boot_order": { + "$ref": "#/components/schemas/serverBootOrder" + }, + "core_number": { + "type": "string", + "description": "Number of CPU cores." + }, + "created": { + "$ref": "#/components/schemas/serverCreated" + }, + "devices": { + "type": "object", + "properties": { + "device": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverDevice" + } + } + }, + "required": [ + "device" + ] + }, + "firewall": { + "$ref": "#/components/schemas/serverBooleanOnoff" + }, + "firewall_private": { + "$ref": "#/components/schemas/serverBooleanOnoff" + }, + "firewall_private_default_incoming_action": { + "type": "string", + "enum": [ + "accept", + "drop" + ] + }, + "firewall_private_default_outgoing_action": { + "type": "string", + "enum": [ + "accept", + "drop" + ] + }, + "firewall_public_default_incoming_action": { + "type": "string", + "enum": [ + "accept", + "drop" + ] + }, + "firewall_public_default_outgoing_action": { + "type": "string", + "enum": [ + "accept", + "drop" + ] + }, + "host": { + "$ref": "#/components/schemas/serverEncodedHostId" + }, + "hostname": { + "type": "string", + "description": "Cloud Server hostname." + }, + "ip_addresses": { + "$ref": "#/components/schemas/serverIpAddresses" + }, + "labels": { + "$ref": "#/components/schemas/serverLabels" + }, + "license": { + "type": "string", + "description": "Hourly license price" + }, + "memory_amount": { + "type": "string", + "description": "Memory in MiB." + }, + "metadata": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "networking": { + "$ref": "#/components/schemas/serverNetworking" + }, + "nic_model": { + "$ref": "#/components/schemas/serverNicModel" + }, + "plan": { + "$ref": "#/components/schemas/serverPlanName" + }, + "plan_ipv4_bytes": { + "type": "string", + "description": "Public IPv4 outbound traffic this billing month, in bytes." + }, + "plan_ipv6_bytes": { + "type": "string", + "description": "Public IPv6 outbound traffic this billing month, in bytes." + }, + "password": { + "type": "string", + "description": "One-time login password returned when the Cloud Server is created." + }, + "progress": { + "type": "string", + "description": "Progress percentage for an operation in progress." + }, + "remote_access_enabled": { + "$ref": "#/components/schemas/serverRemoteAccessEnabled" + }, + "remote_access_host": { + "type": "string", + "description": "Remote access hostname." + }, + "remote_access_password": { + "$ref": "#/components/schemas/serverRemoteAccessPassword" + }, + "remote_access_port": { + "type": "string", + "description": "Remote access port." + }, + "remote_access_type": { + "$ref": "#/components/schemas/serverRemoteAccessType" + }, + "server_group": { + "$ref": "#/components/schemas/serverServerGroup" + }, + "simple_backup": { + "$ref": "#/components/schemas/serverSimpleBackup" + }, + "state": { + "$ref": "#/components/schemas/serverState" + }, + "storage_devices": { + "$ref": "#/components/schemas/serverStorageDevicesResponse" + }, + "tags": { + "$ref": "#/components/schemas/serverTags" + }, + "timezone": { + "type": "string", + "description": "Configured timezone." + }, + "title": { + "type": "string", + "description": "Display title." + }, + "username": { + "$ref": "#/components/schemas/serverUserName" + }, + "uuid": { + "$ref": "#/components/schemas/serverUuid" + }, + "video_model": { + "$ref": "#/components/schemas/serverVideoModel" + }, + "zone": { + "$ref": "#/components/schemas/serverZone" + } + }, + "required": [ + "created", + "hostname", + "core_number", + "license", + "memory_amount", + "state", + "title", + "uuid", + "zone" + ], + "additionalProperties": false, + "description": "Detailed public information about a Cloud Server", + "example": { + "boot_order": "disk", + "core_number": "12", + "created": 1705320000, + "firewall": "on", + "host": 7653311107, + "hostname": "server1.example.com", + "labels": { + "label": [ + { + "key": "env", + "value": "development" + } + ] + }, + "license": "0", + "memory_amount": "130048", + "nic_model": "virtio", + "plan": "GPU-12xCPU-128GB-2xL40S", + "plan_ipv4_bytes": "3565675343", + "plan_ipv6_bytes": "4534432", + "remote_access_enabled": "yes", + "remote_access_host": "fi-hel1.vnc.upcloud.com", + "remote_access_password": "aabbccdd", + "remote_access_port": "3000", + "remote_access_type": "vnc", + "server_group": "0b3d85b4-b3be-46ca-a1e2-3b5d40d60fb1", + "simple_backup": "0100,dailies", + "state": "started", + "storage_devices": { + "storage_device": [ + { + "address": "virtio:0", + "boot_disk": "1", + "labels": [], + "storage": "012580a1-32a1-466e-a323-689ca16f2d43", + "storage_encrypted": "yes", + "storage_size": 20, + "storage_title": "Operating system disk", + "type": "disk" + } + ] + }, + "tags": { + "tag": [ + "DEV", + "Ubuntu" + ] + }, + "timezone": "UTC", + "title": "Development GPU server", + "uuid": "0077fa3d-32db-4b09-9f5f-30d9e9afb565", + "video_model": "cirrus", + "zone": "fi-hel1" + } + }, + "firewallRulesetRelatedServers": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "servers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "attached_rulesets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverFirewallRulesetRelationshipInternal" + }, + "description": "Private firewall rulesets attached to the Cloud Server." + }, + "firewall": { + "$ref": "#/components/schemas/serverBooleanOnoff" + }, + "firewall_private": { + "$ref": "#/components/schemas/serverBooleanOnoff" + }, + "firewall_private_default_incoming_action": { + "type": "string", + "enum": [ + "accept", + "drop" + ], + "description": "Default action for unmatched incoming traffic on private interfaces." + }, + "firewall_private_default_outgoing_action": { + "type": "string", + "enum": [ + "accept", + "drop" + ], + "description": "Default action for unmatched outgoing traffic on private interfaces." + }, + "title": { + "type": "string", + "description": "Cloud Server title." + }, + "uuid": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "required": [ + "uuid", + "title", + "firewall", + "firewall_private", + "firewall_private_default_incoming_action", + "firewall_private_default_outgoing_action", + "attached_rulesets" + ], + "additionalProperties": false + }, + "description": "Cloud Servers visible to the authenticated account that are related to the ruleset." + } + }, + "required": [ + "servers" + ], + "additionalProperties": false, + "description": "Accessible Cloud Servers related to a private firewall ruleset and their private ruleset relationships.", + "example": { + "servers": [ + { + "attached_rulesets": [ + { + "applied_version": 3, + "created_at": 1787652930, + "firewall_ruleset_uuid": "190f56d8-4b3f-4a89-9e5f-320fbc3d17c8", + "last_applied_at": 1787652932, + "server_uuid": "0077fa3d-32db-4b09-9f5f-30d9e9afb565", + "type": "private", + "updated_at": null, + "version": 3 + } + ], + "firewall": "on", + "firewall_private": "on", + "firewall_private_default_incoming_action": "drop", + "firewall_private_default_outgoing_action": "accept", + "title": "Application server", + "uuid": "0077fa3d-32db-4b09-9f5f-30d9e9afb565" + } + ] + } + }, + "getAllServerLabels": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/serverLabel" + }, + "description": "Unique label key-value pairs used by accessible Cloud Servers, sorted by key and then value. The array may be empty.", + "example": [ + { + "key": "env", + "value": "production" + }, + { + "key": "team", + "value": "platform" + } + ] + }, + "server": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "server": { + "$ref": "#/components/schemas/serverDetails" + } + }, + "required": [ + "server" + ], + "additionalProperties": false, + "description": "Cloud Server object returned in responses", + "example": { + "server": { + "boot_order": "disk", + "core_number": "12", + "created": 1705320000, + "firewall": "on", + "host": 7653311107, + "hostname": "server1.example.com", + "labels": { + "label": [ + { + "key": "env", + "value": "development" + } + ] + }, + "license": "0", + "memory_amount": "130048", + "nic_model": "virtio", + "plan": "GPU-12xCPU-128GB-2xL40S", + "plan_ipv4_bytes": "3565675343", + "plan_ipv6_bytes": "4534432", + "remote_access_enabled": "yes", + "remote_access_type": "vnc", + "server_group": "0b3d85b4-b3be-46ca-a1e2-3b5d40d60fb1", + "simple_backup": "0100,dailies", + "state": "started", + "storage_devices": { + "storage_device": [ + { + "address": "virtio:0", + "boot_disk": "1", + "labels": [], + "storage": "012580a1-32a1-466e-a323-689ca16f2d43", + "storage_encrypted": "yes", + "storage_size": 20, + "storage_title": "Operating system disk", + "type": "disk" + } + ] + }, + "tags": { + "tag": [ + "DEV", + "Ubuntu" + ] + }, + "timezone": "UTC", + "title": "Development GPU server", + "uuid": "0077fa3d-32db-4b09-9f5f-30d9e9afb565", + "video_model": "cirrus", + "zone": "fi-hel1" + } + } + }, + "serverUuid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$", + "format": "uuid", + "description": "Universally unique identifier", + "example": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "serverEncodedHostId": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "examples": [ + 7653311107 + ], + "minimum": 1, + "format": "int64", + "description": "Encoded Private Cloud host ID" + }, + "serverLimit": { + "type": "integer", + "examples": [ + 25, + 50, + 100 + ], + "maximum": 1000, + "minimum": 1, + "description": "Maximum number of items to return. Default is 25." + }, + "serverOffset": { + "type": "integer", + "examples": [ + 0, + 25, + 50, + 100 + ], + "minimum": 0, + "description": "Number of items to skip before starting to return results. Default is 0." + }, + "serverStatsPeriod": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "daily", + "weekly", + "monthly", + "yearly" + ], + "description": "The period for which statistics are calculated.", + "example": "weekly" + }, + "serverLegacyBoolean": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "0", + "1", + "false", + "true", + "no", + "yes", + "n", + "y", + "off", + "on" + ], + "description": "Boolean value accepted by the legacy API" + }, + "serverBooleanYesno": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "yes", + "no" + ], + "description": "Boolean value represented as yes/no", + "example": "yes" + }, + "serverIpAddress": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "type": "string", + "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}$", + "description": "IPv4 address" + }, + { + "type": "string", + "pattern": "^[a-fA-F0-9:]+$", + "description": "IPv6 address" + } + ], + "description": "IP address", + "example": "10.0.0.20" + }, + "serverStatsNetworkType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "bytes", + "packets" + ], + "description": "Unit used to measure network activity.", + "example": "bytes" + }, + "serverNetworkType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "public", + "utility", + "private" + ], + "description": "Network access type", + "example": "public" + }, + "serverBootOrder": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "description": "Boot device order (comma-separated list)", + "example": "cdrom,disk" + }, + "serverCoreNumber": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "format": "int32", + "description": "Number of CPU cores", + "example": 2 + }, + "serverBooleanOnoff": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "on", + "off" + ], + "description": "Boolean value represented as on/off", + "example": "on" + }, + "serverHostname": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "description": "Cloud Server hostname", + "example": "example.upcloud.com" + }, + "serverIpAddresses": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "ip_address": { + "type": "array", + "items": { + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/serverIpAddress" + }, + "access": { + "$ref": "#/components/schemas/serverNetworkType" + }, + "family": { + "$ref": "#/components/schemas/serverIpFamily" + }, + "prefix": { + "type": "string", + "description": "Network prefix length of the IP address" + } + }, + "required": [ + "family", + "access" + ] + } + } + }, + "required": [ + "ip_address" + ], + "additionalProperties": false, + "description": "IP addresses assigned to the Cloud Server", + "example": { + "ip_address": [ + { + "access": "utility", + "address": "10.0.0.10", + "family": "IPv4" + } + ] + } + }, + "serverIpFamily": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "IPv4", + "IPv6" + ], + "description": "IP address family", + "example": "IPv4" + }, + "serverLabels": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "label": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverLabel" + } + } + }, + "description": "Cloud Server labels", + "example": { + "label": [ + { + "key": "env", + "value": "production" + } + ] + } + }, + "serverLabel": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Label key used to classify the resource" + }, + "value": { + "type": "string", + "description": "Value associated with the label key" + } + }, + "required": [ + "key", + "value" + ], + "additionalProperties": false, + "description": "A key/value pair to label and categorize resources", + "example": { + "key": "env", + "value": "production" + } + }, + "serverLoginUser": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "not": { + "properties": { + "create_password": { + "const": "yes" + } + }, + "required": [ + "create_password", + "ssh_keys" + ] + }, + "properties": { + "create_password": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "ssh_keys": { + "type": "object", + "properties": { + "ssh_key": { + "type": "array", + "items": { + "type": "string", + "description": "Public SSH key in OpenSSH authorized_keys format. Invalid keys are rejected" + }, + "maxItems": 32, + "minItems": 1 + } + }, + "required": [ + "ssh_key" + ], + "additionalProperties": false + }, + "username": { + "type": "string", + "description": "Username for logging in to the Cloud Server" + } + }, + "additionalProperties": false, + "description": "Login user configuration for Cloud Server creation", + "example": { + "username": "upclouduser" + } + }, + "serverMemoryAmount": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "format": "int32", + "description": "Amount of memory in MB", + "example": 2048 + }, + "serverCreateNetworking": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "interfaces": { + "type": "object", + "properties": { + "interface": { + "type": "array", + "items": { + "type": "object", + "properties": { + "bootable": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "index": { + "type": "integer", + "maximum": 255, + "minimum": 1, + "description": "Index used to identify and order the network interface" + }, + "ip_addresses": { + "type": "object", + "properties": { + "ip_address": { + "type": "array", + "items": { + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/serverIpAddress" + }, + "dhcp_provided": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "family": { + "$ref": "#/components/schemas/serverIpFamily" + } + }, + "required": [ + "family" + ], + "additionalProperties": false + } + } + }, + "required": [ + "ip_address" + ], + "additionalProperties": false + }, + "network": { + "$ref": "#/components/schemas/serverUuid" + }, + "source_ip_filtering": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "type": { + "$ref": "#/components/schemas/serverNetworkType" + } + }, + "required": [ + "type", + "ip_addresses" + ], + "additionalProperties": false + } + } + }, + "required": [ + "interface" + ], + "additionalProperties": false + } + }, + "required": [ + "interfaces" + ], + "additionalProperties": false, + "description": "Network interfaces for a new Cloud Server", + "example": { + "interfaces": { + "interface": [ + { + "ip_addresses": { + "ip_address": [ + { + "family": "IPv4" + } + ] + }, + "type": "public" + } + ] + } + } + }, + "serverNicModel": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "virtio", + "e1000", + "rtl8139" + ], + "description": "Network interface card model", + "example": "virtio" + }, + "serverPasswordDelivery": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "description": "Password delivery method", + "example": "email" + }, + "serverPlan": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "description": "Cloud Server plan name", + "example": "2xCPU-2GB" + }, + "serverSimpleBackup": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": [ + "string", + "null" + ], + "examples": [ + "0100,dailies", + "no" + ], + "description": "Simple backup start time in UTC and frequency, separated by a comma, or no to disable" + }, + "serverCreateDevices": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "device": { + "type": "array", + "items": { + "type": "object", + "properties": { + "serial": { + "type": "string", + "description": "Serial identifier of the attached device" + }, + "type": { + "type": "string", + "description": "Type of passthrough device to attach" + } + }, + "required": [ + "serial", + "type" + ], + "additionalProperties": false + } + } + }, + "required": [ + "device" + ], + "additionalProperties": false, + "description": "Passthrough devices requested for a new Cloud Server", + "example": { + "device": [ + { + "serial": "1723925007011", + "type": "gpu" + } + ] + } + }, + "serverRemoteAccessEnabled": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "yes", + "no" + ], + "description": "Whether remote access is enabled", + "example": "yes" + }, + "serverRemoteAccessPassword": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 8, + "minLength": 8, + "pattern": "^[A-Za-z0-9]{8}$", + "description": "Eight-character alphanumeric password used to authenticate remote access", + "example": "A1b2C3d4" + }, + "serverRemoteAccessType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "vnc" + ], + "description": "Protocol used for remote access", + "example": "vnc" + }, + "serverStorageDevices": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage_device": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "if": { + "properties": { + "action": { + "const": "create" + } + }, + "required": [ + "action" + ] + }, + "then": { + "required": [ + "size" + ] + } + }, + { + "if": { + "properties": { + "action": { + "const": "clone" + } + }, + "required": [ + "action" + ] + }, + "then": { + "required": [ + "storage" + ] + } + }, + { + "if": { + "properties": { + "action": { + "const": "attach" + } + }, + "required": [ + "action" + ] + }, + "then": { + "anyOf": [ + { + "properties": { + "type": { + "const": "cdrom" + } + }, + "required": [ + "type" + ] + }, + { + "required": [ + "storage" + ] + } + ] + } + } + ], + "properties": { + "action": { + "type": "string", + "enum": [ + "create", + "clone", + "attach" + ], + "description": "Method used to create, clone, or attach storage for the device" + }, + "address": { + "type": "string", + "description": "Device address on the Cloud Server" + }, + "backup_rule": { + "type": "object", + "properties": { + "interval": { + "type": "string", + "description": "Backup weekday, or daily to create a backup every day" + }, + "retention": { + "type": "integer", + "description": "Number of days before an automatic backup is deleted" + }, + "time": { + "type": "string", + "description": "UTC backup start time in HHMM format" + } + } + }, + "encrypted": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverLabel" + } + }, + "size": { + "type": [ + "integer", + "string" + ], + "description": "Requested block storage size in gigabytes" + }, + "storage": { + "type": "string", + "description": "UUID of the storage resource to attach or clone" + }, + "tier": { + "type": "string", + "description": "Performance and pricing tier of the block storage" + }, + "title": { + "type": "string", + "description": "Short informational description of the block storage" + }, + "type": { + "type": "string", + "description": "Storage device type: disk or cdrom" + } + }, + "required": [ + "action" + ], + "additionalProperties": false + }, + "maxItems": 16, + "minItems": 1 + } + }, + "required": [ + "storage_device" + ], + "additionalProperties": false, + "description": "Storage devices to create or attach to the Cloud Server", + "example": { + "storage_device": [ + { + "action": "create", + "size": "20", + "title": "Operating system disk" + } + ] + } + }, + "serverTimezone": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "description": "Cloud Server timezone", + "example": "UTC" + }, + "serverTitle": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "description": "Cloud Server title", + "example": "My Server" + }, + "serverUserData": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "description": "Setup script body or URL processed during Cloud Server initialization", + "example": "#!/bin/sh\napt-get update" + }, + "serverVideoModel": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "description": "Video adapter model", + "example": "vga" + }, + "serverVncKeymap": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "description": "VNC keyboard layout", + "example": "en-us" + }, + "serverZone": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "fi-hel1", + "de-fra1", + "us-nyc1" + ], + "maxLength": 15, + "minLength": 2, + "pattern": "^[a-z][a-z0-9-]{0,14}[a-z0-9]$", + "description": "Zone identifier" + }, + "serverAttachPrivateFirewallRuleset": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "firewall_ruleset": { + "type": "object", + "properties": { + "firewall_ruleset_uuid": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "required": [ + "firewall_ruleset_uuid" + ], + "additionalProperties": false, + "description": "Private firewall ruleset to attach." + } + }, + "required": [ + "firewall_ruleset" + ], + "additionalProperties": false, + "description": "Parameters for attaching a private firewall ruleset to a Cloud Server.", + "example": { + "firewall_ruleset": { + "firewall_ruleset_uuid": "190f56d8-4b3f-4a89-9e5f-320fbc3d17c8" + } + } + }, + "serverBoolean01": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1 + ], + "description": "Schema for boolean-like values encoded as 0 or 1." + }, + "serverLoadCdrom": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage_device": { + "type": "object", + "properties": { + "storage": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "required": [ + "storage" + ], + "additionalProperties": false, + "description": "Storage to load into the attached CD-ROM device." + } + }, + "required": [ + "storage_device" + ], + "additionalProperties": false, + "description": "Parameters for loading a storage into a Cloud Server's CD-ROM device.", + "example": { + "storage_device": { + "storage": "01000000-0000-4000-8000-000060010101" + } + } + }, + "serverDetachPrivateFirewallRuleset": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "firewall_ruleset": { + "type": "object", + "properties": { + "firewall_ruleset_uuid": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "required": [ + "firewall_ruleset_uuid" + ], + "additionalProperties": false, + "description": "Private firewall ruleset to detach." + } + }, + "required": [ + "firewall_ruleset" + ], + "additionalProperties": false, + "description": "Parameters for detaching a private firewall ruleset from a Cloud Server.", + "example": { + "firewall_ruleset": { + "firewall_ruleset_uuid": "190f56d8-4b3f-4a89-9e5f-320fbc3d17c8" + } + } + }, + "serverUpdateFirewallRules": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "firewall_rules": { + "type": "object", + "properties": { + "firewall_rule": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/serverFirewallRuleItem" + } + ], + "unevaluatedProperties": false + }, + "maxItems": 1000, + "description": "Ordered firewall rules. Supplying an empty array removes all rules." + } + }, + "required": [ + "firewall_rule" + ], + "additionalProperties": false + } + }, + "required": [ + "firewall_rules" + ], + "additionalProperties": false, + "description": "Complete replacement for a Cloud Server's firewall rule chain. Array order determines rule positions.", + "example": { + "firewall_rules": { + "firewall_rule": [ + { + "action": "accept", + "comment": "Allow SSH", + "destination_port_end": "22", + "destination_port_start": "22", + "direction": "in", + "family": "IPv4", + "protocol": "tcp" + }, + { + "action": "drop", + "direction": "in" + } + ] + } + } + }, + "serverFirewallRuleItem": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/serverFirewallRuleRequirements" + } + ], + "properties": { + "action": { + "type": "string", + "enum": [ + "accept", + "drop" + ], + "description": "Action taken when the rule matches." + }, + "comment": { + "type": "string", + "maxLength": 250, + "description": "Free-form rule description." + }, + "destination_address_end": { + "type": "string", + "description": "Last destination IP address in the range. Must be specified with destination_address_start." + }, + "destination_address_start": { + "type": "string", + "description": "First destination IP address in the range. Must be specified with destination_address_end." + }, + "destination_port_end": { + "$ref": "#/components/schemas/serverFirewallRulePort" + }, + "destination_port_start": { + "$ref": "#/components/schemas/serverFirewallRulePort" + }, + "direction": { + "type": "string", + "enum": [ + "in", + "out" + ], + "description": "Traffic direction to which the rule applies." + }, + "family": { + "type": "string", + "enum": [ + "IPv4", + "IPv6" + ], + "description": "IP address family. Required when protocol, addresses, ports, or ICMP type are specified." + }, + "icmp_type": { + "$ref": "#/components/schemas/serverFirewallRuleIcmpType" + }, + "protocol": { + "type": "string", + "enum": [ + "tcp", + "udp", + "icmp" + ], + "description": "Network protocol to match." + }, + "source_address_end": { + "type": "string", + "description": "Last source IP address in the range. Must be specified with source_address_start." + }, + "source_address_start": { + "type": "string", + "description": "First source IP address in the range. Must be specified with source_address_end." + }, + "source_port_end": { + "$ref": "#/components/schemas/serverFirewallRulePort" + }, + "source_port_start": { + "$ref": "#/components/schemas/serverFirewallRulePort" + } + }, + "required": [ + "action", + "direction" + ], + "additionalProperties": false, + "description": "Firewall rule conditions and action." + }, + "serverFirewallRuleRequirements": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "allOf": [ + { + "if": { + "required": [ + "destination_address_end" + ] + }, + "then": { + "required": [ + "destination_address_start", + "family" + ] + } + }, + { + "if": { + "required": [ + "destination_address_start" + ] + }, + "then": { + "required": [ + "destination_address_end", + "family" + ] + } + }, + { + "if": { + "required": [ + "destination_port_end" + ] + }, + "then": { + "required": [ + "destination_port_start", + "family", + "protocol" + ] + } + }, + { + "if": { + "required": [ + "destination_port_start" + ] + }, + "then": { + "required": [ + "destination_port_end", + "family", + "protocol" + ] + } + }, + { + "if": { + "required": [ + "icmp_type" + ] + }, + "then": { + "required": [ + "family", + "protocol" + ] + } + }, + { + "if": { + "required": [ + "protocol" + ] + }, + "then": { + "required": [ + "family" + ] + } + }, + { + "if": { + "required": [ + "source_address_end" + ] + }, + "then": { + "required": [ + "source_address_start", + "family" + ] + } + }, + { + "if": { + "required": [ + "source_address_start" + ] + }, + "then": { + "required": [ + "source_address_end", + "family" + ] + } + }, + { + "if": { + "required": [ + "source_port_end" + ] + }, + "then": { + "required": [ + "source_port_start", + "family", + "protocol" + ] + } + }, + { + "if": { + "required": [ + "source_port_start" + ] + }, + "then": { + "required": [ + "source_port_end", + "family", + "protocol" + ] + } + }, + { + "if": { + "required": [ + "icmp_type" + ] + }, + "then": { + "properties": { + "protocol": { + "const": "icmp" + } + } + } + }, + { + "if": { + "anyOf": [ + { + "required": [ + "destination_port_start" + ] + }, + { + "required": [ + "source_port_start" + ] + } + ] + }, + "then": { + "properties": { + "protocol": { + "enum": [ + "tcp", + "udp" + ] + } + } + } + } + ] + }, + "serverFirewallRulePort": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^(?:[1-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$" + }, + "serverFirewallRuleIcmpType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$" + }, + "serverCreateFirewallRule": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "firewall_rule": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/serverFirewallRuleRequirements" + } + ], + "properties": { + "action": { + "type": "string", + "enum": [ + "accept", + "drop" + ], + "description": "Action taken when the rule matches." + }, + "comment": { + "type": "string", + "maxLength": 250, + "description": "Free-form rule description." + }, + "destination_address_end": { + "type": "string", + "description": "Last destination IP address in the range. Must be specified with destination_address_start." + }, + "destination_address_start": { + "type": "string", + "description": "First destination IP address in the range. Must be specified with destination_address_end." + }, + "destination_port_end": { + "$ref": "#/components/schemas/serverFirewallRulePort" + }, + "destination_port_start": { + "$ref": "#/components/schemas/serverFirewallRulePort" + }, + "direction": { + "type": "string", + "enum": [ + "in", + "out" + ], + "description": "Traffic direction to which the rule applies." + }, + "family": { + "type": "string", + "enum": [ + "IPv4", + "IPv6" + ], + "description": "IP address family. Required when protocol, addresses, ports, or ICMP type are specified." + }, + "icmp_type": { + "$ref": "#/components/schemas/serverFirewallRuleIcmpType" + }, + "position": { + "type": "string", + "pattern": "^(?:[1-9]|[1-9][0-9]{1,2}|1000)$", + "description": "Position at which to insert the rule. Rules at and after this position are shifted down. If omitted or greater than the current rule count, the rule is appended." + }, + "protocol": { + "type": "string", + "enum": [ + "tcp", + "udp", + "icmp" + ], + "description": "Network protocol to match." + }, + "source_address_end": { + "type": "string", + "description": "Last source IP address in the range. Must be specified with source_address_start." + }, + "source_address_start": { + "type": "string", + "description": "First source IP address in the range. Must be specified with source_address_end." + }, + "source_port_end": { + "$ref": "#/components/schemas/serverFirewallRulePort" + }, + "source_port_start": { + "$ref": "#/components/schemas/serverFirewallRulePort" + } + }, + "required": [ + "action", + "direction" + ], + "additionalProperties": false + } + }, + "required": [ + "firewall_rule" + ], + "additionalProperties": false, + "description": "Parameters for creating a firewall rule.", + "example": { + "firewall_rule": { + "action": "accept", + "comment": "Allow SSH from the office network", + "destination_port_end": "22", + "destination_port_start": "22", + "direction": "in", + "family": "IPv4", + "position": "1", + "protocol": "tcp", + "source_address_end": "192.0.2.255", + "source_address_start": "192.0.2.1" + } + } + }, + "serverAddInterface": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "interface": { + "type": "object", + "properties": { + "bootable": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "index": { + "type": "integer", + "maximum": 255, + "minimum": 1, + "format": "int32", + "description": "Interface index; the next available index is used when omitted" + }, + "ip_addresses": { + "type": "object", + "properties": { + "ip_address": { + "type": "array", + "items": { + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/serverIpAddress" + }, + "dhcp_provided": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "family": { + "$ref": "#/components/schemas/serverIpFamily" + }, + "release_policy": { + "$ref": "#/components/schemas/serverIpReleasePolicy" + } + }, + "required": [ + "family" + ] + } + } + }, + "required": [ + "ip_address" + ], + "description": "IP addresses to attach to the interface" + }, + "network": { + "$ref": "#/components/schemas/serverUuid" + }, + "source_ip_filtering": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "type": { + "$ref": "#/components/schemas/serverNetworkType" + } + }, + "required": [ + "type", + "ip_addresses" + ], + "additionalProperties": false + } + }, + "required": [ + "interface" + ], + "additionalProperties": false, + "description": "Add network interface request", + "example": { + "interface": { + "ip_addresses": { + "ip_address": [ + { + "address": "10.0.0.20", + "dhcp_provided": "yes", + "family": "IPv4" + } + ] + }, + "network": "0374ce47-4303-4490-987d-32dc96cfd79b", + "source_ip_filtering": "yes", + "type": "private" + } + } + }, + "serverIpReleasePolicy": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "release", + "keep" + ], + "description": "Action taken when the resource using the address is deleted: release deletes the address, while keep preserves it as a detached floating IP address", + "example": "release" + }, + "serverModifyInterface": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "interface": { + "type": "object", + "properties": { + "bootable": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "index": { + "type": "integer", + "maximum": 255, + "minimum": 1, + "format": "int32", + "description": "New index for the interface; defaults to the index in the request path" + }, + "ip_addresses": { + "type": "object", + "properties": { + "ip_address": { + "type": "array", + "items": { + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/serverIpAddress" + }, + "dhcp_provided": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "family": { + "$ref": "#/components/schemas/serverIpFamily" + } + }, + "required": [ + "family" + ] + } + } + }, + "required": [ + "ip_address" + ], + "description": "Complete replacement list of IP addresses for the interface" + }, + "source_ip_filtering": { + "$ref": "#/components/schemas/serverBooleanYesno" + } + }, + "minProperties": 1, + "additionalProperties": false + } + }, + "required": [ + "interface" + ], + "additionalProperties": false, + "description": "Modify network interface request", + "example": { + "interface": { + "bootable": "yes", + "index": 5, + "source_ip_filtering": "no" + } + } + }, + "serverAddIpAddress": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "ip_address": { + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/serverIpAddress" + }, + "family": { + "$ref": "#/components/schemas/serverIpFamily" + } + }, + "required": [ + "family" + ], + "additionalProperties": false + } + }, + "required": [ + "ip_address" + ], + "additionalProperties": false, + "description": "Add IP address to a network interface request", + "example": { + "ip_address": { + "address": "10.0.0.30", + "family": "IPv4" + } + } + }, + "serverReason": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 200, + "minLength": 1, + "description": "Schema for reason strings used in API payloads." + }, + "serverAttachStorage": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage_device": { + "type": "object", + "allOf": [ + { + "if": { + "properties": { + "type": { + "const": "cdrom" + } + }, + "required": [ + "type" + ] + }, + "else": { + "required": [ + "storage" + ] + } + } + ], + "properties": { + "address": { + "type": "string", + "pattern": "^(?:ide(?::[01]:[01])?|scsi(?::0:(?:[0-9]|1[0-5]))?|virtio(?::(?:[0-9]|1[0-5]))?)$", + "description": "Device address or bus. When only a bus is specified, the next available address on that bus is selected. Defaults to the next available virtio address for disks and IDE address for CD-ROM devices." + }, + "boot_disk": { + "allOf": [ + { + "$ref": "#/components/schemas/serverBoolean01" + } + ], + "description": "Whether to use this storage device as the boot disk. The Cloud Server boot_order setting takes precedence.", + "default": 0 + }, + "storage": { + "$ref": "#/components/schemas/serverUuid" + }, + "type": { + "type": "string", + "enum": [ + "disk", + "cdrom" + ], + "description": "Type of device to attach.", + "default": "disk" + } + }, + "additionalProperties": false, + "description": "Storage device to attach." + } + }, + "required": [ + "storage_device" + ], + "additionalProperties": false, + "description": "Parameters for attaching a storage device to a Cloud Server.", + "example": { + "storage_device": { + "address": "virtio:0", + "boot_disk": 1, + "storage": "012580a1-32a1-466e-a323-689ca16f2d43", + "type": "disk" + } + } + }, + "serverDetachStorage": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage_device": { + "type": "object", + "anyOf": [ + { + "required": [ + "address" + ] + }, + { + "required": [ + "storage" + ] + } + ], + "properties": { + "address": { + "type": "string", + "pattern": "^(?:ide:[01]:[01]|scsi:0:(?:[0-9]|1[0-5])|virtio:(?:[0-9]|1[0-5]))$", + "description": "Address of the storage device on the Cloud Server." + }, + "storage": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "additionalProperties": false, + "description": "Storage device to detach, identified by either its device address or storage resource UUID." + } + }, + "required": [ + "storage_device" + ], + "additionalProperties": false, + "description": "Parameters for detaching a storage device from a Cloud Server.", + "example": { + "storage_device": { + "address": "virtio:0" + } + } + }, + "serverCreated": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "minimum": 0, + "format": "int64", + "description": "Creation timestamp (Unix epoch time)", + "example": 1705320000 + }, + "serverPlanName": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "1xCPU-1GB", + "DEV-1xCPU-4GB", + "CLOUDNATIVE-1xCPU-8GB", + "GPU-12xCPU-128GB-2xL40S" + ], + "maxLength": 255, + "minLength": 1, + "description": "Server plan identifier" + }, + "serverError400": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "examples": [ + "SERVER_INVALID" + ] + }, + "message": { + "type": "string", + "examples": [ + "The server UUID is invalid" + ] + } + }, + "required": [ + "code", + "message" + ] + } + }, + "required": [ + "error" + ], + "description": "Bad request error", + "example": { + "error": { + "code": "REQUEST_INVALID", + "message": "Invalid request parameters or malformed request body" + } + } + }, + "serverError403": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "examples": [ + "SERVER_FORBIDDEN" + ] + }, + "message": { + "type": "string", + "examples": [ + "Access denied or insufficient permissions" + ] + } + }, + "required": [ + "code", + "message" + ] + } + }, + "required": [ + "error" + ], + "description": "Forbidden error", + "example": { + "error": { + "code": "SERVER_FORBIDDEN", + "message": "Access denied or insufficient permissions" + } + } + }, + "serverError404": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "examples": [ + "SERVER_NOT_FOUND" + ] + }, + "message": { + "type": "string", + "examples": [ + "The server UUID does not exist" + ] + } + }, + "required": [ + "code", + "message" + ] + } + }, + "required": [ + "error" + ], + "description": "Schema for Cloud Server 404 error responses.", + "example": { + "error": { + "code": "SERVER_NOT_FOUND", + "message": "The server 007bf7bd-e3cf-4a10-bf01-4251dc7f3b65 does not exist." + } + } + }, + "serverError409": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "examples": [ + "SERVER_STATE_ILLEGAL" + ] + }, + "message": { + "type": "string", + "examples": [ + "The server is in a state in which it cannot be used" + ] + } + }, + "required": [ + "code", + "message" + ] + } + }, + "required": [ + "error" + ], + "description": "Conflict error", + "example": { + "error": { + "code": "SERVER_STATE_ILLEGAL", + "message": "The server is in a state in which it cannot be used" + } + } + }, + "serverError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "serverDevice": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "serial": { + "type": "string" + }, + "type": { + "type": "string" + }, + "model": { + "type": "string" + }, + "metadata": { + "type": "object", + "properties": { + "serial": { + "type": "string" + }, + "memory": { + "$ref": "#/components/schemas/serverMemoryAmount" + }, + "cores": { + "$ref": "#/components/schemas/serverCoreNumber" + } + }, + "required": [ + "serial", + "memory", + "cores" + ] + } + }, + "required": [ + "serial", + "type", + "model", + "metadata" + ], + "additionalProperties": false, + "description": "Schema for passthrough device information.", + "example": { + "serial": "1723925007011", + "type": "gpu", + "model": "NVIDIA L40S", + "metadata": { + "serial": "1723925007011", + "memory": 48, + "cores": 18176 + } + } + }, + "serverNetworking": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "interfaces": { + "type": "object", + "properties": { + "interface": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverInterface" + }, + "description": "Network interfaces ordered by interface index" + } + }, + "required": [ + "interface" + ], + "description": "Network interfaces attached to the Cloud Server" + } + }, + "description": "Network interfaces configured for the Cloud Server", + "example": { + "interfaces": { + "interface": [ + { + "bootable": "no", + "index": 4, + "ip_addresses": { + "ip_address": [ + { + "address": "10.0.0.20", + "dhcp_provided": "yes", + "family": "IPv4", + "floating": "no", + "release_policy": "release" + } + ] + }, + "mac": "de:ff:ff:ff:cc:20", + "network": "0374ce47-4303-4490-987d-32dc96cfd79b", + "source_ip_filtering": "yes", + "type": "private" + } + ] + } + } + }, + "serverInterface": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "bootable": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "index": { + "type": "integer", + "maximum": 255, + "minimum": 0, + "format": "int32", + "description": "Index that identifies and orders the interface" + }, + "ip_addresses": { + "type": "object", + "properties": { + "ip_address": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverInterfaceIpAddress" + } + } + }, + "required": [ + "ip_address" + ], + "description": "IP addresses attached to the interface" + }, + "mac": { + "$ref": "#/components/schemas/serverMacAddress" + }, + "network": { + "$ref": "#/components/schemas/serverUuid" + }, + "source_ip_filtering": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "type": { + "$ref": "#/components/schemas/serverNetworkType" + } + }, + "required": [ + "network" + ], + "description": "Network interface attached to a Cloud Server", + "example": { + "bootable": "no", + "index": 4, + "ip_addresses": { + "ip_address": [ + { + "address": "10.0.0.20", + "dhcp_provided": "yes", + "family": "IPv4", + "floating": "no", + "release_policy": "release" + } + ] + }, + "mac": "de:ff:ff:ff:cc:20", + "network": "0374ce47-4303-4490-987d-32dc96cfd79b", + "source_ip_filtering": "yes", + "type": "private" + } + }, + "serverInterfaceIpAddress": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/serverIpAddress" + }, + "dhcp_provided": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "family": { + "$ref": "#/components/schemas/serverIpFamily" + }, + "floating": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "release_policy": { + "$ref": "#/components/schemas/serverIpReleasePolicy" + } + }, + "required": [ + "address", + "family" + ], + "description": "Network interface IP address", + "example": { + "address": "10.0.0.20", + "dhcp_provided": "yes", + "family": "IPv4", + "floating": "no", + "release_policy": "release" + } + }, + "serverMacAddress": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$", + "description": "MAC address", + "example": "de:ff:ff:ff:cc:20" + }, + "serverStorageDevicesResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage_device": { + "type": "array", + "items": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "Device address on the Cloud Server." + }, + "boot_disk": { + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Whether this device is the Cloud Server's boot disk, encoded as 0 or 1." + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverLabel" + }, + "description": "Labels assigned to the storage resource." + }, + "part_of_plan": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "storage": { + "type": "string", + "description": "Storage resource UUID. Empty for an unloaded CD-ROM device." + }, + "storage_encrypted": { + "$ref": "#/components/schemas/serverBooleanYesno" + }, + "storage_size": { + "type": "integer", + "description": "Storage resource size in gibibytes." + }, + "storage_tier": { + "type": "string", + "description": "Storage resource performance tier." + }, + "storage_title": { + "type": "string", + "description": "Storage resource title." + }, + "type": { + "type": "string", + "enum": [ + "disk", + "cdrom" + ], + "description": "Attached device type." + } + }, + "required": [ + "address", + "boot_disk", + "labels", + "storage", + "storage_encrypted", + "storage_size", + "storage_title", + "type" + ], + "additionalProperties": false + } + } + }, + "required": [ + "storage_device" + ], + "additionalProperties": false, + "description": "Storage devices attached to a Cloud Server", + "example": { + "storage_device": [ + { + "address": "virtio:0", + "boot_disk": "1", + "labels": [], + "storage": "012580a1-32a1-466e-a323-689ca16f2d43", + "storage_encrypted": "yes", + "storage_size": 20, + "storage_title": "Operating system disk", + "type": "disk" + } + ] + } + }, + "serverUserName": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 64, + "minLength": 4, + "description": "Username for an account." + }, + "serverFirewallRulesetRelationshipInternal": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "applied_version": { + "type": [ + "integer", + "null" + ] + }, + "created_at": { + "type": "integer" + }, + "firewall_ruleset_uuid": { + "$ref": "#/components/schemas/serverUuid" + }, + "last_applied_at": { + "type": [ + "integer", + "null" + ] + }, + "server_uuid": { + "$ref": "#/components/schemas/serverUuid" + }, + "type": { + "type": "string", + "enum": [ + "public", + "private" + ] + }, + "updated_at": { + "type": [ + "integer", + "null" + ] + }, + "version": { + "type": "integer" + } + }, + "required": [ + "server_uuid", + "firewall_ruleset_uuid", + "type", + "version", + "created_at", + "updated_at", + "last_applied_at", + "applied_version" + ], + "additionalProperties": false, + "description": "Firewall ruleset relationship with Unix timestamps." + }, + "serverFirewallRulesetRelationship": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "firewall_ruleset_uuid": { + "$ref": "#/components/schemas/serverUuid" + }, + "server_uuid": { + "$ref": "#/components/schemas/serverUuid" + }, + "type": { + "type": "string", + "enum": [ + "public", + "private" + ], + "description": "Network interface class to which the ruleset applies." + } + }, + "required": [ + "server_uuid", + "firewall_ruleset_uuid", + "type" + ], + "additionalProperties": false, + "description": "Relationship between a Cloud Server and a firewall ruleset.", + "example": { + "firewall_ruleset_uuid": "190f56d8-4b3f-4a89-9e5f-320fbc3d17c8", + "server_uuid": "0077fa3d-32db-4b09-9f5f-30d9e9afb565", + "type": "private" + } + }, + "serverError511": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "Operation failed error", + "example": { + "error": { + "code": "HOTPLUG_FAILED", + "message": "The detach failed while the Cloud Server was started. Please stop the Cloud Server and try again." + } + } + }, + "serverFirewallRules": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "firewall_rules": { + "type": "object", + "properties": { + "firewall_rule": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverFirewallRuleResponseItem" + } + } + }, + "required": [ + "firewall_rule" + ], + "additionalProperties": false + } + }, + "required": [ + "firewall_rules" + ], + "additionalProperties": false, + "description": "Ordered firewall rules configured for a Cloud Server.", + "example": { + "firewall_rules": { + "firewall_rule": [ + { + "action": "accept", + "comment": "Allow SSH from the office network", + "destination_address_end": "", + "destination_address_start": "", + "destination_port_end": "22", + "destination_port_start": "22", + "direction": "in", + "family": "IPv4", + "icmp_type": "", + "position": "1", + "protocol": "tcp", + "source_address_end": "192.0.2.255", + "source_address_start": "192.0.2.1", + "source_port_end": "", + "source_port_start": "" + } + ] + } + } + }, + "serverFirewallRuleResponseItem": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": [ + "accept", + "drop" + ], + "description": "Action taken when the rule matches." + }, + "comment": { + "type": "string", + "description": "Free-form rule description." + }, + "destination_address_end": { + "type": "string", + "description": "Last destination IP address in the matched range, or an empty string when unrestricted." + }, + "destination_address_start": { + "type": "string", + "description": "First destination IP address in the matched range, or an empty string when unrestricted." + }, + "destination_port_end": { + "type": "string", + "description": "Last destination port in the matched range, or an empty string when unrestricted." + }, + "destination_port_start": { + "type": "string", + "description": "First destination port in the matched range, or an empty string when unrestricted." + }, + "direction": { + "type": "string", + "enum": [ + "in", + "out" + ], + "description": "Traffic direction to which the rule applies." + }, + "family": { + "type": "string", + "enum": [ + "IPv4", + "IPv6", + "" + ], + "description": "IP address family, or an empty string when unrestricted." + }, + "icmp_type": { + "type": "string", + "description": "ICMP packet type, or an empty string when unrestricted." + }, + "position": { + "type": "string", + "pattern": "^(?:[1-9]|[1-9][0-9]{1,2}|1000)$", + "description": "One-based position in the Cloud Server's firewall rule chain." + }, + "protocol": { + "type": "string", + "enum": [ + "tcp", + "udp", + "icmp", + "" + ], + "description": "Matched network protocol, or an empty string when unrestricted." + }, + "source_address_end": { + "type": "string", + "description": "Last source IP address in the matched range, or an empty string when unrestricted." + }, + "source_address_start": { + "type": "string", + "description": "First source IP address in the matched range, or an empty string when unrestricted." + }, + "source_port_end": { + "type": "string", + "description": "Last source port in the matched range, or an empty string when unrestricted." + }, + "source_port_start": { + "type": "string", + "description": "First source port in the matched range, or an empty string when unrestricted." + } + }, + "required": [ + "action", + "comment", + "destination_address_end", + "destination_address_start", + "destination_port_end", + "destination_port_start", + "direction", + "family", + "icmp_type", + "position", + "protocol", + "source_address_end", + "source_address_start", + "source_port_end", + "source_port_start" + ], + "additionalProperties": false, + "description": "A firewall rule with its position in the Cloud Server's rule chain." + }, + "serverFirewallRule": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "firewall_rule": { + "$ref": "#/components/schemas/serverFirewallRuleResponseItem" + } + }, + "required": [ + "firewall_rule" + ], + "additionalProperties": false, + "description": "A firewall rule with its position in the Cloud Server's rule chain.", + "example": { + "firewall_rule": { + "action": "accept", + "comment": "Allow SSH from the office network", + "destination_address_end": "", + "destination_address_start": "", + "destination_port_end": "22", + "destination_port_start": "22", + "direction": "in", + "family": "IPv4", + "icmp_type": "", + "position": "1", + "protocol": "tcp", + "source_address_end": "192.0.2.255", + "source_address_start": "192.0.2.1", + "source_port_end": "", + "source_port_start": "" + } + } + }, + "serverFirewallRulesetRelationships": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "firewall_ruleset_relationships": { + "type": "object", + "properties": { + "private": { + "type": "array", + "items": { + "$ref": "#/components/schemas/serverFirewallRulesetRelationshipDetails" + }, + "description": "Private firewall rulesets attached to the Cloud Server." + } + }, + "required": [ + "private" + ], + "additionalProperties": false + } + }, + "required": [ + "firewall_ruleset_relationships" + ], + "additionalProperties": false, + "description": "Private firewall ruleset relationships for a Cloud Server.", + "example": { + "firewall_ruleset_relationships": { + "private": [ + { + "applied_version": 3, + "created_at": "2026-08-25T10:15:30Z", + "firewall_ruleset_uuid": "190f56d8-4b3f-4a89-9e5f-320fbc3d17c8", + "last_applied_at": "2026-08-25T10:15:32Z", + "server_uuid": "0077fa3d-32db-4b09-9f5f-30d9e9afb565", + "type": "private", + "updated_at": null, + "version": 3 + } + ] + } + } + }, + "serverFirewallRulesetRelationshipDetails": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "applied_version": { + "type": [ + "integer", + "null" + ], + "description": "Ruleset version most recently applied to the Cloud Server." + }, + "created_at": { + "$ref": "#/components/schemas/serverRfc3339Datetime" + }, + "firewall_ruleset_uuid": { + "$ref": "#/components/schemas/serverUuid" + }, + "last_applied_at": { + "oneOf": [ + { + "$ref": "#/components/schemas/serverRfc3339Datetime" + }, + { + "type": "null" + } + ], + "description": "Time when this ruleset was last applied, or null if it has not been applied." + }, + "server_uuid": { + "$ref": "#/components/schemas/serverUuid" + }, + "type": { + "type": "string", + "description": "Network interface class to which the ruleset applies.", + "const": "private" + }, + "updated_at": { + "oneOf": [ + { + "$ref": "#/components/schemas/serverRfc3339Datetime" + }, + { + "type": "null" + } + ], + "description": "Time when the relationship was last updated, or null if it has not been updated." + }, + "version": { + "type": "integer", + "description": "Ruleset version selected for the relationship." + } + }, + "required": [ + "server_uuid", + "firewall_ruleset_uuid", + "type", + "version", + "created_at", + "updated_at", + "last_applied_at", + "applied_version" + ], + "additionalProperties": false, + "description": "Detailed private firewall ruleset relationship for a Cloud Server.", + "example": { + "applied_version": 3, + "created_at": "2026-08-25T10:15:30Z", + "firewall_ruleset_uuid": "190f56d8-4b3f-4a89-9e5f-320fbc3d17c8", + "last_applied_at": "2026-08-25T10:15:32Z", + "server_uuid": "0077fa3d-32db-4b09-9f5f-30d9e9afb565", + "type": "private", + "updated_at": null, + "version": 3 + } + }, + "serverRfc3339Datetime": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "2026-07-01T00:00:00Z", + "2026-07-31T23:59:59Z" + ], + "format": "date-time", + "description": "Datetime in RFC 3339 format" + }, + "serverGpus": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "gpus": { + "type": "array", + "items": { + "type": "object", + "properties": { + "firmware": { + "type": [ + "string", + "null" + ], + "description": "Firmware version of the GPU" + }, + "serial": { + "type": [ + "string", + "null" + ], + "description": "Serial number of the GPU" + }, + "part": { + "type": [ + "string", + "null" + ], + "description": "Part number of the GPU" + }, + "model": { + "type": "string", + "description": "Model name of the GPU" + }, + "memory_gib": { + "type": [ + "integer", + "null" + ], + "format": "int32", + "description": "Memory size of the GPU in GiB" + }, + "cores": { + "type": [ + "integer", + "null" + ], + "format": "int32", + "description": "Number of processing cores in the GPU" + } + }, + "required": [ + "model" + ], + "additionalProperties": false + } + } + }, + "required": [ + "gpus" + ], + "additionalProperties": false, + "description": "GPUs attached to a Cloud Server. The array is empty when no GPUs are attached.", + "example": { + "gpus": [ + { + "cores": 5888, + "firmware": "92.00.18.00.01", + "memory_gib": 24, + "model": "NVIDIA RTX A5000", + "part": "900-5G132-2500-000", + "serial": "GPU-01234567" + } + ] + } + }, + "serverNetworkingResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "networking": { + "$ref": "#/components/schemas/serverNetworking" + } + }, + "required": [ + "networking" + ], + "description": "Cloud Server networking response", + "example": { + "networking": { + "interfaces": { + "interface": [ + { + "bootable": "no", + "index": 4, + "ip_addresses": { + "ip_address": [ + { + "address": "10.0.0.20", + "dhcp_provided": "yes", + "family": "IPv4", + "floating": "no", + "release_policy": "release" + } + ] + }, + "mac": "de:ff:ff:ff:cc:20", + "network": "0374ce47-4303-4490-987d-32dc96cfd79b", + "source_ip_filtering": "yes", + "type": "private" + } + ] + } + } + } + }, + "serverInterfaceResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "interface": { + "$ref": "#/components/schemas/serverInterface" + } + }, + "required": [ + "interface" + ], + "description": "Network interface response", + "example": { + "interface": { + "bootable": "no", + "index": 4, + "ip_addresses": { + "ip_address": [ + { + "address": "10.0.0.20", + "dhcp_provided": "yes", + "family": "IPv4", + "floating": "no", + "release_policy": "release" + } + ] + }, + "mac": "de:ff:ff:ff:cc:20", + "network": "0374ce47-4303-4490-987d-32dc96cfd79b", + "source_ip_filtering": "yes", + "type": "private" + } + } + }, + "serverIpAddressInterfaceResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "ip_address": { + "$ref": "#/components/schemas/serverInterfaceIpAddress" + } + }, + "required": [ + "ip_address" + ], + "description": "IP address response for a network interface", + "example": { + "ip_address": { + "address": "10.0.0.30", + "dhcp_provided": "no", + "family": "IPv4" + } + } + }, + "serverVncHost": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "description": "VNC host IP address or noVNC proxy hostname. Empty when no VNC endpoint is assigned.", + "example": "94.237.1.20" + }, + "serverVncPort": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "format": "int32" + }, + { + "type": "string", + "const": "" + } + ], + "description": "VNC or noVNC proxy port. Empty when no VNC endpoint is assigned.", + "example": 5901 + }, + "serverRemoteAccessDetails": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "server": { + "type": "object", + "properties": { + "state": { + "$ref": "#/components/schemas/serverState" + }, + "vnc_host": { + "$ref": "#/components/schemas/serverVncHost" + }, + "vnc_password": { + "$ref": "#/components/schemas/serverVncPassword" + }, + "vnc_port": { + "$ref": "#/components/schemas/serverVncPort" + }, + "remote_access_type": { + "$ref": "#/components/schemas/serverRemoteAccessType" + }, + "remote_access_enabled": { + "$ref": "#/components/schemas/serverRemoteAccessEnabled" + }, + "remote_access_password": { + "$ref": "#/components/schemas/serverRemoteAccessPassword" + } + }, + "required": [ + "state", + "vnc_host", + "vnc_password", + "vnc_port", + "remote_access_type", + "remote_access_enabled", + "remote_access_password" + ], + "additionalProperties": false + } + }, + "required": [ + "server" + ], + "additionalProperties": false, + "description": "Remote access settings and VNC connection details for a Cloud Server", + "example": { + "server": { + "remote_access_enabled": "yes", + "remote_access_password": "A1b2C3d4", + "remote_access_type": "vnc", + "state": "started", + "vnc_host": "94.237.1.20", + "vnc_password": "A1b2C3d4", + "vnc_port": 5901 + } + } + }, + "serverVncPassword": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 8, + "minLength": 8, + "pattern": "^[A-Za-z0-9]{8}$", + "description": "VNC password", + "example": "A1b2C3d4" + }, + "serverCpuStats": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "stats": { + "type": "object", + "properties": { + "daily": { + "type": "object", + "properties": { + "summary": { + "$ref": "#/components/schemas/serverCpuStatsSummary" + } + }, + "required": [ + "summary" + ] + }, + "monthly": { + "type": "object", + "properties": { + "summary": { + "$ref": "#/components/schemas/serverCpuStatsSummary" + } + }, + "required": [ + "summary" + ] + }, + "yearly": { + "type": "object", + "properties": { + "summary": { + "$ref": "#/components/schemas/serverCpuStatsSummary" + } + }, + "required": [ + "summary" + ] + }, + "weekly": { + "type": "object", + "properties": { + "summary": { + "$ref": "#/components/schemas/serverCpuStatsSummary" + } + }, + "required": [ + "summary" + ] + } + }, + "minProperties": 1, + "additionalProperties": false + } + }, + "required": [ + "stats" + ], + "additionalProperties": false, + "description": "CPU usage statistics grouped by period", + "example": { + "stats": { + "daily": { + "summary": { + "variable": [ + { + "average": "12 %", + "current": "8 %", + "maximum": "37 %", + "title": "CPU usage %", + "total": "51 seconds" + } + ] + } + } + } + } + }, + "serverCpuStatsSummary": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "variable": { + "type": "array", + "items": { + "type": "object", + "properties": { + "average": { + "type": "string", + "description": "Average CPU usage during the period." + }, + "current": { + "type": "string", + "description": "Most recent CPU usage." + }, + "title": { + "type": "string", + "const": "CPU usage %" + }, + "maximum": { + "type": "string", + "description": "Maximum CPU usage during the period." + }, + "total": { + "type": "string", + "description": "Total CPU time consumed during the period." + } + }, + "required": [ + "average", + "current", + "title", + "maximum", + "total" + ], + "additionalProperties": false + } + } + }, + "required": [ + "variable" + ], + "additionalProperties": false, + "description": "Summarized CPU statistics values.", + "example": { + "variable": [ + { + "average": "12 %", + "current": "8 %", + "maximum": "37 %", + "title": "CPU usage %", + "total": "51 seconds" + } + ] + } + }, + "serverDiskStats": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "stats": { + "type": "object", + "properties": { + "daily": { + "type": "object", + "properties": { + "summary": { + "$ref": "#/components/schemas/serverDiskStatsSummary" + } + }, + "required": [ + "summary" + ] + }, + "monthly": { + "type": "object", + "properties": { + "summary": { + "$ref": "#/components/schemas/serverDiskStatsSummary" + } + }, + "required": [ + "summary" + ] + }, + "yearly": { + "type": "object", + "properties": { + "summary": { + "$ref": "#/components/schemas/serverDiskStatsSummary" + } + }, + "required": [ + "summary" + ] + }, + "weekly": { + "type": "object", + "properties": { + "summary": { + "$ref": "#/components/schemas/serverDiskStatsSummary" + } + }, + "required": [ + "summary" + ] + } + }, + "minProperties": 1, + "additionalProperties": false + } + }, + "required": [ + "stats" + ], + "additionalProperties": false, + "description": "Aggregate disk read and write statistics grouped by period", + "example": { + "stats": { + "daily": { + "summary": { + "variable": [ + { + "average": "1.5 MiBps", + "current": "2.0 MiBps", + "maximum": "4.0 MiBps", + "title": "Read", + "total": "8.0 GiB" + } + ] + } + } + } + } + }, + "serverDiskStatsSummary": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "variable": { + "type": "array", + "items": { + "type": "object", + "properties": { + "average": { + "type": "string", + "description": "Average transfer rate or request rate during the period." + }, + "current": { + "type": "string", + "description": "Most recent transfer rate or request rate." + }, + "title": { + "type": "string", + "enum": [ + "Read", + "Write" + ] + }, + "maximum": { + "type": "string", + "description": "Maximum transfer rate or request rate during the period." + }, + "total": { + "type": "string", + "description": "Total transferred data or I/O requests during the period." + } + }, + "required": [ + "average", + "current", + "title", + "maximum", + "total" + ], + "additionalProperties": false + } + } + }, + "required": [ + "variable" + ], + "additionalProperties": false, + "description": "Summarized disk read and write statistics values.", + "example": { + "variable": [ + { + "average": "1.5 MiBps", + "current": "2.0 MiBps", + "maximum": "4.0 MiBps", + "title": "Read", + "total": "8.0 GiB" + } + ] + } + }, + "serverNetworkStats": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "stats": { + "type": "object", + "properties": { + "daily": { + "type": "object", + "properties": { + "summary": { + "$ref": "#/components/schemas/serverNetworkStatsSummary" + } + }, + "required": [ + "summary" + ] + }, + "monthly": { + "type": "object", + "properties": { + "summary": { + "$ref": "#/components/schemas/serverNetworkStatsSummary" + } + }, + "required": [ + "summary" + ] + }, + "yearly": { + "type": "object", + "properties": { + "summary": { + "$ref": "#/components/schemas/serverNetworkStatsSummary" + } + }, + "required": [ + "summary" + ] + }, + "weekly": { + "type": "object", + "properties": { + "summary": { + "$ref": "#/components/schemas/serverNetworkStatsSummary" + } + }, + "required": [ + "summary" + ] + } + }, + "minProperties": 1, + "additionalProperties": false + } + }, + "required": [ + "stats" + ], + "additionalProperties": false, + "description": "Aggregate inbound and outbound network statistics grouped by period", + "example": { + "stats": { + "daily": { + "summary": { + "variable": [ + { + "average": "12 Mbps", + "current": "8.5 Mbps", + "maximum": "24 Mbps", + "title": "In", + "total": "8.0 GiB" + } + ] + } + } + } + } + }, + "serverNetworkStatsSummary": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "variable": { + "type": "array", + "items": { + "type": "object", + "properties": { + "average": { + "type": "string", + "description": "Average bit rate or packet rate during the period." + }, + "current": { + "type": "string", + "description": "Most recent bit rate or packet rate." + }, + "title": { + "type": "string", + "enum": [ + "In", + "Out" + ] + }, + "maximum": { + "type": "string", + "description": "Maximum bit rate or packet rate during the period." + }, + "total": { + "type": "string", + "description": "Total transferred data or packets during the period." + } + }, + "required": [ + "average", + "current", + "title", + "maximum", + "total" + ], + "additionalProperties": false + } + } + }, + "required": [ + "variable" + ], + "additionalProperties": false, + "description": "Summarized inbound and outbound network statistics values.", + "example": { + "variable": [ + { + "average": "12 Mbps", + "current": "8.5 Mbps", + "maximum": "24 Mbps", + "title": "In", + "total": "8.0 GiB" + } + ] + } + }, + "serverSizes": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "server_sizes": { + "type": "object", + "properties": { + "server_size": { + "type": "array", + "items": { + "type": "object", + "properties": { + "core_number": { + "type": "string", + "pattern": "^[0-9]+$", + "description": "Number of CPU cores" + }, + "memory_amount": { + "type": "string", + "pattern": "^[0-9]+$", + "description": "Amount of memory in MB" + } + }, + "required": [ + "core_number", + "memory_amount" + ], + "additionalProperties": false + }, + "example": [ + { + "core_number": "2", + "memory_amount": "4096" + } + ] + } + }, + "required": [ + "server_size" + ], + "additionalProperties": false, + "example": { + "server_size": [ + { + "core_number": "2", + "memory_amount": "4096" + } + ] + } + } + }, + "required": [ + "server_sizes" + ], + "additionalProperties": false, + "description": "List of server sizes", + "example": { + "server_sizes": { + "server_size": [ + { + "core_number": "2", + "memory_amount": "4096" + }, + { + "core_number": "4", + "memory_amount": "8192" + } + ] + } + } + }, + "serverSizeLimits": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "server_size_limits": { + "type": "object", + "properties": { + "core_number_min": { + "type": "integer", + "minimum": 1, + "format": "int64", + "description": "Minimum number of CPU cores" + }, + "core_number_max": { + "type": "integer", + "maximum": 64, + "minimum": 1, + "format": "int64", + "description": "Maximum number of CPU cores" + }, + "memory_amount_min": { + "type": "integer", + "maximum": 524288, + "minimum": 1024, + "format": "int64", + "description": "Minimum amount of memory in MB" + }, + "memory_amount_max": { + "type": "integer", + "maximum": 524288, + "minimum": 1024, + "format": "int64", + "description": "Maximum amount of memory in MB" + }, + "memory_amount_step": { + "type": "integer", + "minimum": 1024, + "format": "int64", + "description": "Step size for memory allocation in MB" + } + }, + "required": [ + "core_number_min", + "core_number_max", + "memory_amount_min", + "memory_amount_max", + "memory_amount_step" + ], + "additionalProperties": false, + "example": { + "core_number_min": 1, + "core_number_max": 64, + "memory_amount_min": 1024, + "memory_amount_max": 524288, + "memory_amount_step": 1024 + } + } + }, + "required": [ + "server_size_limits" + ], + "additionalProperties": false, + "description": "Schema for server size limits", + "example": { + "server_size_limits": { + "core_number_min": 1, + "core_number_max": 64, + "memory_amount_min": 1024, + "memory_amount_max": 524288, + "memory_amount_step": 1024 + } + } + }, + "serverSizeError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "createStorageRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage": { + "type": "object", + "properties": { + "backup_rule": { + "oneOf": [ + { + "$ref": "#/components/schemas/storageBackupRule" + }, + { + "type": "object" + } + ], + "description": "Schedule for automatic backups. An empty object disables automatic backups." + }, + "encrypted": { + "$ref": "#/components/schemas/storageEncrypted" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/storageLabel" + }, + "description": "Labels describing and classifying the block storage. Each label contains a key and a value." + }, + "size": { + "oneOf": [ + { + "type": "integer", + "maximum": 4096, + "minimum": 1 + }, + { + "type": "string", + "pattern": "^(?:[1-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|40(?:[0-8][0-9]|9[0-6]))$" + } + ], + "examples": [ + 100, + "100" + ], + "description": "Size of the block storage in gigabytes, from 1 through 4096 subject to the account's block storage limits." + }, + "tier": { + "$ref": "#/components/schemas/storageTier" + }, + "title": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "pattern": "^[^<>]*$", + "description": "A short, informational description of the block storage." + }, + "zone": { + "$ref": "#/components/schemas/storageZone" + } + }, + "required": [ + "zone", + "size", + "title" + ], + "additionalProperties": false, + "description": "Block storage creation parameters." + } + }, + "required": [ + "storage" + ], + "additionalProperties": false, + "description": "Request schema for creating block storage.", + "example": { + "storage": { + "backup_rule": { + "interval": "daily", + "retention": "7", + "time": "0400" + }, + "encrypted": "yes", + "labels": [ + { + "key": "environment", + "value": "production" + } + ], + "size": 50, + "tier": "maxiops", + "title": "Block Storage 1", + "zone": "fi-hel1" + } + } + }, + "modifyStorageBody": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage": { + "type": "object", + "properties": { + "backup_rule": { + "oneOf": [ + { + "$ref": "#/components/schemas/storageBackupRule" + }, + { + "type": "object" + } + ], + "description": "Schedule for automatic backups of the block storage. An empty object removes the configured schedule." + }, + "filesystem_resize": { + "type": "string", + "enum": [ + "yes", + "no" + ], + "description": "Set to `yes` when increasing `size` to also resize the last partition and its supported filesystem. The attached Cloud Server, if any, must be stopped." + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/storageLabel" + }, + "description": "Labels describing and classifying the block storage. Each label contains a key and a value." + }, + "size": { + "oneOf": [ + { + "type": "integer", + "maximum": 4096, + "minimum": 1 + }, + { + "type": "string", + "pattern": "^(?:[1-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|40(?:[0-8][0-9]|9[0-6]))$" + } + ], + "examples": [ + 100, + "100" + ], + "description": "New block storage size in gigabytes, from 1 through 4096 subject to the account's block storage limits. The new size must be greater than the current size." + }, + "title": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "pattern": "^[^<>]*$", + "description": "A short, informational description of the block storage." + } + }, + "additionalProperties": false, + "description": "Block storage properties to modify." + } + }, + "required": [ + "storage" + ], + "additionalProperties": false, + "description": "Request schema for modifying block storage properties.", + "example": { + "storage": { + "size": 100, + "title": "Production data expanded" + } + } + }, + "attachStorageRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage_device": { + "type": "object", + "properties": { + "server": { + "$ref": "#/components/schemas/storageUuid" + }, + "address": { + "type": "string", + "examples": [ + "scsi", + "scsi:0:0", + "virtio:0", + "ide:0:0" + ], + "pattern": "^(?:ide(?::[01]:[01])?|scsi(?::0:(?:[0-9]|1[0-5]))?|virtio(?::(?:[0-9]|1[0-5]))?)$", + "description": "Device address on the Cloud Server, or an `ide`, `scsi`, or `virtio` bus name for automatic address selection. Defaults to the next available address on the Cloud Server's default disk bus for disks, or the IDE bus for CD-ROM devices." + }, + "type": { + "type": "string", + "enum": [ + "disk", + "cdrom" + ], + "description": "Type of the attached device. Defaults to `disk`.", + "default": "disk" + }, + "boot_disk": { + "type": "string", + "enum": [ + "0", + "1" + ], + "description": "Whether the device is used as the boot disk unless overridden by the Cloud Server boot order. Defaults to `0`.", + "default": "0" + } + }, + "required": [ + "server" + ], + "additionalProperties": false, + "description": "Parameters for attaching this storage resource to a Cloud Server in the same zone." + } + }, + "required": [ + "storage_device" + ], + "additionalProperties": false, + "description": "Request schema for attaching this storage resource to a Cloud Server.", + "example": { + "storage_device": { + "server": "00798b85-efdc-41ca-8021-f6ef457b8531", + "type": "disk" + } + } + }, + "createStorageBackupRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage": { + "type": "object", + "properties": { + "title": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "pattern": "^[^<>]*$", + "description": "A short, informational description of the backup." + } + }, + "required": [ + "title" + ], + "additionalProperties": false, + "description": "Parameters for the point-in-time backup." + } + }, + "required": [ + "storage" + ], + "additionalProperties": false, + "description": "Request schema for creating an on-demand block storage backup.", + "example": { + "storage": { + "title": "Manually created backup" + } + } + }, + "cloneStorageRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage": { + "type": "object", + "properties": { + "encrypted": { + "$ref": "#/components/schemas/storageEncrypted" + }, + "tier": { + "$ref": "#/components/schemas/storageTier" + }, + "title": { + "$ref": "#/components/schemas/storageTitle" + }, + "zone": { + "$ref": "#/components/schemas/storageZone" + } + }, + "required": [ + "zone", + "title" + ], + "additionalProperties": false, + "description": "Parameters for the cloned block storage." + } + }, + "required": [ + "storage" + ], + "additionalProperties": false, + "description": "Request schema for cloning a block storage resource.", + "example": { + "storage": { + "encrypted": "yes", + "tier": "maxiops", + "title": "Cloned Block Storage", + "zone": "fi-hel1" + } + } + }, + "createStorageImportRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage_import": { + "type": "object", + "allOf": [ + { + "if": { + "properties": { + "source": { + "const": "http_import" + } + }, + "required": [ + "source" + ] + }, + "then": { + "required": [ + "source_location" + ] + } + } + ], + "properties": { + "source": { + "type": "string", + "enum": [ + "http_import", + "direct_upload" + ], + "description": "Import mode. Use `http_import` to download an image or `direct_upload` to receive a temporary upload URL." + }, + "source_location": { + "type": "string", + "maxLength": 2000, + "pattern": "^https?://", + "format": "uri", + "description": "Publicly reachable HTTP or HTTPS URL of the image. Required for `http_import`." + } + }, + "required": [ + "source" + ], + "additionalProperties": false, + "description": "Storage import parameters." + } + }, + "required": [ + "storage_import" + ], + "additionalProperties": false, + "description": "Request schema for creating a storage import task.", + "example": { + "storage_import": { + "source": "http_import", + "source_location": "https://example.com/disk.raw" + } + } + }, + "createStorageTemplateRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage": { + "type": "object", + "properties": { + "title": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "pattern": "^[^<>]*$", + "description": "A short, informational description of the template." + } + }, + "required": [ + "title" + ], + "additionalProperties": false, + "description": "Parameters for creating a template from the block storage." + } + }, + "required": [ + "storage" + ], + "additionalProperties": false, + "description": "Request schema for creating a template from a block storage resource.", + "example": { + "storage": { + "title": "My server template" + } + } + }, + "storages": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "storages": { + "type": "object", + "properties": { + "storage": { + "type": "array", + "items": { + "$ref": "#/components/schemas/storageListItem" + } + } + }, + "required": [ + "storage" + ], + "additionalProperties": false + } + }, + "required": [ + "storages" + ], + "additionalProperties": false, + "description": "A list of storage resources accessible to the account.", + "example": { + "storages": { + "storage": [ + { + "access": "private", + "encrypted": "no", + "created": "2025-02-27T05:50:50Z", + "labels": [ + { + "key": "environment", + "value": "production" + } + ], + "license": 0, + "size": 50, + "state": "online", + "tier": "maxiops", + "title": "Production database", + "type": "normal", + "uuid": "01f3286c-a5ea-4670-8121-d0b9767d625b", + "zone": "fi-hel1" + } + ] + } + } + }, + "storageListItem": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "access": { + "$ref": "#/components/schemas/storageAccess" + }, + "encrypted": { + "$ref": "#/components/schemas/storageEncrypted" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/storageLabel" + }, + "description": "Labels describing and classifying the storage resource." + }, + "license": { + "type": "number", + "format": "double", + "description": "Hourly license fee in credits. The value is `0` when the storage resource has no license fee." + }, + "part_of_plan": { + "type": "string", + "description": "Present with value `yes` when the storage resource is included in the Cloud Server plan.", + "const": "yes" + }, + "progress": { + "type": "string", + "description": "Progress of an active storage operation." + }, + "created": { + "type": "string", + "format": "date-time", + "description": "Time when the private storage resource or backup was created." + }, + "origin": { + "$ref": "#/components/schemas/storageUuid" + }, + "size": { + "type": "integer", + "minimum": 1, + "format": "int64", + "description": "Size of the storage resource in gigabytes." + }, + "state": { + "$ref": "#/components/schemas/storageState" + }, + "tier": { + "$ref": "#/components/schemas/storageTier" + }, + "title": { + "type": "string", + "description": "A short, informational description of the storage resource." + }, + "type": { + "$ref": "#/components/schemas/storageType" + }, + "template_type": { + "$ref": "#/components/schemas/storageTemplateType" + }, + "uuid": { + "$ref": "#/components/schemas/storageUuid" + }, + "zone": { + "$ref": "#/components/schemas/storageZone" + } + }, + "required": [ + "access", + "license", + "size", + "state", + "title", + "type", + "uuid", + "encrypted", + "labels" + ], + "additionalProperties": false, + "description": "Storage resource summary returned by public list operations.", + "example": { + "access": "private", + "created": "2025-02-27T05:50:50Z", + "encrypted": "no", + "labels": [], + "license": 0, + "size": 50, + "state": "online", + "tier": "maxiops", + "title": "Databases", + "type": "normal", + "uuid": "01f3286c-a5ea-4670-8121-d0b9767d625b", + "zone": "fi-hel1" + } + }, + "storageState": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "online" + ], + "enum": [ + "online", + "maintenance", + "error", + "pending_delete", + "hidden", + "cloning", + "backuping", + "attaching", + "detaching", + "syncing" + ], + "description": "Current lifecycle state of the storage resource. `online` is ready for use; `maintenance` indicates ongoing maintenance or an update; `cloning`, `backuping`, and `syncing` indicate active storage operations; `error` indicates that the storage resource is inaccessible because an error occurred." + }, + "storageTier": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "hdd", + "standard", + "maxiops" + ], + "enum": [ + "hdd", + "standard", + "maxiops" + ], + "description": "Block storage performance and pricing tier. `maxiops` is high-performance block storage, `standard` is general-purpose block storage, and `hdd` is the API name for the high-capacity Archive tier." + }, + "storageType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "normal" + ], + "enum": [ + "normal", + "template", + "cdrom", + "backup" + ], + "description": "Storage resource type to return." + }, + "createStorageResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage": { + "$ref": "#/components/schemas/storageDetails" + } + }, + "required": [ + "storage" + ], + "additionalProperties": false, + "description": "Response containing the created block storage resource.", + "example": { + "storage": { + "access": "private", + "backup_rule": { + "interval": "daily", + "retention": "7", + "time": "0400" + }, + "backups": { + "backup": [] + }, + "created": "2026-08-26T09:15:00Z", + "encrypted": "yes", + "labels": [ + { + "key": "environment", + "value": "production" + } + ], + "license": 0, + "servers": { + "server": [] + }, + "size": 50, + "state": "online", + "tier": "maxiops", + "title": "Production data", + "type": "normal", + "uuid": "01d4fcd4-e446-433b-8a9c-551a1284952e", + "zone": "fi-hel1" + } + } + }, + "storageDetails": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "access": { + "$ref": "#/components/schemas/storageAccess" + }, + "encrypted": { + "$ref": "#/components/schemas/storageEncrypted" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/storageLabel" + }, + "description": "Labels describing and classifying the storage resource." + }, + "license": { + "type": "number", + "format": "double", + "description": "Hourly license cost in credits when the storage resource contains a licensed operating system." + }, + "backup_rule": { + "oneOf": [ + { + "$ref": "#/components/schemas/storageBackupRule" + }, + { + "type": "object" + } + ], + "description": "Schedule for automatic backups of the storage resource. An empty object indicates that no automatic backup schedule is configured." + }, + "backups": { + "type": "object", + "properties": { + "backup": { + "type": "array", + "items": { + "$ref": "#/components/schemas/storageUuid" + }, + "description": "UUIDs of backups associated with this storage resource." + } + }, + "required": [ + "backup" + ], + "additionalProperties": false, + "description": "Backups associated with this storage resource." + }, + "created": { + "type": "string", + "format": "date-time", + "description": "Time when the private storage resource was created." + }, + "origin": { + "$ref": "#/components/schemas/storageUuid" + }, + "part_of_plan": { + "type": "string", + "description": "Present with the value `yes` when the storage resource is included in a Cloud Server plan.", + "const": "yes" + }, + "progress": { + "type": "string", + "description": "Progress of an ongoing storage operation when available." + }, + "servers": { + "type": "object", + "properties": { + "server": { + "type": "array", + "items": { + "$ref": "#/components/schemas/storageUuid" + }, + "description": "UUIDs of Cloud Servers to which the storage resource is attached." + } + }, + "required": [ + "server" + ], + "additionalProperties": false, + "description": "Cloud Servers to which the storage resource is attached." + }, + "size": { + "type": "integer", + "minimum": 1, + "format": "int64", + "description": "Size of the storage resource in gigabytes." + }, + "state": { + "$ref": "#/components/schemas/storageState" + }, + "tier": { + "$ref": "#/components/schemas/storageTier" + }, + "title": { + "type": "string", + "description": "A short, informational description of the storage resource." + }, + "type": { + "$ref": "#/components/schemas/storageType" + }, + "template_type": { + "$ref": "#/components/schemas/storageTemplateType" + }, + "uuid": { + "$ref": "#/components/schemas/storageUuid" + }, + "zone": { + "$ref": "#/components/schemas/storageZone" + } + }, + "required": [ + "access", + "encrypted", + "labels", + "license", + "servers", + "size", + "state", + "title", + "type", + "uuid" + ], + "additionalProperties": false, + "description": "Detailed information about a storage resource.", + "example": { + "access": "private", + "backup_rule": {}, + "backups": { + "backup": [] + }, + "created": "2026-08-26T09:15:00Z", + "encrypted": "no", + "labels": [], + "license": 0, + "servers": { + "server": [] + }, + "size": 50, + "state": "online", + "tier": "maxiops", + "title": "Production data", + "type": "normal", + "uuid": "01d4fcd4-e446-433b-8a9c-551a1284952e", + "zone": "fi-hel1" + } + }, + "storage": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage": { + "$ref": "#/components/schemas/storageDetails" + } + }, + "required": [ + "storage" + ], + "additionalProperties": false, + "description": "Response schema containing a single storage resource.", + "example": { + "storage": { + "access": "private", + "backup_rule": {}, + "backups": { + "backup": [] + }, + "created": "2026-08-26T09:15:00Z", + "encrypted": "no", + "labels": [], + "license": 0, + "servers": { + "server": [] + }, + "size": 50, + "state": "online", + "tier": "maxiops", + "title": "Production data", + "type": "normal", + "uuid": "01d4fcd4-e446-433b-8a9c-551a1284952e", + "zone": "fi-hel1" + } + } + }, + "modifyStorageResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage": { + "$ref": "#/components/schemas/storageDetails" + }, + "resize_backup": { + "$ref": "#/components/schemas/storageDetails" + } + }, + "required": [ + "storage" + ], + "additionalProperties": false, + "description": "Response schema for block storage modification operations.", + "example": { + "storage": { + "access": "private", + "backup_rule": {}, + "backups": { + "backup": [] + }, + "created": "2026-08-26T09:15:00Z", + "encrypted": "no", + "labels": [], + "license": 0, + "servers": { + "server": [] + }, + "size": 60, + "state": "online", + "tier": "maxiops", + "title": "Production data expanded", + "type": "normal", + "uuid": "011d671f-e803-484d-920a-c25b4bb05c01", + "zone": "fi-hel1" + } + } + }, + "attachStorageResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage": { + "$ref": "#/components/schemas/storageDetails" + } + }, + "required": [ + "storage" + ], + "additionalProperties": false, + "description": "Response containing the attached storage resource and its Cloud Server attachment.", + "example": { + "storage": { + "access": "private", + "backup_rule": {}, + "backups": { + "backup": [] + }, + "created": "2026-08-26T09:15:00Z", + "encrypted": "yes", + "labels": [ + { + "key": "environment", + "value": "production" + } + ], + "license": 0, + "servers": { + "server": [ + "009d64ef-31d1-4684-a26b-c86c955cbf46" + ] + }, + "size": 50, + "state": "online", + "tier": "maxiops", + "title": "Production data", + "type": "normal", + "uuid": "01d4fcd4-e446-433b-8a9c-551a1284952e", + "zone": "fi-hel1" + } + } + }, + "createStorageBackupResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage": { + "$ref": "#/components/schemas/storageDetails" + } + }, + "required": [ + "storage" + ], + "additionalProperties": false, + "description": "Response containing the on-demand backup being created.", + "example": { + "storage": { + "access": "private", + "created": "2026-08-26T09:20:00Z", + "encrypted": "yes", + "labels": [ + { + "key": "environment", + "value": "production" + } + ], + "license": 0, + "origin": "01d4fcd4-e446-433b-8a9c-551a1284952e", + "progress": "0", + "servers": { + "server": [] + }, + "size": 50, + "state": "maintenance", + "title": "Manually created backup", + "type": "backup", + "uuid": "016d343b-14de-4b61-91ca-433dd1ea6c47", + "zone": "fi-hel1" + } + } + }, + "detachStorageResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage": { + "$ref": "#/components/schemas/storageDetails" + } + }, + "required": [ + "storage" + ], + "additionalProperties": false, + "description": "Response containing the detached storage resource.", + "example": { + "storage": { + "access": "private", + "backup_rule": {}, + "backups": { + "backup": [] + }, + "created": "2026-08-26T09:15:00Z", + "encrypted": "yes", + "labels": [ + { + "key": "environment", + "value": "production" + } + ], + "license": 0, + "servers": { + "server": [] + }, + "size": 50, + "state": "online", + "tier": "maxiops", + "title": "Production data", + "type": "normal", + "uuid": "01d4fcd4-e446-433b-8a9c-551a1284952e", + "zone": "fi-hel1" + } + } + }, + "storageImportResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage_import": { + "$ref": "#/components/schemas/storageImport" + } + }, + "required": [ + "storage_import" + ], + "additionalProperties": false, + "description": "Response containing a storage import task.", + "example": { + "storage_import": { + "client_content_length": 0, + "client_content_type": "", + "completed": "", + "created": "2020-06-26T08:51:07Z", + "direct_upload_url": "https://fi-hel1.img.upcloud.com/uploader/session/07a6c9a3-300e-4d0e-b935-624f3dbdff3f", + "error_code": "", + "error_message": "", + "md5sum": "", + "read_bytes": 0, + "sha256sum": "", + "source": "direct_upload", + "state": "prepared", + "uuid": "07a6c9a3-300e-4d0e-b935-624f3dbdff3f", + "written_bytes": 0 + } + } + }, + "storageImport": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "allOf": [ + { + "if": { + "properties": { + "source": { + "const": "http_import" + } + }, + "required": [ + "source" + ] + }, + "else": { + "required": [ + "direct_upload_url" + ] + }, + "then": { + "required": [ + "source_location" + ] + } + } + ], + "properties": { + "client_content_length": { + "type": "integer", + "minimum": 0, + "description": "Content length reported by the import client, in bytes." + }, + "client_content_type": { + "type": "string", + "description": "Content type reported by the import client." + }, + "completed": { + "oneOf": [ + { + "const": "" + }, + { + "type": "string", + "format": "date-time" + } + ], + "description": "Completion time in RFC 3339 format, or an empty string while unfinished." + }, + "created": { + "type": "string", + "format": "date-time", + "description": "Time when the import task was created." + }, + "direct_upload_url": { + "type": "string", + "format": "uri", + "description": "Temporary URL to which image data is uploaded in `direct_upload` mode." + }, + "error_code": { + "type": "string", + "enum": [ + "", + "CLIENT_FAILURE", + "IMPORT_FAILURE", + "INTERNAL_FAILURE" + ], + "description": "Failure category, empty unless the task failed." + }, + "error_message": { + "type": "string", + "description": "Failure details, empty unless the task failed." + }, + "md5sum": { + "type": "string", + "description": "MD5 checksum of the imported data, available after completion." + }, + "read_bytes": { + "type": "integer", + "minimum": 0, + "description": "Number of bytes read from the source." + }, + "sha256sum": { + "type": "string", + "description": "SHA-256 checksum of the imported data, available after completion." + }, + "source": { + "type": "string", + "enum": [ + "http_import", + "direct_upload" + ], + "description": "Import mode." + }, + "source_location": { + "type": "string", + "format": "uri", + "description": "HTTP or HTTPS source URL for an `http_import` task." + }, + "state": { + "type": "string", + "enum": [ + "prepared", + "pending", + "importing", + "failed", + "cancelling", + "cancelled", + "completed" + ], + "description": "Current import task state." + }, + "uuid": { + "$ref": "#/components/schemas/storageUuid" + }, + "written_bytes": { + "type": "integer", + "minimum": 0, + "description": "Number of bytes written to the storage resource." + } + }, + "required": [ + "client_content_length", + "client_content_type", + "completed", + "created", + "error_code", + "error_message", + "md5sum", + "read_bytes", + "sha256sum", + "source", + "state", + "uuid", + "written_bytes" + ], + "additionalProperties": false, + "description": "Details and progress of a storage import task.", + "example": { + "client_content_length": 0, + "client_content_type": "", + "completed": "", + "created": "2020-06-26T08:51:07Z", + "error_code": "", + "error_message": "", + "md5sum": "", + "read_bytes": 0, + "sha256sum": "", + "source": "http_import", + "source_location": "https://example.com/disk.raw", + "state": "pending", + "uuid": "07a6c9a3-300e-4d0e-b935-624f3dbdff3f", + "written_bytes": 0 + } + }, + "resizeStorageResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "resize_backup": { + "$ref": "#/components/schemas/storageDetails" + } + }, + "required": [ + "resize_backup" + ], + "additionalProperties": false, + "description": "Response containing the backup created before resizing the block storage partition and filesystem.", + "example": { + "resize_backup": { + "access": "private", + "created": "2021-12-03T06:25:15Z", + "encrypted": "no", + "labels": [], + "license": 0, + "size": 100, + "state": "online", + "origin": "017ca4cc-def2-458d-a797-7782959b30a7", + "servers": { + "server": [] + }, + "tier": "maxiops", + "title": "Resize Backup", + "type": "backup", + "uuid": "01beec3a-14ac-4f71-9c63-3338341121c3", + "zone": "fi-hel1" + } + } + }, + "createStorageTemplateResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "storage": { + "$ref": "#/components/schemas/storageDetails" + } + }, + "required": [ + "storage" + ], + "additionalProperties": false, + "description": "Response containing the private template being created.", + "example": { + "storage": { + "access": "private", + "created": "2026-08-26T09:25:00Z", + "encrypted": "yes", + "labels": [ + { + "key": "environment", + "value": "production" + } + ], + "license": 0, + "servers": { + "server": [] + }, + "size": 50, + "state": "maintenance", + "tier": "maxiops", + "title": "My server template", + "type": "template", + "uuid": "01be94b8-8f9f-44f7-99df-3d61051173c2", + "zone": "fi-hel1" + } + } + }, + "storageLabelFilter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "environment", + "environment=production" + ], + "pattern": "^(?!_)[\\x20-\\x3C\\x3E-\\x7E]{2,32}(?:=.*)?$", + "description": "Label key or key-value pair to match. A key-only filter matches any value. Repeat the query parameter to require all specified labels; keys are matched case-insensitively." + }, + "storageSearch": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "database", + "01f3286c" + ], + "maxLength": 255, + "minLength": 1, + "pattern": "^[^<>]+$", + "description": "Partial match against the storage resource title or UUID." + }, + "storageSortBy": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "title" + ], + "enum": [ + "created", + "size", + "tier", + "title", + "type", + "zone" + ], + "description": "Storage resource field by which to sort the results." + }, + "storageOrderBy": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "asc" + ], + "enum": [ + "asc", + "desc" + ], + "description": "Sort direction. This parameter is used only when `sort_by` is specified." + }, + "storageLimit": { + "type": "integer", + "examples": [ + 25, + 50, + 100 + ], + "maximum": 100, + "minimum": 1, + "description": "Maximum number of storage resources to return. Default is 25." + }, + "storageOffset": { + "type": "integer", + "examples": [ + 0, + 25, + 50, + 100 + ], + "minimum": 0, + "description": "Number of items to skip before starting to return results. Default is 0." + }, + "storageAccessFilter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "private" + ], + "enum": [ + "public", + "private" + ], + "description": "Storage resource access type to return." + }, + "storageUuid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$", + "format": "uuid", + "description": "Universally unique identifier", + "example": "0414e0d7-4436-4037-9dd8-6eaf47dce599" + }, + "storageBackupRule": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "interval": { + "type": "string", + "enum": [ + "daily", + "mon", + "tue", + "wed", + "thu", + "fri", + "sat", + "sun" + ], + "description": "Weekday when the backup is created, or `daily` to create a backup every day at the same time." + }, + "time": { + "type": "string", + "pattern": "^(?:[01][0-9]|2[0-3])[0-5][0-9]$", + "description": "UTC time of day when the backup is created, in `HHMM` format." + }, + "retention": { + "type": "string", + "pattern": "^(?:[1-9]|[1-9][0-9]{1,2}|10[0-8][0-9]|109[0-5])$", + "description": "Number of days before the backup is automatically deleted, from 1 through 1095." + } + }, + "required": [ + "interval", + "time", + "retention" + ], + "additionalProperties": false, + "description": "Schedule for automatic block storage backups.", + "example": { + "interval": "daily", + "retention": "7", + "time": "0400" + } + }, + "storageEncrypted": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "yes", + "no" + ], + "enum": [ + "yes", + "no" + ], + "description": "Indicates whether the resource is encrypted." + }, + "storageLabel": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Label key used to classify the resource" + }, + "value": { + "type": "string", + "description": "Value associated with the label key" + } + }, + "required": [ + "key", + "value" + ], + "additionalProperties": false, + "description": "A key/value pair to label and categorize resources", + "example": { + "key": "env", + "value": "production" + } + }, + "storageZone": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "fi-hel1", + "de-fra1", + "us-nyc1" + ], + "maxLength": 15, + "minLength": 2, + "pattern": "^[a-z][a-z0-9-]{0,14}[a-z0-9]$", + "description": "Zone identifier" + }, + "storageTitle": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "description": "Human-readable title for a resource." + }, + "storageAccess": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "public", + "private", + "utility" + ], + "description": "Network access level", + "example": "public" + }, + "storageTemplateType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "cloud-init" + ], + "enum": [ + "cloud-init", + "native" + ], + "description": "Template initialization mechanism. `cloud-init` templates support cloud-init metadata, while `native` templates use the operating system's native initialization." + }, + "storageError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "tag": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "tag": { + "type": "object", + "properties": { + "description": { + "$ref": "#/components/schemas/tagDescription" + }, + "name": { + "$ref": "#/components/schemas/tagName" + }, + "servers": { + "$ref": "#/components/schemas/tagServers" + } + }, + "required": [ + "name", + "servers" + ], + "example": { + "name": "PROD", + "description": "Production servers", + "servers": { + "server": [ + "0077fa3d-32db-4b09-9f5f-30d9e9afb565" + ] + } + } + } + }, + "required": [ + "tag" + ], + "description": "Container object for a single tag resource.", + "example": { + "tag": { + "name": "PROD", + "description": "Production servers", + "servers": { + "server": [ + "0077fa3d-32db-4b09-9f5f-30d9e9afb565" + ] + } + } + } + }, + "tags": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "tags": { + "type": "object", + "properties": { + "tag": { + "type": "array", + "items": { + "type": "object", + "properties": { + "description": { + "$ref": "#/components/schemas/tagDescription" + }, + "name": { + "$ref": "#/components/schemas/tagName" + }, + "servers": { + "$ref": "#/components/schemas/tagServers" + } + }, + "required": [ + "name", + "servers" + ] + } + } + }, + "required": [ + "tag" + ], + "example": { + "tag": [ + { + "name": "PROD", + "description": "Production servers", + "servers": { + "server": [ + "0077fa3d-32db-4b09-9f5f-30d9e9afb565" + ] + } + } + ] + } + } + }, + "required": [ + "tags" + ], + "description": "Container object for resource tags.", + "example": { + "tags": { + "tag": [ + { + "name": "PROD", + "description": "Production servers", + "servers": { + "server": [ + "0077fa3d-32db-4b09-9f5f-30d9e9afb565" + ] + } + } + ] + } + } + }, + "tagName": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "DEV", + "PROD", + "private", + "QA", + "webserver", + "database" + ], + "maxLength": 32, + "minLength": 1, + "pattern": "^[A-Za-z0-9_]{1,32}$", + "description": "Short name used to identify a tag." + }, + "tagDescription": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "Development servers", + "Production servers", + "Private environment", + "Quality Assurance environment", + "Web servers", + "Database servers" + ], + "description": "Human-readable description for a tag." + }, + "tagServers": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "server": { + "type": "array", + "items": { + "type": "string", + "examples": [ + "0077fa3d-32db-4b09-9f5f-30d9e9afb565", + "00c78863-db86-44ea-af70-d6edc4d162bf" + ], + "format": "uuid", + "description": "Unique identifier of the server." + } + } + }, + "description": "List of servers associated with the tag.", + "example": { + "server": [ + "0077fa3d-32db-4b09-9f5f-30d9e9afb565", + "00c78863-db86-44ea-af70-d6edc4d162bf" + ] + } + }, + "tagError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "tagError400": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "TAG_INVALID" + }, + "error_message": { + "type": "string", + "examples": [ + "The tag name is invalid" + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "400 Bad Request errors for tag operations." + }, + "tagError403": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "TAG_FORBIDDEN" + }, + "error_message": { + "type": "string", + "examples": [ + "Username does not have access to this tag" + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "400 Forbidden errors for tag operations." + }, + "tagError409": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "TAG_EXISTS" + }, + "error_message": { + "type": "string", + "examples": [ + "Tag already exists" + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "description": "409 Conflict errors for tag operations." + }, + "tagError404": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "const": "TAG_NOT_FOUND" + }, + "error_message": { + "type": "string", + "examples": [ + "Tag does not exist" + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "404 Not Found errors for tag operations." + }, + "timezones": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "timezones": { + "type": "object", + "properties": { + "timezone": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "UTC", + "Europe/Helsinki" + ] + } + }, + "required": [ + "timezone" + ], + "additionalProperties": false, + "example": { + "timezone": [ + "UTC", + "Europe/Helsinki", + "America/New_York" + ] + } + } + }, + "required": [ + "timezones" + ], + "additionalProperties": false, + "description": "List of available timezones", + "example": { + "timezones": { + "timezone": [ + "UTC", + "Europe/Helsinki", + "America/New_York" + ] + } + } + }, + "timezoneError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "accountTokensCreateTokenRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "properties": { + "expires_in": {} + }, + "required": [ + "expires_at" + ] + }, + { + "properties": { + "expires_at": {} + }, + "required": [ + "expires_in" + ] + } + ], + "examples": [ + { + "name": "token", + "expires_at": "2025-11-30T08:03:15.944Z", + "can_create_tokens": true, + "gui": false, + "allowed_ip_ranges": [ + "0.0.0.0/0", + "::/0" + ] + }, + { + "name": "token", + "expires_in": "1h30min", + "can_create_tokens": true, + "gui": false, + "allowed_ip_ranges": [ + "0.0.0.0/0", + "::/0" + ] + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "my first token" + ], + "maxLength": 1024, + "minLength": 1, + "description": "The name of the token. Does not need to be unique." + }, + "expires_at": { + "type": "string", + "format": "date-time", + "description": "The requested expiry time of the token, in RFC3339 format (2025-10-12T07:20:50.52Z). Needs to be in the future and maximum of 1 year in the future." + }, + "expires_in": { + "type": "string", + "examples": [ + "8760h", + "720h", + "24h", + "1h30m", + "15m" + ], + "description": "The requested duration until expiry of the token, e.g. '1h30min'. Needs to be a positive duration and maximum of 1 year. Can be used instead of `expires_at`. Supported units are 'h' for hours, 'm' for minutes and 's' for seconds." + }, + "can_create_tokens": { + "type": "boolean", + "description": "Whether the token can create other tokens.", + "default": false + }, + "gui": { + "type": "boolean", + "description": "Token is for internal GUI use. Can not be used externally.", + "default": false + }, + "allowed_ip_ranges": { + "type": "array", + "examples": [ + [ + "0.0.0.0/0", + "::/0" + ] + ], + "items": { + "$ref": "#/components/schemas/accountTokensIpRange" + }, + "maxItems": 100, + "uniqueItems": true, + "description": "List of IP ranges that are allowed to authenticate with the token. Empty list denies access from everywhere. If unset, the default list will be the IP filters of the account. If no IP filters are defined for the account either, the default will be [\"0.0.0.0/0\", \"::/0\"], i.e. allow from any address." + } + }, + "required": [ + "name" + ], + "additionalProperties": false + }, + "accountTokensIpRange": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "1.2.3.4", + "2001:db8::1", + "0.0.0.0/0", + "::/0", + "0.0.0.0-0.0.0.255", + "2001:db8::1-2001:db8::ff" + ], + "title": "IP Range", + "description": "IP range from where to accept the token" + }, + "accountTokensToken": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/accountTokensUuidOfTheToken" + }, + "name": { + "type": "string", + "examples": [ + "my first token" + ], + "maxLength": 1024, + "minLength": 1, + "description": "The name of the token. Does not need to be unique." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Token creation time.", + "example": "2025-11-30T08:03:15.944Z" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "description": "The requested expiry time of the token, in RFC3339 format (2025-10-12T07:20:50.52Z). Needs to be in the future and maximum of 1 year in the future.", + "example": "2025-11-30T08:03:15.944Z" + }, + "last_used_at": { + "type": "string", + "format": "date-time", + "description": "The last time the token was used.", + "example": "2025-11-30T08:03:15.944Z" + }, + "can_create_tokens": { + "type": "boolean", + "description": "Whether the token can create other tokens.", + "default": false, + "example": false + }, + "gui": { + "type": "boolean", + "description": "Token is for internal GUI use. Can not be used externally.", + "default": false, + "example": false + }, + "allowed_ip_ranges": { + "type": "array", + "items": { + "$ref": "#/components/schemas/accountTokensIpRange" + }, + "maxItems": 100, + "uniqueItems": true, + "description": "List of IP ranges that are allowed to authenticate with the token. Empty list denies access from everywhere. If unset, the default list will be the IP filters of the account. If no IP filters are defined for the account either, the default will be [\"0.0.0.0/0\", \"::/0\"], i.e. allow from any address.", + "example": [ + "0.0.0.0/0", + "::/0" + ] + } + }, + "title": "Token", + "additionalProperties": false, + "description": "A token." + }, + "accountTokensUuidOfTheToken": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "e7b3f8a0-4c2d-11ec-bf63-0242ac130002", + "e7b3f8a0-4c2d-11ec-bf63-0242ac130003", + "e7b3f8a0-4c2d-11ec-bf63-0242ac130004" + ], + "title": "UUID of the token", + "format": "uuid", + "description": "UUID of the token" + }, + "accountTokensProblem400": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_BAD_REQUEST", + "title": "Bad request.", + "detail": "Invalid parameters.", + "invalid_params": [ + { + "name": "expires_at", + "reason": "Token expiration time must be in the future." + } + ], + "correlation_id": "01JQV2ETY2K6HHE1KZFY9E1CYC", + "status": 400 + } + ], + "properties": { + "type": { + "type": "string", + "format": "uri", + "description": "A URI reference that uniquely identifies the problem type only in the context of the provided API. It is neither recommended to be dereferenceable and point to a human-readable documentation nor globally unique for the problem type.", + "const": "https://developers.upcloud.com/1.3/errors#ERROR_BAD_REQUEST" + }, + "title": { + "type": "string", + "examples": [ + "Bad request." + ], + "description": "A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized." + }, + "detail": { + "type": "string", + "examples": [ + "Invalid parameters." + ], + "description": "A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized." + }, + "status": { + "type": "integer", + "format": "int32", + "enum": [ + 400 + ], + "description": "The HTTP status code generated by the origin server for this occurrence of the problem." + }, + "invalid_params": { + "type": "array", + "examples": [ + [ + { + "name": "expires_at", + "reason": "Token expiration time must be in the future." + } + ] + ], + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "name", + "reason" + ] + } + }, + "correlation_id": { + "type": "string", + "examples": [ + "01JQV2ETY2K6HHE1KZFY9E1CYC" + ], + "description": "A unique identifier for the request. This identifier is generated by the server and can be used to track the request in the server logs. It is useful for debugging and support purposes." + } + }, + "required": [ + "type", + "title", + "status" + ], + "additionalProperties": false, + "description": "JSON Problem Details for HTTP APIs" + }, + "accountTokensProblem401": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_UNAUTHORIZED", + "title": "Unauthorized.", + "detail": "Access denied.", + "correlation_id": "01JQV2ETY2K6HHE1KZFY9E1CYC", + "status": 401 + } + ], + "properties": { + "type": { + "type": "string", + "format": "uri", + "description": "A URI reference that uniquely identifies the problem type only in the context of the provided API. It is neither recommended to be dereferenceable and point to a human-readable documentation nor globally unique for the problem type.", + "const": "https://developers.upcloud.com/1.3/errors#ERROR_UNAUTHORIZED" + }, + "title": { + "type": "string", + "examples": [ + "Unauthorized." + ], + "description": "A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized." + }, + "detail": { + "type": "string", + "examples": [ + "Invalid parameters." + ], + "description": "A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized." + }, + "status": { + "type": "integer", + "format": "int32", + "enum": [ + 401 + ], + "description": "The HTTP status code generated by the origin server for this occurrence of the problem." + }, + "invalid_params": { + "type": "array", + "examples": [ + [ + { + "name": "expires_at", + "reason": "Token expiration time must be in the future." + } + ] + ], + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "name", + "reason" + ] + } + }, + "correlation_id": { + "type": "string", + "examples": [ + "01JQV2ETY2K6HHE1KZFY9E1CYC" + ], + "description": "A unique identifier for the request. This identifier is generated by the server and can be used to track the request in the server logs. It is useful for debugging and support purposes." + } + }, + "required": [ + "type", + "title", + "status" + ], + "additionalProperties": false, + "description": "JSON Problem Details for HTTP APIs" + }, + "accountTokensProblem403": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_FORBIDDEN", + "title": "Bad request.", + "detail": "Invalid parameters.", + "correlation_id": "01JQV2ETY2K6HHE1KZFY9E1CYC", + "status": 403 + } + ], + "properties": { + "type": { + "type": "string", + "format": "uri", + "description": "A URI reference that uniquely identifies the problem type only in the context of the provided API. It is neither recommended to be dereferenceable and point to a human-readable documentation nor globally unique for the problem type.", + "const": "https://developers.upcloud.com/1.3/errors#ERROR_FORBIDDEN" + }, + "title": { + "type": "string", + "examples": [ + "Bad request." + ], + "description": "A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized." + }, + "detail": { + "type": "string", + "examples": [ + "Invalid parameters." + ], + "description": "A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized." + }, + "status": { + "type": "integer", + "format": "int32", + "enum": [ + 403 + ], + "description": "The HTTP status code generated by the origin server for this occurrence of the problem." + }, + "invalid_params": { + "type": "array", + "examples": [ + [ + { + "name": "expires_at", + "reason": "Token expiration time must be in the future." + } + ] + ], + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "name", + "reason" + ] + } + }, + "correlation_id": { + "type": "string", + "examples": [ + "01JQV2ETY2K6HHE1KZFY9E1CYC" + ], + "description": "A unique identifier for the request. This identifier is generated by the server and can be used to track the request in the server logs. It is useful for debugging and support purposes." + } + }, + "required": [ + "type", + "title", + "status" + ], + "additionalProperties": false, + "description": "JSON Problem Details for HTTP APIs" + }, + "accountTokensProblem409": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_SERVICE_UNAVAILABLE", + "title": "Service unavailable.", + "detail": "Try again later.", + "correlation_id": "01JQV2ETY2K6HHE1KZFY9E1CYC", + "status": 409 + } + ], + "properties": { + "type": { + "type": "string", + "format": "uri", + "description": "A URI reference that uniquely identifies the problem type only in the context of the provided API. It is neither recommended to be dereferenceable and point to a human-readable documentation nor globally unique for the problem type.", + "const": "https://developers.upcloud.com/1.3/errors#ERROR_SERVICE_UNAVAILABLE" + }, + "title": { + "type": "string", + "examples": [ + "Service unavailable." + ], + "description": "A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized." + }, + "detail": { + "type": "string", + "examples": [ + "Invalid parameters." + ], + "description": "A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized." + }, + "status": { + "type": "integer", + "format": "int32", + "enum": [ + 400 + ], + "description": "The HTTP status code generated by the origin server for this occurrence of the problem." + }, + "invalid_params": { + "type": "array", + "examples": [ + [ + { + "name": "expires_at", + "reason": "Token expiration time must be in the future." + } + ] + ], + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "name", + "reason" + ] + } + }, + "correlation_id": { + "type": "string", + "examples": [ + "01JQV2ETY2K6HHE1KZFY9E1CYC" + ], + "description": "A unique identifier for the request. This identifier is generated by the server and can be used to track the request in the server logs. It is useful for debugging and support purposes." + } + }, + "required": [ + "type", + "title", + "status" + ], + "additionalProperties": false, + "description": "JSON Problem Details for HTTP APIs" + }, + "accountTokensProblem": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "type": "https://developers.upcloud.com/1.3/errors#INTERNAL_SERVER_ERROR", + "title": "Internal server error.", + "detail": "Internal server error.", + "invalid_params": [ + { + "name": "expires_at", + "reason": "Token expiration time must be in the future." + } + ], + "correlation_id": "01JQV2ETY2K6HHE1KZFY9E1CYC", + "status": 500 + } + ], + "properties": { + "type": { + "type": "string", + "examples": [ + "https://developers.upcloud.com/1.3/errors#INTERNAL_SERVER_ERROR" + ], + "format": "uri", + "description": "A URI reference that uniquely identifies the problem type only in the context of the provided API. It is neither recommended to be dereferenceable and point to a human-readable documentation nor globally unique for the problem type." + }, + "title": { + "type": "string", + "examples": [ + "Internal server error." + ], + "description": "A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized." + }, + "detail": { + "type": "string", + "examples": [ + "Invalid parameters." + ], + "description": "A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized." + }, + "status": { + "type": "integer", + "maximum": 599, + "minimum": 200, + "format": "int32", + "description": "The HTTP status code generated by the origin server for this occurrence of the problem." + }, + "invalid_params": { + "type": "array", + "examples": [ + [ + { + "name": "expires_at", + "reason": "Token expiration time must be in the future." + } + ] + ], + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "name", + "reason" + ] + } + }, + "correlation_id": { + "type": "string", + "examples": [ + "01JQV2ETY2K6HHE1KZFY9E1CYC" + ], + "description": "A unique identifier for the request. This identifier is generated by the server and can be used to track the request in the server logs. It is useful for debugging and support purposes." + } + }, + "required": [ + "type", + "title", + "status" + ], + "additionalProperties": false, + "description": "JSON Problem Details for HTTP APIs" + }, + "accountTokensListTokensResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/accountTokensToken" + }, + "title": "List Tokens Response", + "description": "Paged list of tokens.", + "example": [ + { + "id": "0c848138-2559-4562-9520-b1f22c4ae751", + "name": "token", + "created_at": "2025-03-25T13:46:19.502878Z", + "expires_at": "2025-03-25T14:16:19.502644Z", + "can_create_tokens": true, + "allowed_ip_ranges": [ + "1.2.3.4" + ], + "gui": false + }, + { + "id": "0cc50c9d-6a81-494b-af8c-f7271cfd4d22", + "name": "token", + "created_at": "2025-03-25T14:12:06.534789Z", + "expires_at": "2025-03-25T14:42:06.534342Z", + "last_used_at": "2025-03-25T14:12:33.000692Z", + "can_create_tokens": true, + "allowed_ip_ranges": [ + "1.2.3.4" + ], + "gui": false + } + ] + }, + "accountTokensGetTokenResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "id": { + "$ref": "#/components/schemas/accountTokensUuidOfTheToken" + }, + "name": { + "type": "string", + "examples": [ + "my first token" + ], + "maxLength": 1024, + "minLength": 1, + "description": "The name of the token. Does not need to be unique." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Token creation time.", + "example": "2025-11-30T08:03:15.944Z" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "description": "The requested expiry time of the token, in RFC3339 format (2025-10-12T07:20:50.52Z). Needs to be in the future and maximum of 1 year in the future.", + "example": "2025-11-30T08:03:15.944Z" + }, + "last_used_at": { + "type": "string", + "format": "date-time", + "description": "The last time the token was used.", + "example": "2025-11-30T08:03:15.944Z" + }, + "can_create_tokens": { + "type": "boolean", + "description": "Whether the token can create other tokens.", + "default": false, + "example": false + }, + "gui": { + "type": "boolean", + "description": "Token is for internal GUI use. Can not be used externally.", + "default": false, + "example": false + }, + "allowed_ip_ranges": { + "type": "array", + "items": { + "$ref": "#/components/schemas/accountTokensIpRange" + }, + "maxItems": 100, + "uniqueItems": true, + "description": "List of IP ranges that are allowed to authenticate with the token. Empty list denies access from everywhere. If unset, the default list will be the IP filters of the account. If no IP filters are defined for the account either, the default will be [\"0.0.0.0/0\", \"::/0\"], i.e. allow from any address.", + "example": [ + "0.0.0.0/0", + "::/0" + ] + } + }, + "title": "Get Token Response", + "additionalProperties": false, + "description": "A token.", + "example": { + "id": "0c848138-2559-4562-9520-b1f22c4ae751", + "name": "token", + "token_type": "workspace", + "created_at": "2025-03-25T13:46:19.502878Z", + "expires_at": "2025-03-25T14:16:19.502644Z", + "can_create_tokens": true, + "allowed_ip_ranges": [ + "1.2.3.4" + ], + "gui": false + } + }, + "accountTokensProblem404": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_NOT_FOUND", + "title": "Not found.", + "detail": "User not found.", + "correlation_id": "01JQV2ETY2K6HHE1KZFY9E1CYC", + "status": 404 + } + ], + "properties": { + "type": { + "type": "string", + "format": "uri", + "description": "A URI reference that uniquely identifies the problem type only in the context of the provided API. It is neither recommended to be dereferenceable and point to a human-readable documentation nor globally unique for the problem type.", + "const": "https://developers.upcloud.com/1.3/errors#ERROR_NOT_FOUND" + }, + "title": { + "type": "string", + "examples": [ + "Not found." + ], + "description": "A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized." + }, + "detail": { + "type": "string", + "examples": [ + "Invalid parameters." + ], + "description": "A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized." + }, + "status": { + "type": "integer", + "format": "int32", + "enum": [ + 404 + ], + "description": "The HTTP status code generated by the origin server for this occurrence of the problem." + }, + "invalid_params": { + "type": "array", + "examples": [ + [ + { + "name": "expires_at", + "reason": "Token expiration time must be in the future." + } + ] + ], + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "name", + "reason" + ] + } + }, + "correlation_id": { + "type": "string", + "examples": [ + "01JQV2ETY2K6HHE1KZFY9E1CYC" + ], + "description": "A unique identifier for the request. This identifier is generated by the server and can be used to track the request in the server logs. It is useful for debugging and support purposes." + } + }, + "required": [ + "type", + "title", + "status" + ], + "additionalProperties": false, + "description": "JSON Problem Details for HTTP APIs" + }, + "objectStorage2QueryParamLimit": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "examples": [ + 10, + 25, + 50, + 100 + ], + "title": "QueryParamLimit", + "maximum": 100, + "minimum": 0, + "description": "Schema for a query parameter specifying the maximum number of entries to return (limit).", + "default": 10 + }, + "objectStorage2QueryParamOffset": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "examples": [ + 0, + 10, + 20, + 50 + ], + "title": "QueryParamOffset", + "minimum": 0, + "description": "Schema for a query parameter specifying the offset for pagination.", + "default": 0 + }, + "objectStorage2QueryParamSort": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "-created_at", + "service_name", + "-region_name" + ], + "title": "QueryParamSort", + "enum": [ + "created_at", + "-created_at", + "service_name", + "-service_name", + "operational_state", + "-operational_state", + "region_name", + "-region_name" + ], + "description": "Schema for a query parameter specifying the sort field and direction. Prefix with '-' for descending order." + }, + "objectStorage2ServiceUUID": { + "type": "string", + "examples": [ + "01234567-89ab-cdef-0123-456789abcdef", + "fedcba98-7654-3210-fedc-ba9876543210" + ], + "title": "ServiceUUID", + "format": "uuid", + "description": "The unique identifier for the service." + }, + "objectStorage2QueryParamForce": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "boolean", + "examples": [ + true, + false + ], + "title": "QueryParamForce", + "description": "Schema for a query parameter specifying whether to force an operation.", + "default": false + }, + "objectStorage2Name": { + "type": "string", + "examples": [ + "my-object-storage", + "fi-hel1", + "example-service", + "test-bucket", + "backup-storage" + ], + "title": "Name", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "A resource name." + }, + "objectStorage2CustomDomainName": { + "type": "string", + "examples": [ + "example.com", + "objects.example.com" + ], + "title": "CustomDomainName", + "format": "hostname", + "description": "A valid hostname for the custom domain. Supports both apex domains (example.com) and subdomains (objects.example.com)." + }, + "objectStorage2QueryParamTimestamp": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "2024-01-01T00:00:00Z", + "2024-12-31T23:59:59Z" + ], + "title": "QueryParamTimestamp", + "format": "date-time", + "description": "Schema for a query parameter specifying a timestamp.", + "example": "2024-01-01T00:00:00Z" + }, + "objectStorage2QueryParamInterval": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "1h", + "1d", + "1w", + "1m" + ], + "title": "QueryParamInterval", + "description": "Schema for a query parameter specifying the time interval.", + "default": "1h" + }, + "objectStorage2LabelKey": { + "type": "string", + "examples": [ + "environment", + "team", + "project", + "purpose", + "cost-center" + ], + "title": "LabelKey", + "maxLength": 32, + "minLength": 2, + "pattern": "^[\\x20-\\x5E\\x60-\\x7E][\\x20-\\x7E]+$", + "description": "The key of a label." + }, + "objectStorage2AccessKeyID": { + "type": "string", + "examples": [ + "UCK1234567890ABCDEF", + "UCK9876543210FEDCBA" + ], + "title": "AccessKeyID", + "description": "The public identifier for an access key." + }, + "objectStorage2TagKey": { + "type": "string", + "examples": [ + "environment", + "team", + "project", + "purpose", + "cost-center", + "data-classification" + ], + "title": "TagKey", + "maxLength": 128, + "minLength": 1, + "description": "The key of a tag." + }, + "objectStorage2PolicyVersionID": { + "type": "string", + "examples": [ + "v1", + "v2", + "v3", + "v4" + ], + "title": "PolicyVersionID", + "description": "The version identifier of a policy (e.g., v1, v2)." + }, + "objectStorage2ServiceCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "example-service", + "region": "example", + "configured_status": "started", + "networks": [ + { + "name": "example-public-network", + "type": "public", + "family": "IPv4" + }, + { + "name": "example-private-network", + "uuid": "03aa7245-2ff9-49c8-9f0e-7ca0270d71a4", + "type": "private", + "family": "IPv4" + } + ] + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "example-service" + ], + "maxLength": 64, + "minLength": 1 + }, + "region": { + "$ref": "#/components/schemas/objectStorage2Name" + }, + "configured_status": { + "$ref": "#/components/schemas/objectStorage2PropertyConfiguredStatus" + }, + "networks": { + "type": "array", + "examples": [ + [ + { + "name": "example-public-network", + "type": "public", + "family": "IPv4" + } + ] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2NetworkCreate" + }, + "maxItems": 8, + "description": "Networks to attach to the service. Private networks must reside in the same region as the object storage." + }, + "custom_domains": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2CustomDomainCreate" + }, + "maxItems": 5, + "description": "Custom domains to attach to the service." + }, + "labels": { + "type": "array", + "examples": [ + [ + { + "key": "environment", + "value": "production" + } + ] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2LabelCreate" + }, + "maxItems": 255, + "description": "Labels for classifying the service." + }, + "properties": { + "$ref": "#/components/schemas/objectStorage2PropertiesCreate" + }, + "termination_protection": { + "type": "boolean", + "description": "Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first.", + "default": false, + "example": false + } + }, + "title": "ServiceCreate", + "required": [ + "name", + "region", + "configured_status" + ], + "additionalProperties": false, + "description": "Schema for creating a service, including name, region, status, networks, domains, labels, and properties." + }, + "objectStorage2PropertyConfiguredStatus": { + "type": "string", + "examples": [ + "started", + "stopped" + ], + "title": "PropertyConfiguredStatus", + "enum": [ + "started", + "stopped" + ], + "description": "Schema for the configured status of a property." + }, + "objectStorage2NetworkCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "example-public-network", + "type": "public", + "family": "IPv4" + }, + { + "name": "example-private-network", + "uuid": "03bec0ad-85c3-459e-824d-710f8f24f740", + "type": "private", + "family": "IPv4" + } + ], + "properties": { + "uuid": { + "type": "string", + "format": "uuid", + "description": "Private network uuid. Omit for public networks.", + "example": "03bec0ad-85c3-459e-824d-710f8f24f740" + }, + "name": { + "$ref": "#/components/schemas/objectStorage2Name" + }, + "type": { + "$ref": "#/components/schemas/objectStorage2NetworkType" + }, + "family": { + "$ref": "#/components/schemas/objectStorage2NetworkFamily" + } + }, + "title": "NetworkCreate", + "required": [ + "name", + "type", + "family" + ], + "additionalProperties": false, + "description": "Schema for creating a network with optional private UUID, name, type, and family." + }, + "objectStorage2NetworkType": { + "type": "string", + "examples": [ + "public", + "private" + ], + "title": "NetworkType", + "enum": [ + "public", + "private" + ], + "description": "Enum for the network type, indicating whether the network is public or private." + }, + "objectStorage2NetworkFamily": { + "type": "string", + "examples": [ + "IPv4", + "IPv6" + ], + "title": "NetworkFamily", + "enum": [ + "IPv4", + "IPv6" + ], + "description": "Enum for the network family, indicating the type of IP address used." + }, + "objectStorage2CustomDomainCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "type": "public", + "domain_name": "example.com" + }, + { + "type": "public", + "domain_name": "objects.example.com" + }, + { + "type": "public", + "mode": "static-website", + "domain_name": "static.example.com" + } + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "public", + "private" + ], + "description": "Type of the custom domain. At the moment only public is accepted.", + "example": "public" + }, + "mode": { + "type": "string", + "enum": [ + "api", + "static-website" + ], + "description": "Purpose of the domain. 'api' for S3 API access (creates base URL), 'static-website' for static website hosting (no base URL). Cannot be changed after creation.", + "default": "api", + "example": "api" + }, + "domain_name": { + "type": "string", + "maxLength": 254, + "minLength": 1, + "format": "hostname", + "description": "Custom domain to be added. Supports both apex domains (example.com) and subdomains (objects.example.com).", + "example": "example.com" + } + }, + "title": "CustomDomainCreate", + "required": [ + "type", + "domain_name" + ], + "additionalProperties": false, + "description": "Schema for creating a custom domain." + }, + "objectStorage2LabelCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "foo", + "value": "bar" + } + ], + "properties": { + "key": { + "$ref": "#/components/schemas/objectStorage2LabelKey" + }, + "value": { + "$ref": "#/components/schemas/objectStorage2LabelValue" + } + }, + "title": "LabelCreate", + "required": [ + "key", + "value" + ], + "additionalProperties": false, + "description": "Schema for creating a label with a key-value pair." + }, + "objectStorage2LabelValue": { + "type": [ + "string", + "null" + ], + "examples": [ + "production", + "backend", + "web-app", + "backup", + "engineering" + ], + "title": "LabelValue", + "maxLength": 255, + "pattern": "\\A[\\p{L}\\p{N}\\p{P}\\p{S}\\p{M}\\p{Z}]*\\z", + "description": "Schema for a label value property, allowing a string or null with specific character constraints." + }, + "objectStorage2PropertiesCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "access_control_origin_override": "https://mycompany.com" + } + ], + "properties": { + "access_control_origin_override": { + "type": "string", + "maxLength": 255, + "example": "https://mycompany.com" + } + }, + "title": "PropertiesCreate", + "additionalProperties": false, + "description": "Schema for creating properties with an optional access control origin override." + }, + "objectStorage2ServiceReplace": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "example-service", + "configured_status": "started", + "networks": [ + { + "name": "example-public-network", + "type": "public", + "family": "IPv4" + }, + { + "name": "example-private-network", + "uuid": "03aa7245-2ff9-49c8-9f0e-7ca0270d71a4", + "type": "private", + "family": "IPv4" + } + ], + "labels": [ + { + "key": "example-label-key", + "value": "example-label-value" + } + ] + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "description": "The name of the service.", + "example": "example-service" + }, + "configured_status": { + "$ref": "#/components/schemas/objectStorage2PropertyConfiguredStatus" + }, + "termination_protection": { + "type": "boolean", + "description": "Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first.", + "default": false, + "example": false + }, + "networks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2NetworkCreate" + }, + "maxItems": 8 + }, + "custom_domains": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2CustomDomainCreate" + }, + "maxItems": 5 + }, + "static_websites": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/objectStorage2StaticWebsiteConfigCreate" + }, + "description": "Static website configurations for this service. Array replaces all existing configurations." + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2LabelCreate" + }, + "maxItems": 255 + }, + "properties": { + "$ref": "#/components/schemas/objectStorage2PropertiesCreate" + } + }, + "title": "ServiceReplace", + "required": [ + "name", + "configured_status" + ], + "additionalProperties": false, + "description": "Schema for replacing a service, including name, status, networks, domains, labels, and properties." + }, + "objectStorage2StaticWebsiteConfigCreate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "domain_name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "description": "Custom domain to use for static website hosting. Must be a custom domain attached to the service. If omitted, the primary static website domain is used.", + "example": "www.example.com" + }, + "bucket_name": { + "type": "string", + "maxLength": 254, + "minLength": 1, + "pattern": "^[a-zA-Z0-9.\\-_]+$", + "description": "Name of the S3/ECS bucket containing the website content. Only alphanumerics, dots, hyphens, and underscores are allowed.", + "example": "my-website" + }, + "bucket_prefix": { + "type": "string", + "maxLength": 1024, + "pattern": "^[a-zA-Z0-9/.\\-_]*$", + "description": "Optional prefix/subfolder within the bucket. Only alphanumerics, slashes, dots, hyphens, and underscores are allowed.", + "default": "", + "example": "v2/" + }, + "index_document": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "pattern": "^[a-zA-Z0-9/.\\-_]+$", + "description": "Default document for directories. Only alphanumerics, slashes, dots, hyphens, and underscores are allowed.", + "default": "index.html", + "example": "index.html" + }, + "spa_mode": { + "type": [ + "boolean", + "null" + ], + "description": "Enable Single Page Application (SPA) mode. When enabled, all non-file routes serve the index document, allowing client-side routing to handle the URL. Essential for React, Vue, Next.js, and similar frameworks.", + "default": false, + "example": false + }, + "enabled": { + "type": "boolean", + "description": "Whether the static website configuration should be active. Defaults to true if not specified.", + "default": true, + "example": true + }, + "error_pages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2StaticWebsiteErrorPage" + }, + "maxItems": 25, + "description": "Custom error page configurations for specific HTTP status codes or ranges", + "example": [ + { + "status_code": 404, + "error_document": "errors/404.html" + }, + { + "status_range": { + "start": 500, + "end": 599 + }, + "error_document": "errors/5xx.html" + } + ] + } + }, + "title": "StaticWebsiteConfigCreate", + "required": [ + "bucket_name" + ], + "additionalProperties": false, + "description": "Request body for creating a static website configuration. If domain is omitted, the primary static website domain is used." + }, + "objectStorage2StaticWebsiteErrorPage": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "oneOf": [ + { + "required": [ + "status_code" + ] + }, + { + "required": [ + "status_range" + ] + } + ], + "properties": { + "status_code": { + "type": "integer", + "examples": [ + 403, + 404, + 500 + ], + "maximum": 599, + "minimum": 400, + "description": "Single HTTP status code to match (must be within 4xx or 5xx)." + }, + "status_range": { + "type": "object", + "examples": [ + { + "start": 400, + "end": 499 + }, + { + "start": 500, + "end": 599 + } + ], + "properties": { + "start": { + "type": "integer", + "maximum": 599, + "minimum": 400, + "description": "Inclusive lower bound of the HTTP status range (must be within 4xx or 5xx)." + }, + "end": { + "type": "integer", + "maximum": 599, + "minimum": 400, + "description": "Inclusive upper bound of the HTTP status range (must be within 4xx or 5xx)." + } + }, + "required": [ + "start", + "end" + ], + "additionalProperties": false, + "description": "Inclusive HTTP status code range to match (for example 4xx or 5xx blocks)." + }, + "error_document": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "pattern": "^[^/].*", + "description": "Path to the custom error page document relative to the bucket root (e.g., '404.html', 'errors/404.html'). Must not start with '/'.", + "example": "404.html" + } + }, + "title": "Static Website Error Page", + "required": [ + "error_document" + ], + "additionalProperties": false, + "description": "Custom error page configuration for specific HTTP status codes or ranges" + }, + "objectStorage2ServiceModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "example-service", + "configured_status": "started", + "networks": [ + { + "name": "example-private-network", + "uuid": "03aa7245-2ff9-49c8-9f0e-7ca0270d71a4", + "type": "private", + "family": "IPv4" + } + ], + "labels": null + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "example": "example-service" + }, + "configured_status": { + "$ref": "#/components/schemas/objectStorage2PropertyConfiguredStatus" + }, + "networks": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/objectStorage2NetworkCreate" + }, + "maxItems": 8 + }, + "custom_domains": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/objectStorage2CustomDomainCreate" + }, + "maxItems": 5 + }, + "static_websites": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/objectStorage2StaticWebsiteConfigCreate" + }, + "description": "Static website configurations for this service. Array replaces all existing configurations." + }, + "labels": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/objectStorage2LabelCreate" + }, + "maxItems": 255 + }, + "properties": { + "$ref": "#/components/schemas/objectStorage2PropertiesCreate" + }, + "termination_protection": { + "type": "boolean", + "description": "Enables or disables termination protection for the service. When enabled, the service cannot be deleted or powered down unless this is disabled first.", + "example": false + } + }, + "title": "ServiceModify", + "additionalProperties": false, + "description": "Schema for modifying a service, including name, status, networks, domains, labels, and properties." + }, + "objectStorage2CustomDomainModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "type": "public", + "domain_name": "example.com" + } + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "public", + "private" + ], + "description": "Type of the custom domain." + }, + "domain_name": { + "type": "string", + "maxLength": 254, + "minLength": 1, + "format": "hostname", + "description": "New modified custom domain. Supports both apex domains (example.com) and subdomains (objects.example.com)." + } + }, + "title": "CustomDomainModify", + "additionalProperties": false, + "description": "Schema for modifying a custom domain." + }, + "objectStorage2BucketCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "my-bucket-1" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 254, + "minLength": 1, + "pattern": "^[a-zA-Z0-9.\\-_]{1,254}$", + "description": "Must be unique within the service, and should contain only alphanumeric, .,- and _.", + "example": "my-bucket-1" + } + }, + "title": "BucketCreate", + "required": [ + "name" + ], + "additionalProperties": false, + "description": "Schema for creating a new bucket. " + }, + "objectStorage2LabelModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "foo", + "value": "bar" + } + ], + "properties": { + "key": { + "$ref": "#/components/schemas/objectStorage2LabelKey" + }, + "value": { + "$ref": "#/components/schemas/objectStorage2LabelValue" + } + }, + "title": "LabelModify", + "additionalProperties": false, + "description": "Schema for modifying a label with a key-value pair." + }, + "objectStorage2StaticWebsiteConfigModify": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "bucket_name": { + "type": "string", + "maxLength": 254, + "minLength": 1, + "pattern": "^[a-zA-Z0-9.\\-_]+$", + "description": "Name of the S3/ECS bucket containing the website content. Only alphanumerics, dots, hyphens, and underscores are allowed.", + "example": "my-website" + }, + "bucket_prefix": { + "type": "string", + "maxLength": 1024, + "pattern": "^[a-zA-Z0-9/.\\-_]*$", + "description": "Optional prefix/subfolder within the bucket. Only alphanumerics, slashes, dots, hyphens, and underscores are allowed.", + "example": "v2/" + }, + "index_document": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "pattern": "^[a-zA-Z0-9/.\\-_]+$", + "description": "Default document for directories. Only alphanumerics, slashes, dots, hyphens, and underscores are allowed.", + "example": "index.html" + }, + "spa_mode": { + "type": [ + "boolean", + "null" + ], + "description": "Enable Single Page Application (SPA) mode. When enabled, all non-file routes serve the index document, allowing client-side routing to handle the URL. Essential for React, Vue, Next.js, and similar frameworks.", + "example": true + }, + "enabled": { + "type": "boolean", + "description": "Whether the static website configuration should be active", + "example": false + }, + "error_pages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2StaticWebsiteErrorPage" + }, + "maxItems": 25, + "description": "Custom error page configurations for specific HTTP status codes or ranges. Replaces the entire set when provided.", + "example": [ + { + "status_code": 404, + "error_document": "errors/404.html" + }, + { + "status_range": { + "start": 500, + "end": 599 + }, + "error_document": "errors/5xx.html" + } + ] + } + }, + "title": "StaticWebsiteConfigModify", + "additionalProperties": false, + "description": "Request body for updating a static website configuration" + }, + "objectStorage2UserCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "username": "example_user" + } + ], + "properties": { + "username": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "[\\w+=,.@-]+", + "description": "The name of the user to create.", + "example": "example_user" + } + }, + "title": "UserCreate", + "required": [ + "username" + ], + "additionalProperties": false, + "description": "Schema for creating a new user." + }, + "objectStorage2AccessKeyModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "status": "Inactive" + } + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive" + ], + "description": "Indicates if the key is active or inactive.", + "example": "Inactive" + } + }, + "title": "AccessKeyModify", + "additionalProperties": false, + "description": "Schema for modifying an access key." + }, + "objectStorage2PolicyAttachmentCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "test-policy" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 128, + "minLength": 1, + "pattern": "^[a-zA-Z0-9+=,.@_\\- ]+$", + "description": "Name of the policy to attach.", + "example": "test-policy" + } + }, + "title": "PolicyAttachmentCreate", + "required": [ + "name" + ], + "additionalProperties": false, + "description": "Schema for creating a policy attachment." + }, + "objectStorage2InlinePolicyCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "ECSS3FullAccess", + "document": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Resource\":\"*\"}]}" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 128, + "minLength": 1, + "description": "Name of the inline policy.", + "example": "ECSS3FullAccess" + }, + "document": { + "type": "string", + "maxLength": 6144, + "minLength": 1, + "description": "A valid policy document.", + "example": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Resource\":\"*\"}]}" + } + }, + "title": "InlinePolicyCreate", + "required": [ + "name", + "document" + ], + "description": "Schema for creating an inline policy." + }, + "objectStorage2TagListRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "key": "environment", + "value": "production" + }, + { + "key": "team", + "value": "backend" + } + ] + ], + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "environment" + }, + "value": { + "type": "string", + "example": "production" + } + }, + "title": "TagListRequest", + "required": [ + "key", + "value" + ] + }, + "title": "TagListRequest", + "description": "Schema for a list of tags to apply to a resource." + }, + "objectStorage2PermissionsBoundaryCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "policy_name": "sample-policy" + } + ], + "properties": { + "policy_name": { + "type": "string", + "maxLength": 128, + "minLength": 1, + "description": "Name of the policy to use as the permissions boundary.", + "example": "sample-policy" + } + }, + "title": "PermissionsBoundaryCreate", + "required": [ + "policy_name" + ], + "description": "Schema for creating a permissions boundary with a specified policy name." + }, + "objectStorage2PolicyVersionCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "document": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"*\"],\"Effect\":\"Deny\",\"Resource\":\"*\"}]}", + "is_default": true + } + ], + "properties": { + "document": { + "type": "string", + "maxLength": 6144, + "minLength": 1, + "description": "A valid, URL-encoded policy document.", + "example": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"*\"],\"Effect\":\"Deny\",\"Resource\":\"*\"}]}" + }, + "is_default": { + "type": "boolean", + "description": "Set this version as the default.", + "default": false + } + }, + "title": "PolicyVersionCreate", + "required": [ + "is_default", + "document" + ], + "additionalProperties": false, + "description": "Schema for creating a new version of a policy." + }, + "objectStorage2PolicySetDefaultVersion": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "version_id": "v2" + } + ], + "properties": { + "version_id": { + "type": "string", + "description": "The policy version ID to set as default.", + "example": "v2" + } + }, + "title": "PolicySetDefaultVersion", + "required": [ + "version_id" + ], + "description": "Schema for setting a default version of a policy." + }, + "objectStorage2PolicyCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "example-policy", + "description": "example-description", + "document": "%7B%22Version%22%3A%20%222012-10-17%22%2C%20%20%22Statement%22%3A%20%5B%7B%22Action%22%3A%20%5B%22iam%3AGetUser%22%5D%2C%20%22Resource%22%3A%20%22%2A%22%2C%20%22Effect%22%3A%20%22Allow%22%2C%20%22Sid%22%3A%20%22editor%22%7D%5D%7D" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 128, + "minLength": 1, + "pattern": "[\\w+=,.@-]+", + "description": "Unique name of the policy.", + "example": "example-policy" + }, + "description": { + "type": "string", + "maxLength": 1000, + "minLength": 1, + "description": "The policy description.", + "example": "example-description" + }, + "document": { + "type": "string", + "maxLength": 6144, + "minLength": 1, + "description": "A valid, URL-encoded policy document.", + "example": "%7B%22Version%22%3A%20%222012-10-17%22%2C%20%20%22Statement%22%3A%20%5B%7B%22Action%22%3A%20%5B%22iam%3AGetUser%22%5D%2C%20%22Resource%22%3A%20%22%2A%22%2C%20%22Effect%22%3A%20%22Allow%22%2C%20%22Sid%22%3A%20%22editor%22%7D%5D%7D" + } + }, + "title": "PolicyCreate", + "required": [ + "name", + "document" + ], + "additionalProperties": false, + "description": "Schema for creating a policy with a name, description, and document." + }, + "objectStorage2GroupCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "new-group" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 128, + "minLength": 1, + "pattern": "[\\w+=,.@-]+", + "description": "A valid string to represent the name of the IAM group.", + "example": "new-group" + } + }, + "title": "GroupCreate", + "required": [ + "name" + ], + "additionalProperties": false, + "description": "Schema for creating a new IAM group." + }, + "objectStorage2RoleCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "assume_role_policy_document": "{\"Version\": \"2012-10-17\",\"Statement\": [{\"Action\": \"sts:AssumeRole\",\"Principal\": {\"AWS\": [\"urn:ecs:iam::ns1:user/Demby\"]},\"Effect\": \"Allow\",\"Resource\": \"*\"}]}", + "description": "A test role.", + "max_session_duration": 3600, + "name": "test-role", + "permissions_boundary": "test-policy", + "tags": [ + { + "key": "department", + "value": "Finance" + }, + { + "key": "school", + "value": "University of Helsinki" + } + ] + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "[\\w+=,.@-]+", + "example": "test-role" + }, + "assume_role_policy_document": { + "type": "string", + "maxLength": 131072, + "minLength": 1, + "description": "The policy document that grants an entity permission to assume the role.", + "example": "{\"Version\": \"2012-10-17\",\"Statement\": [{\"Action\": \"sts:AssumeRole\",\"Principal\": {\"AWS\": [\"urn:ecs:iam::ns1:user/Demby\"]},\"Effect\": \"Allow\",\"Resource\": \"*\"}]}" + }, + "description": { + "type": "string", + "maxLength": 1000, + "description": "Description of the role.", + "example": "A test role." + }, + "max_session_duration": { + "type": "integer", + "maximum": 43200, + "minimum": 3600, + "format": "int32", + "description": "Maximum session duration in seconds." + }, + "permissions_boundary": { + "type": "string", + "maxLength": 128, + "minLength": 1, + "description": "Policy name to set as the permissions boundary.", + "example": "test-policy" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2RoleTag" + }, + "description": "Tags to attach to the role (max 50)." + } + }, + "title": "RoleCreate", + "required": [ + "name", + "assume_role_policy_document" + ], + "additionalProperties": false, + "description": "Schema for creating a new role." + }, + "objectStorage2RoleTag": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "foo", + "value": "bar" + } + ], + "properties": { + "key": { + "$ref": "#/components/schemas/objectStorage2TagKey" + }, + "value": { + "$ref": "#/components/schemas/objectStorage2TagValue" + } + }, + "title": "RoleTag", + "required": [ + "key" + ], + "additionalProperties": false, + "description": "Schema for tagging roles with key-value pairs." + }, + "objectStorage2TagValue": { + "type": "string", + "examples": [ + "production", + "backend", + "web-app", + "backup", + "engineering", + "public" + ], + "title": "TagValue", + "maxLength": 256, + "description": "The value of a tag." + }, + "objectStorage2RoleUpdate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "description": "New description", + "max_session_duration": 3900 + } + ], + "properties": { + "description": { + "type": "string", + "maxLength": 1000, + "description": "New description for the role.", + "example": "New description" + }, + "max_session_duration": { + "type": "integer", + "maximum": 43200, + "minimum": 3600, + "format": "int32", + "description": "New maximum session duration in seconds." + } + }, + "title": "RoleUpdate", + "additionalProperties": false, + "description": "Schema for updating an existing role." + }, + "objectStorage2AssumeRolePolicyRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "document": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"backup.upcloud.com\"},\"Action\":\"sts:AssumeRole\"}]}" + } + ], + "properties": { + "document": { + "type": "string", + "description": "The assume role policy document that grants an entity permission to assume the role.", + "example": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"backup.upcloud.com\"},\"Action\":\"sts:AssumeRole\"}]}" + } + }, + "title": "AssumeRolePolicyRequest", + "required": [ + "document" + ], + "description": "Schema for the request to assume a role with a policy document." + }, + "objectStorage2ServiceListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "configured_status": "started", + "created_at": "2023-05-07T15:55:24.655776Z", + "custom_domains": [ + { + "domain_name": "objects.example-company.com", + "type": "public" + } + ], + "endpoints": [ + { + "domain_name": "7mf5k.upbucket.com", + "iam_url": "https://7mf5k.upbucket.com:4443/iam", + "sts_url": "https://7mf5k.upbucket.com:4443/sts", + "type": "public" + }, + { + "domain_name": "7mf5k-private.upbucket.com", + "iam_url": "https://7mf5k-private.upbucket.com:4443/iam", + "sts_url": "https://7mf5k-private.upbucket.com:4443/sts", + "type": "private" + }, + { + "domain_name": "static.7mf5k.upbucket.com", + "type": "static" + } + ], + "labels": [ + { + "key": "example-key", + "value": "example-value" + } + ], + "name": "example-service", + "networks": [ + { + "family": "IPv4", + "name": "example-public-network", + "type": "public" + }, + { + "family": "IPv4", + "name": "example-private-network", + "type": "private", + "uuid": "03aa7245-2ff9-49c8-9f0e-7ca0270d71a4" + } + ], + "operational_state": "running", + "region": "europe-1", + "state_messages": [], + "static_website": [ + { + "domain": "objects.example-company.com", + "custom_domain_id": 1, + "bucket_name": "website-prod", + "bucket_prefix": "public/", + "index_document": "index.html", + "status": "active", + "error_pages": [ + { + "status_code": 404, + "error_document": "404.html" + }, + { + "status_range": { + "start": 500, + "end": 599 + }, + "error_document": "500.html" + }, + { + "status_range": { + "start": 500, + "end": 510 + }, + "error_document": "500.html" + } + ], + "created_at": "2023-05-07T16:10:30.123456Z", + "updated_at": "2023-05-07T16:10:30.123456Z" + } + ], + "updated_at": "2023-05-07T21:38:15.757405Z", + "usage": { + "total_objects": 310499, + "total_size_bytes": 32414921734 + }, + "uuid": "1200ecde-db95-4d1c-9133-6508f3232567" + } + ] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2ServiceDetailResponse" + }, + "title": "ServiceListResponse", + "description": "Response schema for a list of services." + }, + "objectStorage2ServiceDetailResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "configured_status": "started", + "created_at": "2023-05-07T15:55:24.655776Z", + "custom_domains": [], + "endpoints": [ + { + "type": "public", + "mode": "api", + "domain_name": "7mf5k.upbucket.com", + "iam_url": "https://7mf5k.upbucket.com:4443/iam", + "sts_url": "https://7mf5k.upbucket.com:4443/sts" + }, + { + "type": "private", + "mode": "api", + "domain_name": "7mf5k-private.upbucket.com", + "iam_url": "https://7mf5k-private.upbucket.com:4443/iam", + "sts_url": "https://7mf5k-private.upbucket.com:4443/sts" + }, + { + "type": "public", + "mode": "static-website", + "domain_name": "7mf5k-static.upbucket.com" + } + ], + "labels": [ + { + "key": "example-key", + "value": "example-value" + } + ], + "name": "example-service", + "networks": [ + { + "family": "IPv4", + "name": "example-public-network", + "type": "public" + }, + { + "family": "IPv4", + "name": "example-private-network", + "type": "private", + "uuid": "03aa7245-2ff9-49c8-9f0e-7ca0270d71a4" + } + ], + "operational_state": "setup-checkup", + "region": "europe-1", + "state_messages": [ + { + "code": "waiting_certificate_issuing", + "created_at": "2025-01-16T11:20:40.372611Z", + "message": "Certificate issuing is in progress for domains: 7mf5k-private.upbucket.com, *.7mf5k-private.upbucket.com.", + "operational_state": "setup-checkup", + "updated_at": "2025-01-16T11:20:40.372611Z" + } + ], + "static_websites": [ + { + "domain_name": "7mf5k-static.upbucket.com", + "bucket_name": "my-website", + "bucket_prefix": "", + "index_document": "index.html", + "enabled": true, + "error_pages": [ + { + "status_code": 404, + "error_document": "404.html" + } + ], + "created_at": "2023-05-07T15:55:24.655776Z", + "updated_at": "2023-05-07T15:55:24.655776Z" + } + ], + "updated_at": "2023-05-07T21:38:15.757405Z", + "usage": { + "total_objects": 310499, + "total_size_bytes": 32414921734 + }, + "users": [ + { + "access_keys": [ + { + "access_key_id": "AKIA63F41D01345BB477", + "created_at": "2023-05-07T20:52:19.705405Z", + "last_used_at": "2023-05-07T20:52:17Z", + "status": "Active" + } + ], + "arn": "urn:ecs:iam::123bbb5c6a4240409e07f7d89fe28891:user/example_user", + "created_at": "2023-05-07T15:55:24.655776Z", + "policies": [ + { + "arn": "urn:ecs:iam:::policy/ECSS3FullAccess", + "name": "ECSS3FullAccess" + }, + { + "arn": "urn:ecs:iam:::policy/IAMFullAccess", + "name": "IAMFullAccess" + } + ], + "username": "example_user" + } + ], + "uuid": "1200ecde-db95-4d1c-9133-6508f3232567" + } + ], + "properties": { + "uuid": { + "type": "string", + "example": "1200ecde-db95-4d1c-9133-6508f3232567" + }, + "name": { + "type": "string", + "example": "example-service" + }, + "region": { + "type": "string", + "example": "europe-1" + }, + "configured_status": { + "type": "string", + "enum": [ + "started", + "stopped" + ], + "example": "started" + }, + "operational_state": { + "type": "string", + "enum": [ + "pending", + "setup-service", + "setup-network", + "setup-tls", + "setup-public-endpoint", + "setup-private-endpoint", + "setup-dns", + "cleanup-deleted-buckets", + "setup-iam", + "setup-checkup", + "running", + "stopped", + "delete-private-endpoint", + "delete-public-endpoint", + "delete-buckets", + "delete-iam", + "delete-namespace", + "delete-dns", + "delete-tls", + "delete-network", + "delete-service" + ], + "example": "running" + }, + "networks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2NetworkDetailResponse" + } + }, + "usage": { + "type": "object", + "properties": { + "total_size_bytes": { + "type": "integer", + "example": 32414921734 + }, + "total_objects": { + "type": "integer", + "example": 310499 + } + } + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2LabelDetailResponse" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2UserDetailResponse" + } + }, + "endpoints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2EndpointResponse" + } + }, + "custom_domains": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2CustomDomainDetailResponse" + } + }, + "static_websites": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2StaticWebsiteConfig" + }, + "description": "Static website configurations for this service" + }, + "state_messages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "operational_state": { + "type": "string", + "example": "setup-checkup" + }, + "message": { + "type": "string", + "example": "Certificate issuing is in progress for domains: example.com." + }, + "code": { + "type": "string", + "enum": [ + "waiting_certificate_issuing", + "failed_domain_verification", + "failed_custom_domain_verification", + "buckets_stuck_in_deletion", + "namespace_stuck_in_deletion" + ], + "example": "waiting_certificate_issuing" + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2025-01-16T11:20:40.372611Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2025-01-16T11:20:40.372611Z" + } + } + } + }, + "termination_protection": { + "type": "boolean", + "example": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2023-05-07T15:55:24.655776Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2023-05-07T21:38:15.757405Z" + } + }, + "title": "ServiceDetailResponse", + "description": "Response schema for service details, including UUID, name, and endpoints." + }, + "objectStorage2NetworkDetailResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "family": "IPv4", + "name": "example-private-network", + "type": "private", + "uuid": "03bec0ad-85c3-459e-824d-710f8f24f740" + } + ], + "properties": { + "family": { + "type": "string", + "example": "IPv4" + }, + "name": { + "type": "string", + "example": "example-private-network" + }, + "type": { + "type": "string", + "example": "private" + }, + "uuid": { + "type": "string", + "format": "uuid", + "example": "03bec0ad-85c3-459e-824d-710f8f24f740" + } + }, + "title": "NetworkDetailResponse", + "description": "Schema for network details including family, name, type, and UUID." + }, + "objectStorage2LabelDetailResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "foo", + "value": "bar" + } + ], + "properties": { + "key": { + "type": "string", + "example": "foo" + }, + "value": { + "type": "string", + "example": "bar" + } + }, + "title": "LabelDetailResponse", + "description": "Schema for label details including key-value pairs." + }, + "objectStorage2UserDetailResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "access_keys": [ + { + "access_key_id": "AKIA63F41D01345BB477", + "created_at": "2023-05-07T20:52:19.705405Z", + "last_used_at": "2023-05-07T20:52:17Z", + "status": "Active" + } + ], + "arn": "urn:ecs:iam::123bbb5c6a4240409e07f7d89fe28891:user/example_user", + "created_at": "2023-05-07T15:55:24.655776Z", + "policies": [ + { + "arn": "urn:ecs:iam:::policy/ECSS3FullAccess", + "name": "ECSS3FullAccess" + }, + { + "arn": "urn:ecs:iam:::policy/IAMFullAccess", + "name": "IAMFullAccess" + } + ], + "username": "example_user" + } + ], + "properties": { + "username": { + "type": "string", + "examples": [ + "example_user" + ] + }, + "arn": { + "type": "string", + "examples": [ + "urn:ecs:iam::123bbb5c6a4240409e07f7d89fe28891:user/example_user" + ] + }, + "created_at": { + "type": "string", + "examples": [ + "2023-05-07T15:55:24.655776Z" + ], + "format": "date-time" + }, + "access_keys": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2AccessKeyDetailResponse" + } + }, + "policies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2PolicyAttachmentResponse" + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2TagResponse" + } + }, + "permissions_boundary": { + "$ref": "#/components/schemas/objectStorage2PermissionsBoundaryResponse" + } + }, + "title": "UserDetailResponse", + "description": "Response schema for user details." + }, + "objectStorage2AccessKeyDetailResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "access_key_id": "UCK1234567890ABCDEF", + "secret_access_key": "", + "status": "Active", + "created_at": "2024-01-15T10:30:00Z", + "last_used_at": "2024-01-20T14:22:15Z" + } + ], + "properties": { + "access_key_id": { + "type": "string", + "examples": [ + "UCK1234567890ABCDEF" + ] + }, + "created_at": { + "type": "string", + "examples": [ + "2024-01-15T10:30:00Z" + ], + "format": "date-time" + }, + "last_used_at": { + "type": "string", + "examples": [ + "2024-01-20T14:22:15Z" + ], + "format": "date-time" + }, + "secret_access_key": { + "type": "string", + "examples": [ + "uCkS3cr3tK3y1234567890abcdefghijklmnopqrstuvwxyz" + ], + "description": "Only returned upon creation, empty otherwise." + }, + "status": { + "type": "string", + "examples": [ + "Active" + ], + "enum": [ + "Active", + "Inactive" + ] + } + }, + "title": "AccessKeyDetailResponse", + "description": "Response schema for access key details." + }, + "objectStorage2PolicyAttachmentResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "arn": "arn:upcloud:iam::01234567-89ab-cdef-0123-456789abcdef:policy/ECSReadOnlyAccess", + "name": "ECSReadOnlyAccess" + } + ], + "properties": { + "arn": { + "type": "string", + "example": "arn:upcloud:iam::01234567-89ab-cdef-0123-456789abcdef:policy/ECSReadOnlyAccess" + }, + "name": { + "type": "string", + "example": "ECSReadOnlyAccess" + } + }, + "title": "PolicyAttachmentResponse", + "description": "Schema representing a policy attachment response." + }, + "objectStorage2TagResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "foo", + "value": "bar" + } + ], + "properties": { + "key": { + "type": "string", + "example": "foo" + }, + "value": { + "type": "string", + "example": "bar" + } + }, + "title": "TagResponse", + "description": "Schema for a key-value pair tag." + }, + "objectStorage2PermissionsBoundaryResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "sample-policy" + ], + "title": "PermissionsBoundaryResponse", + "description": "Schema representing a permissions boundary response." + }, + "objectStorage2EndpointResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "domain_name": "objects.example.com", + "iam_url": "https://7mf5k.upbucket.com:4443/iam", + "sts_url": "https://7mf5k.upbucket.com:4443/sts", + "type": "public", + "mode": "api" + }, + { + "domain_name": "abc123-static.upbucket.com", + "type": "public", + "mode": "static-website" + } + ], + "properties": { + "domain_name": { + "type": "string", + "example": "objects.example.com" + }, + "iam_url": { + "type": "string", + "format": "uri", + "example": "https://7mf5k.upbucket.com:4443/iam" + }, + "sts_url": { + "type": "string", + "format": "uri", + "example": "https://7mf5k.upbucket.com:4443/sts" + }, + "type": { + "type": "string", + "enum": [ + "public", + "private" + ], + "description": "The network access type of the endpoint", + "example": "public" + }, + "mode": { + "type": "string", + "enum": [ + "api", + "static-website" + ], + "description": "The operational mode of the endpoint: 'api' for S3/IAM/STS access, 'static-website' for static website hosting", + "example": "api" + } + }, + "title": "EndpointResponse", + "description": "Response schema for endpoint details." + }, + "objectStorage2CustomDomainDetailResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "domain_name": "example.com", + "type": "public", + "mode": "api" + }, + { + "domain_name": "objects.example.com", + "type": "public", + "mode": "api" + }, + { + "domain_name": "static.example.com", + "type": "public", + "mode": "static-website" + } + ], + "properties": { + "domain_name": { + "type": "string", + "description": "Custom domain name. Supports both apex domains and subdomains.", + "example": "example.com" + }, + "type": { + "type": "string", + "description": "Endpoint type for the custom domain.", + "example": "public" + }, + "mode": { + "type": "string", + "enum": [ + "api", + "static-website" + ], + "description": "Purpose of the domain. 'api' for S3 API access, 'static-website' for static website hosting.", + "example": "api" + } + }, + "title": "CustomDomainDetailResponse", + "description": "Response schema for custom domain details." + }, + "objectStorage2StaticWebsiteConfig": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "domain_name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "description": "The domain this configuration applies to", + "example": "abc123-static.upbucket.example.com" + }, + "bucket_name": { + "type": "string", + "maxLength": 254, + "pattern": "^[a-zA-Z0-9.\\-_]*$", + "description": "Name of the S3/ECS bucket containing the website content. Only alphanumerics, dots, hyphens, and underscores are allowed.", + "example": "my-website" + }, + "bucket_prefix": { + "type": "string", + "maxLength": 1024, + "pattern": "^[a-zA-Z0-9/.\\-_]*$", + "description": "Optional prefix/subfolder within the bucket. Only alphanumerics, slashes, dots, hyphens, and underscores are allowed.", + "default": "", + "example": "v2/" + }, + "index_document": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "pattern": "^[a-zA-Z0-9/.\\-_]+$", + "description": "Default document for directories. Only alphanumerics, slashes, dots, hyphens, and underscores are allowed.", + "default": "index.html", + "example": "index.html" + }, + "spa_mode": { + "type": "boolean", + "description": "Enable Single Page Application (SPA) mode. When enabled, all non-file routes serve the index document, allowing client-side routing to handle the URL. Essential for React, Vue, Next.js, and similar frameworks.", + "default": false, + "example": true + }, + "error_pages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2StaticWebsiteErrorPage" + }, + "maxItems": 25, + "description": "Custom error page configurations for specific HTTP status codes or ranges", + "example": [ + { + "status_code": 403, + "error_document": "errors/403.html" + }, + { + "status_code": 404, + "error_document": "errors/404.html" + }, + { + "status_range": { + "start": 400, + "end": 499 + }, + "error_document": "errors/4xx.html" + } + ] + }, + "enabled": { + "type": "boolean", + "description": "Whether the static website configuration is currently active", + "example": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when this configuration was created", + "example": "2025-10-28T10:00:00Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when this configuration was last updated", + "example": "2025-10-28T12:00:00Z" + } + }, + "title": "StaticWebsiteConfig", + "required": [ + "domain_name", + "bucket_name", + "bucket_prefix", + "index_document", + "error_pages", + "enabled", + "created_at", + "updated_at" + ], + "description": "Static website hosting configuration for a specific domain." + }, + "objectStorage2ErrorResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_INVALID_REQUEST", + "title": "Validation error.", + "invalid_params": [ + { + "name": "configured_status", + "reason": "Value must be one of \"started\", \"stopped\"." + } + ], + "correlation_id": "01K1ZM92JWR9YMWTCMV6JPSQ0J", + "status": 400 + }, + { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_RESOURCE_NOT_FOUND", + "title": "The resource you requested does not exist.", + "correlation_id": "01K1ZJC6MSN91RQS3JMEESGG92", + "status": 404 + }, + { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_GENERAL_FAILURE", + "title": "Your request could not be fulfilled due to a technical issue.", + "correlation_id": "01HEPYJ027RF0H29CKHWHCH7RE", + "status": 500 + } + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "https://developers.upcloud.com/1.3/errors#ERROR_INVALID_REQUEST", + "https://developers.upcloud.com/1.3/errors#ERROR_RESOURCE_NOT_FOUND", + "https://developers.upcloud.com/1.3/errors#ERROR_INSUFFICIENT_CREDITS", + "https://developers.upcloud.com/1.3/errors#ERROR_GENERAL_FAILURE" + ], + "description": "Error code string.", + "example": "https://developers.upcloud.com/1.3/errors#ERROR_INVALID_REQUEST" + }, + "title": { + "type": "string", + "examples": [ + "Validation error.", + "The resource you requested does not exist.", + "Your request could not be fulfilled due to a technical issue." + ], + "description": "Short description of the error." + }, + "correlation_id": { + "type": "string", + "examples": [ + "01K1K2TKEASWRJ6VFP9ZV5P2H4" + ], + "description": "Unique identifier for the request, useful for debugging." + }, + "status": { + "type": "integer", + "examples": [ + 400, + 404, + 402, + 500 + ], + "format": "int32", + "description": "HTTP status code associated with the error." + }, + "invalid_params": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "examples": [ + "zone", + "networks.0.ip_address" + ], + "description": "Path to the field with invalid parameter." + }, + "reason": { + "type": "string", + "examples": [ + "Zone is not valid." + ], + "description": "Human-readable error message." + } + }, + "required": [ + "name", + "reason" + ] + }, + "title": "InvalidParameters", + "description": "List of invalid parameters in the request." + } + }, + "title": "ErrorResponse", + "required": [ + "type", + "title", + "correlation_id", + "status" + ], + "additionalProperties": false, + "description": "Schema for error responses from the API." + }, + "objectStorage2NetworkListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "family": "IPv4", + "name": "example-public-network", + "type": "public" + }, + { + "family": "IPv4", + "name": "example-private-network", + "type": "private", + "uuid": "03aa7245-2ff9-49c8-9f0e-7ca0270d71a4" + } + ] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2NetworkDetailResponse" + }, + "title": "NetworkListResponse", + "description": "Response schema for a list of network details." + }, + "objectStorage2CustomDomainListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "domain_name": "example.com", + "type": "public", + "mode": "api" + }, + { + "domain_name": "objects.example.com", + "type": "public", + "mode": "api" + }, + { + "domain_name": "static.example.com", + "type": "public", + "mode": "static-website" + } + ] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2CustomDomainDetailResponse" + }, + "title": "CustomDomainListResponse", + "description": "Response schema for listing custom domains." + }, + "objectStorage2RegionListResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "name": "europe-1", + "primary_zone": "fi-hel1", + "zones": [ + { + "name": "fi-hel1" + }, + { + "name": "de-fra1" + } + ] + } + ] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2RegionDetailResponse" + }, + "title": "RegionListResponse", + "description": "Response schema for listing regions." + }, + "objectStorage2RegionDetailResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "europe-1", + "primary_zone": "fi-hel1", + "zones": [ + { + "name": "fi-hel1" + }, + { + "name": "de-fra1" + } + ] + } + ], + "properties": { + "name": { + "type": "string", + "example": "europe-1" + }, + "primary_zone": { + "type": "string", + "example": "fi-hel1" + }, + "zones": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "fi-hel1" + } + } + } + } + }, + "title": "RegionDetailResponse", + "description": "Response schema for detailed information about a specific region." + }, + "objectStorage2MetricsUsageResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "total_objects": 1000, + "total_size_bytes": 1073741824 + } + ], + "properties": { + "total_objects": { + "type": "integer", + "format": "int32" + }, + "total_size_bytes": { + "type": "integer", + "format": "int64" + } + }, + "title": "MetricsUsageResponse", + "description": "Response schema for service usage metrics." + }, + "objectStorage2BucketListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "name": "my-bucket-1", + "total_objects": 1000, + "total_size_bytes": 1073741824 + } + ] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2BucketDetailResponse" + }, + "title": "BucketListResponse", + "description": "Response schema for listing buckets." + }, + "objectStorage2BucketDetailResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "my-bucket-1", + "total_objects": 1000, + "total_size_bytes": 1073741824, + "deleted": false + } + ], + "properties": { + "name": { + "type": "string", + "example": "my-bucket-1" + }, + "total_objects": { + "type": "integer", + "format": "int32" + }, + "total_size_bytes": { + "type": "integer", + "format": "int64" + }, + "deleted": { + "type": "boolean", + "example": false + } + }, + "title": "BucketDetailResponse", + "description": "Response schema for bucket details." + }, + "objectStorage2MetricsSeriesListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "bytes_created": 530000, + "bytes_deleted": 244000, + "bytes_received": 530000, + "bytes_total": 7502000, + "bytes_transmitted": 0, + "end_at": "2023-10-31T12:00:00Z", + "objects_created": 79, + "objects_deleted": 40, + "objects_total": 1237, + "start_at": "2023-10-31T11:00:00Z" + } + ] + ], + "items": { + "type": "object", + "properties": { + "bytes_created": { + "type": "integer", + "format": "int64" + }, + "bytes_deleted": { + "type": "integer", + "format": "int64" + }, + "bytes_received": { + "type": "integer", + "format": "int64" + }, + "bytes_total": { + "type": "integer", + "format": "int64" + }, + "bytes_transmitted": { + "type": "integer", + "format": "int64" + }, + "end_at": { + "type": "string", + "examples": [ + "2023-10-31T12:00:00Z" + ], + "format": "date-time" + }, + "objects_created": { + "type": "integer", + "format": "int32" + }, + "objects_deleted": { + "type": "integer", + "format": "int32" + }, + "objects_total": { + "type": "integer", + "format": "int32" + }, + "start_at": { + "type": "string", + "examples": [ + "2023-10-31T11:00:00Z" + ], + "format": "date-time" + } + } + }, + "title": "MetricsSeriesListResponse", + "description": "Response schema for listing metrics series." + }, + "objectStorage2LabelListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "key": "foo", + "value": "bar" + } + ] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2LabelDetailResponse" + }, + "title": "LabelListResponse", + "description": "Response schema for listing labels." + }, + "objectStorage2ServiceDomains": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "domains": { + "type": "array", + "items": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name (e.g., unc38.local.upbucket.com)", + "example": "unc38.local.upbucket.com" + }, + "type": { + "type": "string", + "enum": [ + "public", + "private", + "custom" + ], + "description": "Type of domain (public endpoint, private endpoint, or custom domain)", + "example": "public" + }, + "active": { + "type": "boolean", + "description": "Whether this domain is active and ready to use (always true for enabled public/private endpoints, true for custom domains only if certificate is ready)", + "example": true + }, + "static_website_configured": { + "type": "boolean", + "description": "Whether static website hosting is configured for this domain", + "example": false + } + }, + "required": [ + "domain", + "type", + "active", + "static_website_configured" + ] + }, + "description": "List of all service domains (public, private, custom) with their static website hosting availability and configuration status" + } + }, + "title": "ServiceDomains", + "required": [ + "domains" + ], + "description": "Service domains with their static website hosting status" + }, + "objectStorage2UserListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "access_keys": [ + { + "access_key_id": "AKIA63F41D01345BB477", + "created_at": "2023-05-07T20:52:19.705405Z", + "last_used_at": "2023-05-07T20:52:17Z", + "status": "Active" + } + ], + "arn": "urn:ecs:iam::123bbb5c6a4240409e07f7d89fe28891:user/example_user", + "created_at": "2023-05-07T15:55:24.655776Z", + "policies": [ + { + "arn": "urn:ecs:iam:::policy/ECSS3FullAccess", + "name": "ECSS3FullAccess" + }, + { + "arn": "urn:ecs:iam:::policy/IAMFullAccess", + "name": "IAMFullAccess" + } + ], + "username": "example_user" + } + ] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2UserDetailResponse" + }, + "title": "UserListResponse", + "description": "Response schema for listing users." + }, + "objectStorage2AccessKeyListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "access_key_id": "UCK1234567890ABCDEF", + "status": "Active", + "created_at": "2024-01-15T10:30:00Z", + "last_used_at": "2024-01-20T14:22:15Z" + } + ] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2AccessKeyDetailResponse" + }, + "title": "AccessKeyListResponse", + "description": "Response schema for listing access keys." + }, + "objectStorage2CreateAccessKeyResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "access_key_id": "UCK1234567890ABCDEF", + "secret_access_key": "uCkS3cr3tK3y1234567890abcdefghijklmnopqrstuvwxyz", + "status": "Active", + "created_at": "2024-01-15T10:30:00Z" + } + ], + "properties": { + "access_key_id": { + "type": "string" + }, + "created_at": { + "type": "string", + "examples": [ + "2024-01-15T10:30:00Z" + ], + "format": "date-time" + }, + "last_used_at": { + "type": "string", + "examples": [ + "2024-01-15T10:30:00Z" + ], + "format": "date-time" + }, + "secret_access_key": { + "type": "string", + "examples": [ + "uCkS3cr3tK3y1234567890abcdefghijklmnopqrstuvwxyz" + ], + "description": "This is only returned upon creation." + }, + "status": { + "type": "string", + "examples": [ + "Active" + ], + "enum": [ + "Active", + "Inactive" + ] + } + }, + "title": "CreateAccessKeyResponse", + "description": "Response schema for creating an access key." + }, + "objectStorage2PolicyAttachmentListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "arn": "arn:upcloud:iam::01234567-89ab-cdef-0123-456789abcdef:policy/ECSReadOnlyAccess", + "name": "ECSReadOnlyAccess" + } + ] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2PolicyAttachmentResponse" + }, + "title": "PolicyAttachmentListResponse", + "description": "Response schema for listing policy attachments." + }, + "objectStorage2InlinePolicyResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "ECSS3FullAccess", + "document": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Resource\":\"*\"}]}" + } + ], + "properties": { + "document": { + "type": "string", + "example": "ECSS3FullAccess" + }, + "name": { + "type": "string", + "example": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Resource\":\"*\"}]}" + } + }, + "title": "InlinePolicyResponse", + "description": "Schema representing an inline policy response." + }, + "objectStorage2InlinePolicyListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "name": "ECSS3FullAccess", + "document": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Resource\":\"*\"}]}" + } + ] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2InlinePolicyResponse" + }, + "title": "InlinePolicyListResponse", + "description": "Response schema for listing inline policies." + }, + "objectStorage2TagListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "key": "environment", + "value": "production" + }, + { + "key": "team", + "value": "backend" + } + ] + ], + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "maxLength": 128, + "minLength": 1, + "example": "environment" + }, + "value": { + "type": "string", + "maxLength": 256, + "example": "production" + } + }, + "required": [ + "key" + ] + }, + "title": "TagListResponse", + "description": "Response schema for listing tags associated with a resource." + }, + "objectStorage2PolicyVersionListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "create_date": "2024-03-25T12:47:40Z", + "document": "%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Action%22%3A%5B%22*%22%5D%2C%22Resource%22%3A%22*%22%2C%22Effect%22%3A%22Deny%22%7D%5D%7D", + "is_default": false, + "version_id": "v4" + }, + { + "create_date": "2024-03-25T12:47:38Z", + "document": "%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Action%22%3A%5B%22*%22%5D%2C%22Resource%22%3A%22*%22%2C%22Effect%22%3A%22Deny%22%7D%5D%7D", + "is_default": false, + "version_id": "v3" + } + ] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2PolicyVersionResponse" + }, + "title": "PolicyVersionListResponse", + "description": "Response schema for a list of policy versions." + }, + "objectStorage2PolicyVersionResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "create_date": "2024-02-05T11:06:16Z", + "document": "%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Action%22%3A%5B%22%2A%22%5D%2C%22Effect%22%3A%22Deny%22%2C%22Resource%22%3A%22%2A%22%7D%5D%7D", + "is_default": true, + "version_id": "v2" + } + ], + "properties": { + "create_date": { + "type": "string", + "examples": [ + "2024-02-05T11:06:16Z" + ], + "format": "date-time" + }, + "document": { + "type": "string", + "examples": [ + "%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Action%22%3A%5B%22%2A%22%5D%2C%22Effect%22%3A%22Deny%22%2C%22Resource%22%3A%22%2A%22%7D%5D%7D" + ] + }, + "is_default": { + "type": "boolean" + }, + "version_id": { + "type": "string", + "examples": [ + "v2" + ] + } + }, + "title": "PolicyVersionResponse", + "description": "Schema for a policy version response, including creation date, document content, default status, and version ID." + }, + "objectStorage2PolicyDetailResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "arn": "urn:ecs:iam:::policy/ECSS3FullAccess", + "attachment_count": 0, + "created_at": "2024-02-05T11:06:16Z", + "default_version_id": "v1", + "description": "Provides full access to all buckets.", + "document": "%7B%0A++++%22Version%22%3A+%222012-10-17%22%2C%0A++++%22Statement%22%3A+%5B%0A++++++++%7B%0A++++++++++++%22Effect%22%3A+%22Allow%22%2C%0A++++++++++++%22Action%22%3A+%22s3%3A*%22%2C%0A++++++++++++%22Resource%22%3A+%22*%22%0A++++++++%7D%0A++++%5D%0A%7D", + "name": "ECSS3FullAccess", + "system": true, + "updated_at": "2024-02-05T11:06:16Z" + } + ], + "properties": { + "arn": { + "type": "string", + "examples": [ + "urn:ecs:iam:::policy/ECSS3FullAccess" + ] + }, + "attachment_count": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "examples": [ + "2024-02-05T11:06:16Z" + ], + "format": "date-time" + }, + "default_version_id": { + "type": "string", + "examples": [ + "v1" + ] + }, + "description": { + "type": "string", + "examples": [ + "Provides full access to all buckets." + ] + }, + "document": { + "type": "string", + "examples": [ + "%7B%0A++++%22Version%22%3A+%222012-10-17%22%2C%0A++++%22Statement%22%3A+%5B%0A++++++++%7B%0A++++++++++++%22Effect%22%3A+%22Allow%22%2C%0A++++++++++++%22Action%22%3A+%22s3%3A*%22%2C%0A++++++++++++%22Resource%22%3A+%22*%22%0A++++++++%7D%0A++++%5D%0A%7D" + ] + }, + "name": { + "type": "string", + "examples": [ + "ECSS3FullAccess" + ] + }, + "system": { + "type": "boolean" + }, + "updated_at": { + "type": "string", + "examples": [ + "2024-02-05T11:06:16Z" + ], + "format": "date-time" + } + }, + "title": "PolicyDetailResponse", + "description": "Schema for policy details including ARN, attachment count, creation date, default version ID, description, document, name, system status, and last updated date." + }, + "objectStorage2PolicyListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "arn": "urn:ecs:iam:::policy/ECSDenyAll", + "attachment_count": 0, + "created_at": "2024-02-05T11:06:17Z", + "default_version_id": "v1", + "description": "Deny all access.", + "name": "ECSDenyAll", + "system": true, + "updated_at": "2024-02-05T11:06:17Z" + }, + { + "arn": "urn:ecs:iam:::policy/ECSS3FullAccess", + "attachment_count": 1, + "created_at": "2024-02-05T11:06:16Z", + "default_version_id": "v1", + "description": "Provides full access to all buckets.", + "name": "ECSS3FullAccess", + "system": true, + "updated_at": "2024-02-05T11:06:16Z" + }, + { + "arn": "urn:ecs:iam:::policy/ECSS3ReadOnlyAccess", + "attachment_count": 0, + "created_at": "2024-02-05T11:06:16Z", + "default_version_id": "v1", + "description": "Provides read only access to all buckets.", + "name": "ECSS3ReadOnlyAccess", + "system": true, + "updated_at": "2024-02-05T11:06:16Z" + }, + { + "arn": "urn:ecs:iam:::policy/IAMFullAccess", + "attachment_count": 1, + "created_at": "2024-02-05T11:06:16Z", + "default_version_id": "v1", + "description": "Provides full access to IAM.", + "name": "IAMFullAccess", + "system": true, + "updated_at": "2024-02-05T11:06:16Z" + }, + { + "arn": "urn:ecs:iam:::policy/IAMReadOnlyAccess", + "attachment_count": 0, + "created_at": "2024-02-05T11:06:16Z", + "default_version_id": "v1", + "description": "Provides read only access to IAM.", + "name": "IAMReadOnlyAccess", + "system": true, + "updated_at": "2024-02-05T11:06:16Z" + } + ] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2PolicyDetailResponse" + }, + "title": "PolicyListResponse", + "description": "Response schema for listing policies." + }, + "objectStorage2GroupListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "arn": "urn:ecs:iam::1263b59181cc4841969358b08ed70026:group/test-group", + "created_at": "2024-04-15T16:28:45Z", + "name": "test-group" + } + ] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2GroupResponse" + }, + "title": "GroupListResponse", + "description": "Response schema for listing groups." + }, + "objectStorage2GroupResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "arn": "urn:ecs:iam::1263b59181cc4841969358b08ed70026:group/test-group", + "created_at": "2024-04-15T16:28:45Z", + "name": "test-group" + } + ], + "properties": { + "arn": { + "type": "string", + "examples": [ + "urn:ecs:iam::1263b59181cc4841969358b08ed70026:group/test-group" + ] + }, + "created_at": { + "type": "string", + "examples": [ + "2024-04-15T16:28:45Z" + ], + "format": "date-time" + }, + "name": { + "type": "string", + "examples": [ + "test-group" + ] + } + }, + "title": "GroupResponse", + "description": "Response schema for group details." + }, + "objectStorage2RoleListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "arn": "urn:ecs:iam::12e8c7066c0445c284c1381f899bcee7:role/example", + "assume_role_policy_document": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"AWS\":[\"urn:ecs:iam::12442a2fbc06434889edb631be2d0968:user/user1\"]},\"Effect\":\"Allow\",\"Resource\":\"*\"}]}", + "created_at": "2024-09-19T12:43:24Z", + "description": "An example role", + "inline_policies": [ + { + "name": "InlinePolicy" + } + ], + "max_session_duration": 36000, + "name": "example", + "permissions_boundary": "SamplePolicy", + "policies": [ + { + "arn": "urn:ecs:iam::12e8c7066c0445c284c1381f899bcee7:policy/SamplePolicy", + "name": "SamplePolicy" + } + ] + } + ] + ], + "items": { + "$ref": "#/components/schemas/objectStorage2RoleResponse" + }, + "title": "RoleListResponse", + "description": "Response schema for listing roles." + }, + "objectStorage2RoleResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "arn": "urn:ecs:iam::12e8c7066c0445c284c1381f899bcee7:role/example", + "assume_role_policy_document": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"AWS\":[\"urn:ecs:iam::12442a2fbc06434889edb631be2d0968:user/user1\"]},\"Effect\":\"Allow\",\"Resource\":\"*\"}]}", + "created_at": "2024-09-19T12:43:24Z", + "description": "An example role", + "inline_policies": [ + { + "name": "InlinePolicy" + } + ], + "max_session_duration": 36000, + "name": "example", + "permissions_boundary": "SamplePolicy", + "policies": [ + { + "arn": "urn:ecs:iam::12e8c7066c0445c284c1381f899bcee7:policy/SamplePolicy", + "name": "SamplePolicy" + } + ], + "tags": [ + { + "key": "tag1", + "value": "key1" + }, + { + "key": "tag2", + "value": "key2" + } + ] + } + ], + "properties": { + "arn": { + "type": "string", + "examples": [ + "urn:ecs:iam::12e8c7066c0445c284c1381f899bcee7:role/example" + ] + }, + "assume_role_policy_document": { + "type": "string", + "examples": [ + "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"AWS\":[\"urn:ecs:iam::12442a2fbc06434889edb631be2d0968:user/user1\"]},\"Effect\":\"Allow\",\"Resource\":\"*\"}]}" + ] + }, + "created_at": { + "type": "string", + "examples": [ + "2024-09-19T12:43:24Z" + ], + "format": "date-time" + }, + "description": { + "type": "string", + "examples": [ + "An example role" + ] + }, + "inline_policies": { + "type": "array", + "items": { + "properties": { + "name": { + "type": "string", + "examples": [ + "InlinePolicy" + ] + } + } + } + }, + "max_session_duration": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "examples": [ + "example" + ] + }, + "permissions_boundary": { + "type": "string", + "examples": [ + "SamplePolicy" + ] + }, + "policies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2PolicyAttachmentResponse" + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/objectStorage2TagResponse" + } + } + }, + "title": "RoleResponse", + "description": "Response schema for detailed information about a specific role." + }, + "objectStorage2AssumeRolePolicyResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "document": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"backup.upcloud.com\"},\"Action\":\"sts:AssumeRole\"}]}" + } + ], + "properties": { + "document": { + "type": "string", + "example": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"backup.upcloud.com\"},\"Action\":\"sts:AssumeRole\"}]}" + } + }, + "title": "AssumeRolePolicyResponse", + "description": "Response schema for assuming a role with a policy document." + }, + "fileStorageQueryParameterLimit": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "title": "QueryParameterLimit", + "maximum": 100, + "minimum": 0, + "description": "Schema for the limit query parameter, used to specify the maximum number of items to return in a paginated response.", + "default": 10 + }, + "fileStorageQueryParamOffset": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "title": "QueryParamOffset", + "minimum": 0, + "description": "Query parameter to specify the offset for pagination in API responses, allowing clients to retrieve results starting from a specific point.", + "default": 0 + }, + "fileStorageQueryParamSort": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "QueryParamSort", + "enum": [ + "created_at", + "-created_at" + ], + "description": "Query parameter to specify the sorting order of results in API responses, allowing clients to order data based on specific fields.", + "default": "-created_at" + }, + "fileStorageEntityUUID": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "17fd43a5-a97e-44f7-98a8-0a787da67069" + ], + "title": "EntityUUID", + "format": "uuid", + "description": "The unique identifier." + }, + "fileStorageName": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "test-name" + ], + "title": "Name", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "A resource name." + }, + "fileStorageLabelKey": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "environment" + ], + "title": "LabelKey", + "maxLength": 32, + "minLength": 2, + "pattern": "^[\\x20-\\x5E\\x60-\\x7E][\\x20-\\x7E]+$", + "description": "Represents the label identifier. The key is unique within a service." + }, + "fileStorageServiceCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "test-name", + "zone": "fi-hel2", + "configured_status": "started", + "size_gib": 250, + "encrypted": false, + "networks": [ + { + "uuid": "03720d07-80a9-41ac-90b0-68a932109339", + "name": "net", + "family": "IPv4", + "ip_address": "192.168.147.120" + } + ], + "shares": [ + { + "name": "read", + "path": "/public", + "acl": [ + { + "name": "test-name", + "target": "*", + "permission": "ro" + } + ] + }, + { + "name": "write", + "path": "/project/data", + "acl": [ + { + "name": "test-name", + "target": "192.168.147.0/24", + "permission": "rw" + }, + { + "name": "test-name", + "target": "local.domain", + "permission": "rw" + } + ] + } + ], + "labels": [ + { + "key": "environment", + "value": "production" + } + ] + } + ], + "properties": { + "name": { + "$ref": "#/components/schemas/fileStorageName" + }, + "zone": { + "type": "string", + "examples": [ + "fi-hel2" + ], + "title": "Zone", + "pattern": "^[a-z]{2}-[a-z]{3}\\d$", + "description": "Indicates the zone where the service will be created." + }, + "configured_status": { + "$ref": "#/components/schemas/fileStorageConfiguredStatus" + }, + "size_gib": { + "$ref": "#/components/schemas/fileStorageSizeGiB" + }, + "encrypted": { + "type": "boolean", + "examples": [ + true, + false + ], + "title": "Encryption at Rest", + "description": "Indicates whether encryption at rest is enabled for the service.", + "default": false + }, + "networks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fileStorageNetworkCreate" + }, + "maxItems": 1 + }, + "shares": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fileStorageShareCreate" + }, + "maxItems": 50 + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fileStorageLabelCreate" + }, + "maxItems": 255, + "description": "Labels" + } + }, + "title": "ServiceCreate", + "required": [ + "name", + "zone", + "configured_status", + "size_gib" + ], + "additionalProperties": false, + "description": "Schema for creating a new service." + }, + "fileStorageConfiguredStatus": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "started" + ], + "title": "ConfiguredStatus", + "enum": [ + "started", + "stopped" + ], + "description": "The service configured status indicates the service's current intended status. Managed by the customer." + }, + "fileStorageSizeGiB": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "examples": [ + 250 + ], + "title": "SizeGiB", + "maximum": 25000, + "minimum": 250, + "format": "int32", + "description": "The size of the service in gibibytes (GiB)" + }, + "fileStorageNetworkCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "uuid": "03720d07-80a9-41ac-90b0-68a932109339", + "name": "test-name", + "family": "IPv4", + "ip_address": "10.20.30.40" + } + ], + "properties": { + "uuid": { + "$ref": "#/components/schemas/fileStorageNetworkUUID" + }, + "name": { + "$ref": "#/components/schemas/fileStorageName" + }, + "family": { + "$ref": "#/components/schemas/fileStorageNetworkFamily" + }, + "ip_address": { + "$ref": "#/components/schemas/fileStorageIPAddress" + } + }, + "title": "NetworkCreate", + "required": [ + "uuid", + "name", + "family" + ], + "additionalProperties": false, + "description": "Schema for creating a network." + }, + "fileStorageNetworkUUID": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "03720d07-80a9-41ac-90b0-68a932109339" + ], + "title": "NetworkUUID", + "format": "uuid", + "description": "Unique identifier for the network." + }, + "fileStorageNetworkFamily": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "IPv4" + ], + "title": "NetworkFamily", + "enum": [ + "IPv4", + "IPv6" + ], + "description": "Network family. IPv6 currently not supported." + }, + "fileStorageIPAddress": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "10.20.30.40" + ], + "title": "IPAddress", + "format": "ipv4", + "description": "The desired IP address for the service. If not specified, the service will be assigned an IP address from the network's pool." + }, + "fileStorageShareCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "read", + "path": "/public", + "acl": [ + { + "name": "test-name", + "target": "192.168.147.0/24", + "permission": "ro" + } + ] + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "test-name" + ], + "maxLength": 128, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "A resource name." + }, + "path": { + "$ref": "#/components/schemas/fileStoragePath" + }, + "acl": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fileStorageAclCreate" + }, + "maxItems": 50 + } + }, + "title": "ShareCreate", + "required": [ + "name", + "path", + "acl" + ], + "additionalProperties": false, + "description": "Schema for creating a new share with access control lists (ACLs)." + }, + "fileStoragePath": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "/public", + "/projects/myproject" + ], + "title": "Path", + "maxLength": 512, + "minLength": 1, + "pattern": "^/[a-zA-Z0-9/_-]*$", + "description": "The absolute path of the share." + }, + "fileStorageAclCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/fileStorageName" + }, + "target": { + "type": "string", + "examples": [ + "192.168.25.147", + "192.168.25.0/24", + "*" + ], + "maxLength": 255, + "minLength": 1, + "description": "The target of the ACL entry. It can be an IP Address, Network Prefix or a wildcard." + }, + "permission": { + "$ref": "#/components/schemas/fileStoragePermission" + } + }, + "title": "AclCreate", + "required": [ + "name", + "target", + "permission" + ], + "additionalProperties": false, + "description": "Schema for creating an ACL entry." + }, + "fileStoragePermission": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "rw" + ], + "title": "Permission", + "enum": [ + "ro", + "rw" + ], + "description": "The permission level for the ACL target." + }, + "fileStorageLabelCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "environment", + "value": "production" + } + ], + "properties": { + "key": { + "$ref": "#/components/schemas/fileStorageLabelKey" + }, + "value": { + "$ref": "#/components/schemas/fileStorageLabelValue" + } + }, + "title": "LabelCreate", + "required": [ + "key", + "value" + ], + "additionalProperties": false, + "description": "Schema for creating a new label." + }, + "fileStorageLabelValue": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": [ + "string", + "null" + ], + "examples": [ + "development" + ], + "title": "LabelValue", + "maxLength": 255, + "pattern": "\\A[\\p{L}\\p{N}\\p{P}\\p{S}\\p{M}\\p{Z}]*\\z", + "description": "Represents the label value." + }, + "fileStorageServiceReplace": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "test-name", + "configured_status": "started", + "size_gib": 250, + "networks": [ + { + "uuid": "03720d07-80a9-41ac-90b0-68a932109339", + "name": "net", + "family": "IPv4", + "ip_address": "192.168.147.120" + } + ], + "labels": [ + { + "key": "environment", + "value": "production" + } + ] + } + ], + "properties": { + "name": { + "$ref": "#/components/schemas/fileStorageName" + }, + "configured_status": { + "$ref": "#/components/schemas/fileStorageConfiguredStatus" + }, + "size_gib": { + "$ref": "#/components/schemas/fileStorageSizeGiB" + }, + "networks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fileStorageNetworkCreate" + }, + "maxItems": 1 + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fileStorageLabelCreate" + }, + "maxItems": 255, + "description": "Labels" + } + }, + "title": "ServiceReplace", + "required": [ + "name", + "configured_status", + "size_gib" + ], + "additionalProperties": false, + "description": "Schema for replacing an existing service with a new configuration." + }, + "fileStorageServiceModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "test-name", + "configured_status": "started", + "size_gib": 250, + "networks": [ + { + "uuid": "03720d07-80a9-41ac-90b0-68a932109339", + "name": "net", + "family": "IPv4", + "ip_address": "192.168.147.120" + } + ], + "labels": [ + { + "key": "environment", + "value": "production" + } + ] + } + ], + "properties": { + "name": { + "$ref": "#/components/schemas/fileStorageName" + }, + "configured_status": { + "$ref": "#/components/schemas/fileStorageConfiguredStatus" + }, + "size_gib": { + "$ref": "#/components/schemas/fileStorageSizeGiB" + }, + "networks": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/fileStorageNetworkCreate" + }, + "maxItems": 1 + }, + "labels": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/fileStorageLabelCreate" + }, + "maxItems": 255 + } + }, + "title": "ServiceModify", + "additionalProperties": false, + "description": "Schema for modifying an existing service." + }, + "fileStorageNetworkModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "uuid": "03720d07-80a9-41ac-90b0-68a932109339", + "name": "test-name", + "family": "IPv4", + "ip_address": "10.20.30.40" + } + ], + "properties": { + "uuid": { + "$ref": "#/components/schemas/fileStorageNetworkUUID" + }, + "name": { + "$ref": "#/components/schemas/fileStorageName" + }, + "family": { + "$ref": "#/components/schemas/fileStorageNetworkFamily" + }, + "ip_address": { + "$ref": "#/components/schemas/fileStorageIPAddress" + } + }, + "title": "NetworkModify", + "additionalProperties": false, + "description": "Schema for modifying an existing network." + }, + "fileStorageShareModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "test-name", + "acl": [ + { + "name": "test-name", + "target": "192.168.25.0/24", + "permission": "ro" + } + ] + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "test-name" + ], + "maxLength": 128, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "A resource name." + }, + "acl": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fileStorageAclCreate" + }, + "maxItems": 50 + } + }, + "title": "ShareModify", + "additionalProperties": false, + "description": "Schema for modifying an existing share." + }, + "fileStorageAclModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "test-name", + "target": "192.168.25.0/24", + "permission": "rw" + } + ], + "properties": { + "name": { + "$ref": "#/components/schemas/fileStorageName" + }, + "target": { + "type": "string", + "examples": [ + "192.168.25.147", + "192.168.25.0/24", + "*" + ], + "maxLength": 255, + "minLength": 1, + "description": "The target of the ACL entry. It can be an IP Address, Network Prefix or a wildcard." + }, + "permission": { + "$ref": "#/components/schemas/fileStoragePermission" + } + }, + "title": "AclModify", + "additionalProperties": false, + "description": "Schema for modifying an existing ACL." + }, + "fileStorageLabelModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "environment", + "value": "production" + } + ], + "properties": { + "key": { + "$ref": "#/components/schemas/fileStorageLabelKey" + }, + "value": { + "$ref": "#/components/schemas/fileStorageLabelValue" + } + }, + "title": "LabelModify", + "additionalProperties": false, + "description": "Schema for modifying an existing label." + }, + "fileStorageServiceListResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "configured_status": "started", + "created_at": "2025-08-01T10:40:04.140473Z", + "encrypted": false, + "labels": [ + { + "key": "environment", + "value": "production" + } + ], + "name": "test2", + "networks": [ + { + "family": "IPv4", + "ip_address": "10.10.10.50", + "name": "net", + "uuid": "0391f203-6eef-4a69-bfcc-fffffbdfdc32" + } + ], + "operational_state": "running", + "shares": [ + { + "acl": [ + { + "name": "test-name", + "permission": "ro", + "target": "*" + } + ], + "name": "read", + "path": "/public" + }, + { + "acl": [ + { + "name": "test-name", + "permission": "rw", + "target": "10.10.10.0/24" + }, + { + "name": "test-name", + "permission": "rw", + "target": "local.domain" + } + ], + "name": "write", + "path": "/project/data" + } + ], + "size_gib": 250, + "state_messages": [], + "updated_at": "2025-08-03T19:23:52.350216Z", + "uuid": "17871d62-6964-4336-b68d-4a85a8ee10fe", + "zone": "fi-dev2" + } + ] + ], + "items": { + "$ref": "#/components/schemas/fileStorageServiceDetailResponse" + }, + "title": "ServiceListResponse", + "description": "Schema for the response containing a list of services." + }, + "fileStorageServiceDetailResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "configured_status": "started", + "created_at": "2025-08-01T10:40:04.140473Z", + "encrypted": false, + "labels": [ + { + "key": "environment", + "value": "production" + } + ], + "name": "test2", + "networks": [ + { + "family": "IPv4", + "ip_address": "10.10.10.50", + "name": "net", + "uuid": "0391f203-6eef-4a69-bfcc-fffffbdfdc32" + } + ], + "operational_state": "running", + "shares": [ + { + "acl": [ + { + "name": "test-name", + "permission": "ro", + "target": "*" + } + ], + "name": "read", + "path": "/public" + }, + { + "acl": [ + { + "name": "test-name", + "permission": "rw", + "target": "10.10.10.0/24" + }, + { + "name": "test-name", + "permission": "rw", + "target": "local.domain" + } + ], + "name": "write", + "path": "/project/data" + } + ], + "size_gib": 250, + "state_messages": [], + "updated_at": "2025-08-03T19:23:52.350216Z", + "uuid": "17871d62-6964-4336-b68d-4a85a8ee10fe", + "zone": "fi-dev2" + } + ], + "properties": { + "uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "zone": { + "type": "string" + }, + "configured_status": { + "type": "string" + }, + "operational_state": { + "type": "string" + }, + "size_gib": { + "type": "integer", + "format": "int32" + }, + "encrypted": { + "type": "boolean" + }, + "networks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fileStorageNetworkDetailResponse" + } + }, + "shares": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fileStorageShareDetailResponse" + } + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/fileStorageLabelDetails" + } + }, + "state_messages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "operational_state": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + } + } + } + }, + "created_at": { + "type": "string", + "examples": [ + "2025-08-01T10:40:04.140473Z" + ], + "format": "date-time" + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-08-01T10:40:04.140473Z" + ], + "format": "date-time" + } + }, + "title": "ServiceDetailResponse", + "description": "Schema for the detailed response of a service." + }, + "fileStorageNetworkDetailResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "family": "IPv4", + "ip_address": "192.168.147.250", + "name": "test-name", + "uuid": "03720d07-80a9-41ac-90b0-68a932109339" + } + ], + "properties": { + "family": { + "type": "string" + }, + "ip_address": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "title": "NetworkDetailResponse", + "description": "Schema for the detailed response of a network." + }, + "fileStorageShareDetailResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "acl": [ + { + "name": "test-name", + "permission": "rw", + "target": "*" + } + ], + "name": "write", + "path": "/project/data" + } + ], + "properties": { + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "acl": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "target": { + "type": "string" + }, + "permission": { + "type": "string" + } + } + } + } + }, + "title": "ShareDetailResponse", + "description": "Schema for the detailed response of a share." + }, + "fileStorageLabelDetails": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "environment", + "value": "production" + } + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "title": "LabelDetails", + "description": "Schema for label details including key-value pairs." + }, + "fileStorageErrorResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_INVALID_REQUEST", + "title": "Validation error.", + "invalid_params": [ + { + "name": "configured_status", + "reason": "Value must be one of \"started\", \"stopped\"." + } + ], + "correlation_id": "01K1RPB4Z1EXJSBFHTVGJD00CV", + "status": 400 + }, + { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_RESOURCE_NOT_FOUND", + "title": "The resource you requested does not exist.", + "correlation_id": "01K1ZJC6MSN91RQS3JMEESGG92", + "status": 404 + }, + { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_GENERAL_FAILURE", + "title": "Your request could not be fulfilled due to a technical issue.", + "correlation_id": "01HEPYJ027RF0H29CKHWHCH7RE", + "status": 500 + } + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "https://developers.upcloud.com/1.3/errors#ERROR_INVALID_REQUEST", + "https://developers.upcloud.com/1.3/errors#ERROR_RESOURCE_NOT_FOUND", + "https://developers.upcloud.com/1.3/errors#ERROR_INSUFFICIENT_CREDITS", + "https://developers.upcloud.com/1.3/errors#ERROR_GENERAL_FAILURE" + ], + "description": "Error code string." + }, + "title": { + "type": "string", + "examples": [ + "Validation error.", + "The resource you requested does not exist.", + "Your request could not be fulfilled due to a technical issue." + ], + "description": "Short description of the error." + }, + "correlation_id": { + "type": "string", + "examples": [ + "01K1K2TKEASWRJ6VFP9ZV5P2H4" + ], + "description": "Unique identifier for the request, useful for debugging." + }, + "status": { + "type": "integer", + "examples": [ + 400, + 404, + 402, + 500 + ], + "format": "int32", + "description": "HTTP status code associated with the error." + }, + "invalid_params": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "examples": [ + "zone", + "networks.0.ip_address" + ], + "description": "Path to the field with invalid parameter." + }, + "reason": { + "type": "string", + "examples": [ + "Zone is not valid." + ], + "description": "Human-readable error message." + } + }, + "required": [ + "name", + "reason" + ] + }, + "title": "InvalidParameters", + "description": "List of invalid parameters in the request." + } + }, + "title": "ErrorResponse", + "required": [ + "type", + "title", + "correlation_id", + "status" + ], + "additionalProperties": false, + "description": "Schema for error responses from the API." + }, + "fileStorageNetworkListResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "family": "IPv4", + "ip_address": "192.168.147.250", + "name": "test-name", + "uuid": "03720d07-80a9-41ac-90b0-68a932109339" + } + ] + ], + "items": { + "$ref": "#/components/schemas/fileStorageNetworkDetailResponse" + }, + "title": "NetworkListResponse", + "description": "Schema for the response containing a list of networks." + }, + "fileStorageShareListResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "name": "write", + "path": "/project/data", + "acl": [ + { + "name": "test-name", + "target": "*", + "permission": "rw" + } + ] + }, + { + "name": "read", + "path": "/project/logs", + "acl": [ + { + "name": "test-name", + "target": "192.168.147.0/24", + "permission": "ro" + } + ] + } + ] + ], + "items": { + "$ref": "#/components/schemas/fileStorageShareDetailResponse" + }, + "title": "ShareListResponse", + "description": "Schema for the response containing a list of shares." + }, + "fileStorageAclListResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "name": "test-name-1", + "target": "*", + "permission": "rw" + }, + { + "name": "test-name-2", + "target": "192.168.147.0/24", + "permission": "ro" + } + ] + ], + "items": { + "$ref": "#/components/schemas/fileStorageAclDetailResponse" + }, + "title": "AclListResponse", + "description": "Schema for the response containing a list of ACLs." + }, + "fileStorageAclDetailResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "test-name", + "permission": "rw", + "target": "*" + } + ], + "properties": { + "name": { + "type": "string" + }, + "target": { + "type": "string" + }, + "permission": { + "type": "string" + } + }, + "title": "AclDetailResponse", + "description": "Schema for the detailed response of an ACL." + }, + "fileStorageLabelsListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "key": "environment", + "value": "production" + } + ] + ], + "items": { + "$ref": "#/components/schemas/fileStorageLabelDetails" + }, + "title": "LabelsListResponse", + "description": "Response schema for listing labels." + }, + "LogicalDatabaseCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "my_database", + "lc_collate": "en_US.UTF-8", + "lc_ctype": "en_US.UTF-8" + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "my_database" + ], + "description": "logical database name" + }, + "lc_collate": { + "type": "string", + "examples": [ + "en_US.UTF-8" + ], + "description": "Collation order" + }, + "lc_ctype": { + "type": "string", + "examples": [ + "en_US.UTF-8" + ], + "description": "Category of a locale definition source file" + } + }, + "title": "LogicalDatabaseCreate", + "required": [ + "name" + ], + "additionalProperties": false, + "description": "Schema for creating a logical database." + }, + "LogicalDatabasesResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "name": "postgres", + "lc_collate": "en_US.UTF-8", + "lc_ctype": "en_US.UTF-8" + } + ], + [ + { + "name": "mydb", + "lc_collate": "en_US.UTF-8", + "lc_ctype": "en_US.UTF-8" + }, + { + "name": "testdb", + "lc_collate": "en_US.UTF-8", + "lc_ctype": "en_US.UTF-8" + } + ] + ], + "items": { + "$ref": "#/components/schemas/LogicalDatabaseResponse" + }, + "title": "LogicalDatabasesResponse", + "description": "A list of logical databases." + }, + "LogicalDatabaseResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "postgres", + "lc_collate": "en_US.UTF-8", + "lc_ctype": "en_US.UTF-8" + } + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the logical database.", + "example": "postgres" + }, + "lc_collate": { + "type": "string", + "description": "The LC_COLLATE setting of the logical database.", + "example": "en_US.UTF-8" + }, + "lc_ctype": { + "type": "string", + "description": "The LC_CTYPE setting of the logical database.", + "example": "en_US.UTF-8" + } + }, + "title": "LogicalDatabaseResponse", + "description": "Schema for a logical database response." + }, + "databaseServiceType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "mysql", + "pg", + "opensearch", + "valkey" + ], + "title": "ServiceType", + "enum": [ + "mysql", + "pg", + "opensearch", + "valkey" + ], + "description": "The type of service." + }, + "databaseQueryParamLimit": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "examples": [ + 10, + 25, + 50, + 100 + ], + "title": "QueryParamLimit", + "maximum": 100, + "minimum": 0, + "description": "Schema for a query parameter specifying the maximum number of entries to return (limit).", + "default": 10 + }, + "databaseQueryParamOffset": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "examples": [ + 0, + 10, + 20, + 50 + ], + "title": "QueryParamOffset", + "minimum": 0, + "description": "Schema for a query parameter specifying the offset for pagination.", + "default": 0 + }, + "databaseQueryParamSort": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "-created_at", + "name", + "-zone" + ], + "title": "QueryParamSort", + "enum": [ + "created_at", + "-created_at", + "name", + "-name", + "operational_state", + "-operational_state", + "zone", + "-zone" + ], + "description": "Schema for a query parameter specifying the sort field and direction. Prefix with '-' for descending order." + }, + "databaseUuid": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "01234567-89ab-cdef-0123-456789abcdef", + "fedcba98-7654-3210-fedc-ba9876543210" + ], + "title": "UUID", + "format": "uuid", + "description": "The unique identifier for the integration." + }, + "databaseLabelKey": { + "type": "string", + "examples": [ + "foo" + ], + "title": "LabelKey", + "maxLength": 32, + "minLength": 2, + "pattern": "^[\\x20-\\x5E\\x60-\\x7E][\\x20-\\x7E]+$", + "description": "The key of a label." + }, + "databaseIntegrationUUID": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "01234567-89ab-cdef-0123-456789abcdef", + "fedcba98-7654-3210-fedc-ba9876543210" + ], + "title": "IntegrationUUID", + "format": "uuid", + "description": "The unique identifier for the service." + }, + "databaseQueryParamOrder": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "asc", + "desc" + ], + "title": "QueryParamOrder", + "description": "Schema for a query parameter specifying the order." + }, + "databaseTitle": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "my-service" + ], + "title": "Title", + "maxLength": 64, + "minLength": 1, + "description": "The title of an entity." + }, + "databaseId": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "examples": [ + 1001, + 1002 + ], + "title": "ID", + "format": "int32", + "description": "The unique identifier for the integration." + }, + "databaseServiceCreateOpenAPI": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "hostname_prefix": "doc-api-unique-prefix", + "plan": "1x1xCPU-2GB-25GB", + "additional_disk_space_gib": 10, + "title": "my-managed-database", + "type": "mysql", + "zone": "de-fra1", + "maintenance": { + "dow": "sunday", + "time": "05:00:00" + }, + "termination_protection": false, + "properties": { + "automatic_utility_network_ip_filter": true, + "version": "8", + "ip_filter": [] + }, + "networks": [ + { + "name": "example-network-1", + "type": "private", + "family": "IPv4", + "uuid": "03631160-d57a-4926-ad48-a2f828229dcb" + }, + { + "name": "example-network-2", + "type": "private", + "family": "IPv4", + "uuid": "03631160-d57a-4926-ad48-a2f828229dcb" + } + ], + "labels": [ + { + "key": "env", + "value": "staging" + }, + { + "key": "foo", + "value": "bar" + } + ] + } + ], + "properties": { + "hostname_prefix": { + "type": "string", + "examples": [ + "doc-api-unique-prefix" + ], + "maxLength": 30, + "minLength": 3, + "description": "Hostname prefix for the service nodes." + }, + "title": { + "type": "string", + "examples": [ + "my-managed-database" + ], + "description": "Human-readable title for the service." + }, + "type": { + "$ref": "#/components/schemas/databaseServiceType" + }, + "zone": { + "type": "string", + "examples": [ + "de-fra1" + ], + "pattern": "^[a-z]{2}-[a-z]{3}\\d$", + "description": "Zone where the service is created." + }, + "set_service_uuid": { + "type": "string", + "examples": [ + "550e8400-e29b-41d4-a716-446655440000" + ], + "format": "uuid", + "description": "Optional UUID to assign to the created service." + }, + "plan": { + "type": "string", + "examples": [ + "1x1xCPU-2GB-25GB", + "rdb.standard.2x-2CPU-8GB-120GB-regular" + ], + "description": "Deprecated: prefer the plan_* selection fields (plan_compute, plan_node_count, plan_storage_gib, plan_backups) for PostgreSQL and MySQL. The plan name remains supported, and required for engines without componentised plans. For componentised (rdb.*) plans the storage segment is the desired TOTAL storage per node: any total reachable from a catalog plan's included storage in the plan's storage steps (within its cap) is a valid plan name, e.g. rdb.standard.2x-2CPU-8GB-120GB-regular selects the 80GB catalog plan with a 40GB dynamic top-up.", + "deprecated": true + }, + "plan_compute": { + "type": "string", + "examples": [ + "rdb.standard.2CPU-8GB" + ], + "description": "Plan selection: compute shape combining family, CPU and memory as one token, as listed in the plan catalog components. PostgreSQL and MySQL only." + }, + "plan_node_count": { + "type": "integer", + "examples": [ + 1 + ], + "description": "Plan selection: number of nodes." + }, + "plan_storage_gib": { + "type": "integer", + "examples": [ + 120 + ], + "description": "Plan selection: desired TOTAL storage per node in GiB. Resolution picks the plan whose included storage matches, or tops the closest plan up with dynamic additional storage within the allowed limits. Mutually exclusive with additional_disk_space_gib." + }, + "plan_backups": { + "type": "string", + "examples": [ + "regular" + ], + "enum": [ + "mini", + "regular", + "extended" + ], + "description": "Plan selection: backup tier. PostgreSQL and MySQL tiered plans only." + }, + "additional_disk_space_gib": { + "type": "integer", + "examples": [ + 10 + ], + "description": "Additional disk space in GiB. Legacy plans only: componentised (rdb.*) plans set storage as a total via plan_storage_gib or the plan name.", + "deprecated": true + }, + "termination_protection": { + "type": "boolean", + "examples": [ + false + ], + "description": "When enabled, the service cannot be deleted until termination protection is disabled." + }, + "maintenance": { + "type": "object", + "examples": [ + { + "dow": "sunday", + "time": "05:00:00" + } + ], + "properties": { + "dow": { + "$ref": "#/components/schemas/databaseMaintenanceDow" + }, + "time": { + "$ref": "#/components/schemas/databaseMaintenanceTime" + } + }, + "required": [ + "dow", + "time" + ], + "description": "Weekly maintenance window." + }, + "networks": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/databaseNetworkCreate" + }, + "maxItems": 8, + "description": "SDN networks to attach to the service." + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseLabelCreate" + }, + "maxItems": 255, + "description": "Labels used for service filtering." + }, + "service_integrations": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/databaseServiceIntegrationCreate" + }, + "description": "Service integrations to configure on creation." + }, + "properties": { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/databaseServicePropertiesMysql" + }, + { + "$ref": "#/components/schemas/databaseServicePropertiesPg" + }, + { + "$ref": "#/components/schemas/databaseServicePropertiesRedis" + }, + { + "$ref": "#/components/schemas/databaseServicePropertiesOpensearch" + }, + { + "$ref": "#/components/schemas/databaseServicePropertiesValkey" + } + ], + "description": "Engine-specific configuration properties. The allowed keys depend on the selected service type; provide the property set matching the chosen type." + } + }, + "title": "ServiceCreateOpenAPI", + "required": [ + "hostname_prefix", + "title", + "type", + "zone" + ], + "additionalProperties": false, + "description": "Schema for creating a service β€” OpenAPI version." + }, + "databaseMaintenanceDow": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "sunday", + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday" + ], + "title": "MaintenanceDow", + "enum": [ + "sunday", + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday" + ], + "description": "Day of the week for maintenance window" + }, + "databaseMaintenanceTime": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "02:00:00", + "14:30:00", + "23:45:00" + ], + "title": "MaintenanceTime", + "description": "Time of day for maintenance window in HH:MM:SS format" + }, + "databaseNetworkCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "my-network", + "type": "public", + "family": "IPv4" + }, + { + "uuid": "123e4567-e89b-12d3-a456-426614174000", + "name": "my-network", + "type": "public", + "family": "IPv4" + } + ], + "properties": { + "uuid": { + "type": "string", + "examples": [ + "123e4567-e89b-12d3-a456-426614174000" + ], + "format": "uuid", + "description": "Optional UUID for the network. If not provided, a new UUID will be generated." + }, + "name": { + "$ref": "#/components/schemas/databaseNetworkName" + }, + "type": { + "$ref": "#/components/schemas/databaseNetworkType" + }, + "family": { + "$ref": "#/components/schemas/databaseNetworkFamily" + } + }, + "title": "NetworkCreate", + "required": [ + "name", + "type", + "family" + ], + "additionalProperties": false, + "description": "Schema for creating a network." + }, + "databaseNetworkName": { + "type": "string", + "examples": [ + "private-network", + "public-network" + ], + "title": "NetworkName", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "The name of the network." + }, + "databaseNetworkType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "private" + ], + "title": "NetworkType", + "enum": [ + "private" + ], + "description": "The type of network." + }, + "databaseNetworkFamily": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "IPv4", + "IPv6" + ], + "title": "NetworkFamily", + "enum": [ + "IPv4", + "IPv6" + ], + "description": "The network protocol family." + }, + "databaseLabelCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "environment", + "value": "production" + } + ], + "properties": { + "key": { + "$ref": "#/components/schemas/databaseLabelKey" + }, + "value": { + "$ref": "#/components/schemas/databaseLabelValue" + } + }, + "title": "LabelCreate", + "required": [ + "key", + "value" + ], + "additionalProperties": false, + "description": "Schema for creating a label with a key and value." + }, + "databaseLabelValue": { + "type": "string", + "examples": [ + "bar" + ], + "title": "LabelValue", + "maxLength": 255, + "pattern": "\\A[\\p{L}\\p{N}\\p{P}\\p{S}\\p{M}\\p{Z}]*\\z", + "description": "The value of a label." + }, + "databaseServiceIntegrationCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "type": "logs", + "destination_uuid": "09e86f48-2dcd-4a43-843d-3532ab112c1d", + "properties": { + "opensearch_index_days_max": 30, + "opensearch_index_prefix": "mysql_logs" + } + } + ], + "properties": { + "type": { + "$ref": "#/components/schemas/databaseServiceIntegration" + }, + "destination_uuid": { + "type": "string", + "examples": [ + "123e4567-e89b-12d3-a456-426614174000" + ], + "format": "uuid", + "description": "The UUID of the destination where the service integration will send data." + }, + "properties": { + "type": "object" + } + }, + "title": "ServiceIntegrationCreate", + "required": [ + "type" + ], + "additionalProperties": false, + "description": "Schema for creating a service integration." + }, + "databaseServiceIntegration": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "logs", + "rsyslog", + "prometheus" + ], + "title": "ServiceIntegration", + "enum": [ + "logs", + "prometheus", + "rsyslog" + ], + "description": "The type of service integration." + }, + "databaseServicePropertiesMysql": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "admin_password": { + "type": [ + "string", + "null" + ], + "maxLength": 256, + "minLength": 8, + "pattern": "^[a-zA-Z0-9-_]+$" + }, + "admin_username": { + "type": [ + "string", + "null" + ], + "maxLength": 64, + "pattern": "^[_A-Za-z0-9][-._A-Za-z0-9]{0,63}$" + }, + "automatic_sp_privileges": { + "type": "boolean", + "description": "When enabled, the server automatically grants the EXECUTE and ALTER ROUTINE privileges to the creator of a stored routine and drops them when the routine is dropped." + }, + "automatic_utility_network_ip_filter": { + "type": "boolean", + "description": "Automatically allow connections from servers in the utility network within the same zone" + }, + "backup_hour": { + "type": "integer", + "maximum": 23, + "minimum": 0 + }, + "backup_minute": { + "type": "integer", + "maximum": 59, + "minimum": 0 + }, + "binlog_retention_period": { + "type": "integer", + "maximum": 9007199254740991, + "minimum": 600, + "description": "Warning: reducing this value can make a large batch of binary logs eligible for purge at once. Depending on the volume, this can sometimes stall the MySQL commit path and block writes until the purge completes. To stay on the safe side, prefer lowering the value gradually in small decrements during a low-traffic window rather than dropping it drastically in one step." + }, + "connect_timeout": { + "type": "integer", + "maximum": 3600, + "minimum": 2, + "description": "The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake" + }, + "default_time_zone": { + "type": "string", + "maxLength": 100, + "minLength": 2, + "pattern": "^([-+][\\d:]*|[\\w/]*)$", + "description": "Default server time zone as an offset from UTC (from -12:00 to +12:00), a time zone name, or 'SYSTEM' to use the MySQL server default." + }, + "div_precision_increment": { + "type": "integer", + "maximum": 30, + "minimum": 0, + "description": "Number of digits by which to increase the scale of the result of division operations performed with the / operator. Default is 4." + }, + "end_markers_in_json": { + "type": "boolean", + "description": "Whether optimizer JSON output such as EXPLAIN FORMAT=JSON adds end markers that repeat a structure's key near its closing bracket, making large JSON structures easier to read." + }, + "eq_range_index_dive_limit": { + "type": "integer", + "maximum": 4294967295, + "minimum": 0, + "description": "The number of equality ranges in a query at or above which the optimizer switches from index dives to index statistics when estimating the number of qualifying rows. 0 means always use index dives. Default is 200." + }, + "group_concat_max_len": { + "type": "integer", + "maximum": 18446744073709552000, + "minimum": 4, + "description": "The maximum permitted result length in bytes for the GROUP_CONCAT() function." + }, + "information_schema_stats_expiry": { + "type": "integer", + "maximum": 31536000, + "minimum": 900, + "description": "The time, in seconds, before cached statistics expire" + }, + "innodb_adaptive_hash_index": { + "type": "boolean", + "description": "Whether InnoDB adaptive hash indexing is enabled. The optimal setting is workload-dependent: it speeds up lookups for some workloads but its internal latch can become a contention point under high concurrency, in which case disabling it can improve throughput." + }, + "innodb_change_buffer_max_size": { + "type": "integer", + "maximum": 50, + "minimum": 0, + "description": "Maximum size for the InnoDB change buffer, as a percentage of the total size of the buffer pool. Default is 25" + }, + "innodb_flush_neighbors": { + "type": "integer", + "maximum": 2, + "minimum": 0, + "description": "Specifies whether flushing a page from the InnoDB buffer pool also flushes other dirty pages in the same extent (default is 1): 0 - dirty pages in the same extent are not flushed, 1 - flush contiguous dirty pages in the same extent, 2 - flush dirty pages in the same extent" + }, + "innodb_ft_enable_stopword": { + "type": "boolean", + "description": "Whether stopword processing is applied when creating or rebuilding an InnoDB FULLTEXT index. Enabled by default." + }, + "innodb_ft_max_token_size": { + "type": "integer", + "maximum": 84, + "minimum": 10, + "description": "Maximum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service." + }, + "innodb_ft_min_token_size": { + "type": "integer", + "maximum": 16, + "minimum": 0, + "description": "Minimum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service." + }, + "innodb_ft_num_word_optimize": { + "type": "integer", + "maximum": 10000, + "minimum": 1000, + "description": "Number of words processed during each OPTIMIZE TABLE operation on an InnoDB FULLTEXT index. Default is 2000." + }, + "innodb_ft_result_cache_limit": { + "type": "integer", + "maximum": 4294967295, + "minimum": 1000000, + "description": "Maximum memory in bytes used per query for the InnoDB FULLTEXT search query result cache. UpCloud sizes this automatically based on the service plan's memory; setting a value overrides the calculated default." + }, + "innodb_ft_server_stopword_table": { + "type": [ + "null", + "string" + ], + "maxLength": 1024, + "pattern": "^.+/.+$", + "description": "This option is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB tables." + }, + "innodb_ft_user_stopword_table": { + "type": [ + "null", + "string" + ], + "maxLength": 1024, + "pattern": "^.+/.+$", + "description": "This option is used to specify your own InnoDB FULLTEXT index stopword list for specific InnoDB tables." + }, + "innodb_io_capacity": { + "type": "integer", + "maximum": 4294967295, + "minimum": 100, + "description": "The number of I/O operations per second (IOPS) available to InnoDB background tasks, such as flushing pages from the buffer pool and merging data from the change buffer. Set this to a value appropriate for the underlying storage; it must not exceed innodb_io_capacity_max." + }, + "innodb_io_capacity_max": { + "type": "integer", + "maximum": 4294967295, + "minimum": 100, + "description": "The maximum number of I/O operations per second (IOPS) that InnoDB background tasks may perform when flushing falls behind. Defaults to twice innodb_io_capacity (minimum 2000). This must be greater than or equal to innodb_io_capacity." + }, + "innodb_lock_wait_timeout": { + "type": "integer", + "maximum": 3600, + "minimum": 1, + "description": "The length of time in seconds an InnoDB transaction waits for a row lock before giving up. Default is 120." + }, + "innodb_log_buffer_size": { + "type": "integer", + "maximum": 4294967296, + "minimum": 1048576, + "description": "The size in bytes of the buffer that InnoDB uses to write to the log files on disk. Requests above 15% of the RAM provided by your service plan are rejected, because a larger buffer leaves less memory for the buffer pool and client connections." + }, + "innodb_online_alter_log_max_size": { + "type": "integer", + "maximum": 1099511627776, + "minimum": 65536, + "description": "The upper limit in bytes on the size of the temporary log files used during online DDL operations for InnoDB tables." + }, + "innodb_optimize_fulltext_only": { + "type": "boolean", + "description": "When enabled, OPTIMIZE TABLE on InnoDB tables only updates the FULLTEXT index instead of rebuilding the table. Intended to be enabled temporarily during FULLTEXT index maintenance and disabled afterwards; while enabled, OPTIMIZE TABLE does not reclaim table space." + }, + "innodb_print_all_deadlocks": { + "type": "boolean", + "description": "When enabled, information about all deadlocks in InnoDB user transactions is recorded in the error log. Disabled by default." + }, + "innodb_read_io_threads": { + "type": "integer", + "maximum": 64, + "minimum": 1, + "description": "The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service." + }, + "innodb_rollback_on_timeout": { + "type": "boolean", + "description": "When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction. Changing this parameter will lead to a restart of the MySQL service." + }, + "innodb_thread_concurrency": { + "type": "integer", + "maximum": 1000, + "minimum": 0, + "description": "Defines the maximum number of threads permitted inside of InnoDB. Default is 0 (infinite concurrency - no limit)" + }, + "innodb_write_io_threads": { + "type": "integer", + "maximum": 64, + "minimum": 1, + "description": "The number of I/O threads for write operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service." + }, + "interactive_timeout": { + "type": "integer", + "maximum": 604800, + "minimum": 30, + "description": "The number of seconds the server waits for activity on an interactive connection before closing it." + }, + "internal_tmp_mem_storage_engine": { + "type": "string", + "enum": [ + "TempTable", + "MEMORY" + ], + "description": "The storage engine for in-memory internal temporary tables." + }, + "ip_filter": { + "type": "array", + "items": { + "type": "string", + "title": "CIDR address block", + "maxLength": 18, + "example": [ + "10.0.0.0/24" + ] + }, + "description": "Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'" + }, + "log_output": { + "type": "string", + "enum": [ + "INSIGHTS", + "TABLE", + "INSIGHTS,TABLE", + "NONE" + ], + "description": "The slow log output destination when slow_query_log is ON. To enable MySQL AI Insights, choose INSIGHTS. To use MySQL AI Insights and the mysql.slow_log table at the same time, choose INSIGHTS,TABLE. To only use the mysql.slow_log table, choose TABLE. To silence slow logs, choose NONE." + }, + "long_query_time": { + "type": "number", + "maximum": 3600, + "minimum": 0, + "description": "The slow_query_logs work as SQL statements that take more than long_query_time seconds to execute." + }, + "lower_case_table_names": { + "type": "integer", + "enum": [ + 0, + 1 + ], + "description": "Sets how table and database names are stored and compared. 0 = case-sensitive (default), 1 = names stored lowercase, comparisons are case-insensitive. This option can only be set when creating the service and cannot be changed later. See https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html for details." + }, + "max_allowed_packet": { + "type": "integer", + "maximum": 1073741824, + "minimum": 102400, + "description": "Size of the largest message in bytes that can be received by the server. Default is 67108864 (64M). Statements and rows larger than this are rejected with a packet too large error." + }, + "max_connections": { + "type": "integer", + "maximum": 100000, + "minimum": 30, + "description": "The maximum permitted number of simultaneous client connections. Lower this to reserve memory for other work. The value cannot exceed the limit provided by your service plan. Upgrading the plan does not raise a value you have set explicitly, so increase it yourself after an upgrade." + }, + "max_execution_time": { + "type": "integer", + "maximum": 4294967295, + "minimum": 0, + "description": "Execution timeout in milliseconds for read-only top-level SELECT statements. 0 (the default) means no timeout." + }, + "max_heap_table_size": { + "type": "integer", + "maximum": 1073741824, + "minimum": 1048576, + "description": "Limits the size of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M)" + }, + "max_seeks_for_key": { + "type": "integer", + "maximum": 18446744073709552000, + "minimum": 1, + "description": "Limit on the assumed maximum number of index seeks when looking up rows based on a key. Lowering this value causes the optimizer to prefer index lookups over table scans." + }, + "max_user_connections": { + "type": "integer", + "maximum": 99990, + "minimum": 0, + "description": "The maximum number of simultaneous connections permitted to any single user account. 0, the default, means no per-account limit. Any other value must be at least 10 below max_connections, so that monitoring and your own admin sessions can still connect when an application saturates its own limit. UpCloud's replication and management connections are unaffected however low you set this." + }, + "migration": { + "type": [ + "object", + "null" + ], + "properties": { + "dbname": { + "type": "string", + "title": "Database name for bootstrapping the initial connection", + "maxLength": 63 + }, + "dump_tool": { + "type": [ + "string", + "null" + ], + "title": "MySQL migration dump tool", + "enum": [ + "mysqldump", + "mydumper", + null + ], + "description": "Experimental! Tool to use for database dump and restore during migration. Default: mysqldump" + }, + "host": { + "type": "string", + "title": "Hostname or IP address of the server where to migrate data from", + "maxLength": 255 + }, + "ignore_dbs": { + "type": "string", + "title": "Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment)", + "maxLength": 2048 + }, + "ignore_roles": { + "type": "string", + "title": "Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment)", + "maxLength": 2048 + }, + "method": { + "type": "string", + "title": "The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types)", + "enum": [ + "dump", + "replication" + ] + }, + "password": { + "type": "string", + "title": "Password for authentication with the server where to migrate data from", + "maxLength": 256 + }, + "port": { + "type": "integer", + "title": "Port number of the server where to migrate data from", + "maximum": 65535, + "minimum": 1 + }, + "reestablish_replication": { + "type": "boolean", + "title": "Skip dump-restore part and start replication" + }, + "ssl": { + "type": "boolean", + "title": "The server where to migrate data from is secured with SSL" + }, + "username": { + "type": "string", + "title": "User name for authentication with the server where to migrate data from", + "maxLength": 256 + } + }, + "required": [ + "host", + "port" + ], + "additionalProperties": false + }, + "mysql_incremental_backup": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enable incremental backups", + "description": "Enable periodic incremental backups. When enabled, full_backup_week_schedule must be set. Incremental backups only store changes since the last backup, making them faster and more storage-efficient than full backups. This is particularly useful for large databases where daily full backups would be too time-consuming or expensive." + }, + "full_backup_week_schedule": { + "type": [ + "string", + "null" + ], + "title": "Full backup week schedule", + "pattern": "^[a-z]+(,[a-z]+)*$", + "description": "Comma-separated list of days of the week when full backups should be created. Valid values: mon, tue, wed, thu, fri, sat, sun" + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false + }, + "net_buffer_length": { + "type": "integer", + "maximum": 1048576, + "minimum": 1024, + "description": "Start sizes of connection buffer and result buffer. Default is 16384 (16K). Changing this parameter will lead to a restart of the MySQL service." + }, + "net_read_timeout": { + "type": "integer", + "maximum": 3600, + "minimum": 1, + "description": "The number of seconds to wait for more data from a connection before aborting the read." + }, + "net_write_timeout": { + "type": "integer", + "maximum": 3600, + "minimum": 1, + "description": "The number of seconds to wait for a block to be written to a connection before aborting the write." + }, + "optimizer_prune_level": { + "type": "integer", + "maximum": 1, + "minimum": 0, + "description": "Controls the heuristics applied during query optimization to prune less-promising partial plans from the optimizer search space. 0 disables heuristics (exhaustive search); 1 prunes plans based on the number of rows retrieved." + }, + "optimizer_search_depth": { + "type": "integer", + "maximum": 62, + "minimum": 0, + "description": "Maximum depth of search performed by the query optimizer when choosing a join order. Larger values produce better plans for joins over many tables but take longer to compile; 0 lets the optimizer choose the depth automatically." + }, + "optimizer_switch": { + "type": "string", + "pattern": "^(default|[a-z_]+=(on|off|default)(,[a-z_]+=(on|off|default))*)$", + "description": "Comma-separated list of optimizer flag assignments in the form flag=on|off|default, or the single value 'default' to reset all flags. Flags not listed keep their current values. Controls query optimizer behaviors such as index merge, hash join and semijoin strategies." + }, + "performance_schema_events_statements_history_size": { + "type": [ + "integer", + "null" + ], + "maximum": 1024, + "minimum": 0, + "description": "The number of rows per thread in the events_statements_history table. Changing this parameter will lead to a restart of the MySQL service." + }, + "public_access": { + "type": "boolean", + "description": "Allow access to the service from the public Internet" + }, + "public_access_prometheus": { + "type": "boolean", + "description": "Allow access to Prometheus metrics from the public Internet" + }, + "relay_log_space_limit": { + "type": "integer", + "maximum": 18446744073709552000, + "minimum": 134217728, + "description": "The maximum amount of space in bytes to use for all relay logs while replicating from an external migration source. When the limit is reached, the replication I/O thread stops fetching relay log events until the SQL thread has caught up. Raise this to give a large migration a bigger relay-log budget; ensure the service disk is sized accordingly. The setting applies only on the node replicating from the external source; standby nodes always use the UpCloud-managed default (the smaller of 5 GiB and 30% of the service disk), which is also used when this option is left unset. Changing this parameter will lead to a restart of the MySQL service." + }, + "service_log": { + "type": [ + "boolean", + "null" + ], + "description": "Store logs for the service so that they are available in the HTTP API and console." + }, + "slow_query_log": { + "type": "boolean", + "description": "Slow query log enables capturing of slow queries. Setting slow_query_log to false also truncates the mysql.slow_log table." + }, + "sort_buffer_size": { + "type": "integer", + "maximum": 1073741824, + "minimum": 32768, + "description": "Sort buffer size in bytes for ORDER BY optimization. Default is 262144 (256K). Requests above 2% of the RAM provided by your service plan are rejected, because the buffer is allocated per session and its cost multiplies with the connection count." + }, + "sql_mode": { + "type": "string", + "maxLength": 1024, + "pattern": "^[A-Z_]*(,[A-Z_]+)*$", + "description": "Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field UpCloud default SQL mode (strict, SQL standard compliant) will be assigned." + }, + "sql_require_primary_key": { + "type": "boolean", + "description": "Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them." + }, + "tmp_table_size": { + "type": "integer", + "maximum": 1073741824, + "minimum": 1048576, + "description": "Limits the size of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M)" + }, + "version": { + "type": "string", + "enum": [ + "8.4" + ] + }, + "wait_timeout": { + "type": "integer", + "maximum": 2147483, + "minimum": 1, + "description": "The number of seconds the server waits for activity on a noninteractive connection before closing it. Requests to set this below 30 are rejected, because a shorter timeout closes your own idle connections between statements." + }, + "windowing_use_high_precision": { + "type": "boolean", + "description": "Whether window functions are computed to high precision. Disabling this trades exactness for speed in window function evaluation." + } + }, + "additionalProperties": false, + "description": "mysql properties" + }, + "databaseServicePropertiesPg": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "admin_password": { + "type": [ + "string", + "null" + ], + "maxLength": 256, + "minLength": 8, + "pattern": "^[a-zA-Z0-9-_]+$" + }, + "admin_username": { + "type": [ + "string", + "null" + ], + "maxLength": 64, + "pattern": "^[_A-Za-z0-9][-._A-Za-z0-9]{0,63}$" + }, + "automatic_utility_network_ip_filter": { + "type": "boolean", + "description": "Automatically allow connections from servers in the utility network within the same zone" + }, + "autovacuum_analyze_scale_factor": { + "type": "number", + "maximum": 1, + "minimum": 0, + "description": "Specifies a fraction of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE (e.g. `0.2` for 20% of the table size). The default is `0.2`." + }, + "autovacuum_analyze_threshold": { + "type": "integer", + "maximum": 2147483647, + "minimum": 0, + "description": "Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table. The default is `50`." + }, + "autovacuum_freeze_max_age": { + "type": "integer", + "maximum": 1500000000, + "minimum": 200000000, + "description": "Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. The system launches autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. Changing this parameter causes a service restart." + }, + "autovacuum_max_workers": { + "type": "integer", + "maximum": 20, + "minimum": 1, + "description": "Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is `3`. Changing this parameter causes a service restart." + }, + "autovacuum_naptime": { + "type": "integer", + "maximum": 86400, + "minimum": 1, + "description": "Specifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds. The default is `60`." + }, + "autovacuum_vacuum_cost_delay": { + "type": "integer", + "maximum": 100, + "minimum": -1, + "description": "Specifies the cost delay value that will be used in automatic VACUUM operations. If `-1` is specified, the regular vacuum_cost_delay value will be used. The default is `2` (upstream default)." + }, + "autovacuum_vacuum_cost_limit": { + "type": "integer", + "maximum": 10000, + "minimum": -1, + "description": "Specifies the cost limit value that will be used in automatic VACUUM operations. If `-1` is specified, the regular vacuum_cost_limit value will be used. The default is `-1` (upstream default)." + }, + "autovacuum_vacuum_scale_factor": { + "type": "number", + "maximum": 1, + "minimum": 0, + "description": "Specifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM (e.g. `0.2` for 20% of the table size). The default is `0.2`." + }, + "autovacuum_vacuum_threshold": { + "type": "integer", + "maximum": 2147483647, + "minimum": 0, + "description": "Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is `50`." + }, + "backup_hour": { + "type": [ + "integer", + "null" + ], + "maximum": 23, + "minimum": 0 + }, + "backup_interval_hours": { + "type": [ + "integer", + "null" + ], + "maximum": 24, + "minimum": 3, + "enum": [ + 3, + 4, + 6, + 8, + 12, + 24, + null + ], + "description": "Interval in hours between automatic backups. Minimum value is 3 hours. Must be a divisor of 24 (3, 4, 6, 8, 12, 24). (Applicable to ACU plans only)" + }, + "backup_minute": { + "type": [ + "integer", + "null" + ], + "maximum": 59, + "minimum": 0 + }, + "backup_retention_days": { + "type": [ + "integer", + "null" + ], + "maximum": 30, + "minimum": 1, + "description": "Number of days to retain automatic backups. Backups older than this value will be automatically deleted. (Applicable to ACU plans only)" + }, + "bgwriter_delay": { + "type": "integer", + "maximum": 10000, + "minimum": 10, + "description": "Specifies the delay between activity rounds for the background writer in milliseconds. The default is `200`." + }, + "bgwriter_flush_after": { + "type": "integer", + "maximum": 2048, + "minimum": 0, + "description": "Whenever more than bgwriter_flush_after bytes have been written by the background writer, attempt to force the OS to issue these writes to the underlying storage. Specified in kilobytes. Setting of 0 disables forced writeback. The default is `512`." + }, + "bgwriter_lru_maxpages": { + "type": "integer", + "maximum": 1073741823, + "minimum": 0, + "description": "In each round, no more than this many buffers will be written by the background writer. Setting this to zero disables background writing. The default is `100`." + }, + "bgwriter_lru_multiplier": { + "type": "number", + "maximum": 10, + "minimum": 0, + "description": "The average recent need for new buffers is multiplied by bgwriter_lru_multiplier to arrive at an estimate of the number that will be needed during the next round, (up to bgwriter_lru_maxpages). 1.0 represents a β€œjust in time” policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is `2.0`." + }, + "deadlock_timeout": { + "type": "integer", + "maximum": 1800000, + "minimum": 500, + "description": "This is the amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition. The default is `1000` (upstream default)." + }, + "default_toast_compression": { + "type": "string", + "enum": [ + "lz4", + "pglz" + ], + "description": "Specifies the default TOAST compression method for values of compressible columns. The default is `lz4`. Only available for PostgreSQL 14+." + }, + "enable_ha_replica_dns": { + "type": "boolean", + "description": "Creates a dedicated read-only DNS that automatically falls back to the primary if standby nodes are unavailable. It switches back when a standby recovers." + }, + "idle_in_transaction_session_timeout": { + "type": "integer", + "maximum": 604800000, + "minimum": 0, + "description": "Time out sessions with open transactions after this number of milliseconds" + }, + "io_combine_limit": { + "type": "integer", + "maximum": 32, + "minimum": 1, + "description": "EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units. Version 17 and up only." + }, + "io_max_combine_limit": { + "type": "integer", + "maximum": 128, + "minimum": 1, + "description": "EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units, and silently limits the user-settable parameter io_combine_limit. Version 18 and up only. Changing this parameter causes a service restart." + }, + "io_max_concurrency": { + "type": "integer", + "maximum": 1024, + "minimum": -1, + "description": "EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart." + }, + "io_method": { + "type": "string", + "enum": [ + "worker", + "sync", + "io_uring" + ], + "description": "EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart." + }, + "io_workers": { + "type": "integer", + "maximum": 32, + "minimum": 1, + "description": "EXPERIMENTAL: Number of IO worker processes, for io_method=worker. Version 18 and up only." + }, + "ip_filter": { + "type": "array", + "items": { + "type": "string", + "title": "CIDR address block", + "maxLength": 18, + "example": [ + "10.0.0.0/24" + ] + }, + "description": "Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'" + }, + "jit": { + "type": "boolean", + "description": "Controls system-wide use of Just-in-Time Compilation (JIT)." + }, + "log_autovacuum_min_duration": { + "type": "integer", + "maximum": 2147483647, + "minimum": -1, + "description": "Causes each action executed by autovacuum to be logged if it ran for at least the specified number of milliseconds. Setting this to zero logs all autovacuum actions. Minus-one disables logging autovacuum actions. The default is `1000`." + }, + "log_error_verbosity": { + "type": "string", + "enum": [ + "TERSE", + "DEFAULT", + "VERBOSE" + ], + "description": "Controls the amount of detail written in the server log for each message that is logged." + }, + "log_line_prefix": { + "type": "string", + "enum": [ + "'pid=%p,user=%u,db=%d,app=%a,client=%h '", + "'pid=%p,user=%u,db=%d,app=%a,client=%h,txid=%x,qid=%Q '", + "'%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h '", + "'%m [%p] %q[user=%u,db=%d,app=%a] '" + ], + "description": "Choose from one of the available log formats." + }, + "log_min_duration_statement": { + "type": "integer", + "maximum": 86400000, + "minimum": -1, + "description": "Log statements that take more than this number of milliseconds to run, -1 disables" + }, + "log_temp_files": { + "type": "integer", + "maximum": 2147483647, + "minimum": -1, + "description": "Log statements for each temporary file created larger than this number of kilobytes, -1 disables" + }, + "max_connections": { + "type": "integer", + "maximum": 60000, + "minimum": 25, + "description": "Sets the PostgreSQL maximum number of concurrent connections to the database server. For services with a read replica, first increase the read replica's value. After the change is applied to the replica, you can increase the primary service's value. Changing this parameter causes a service restart." + }, + "max_files_per_process": { + "type": "integer", + "maximum": 4096, + "minimum": 1000, + "description": "PostgreSQL maximum number of files that can be open per process. The default is `1000` (upstream default). Changing this parameter causes a service restart." + }, + "max_locks_per_transaction": { + "type": "integer", + "maximum": 6400, + "minimum": 64, + "description": "PostgreSQL maximum locks per transaction. Changing this parameter causes a service restart." + }, + "max_logical_replication_workers": { + "type": "integer", + "maximum": 256, + "minimum": 4, + "description": "PostgreSQL maximum logical replication workers (taken from the pool defined by max_worker_processes). The default is `4` (upstream default). Changing this parameter causes a service restart." + }, + "max_parallel_workers": { + "type": "integer", + "maximum": 96, + "minimum": 0, + "description": "Sets the maximum number of workers that the system can support for parallel queries. The default is `8` (upstream default)." + }, + "max_parallel_workers_per_gather": { + "type": "integer", + "maximum": 96, + "minimum": 0, + "description": "Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. The default is `2` (upstream default)." + }, + "max_pred_locks_per_transaction": { + "type": "integer", + "maximum": 5120, + "minimum": 64, + "description": "PostgreSQL maximum predicate locks per transaction. The default is `64` (upstream default). Changing this parameter causes a service restart." + }, + "max_prepared_transactions": { + "type": "integer", + "maximum": 10000, + "minimum": 0, + "description": "PostgreSQL maximum prepared transactions. The default is `0`. Changing this parameter causes a service restart." + }, + "max_replication_slots": { + "type": "integer", + "maximum": 256, + "minimum": 8, + "description": "PostgreSQL maximum replication slots. The default is `20`. Changing this parameter causes a service restart." + }, + "max_slot_wal_keep_size": { + "type": "integer", + "maximum": 2147483647, + "minimum": -1, + "description": "PostgreSQL maximum WAL size (MB) reserved for replication slots. If `-1` is specified, replication slots may retain an unlimited amount of WAL files. The default is `-1` (upstream default). wal_keep_size minimum WAL size setting takes precedence over this." + }, + "max_stack_depth": { + "type": "integer", + "maximum": 6291456, + "minimum": 2097152, + "description": "Maximum depth of the stack in bytes. The default is `2097152` (upstream default)." + }, + "max_standby_archive_delay": { + "type": "integer", + "maximum": 43200000, + "minimum": 1, + "description": "Max standby archive delay in milliseconds. The default is `30000` (upstream default)." + }, + "max_standby_streaming_delay": { + "type": "integer", + "maximum": 43200000, + "minimum": 1, + "description": "Max standby streaming delay in milliseconds. The default is `30000` (upstream default)." + }, + "max_sync_workers_per_subscription": { + "type": "integer", + "maximum": 8, + "minimum": 2, + "description": "Maximum number of synchronization workers per subscription. The default is `2`." + }, + "max_wal_senders": { + "type": "integer", + "maximum": 256, + "minimum": 20, + "description": "PostgreSQL maximum WAL senders. The default is `20`. Changing this parameter causes a service restart." + }, + "max_worker_processes": { + "type": "integer", + "maximum": 288, + "minimum": 8, + "description": "Sets the maximum number of background processes that the system can support. The default is `8`. Changing this parameter causes a service restart." + }, + "migration": { + "type": [ + "object", + "null" + ], + "properties": { + "dbname": { + "type": "string", + "title": "Database name for bootstrapping the initial connection", + "maxLength": 63 + }, + "host": { + "type": "string", + "title": "Hostname or IP address of the server where to migrate data from", + "maxLength": 255 + }, + "ignore_dbs": { + "type": "string", + "title": "Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment)", + "maxLength": 2048 + }, + "ignore_roles": { + "type": "string", + "title": "Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment)", + "maxLength": 2048 + }, + "method": { + "type": "string", + "title": "The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types)", + "enum": [ + "dump", + "replication" + ] + }, + "password": { + "type": "string", + "title": "Password for authentication with the server where to migrate data from", + "maxLength": 256 + }, + "port": { + "type": "integer", + "title": "Port number of the server where to migrate data from", + "maximum": 65535, + "minimum": 1 + }, + "ssl": { + "type": "boolean", + "title": "The server where to migrate data from is secured with SSL" + }, + "username": { + "type": "string", + "title": "User name for authentication with the server where to migrate data from", + "maxLength": 256 + } + }, + "required": [ + "host", + "port" + ], + "additionalProperties": false + }, + "node_count": { + "type": "integer", + "maximum": 100, + "minimum": 1 + }, + "password_encryption": { + "type": [ + "string", + "null" + ], + "enum": [ + "md5", + "scram-sha-256" + ], + "description": "Chooses the algorithm for encrypting passwords." + }, + "pg_partman_bgw_interval": { + "type": "integer", + "maximum": 604800, + "minimum": 3600, + "description": "Sets the time interval in seconds to run pg_partman's scheduled tasks. The default is `3600`." + }, + "pg_partman_bgw_role": { + "type": "string", + "maxLength": 64, + "pattern": "^[_A-Za-z0-9][-._A-Za-z0-9]{0,63}$", + "description": "Controls which role to use for pg_partman's scheduled background tasks." + }, + "pg_stat_monitor_enable": { + "type": "boolean", + "description": "Enable the pg_stat_monitor extension. Changing this parameter causes a service restart. When this extension is enabled, pg_stat_statements results for utility commands are unreliable" + }, + "pg_stat_monitor_pgsm_enable_query_plan": { + "type": "boolean", + "description": "Enables or disables query plan monitoring. Only available for PostgreSQL 13+." + }, + "pg_stat_monitor_pgsm_max_buckets": { + "type": "integer", + "maximum": 10, + "minimum": 1, + "description": "Sets the maximum number of buckets. Changing this parameter causes a service restart. Only available for PostgreSQL 13+." + }, + "pg_stat_plans_enable": { + "type": "boolean", + "description": "Enable the pg_stat_plans extension. Changing this parameter causes a service restart. Tracks execution plans for SQL queries" + }, + "pg_stat_plans_track": { + "type": "string", + "enum": [ + "all", + "top", + "none" + ], + "description": "Controls which statements' plans are tracked. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable plan tracking. The default is `top`." + }, + "pg_stat_statements_track": { + "type": "string", + "enum": [ + "all", + "top", + "none" + ], + "description": "Controls which statements are counted. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable statement statistics collection. The default is `top`." + }, + "pgaudit": { + "type": "object", + "properties": { + "feature_enabled": { + "type": "boolean", + "title": "Enable pgaudit extension.", + "description": "Enable pgaudit extension. When enabled, pgaudit extension will be automatically installed.Otherwise, extension will be uninstalled but auditing configurations will be preserved." + }, + "log": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "all", + "ddl", + "function", + "misc", + "misc_set", + "read", + "role", + "write" + ] + }, + "title": "Log", + "description": "Specifies which classes of statements will be logged by session audit logging." + }, + "log_catalog": { + "type": "boolean", + "title": "Log Catalog", + "description": "Specifies that session logging should be enabled in the case where all relations\nin a statement are in pg_catalog." + }, + "log_client": { + "type": "boolean", + "title": "Log Client", + "description": "Specifies whether log messages will be visible to a client process such as psql." + }, + "log_level": { + "type": "string", + "title": "Log level", + "enum": [ + "debug1", + "debug2", + "debug3", + "debug4", + "debug5", + "info", + "notice", + "warning", + "log" + ], + "description": "Specifies the log level that will be used for log entries." + }, + "log_max_string_length": { + "type": "integer", + "title": "Log Max String Length", + "maximum": 102400, + "minimum": -1, + "description": "Crop parameters representation and whole statements if they exceed this threshold.\nA (default) value of -1 disable the truncation." + }, + "log_nested_statements": { + "type": "boolean", + "title": "Log Nested Statements", + "description": "This GUC allows to turn off logging nested statements, that is, statements that are\nexecuted as part of another ExecutorRun." + }, + "log_parameter": { + "type": "boolean", + "title": "Log Parameter", + "description": "Specifies that audit logging should include the parameters that were passed with the statement." + }, + "log_parameter_max_size": { + "type": "integer", + "title": "Log Parameter Max Size", + "description": "Specifies that parameter values longer than this setting (in bytes) should not be logged,\nbut replaced with ." + }, + "log_relation": { + "type": "boolean", + "title": "Log Relation", + "description": "Specifies whether session audit logging should create a separate log entry\nfor each relation (TABLE, VIEW, etc.) referenced in a SELECT or DML statement." + }, + "log_rows": { + "type": "boolean", + "title": "Log Rows" + }, + "log_statement": { + "type": "boolean", + "title": "Log Statement", + "description": "Specifies whether logging will include the statement text and parameters (if enabled)." + }, + "log_statement_once": { + "type": "boolean", + "title": "Log Statement Once", + "description": "Specifies whether logging will include the statement text and parameters with\nthe first log entry for a statement/substatement combination or with every entry." + }, + "role": { + "type": "string", + "title": "Role", + "maxLength": 64, + "pattern": "^[_A-Za-z0-9][-._A-Za-z0-9]{0,63}$", + "description": "Specifies the master role to use for object audit logging." + } + }, + "description": "System-wide settings for the pgaudit extension." + }, + "pgbouncer": { + "type": "object", + "properties": { + "autodb_idle_timeout": { + "type": "integer", + "title": "If the automatically created database pools have been unused this many seconds, they are freed. If 0 then timeout is disabled. [seconds]", + "maximum": 86400, + "minimum": 0 + }, + "autodb_max_db_connections": { + "type": "integer", + "title": "Do not allow more than this many server connections per database (regardless of user). Setting it to 0 means unlimited.", + "maximum": 2147483647, + "minimum": 0 + }, + "autodb_pool_mode": { + "type": "string", + "title": "PGBouncer pool mode", + "enum": [ + "transaction", + "session", + "statement" + ] + }, + "autodb_pool_size": { + "type": "integer", + "title": "If non-zero then create automatically a pool of that size per user when a pool doesn't exist.", + "maximum": 10000, + "minimum": 0 + }, + "ignore_startup_parameters": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "extra_float_digits", + "search_path" + ] + }, + "title": "List of parameters to ignore when given in startup packet", + "maxItems": 32 + }, + "max_prepared_statements": { + "type": "integer", + "title": "PgBouncer tracks protocol-level named prepared statements related commands sent by the client in transaction and statement pooling modes when max_prepared_statements is set to a non-zero value. Setting it to 0 disables prepared statements. max_prepared_statements defaults to 100, and its maximum is 3000.", + "maximum": 3000, + "minimum": 0 + }, + "min_pool_size": { + "type": "integer", + "title": "Add more server connections to pool if below this number. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size.", + "maximum": 10000, + "minimum": 0 + }, + "server_connect_timeout": { + "type": "number", + "title": "If connection and login don’t finish in this amount of time, the connection will be closed. [seconds]", + "maximum": 86400, + "minimum": 1 + }, + "server_idle_timeout": { + "type": "integer", + "title": "If a server connection has been idle more than this many seconds it will be dropped. If 0 then timeout is disabled. [seconds]", + "maximum": 86400, + "minimum": 0 + }, + "server_lifetime": { + "type": "integer", + "title": "The pooler will close an unused server connection that has been connected longer than this. [seconds]", + "maximum": 86400, + "minimum": 60 + }, + "server_login_retry": { + "type": "number", + "title": "If login to the server failed, because of failure to connect or from authentication, the pooler waits this much before retrying to connect. During the waiting interval, new clients trying to connect to the failing server will get an error immediately without another connection attempt. [seconds]", + "maximum": 86400, + "minimum": 1 + }, + "server_reset_query_always": { + "type": "boolean", + "title": "Run server_reset_query (DISCARD ALL) in all pooling modes" + } + }, + "description": "System-wide settings for pgbouncer." + }, + "pglookout": { + "type": "object", + "properties": { + "max_failover_replication_time_lag": { + "type": "integer", + "title": "Max Failover Replication Time Lag", + "maximum": 9223372036854776000, + "minimum": 10, + "description": "Number of seconds of master unavailability before triggering database failover to standby" + } + }, + "description": "System-wide settings for pglookout." + }, + "public_access": { + "type": "boolean", + "description": "Allow access to the service from the public Internet" + }, + "public_access_prometheus": { + "type": "boolean", + "description": "Allow access to Prometheus metrics from the public Internet" + }, + "service_log": { + "type": [ + "boolean", + "null" + ], + "description": "Store logs for the service so that they are available in the HTTP API and console." + }, + "shared_buffers_percentage": { + "type": "number", + "maximum": 60, + "minimum": 20, + "description": "Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value. Changing this parameter causes a service restart." + }, + "synchronous_commit": { + "type": "string", + "enum": [ + "local", + "remote_write", + "remote_apply", + "on", + "off" + ], + "description": "Sets the current transaction's synchronization level. The default is `off`. This setting takes precedence over `synchronous_replication`." + }, + "synchronous_replication": { + "type": "string", + "enum": [ + "quorum", + "off" + ], + "description": "This setting is deprecated. Use synchronous_commit instead. Any change to this setting will automatically update synchronous_commit. Setting the value to quorum changes synchronous_commit to remote_write, while setting it to off changes synchronous_commit to off." + }, + "temp_file_limit": { + "type": "integer", + "maximum": 2147483647, + "minimum": -1, + "description": "PostgreSQL temporary file limit in KiB, -1 for unlimited" + }, + "timescaledb": { + "type": "object", + "properties": { + "max_background_workers": { + "type": "integer", + "title": "timescaledb.max_background_workers", + "maximum": 4096, + "minimum": 1, + "description": "The number of background workers for timescaledb operations. You should configure this setting to the sum of your number of databases and the total number of concurrent background workers you want running at any given point in time. Changing this parameter causes a service restart." + } + }, + "description": "System-wide settings for the timescaledb extension" + }, + "timezone": { + "type": "string", + "maxLength": 64, + "pattern": "^[\\w/]*$", + "description": "PostgreSQL service timezone" + }, + "track_activity_query_size": { + "type": "integer", + "maximum": 10240, + "minimum": 1024, + "description": "Specifies the number of bytes reserved to track the currently executing command for each active session. Changing this parameter causes a service restart." + }, + "track_commit_timestamp": { + "type": "string", + "enum": [ + "off", + "on" + ], + "description": "Record commit time of transactions. Changing this parameter causes a service restart." + }, + "track_functions": { + "type": "string", + "enum": [ + "all", + "pl", + "none" + ], + "description": "Enables tracking of function call counts and time used." + }, + "track_io_timing": { + "type": "string", + "enum": [ + "off", + "on" + ], + "description": "Enables timing of database I/O calls. The default is `off`. When on, it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms." + }, + "variant": { + "type": [ + "string", + "null" + ], + "enum": [ + "aiven", + "timescale" + ] + }, + "version": { + "type": [ + "string", + "null" + ], + "enum": [ + "15", + "16", + "17", + "18" + ] + }, + "wal_sender_timeout": { + "type": "integer", + "anyOf": [ + { + "maximum": 0, + "minimum": 0 + }, + { + "maximum": 10800000, + "minimum": 5000 + } + ], + "description": "Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout." + }, + "wal_writer_delay": { + "type": "integer", + "maximum": 200, + "minimum": 10, + "description": "WAL flush interval in milliseconds. The default is `200`. Setting this parameter to a lower value may negatively impact performance." + }, + "work_mem": { + "type": "integer", + "maximum": 1024, + "minimum": 1, + "description": "Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. The default is 1MB + 0.075% of total RAM (up to 32MB)." + } + }, + "additionalProperties": false, + "description": "pg properties" + }, + "databaseServicePropertiesRedis": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "automatic_utility_network_ip_filter": { + "type": "boolean", + "description": "Automatically allow connections from servers in the utility network within the same zone" + }, + "backup_hour": { + "type": [ + "integer", + "null" + ], + "maximum": 23, + "minimum": 0 + }, + "backup_minute": { + "type": [ + "integer", + "null" + ], + "maximum": 59, + "minimum": 0 + }, + "ip_filter": { + "type": "array", + "items": { + "type": "string", + "title": "CIDR address block", + "maxLength": 18, + "example": [ + "10.0.0.0/24" + ] + }, + "description": "Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'" + }, + "migration": { + "type": [ + "object", + "null" + ], + "properties": { + "dbname": { + "type": "string", + "title": "Database name for bootstrapping the initial connection", + "maxLength": 63 + }, + "host": { + "type": "string", + "title": "Hostname or IP address of the server where to migrate data from", + "maxLength": 255 + }, + "ignore_dbs": { + "type": "string", + "title": "Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment)", + "maxLength": 2048 + }, + "ignore_roles": { + "type": "string", + "title": "Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment)", + "maxLength": 2048 + }, + "method": { + "type": "string", + "title": "The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types)", + "enum": [ + "dump", + "replication" + ] + }, + "password": { + "type": "string", + "title": "Password for authentication with the server where to migrate data from", + "maxLength": 256 + }, + "port": { + "type": "integer", + "title": "Port number of the server where to migrate data from", + "maximum": 65535, + "minimum": 1 + }, + "ssl": { + "type": "boolean", + "title": "The server where to migrate data from is secured with SSL" + }, + "username": { + "type": "string", + "title": "User name for authentication with the server where to migrate data from", + "maxLength": 256 + } + }, + "required": [ + "host", + "port" + ], + "additionalProperties": false + }, + "public_access": { + "type": "boolean", + "description": "Allow access to the service from the public Internet" + }, + "public_access_prometheus": { + "type": "boolean", + "description": "Allow access to Prometheus monitoring from the public Internet" + }, + "redis_acl_channels_default": { + "type": "string", + "enum": [ + "allchannels", + "resetchannels" + ], + "description": "Determines default pub/sub channels' ACL for new users if ACL is not supplied. When this option is not defined, all_channels is assumed to keep backward compatibility. This option doesn't affect Redis configuration acl-pubsub-default." + }, + "redis_io_threads": { + "type": "integer", + "maximum": 32, + "minimum": 1, + "description": "Set Redis IO thread count. Changing this will cause a restart of the Redis service." + }, + "redis_lfu_decay_time": { + "type": "integer", + "maximum": 120, + "minimum": 1 + }, + "redis_lfu_log_factor": { + "type": "integer", + "maximum": 100, + "minimum": 0 + }, + "redis_maxmemory_policy": { + "type": [ + "string", + "null" + ], + "enum": [ + "noeviction", + "allkeys-lru", + "volatile-lru", + "allkeys-random", + "volatile-random", + "volatile-ttl", + "volatile-lfu", + "allkeys-lfu" + ] + }, + "redis_notify_keyspace_events": { + "type": "string", + "maxLength": 32, + "pattern": "^[KEg\\$lshzxentdmA]*$" + }, + "redis_number_of_databases": { + "type": "integer", + "maximum": 128, + "minimum": 1, + "description": "Set number of Redis databases. Changing this will cause a restart of the Redis service." + }, + "redis_persistence": { + "type": "string", + "enum": [ + "off", + "rdb" + ], + "description": "When persistence is 'rdb', Redis does RDB dumps each 10 minutes if any key is changed. Also RDB dumps are done according to the backup schedule for backup purposes. When persistence is 'off', no RDB dumps or backups are done, so data can be lost at any moment if the service is restarted for any reason, or if the service is powered off. Also, the service can't be forked." + }, + "redis_pubsub_client_output_buffer_limit": { + "type": "integer", + "maximum": 512, + "minimum": 32, + "description": "Set output buffer limit for pub / sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan." + }, + "redis_ssl": { + "type": "boolean" + }, + "redis_timeout": { + "type": "integer", + "maximum": 2073600, + "minimum": 0 + }, + "redis_version": { + "type": [ + "string", + "null" + ], + "enum": [ + "7.0" + ] + }, + "service_log": { + "type": [ + "boolean", + "null" + ], + "description": "Store logs for the service so that they are available in the HTTP API and console." + } + }, + "additionalProperties": false, + "description": "redis properties" + }, + "databaseServicePropertiesOpensearch": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "action_auto_create_index_enabled": { + "type": "boolean", + "description": "Explicitly allow or block automatic creation of indices. Defaults to true" + }, + "action_destructive_requires_name": { + "type": [ + "boolean", + "null" + ] + }, + "auth_failure_listeners": { + "type": "object", + "properties": { + "internal_authentication_backend_limiting": { + "type": "object", + "properties": { + "allowed_tries": { + "type": "integer", + "title": "internal_authentication_backend_limiting.allowed_tries", + "maximum": 32767, + "minimum": 1, + "description": "The number of login attempts allowed before login is blocked", + "example": 10 + }, + "authentication_backend": { + "type": "string", + "title": "internal_authentication_backend_limiting.authentication_backend", + "maxLength": 1024, + "enum": [ + "internal" + ], + "description": "The internal backend. Enter `internal`", + "example": "internal" + }, + "block_expiry_seconds": { + "type": "integer", + "title": "internal_authentication_backend_limiting.block_expiry_seconds", + "maximum": 2147483647, + "minimum": 0, + "description": "The duration of time that login remains blocked after a failed login", + "example": 600 + }, + "max_blocked_clients": { + "type": "integer", + "title": "internal_authentication_backend_limiting.max_blocked_clients", + "maximum": 2147483647, + "minimum": 0, + "description": "The maximum number of blocked IP addresses", + "example": 100000 + }, + "max_tracked_clients": { + "type": "integer", + "title": "internal_authentication_backend_limiting.max_tracked_clients", + "maximum": 2147483647, + "minimum": 0, + "description": "The maximum number of tracked IP addresses that have failed login", + "example": 100000 + }, + "time_window_seconds": { + "type": "integer", + "title": "internal_authentication_backend_limiting.time_window_seconds", + "maximum": 2147483647, + "minimum": 0, + "description": "The window of time in which the value for `allowed_tries` is enforced", + "example": 3600 + }, + "type": { + "type": "string", + "title": "internal_authentication_backend_limiting.type", + "maxLength": 1024, + "enum": [ + "username" + ], + "description": "The type of rate limiting", + "example": "username" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "automatic_utility_network_ip_filter": { + "type": "boolean", + "description": "Automatically allow connections from servers in the utility network within the same zone" + }, + "cluster_filecache_remote_data_ratio": { + "type": [ + "integer", + "number", + "null" + ], + "maximum": 100, + "minimum": 0, + "description": "Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 0." + }, + "cluster_max_shards_per_node": { + "type": "integer", + "maximum": 10000, + "minimum": 10, + "description": "Controls the number of shards allowed in the cluster per data node" + }, + "cluster_remote_store": { + "type": "object", + "properties": { + "state.global_metadata.upload_timeout": { + "type": "string", + "title": "The amount of time to wait for the cluster state upload to complete", + "pattern": "^\\d+\\s*(?:[dhms]|ms|micros|nanos)$", + "description": "The amount of time to wait for the cluster state upload to complete. Defaults to 20s." + }, + "state.metadata_manifest.upload_timeout": { + "type": "string", + "title": "The amount of time to wait for the manifest file upload to complete", + "pattern": "^\\d+\\s*(?:[dhms]|ms|micros|nanos)$", + "description": "The amount of time to wait for the manifest file upload to complete. The manifest file contains the details of each of the files uploaded for a single cluster state, both index metadata files and global metadata files. Defaults to 20s." + }, + "translog.buffer_interval": { + "type": "string", + "title": "The default value of the translog buffer interval", + "pattern": "^\\d+\\s*(?:[dhms]|ms|micros|nanos)$", + "description": "The default value of the translog buffer interval used when performing periodic translog updates. This setting is only effective when the index setting `index.remote_store.translog.buffer_interval` is not present. Defaults to 650ms." + }, + "translog.max_readers": { + "type": "integer", + "title": "The maximum number of open translog files for remote-backed indexes", + "maximum": 2147483647, + "minimum": 100, + "description": "Sets the maximum number of open translog files for remote-backed indexes. This limits the total number of translog files per shard. After reaching this limit, the remote store flushes the translog files. Default is 1000. The minimum required is 100." + } + }, + "additionalProperties": false + }, + "cluster_routing_allocation_balance_prefer_primary": { + "type": "boolean", + "description": "When set to true, OpenSearch attempts to evenly distribute the primary shards between the cluster nodes. Enabling this setting does not always guarantee an equal number of primary shards on each node, especially in the event of a failover. Changing this setting to false after it was set to true does not invoke redistribution of primary shards. Default is false." + }, + "cluster_routing_allocation_node_concurrent_recoveries": { + "type": "integer", + "maximum": 16, + "minimum": 2, + "description": "How many concurrent incoming/outgoing shard recoveries (normally replicas) are allowed to happen on a node. Defaults to node cpu count * 2." + }, + "cluster_search_request_slowlog": { + "type": "object", + "properties": { + "level": { + "type": "string", + "title": "Log level", + "enum": [ + "debug", + "info", + "trace", + "warn" + ] + }, + "threshold": { + "type": "object", + "properties": { + "debug": { + "type": "string", + "title": "Debug threshold for total request took time. The value should be in the form count and unit, where unit one of (s,m,h,d,nanos,ms,micros) or -1. Default is -1", + "pattern": "^[^\\r\\n]*$" + }, + "info": { + "type": "string", + "title": "Info threshold for total request took time. The value should be in the form count and unit, where unit one of (s,m,h,d,nanos,ms,micros) or -1. Default is -1", + "pattern": "^[^\\r\\n]*$" + }, + "trace": { + "type": "string", + "title": "Trace threshold for total request took time. The value should be in the form count and unit, where unit one of (s,m,h,d,nanos,ms,micros) or -1. Default is -1", + "pattern": "^[^\\r\\n]*$" + }, + "warn": { + "type": "string", + "title": "Warning threshold for total request took time. The value should be in the form count and unit, where unit one of (s,m,h,d,nanos,ms,micros) or -1. Default is -1", + "pattern": "^[^\\r\\n]*$" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "custom_domain": { + "type": [ + "string", + "null" + ], + "maxLength": 255, + "description": "Serve the web frontend using a custom CNAME pointing to the UpCloud DNS name. When you set a custom domain for a service deployed in a VPC, the service certificate is only created for the public-* hostname and the custom domain." + }, + "custom_keystores": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "pattern": "^[^\\r\\n]*$" + }, + "settings": { + "oneOf": [ + { + "type": "object", + "properties": { + "account": { + "type": "string", + "title": "Account name", + "pattern": "^[^\\r\\n]*$" + }, + "key": { + "type": "string", + "title": "Account secret key", + "pattern": "^[^\\r\\n]*$", + "description": "Azure account secret key. One of key or sas_token should be specified" + }, + "sas_token": { + "type": "string", + "title": "SAS token", + "pattern": "^[^\\r\\n]*$", + "description": "A shared access signatures (SAS) token. One of key or sas_token should be specified" + } + }, + "required": [ + "account" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "credentials": { + "type": "object", + "properties": { + "auth_provider_x509_cert_url": { + "type": "string", + "title": "The certificate service of Google", + "example": "https://www.googleapis.com/oauth2/v1/certs" + }, + "auth_uri": { + "type": "string", + "title": "The authentication endpoint of Google", + "example": "https://accounts.google.com/o/oauth2/auth" + }, + "client_email": { + "type": "string", + "title": "Email of the service account", + "example": "my-service-account@some-my-project.iam.gserviceaccount.com" + }, + "client_id": { + "type": "string", + "title": "Numeric client id for this service account", + "example": "103654484443722885992" + }, + "client_x509_cert_url": { + "type": "string", + "title": "Certificate URL for your service account", + "example": "https://www.googleapis.com/robot/v1/metadata/x509/my-service-account%40some-my-project.iam.gserviceaccount.com" + }, + "hmac_access_id": { + "type": "string", + "description": "The access ID for HMAC authentication with Google Cloud Storage" + }, + "hmac_secret": { + "type": "string", + "description": "The secret key for HMAC authentication with Google Cloud Storage" + }, + "private_key": { + "type": "string", + "title": "PEM-encoded private key", + "example": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n" + }, + "private_key_id": { + "type": "string", + "title": "Hexadecimal ID number of your private key", + "example": "5fdeb02a11ddf081930ac3ac60bf376a0aef8fad" + }, + "project_id": { + "type": "string", + "title": "Gcloud project id", + "example": "some-my-project" + }, + "token_uri": { + "type": "string", + "title": "The token lease endpoint of Google", + "example": "https://accounts.google.com/o/oauth2/token" + }, + "type": { + "type": "string", + "title": "Credentials type", + "description": "Always service_account for credentials created in Gcloud console or CLI", + "example": "service_account" + }, + "universe_domain": { + "type": "string", + "title": "The universe domain", + "description": "The universe domain. The default universe domain is googleapis.com.", + "example": "{\"universe_domain\": \"googleapis.com\", ..." + } + }, + "title": "Google service account credentials map", + "required": [ + "private_key_id", + "private_key", + "client_email", + "client_id", + "type" + ], + "additionalProperties": false + } + }, + "required": [ + "credentials" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access_key": { + "type": "string", + "title": "AWS Access key", + "pattern": "^[^\\r\\n]*$" + }, + "secret_key": { + "type": "string", + "title": "AWS secret key", + "pattern": "^[^\\r\\n]*$", + "description": "AWS secret key" + } + }, + "required": [ + "access_key", + "secret_key" + ], + "additionalProperties": false + } + ] + }, + "type": { + "type": "string", + "enum": [ + "azure", + "gcs", + "s3" + ] + } + }, + "required": [ + "name", + "settings", + "type" + ], + "additionalProperties": false + }, + "description": "Allow to register custom keystores in OpenSearch" + }, + "custom_repos": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "pattern": "^[^\\r\\n]*$" + }, + "settings": { + "oneOf": [ + { + "type": "object", + "properties": { + "account": { + "type": "string", + "title": "Account name", + "pattern": "^[^\\r\\n]*$" + }, + "base_path": { + "type": "string", + "title": "The path to the repository data within its container", + "pattern": "^[^\\r\\n]*$", + "description": "The path to the repository data within its container. The value of this setting should not start or end with a /" + }, + "chunk_size": { + "type": "string", + "title": "Chunk size", + "pattern": "^[^\\r\\n]*$", + "description": "Big files can be broken down into chunks during snapshotting if needed. Should be the same as for the 3rd party repository" + }, + "compress": { + "type": "boolean", + "title": "Metadata files are stored in compressed format", + "description": "when set to true metadata files are stored in compressed format" + }, + "container": { + "type": "string", + "title": "Azure container name", + "pattern": "^[^\\r\\n]*$", + "description": "Azure container name" + }, + "endpoint_suffix": { + "type": "string", + "title": "Endpoint suffix", + "pattern": "^[^\\r\\n]*$", + "description": "Defines the DNS suffix for Azure Storage endpoints." + }, + "key": { + "type": "string", + "title": "Account secret key", + "pattern": "^[^\\r\\n]*$", + "description": "Azure account secret key. One of key or sas_token should be specified" + }, + "max_restore_bytes_per_sec": { + "type": "string", + "title": "Restore bytes per second", + "pattern": "^\\d+\\s*(?:[bB]|[kKmMgGtTpP][bB])$", + "description": "Throttles the restore rate per node. Defaults to unlimited. Note that if the recovery settings for managed services are set, this value is overridden by the recovery settings. Value should be a byte size with unit, e.g. 40mb, 100kb, 1gb", + "example": "40mb" + }, + "max_snapshot_bytes_per_sec": { + "type": "string", + "title": "Snapshot bytes per second", + "pattern": "^\\d+\\s*(?:[bB]|[kKmMgGtTpP][bB])$", + "description": "Throttles the snapshot rate per node. Defaults to 40mb. Note that if the recovery settings for managed services are set, this value is overridden by the recovery settings. Value should be a byte size with unit, e.g. 40mb, 100kb, 1gb", + "example": "40mb" + }, + "readonly": { + "type": "boolean", + "title": "Whether the repository is read-only.", + "default": false + }, + "sas_token": { + "type": "string", + "title": "SAS token", + "pattern": "^[^\\r\\n]*$", + "description": "A shared access signatures (SAS) token. One of key or sas_token should be specified" + } + }, + "required": [ + "account", + "base_path", + "container" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "base_path": { + "type": "string", + "title": "The path to the repository data within its container", + "pattern": "^[^\\r\\n]*$", + "description": "The path to the repository data within its container. The value of this setting should not start or end with a /" + }, + "bucket": { + "type": "string", + "title": "Google Cloud Storage bucket name", + "pattern": "^[^\\r\\n]*$", + "description": "The path to the repository data within its container" + }, + "chunk_size": { + "type": "string", + "title": "Chunk size", + "pattern": "^[^\\r\\n]*$", + "description": "Big files can be broken down into chunks during snapshotting if needed. Should be the same as for the 3rd party repository" + }, + "compress": { + "type": "boolean", + "title": "Metadata files are stored in compressed format", + "description": "when set to true metadata files are stored in compressed format" + }, + "credentials": { + "type": "object", + "properties": { + "auth_provider_x509_cert_url": { + "type": "string", + "title": "The certificate service of Google", + "example": "https://www.googleapis.com/oauth2/v1/certs" + }, + "auth_uri": { + "type": "string", + "title": "The authentication endpoint of Google", + "example": "https://accounts.google.com/o/oauth2/auth" + }, + "client_email": { + "type": "string", + "title": "Email of the service account", + "example": "my-service-account@some-my-project.iam.gserviceaccount.com" + }, + "client_id": { + "type": "string", + "title": "Numeric client id for this service account", + "example": "103654484443722885992" + }, + "client_x509_cert_url": { + "type": "string", + "title": "Certificate URL for your service account", + "example": "https://www.googleapis.com/robot/v1/metadata/x509/my-service-account%40some-my-project.iam.gserviceaccount.com" + }, + "hmac_access_id": { + "type": "string", + "description": "The access ID for HMAC authentication with Google Cloud Storage" + }, + "hmac_secret": { + "type": "string", + "description": "The secret key for HMAC authentication with Google Cloud Storage" + }, + "private_key": { + "type": "string", + "title": "PEM-encoded private key", + "example": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n" + }, + "private_key_id": { + "type": "string", + "title": "Hexadecimal ID number of your private key", + "example": "5fdeb02a11ddf081930ac3ac60bf376a0aef8fad" + }, + "project_id": { + "type": "string", + "title": "Gcloud project id", + "example": "some-my-project" + }, + "token_uri": { + "type": "string", + "title": "The token lease endpoint of Google", + "example": "https://accounts.google.com/o/oauth2/token" + }, + "type": { + "type": "string", + "title": "Credentials type", + "description": "Always service_account for credentials created in Gcloud console or CLI", + "example": "service_account" + }, + "universe_domain": { + "type": "string", + "title": "The universe domain", + "description": "The universe domain. The default universe domain is googleapis.com.", + "example": "{\"universe_domain\": \"googleapis.com\", ..." + } + }, + "title": "Google service account credentials map", + "required": [ + "private_key_id", + "private_key", + "client_email", + "client_id", + "type" + ], + "additionalProperties": false + }, + "max_restore_bytes_per_sec": { + "type": "string", + "title": "Restore bytes per second", + "pattern": "^\\d+\\s*(?:[bB]|[kKmMgGtTpP][bB])$", + "description": "Throttles the restore rate per node. Defaults to unlimited. Note that if the recovery settings for managed services are set, this value is overridden by the recovery settings. Value should be a byte size with unit, e.g. 40mb, 100kb, 1gb", + "example": "40mb" + }, + "max_snapshot_bytes_per_sec": { + "type": "string", + "title": "Snapshot bytes per second", + "pattern": "^\\d+\\s*(?:[bB]|[kKmMgGtTpP][bB])$", + "description": "Throttles the snapshot rate per node. Defaults to 40mb. Note that if the recovery settings for managed services are set, this value is overridden by the recovery settings. Value should be a byte size with unit, e.g. 40mb, 100kb, 1gb", + "example": "40mb" + }, + "readonly": { + "type": "boolean", + "title": "Whether the repository is read-only.", + "default": false + } + }, + "required": [ + "base_path", + "bucket", + "credentials" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "access_key": { + "type": "string", + "title": "AWS Access key", + "pattern": "^[^\\r\\n]*$" + }, + "base_path": { + "type": "string", + "title": "The path to the repository data within its container", + "pattern": "^[^\\r\\n]*$", + "description": "The path to the repository data within its container. The value of this setting should not start or end with a /" + }, + "bucket": { + "type": "string", + "title": "S3 bucket name", + "pattern": "^[^\\r\\n]*$" + }, + "chunk_size": { + "type": "string", + "title": "Chunk size", + "pattern": "^[^\\r\\n]*$", + "description": "Big files can be broken down into chunks during snapshotting if needed. Should be the same as for the 3rd party repository" + }, + "compress": { + "type": "boolean", + "title": "Metadata files are stored in compressed format", + "description": "when set to true metadata files are stored in compressed format" + }, + "endpoint": { + "type": "string", + "title": "The S3 service endpoint to connect", + "pattern": "^[^\\r\\n]*$", + "description": "The S3 service endpoint to connect to. If you are using an S3-compatible service then you should set this to the service’s endpoint" + }, + "max_restore_bytes_per_sec": { + "type": "string", + "title": "Restore bytes per second", + "pattern": "^\\d+\\s*(?:[bB]|[kKmMgGtTpP][bB])$", + "description": "Throttles the restore rate per node. Defaults to unlimited. Note that if the recovery settings for managed services are set, this value is overridden by the recovery settings. Value should be a byte size with unit, e.g. 40mb, 100kb, 1gb", + "example": "40mb" + }, + "max_snapshot_bytes_per_sec": { + "type": "string", + "title": "Snapshot bytes per second", + "pattern": "^\\d+\\s*(?:[bB]|[kKmMgGtTpP][bB])$", + "description": "Throttles the snapshot rate per node. Defaults to 40mb. Note that if the recovery settings for managed services are set, this value is overridden by the recovery settings. Value should be a byte size with unit, e.g. 40mb, 100kb, 1gb", + "example": "40mb" + }, + "readonly": { + "type": "boolean", + "title": "Whether the repository is read-only.", + "default": false + }, + "region": { + "type": "string", + "title": "S3 region", + "pattern": "^[^\\r\\n]*$" + }, + "secret_key": { + "type": "string", + "title": "AWS secret key", + "pattern": "^[^\\r\\n]*$", + "description": "AWS secret key" + }, + "server_side_encryption": { + "type": "boolean", + "title": "Server side encryption", + "description": "When set to true files are encrypted on server side" + } + }, + "required": [ + "base_path", + "bucket", + "region", + "access_key", + "secret_key" + ], + "additionalProperties": false + } + ] + }, + "type": { + "type": "string", + "enum": [ + "azure", + "gcs", + "s3" + ] + } + }, + "required": [ + "name", + "type", + "settings" + ], + "additionalProperties": false + }, + "description": "Allow to register object storage repositories in OpenSearch" + }, + "disk_watermarks": { + "type": "object", + "properties": { + "flood_stage": { + "type": "integer", + "title": "Flood stage watermark (percentage)", + "description": "The flood stage watermark for disk usage." + }, + "high": { + "type": "integer", + "title": "High watermark (percentage)", + "description": "The high watermark for disk usage." + }, + "low": { + "type": "integer", + "title": "Low watermark (percentage)", + "description": "The low watermark for disk usage." + } + }, + "required": [ + "low", + "high", + "flood_stage" + ], + "additionalProperties": false + }, + "elasticsearch_version": { + "type": [ + "string", + "null" + ], + "enum": [ + "1", + "2", + "2.19", + "3.3", + "3.6" + ] + }, + "email_sender_name": { + "type": "string", + "maxLength": 40, + "pattern": "^[a-zA-Z0-9-_]+$", + "description": "This should be identical to the Sender name defined in Opensearch dashboards" + }, + "email_sender_password": { + "type": "string", + "maxLength": 1024, + "pattern": "^[^\\x00-\\x1F]+$", + "description": "Sender password for Opensearch alerts to authenticate with SMTP server" + }, + "email_sender_username": { + "type": "string", + "maxLength": 320, + "pattern": "^[^\\x00-\\x1F]+$" + }, + "enable_remote_backed_storage": { + "type": "boolean" + }, + "enable_searchable_snapshots": { + "type": "boolean" + }, + "enable_security_audit": { + "type": "boolean" + }, + "enable_snapshot_api": { + "type": "boolean", + "description": "Enable/Disable snapshot API for custom repositories, this requires security management to be enabled" + }, + "http_max_content_length": { + "type": "integer", + "maximum": 2147483647, + "minimum": 1048576, + "description": "Maximum content length for HTTP requests to the OpenSearch HTTP API, in bytes." + }, + "http_max_header_size": { + "type": "integer", + "maximum": 262144, + "minimum": 1024, + "description": "The max size of allowed headers, in bytes" + }, + "http_max_initial_line_length": { + "type": "integer", + "maximum": 65536, + "minimum": 1024, + "description": "The max length of an HTTP URL, in bytes" + }, + "index_patterns": { + "type": "array", + "items": { + "type": "object", + "properties": { + "max_index_count": { + "type": "integer", + "title": "Maximum number of indexes to keep", + "maximum": 9223372036854776000, + "minimum": 0, + "example": 3 + }, + "pattern": { + "type": "string", + "title": "fnmatch pattern", + "maxLength": 1024, + "pattern": "^[A-Za-z0-9-_.*?]+$", + "example": "logs_*_foo_*" + }, + "sorting_algorithm": { + "type": "string", + "title": "Deletion sorting algorithm", + "enum": [ + "alphabetical", + "creation_date" + ], + "default": "creation_date" + } + }, + "title": "Glob pattern and number of indexes matching that pattern to be kept", + "required": [ + "pattern", + "max_index_count" + ], + "additionalProperties": false, + "description": "Allows you to create glob style patterns and set a max number of indexes matching this pattern you want to keep. Creating indexes exceeding this value will cause the oldest one to get deleted. You could for example create a pattern looking like 'logs.?' and then create index logs.1, logs.2 etc, it will delete logs.1 once you create logs.6. Do note 'logs.?' does not apply to logs.10. Note: Setting max_index_count to 0 will do nothing and the pattern gets ignored." + } + }, + "index_rollup": { + "type": "object", + "properties": { + "rollup_dashboards_enabled": { + "type": "boolean", + "title": "plugins.rollup.dashboards.enabled", + "description": "Whether rollups are enabled in OpenSearch Dashboards. Defaults to true." + }, + "rollup_enabled": { + "type": "boolean", + "title": "plugins.rollup.enabled", + "description": "Whether the rollup plugin is enabled. Defaults to true." + }, + "rollup_search_backoff_count": { + "type": "integer", + "title": "plugins.rollup.search.backoff_count", + "minimum": 1, + "description": "How many retries the plugin should attempt for failed rollup jobs. Defaults to 5." + }, + "rollup_search_backoff_millis": { + "type": "integer", + "title": "plugins.rollup.search.backoff_millis", + "minimum": 1, + "description": "The backoff time between retries for failed rollup jobs. Defaults to 1000ms." + }, + "rollup_search_search_all_jobs": { + "type": "boolean", + "title": "plugins.rollup.search.all_jobs", + "description": "Whether OpenSearch should return all jobs that match all specified search terms. If disabled, OpenSearch returns just one, as opposed to all, of the jobs that matches the search terms. Defaults to false." + } + }, + "additionalProperties": false + }, + "index_template": { + "type": "object", + "properties": { + "mapping_nested_objects_limit": { + "type": [ + "integer", + "null" + ], + "title": "(DEPRECATED) index.mapping.nested_objects.limit", + "maximum": 100000, + "minimum": 0, + "description": "The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps to prevent out of memory errors when a document contains too many nested objects. Default is 10000. Deprecated, use an index template instead." + }, + "number_of_replicas": { + "type": [ + "integer", + "null" + ], + "title": "(DEPRECATED) index.number_of_replicas", + "maximum": 29, + "minimum": 0, + "description": "The number of replicas each primary shard has. Deprecated, use an index template instead." + }, + "number_of_shards": { + "type": [ + "integer", + "null" + ], + "title": "(DEPRECATED) index.number_of_shards", + "maximum": 1024, + "minimum": 1, + "description": "The number of primary shards that an index should have. Deprecated, use an index template instead." + } + }, + "additionalProperties": false + }, + "indices_fielddata_cache_size": { + "type": [ + "integer", + "null" + ], + "maximum": 100, + "minimum": 3, + "description": "Relative amount. Maximum amount of heap memory used for field data cache. This is an expert setting; decreasing the value too much will increase overhead of loading field data; too much memory used for field data cache will decrease amount of heap available for other operations." + }, + "indices_memory_index_buffer_size": { + "type": "integer", + "maximum": 40, + "minimum": 3, + "description": "Percentage value. Default is 10%. Total amount of heap used for indexing buffer, before writing segments to disk. This is an expert setting. Too low value will slow down indexing; too high value will increase indexing performance but causes performance issues for query performance." + }, + "indices_memory_max_index_buffer_size": { + "type": "integer", + "maximum": 2048, + "minimum": 3, + "description": "Absolute value. Default is unbound. Doesn't work without indices.memory.index_buffer_size. Maximum amount of heap used for query cache, an absolute indices.memory.index_buffer_size maximum hard limit." + }, + "indices_memory_min_index_buffer_size": { + "type": "integer", + "maximum": 2048, + "minimum": 3, + "description": "Absolute value. Default is 48mb. Doesn't work without indices.memory.index_buffer_size. Minimum amount of heap used for query cache, an absolute indices.memory.index_buffer_size minimal hard limit." + }, + "indices_queries_cache_size": { + "type": "integer", + "maximum": 40, + "minimum": 3, + "description": "Percentage value. Default is 10%. Maximum amount of heap used for query cache. This is an expert setting. Too low value will decrease query performance and increase performance for other operations; too high value will cause issues with other OpenSearch functionality." + }, + "indices_query_bool_max_clause_count": { + "type": "integer", + "maximum": 4096, + "minimum": 64, + "description": "Maximum number of clauses Lucene BooleanQuery can have. The default value (1024) is relatively high, and increasing it may cause performance issues. Investigate other approaches first before increasing this value." + }, + "indices_recovery_max_bytes_per_sec": { + "type": "integer", + "maximum": 400, + "minimum": 40, + "description": "Limits total inbound and outbound recovery traffic for each node. Applies to both peer recoveries as well as snapshot recoveries (i.e., restores from a snapshot). Defaults to 40mb" + }, + "indices_recovery_max_concurrent_file_chunks": { + "type": "integer", + "maximum": 5, + "minimum": 2, + "description": "Number of file chunks sent in parallel for each recovery. Defaults to 2." + }, + "ip_filter": { + "type": "array", + "items": { + "type": "string", + "title": "CIDR address block", + "maxLength": 18, + "example": [ + "10.0.0.0/24" + ] + }, + "description": "Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'" + }, + "ism_enabled": { + "type": "boolean" + }, + "ism_history_enabled": { + "type": "boolean" + }, + "ism_history_max_age": { + "type": "integer", + "maximum": 2147483647, + "minimum": 1 + }, + "ism_history_max_docs": { + "type": "integer", + "maximum": 9223372036854776000, + "minimum": 1 + }, + "ism_history_rollover_check_period": { + "type": "integer", + "maximum": 2147483647, + "minimum": 1 + }, + "ism_history_rollover_retention_period": { + "type": "integer", + "maximum": 2147483647, + "minimum": 1 + }, + "jwt": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enable or disable OpenSearch JWT authentication", + "description": "Enables or disables JWT-based authentication for OpenSearch. When enabled, users can authenticate using JWT tokens." + }, + "jwt_clock_skew_tolerance_seconds": { + "type": [ + "integer", + "null" + ], + "title": "JWT clock skew tolerance in seconds", + "maximum": 300, + "minimum": 0, + "description": "The maximum allowed time difference in seconds between the JWT issuer's clock and the OpenSearch server's clock. This helps prevent token validation failures due to minor time synchronization issues." + }, + "jwt_header": { + "type": [ + "string", + "null" + ], + "title": "HTTP header name for JWT token", + "maxLength": 256, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "The HTTP header name where the JWT token is transmitted. Typically 'Authorization' for Bearer tokens." + }, + "jwt_url_parameter": { + "type": [ + "string", + "null" + ], + "title": "URL parameter name for JWT token", + "maxLength": 256, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "If the JWT token is transmitted as a URL parameter instead of an HTTP header, specify the parameter name here." + }, + "required_audience": { + "type": [ + "string", + "null" + ], + "title": "Required JWT audience", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "If specified, the JWT must contain an 'aud' claim that matches this value. This provides additional security by ensuring the JWT was issued for the expected audience." + }, + "required_issuer": { + "type": [ + "string", + "null" + ], + "title": "Required JWT issuer", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "If specified, the JWT must contain an 'iss' claim that matches this value. This provides additional security by ensuring the JWT was issued by the expected issuer." + }, + "roles_key": { + "type": [ + "string", + "null" + ], + "title": "JWT claim key for roles", + "maxLength": 256, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "The key in the JWT payload that contains the user's roles. If specified, roles will be extracted from the JWT for authorization." + }, + "signing_key": { + "type": "string", + "title": "JWT signing key", + "maxLength": 1024, + "minLength": 1, + "description": "The secret key used to sign and verify JWT tokens. This should be a secure, randomly generated key HMAC key or public RSA/ECDSA key." + }, + "subject_key": { + "type": [ + "string", + "null" + ], + "title": "JWT claim key for subject", + "maxLength": 256, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "The key in the JWT payload that contains the user's subject identifier. If not specified, the 'sub' claim is used by default." + } + }, + "required": [ + "enabled", + "signing_key" + ], + "additionalProperties": false + }, + "keep_index_refresh_interval": { + "type": "boolean", + "description": "UpCloud automation resets index.refresh_interval to default value for every index to be sure that indices are always visible to search. If it doesn't fit your case, you can disable this by setting up this flag to true." + }, + "knn_memory_circuit_breaker_enabled": { + "type": "boolean", + "description": "Enable or disable KNN memory circuit breaker. Defaults to true." + }, + "knn_memory_circuit_breaker_limit": { + "type": "integer", + "maximum": 100, + "minimum": 0, + "description": "Maximum amount of memory in percentage that can be used for the KNN index. Defaults to 50% of the JVM heap size. 0 is used to set it to null which can be used to invalidate caches." + }, + "ml_commons_connector_access_control_enabled": { + "type": "boolean", + "description": "When set to true, the setting allows admins to control access and permissions to the connector API using backend_roles. Defaults to false." + }, + "ml_commons_model_access_control_enabled": { + "type": "boolean", + "description": "Enable or disable model access control for ML Commons. When enabled, access to ML models is controlled by security permissions. Defaults to false." + }, + "ml_commons_native_memory_threshold": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Native memory threshold percentage for ML Commons. Controls the maximum percentage of native memory that can be used by ML Commons operations. Defaults to 90%." + }, + "ml_commons_only_run_on_ml_node": { + "type": "boolean", + "description": "Enable or disable running ML Commons tasks only on ML nodes. When enabled, ML tasks will only execute on nodes designated as ML nodes. Defaults to true." + }, + "ml_commons_trusted_connector_endpoints_regex": { + "type": "array", + "items": { + "type": "string", + "title": "An URL endpoint pattern.", + "maxLength": 261, + "example": "^https://api\\.example\\.com/.*$" + }, + "description": "Adds the trusted endpoints to the cluster settings. Supports Java regex expressions." + }, + "node_search_cache_size": { + "type": [ + "string", + "null" + ], + "pattern": "\\d+(?:b|kb|mb|gb|tb)", + "description": "Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 5gb. Requires restarting all OpenSearch nodes." + }, + "openid": { + "type": "object", + "properties": { + "client_id": { + "type": "string", + "title": "The ID of the OpenID Connect client", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "The ID of the OpenID Connect client configured in your IdP. Required." + }, + "client_secret": { + "type": "string", + "title": "The client secret of the OpenID Connect", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "The client secret of the OpenID Connect client configured in your IdP. Required." + }, + "connect_url": { + "type": "string", + "title": "OpenID Connect metadata/configuration URL", + "maxLength": 2048, + "pattern": "^[^\\r\\n]*$", + "description": "The URL of your IdP where the Security plugin can find the OpenID Connect metadata/configuration settings." + }, + "enabled": { + "type": "boolean", + "title": "Enable or disable OpenSearch OpenID Connect authentication", + "description": "Enables or disables OpenID Connect authentication for OpenSearch. When enabled, users can authenticate using OpenID Connect with an Identity Provider." + }, + "header": { + "type": "string", + "title": "HTTP header name of the JWT token", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "HTTP header name of the JWT token. Optional. Default is Authorization." + }, + "jwt_header": { + "type": [ + "string", + "null" + ], + "title": "The HTTP header that stores the token", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "The HTTP header that stores the token. Typically the Authorization header with the Bearer schema: Authorization: Bearer . Optional. Default is Authorization." + }, + "jwt_url_parameter": { + "type": [ + "string", + "null" + ], + "title": "URL JWT token.", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "If the token is not transmitted in the HTTP header, but as an URL parameter, define the name of the parameter here. Optional." + }, + "refresh_rate_limit_count": { + "type": [ + "integer", + "null" + ], + "title": "The maximum number of unknown key IDs in the time frame", + "maximum": 9223372036854776000, + "minimum": 10, + "description": "The maximum number of unknown key IDs in the time frame. Default is 10. Optional." + }, + "refresh_rate_limit_time_window_ms": { + "type": [ + "integer", + "null" + ], + "title": "The time frame to use when checking the maximum number of unknown key IDs, in milliseconds", + "maximum": 9223372036854776000, + "minimum": 10000, + "description": "The time frame to use when checking the maximum number of unknown key IDs, in milliseconds. Optional.Default is 10000 (10 seconds)." + }, + "roles_key": { + "type": [ + "string", + "null" + ], + "title": "The key in the JSON payload that stores the user’s roles", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "The key in the JSON payload that stores the user’s roles. The value of this key must be a comma-separated list of roles. Required only if you want to use roles in the JWT" + }, + "scope": { + "type": "string", + "title": "The scope of the identity token issued by the IdP", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "The scope of the identity token issued by the IdP. Optional. Default is openid profile email address phone." + }, + "subject_key": { + "type": [ + "string", + "null" + ], + "title": "The key in the JSON payload that stores the user’s name", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "The key in the JSON payload that stores the user’s name. If not defined, the subject registered claim is used. Most IdP providers use the preferred_username claim. Optional." + } + }, + "required": [ + "enabled", + "connect_url", + "client_id", + "client_secret" + ], + "additionalProperties": false + }, + "opensearch_dashboards": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enable or disable OpenSearch Dashboards" + }, + "max_old_space_size": { + "type": "integer", + "title": "max_old_space_size", + "maximum": 4096, + "minimum": 64, + "description": "Limits the maximum amount of memory (in MiB) the OpenSearch Dashboards process can use. This sets the max_old_space_size option of the nodejs running the OpenSearch Dashboards. Note: the memory reserved by OpenSearch Dashboards is not available for OpenSearch." + }, + "multiple_data_source_enabled": { + "type": "boolean", + "title": "Enable or disable multiple data sources in OpenSearch Dashboards" + }, + "opensearch_request_timeout": { + "type": "integer", + "title": "Timeout in milliseconds for requests made by OpenSearch Dashboards towards OpenSearch", + "maximum": 120000, + "minimum": 5000 + }, + "session_keepalive": { + "type": "boolean", + "title": "Determines whether the session TTL resets (is β€œkept alive”) on each user activity. Optional. Default is true." + }, + "session_ttl": { + "type": "string", + "title": "session_ttl", + "pattern": "^\\d+\\s*(?:[dhms]|ms|micros|nanos)$", + "description": "Defines the time-to-live (TTL) for user sessions. The value should be a time value with unit, e.g. 1m, 5s, 1h, 3d, 100ms. Default is 1 hour." + } + }, + "additionalProperties": false + }, + "override_main_response_version": { + "type": "boolean", + "description": "Compatibility mode sets OpenSearch to report its version as 7.10 so clients continue to work. Default is false. Deprecated and ignored for service version 3.3 and higher." + }, + "plugins_alerting_filter_by_backend_roles": { + "type": "boolean", + "description": "Enable or disable filtering of alerting by backend roles. Requires Security plugin. Defaults to false" + }, + "public_access": { + "type": "boolean", + "description": "Allow access to the service from the public Internet" + }, + "public_access_prometheus": { + "type": "boolean", + "description": "Allow access to Prometheus metrics from the public Internet" + }, + "reindex_remote_whitelist": { + "type": [ + "array", + "null" + ], + "items": { + "type": [ + "string", + "null" + ], + "title": "Address (hostname:port or IP:port)", + "maxLength": 261, + "pattern": "^[^\\r\\n]*$", + "example": "anotherservice.aivencloud.com:12398" + }, + "description": "Whitelisted addresses for reindexing. Changing this value will cause all OpenSearch instances to restart." + }, + "remote_store": { + "type": "object", + "properties": { + "segment.pressure.bytes_lag.variance_factor": { + "type": "number", + "title": "The variance factor that is used to calculate the dynamic bytes lag threshold", + "minimum": 1, + "description": "The variance factor that is used together with the moving average to calculate the dynamic bytes lag threshold for activating remote segment backpressure. Defaults to 10." + }, + "segment.pressure.consecutive_failures.limit": { + "type": "integer", + "title": "The minimum consecutive failure count for activating remote segment backpressure", + "maximum": 2147483647, + "minimum": 1, + "description": "The minimum consecutive failure count for activating remote segment backpressure. Defaults to 5." + }, + "segment.pressure.enabled": { + "type": "boolean", + "title": "Enables remote segment backpressure", + "description": "Enables remote segment backpressure. Default is `true`" + }, + "segment.pressure.time_lag.variance_factor": { + "type": "number", + "title": "The variance factor that is used to calculate the dynamic bytes lag threshold", + "minimum": 1, + "description": "The variance factor that is used together with the moving average to calculate the dynamic time lag threshold for activating remote segment backpressure. Defaults to 10." + } + }, + "additionalProperties": false + }, + "saml": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enable or disable OpenSearch SAML authentication", + "description": "Enables or disables SAML-based authentication for OpenSearch. When enabled, users can authenticate using SAML with an Identity Provider." + }, + "idp_entity_id": { + "type": "string", + "title": "Identity Provider Entity ID", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "The unique identifier for the Identity Provider (IdP) entity that is used for SAML authentication. This value is typically provided by the IdP." + }, + "idp_metadata_url": { + "type": "string", + "title": "Identity Provider (IdP) SAML metadata URL", + "maxLength": 2048, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "The URL of the SAML metadata for the Identity Provider (IdP). This is used to configure SAML-based authentication with the IdP." + }, + "idp_pemtrustedcas_content": { + "type": [ + "string", + "null" + ], + "title": "PEM-encoded root CA Content for SAML IdP server verification", + "maxLength": 16384, + "description": "This parameter specifies the PEM-encoded root certificate authority (CA) content for the SAML identity provider (IdP) server verification. The root CA content is used to verify the SSL/TLS certificate presented by the server." + }, + "roles_key": { + "type": [ + "string", + "null" + ], + "title": "SAML response role attribute", + "maxLength": 256, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "Optional. Specifies the attribute in the SAML response where role information is stored, if available. Role attributes are not required for SAML authentication, but can be included in SAML assertions by most Identity Providers (IdPs) to determine user access levels or permissions." + }, + "sp_entity_id": { + "type": "string", + "title": "Service Provider Entity ID", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "The unique identifier for the Service Provider (SP) entity that is used for SAML authentication. This value is typically provided by the SP." + }, + "subject_key": { + "type": [ + "string", + "null" + ], + "title": "SAML response subject attribute", + "maxLength": 256, + "minLength": 1, + "pattern": "^[^\\r\\n]*$", + "description": "Optional. Specifies the attribute in the SAML response where the subject identifier is stored. If not configured, the NameID attribute is used by default." + } + }, + "required": [ + "enabled", + "idp_metadata_url", + "idp_entity_id", + "sp_entity_id" + ], + "additionalProperties": false + }, + "script_max_compilations_rate": { + "type": "string", + "maxLength": 1024, + "pattern": "^[^\\r\\n]*$", + "description": "Script compilation circuit breaker limits the number of inline script compilations within a period of time. Default is use-context" + }, + "search_backpressure": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "title": "The search backpressure mode", + "enum": [ + "monitor_only", + "enforced", + "disabled" + ], + "description": "The search backpressure mode. Valid values are monitor_only, enforced, or disabled. Default is monitor_only" + }, + "node_duress": { + "type": "object", + "properties": { + "cpu_threshold": { + "type": "number", + "title": "The CPU usage threshold (as a percentage) required for a node to be considered to be under duress", + "maximum": 1, + "minimum": 0, + "description": "The CPU usage threshold (as a percentage) required for a node to be considered to be under duress. Default is 0.9" + }, + "heap_threshold": { + "type": "number", + "title": "The heap usage threshold (as a percentage) required for a node to be considered to be under duress", + "maximum": 1, + "minimum": 0, + "description": "The heap usage threshold (as a percentage) required for a node to be considered to be under duress. Default is 0.7" + }, + "num_successive_breaches": { + "type": "integer", + "title": "The number of successive limit breaches after which the node is considered to be under duress", + "minimum": 1, + "description": "The number of successive limit breaches after which the node is considered to be under duress. Default is 3" + } + }, + "title": "Node duress settings", + "additionalProperties": false + }, + "search_shard_task": { + "type": "object", + "properties": { + "cancellation_burst": { + "type": "number", + "title": "The maximum number of search tasks to cancel in a single iteration of the observer thread", + "minimum": 1, + "description": "The maximum number of search tasks to cancel in a single iteration of the observer thread. Default is 10.0" + }, + "cancellation_rate": { + "type": "number", + "title": "The maximum number of tasks to cancel per millisecond of elapsed time.", + "minimum": 0, + "description": "The maximum number of tasks to cancel per millisecond of elapsed time. Default is 0.003" + }, + "cancellation_ratio": { + "type": "number", + "title": "The maximum number of tasks to cancel", + "maximum": 1, + "minimum": 0, + "description": "The maximum number of tasks to cancel, as a percentage of successful task completions. Default is 0.1" + }, + "cpu_time_millis_threshold": { + "type": "integer", + "title": "The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation", + "minimum": 0, + "description": "The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 15000" + }, + "elapsed_time_millis_threshold": { + "type": "integer", + "title": "The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation", + "minimum": 0, + "description": "The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 30000" + }, + "heap_moving_average_window_size": { + "type": "integer", + "title": "The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage", + "minimum": 0, + "description": "The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage. Default is 100" + }, + "heap_percent_threshold": { + "type": "number", + "title": "The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation", + "maximum": 1, + "minimum": 0, + "description": "The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation. Default is 0.5" + }, + "heap_variance": { + "type": "number", + "title": "The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation", + "minimum": 0, + "description": "The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation. Default is 2.0" + }, + "total_heap_percent_threshold": { + "type": "number", + "title": "The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied", + "maximum": 1, + "minimum": 0, + "description": "The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied. Default is 0.5" + } + }, + "title": "Search shard settings", + "additionalProperties": false + }, + "search_task": { + "type": "object", + "properties": { + "cancellation_burst": { + "type": "number", + "title": "The maximum number of search tasks to cancel in a single iteration of the observer thread", + "minimum": 1, + "description": "The maximum number of search tasks to cancel in a single iteration of the observer thread. Default is 5.0" + }, + "cancellation_rate": { + "type": "number", + "title": "The maximum number of search tasks to cancel per millisecond of elapsed time", + "minimum": 0, + "description": "The maximum number of search tasks to cancel per millisecond of elapsed time. Default is 0.003" + }, + "cancellation_ratio": { + "type": "number", + "title": "The maximum number of search tasks to cancel, as a percentage of successful search task completions", + "maximum": 1, + "minimum": 0, + "description": "The maximum number of search tasks to cancel, as a percentage of successful search task completions. Default is 0.1" + }, + "cpu_time_millis_threshold": { + "type": "integer", + "title": "The CPU usage threshold (in milliseconds) required for an individual parent task before it is considered for cancellation", + "minimum": 0, + "description": "The CPU usage threshold (in milliseconds) required for an individual parent task before it is considered for cancellation. Default is 30000" + }, + "elapsed_time_millis_threshold": { + "type": "integer", + "title": "The elapsed time threshold (in milliseconds) required for an individual parent task before it is considered for cancellation", + "minimum": 0, + "description": "The elapsed time threshold (in milliseconds) required for an individual parent task before it is considered for cancellation. Default is 45000" + }, + "heap_moving_average_window_size": { + "type": "integer", + "title": "The window size used to calculate the rolling average of the heap usage for the completed parent tasks", + "minimum": 0, + "description": "The window size used to calculate the rolling average of the heap usage for the completed parent tasks. Default is 10" + }, + "heap_percent_threshold": { + "type": "number", + "title": "The heap usage threshold (as a percentage) required for an individual parent task before it is considered for cancellation", + "maximum": 1, + "minimum": 0, + "description": "The heap usage threshold (as a percentage) required for an individual parent task before it is considered for cancellation. Default is 0.2" + }, + "heap_variance": { + "type": "number", + "title": "The heap usage variance required for an individual parent task before it is considered for cancellation", + "minimum": 0, + "description": "The heap usage variance required for an individual parent task before it is considered for cancellation. A task is considered for cancellation when taskHeapUsage is greater than or equal to heapUsageMovingAverage * variance. Default is 2.0" + }, + "total_heap_percent_threshold": { + "type": "number", + "title": "The heap usage threshold (as a percentage) required for the sum of heap usages of all search tasks before cancellation is applied", + "maximum": 1, + "minimum": 0, + "description": "The heap usage threshold (as a percentage) required for the sum of heap usages of all search tasks before cancellation is applied. Default is 0.5" + } + }, + "title": "Search task settings", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "search_insights_top_queries": { + "type": "object", + "properties": { + "cpu": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enable or disable top N query monitoring by the metric", + "description": "Enable or disable top N query monitoring by the metric", + "default": false + }, + "top_n_size": { + "type": "integer", + "title": "Specify the value of N for the top N queries by the metric", + "minimum": 1 + }, + "window_size": { + "type": "string", + "title": "The window size of the top N queries by the metric", + "pattern": "^\\d+\\s*(?:[dhms]|ms|micros|nanos)$", + "description": "Configure the window size of the top N queries. The value should be a time value with unit, e.g. 1m, 5s, 1h." + } + }, + "title": "Top N queries monitoring by CPU", + "additionalProperties": false + }, + "latency": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enable or disable top N query monitoring by the metric", + "description": "Enable or disable top N query monitoring by the metric", + "default": false + }, + "top_n_size": { + "type": "integer", + "title": "Specify the value of N for the top N queries by the metric", + "minimum": 1 + }, + "window_size": { + "type": "string", + "title": "The window size of the top N queries by the metric", + "pattern": "^\\d+\\s*(?:[dhms]|ms|micros|nanos)$", + "description": "Configure the window size of the top N queries. The value should be a time value with unit, e.g. 1m, 5s, 1h." + } + }, + "title": "Top N queries monitoring by latency", + "additionalProperties": false + }, + "memory": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enable or disable top N query monitoring by the metric", + "description": "Enable or disable top N query monitoring by the metric", + "default": false + }, + "top_n_size": { + "type": "integer", + "title": "Specify the value of N for the top N queries by the metric", + "minimum": 1 + }, + "window_size": { + "type": "string", + "title": "The window size of the top N queries by the metric", + "pattern": "^\\d+\\s*(?:[dhms]|ms|micros|nanos)$", + "description": "Configure the window size of the top N queries. The value should be a time value with unit, e.g. 1m, 5s, 1h." + } + }, + "title": "Top N queries monitoring by memory", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "search_max_buckets": { + "type": [ + "integer", + "null" + ], + "maximum": 1000000, + "minimum": 1, + "description": "Maximum number of aggregation buckets allowed in a single response. OpenSearch default value is used when this is not defined." + }, + "segrep": { + "type": "object", + "properties": { + "pressure.checkpoint.limit": { + "type": "integer", + "title": "segrep.pressure.checkpoint.limit", + "minimum": 0, + "description": "The maximum number of indexing checkpoints that a replica shard can fall behind when copying from primary. Once `segrep.pressure.checkpoint.limit` is breached along with `segrep.pressure.time.limit`, the segment replication backpressure mechanism is initiated. Default is 4 checkpoints." + }, + "pressure.enabled": { + "type": "boolean", + "title": "segrep.pressure.enabled", + "description": "Enables the segment replication backpressure mechanism. Default is false." + }, + "pressure.replica.stale.limit": { + "type": "number", + "title": "segrep.pressure.replica.stale.limit", + "maximum": 1, + "minimum": 0, + "description": "The maximum number of stale replica shards that can exist in a replication group. Once `segrep.pressure.replica.stale.limit` is breached, the segment replication backpressure mechanism is initiated. Default is .5, which is 50% of a replication group." + }, + "pressure.time.limit": { + "type": "string", + "title": "segrep.pressure.time.limit", + "pattern": "^\\d+\\s*(?:[dhms]|ms|micros|nanos)$", + "description": "The maximum amount of time that a replica shard can take to copy from the primary shard. Once segrep.pressure.time.limit is breached along with segrep.pressure.checkpoint.limit, the segment replication backpressure mechanism is initiated. Default is 5 minutes." + } + }, + "additionalProperties": false + }, + "service_log": { + "type": [ + "boolean", + "null" + ], + "description": "Store logs for the service so that they are available in the HTTP API and console." + }, + "shard_indexing_pressure": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enable or disable shard indexing backpressure", + "description": "Enable or disable shard indexing backpressure. Default is false" + }, + "enforced": { + "type": "boolean", + "title": "Run shard indexing backpressure in shadow mode or enforced mode", + "description": "Run shard indexing backpressure in shadow mode or enforced mode.\n In shadow mode (value set as false), shard indexing backpressure tracks all granular-level metrics,\n but it doesn’t actually reject any indexing requests.\n In enforced mode (value set as true),\n shard indexing backpressure rejects any requests to the cluster that might cause a dip in its performance.\n Default is false" + }, + "operating_factor": { + "type": "object", + "properties": { + "lower": { + "type": "number", + "title": "Lower occupancy limit of the allocated quota of memory for the shard", + "minimum": 0, + "description": "Specify the lower occupancy limit of the allocated quota of memory for the shard.\n If the total memory usage of a shard is below this limit,\n shard indexing backpressure decreases the current allocated memory for that shard.\n Default is 0.75" + }, + "optimal": { + "type": "number", + "title": "Optimal occupancy of the allocated quota of memory for the shard", + "minimum": 0, + "description": "Specify the optimal occupancy of the allocated quota of memory for the shard.\n If the total memory usage of a shard is at this level,\n shard indexing backpressure doesn’t change the current allocated memory for that shard.\n Default is 0.85" + }, + "upper": { + "type": "number", + "title": "Upper occupancy limit of the allocated quota of memory for the shard", + "minimum": 0, + "description": "Specify the upper occupancy limit of the allocated quota of memory for the shard.\n If the total memory usage of a shard is above this limit,\n shard indexing backpressure increases the current allocated memory for that shard.\n Default is 0.95" + } + }, + "title": "Operating factor", + "additionalProperties": false + }, + "primary_parameter": { + "type": "object", + "properties": { + "node": { + "type": "object", + "properties": { + "soft_limit": { + "type": "number", + "title": "Node soft limit", + "minimum": 0, + "description": "Define the percentage of the node-level memory\n threshold that acts as a soft indicator for strain on a node.\n Default is 0.7" + } + }, + "additionalProperties": false + }, + "shard": { + "type": "object", + "properties": { + "min_limit": { + "type": "number", + "title": "Shard min limit", + "minimum": 0, + "description": "Specify the minimum assigned quota for a new shard in any role (coordinator, primary, or replica).\n Shard indexing backpressure increases or decreases this allocated quota based on the inflow of traffic for the shard.\n Default is 0.001" + } + }, + "additionalProperties": false + } + }, + "title": "Primary parameter", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "thread_pool_analyze_queue_size": { + "type": "integer", + "maximum": 2000, + "minimum": 10, + "description": "Size for the thread pool queue. See documentation for exact details." + }, + "thread_pool_analyze_size": { + "type": "integer", + "maximum": 128, + "minimum": 1, + "description": "Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value." + }, + "thread_pool_force_merge_size": { + "type": "integer", + "maximum": 128, + "minimum": 1, + "description": "Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value." + }, + "thread_pool_get_queue_size": { + "type": "integer", + "maximum": 2000, + "minimum": 10, + "description": "Size for the thread pool queue. See documentation for exact details." + }, + "thread_pool_get_size": { + "type": "integer", + "maximum": 128, + "minimum": 1, + "description": "Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value." + }, + "thread_pool_search_queue_size": { + "type": "integer", + "maximum": 2000, + "minimum": 10, + "description": "Size for the thread pool queue. See documentation for exact details." + }, + "thread_pool_search_size": { + "type": "integer", + "maximum": 128, + "minimum": 1, + "description": "Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value." + }, + "thread_pool_search_throttled_queue_size": { + "type": "integer", + "maximum": 2000, + "minimum": 10, + "description": "Size for the thread pool queue. See documentation for exact details." + }, + "thread_pool_search_throttled_size": { + "type": "integer", + "maximum": 128, + "minimum": 1, + "description": "Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value." + }, + "thread_pool_write_queue_size": { + "type": "integer", + "maximum": 2000, + "minimum": 10, + "description": "Size for the thread pool queue. See documentation for exact details." + }, + "thread_pool_write_size": { + "type": "integer", + "maximum": 128, + "minimum": 1, + "description": "Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value." + }, + "version": { + "type": [ + "string", + "null" + ], + "enum": [ + "2.19", + "3.3", + "3.6" + ] + } + }, + "additionalProperties": false, + "description": "opensearch properties" + }, + "databaseServicePropertiesValkey": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "automatic_utility_network_ip_filter": { + "type": "boolean", + "description": "Automatically allow connections from servers in the utility network within the same zone" + }, + "backup_hour": { + "type": [ + "integer", + "null" + ], + "maximum": 23, + "minimum": 0 + }, + "backup_minute": { + "type": [ + "integer", + "null" + ], + "maximum": 59, + "minimum": 0 + }, + "frequent_snapshots": { + "type": "boolean", + "description": "When enabled, Valkey will create frequent local RDB snapshots. When disabled, Valkey will only take RDB snapshots when a backup is created, based on the backup schedule. This setting is ignored when `valkey_persistence` is set to `off`." + }, + "ip_filter": { + "type": "array", + "items": { + "type": "string", + "title": "CIDR address block", + "maxLength": 18, + "example": [ + "10.0.0.0/24" + ] + }, + "description": "Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'" + }, + "migration": { + "type": [ + "object", + "null" + ], + "properties": { + "dbname": { + "type": "string", + "title": "Database name for bootstrapping the initial connection", + "maxLength": 63 + }, + "host": { + "type": "string", + "title": "Hostname or IP address of the server where to migrate data from", + "maxLength": 255 + }, + "ignore_dbs": { + "type": "string", + "title": "Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment)", + "maxLength": 2048 + }, + "ignore_roles": { + "type": "string", + "title": "Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment)", + "maxLength": 2048 + }, + "method": { + "type": "string", + "title": "The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types)", + "enum": [ + "dump", + "replication" + ] + }, + "password": { + "type": "string", + "title": "Password for authentication with the server where to migrate data from", + "maxLength": 256 + }, + "port": { + "type": "integer", + "title": "Port number of the server where to migrate data from", + "maximum": 65535, + "minimum": 1 + }, + "ssl": { + "type": "boolean", + "title": "The server where to migrate data from is secured with SSL" + }, + "username": { + "type": "string", + "title": "User name for authentication with the server where to migrate data from", + "maxLength": 256 + } + }, + "required": [ + "host", + "port" + ], + "additionalProperties": false + }, + "public_access": { + "type": "boolean", + "description": "Allow access to the service from the public Internet" + }, + "public_access_prometheus": { + "type": "boolean", + "description": "Allow access to Prometheus metrics from the public Internet" + }, + "service_log": { + "type": [ + "boolean", + "null" + ], + "description": "Store logs for the service so that they are available in the HTTP API and console." + }, + "valkey_acl_channels_default": { + "type": "string", + "enum": [ + "allchannels", + "resetchannels" + ], + "description": "Determines default pub/sub channels' ACL for new users if ACL is not supplied. When this option is not defined, all_channels is assumed to keep backward compatibility. This option doesn't affect Valkey configuration acl-pubsub-default." + }, + "valkey_active_defrag_ignore_bytes": { + "type": "integer", + "maximum": 1073741824, + "minimum": 1048576, + "description": "Minimum amount of fragmentation waste, in bytes, before active defragmentation starts. Only takes effect when `valkey_activedefrag` is enabled." + }, + "valkey_active_defrag_threshold_lower": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Minimum percentage of fragmentation before active defragmentation starts. Only takes effect when `valkey_activedefrag` is enabled." + }, + "valkey_active_expire_effort": { + "type": "integer", + "maximum": 10, + "minimum": 1, + "description": "Valkey reclaims expired keys both when accessed and in the background. The background process scans for expired keys to free memory. Increasing the active-expire-effort setting (default 1, max 10) uses more CPU to reclaim expired keys faster, reducing memory usage but potentially increasing latency." + }, + "valkey_activedefrag": { + "type": "boolean", + "description": "Enable active memory defragmentation. When enabled, Valkey relocates objects off sparsely-used memory pages to reduce fragmentation and return memory to the operating system. Defragmentation runs on the main thread and consumes CPU, so it may increase latency under load." + }, + "valkey_io_threads": { + "type": "integer", + "maximum": 256, + "minimum": 1, + "description": "Set Valkey IO thread count. Changing this will cause a restart of the Valkey service." + }, + "valkey_lfu_decay_time": { + "type": "integer", + "maximum": 120, + "minimum": 1 + }, + "valkey_lfu_log_factor": { + "type": "integer", + "maximum": 100, + "minimum": 0 + }, + "valkey_maxmemory_policy": { + "type": [ + "string", + "null" + ], + "enum": [ + "noeviction", + "allkeys-lru", + "volatile-lru", + "allkeys-random", + "volatile-random", + "volatile-ttl", + "volatile-lfu", + "allkeys-lfu" + ] + }, + "valkey_notify_keyspace_events": { + "type": "string", + "maxLength": 32, + "pattern": "^[KEg\\$lshzxentdmA]*$" + }, + "valkey_number_of_databases": { + "type": "integer", + "maximum": 128, + "minimum": 1, + "description": "Set number of Valkey databases. Changing this will cause a restart of the Valkey service." + }, + "valkey_persistence": { + "type": "string", + "enum": [ + "off", + "rdb" + ], + "description": "Controls whether Valkey writes RDB dumps to disk. With `rdb`, RDB dumps are written for backups on the backup schedule and, if `frequent_snapshots` is enabled, every 10 minutes so the service can recover recent data after a restart. With `off`, no RDB dumps are written at all: backups and forking are unavailable, `frequent_snapshots` and `backup_hour`/`backup_minute` have no effect, and all data is lost if the service restarts or is powered off." + }, + "valkey_pubsub_client_output_buffer_limit": { + "type": "integer", + "maximum": 262144, + "minimum": 32, + "description": "Set output buffer limit for pub / sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan." + }, + "valkey_ssl": { + "type": "boolean" + }, + "valkey_timeout": { + "type": "integer", + "maximum": 2073600, + "minimum": 0 + }, + "valkey_version": { + "type": [ + "string", + "null" + ], + "enum": [ + "8.1", + "9.1" + ] + } + }, + "additionalProperties": false, + "description": "valkey properties" + }, + "databaseServiceModifyOpenAPI": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "title": "my-managed-database", + "powered": true, + "plan": "1x1xCPU-2GB-25GB", + "additional_disk_space_gib": 100, + "zone": "de-fra1", + "maintenance": { + "dow": "sunday", + "time": "12:00:00" + }, + "termination_protection": false, + "properties": { + "automatic_utility_network_ip_filter": true, + "version": "8", + "ip_filter": [] + }, + "networks": [ + { + "name": "example-network-1", + "type": "private", + "family": "IPv4", + "uuid": "03631160-d57a-4926-ad48-a2f828229dcb" + } + ] + } + ], + "properties": { + "title": { + "type": "string", + "examples": [ + "my-managed-database" + ], + "description": "Human-readable title for the service." + }, + "type": { + "$ref": "#/components/schemas/databaseServiceType" + }, + "powered": { + "type": "boolean", + "examples": [ + true + ], + "description": "Desired power state of the service." + }, + "zone": { + "type": "string", + "examples": [ + "de-fra1" + ], + "pattern": "^[a-z]{2}-[a-z]{3}\\d$", + "description": "Zone to migrate the service to." + }, + "plan": { + "type": "string", + "examples": [ + "1x1xCPU-2GB-25GB", + "rdb.standard.2x-2CPU-8GB-120GB-regular" + ], + "description": "Deprecated: prefer the plan_* selection fields (plan_compute, plan_node_count, plan_storage_gib, plan_backups) for PostgreSQL and MySQL. The plan name remains supported, and required for engines without componentised plans. For componentised (rdb.*) plans the storage segment is the desired TOTAL storage per node: any total reachable from a catalog plan's included storage in the plan's storage steps (within its cap) is a valid plan name, e.g. rdb.standard.2x-2CPU-8GB-120GB-regular selects the 80GB catalog plan with a 40GB dynamic top-up.", + "deprecated": true + }, + "plan_compute": { + "type": "string", + "examples": [ + "rdb.standard.2CPU-8GB" + ], + "description": "Plan selection: compute shape combining family, CPU and memory as one token, as listed in the plan catalog components. PostgreSQL and MySQL only." + }, + "plan_node_count": { + "type": "integer", + "examples": [ + 1 + ], + "description": "Plan selection: number of nodes." + }, + "plan_storage_gib": { + "type": "integer", + "examples": [ + 120 + ], + "description": "Plan selection: desired TOTAL storage per node in GiB. Resolution picks the plan whose included storage matches, or tops the closest plan up with dynamic additional storage within the allowed limits. Mutually exclusive with additional_disk_space_gib." + }, + "plan_backups": { + "type": "string", + "examples": [ + "regular" + ], + "enum": [ + "mini", + "regular", + "extended" + ], + "description": "Plan selection: backup tier. PostgreSQL and MySQL tiered plans only." + }, + "additional_disk_space_gib": { + "type": "integer", + "examples": [ + 10 + ], + "description": "Additional disk space in GiB. Legacy plans only: componentised (rdb.*) plans set storage as a total via plan_storage_gib or the plan name.", + "deprecated": true + }, + "termination_protection": { + "type": "boolean", + "examples": [ + false + ], + "description": "When enabled, the service cannot be deleted until termination protection is disabled." + }, + "maintenance": { + "type": "object", + "examples": [ + { + "dow": "sunday", + "time": "12:00:00" + } + ], + "properties": { + "dow": { + "$ref": "#/components/schemas/databaseMaintenanceDow" + }, + "time": { + "$ref": "#/components/schemas/databaseMaintenanceTime" + } + }, + "required": [ + "dow", + "time" + ], + "description": "Weekly maintenance window." + }, + "networks": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/databaseNetworkCreate" + }, + "maxItems": 8, + "description": "SDN networks attached to the service." + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseLabelCreate" + }, + "maxItems": 255, + "description": "Labels used for service filtering." + }, + "properties": { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/databaseServicePropertiesMysql" + }, + { + "$ref": "#/components/schemas/databaseServicePropertiesPg" + }, + { + "$ref": "#/components/schemas/databaseServicePropertiesRedis" + }, + { + "$ref": "#/components/schemas/databaseServicePropertiesOpensearch" + }, + { + "$ref": "#/components/schemas/databaseServicePropertiesValkey" + } + ], + "description": "Engine-specific configuration properties. The allowed keys depend on the service type; provide the property set matching the service's type." + } + }, + "title": "ServiceModifyOpenAPI", + "additionalProperties": false, + "description": "Schema for modifying a service β€” OpenAPI version." + }, + "databaseServiceTypeModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "target_type": "primary" + }, + { + "target_type": "readonly" + }, + { + "target_type": "analytics" + }, + { + "target_type": "hot" + }, + { + "target_type": "cold" + } + ], + "properties": { + "target_type": { + "type": "string", + "description": "Service type" + } + }, + "title": "ServiceTypeModify", + "required": [ + "target_type" + ], + "additionalProperties": false, + "description": "Schema for modifying the service type" + }, + "databaseServiceCloneOpenAPI": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/databaseServiceCloneMysql" + }, + { + "$ref": "#/components/schemas/databaseServiceClonePg" + }, + { + "$ref": "#/components/schemas/databaseServiceCloneRedis" + }, + { + "$ref": "#/components/schemas/databaseServiceCloneOpensearch" + }, + { + "$ref": "#/components/schemas/databaseServiceCloneValkey" + } + ], + "examples": [ + { + "title": "new-title", + "hostname_prefix": "new-hostname-prefix", + "clone_time": "2022-01-21T12:21:00Z", + "plan": "1x1xCPU-2GB-25GB", + "zone": "fi-hel1", + "maintenance": { + "dow": "sunday", + "time": "12:00:00" + }, + "properties": { + "automatic_utility_network_ip_filter": false, + "version": "13", + "public_access": true, + "ip_filter": [ + "0.0.0.0/0" + ] + } + } + ], + "properties": { + "plan": { + "type": "string", + "examples": [ + "1x1xCPU-2GB-25GB", + "rdb.standard.2x-2CPU-8GB-120GB-regular" + ], + "description": "Deprecated: prefer the plan_* selection fields (plan_compute, plan_node_count, plan_storage_gib, plan_backups) for PostgreSQL and MySQL. The plan name remains supported, and required for engines without componentised plans. For componentised (rdb.*) plans the storage segment is the desired TOTAL storage per node: any total reachable from a catalog plan's included storage in the plan's storage steps (within its cap) is a valid plan name, e.g. rdb.standard.2x-2CPU-8GB-120GB-regular selects the 80GB catalog plan with a 40GB dynamic top-up.", + "deprecated": true + }, + "plan_compute": { + "type": "string", + "examples": [ + "rdb.standard.2CPU-8GB" + ], + "description": "Plan selection: compute shape combining family, CPU and memory as one token, as listed in the plan catalog components. PostgreSQL and MySQL only." + }, + "plan_node_count": { + "type": "integer", + "examples": [ + 1 + ], + "description": "Plan selection: number of nodes." + }, + "plan_storage_gib": { + "type": "integer", + "examples": [ + 120 + ], + "description": "Plan selection: desired TOTAL storage per node in GiB. Resolution picks the plan whose included storage matches, or tops the closest plan up with dynamic additional storage within the allowed limits. Mutually exclusive with additional_disk_space_gib." + }, + "plan_backups": { + "type": "string", + "examples": [ + "regular" + ], + "enum": [ + "mini", + "regular", + "extended" + ], + "description": "Plan selection: backup tier. PostgreSQL and MySQL tiered plans only." + }, + "additional_disk_space_gib": { + "type": "integer", + "examples": [ + 10 + ], + "description": "Additional disk space in GiB. Legacy plans only: componentised (rdb.*) plans set storage as a total via plan_storage_gib or the plan name.", + "deprecated": true + } + }, + "title": "ServiceCloneOpenAPI", + "additionalProperties": false, + "description": "Schema for cloning a service β€” OpenAPI version." + }, + "databaseServiceCloneMysql": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "hostname_prefix": "dev", + "plan": "starter-kit-plan", + "clone_time": "2024-01-30T15:04:05Z", + "backup_name": "daily-backup-2024-01-30", + "zone": "fi-hel1", + "termination_protection": false, + "maintenance": { + "dow": "monday", + "time": "03:00:00" + }, + "additional_disk_space_gib": 10 + } + ], + "properties": { + "hostname_prefix": { + "type": "string", + "maxLength": 30, + "minLength": 3, + "description": "Hostname prefix" + }, + "plan": { + "type": "string", + "minLength": 1, + "description": "Deprecated: prefer the plan_* selection fields (plan_compute, plan_node_count, plan_storage_gib, plan_backups). The plan name form remains supported. For componentised (rdb.*) plans the storage segment is the desired TOTAL storage per node: any total reachable from a catalog plan's included storage in the plan's storage steps (within its cap) is a valid plan name, e.g. rdb.standard.2x-2CPU-8GB-120GB-regular selects the 80GB catalog plan with a 40GB dynamic top-up.", + "deprecated": true + }, + "plan_compute": { + "type": "string", + "examples": [ + "rdb.standard.2CPU-8GB" + ], + "minLength": 1, + "description": "Plan selection: compute shape combining family, CPU and memory as one token, as listed in the plan catalog components. PostgreSQL and MySQL only." + }, + "plan_node_count": { + "type": "integer", + "examples": [ + 1 + ], + "maximum": 16, + "minimum": 1, + "format": "int32", + "description": "Plan selection: number of nodes." + }, + "plan_storage_gib": { + "type": "integer", + "examples": [ + 50 + ], + "minimum": 1, + "format": "int32", + "description": "Plan selection: desired TOTAL storage per node in GiB. Resolution picks the plan whose included storage matches, or tops the closest plan up with dynamic additional storage within the allowed limits. Mutually exclusive with additional_disk_space_gib." + }, + "plan_backups": { + "type": "string", + "examples": [ + "regular" + ], + "enum": [ + "mini", + "regular", + "extended" + ], + "description": "Plan selection: backup tier. PostgreSQL and MySQL tiered plans only." + }, + "title": { + "$ref": "#/components/schemas/databaseTitle" + }, + "clone_time": { + "type": "string", + "examples": [ + "2024-01-30T15:04:05Z" + ], + "maxLength": 32, + "format": "date-time", + "description": "Clone time" + }, + "backup_name": { + "type": "string", + "examples": [ + "daily-backup-2024-01-30" + ], + "maxLength": 128, + "pattern": "^[a-zA-Z0-9-_:.]+$", + "description": "Backup name" + }, + "set_service_uuid": { + "type": "string", + "examples": [ + "123e4567-e89b-12d3-a456-426614174000" + ], + "format": "uuid", + "description": "Title" + }, + "zone": { + "type": "string", + "examples": [ + "fi-hel1" + ], + "pattern": "^[a-z]{2}-[a-z]{3}\\d$", + "description": "Zone" + }, + "termination_protection": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Termination protection", + "default": false + }, + "maintenance": { + "type": "object", + "properties": { + "dow": { + "$ref": "#/components/schemas/databaseMaintenanceDow" + }, + "time": { + "$ref": "#/components/schemas/databaseMaintenanceTime" + } + }, + "required": [ + "dow", + "time" + ], + "description": "Maintenance" + }, + "networks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseNetworkCreate" + }, + "maxItems": 8, + "description": "Networks" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseLabelCreate" + }, + "maxItems": 255, + "description": "Labels" + }, + "additional_disk_space_gib": { + "type": "integer", + "examples": [ + 10, + 20 + ], + "format": "int32", + "description": "Additional disk space in GiB. Legacy plans only: componentised (rdb.*) plans set storage as a total via plan_storage_gib or the plan name.", + "deprecated": true + }, + "properties": { + "$ref": "#/components/schemas/databaseServicePropertiesMysql" + } + }, + "title": "ServiceCloneMysql", + "required": [ + "hostname_prefix" + ], + "additionalProperties": false, + "description": "Schema for cloning a MySQL service" + }, + "databaseServiceClonePg": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "hostname_prefix": "my-pg-service", + "plan": "basic-pg-plan", + "clone_time": "2024-01-30T15:04:05Z", + "backup_name": "daily-backup-2024-01-30", + "zone": "fi-hel1", + "termination_protection": false, + "maintenance": { + "dow": "monday", + "time": "03:00:00" + }, + "additional_disk_space_gib": 10 + }, + { + "hostname_prefix": "prod-pg-clone", + "plan": "enterprise-pg-plan", + "backup_name": "weekly-backup-2024-02-05", + "zone": "us-nyc1", + "termination_protection": true, + "maintenance": { + "dow": "wednesday", + "time": "22:30:00" + }, + "additional_disk_space_gib": 20, + "set_service_uuid": "123e4567-e89b-12d3-a456-426614174000" + } + ], + "properties": { + "hostname_prefix": { + "type": "string", + "examples": [ + "my-pg-service" + ], + "maxLength": 30, + "minLength": 3, + "description": "Hostname prefix" + }, + "plan": { + "type": "string", + "examples": [ + "basic-pg-plan" + ], + "minLength": 1, + "description": "Deprecated: prefer the plan_* selection fields (plan_compute, plan_node_count, plan_storage_gib, plan_backups). The plan name form remains supported. For componentised (rdb.*) plans the storage segment is the desired TOTAL storage per node: any total reachable from a catalog plan's included storage in the plan's storage steps (within its cap) is a valid plan name, e.g. rdb.standard.2x-2CPU-8GB-120GB-regular selects the 80GB catalog plan with a 40GB dynamic top-up.", + "deprecated": true + }, + "plan_compute": { + "type": "string", + "examples": [ + "rdb.standard.2CPU-8GB" + ], + "minLength": 1, + "description": "Plan selection: compute shape combining family, CPU and memory as one token, as listed in the plan catalog components. PostgreSQL and MySQL only." + }, + "plan_node_count": { + "type": "integer", + "examples": [ + 1 + ], + "maximum": 16, + "minimum": 1, + "format": "int32", + "description": "Plan selection: number of nodes." + }, + "plan_storage_gib": { + "type": "integer", + "examples": [ + 50 + ], + "minimum": 1, + "format": "int32", + "description": "Plan selection: desired TOTAL storage per node in GiB. Resolution picks the plan whose included storage matches, or tops the closest plan up with dynamic additional storage within the allowed limits. Mutually exclusive with additional_disk_space_gib." + }, + "plan_backups": { + "type": "string", + "examples": [ + "regular" + ], + "enum": [ + "mini", + "regular", + "extended" + ], + "description": "Plan selection: backup tier. PostgreSQL and MySQL tiered plans only." + }, + "title": { + "$ref": "#/components/schemas/databaseTitle" + }, + "clone_time": { + "type": "string", + "examples": [ + "2024-01-30T15:04:05Z" + ], + "maxLength": 32, + "format": "date-time", + "description": "Clone time", + "example": "2024-01-30T15:04:05Z" + }, + "backup_name": { + "type": "string", + "examples": [ + "daily-backup-2024-01-30" + ], + "maxLength": 128, + "pattern": "^[a-zA-Z0-9-_:.]+$", + "description": "Backup name" + }, + "set_service_uuid": { + "type": "string", + "examples": [ + "123e4567-e89b-12d3-a456-426614174000" + ], + "format": "uuid", + "description": "Title" + }, + "zone": { + "type": "string", + "examples": [ + "fi-hel1" + ], + "pattern": "^[a-z]{2}-[a-z]{3}\\d$", + "description": "Zone" + }, + "termination_protection": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Termination protection" + }, + "maintenance": { + "type": "object", + "properties": { + "dow": { + "$ref": "#/components/schemas/databaseMaintenanceDow" + }, + "time": { + "$ref": "#/components/schemas/databaseMaintenanceTime" + } + }, + "required": [ + "dow", + "time" + ], + "description": "Maintenance" + }, + "networks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseNetworkCreate" + }, + "maxItems": 8 + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseLabelCreate" + }, + "maxItems": 255, + "description": "Labels" + }, + "additional_disk_space_gib": { + "type": "integer", + "format": "int32", + "description": "Additional disk space in GiB. Legacy plans only: componentised (rdb.*) plans set storage as a total via plan_storage_gib or the plan name.", + "deprecated": true + }, + "properties": { + "$ref": "#/components/schemas/databaseServicePropertiesPg" + } + }, + "title": "ServiceClonePg", + "required": [ + "hostname_prefix" + ], + "additionalProperties": false, + "description": "Schema for cloning a PostgreSQL service." + }, + "databaseServiceCloneRedis": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "allOf": [ + { + "not": { + "anyOf": [ + { + "required": [ + "plan_compute" + ] + }, + { + "required": [ + "plan_node_count" + ] + }, + { + "required": [ + "plan_storage_gib" + ] + }, + { + "required": [ + "plan_backups" + ] + } + ], + "required": [ + "plan" + ], + "description": "plan and the plan_* selection fields are mutually exclusive" + } + }, + { + "not": { + "required": [ + "plan_storage_gib", + "additional_disk_space_gib" + ] + }, + "description": "plan_storage_gib is total storage and excludes additional_disk_space_gib" + } + ], + "examples": [ + { + "hostname_prefix": "my-redis", + "plan": "basic-redis-plan", + "clone_time": "2024-01-30T15:04:05Z", + "backup_name": "daily-backup-2024-01-30", + "zone": "fi-hel1", + "termination_protection": false, + "maintenance": { + "dow": "monday", + "time": "03:00:00" + } + }, + { + "hostname_prefix": "redis-prod", + "plan": "enterprise-redis-plan", + "backup_name": "weekly-backup-2024-02-05", + "zone": "us-nyc1", + "termination_protection": true, + "maintenance": { + "dow": "wednesday", + "time": "22:30:00" + }, + "set_service_uuid": "123e4567-e89b-12d3-a456-426614174000" + } + ], + "properties": { + "hostname_prefix": { + "type": "string", + "examples": [ + "my-redis" + ], + "maxLength": 30, + "minLength": 3, + "description": "Hostname prefix" + }, + "plan": { + "type": "string", + "examples": [ + "basic-redis-plan" + ], + "minLength": 1, + "description": "Plan" + }, + "plan_compute": { + "type": "string", + "examples": [ + "rdb.standard.2CPU-8GB" + ], + "minLength": 1, + "description": "Plan selection: compute shape combining family, CPU and memory as one token, as listed in the plan catalog components. PostgreSQL and MySQL only." + }, + "plan_node_count": { + "type": "integer", + "examples": [ + 1 + ], + "maximum": 16, + "minimum": 1, + "format": "int32", + "description": "Plan selection: number of nodes." + }, + "plan_storage_gib": { + "type": "integer", + "examples": [ + 50 + ], + "minimum": 1, + "format": "int32", + "description": "Plan selection: desired TOTAL storage per node in GiB. Resolution picks the plan whose included storage matches, or tops the closest plan up with dynamic additional storage within the allowed limits. Mutually exclusive with additional_disk_space_gib." + }, + "plan_backups": { + "type": "string", + "examples": [ + "regular" + ], + "enum": [ + "mini", + "regular", + "extended" + ], + "description": "Plan selection: backup tier. PostgreSQL and MySQL tiered plans only." + }, + "title": { + "$ref": "#/components/schemas/databaseTitle" + }, + "clone_time": { + "type": "string", + "examples": [ + "2024-01-30T15:04:05Z" + ], + "maxLength": 32, + "format": "date-time", + "description": "Clone time", + "example": "2024-01-30T15:04:05Z" + }, + "backup_name": { + "type": "string", + "examples": [ + "daily-backup-2024-01-30" + ], + "maxLength": 128, + "pattern": "^[a-zA-Z0-9-_:.]+$", + "format": "string", + "description": "Backup name" + }, + "set_service_uuid": { + "type": "string", + "examples": [ + "123e4567-e89b-12d3-a456-426614174000" + ], + "format": "uuid", + "description": "Title" + }, + "zone": { + "type": "string", + "examples": [ + "fi-hel1" + ], + "pattern": "^[a-z]{2}-[a-z]{3}\\d$", + "description": "Zone" + }, + "termination_protection": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Termination protection" + }, + "maintenance": { + "type": "object", + "properties": { + "dow": { + "$ref": "#/components/schemas/databaseMaintenanceDow" + }, + "time": { + "$ref": "#/components/schemas/databaseMaintenanceTime" + } + }, + "required": [ + "dow", + "time" + ], + "description": "Maintenance" + }, + "networks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseNetworkCreate" + }, + "maxItems": 8 + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseLabelCreate" + }, + "maxItems": 255, + "description": "Labels" + }, + "properties": { + "$ref": "#/components/schemas/databaseServicePropertiesRedis" + } + }, + "title": "ServiceCloneRedis", + "required": [ + "hostname_prefix" + ], + "additionalProperties": false, + "description": "Schema for cloning a Redis service." + }, + "databaseServiceCloneOpensearch": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "allOf": [ + { + "not": { + "anyOf": [ + { + "required": [ + "plan_compute" + ] + }, + { + "required": [ + "plan_node_count" + ] + }, + { + "required": [ + "plan_storage_gib" + ] + }, + { + "required": [ + "plan_backups" + ] + } + ], + "required": [ + "plan" + ], + "description": "plan and the plan_* selection fields are mutually exclusive" + } + }, + { + "not": { + "required": [ + "plan_storage_gib", + "additional_disk_space_gib" + ] + }, + "description": "plan_storage_gib is total storage and excludes additional_disk_space_gib" + } + ], + "examples": [ + { + "hostname_prefix": "my-opensearch", + "plan": "my-plan", + "clone_time": "2024-01-30T15:04:05Z", + "backup_name": "daily-backup-2024-01-30", + "zone": "fi-hel1", + "termination_protection": false, + "maintenance": { + "dow": "monday", + "time": "03:00:00" + }, + "additional_disk_space_gib": 10 + }, + { + "hostname_prefix": "search-prod", + "plan": "enterprise-plan", + "backup_name": "weekly-backup-2024-02-05", + "zone": "us-nyc1", + "termination_protection": true, + "maintenance": { + "dow": "wednesday", + "time": "22:30:00" + }, + "additional_disk_space_gib": 20 + } + ], + "properties": { + "hostname_prefix": { + "type": "string", + "examples": [ + "my-opensearch" + ], + "maxLength": 30, + "minLength": 3, + "description": "Hostname prefix" + }, + "plan": { + "type": "string", + "examples": [ + "my-plan" + ], + "minLength": 1, + "description": "Plan" + }, + "plan_compute": { + "type": "string", + "examples": [ + "rdb.standard.2CPU-8GB" + ], + "minLength": 1, + "description": "Plan selection: compute shape combining family, CPU and memory as one token, as listed in the plan catalog components. PostgreSQL and MySQL only." + }, + "plan_node_count": { + "type": "integer", + "examples": [ + 1 + ], + "maximum": 16, + "minimum": 1, + "format": "int32", + "description": "Plan selection: number of nodes." + }, + "plan_storage_gib": { + "type": "integer", + "examples": [ + 50 + ], + "minimum": 1, + "format": "int32", + "description": "Plan selection: desired TOTAL storage per node in GiB. Resolution picks the plan whose included storage matches, or tops the closest plan up with dynamic additional storage within the allowed limits. Mutually exclusive with additional_disk_space_gib." + }, + "plan_backups": { + "type": "string", + "examples": [ + "regular" + ], + "enum": [ + "mini", + "regular", + "extended" + ], + "description": "Plan selection: backup tier. PostgreSQL and MySQL tiered plans only." + }, + "title": { + "$ref": "#/components/schemas/databaseTitle" + }, + "clone_time": { + "type": "string", + "examples": [ + "2024-01-30T15:04:05Z" + ], + "maxLength": 32, + "format": "date-time", + "description": "Clone time", + "example": "2024-01-30T15:04:05Z" + }, + "backup_name": { + "type": "string", + "examples": [ + "daily-backup-2024-01-30" + ], + "maxLength": 128, + "pattern": "^[a-zA-Z0-9-_:.]+$", + "format": "string", + "description": "Backup name" + }, + "set_service_uuid": { + "type": "string", + "examples": [ + "123e4567-e89b-12d3-a456-426614174000" + ], + "format": "uuid", + "description": "Title" + }, + "zone": { + "type": "string", + "examples": [ + "fi-hel1" + ], + "pattern": "^[a-z]{2}-[a-z]{3}\\d$", + "description": "Zone" + }, + "termination_protection": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Termination protection" + }, + "maintenance": { + "type": "object", + "properties": { + "dow": { + "$ref": "#/components/schemas/databaseMaintenanceDow" + }, + "time": { + "$ref": "#/components/schemas/databaseMaintenanceTime" + } + }, + "required": [ + "dow", + "time" + ], + "description": "Maintenance" + }, + "networks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseNetworkCreate" + }, + "maxItems": 8, + "description": "Networks" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseLabelCreate" + }, + "maxItems": 255, + "description": "Labels" + }, + "additional_disk_space_gib": { + "type": "integer", + "examples": [ + 10, + 20 + ], + "format": "int32", + "description": "Additional disk space in GiB" + }, + "properties": { + "$ref": "#/components/schemas/databaseServicePropertiesOpensearch" + } + }, + "title": "ServiceCloneOpensearch", + "required": [ + "hostname_prefix" + ], + "additionalProperties": false, + "description": "Schema for cloning an OpenSearch service" + }, + "databaseServiceCloneValkey": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "allOf": [ + { + "not": { + "anyOf": [ + { + "required": [ + "plan_compute" + ] + }, + { + "required": [ + "plan_node_count" + ] + }, + { + "required": [ + "plan_storage_gib" + ] + }, + { + "required": [ + "plan_backups" + ] + } + ], + "required": [ + "plan" + ], + "description": "plan and the plan_* selection fields are mutually exclusive" + } + }, + { + "not": { + "required": [ + "plan_storage_gib", + "additional_disk_space_gib" + ] + }, + "description": "plan_storage_gib is total storage and excludes additional_disk_space_gib" + } + ], + "properties": { + "hostname_prefix": { + "type": "string", + "examples": [ + "my-service" + ], + "maxLength": 30, + "minLength": 3, + "description": "Hostname prefix" + }, + "plan": { + "type": "string", + "examples": [ + "basic-plan" + ], + "minLength": 1, + "description": "Plan" + }, + "plan_compute": { + "type": "string", + "examples": [ + "rdb.standard.2CPU-8GB" + ], + "minLength": 1, + "description": "Plan selection: compute shape combining family, CPU and memory as one token, as listed in the plan catalog components. PostgreSQL and MySQL only." + }, + "plan_node_count": { + "type": "integer", + "examples": [ + 1 + ], + "maximum": 16, + "minimum": 1, + "format": "int32", + "description": "Plan selection: number of nodes." + }, + "plan_storage_gib": { + "type": "integer", + "examples": [ + 50 + ], + "minimum": 1, + "format": "int32", + "description": "Plan selection: desired TOTAL storage per node in GiB. Resolution picks the plan whose included storage matches, or tops the closest plan up with dynamic additional storage within the allowed limits. Mutually exclusive with additional_disk_space_gib." + }, + "plan_backups": { + "type": "string", + "examples": [ + "regular" + ], + "enum": [ + "mini", + "regular", + "extended" + ], + "description": "Plan selection: backup tier. PostgreSQL and MySQL tiered plans only." + }, + "title": { + "$ref": "#/components/schemas/databaseTitle" + }, + "clone_time": { + "type": "string", + "examples": [ + "2024-01-30T15:04:05Z" + ], + "maxLength": 32, + "format": "date-time", + "description": "Clone time", + "example": "2024-01-30T15:04:05Z" + }, + "backup_name": { + "type": "string", + "examples": [ + "daily-backup-2024-01-30" + ], + "maxLength": 128, + "pattern": "^[a-zA-Z0-9-_:.]+$", + "format": "string", + "description": "Backup name" + }, + "set_service_uuid": { + "type": "string", + "examples": [ + "123e4567-e89b-12d3-a456-426614174000" + ], + "format": "uuid", + "description": "Title" + }, + "zone": { + "type": "string", + "examples": [ + "fi-hel1" + ], + "pattern": "^[a-z]{2}-[a-z]{3}\\d$", + "description": "Zone" + }, + "termination_protection": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Termination protection" + }, + "maintenance": { + "type": "object", + "properties": { + "dow": { + "$ref": "#/components/schemas/databaseMaintenanceDow" + }, + "time": { + "$ref": "#/components/schemas/databaseMaintenanceTime" + } + }, + "required": [ + "dow", + "time" + ], + "description": "Maintenance" + }, + "networks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseNetworkCreate" + }, + "maxItems": 8 + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseLabelCreate" + }, + "maxItems": 255, + "description": "Labels" + }, + "properties": { + "$ref": "#/components/schemas/databaseServicePropertiesValkey" + } + }, + "title": "ServiceCloneValkey", + "required": [ + "hostname_prefix" + ], + "additionalProperties": false, + "description": "Schema for cloning a service with valkey." + }, + "databaseServiceUpgrade": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "target_version": "12" + }, + { + "target_version": "13" + }, + { + "target_version": "14" + }, + { + "target_version": "15" + }, + { + "target_version": "16" + } + ], + "properties": { + "target_version": { + "type": "string", + "description": "Version to upgrade the service", + "example": "12" + } + }, + "title": "ServiceUpgrade", + "required": [ + "target_version" + ], + "additionalProperties": false, + "description": "Schema for upgrading the service version" + }, + "databaseLabelModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "environment", + "value": "production" + } + ], + "properties": { + "key": { + "$ref": "#/components/schemas/databaseLabelKey" + }, + "value": { + "$ref": "#/components/schemas/databaseLabelValue" + } + }, + "title": "LabelModify", + "minProperties": 1, + "additionalProperties": false, + "description": "Schema for modifying a label with a key and/or value." + }, + "databaseServiceAclModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "access_control": true + }, + { + "extended_access_control": true + }, + { + "access_control": false, + "extended_access_control": true + }, + { + "access_control": true, + "extended_access_control": false + } + ], + "properties": { + "access_control": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Enables OpenSearch access control" + }, + "extended_access_control": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Enables OpenSearch extended access control" + } + }, + "title": "ServiceAclModify", + "minProperties": 1, + "additionalProperties": false, + "description": "Schema for modifying service access control settings." + }, + "databaseServiceSecurityModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "admin_password": "Curr3nt@Passw0rd!", + "new_password": "N3w@Str0ngPassw0rd!" + }, + { + "admin_password": "Adm1nPrev#2025", + "new_password": "Rotated#Adm1n2025!" + }, + { + "admin_password": "Old$SecureP@ss99", + "new_password": "Fresh$SecureKey88" + } + ], + "properties": { + "admin_password": { + "type": "string", + "examples": [ + "current_password_123" + ], + "description": "Current admin password" + }, + "new_password": { + "type": "string", + "examples": [ + "new_secure_password_456" + ], + "description": "New admin password" + } + }, + "title": "ServiceSecurityModify", + "required": [ + "admin_password", + "new_password" + ], + "additionalProperties": false, + "description": "Schema for modifying service security settings" + }, + "databaseServiceSecurityEnable": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "admin_password": "Str0ngP@ssw0rd!" + }, + { + "admin_password": "Adm1n#2025$Secure" + }, + { + "admin_password": "S3rv!ce_Access-Key" + }, + { + "admin_password": "Sup3r$Admin!Token" + }, + { + "admin_password": "P@55w0rd_R0t@tion#1" + } + ], + "properties": { + "admin_password": { + "type": "string", + "examples": [ + "Str0ngP@ssw0rd!" + ], + "description": "Security admin password" + } + }, + "title": "ServiceSecurityEnable", + "required": [ + "admin_password" + ], + "additionalProperties": false, + "description": "Schema for enabling security on a service instance" + }, + "databaseIntegrationEndpointCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/databaseIntegrationEndpoint" + }, + "name": { + "type": "string", + "examples": [ + "webhook-endpoint" + ], + "description": "The name of the integration endpoint." + }, + "properties": { + "type": "object", + "examples": [ + { + "format": "rfc5424", + "max_message_size": 8192, + "port": 514, + "server": "1.1.1.1", + "tls": false + } + ], + "description": "A key-value map of properties specific to the integration endpoint type." + } + }, + "title": "IntegrationEndpointCreate", + "required": [ + "name", + "type" + ], + "additionalProperties": false, + "description": "Schema for creating an integration endpoint." + }, + "databaseIntegrationEndpoint": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "rsyslog" + ], + "title": "IntegrationEndpoint", + "enum": [ + "logs", + "prometheus", + "rsyslog" + ], + "description": "The type of integration endpoint." + }, + "databaseIntegrationEndpointModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "properties": { + "type": "object", + "additionalProperties": true, + "example": { + "server": "3.3.3.3", + "port": 514, + "tls": true + } + } + }, + "title": "IntegrationEndpointModify", + "additionalProperties": false, + "description": "Schema for modifying an integration endpoint." + }, + "databaseConnectionPoolCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "database": "defaultdb", + "pool_mode": "statement", + "pool_name": "readonly-pool", + "pool_size": 10, + "username": "readonly" + } + ], + "properties": { + "database": { + "type": "string", + "examples": [ + "defaultdb" + ], + "description": "Database" + }, + "pool_mode": { + "type": "string", + "examples": [ + "session", + "transaction", + "statement" + ], + "enum": [ + "session", + "transaction", + "statement" + ], + "description": "Connection Pool mode" + }, + "pool_name": { + "type": "string", + "examples": [ + "pool-1" + ], + "description": "Connection Pool name" + }, + "pool_size": { + "type": "integer", + "examples": [ + 20 + ], + "format": "int32", + "description": "Connection Pool size" + }, + "username": { + "type": "string", + "examples": [ + "app-user" + ], + "description": "Connection Pool username" + } + }, + "title": "ConnectionPoolCreate", + "required": [ + "database", + "pool_mode", + "pool_name", + "pool_size" + ], + "additionalProperties": false, + "description": "Schema for creating a connection pool." + }, + "databaseConnectionPoolModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "database": "defaultdb", + "pool_mode": "session", + "pool_size": 20, + "username": "app-user" + } + ], + "properties": { + "database": { + "type": "string", + "examples": [ + "defaultdb" + ], + "description": "Database" + }, + "pool_mode": { + "type": "string", + "examples": [ + "session", + "transaction", + "statement" + ], + "enum": [ + "session", + "transaction", + "statement" + ], + "description": "Connection Pool mode" + }, + "pool_size": { + "type": "integer", + "examples": [ + 20 + ], + "format": "int32", + "description": "Connection Pool size" + }, + "username": { + "type": [ + "string", + "null" + ], + "examples": [ + "app-user", + null + ], + "description": "Connection Pool username" + } + }, + "title": "ConnectionPoolModify", + "minProperties": 1, + "additionalProperties": false, + "description": "Schema for modifying a connection pool." + }, + "databaseServiceIntegrationModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "properties": { + "key1": "value1" + } + } + ], + "properties": { + "properties": { + "type": "object", + "examples": [ + { + "key1": "value1" + } + ] + } + }, + "title": "ServiceIntegrationModify", + "additionalProperties": false, + "description": "Schema for modifying a service integration." + }, + "databaseServiceTaskCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "operation": "dataset_import", + "dataset_import": { + "dataset_name": "customer-events" + } + }, + { + "operation": "migration_check", + "migration_check": { + "source_service_uri": "postgresql://user:password@hostname:5432/dbname" + } + }, + { + "operation": "migration_check", + "migration_check": { + "source_service_uri": "postgresql://replica:secret@10.0.0.12:5432/source", + "ignore_dbs": "postgres,template1", + "method": "Replication" + } + }, + { + "operation": "upgrade", + "target_version": "15" + }, + { + "operation": "upgrade_check", + "upgrade_check": { + "target_version": "18" + } + } + ], + "properties": { + "dataset_import": { + "type": "object", + "properties": { + "dataset_name": { + "type": "string", + "examples": [ + "example-dataset" + ], + "description": "The name of the dataset to be imported." + } + }, + "required": [ + "dataset_name" + ], + "additionalProperties": false + }, + "migration_check": { + "type": "object", + "properties": { + "ignore_dbs": { + "type": "string", + "examples": [ + "defaultdb" + ], + "description": "Databases to ignore during the migration check, separated by commas." + }, + "ignore_roles": { + "type": "string" + }, + "method": { + "type": "string", + "examples": [ + "Replication" + ], + "description": "The migration method to be used." + }, + "source_service_uri": { + "type": "string", + "examples": [ + "postgresql://user:password@hostname:port/dbname" + ], + "description": "The URI of the source service for migration." + } + }, + "required": [ + "source_service_uri" + ], + "additionalProperties": false + }, + "upgrade_check": { + "type": "object", + "properties": { + "target_version": { + "type": "string", + "examples": [ + "18" + ], + "minLength": 1, + "description": "The target major version for the upgrade check." + } + }, + "required": [ + "target_version" + ], + "additionalProperties": false + }, + "target_version": { + "type": "string", + "examples": [ + "14" + ], + "minLength": 1, + "description": "The target version for upgrade operations." + }, + "operation": { + "type": "string", + "examples": [ + "upgrade" + ], + "description": "The operation to be performed." + } + }, + "title": "ServiceTaskCreate", + "required": [ + "operation" + ], + "additionalProperties": false, + "description": "Schema for creating a service task with various operations such as dataset import and migration checks." + }, + "databaseServiceUserCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "username": "api-doc-user", + "authentication": "caching_sha2_password", + "password": "new-password" + } + ], + "properties": { + "username": { + "type": "string", + "examples": [ + "defaultdb" + ], + "description": "The username of the service user" + }, + "password": { + "type": "string", + "examples": [ + "strongpassword123" + ], + "description": "The password of the service user" + }, + "authentication": { + "type": "string", + "examples": [ + "caching_sha2_password" + ], + "description": "The authentication method for the service user" + }, + "redis_access_control": { + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of categories for Redis ACL" + }, + "channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of channels for Redis ACL" + }, + "commands": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of commands for Redis ACL" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of keys for Redis ACL" + } + }, + "minProperties": 1, + "additionalProperties": false, + "description": "Redis access control settings" + }, + "pg_access_control": { + "type": "object", + "properties": { + "allow_replication": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Flag to allow or disallow replication" + } + }, + "required": [ + "allow_replication" + ], + "additionalProperties": false, + "description": "PostgreSQL access control settings" + }, + "opensearch_access_control": { + "type": "object", + "properties": { + "rules": { + "type": "array", + "items": { + "properties": { + "index": { + "type": "string", + "examples": [ + "logs-*" + ], + "description": "The index pattern for the rule" + }, + "permission": { + "type": "string", + "examples": [ + "read", + "write", + "admin" + ], + "description": "The permission level for the index" + } + }, + "required": [ + "index", + "permission" + ], + "additionalProperties": false + }, + "description": "List of index permission rules" + } + }, + "required": [ + "rules" + ], + "additionalProperties": false, + "description": "OpenSearch access control settings" + }, + "valkey_access_control": { + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of categories for Valkey ACL" + }, + "channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of channels for Valkey ACL" + }, + "commands": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of commands for Valkey ACL" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of keys for Valkey ACL" + } + }, + "minProperties": 1, + "additionalProperties": false, + "description": "Valkey access control settings" + } + }, + "title": "ServiceUserCreate", + "required": [ + "username" + ], + "additionalProperties": false, + "description": "Schema for creating a service user with access control settings" + }, + "databaseServiceUserModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "password": "new_secure_password_123!", + "authentication": "caching_sha2_password" + } + ], + "properties": { + "password": { + "type": "string", + "examples": [ + "new_secure_password_123!" + ], + "description": "New password for the service user" + }, + "authentication": { + "type": "string", + "examples": [ + "caching_sha2_password", + "mysql_native_password" + ], + "description": "Authentication method for the service user" + } + }, + "title": "ServiceUserModify", + "minProperties": 1, + "additionalProperties": false, + "description": "Schema for modifying a service user" + }, + "databaseServiceUserAclModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "redis_access_control": { + "categories": [ + "@admin", + "@read" + ], + "channels": [ + "news", + "alerts" + ], + "commands": [ + "GET", + "SET" + ], + "keys": [ + "user:*", + "session:*" + ] + }, + "pg_access_control": { + "allow_replication": true + }, + "opensearch_access_control": { + "rules": [ + { + "index": "logs-*", + "permission": "read" + } + ] + }, + "valkey_access_control": { + "categories": [ + "@write" + ], + "channels": [ + "updates" + ], + "commands": [ + "DEL" + ], + "keys": [ + "cache:*" + ] + } + } + ], + "properties": { + "redis_access_control": { + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of categories for ACL" + }, + "channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of channels for ACL" + }, + "commands": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of commands for ACL" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of keys for ACL" + } + }, + "minProperties": 1, + "additionalProperties": false, + "description": "Redis ACL modification schema" + }, + "pg_access_control": { + "type": "object", + "properties": { + "allow_replication": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Flag to allow or disallow replication" + } + }, + "required": [ + "allow_replication" + ], + "additionalProperties": false, + "description": "PostgreSQL replication permission modification schema" + }, + "opensearch_access_control": { + "type": "object", + "properties": { + "rules": { + "type": "array", + "items": { + "properties": { + "index": { + "type": "string" + }, + "permission": { + "type": "string" + } + }, + "required": [ + "index", + "permission" + ], + "additionalProperties": false + }, + "description": "List of index permission rules" + } + }, + "required": [ + "rules" + ], + "additionalProperties": false, + "description": "OpenSearch index permission modification schema" + }, + "valkey_access_control": { + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of categories for ACL" + }, + "channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of channels for ACL" + }, + "commands": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of commands for ACL" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of keys for ACL" + } + }, + "minProperties": 1, + "additionalProperties": false, + "description": "Valkey ACL modification schema" + } + }, + "title": "ServiceUserAclModify", + "minProperties": 1, + "additionalProperties": false, + "description": "Schema for modifying user access control lists (ACL) for various services" + }, + "databaseAvailableServiceTypesResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "postgres": { + "name": "postgresql", + "description": "PostgreSQL - Object-Relational Database Management System", + "latest_available_version": "18.1", + "service_plans": [ + { + "node_count": 3, + "plan": "2x2xCPU-4GB-50G", + "core_number": 2, + "storage_size": 51200, + "memory_amount": 8192, + "max_memory_percent": 90, + "backup_retention": 7, + "zones": { + "zone": [ + { + "name": "zone1", + "description": "Primary zone" + }, + { + "name": "zone2", + "description": "Secondary zone" + } + ] + }, + "backup_config": { + "interval": 24, + "max_count": 7, + "recovery_mode": "point_in_time" + } + } + ], + "properties": { + "automatic_utility_network_ip_filter": false, + "ip_filter": [ + "0.0.0.0/0" + ], + "public_access": true, + "version": "13" + }, + "dependencies": {} + } + } + ], + "title": "AvailableServiceTypesResponse", + "additionalProperties": { + "$ref": "#/components/schemas/databaseServiceTypeResponse" + }, + "description": "Response map schema for available service types" + }, + "databaseServiceTypeResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "examples": [ + { + "name": "postgresql", + "description": "PostgreSQL - Object-Relational Database Management System", + "latest_available_version": "18.1", + "service_plans": [ + { + "backup_config": { + "interval": 24, + "max_count": 3, + "recovery_mode": "pitr" + }, + "backup_config_pg": { + "interval": 24, + "max_count": 3, + "recovery_mode": "pitr" + }, + "node_count": 1, + "zones": { + "zone": [ + { + "name": "au-syd1" + }, + { + "name": "de-fra1" + }, + { + "name": "es-mad1" + }, + { + "name": "fi-hel1" + }, + { + "name": "fi-hel2" + }, + { + "name": "nl-ams1" + }, + { + "name": "pl-waw1" + }, + { + "name": "se-sto1" + }, + { + "name": "sg-sin1" + }, + { + "name": "uk-lon1" + }, + { + "name": "us-chi1" + }, + { + "name": "us-nyc1" + }, + { + "name": "us-sjo1" + } + ] + }, + "plan": "1x1xCPU-1GB-10GB", + "core_number": 1, + "storage_size": 10240, + "memory_amount": 1024 + } + ], + "properties": { + "automatic_utility_network_ip_filter": false, + "ip_filter": [ + "0.0.0.0/0" + ], + "public_access": true, + "version": "13" + }, + "dependencies": {} + } + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the service type", + "example": "postgresql" + }, + "description": { + "type": "string", + "description": "The description of the service type", + "example": "PostgreSQL - Object-Relational Database Management System" + }, + "latest_available_version": { + "type": "string", + "description": "The latest available version of the service type", + "example": "18.1" + }, + "service_plans": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseServicePlanResponse" + } + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/databasePropertySchemaResponse" + } + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/databaseDependencyResponse" + } + } + }, + "title": "ServiceTypeResponse", + "description": "Response schema for available service types" + }, + "databaseServicePlanResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "node_count": 3, + "plan": "2x2xCPU-4GB-50G", + "core_number": 2, + "storage_size": 51200, + "memory_amount": 8192, + "zones": { + "zone": [ + { + "name": "zone1", + "description": "Primary zone" + }, + { + "name": "zone2", + "description": "Secondary zone" + } + ] + }, + "backup_config": { + "interval": 24, + "max_count": 7, + "recovery_mode": "point_in_time" + } + } + ], + "properties": { + "backup_config": { + "$ref": "#/components/schemas/databaseBackupConfigResponse" + }, + "backup_config_pg": { + "$ref": "#/components/schemas/databaseBackupConfigResponse" + }, + "backup_config_mysql": { + "$ref": "#/components/schemas/databaseBackupConfigResponse" + }, + "backup_config_redis": { + "$ref": "#/components/schemas/databaseBackupConfigResponse" + }, + "backup_config_valkey": { + "$ref": "#/components/schemas/databaseBackupConfigResponse" + }, + "backup_config_opensearch": { + "$ref": "#/components/schemas/databaseBackupConfigOpenSearchResponse" + }, + "node_count": { + "type": "integer", + "format": "int32", + "description": "Number of nodes in the service plan", + "example": 10 + }, + "zones": { + "type": "object", + "properties": { + "zone": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseZoneInfoResponse" + } + } + } + }, + "plan": { + "type": "string", + "description": "Name of the service plan", + "example": "2x2xCPU-4GB-50G" + }, + "core_number": { + "type": "integer", + "format": "int32", + "description": "Number of CPU cores per node", + "example": 2 + }, + "storage_size": { + "type": "integer", + "format": "int32", + "description": "Storage size in MiB per node", + "example": 25600 + }, + "memory_amount": { + "type": "integer", + "format": "int32", + "description": "Memory amount in MB per node", + "example": 4096 + }, + "components": { + "$ref": "#/components/schemas/databasePlanComponentsResponse" + } + }, + "title": "ServicePlanResponse", + "description": "Schema definition for a service plan" + }, + "databaseBackupConfigResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "interval": 24, + "max_count": 7, + "recovery_mode": "point_in_time" + } + ], + "properties": { + "interval": { + "type": "integer", + "examples": [ + 24 + ], + "format": "int32", + "description": "Backup interval" + }, + "max_count": { + "type": "integer", + "examples": [ + 7 + ], + "format": "int32", + "description": "Maximum number of backups to keep" + }, + "recovery_mode": { + "type": "string", + "examples": [ + "point_in_time" + ], + "description": "Recovery mode for backups" + } + }, + "title": "BackupConfigResponse", + "description": "General backup configuration schema" + }, + "databaseBackupConfigOpenSearchResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "examples": [ + { + "frequent_interval_minutes": 15, + "frequent_oldest_age_minutes": 60, + "infrequent_interval_minutes": 240, + "infrequent_oldest_age_minutes": 1440, + "recovery_mode": "point_in_time" + } + ], + "properties": { + "frequent_interval_minutes": { + "type": "integer", + "format": "int32", + "description": "Frequent backup interval in minutes", + "example": "15" + }, + "frequent_oldest_age_minutes": { + "type": "integer", + "format": "int32", + "description": "Oldest age for frequent backups in minutes", + "example": "60" + }, + "infrequent_interval_minutes": { + "type": "integer", + "format": "int32", + "description": "Infrequent backup interval in minutes", + "example": "240" + }, + "infrequent_oldest_age_minutes": { + "type": "integer", + "format": "int32", + "description": "Oldest age for infrequent backups in minutes", + "example": "1440" + }, + "recovery_mode": { + "type": "string", + "description": "Recovery mode for backups", + "example": "point_in_time" + } + }, + "title": "BackupConfigOpenSearchResponse", + "description": "OpenSearch specific backup configuration response" + }, + "databaseZoneInfoResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "fi-hel-1" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Zone identifier", + "example": "fi-hel-1" + } + }, + "title": "ZoneInfoResponse", + "description": "Schema for representing a Zone" + }, + "databasePlanComponentsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "compute": { + "family": "standard", + "node_count": 2, + "cpu": 4, + "memory_gb": 8 + }, + "storage": { + "included_gib": 100, + "dynamic_storage_supported": true + }, + "backups": { + "name": "regular", + "retention_days": 15 + } + } + ], + "properties": { + "compute": { + "type": "object", + "properties": { + "name": { + "type": "string", + "examples": [ + "rdb.standard.2CPU-8GB" + ], + "description": "Compute shape name usable as plan_compute in requests." + }, + "family": { + "type": "string", + "enum": [ + "development", + "standard", + "memory" + ], + "description": "Compute family for tiered plans. Omitted for classic plans.", + "example": "standard" + }, + "node_count": { + "type": "integer", + "format": "int32", + "description": "Number of nodes", + "example": 2 + }, + "cpu": { + "type": "integer", + "format": "int32", + "description": "CPU cores per node", + "example": 4 + }, + "memory_gb": { + "type": "integer", + "format": "int32", + "description": "Memory per node in GB", + "example": 8 + } + }, + "description": "Compute resources per service" + }, + "storage": { + "type": "object", + "properties": { + "included_gib": { + "type": "integer", + "format": "int32", + "description": "Storage included in the plan per node, in GB. Omitted for tiered (rdb.*) plans, which present storage as a single total_gib.", + "example": 100 + }, + "dynamic_storage_supported": { + "type": "boolean", + "description": "Whether the storage total can be adjusted on top of the plan's included storage.", + "example": true + }, + "additional_gib": { + "type": "integer", + "format": "int32", + "description": "Extra dynamic storage configured on the service, in GB. Only present on legacy (non-tiered) service responses; tiered plans present total_gib instead.", + "example": 40 + }, + "total_gib": { + "type": "integer", + "format": "int32", + "description": "Total storage, in GB. For tiered (rdb.*) plans this is the single storage number: the plan's base storage in the catalog, or the chosen total (included plus dynamic) on a service response. Omitted for legacy catalog plans.", + "example": 140 + } + }, + "description": "Storage included in the plan. Omitted for service types without persistent storage." + }, + "backups": { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "mini", + "regular", + "extended" + ], + "description": "Backup tier name for tiered plans. Omitted when the plan retention does not map to a named tier.", + "example": "standard" + }, + "retention_days": { + "type": "integer", + "format": "int32", + "description": "Backup retention in days", + "example": 15 + }, + "frequent": { + "type": "object", + "properties": { + "interval_minutes": { + "type": "integer", + "format": "int32", + "example": 60 + }, + "retention_days": { + "type": "integer", + "format": "int32", + "example": 1 + } + }, + "description": "Frequent backup window, OpenSearch only" + }, + "infrequent": { + "type": "object", + "properties": { + "interval_minutes": { + "type": "integer", + "format": "int32", + "example": 1440 + }, + "retention_days": { + "type": "integer", + "format": "int32", + "example": 14 + } + }, + "description": "Infrequent backup window, OpenSearch only" + } + }, + "description": "Backup characteristics of the plan" + } + }, + "title": "PlanComponentsResponse", + "description": "Structured breakdown of a service plan into compute, storage and backups components. Sizes are expressed in GB to match plan naming; the classic MB/MiB fields on the plan object are unchanged." + }, + "databasePropertySchemaResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "$schema": { + "type": "string", + "description": "JSON Schema URI", + "example": "https://json-schema.org/draft/2020-12/schema" + }, + "$id": { + "type": "string", + "description": "Schema identifier", + "example": "sample-id" + }, + "createOnly": { + "type": "boolean", + "description": "Whether the property can only be set during creation", + "example": false + }, + "default": { + "type": "object", + "description": "Any valid JSON value is allowed here", + "example": { + "foo": "bar" + } + }, + "example": { + "type": "object", + "description": "Any valid JSON value is allowed here", + "example": { + "foo": "bar" + } + }, + "maxLength": { + "type": "integer", + "format": "int32", + "description": "Maximum length for the property schema", + "example": 255 + }, + "minLength": { + "type": "integer", + "format": "int32", + "description": "Minimum length for the property schema", + "example": 255 + }, + "pattern": { + "type": "string", + "description": "Allowed patterns for the property", + "example": "^[a-zA-Z0-9_./:-]+(\\[[^\\]]+\\])?$" + }, + "title": { + "type": "string", + "description": "Human-readable title for the property", + "example": "Sample Property" + }, + "type": { + "type": "string", + "description": "Data type of the property", + "example": "any string" + }, + "user_error": { + "type": "string", + "description": "User-friendly error message", + "example": "Invalid input provided" + }, + "items": { + "$ref": "#/components/schemas/databasePropertySchemaResponse" + }, + "properties": { + "type": "object", + "examples": [ + { + "foobar": [ + { + "title": "property schema title" + } + ] + } + ], + "additionalProperties": { + "$ref": "#/components/schemas/databasePropertySchemaResponse" + }, + "description": "Properties for object type" + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/databaseDependencyResponse" + }, + "description": "Property dependency collection", + "example": { + "required": [ + "host", + "port" + ] + } + }, + "required": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of required properties", + "example": [ + "host", + "port" + ] + }, + "maxItems": { + "type": "integer", + "format": "int32", + "description": "Maximum number of items for arrays", + "example": 10 + }, + "description": { + "type": "string", + "description": "Description of the property", + "example": "This is a sample property used for demonstration purposes." + }, + "minimum": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Minimum values for numeric properties" + }, + "maximum": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Maximum values for numeric properties", + "example": [ + 1, + 0 + ] + }, + "enum": { + "type": "array", + "items": {}, + "description": "Enumeration of allowed values" + }, + "additionalProperties": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Whether additional properties are allowed" + } + }, + "title": "PropertySchemaResponse", + "description": "Schema definition for a single property" + }, + "databaseDependencyResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "examples": [ + { + "required": [ + "host", + "port" + ] + } + ], + "properties": { + "required": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of required properties when this dependency is present", + "example": [ + "host", + "port" + ] + } + }, + "title": "DependencyResponse", + "description": "a dependency definition" + }, + "databaseErrorResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "examples": [ + { + "error_message": "Authentication credentials wrong", + "error_code": "401" + } + ], + "properties": { + "error_message": { + "type": "string", + "description": "Error message describing the error." + }, + "error_code": { + "type": "string", + "description": "Error code associated with the error." + } + }, + "required": [ + "error_message", + "error_code" + ] + } + }, + "title": "ErrorResponse", + "additionalProperties": false, + "description": "Schema for error responses from the API." + }, + "databasePlansResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "service_types": [ + { + "type": "pg", + "latest_version": "18.6", + "componentised": true, + "zones": [ + "fi-hel1", + "de-fra1" + ], + "backup_tiers": [ + "regular", + "extended" + ], + "node_counts": [ + 1, + 2, + 3 + ], + "compute_shapes": [ + { + "compute": "rdb.standard.2CPU-8GB", + "family": "standard", + "cpu": 2, + "memory_gb": 8, + "dynamic_storage_supported": true, + "node_counts": [ + 1, + 2, + 3 + ], + "backups": [ + "regular" + ], + "storage": { + "step_gib": 10, + "dynamic_max_multiplier": 4, + "total_cap_gib": 10240, + "options": [ + { + "base_gib": 80, + "max_gib": 400 + } + ] + } + } + ] + } + ] + } + ], + "properties": { + "service_types": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "examples": [ + "pg", + "mysql" + ], + "enum": [ + "mysql", + "pg" + ], + "description": "Service type identifier." + }, + "latest_version": { + "type": "string", + "examples": [ + "18.6", + "8.4.8" + ], + "description": "Latest available major version for this service type. Omitted when not applicable." + }, + "componentised": { + "type": "boolean", + "examples": [ + true + ], + "description": "Always true for entries in this response; kept as an explicit indicator of componentised plans." + }, + "zones": { + "type": "array", + "items": { + "type": "string", + "examples": [ + "fi-hel1", + "de-fra1" + ] + }, + "description": "Zones where this service type is available." + }, + "backup_tiers": { + "type": "array", + "items": { + "type": "string", + "examples": [ + "regular" + ], + "enum": [ + "mini", + "regular", + "extended" + ] + }, + "description": "Backup tiers offered across this service type's plans. Omitted when the service type exposes no named backup tiers." + }, + "node_counts": { + "type": "array", + "items": { + "type": "integer", + "examples": [ + 1, + 2, + 3 + ], + "format": "int32" + }, + "description": "Distinct node counts offered across this service type's plans." + }, + "compute_shapes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "compute": { + "type": "string", + "examples": [ + "rdb.standard.2CPU-8GB" + ], + "description": "Compute shape name, usable as plan_compute in requests." + }, + "family": { + "type": "string", + "examples": [ + "standard" + ], + "enum": [ + "development", + "standard", + "memory" + ], + "description": "Compute family." + }, + "cpu": { + "type": "integer", + "examples": [ + 2 + ], + "format": "int32", + "description": "CPU cores per node." + }, + "memory_gb": { + "type": "integer", + "examples": [ + 8 + ], + "format": "int32", + "description": "Memory per node in GB." + }, + "dynamic_storage_supported": { + "type": "boolean", + "examples": [ + true + ], + "description": "Whether the storage total can be scaled beyond the base storage via dynamic storage." + }, + "node_counts": { + "type": "array", + "items": { + "type": "integer", + "examples": [ + 1, + 2, + 3 + ], + "format": "int32" + }, + "description": "Node counts available for this compute shape." + }, + "backups": { + "type": "array", + "items": { + "type": "string", + "examples": [ + "regular" + ], + "enum": [ + "mini", + "regular", + "extended" + ] + }, + "description": "Backup tiers available for this compute shape. Omitted when the shape exposes no named backup tiers." + }, + "storage": { + "type": [ + "object", + "null" + ], + "properties": { + "step_gib": { + "type": "integer", + "examples": [ + 10 + ], + "format": "int32", + "description": "Granularity, in GiB, at which dynamic storage can be adjusted." + }, + "dynamic_max_multiplier": { + "type": "integer", + "examples": [ + 4 + ], + "format": "int32", + "description": "Maximum multiplier applied to a base size when scaling storage dynamically." + }, + "total_cap_gib": { + "type": [ + "integer", + "null" + ], + "examples": [ + 10240 + ], + "format": "int32", + "description": "Hard ceiling on base plus dynamic storage, in GiB, or null when the engine enforces no fixed total cap." + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "base_gib": { + "type": "integer", + "examples": [ + 80 + ], + "format": "int32", + "description": "Base storage size, in GiB." + }, + "max_gib": { + "type": "integer", + "examples": [ + 400 + ], + "format": "int32", + "description": "Largest total storage reachable from this base via dynamic storage (base plus multiplier times base), capped at total_cap_gib where it applies." + } + }, + "required": [ + "base_gib", + "max_gib" + ], + "additionalProperties": false + }, + "description": "Base-storage options offered for this compute shape." + } + }, + "required": [ + "step_gib", + "dynamic_max_multiplier", + "total_cap_gib", + "options" + ], + "additionalProperties": false, + "description": "Storage choices for this compute shape: the distinct base sizes with the total each scales to, plus the shared dynamic-storage rules. Null for shapes without customer storage." + } + }, + "required": [ + "compute", + "family", + "cpu", + "memory_gb", + "dynamic_storage_supported", + "node_counts" + ], + "additionalProperties": false + }, + "description": "Distinct compute shapes offered for this service type." + } + }, + "required": [ + "type", + "componentised", + "zones", + "node_counts", + "compute_shapes" + ], + "additionalProperties": false + }, + "description": "Available service types that offer componentised plans." + } + }, + "title": "PlansResponse", + "required": [ + "service_types" + ], + "additionalProperties": false, + "description": "Lists available componentised database plans." + }, + "databaseServiceInformationListResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "uuid": "123e4567-e89b-12d3-a456-426614174000", + "zone": "fi-hel1", + "name": "my-db", + "type": "pg" + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseServiceInformationResponse" + }, + "title": "ServiceInformationListResponse", + "description": "Schema for a list of service information" + }, + "databaseServiceInformationResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "uuid": { + "type": "string", + "examples": [ + "123e4567-e89b-12d3-a456-426614174000" + ], + "format": "uuid", + "description": "The unique identifier for the service." + }, + "zone": { + "type": "string", + "examples": [ + "fi-hel1" + ], + "description": "The zone where the service is hosted." + }, + "name": { + "type": "string", + "examples": [ + "my-db" + ], + "description": "The name of the service." + }, + "title": { + "type": "string", + "examples": [ + "My Database Service" + ], + "description": "The title of the service." + }, + "type": { + "type": "string", + "examples": [ + "pg" + ], + "description": "The type of the service." + }, + "plan": { + "type": "string", + "examples": [ + "1x1xCPU-2GB-25GB" + ], + "description": "The plan of the service. For componentised (rdb.*) plans this is the effective plan name: the storage segment shows the total storage per node the service is configured with, and the same name is accepted back on create, modify and clone." + }, + "plan_components": { + "$ref": "#/components/schemas/databasePlanComponentsResponse" + }, + "additional_disk_space_gib": { + "type": "integer", + "examples": [ + 10 + ], + "format": "int32", + "description": "The additional disk space allocated to the service in GiB. Always 0 for componentised (rdb.*) plans, where storage is expressed only as the total in the plan name and in plan_components." + }, + "state": { + "type": "string", + "examples": [ + "running" + ], + "description": "The current state of the service." + }, + "state_error": { + "type": "object", + "examples": [ + { + "init": "failed" + } + ], + "additionalProperties": { + "type": "string" + }, + "description": "A map of errors related to the service state." + }, + "powered": { + "type": "boolean", + "examples": [ + true + ], + "description": "Indicates whether the service is powered on." + }, + "termination_protection": { + "type": "boolean", + "examples": [ + false + ], + "description": "Indicates whether termination protection is enabled for the service." + }, + "node_count": { + "type": "integer", + "examples": [ + 1 + ], + "format": "int32", + "description": "The number of nodes in the service." + }, + "create_time": { + "type": "string", + "examples": [ + "2023-10-01T12:00:00Z" + ], + "format": "date-time", + "description": "The time when the service was created." + }, + "update_time": { + "type": "string", + "examples": [ + "2023-10-10T12:00:00Z" + ], + "format": "date-time", + "description": "The time when the service was last updated." + }, + "service_uri": { + "type": "string", + "examples": [ + "postgres://upadmin:example-prefix-project@pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com:11550/defaultdb?sslmode=require" + ], + "format": "uri", + "description": "The URI for accessing the service." + }, + "service_uri_params": { + "type": "object", + "examples": [ + { + "dbname": "defaultdb", + "host": "pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com", + "password": "example-prefix-project", + "port": "11550", + "ssl_mode": "require", + "user": "upadmin" + } + ], + "additionalProperties": {}, + "description": "A map of connection parameters for the service." + }, + "maintenance": { + "$ref": "#/components/schemas/databaseMaintenanceWindowResponse" + }, + "metadata": { + "type": "object", + "examples": [ + { + "owner": "team-databases" + } + ], + "additionalProperties": {}, + "description": "A map of metadata key-value pairs for the service." + }, + "properties": { + "type": "object", + "examples": [ + { + "public_access": false + } + ], + "additionalProperties": {}, + "description": "A map of additional properties for the service." + }, + "networks": { + "type": "array", + "examples": [ + [ + { + "uuid": "123e4567-e89b-12d3-a456-426614174000", + "name": "example-private-network", + "family": "IPv4", + "type": "private", + "create_time": "2025-08-01T10:40:04.140473Z", + "update_time": "2025-08-01T10:40:04.140473Z" + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseNetworkInformationDetailsResponse" + }, + "description": "List of network information details associated with the service." + }, + "node_states": { + "type": "array", + "examples": [ + [ + { + "name": "node-1", + "role": "master", + "state": "running", + "progress_updates": [ + { + "completed": false, + "current": 45, + "max": 100, + "min": 0, + "phase": "prepare", + "unit": "bytes_uncompressed" + } + ] + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseNodeStateResponse" + }, + "description": "The states of individual nodes in the service." + }, + "labels": { + "type": "array", + "examples": [ + [ + { + "key": "environment", + "value": "production" + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseLabelInformationResponse" + }, + "description": "List of label information associated with the service." + }, + "backups": { + "type": "array", + "examples": [ + [ + { + "backup_name": "pg-backup-2024-01-01", + "backup_time": "2024-01-01T12:00:00Z", + "data_size": 36413440 + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseBackupResponse" + }, + "description": "List of backups associated with the service." + }, + "components": { + "type": "array", + "examples": [ + [ + { + "component": "pg", + "host": "pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com", + "port": 1150, + "route": "dynamic", + "usage": "replica", + "ssl": true + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseServiceComponentResponse" + }, + "description": "List of service components associated with the service." + }, + "connection_pools": { + "type": "array", + "examples": [ + [ + { + "connection_uri": "postgresql://user:password@hostname:5432/dbname", + "database": "pg-db-1", + "pool_mode": "session", + "pool_name": "pool-2", + "pool_size": 10, + "username": "updamin" + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseConnectionPoolResponse" + }, + "description": "List of connection pools associated with the service." + }, + "users": { + "type": "array", + "examples": [ + [ + { + "username": "admin", + "password": "my-password", + "authentication": "caching_sha2_password", + "type": "admin" + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseUserResponse" + }, + "description": "List of users associated with the service." + }, + "databases": { + "$ref": "#/components/schemas/LogicalDatabasesResponse" + }, + "acls": { + "type": "array", + "examples": [ + [ + { + "id": "123e4567-e89b-12d3-a456-426614174000", + "permission": "read-write", + "topic": "sensors/temperature", + "username": "user123" + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseAclResponse" + }, + "description": "List of ACLs associated with the service." + }, + "service_integrations": { + "type": "array", + "examples": [ + [ + { + "uuid": "123e4567-e89b-12d3-a456-426614174000", + "type": "rsyslog", + "source_name": "my-database", + "source_uuid": "123e4567-e89b-12d3-a456-426614174000", + "destination_name": "my-rsyslog-server", + "destination_uuid": "123e4567-e89b-12d3-a456-426614174000", + "state": "active", + "state_error": [], + "node_states": [ + { + "name": "node-1", + "status": "running", + "errors": [ + "some error" + ], + "likely_error_cause": null + } + ], + "properties": { + "key1": "value1", + "key2": 2, + "key3": true + } + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseServiceIntegrationResponse" + }, + "description": "List of service integrations associated with the service." + } + }, + "title": "ServiceInformationResponse", + "description": "Schema for service information response." + }, + "databaseMaintenanceWindowResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "dow": "Monday", + "time": "02:00:00", + "pending_updates": [ + { + "deadline": "2022-01-21T12:21:00Z", + "description": "description related to the update", + "start_after": "2022-01-21T12:21:00Z", + "start_at": "2022-10-21T12:21:00Z" + } + ] + } + ], + "properties": { + "dow": { + "type": "string", + "examples": [ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "description": "Day of the week when maintenance occurs (e.g., Monday, Tuesday)." + }, + "time": { + "type": "string", + "examples": [ + "02:00:00", + "14:30:00", + "23:59:00" + ], + "description": "Time of day when maintenance should start (e.g., HH:MM:SS format)." + }, + "pending_updates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseMaintenancePendingUpdatesResponse" + }, + "description": "List of updates pending during this maintenance window." + } + }, + "title": "MaintenanceWindowResponse", + "description": "Schema for a maintenance window response." + }, + "databaseMaintenancePendingUpdatesResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "examples": [ + { + "deadline": "2022-01-21T12:21:00Z", + "description": "description related to the update", + "start_after": "2022-01-21T12:21:00Z", + "start_at": "2022-10-21T12:21:00Z" + } + ], + "properties": { + "deadline": { + "type": "string", + "format": "date-time", + "description": "The deadline by which the update must be applied", + "example": "2022-01-21T12:21:00Z" + }, + "description": { + "type": "string", + "description": "A description of the pending update", + "example": "description related to the update" + }, + "start_after": { + "type": "string", + "format": "date-time", + "description": "The earliest time after which the update can start", + "example": "2022-01-21T12:21:00Z" + }, + "start_at": { + "type": "string", + "format": "date-time", + "description": "The exact scheduled start time for the update", + "example": "2022-10-21T12:21:00Z" + } + }, + "title": "MaintenancePendingUpdatesResponse", + "description": "Response schema for pending maintenance updates." + }, + "databaseNetworkInformationDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "uuid": "123e4567-e89b-12d3-a456-426614174000", + "name": "example-private-network", + "family": "IPv4", + "type": "private", + "create_time": "2025-08-01T10:40:04.140473Z", + "update_time": "2025-08-01T10:40:04.140473Z" + } + ], + "properties": { + "uuid": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the network", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "name": { + "type": "string", + "description": "Name of the network", + "example": "example-private-network" + }, + "family": { + "type": "string", + "examples": [ + "IPv4", + "IPv6" + ], + "enum": [ + "IPv4", + "IPv6" + ], + "description": "Address family (e.g., IPv4, IPv6)" + }, + "type": { + "type": "string", + "examples": [ + "private", + "public" + ], + "enum": [ + "private", + "public" + ], + "description": "Type of network (e.g., private, public)" + }, + "create_time": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the network was created", + "example": "2025-08-01T10:40:04.140473Z" + }, + "update_time": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the network was last updated", + "example": "2025-08-01T10:40:04.140473Z" + } + }, + "title": "NetworkInformationDetailsResponse", + "description": "Schema for network information response details" + }, + "databaseNodeStateResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "examples": [ + { + "name": "node-1", + "role": "master", + "state": "running", + "progress_updates": [ + { + "completed": false, + "current": 45, + "max": 100, + "min": 0, + "phase": "prepare", + "unit": "bytes_uncompressed" + } + ] + } + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the node.", + "example": "node-1" + }, + "role": { + "type": "string", + "description": "Role of the node in the service.", + "example": "master" + }, + "state": { + "type": "string", + "description": "Current state of the node.", + "example": "running" + }, + "progress_updates": { + "$ref": "#/components/schemas/databaseNodeProgressUpdatesResponse" + } + }, + "title": "NodeStateResponse", + "description": "Schema for the state of a node in a service." + }, + "databaseNodeProgressUpdatesResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseNodeProgressUpdateResponse" + }, + "title": "NodeProgressUpdatesResponse", + "description": "Response schema for node progress updates" + }, + "databaseNodeProgressUpdateResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "completed": false, + "current": 45, + "max": 100, + "min": 0, + "phase": "prepare", + "unit": "bytes_uncompressed" + } + ], + "properties": { + "completed": { + "type": "boolean", + "description": "Indicates whether the progress is fully completed.", + "example": false + }, + "current": { + "type": "integer", + "format": "int32", + "description": "The current progress value.", + "example": 45 + }, + "max": { + "type": "integer", + "format": "int32", + "description": "The maximum value for the progress range.", + "example": 100 + }, + "min": { + "type": "integer", + "format": "int32", + "description": "The minimum value for the progress range.", + "example": 0 + }, + "phase": { + "type": "string", + "description": "The current node progress.", + "example": "prepare" + }, + "unit": { + "type": "string", + "description": "The unit of measurement for the progress values (e.g., percent, MB).", + "example": "bytes_uncompressed" + } + }, + "title": "NodeProgressUpdateResponse", + "description": "Schema for node progress update response." + }, + "databaseLabelInformationResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "examples": [ + { + "key": "environment", + "value": "production" + } + ], + "properties": { + "key": { + "type": "string", + "description": "The key of the label.", + "example": "environment" + }, + "value": { + "type": "string", + "description": "The value of the label.", + "example": "production" + } + }, + "title": "LabelInformationResponse", + "description": "Schema representing a label with a key and value." + }, + "databaseBackupResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "examples": [ + { + "backup_name": "pg-backup-2024-01-01", + "backup_time": "2024-01-01T12:00:00Z", + "data_size": 36413440 + } + ], + "properties": { + "backup_name": { + "type": "string", + "description": "The name of the backup.", + "example": "pg-backup-2024-01-01" + }, + "backup_time": { + "type": "string", + "format": "date-time", + "description": "The time the backup was created.", + "example": "2024-01-01T12:00:00Z" + }, + "data_size": { + "type": "integer", + "format": "int64", + "description": "The size of the backup data in bytes." + } + }, + "title": "BackupResponse", + "description": "Schema for a backup response." + }, + "databaseServiceComponentResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "component": "pg", + "host": "pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com", + "port": 1150, + "route": "dynamic", + "usage": "replica", + "ssl": true + } + ], + "properties": { + "component": { + "type": "string", + "description": "The name of the service component.", + "example": "pg" + }, + "host": { + "type": "string", + "format": "hostname", + "description": "The hostname or IP address of the service component.", + "example": "pg-2x2xcpu-4gb-50gb-de-fra1-example-prefix-project.db.upclouddatabases.com" + }, + "port": { + "type": "integer", + "maximum": 65535, + "minimum": 0, + "format": "int32", + "description": "The port number of the service component.", + "example": 1150 + }, + "route": { + "type": "string", + "description": "The route to access the service component.", + "example": "dynamic" + }, + "usage": { + "type": "string", + "description": "The usage of the service component.", + "example": "replica" + }, + "ssl": { + "type": "boolean", + "description": "Indicates if SSL is enabled for the service component.", + "example": true + } + }, + "title": "ServiceComponentResponse", + "description": "Schema for a service component response." + }, + "databaseConnectionPoolResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "connection_uri": { + "type": "string", + "format": "uri", + "description": "The connection URI of the connection pool.", + "example": "postgresql://user:password@hostname:5432/dbname" + }, + "database": { + "type": "string", + "description": "The database name associated with the connection pool.", + "example": "defaultdb" + }, + "pool_mode": { + "type": "string", + "description": "The mode of the connection pool.", + "example": "session" + }, + "pool_name": { + "type": "string", + "examples": [ + "pool-2" + ], + "description": "The name of the connection pool." + }, + "pool_size": { + "type": "integer", + "format": "int32", + "description": "The size of the connection pool.", + "example": 10 + }, + "username": { + "type": "string", + "description": "The username for the connection pool", + "example": "updamin" + } + }, + "title": "ConnectionPoolResponse", + "description": "Schema for a connection pool response." + }, + "databaseUserResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "username": "admin", + "password": "my-password", + "authentication": "caching_sha2_password", + "type": "admin" + } + ], + "properties": { + "username": { + "type": "string", + "description": "The username of the user.", + "example": "admin" + }, + "password": { + "type": "string", + "description": "The password of the user.", + "example": "my-password" + }, + "authentication": { + "type": "string", + "description": "The authentication method used by the user.", + "example": "caching_sha2_password" + }, + "type": { + "type": "string", + "description": "The type of the user.", + "example": "admin" + }, + "pg_access_control": { + "$ref": "#/components/schemas/databasePgAccessControlResponse" + }, + "redis_access_control": { + "$ref": "#/components/schemas/databaseRedisAccessControlResponse" + }, + "valkey_access_control": { + "$ref": "#/components/schemas/databaseValkeyAccessControlResponse" + }, + "opensearch_access_control": { + "$ref": "#/components/schemas/databaseOpenSearchAccessControlResponse" + } + }, + "title": "UserResponse", + "description": "Schema for a user response." + }, + "databasePgAccessControlResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "allow_replication": true + } + ], + "properties": { + "allow_replication": { + "type": "boolean", + "description": "If true, allows replication connections.", + "example": false + } + }, + "title": "PgAccessControlResponse", + "description": "Schema for PostgreSQL access control response." + }, + "databaseRedisAccessControlResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "categories": [ + "@all", + "@fast" + ], + "channels": [ + "news", + "updates" + ], + "commands": [ + "GET", + "SET", + "DEL" + ], + "keys": [ + "user:*", + "session:*" + ] + } + ], + "properties": { + "categories": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of command categories the user has access to.", + "example": [ + "@all", + "@fast" + ] + }, + "channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of Pub/Sub channels the user has access to.", + "example": [ + "news", + "updates" + ] + }, + "commands": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of specific commands the user has access to.", + "example": [ + "GET", + "SET", + "DEL" + ] + }, + "keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of key patterns the user has access to.", + "example": [ + "user:*", + "session:*" + ] + } + }, + "title": "RedisAccessControlResponse", + "description": "Schema for Redis access control response." + }, + "databaseValkeyAccessControlResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "categories": [ + "@all", + "@fast" + ], + "channels": [ + "news", + "updates" + ], + "commands": [ + "GET", + "SET", + "DEL" + ], + "keys": [ + "user:*", + "session:*" + ] + } + ], + "properties": { + "categories": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of command categories the user has access to.", + "example": [ + "@all", + "@fast" + ] + }, + "channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of Pub/Sub channels the user has access to.", + "example": [ + "news", + "updates" + ] + }, + "commands": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of specific commands the user has access to.", + "example": [ + "GET", + "SET", + "DEL" + ] + }, + "keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of key patterns the user has access to.", + "example": [ + "user:*", + "session:*" + ] + } + }, + "title": "ValkeyAccessControlResponse", + "description": "Schema for Valkey user access control response" + }, + "databaseOpenSearchAccessControlResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "rules": [ + { + "index": "log-*", + "permission": "read" + } + ] + } + ], + "properties": { + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseOpenSearchAccessControlRuleResponse" + } + } + }, + "title": "OpenSearchAccessControlResponse", + "description": "Schema for OpenSearch access control response." + }, + "databaseOpenSearchAccessControlRuleResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "index": "log-*", + "permission": "read" + } + ], + "properties": { + "index": { + "type": "string", + "description": "Index name or pattern (e.g., 'log-*' for all indices starting with 'log-')", + "example": "log-*" + }, + "permission": { + "type": "string", + "description": "Permission level for the specified index", + "example": "read" + } + }, + "title": "OpenSearchAccessControlRuleResponse", + "description": "Schema for OpenSearch access control rule response." + }, + "databaseAclResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "id": "123e4567-e89b-12d3-a456-426614174000", + "permission": "read-write", + "topic": "sensors/temperature", + "username": "user123" + } + ], + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the ACL entry.", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "permission": { + "type": "string", + "description": "The permission level for the ACL entry.", + "example": "read-write" + }, + "topic": { + "type": "string", + "description": "The topic associated with the ACL entry.", + "example": "sensors/temperature" + }, + "username": { + "type": "string", + "description": "The username associated with the ACL entry.", + "example": "user123" + } + }, + "title": "AclResponse", + "description": "Response schema for an Access Control List (ACL) entry." + }, + "databaseServiceIntegrationResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "uuid": "123e4567-e89b-12d3-a456-426614174000", + "type": "rsyslog", + "source_name": "my-database", + "source_uuid": "123e4567-e89b-12d3-a456-426614174000", + "destination_name": "my-rsyslog-server", + "destination_uuid": "123e4567-e89b-12d3-a456-426614174000", + "state": "active", + "state_error": [], + "node_states": [ + { + "name": "node-1", + "status": "running", + "errors": [ + "some error" + ], + "likely_error_cause": null + } + ], + "properties": { + "key1": "value1", + "key2": 2, + "key3": true + } + } + ], + "properties": { + "uuid": { + "type": "string", + "format": "uuid", + "description": "The UUID of the service integration.", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "type": { + "type": "string", + "description": "The type of service integration.", + "example": "rsyslog" + }, + "source_name": { + "type": "string", + "description": "The name of the source service.", + "example": "my-database" + }, + "source_uuid": { + "type": "string", + "format": "uuid", + "description": "The UUID of the source service.", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "destination_name": { + "type": "string", + "description": "The name of the destination service.", + "example": "my-rsyslog-server" + }, + "destination_uuid": { + "type": "string", + "format": "uuid", + "description": "The UUID of the destination service.", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "state": { + "type": "string", + "description": "The current state of the service integration.", + "example": "active" + }, + "state_error": { + "type": "array", + "items": {}, + "description": "A list of errors related to the service integration state." + }, + "node_states": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseIntegrationNodeStateResponse" + }, + "description": "The states of individual nodes in the service integration." + }, + "properties": { + "type": "object", + "additionalProperties": {}, + "description": "A map of additional properties for the service integration." + } + }, + "title": "ServiceIntegrationResponse", + "description": "Schema for a service integration response." + }, + "databaseIntegrationNodeStateResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "node-1", + "status": "running", + "errors": [ + "some error" + ], + "likely_error_cause": null + } + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the integration node", + "example": "node-1" + }, + "status": { + "type": "string", + "description": "The current status of the node", + "example": "running" + }, + "errors": { + "type": "array", + "items": {}, + "description": "A list of errors encountered by the node" + }, + "likely_error_cause": { + "type": [ + "string", + "null" + ], + "examples": [ + "some error" + ], + "description": "The likely cause of the error" + } + }, + "title": "IntegrationNodeStateResponse", + "description": "Schema for representing the state of an integration node" + }, + "databaseNetworksInformationResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseNetworkInformationDetailsResponse" + }, + "title": "NetworksInformationResponse", + "description": "Schema for networks information response" + }, + "databaseLabelsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "key": "environment", + "value": "production" + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseLabelResponse" + }, + "title": "LabelsResponse", + "description": "Schema for a list of labels." + }, + "databaseLabelResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "environment", + "value": "production" + } + ], + "properties": { + "key": { + "type": "string", + "description": "The key of the label to delete.", + "example": "environment" + }, + "value": { + "type": "string", + "description": "The value of the label to delete.", + "example": "production" + } + }, + "title": "LabelResponse", + "description": "Schema for deleting a label with a key and value." + }, + "databaseAvailableExtensionsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "default_version": "1.12", + "name": "pg_stat_statements", + "versions": [ + "1.10", + "1.11", + "1.12" + ] + }, + { + "default_version": "3.4.0", + "name": "postgis", + "versions": [ + "3.3.0", + "3.4.0" + ] + }, + { + "default_version": "0.8.1", + "name": "vector", + "versions": [ + "0.8.1" + ] + }, + { + "default_version": "1.1", + "name": "uuid-ossp", + "versions": [ + "1.1" + ] + } + ] + ], + "items": { + "type": "object", + "properties": { + "default_version": { + "type": "string", + "description": "The default version of the extension", + "example": "1.12" + }, + "name": { + "type": "string", + "description": "The name of the PostgreSQL extension", + "example": "pg_stat_statements" + }, + "versions": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "List of available versions for this extension", + "example": [ + "1.10", + "1.11", + "1.12" + ] + } + }, + "required": [ + "default_version", + "name", + "versions" + ], + "additionalProperties": false + }, + "title": "AvailableExtensionsResponse", + "description": "Response schema for listing available PostgreSQL extensions" + }, + "databasePGAvailableExtensionsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "version": "16", + "extensions": [ + { + "default_version": "1.12", + "name": "pg_stat_statements", + "versions": [ + "1.10", + "1.11", + "1.12" + ] + }, + { + "default_version": "3.4.0", + "name": "postgis", + "versions": [ + "3.3.0", + "3.4.0" + ] + } + ] + }, + { + "version": "15", + "extensions": [ + { + "default_version": "1.10", + "name": "pg_stat_statements", + "versions": [ + "1.9", + "1.10" + ] + }, + { + "default_version": "3.3.0", + "name": "postgis", + "versions": [ + "3.2.0", + "3.3.0" + ] + } + ] + } + ] + ], + "items": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "The PostgreSQL major version", + "example": "16" + }, + "extensions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "default_version": { + "type": "string", + "description": "The default version of the extension", + "example": "1.12" + }, + "name": { + "type": "string", + "description": "The name of the PostgreSQL extension", + "example": "pg_stat_statements" + }, + "versions": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "List of available versions for this extension", + "example": [ + "1.10", + "1.11", + "1.12" + ] + } + }, + "required": [ + "default_version", + "name", + "versions" + ], + "additionalProperties": false + }, + "description": "List of available extensions for this PostgreSQL version" + } + }, + "required": [ + "version", + "extensions" + ], + "additionalProperties": false + }, + "title": "PGAvailableExtensionsResponse", + "description": "Response schema for listing available PostgreSQL extensions grouped by version" + }, + "databaseVersionsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "major_version": "8", + "service_type": "mysql", + "state": "available", + "end_of_life_time": null, + "availability_end_time": null, + "availability_start_time": "2019-05-10T00:00:00Z", + "termination_time": null, + "upgrade_to_service_type": null, + "upgrade_to_version": null, + "upstream_end_of_life_time": null + }, + { + "major_version": "16", + "service_type": "pg", + "state": "available", + "end_of_life_time": "2028-11-09T00:00:00Z", + "availability_end_time": "2028-05-09T00:00:00Z", + "availability_start_time": "2024-01-08T00:00:00Z", + "termination_time": null, + "upgrade_to_service_type": null, + "upgrade_to_version": null, + "upstream_end_of_life_time": "2028-11-09T00:00:00Z" + }, + { + "major_version": "2", + "service_type": "opensearch", + "state": "available", + "end_of_life_time": null, + "availability_end_time": null, + "availability_start_time": "2022-07-12T00:00:00Z", + "termination_time": null, + "upgrade_to_service_type": null, + "upgrade_to_version": null, + "upstream_end_of_life_time": null + } + ] + ], + "items": { + "type": "object", + "properties": { + "major_version": { + "type": "string", + "description": "The major version of the service", + "example": "16" + }, + "service_type": { + "type": "string", + "enum": [ + "mysql", + "pg", + "opensearch", + "valkey" + ], + "description": "The type of service (e.g., mysql, pg, opensearch, valkey)", + "example": "pg" + }, + "state": { + "type": "string", + "enum": [ + "available", + "preview" + ], + "description": "The availability state of the version", + "example": "available" + }, + "end_of_life_time": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The date when this version reaches end of life", + "example": "2028-11-09T00:00:00Z" + }, + "availability_end_time": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The date when this version will no longer be available for new services", + "example": "2028-05-09T00:00:00Z" + }, + "availability_start_time": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The date when this version became available", + "example": "2024-01-08T00:00:00Z" + }, + "termination_time": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The date when services running this version will be terminated", + "example": "2028-11-09T00:00:00Z" + }, + "upgrade_to_service_type": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The service type to upgrade to when this version reaches end of life", + "example": "2028-11-09T00:00:00Z" + }, + "upgrade_to_version": { + "type": [ + "string", + "null" + ], + "description": "The version to upgrade to when this version reaches end of life", + "example": "2" + }, + "upstream_end_of_life_time": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "The upstream end of life date for this version", + "example": "2028-11-09T00:00:00Z" + } + }, + "required": [ + "major_version", + "service_type", + "state" + ], + "additionalProperties": false + }, + "title": "VersionsResponse", + "description": "Response schema for listing available service versions across all service types" + }, + "databaseAccessControlSettingsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "access_control": false, + "extended_access_control": true + } + ], + "properties": { + "access_control": { + "type": "boolean", + "description": "If true, access control is enabled for the cluster.", + "example": false + }, + "extended_access_control": { + "type": "boolean", + "description": "If true, extended access control features are enabled.", + "example": true + } + }, + "title": "AccessControlSettingsResponse", + "description": "Response schema for access control settings of a cluster." + }, + "databaseOpenSearchSecurityPluginStatusResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "security_plugin_admin_enabled": true, + "security_plugin_available": true, + "security_plugin_enabled": true + } + ], + "properties": { + "security_plugin_admin_enabled": { + "type": "boolean", + "description": "Indicates if the security plugin admin is enabled", + "example": true + }, + "security_plugin_available": { + "type": "boolean", + "description": "Indicates if the security plugin is available", + "example": true + }, + "security_plugin_enabled": { + "type": "boolean", + "description": "Indicates if the security plugin is enabled", + "example": true + } + }, + "title": "OpenSearchSecurityPluginStatusResponse", + "description": "OpenSearch security plugin status response" + }, + "databaseMetricsItemResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "cpu_usage": { + "data": { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number" + }, + { + "label": "test-2 (standby)", + "type": "number" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 2.744682398273781, + 3.054323473090861 + ], + [ + "2022-01-21T13:11:00Z", + 3.0735645433218366, + 2.972423595745795 + ], + [ + "2022-01-21T13:11:30Z", + 2.61619694060839, + 3.1358378052207883 + ], + [ + "2022-01-21T13:12:00Z", + 3.275132296130991, + 4.196249043309251 + ] + ] + }, + "hints": { + "title": "CPU usage %" + } + }, + "disk_usage": { + "data": { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number" + }, + { + "label": "test-2 (standby)", + "type": "number" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 5.654416415900109, + 5.58959125727556 + ], + [ + "2022-01-21T13:11:00Z", + 5.654416415900109, + 5.58959125727556 + ], + [ + "2022-01-21T13:11:30Z", + 5.654416415900109, + 5.58959125727556 + ] + ] + }, + "hints": { + "title": "Disk space usage %" + } + }, + "diskio_reads": { + "data": { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number" + }, + { + "label": "test-2 (standby)", + "type": "number" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 0, + 0 + ], + [ + "2022-01-21T13:11:00Z", + 0, + 0 + ], + [ + "2022-01-21T13:11:30Z", + 0, + 0 + ] + ] + }, + "hints": { + "title": "Disk iops (reads)" + } + }, + "diskio_writes": { + "data": { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number" + }, + { + "label": "test-2 (standby)", + "type": "number" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 3, + 2 + ], + [ + "2022-01-21T13:11:00Z", + 2, + 3 + ], + [ + "2022-01-21T13:11:30Z", + 4, + 3 + ] + ] + }, + "hints": { + "title": "Disk iops (writes)" + } + }, + "load_average": { + "data": { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number" + }, + { + "label": "test-2 (standby)", + "type": "number" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 0.11, + 0.11 + ], + [ + "2022-01-21T13:11:00Z", + 0.14, + 0.1 + ], + [ + "2022-01-21T13:11:30Z", + 0.14, + 0.09 + ] + ] + }, + "hints": { + "title": "Load average (5 min)" + } + }, + "mem_usage": { + "data": { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number" + }, + { + "label": "test-2 (standby)", + "type": "number" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 11.491766148261078, + 12.318932883261219 + ], + [ + "2022-01-21T13:11:00Z", + 11.511967645759277, + 12.304403727425075 + ], + [ + "2022-01-21T13:11:30Z", + 11.488581675749048, + 12.272260458006759 + ] + ] + }, + "hints": { + "title": "Memory usage %" + } + }, + "net_receive": { + "data": { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number" + }, + { + "label": "test-2 (standby)", + "type": "number" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 442, + 470 + ], + [ + "2022-01-21T13:11:00Z", + 439, + 384 + ], + [ + "2022-01-21T13:11:30Z", + 466, + 458 + ] + ] + }, + "hints": { + "title": "Network receive (bytes/s)" + } + }, + "net_send": { + "data": { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number" + }, + { + "label": "test-2 (standby)", + "type": "number" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 672, + 581 + ], + [ + "2022-01-21T13:11:00Z", + 660, + 555 + ], + [ + "2022-01-21T13:11:30Z", + 694, + 573 + ] + ] + }, + "hints": { + "title": "Network transmit (bytes/s)" + } + } + } + ], + "properties": { + "data": { + "$ref": "#/components/schemas/databaseMetricsDataResponse" + }, + "hints": { + "type": "object", + "properties": { + "title": { + "type": "string", + "examples": [ + "CPU Usage Over Time" + ], + "description": "A human-readable title for the metric data." + } + }, + "description": "Additional hints or metadata about the metric data." + } + }, + "title": "MetricsItemResponse", + "description": "Schema for a single metrics item response." + }, + "databaseMetricsDataResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number", + "format": "float" + }, + { + "label": "test-2 (standby)", + "type": "number", + "format": "float" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 2.744682398273781, + 3.054323473090861 + ], + [ + "2022-01-21T13:11:00Z", + 3.0735645433218366, + 2.972423595745795 + ], + [ + "2022-01-21T13:11:30Z", + 2.61619694060839, + 3.1358378052207883 + ], + [ + "2022-01-21T13:12:00Z", + 3.275132296130991, + 4.196249043309251 + ] + ] + } + ], + "properties": { + "cols": { + "type": "array", + "examples": [ + [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number", + "format": "float" + }, + { + "label": "test-2 (standby)", + "type": "number", + "format": "float" + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseMetricsColumnHeaderResponse" + } + }, + "rows": { + "type": "array", + "examples": [ + [ + "2022-01-21T13:10:30Z", + 2.744682398273781, + 3.054323473090861 + ], + [ + "2022-01-21T13:11:00Z", + 3.0735645433218366, + 2.972423595745795 + ], + [ + "2022-01-21T13:11:30Z", + 2.61619694060839, + 3.1358378052207883 + ], + [ + "2022-01-21T13:12:00Z", + 3.275132296130991, + 4.196249043309251 + ] + ], + "items": { + "$ref": "#/components/schemas/databaseMetricsRowDataResponse" + } + } + }, + "title": "MetricsDataResponse", + "description": "Schema for metrics data response." + }, + "databaseMetricsColumnHeaderResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "label": "cpu_usage", + "type": "gauge" + } + ], + "properties": { + "label": { + "type": "string", + "description": "The label for the column header.", + "example": "cpu_usage" + }, + "type": { + "type": "string", + "description": "The label for the column header.", + "example": "gauge" + } + }, + "title": "MetricsColumnHeaderResponse", + "description": "Schema for a metrics column header response." + }, + "databaseMetricsRowDataResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": {}, + "title": "MetricsRowDataResponse", + "description": "Array of objects representing a row of metrics data - can be any format." + }, + "databaseServiceAlertsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseServiceAlertResponse" + }, + "title": "ServiceAlertsResponse", + "description": "Schema for service alerts response" + }, + "databaseServiceAlertResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "create_time": "2023-10-05T14:48:00Z", + "event": "user_alert_os_too_many_shards.", + "service_type": "opensearch", + "severity": "warning" + } + ], + "properties": { + "create_time": { + "type": "string", + "format": "date-time", + "description": "The time when the alert was created.", + "example": "2023-10-05T14:48:00Z" + }, + "event": { + "type": "string", + "description": "A brief description of the alert event.", + "example": "user_alert_os_too_many_shards." + }, + "service_type": { + "type": "string", + "description": "The type of service associated with the alert.", + "example": "opensearch" + }, + "severity": { + "type": "string", + "description": "The severity level of the alert.", + "example": "warning" + } + }, + "title": "ServiceAlertResponse", + "description": "Schema for a service alert" + }, + "databaseIntegrationEndpointsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "uuid": "20e86f48-2dcd-4a43-843d-3532ab112c1d", + "name": "rsyslog", + "type": "rsyslog", + "properties": { + "format": "rfc5424", + "max_message_size": 8192, + "port": 514, + "sd": "", + "server": "94.237.95.164", + "tls": false + } + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseIntegrationEndpointResponse" + }, + "title": "IntegrationEndpointsResponse", + "description": "Schema for a list of integration endpoints." + }, + "databaseIntegrationEndpointResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "uuid": "20e86f48-2dcd-4a43-843d-3532ab112c1d", + "name": "rsyslog", + "type": "rsyslog", + "properties": { + "format": "rfc5424", + "max_message_size": 8192, + "port": 514, + "sd": "", + "server": "94.237.95.164", + "tls": false + } + } + ], + "properties": { + "uuid": { + "type": "string", + "format": "uuid", + "description": "The universally unique identifier (UUID) of the integration endpoint.", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "name": { + "type": "string", + "description": "The name of the integration endpoint.", + "example": "rsyslog" + }, + "type": { + "type": "string", + "description": "The type of the integration endpoint.", + "example": "rsyslog" + }, + "properties": { + "type": "object", + "examples": [ + { + "format": "rfc5424", + "max_message_size": 8192, + "port": 514, + "sd": "", + "server": "94.237.95.164", + "tls": false + } + ], + "additionalProperties": true, + "description": "A key-value map of properties specific to the integration endpoint type." + } + }, + "title": "IntegrationEndpointResponse", + "description": "Schema for an integration endpoint response." + }, + "databaseAccountCaResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "certificate": "-----BEGIN CERTIFICATE-----\naxxxxxxxxxxxxx+tkP9Uh9+PxxxxxcNAQEM\nBQAwOjE4MDYGA1UEAwwvZWYzMTc1xxxxxxxxxx0YjM2OWIz\nM2RkIFByb2plY3QgQ0EwHhcNMjEwMzMwMDgxNDU0WhcNMzEwMzI4MDgxNDU0WjA6\nMTgwNgYDVQQDDC9lZjMxNzU1NC1lNzYzLTQ5ZjUtODI4Ni1lZDRiMzY5YjMzZGQg\nUHJvamVjdCBDQTCCAaIwDQYJKoZIhvcNAQEBBQxxxxggGBAK1Vh4GR\nlfxPZ3Icw8E1WlS5+9rADOdrstYtL3oiHBqzljmjvKf1Vuu0LLHtszWrCElOvoZ4\nzhg6+yVIB9YcvTZJNU0BNlIilF0rafn/40pFjeKrtxxxxxxxxxxy48Hnk\nMAiqoRyJ6hGRpYmKVip2sbMEtI+X9xQahlhlTMLo9082gS2hI5nvmhDqRiOlly28\ntwr2I/nbsIao8pIE19bdptKVqrv9x+O51O2JK7NlyjxnJVaHS9Tv6z1gG0GZgzYW\nkram1U8oTu72cjvGhMIBhgz7AlQ74PMtAub/eH4hipGU4LDZQiZ+9kCT+FCD9uAq\nIq+ALiLPHTCaGiKTJYoerutgrmrz1HZp6RmxRc8Wk7MdPp8OHqSXUnewKSGlzEl3\nhlJ5UMOVQ+tSDffAuvA6phUS0mmm1xxxxxxxxxxxxxxxMcrVE8AjbF5nkieOV0r6hIwIDAQAB\noz8wPTAdBgNVHQ4EFxxxxgQUHTUNeVDpSFx8fjq9xxxxxxxxFDnqn8xY0iAwDwYDVR0TBAgwBgEB\n/wIBADALBgNxxxxxxxxxxLtt8qOjsbvS\nYZtePpqZjx7NkmFdScc0LOBj6oXFetcJlhLQKzrguQDi/trt29sxjZZ5zLnQufnE\ns8IYtbclhDbF0qGG15oP8tYVRXfzKLHF4HfuMrdiyqzF/q6Qy0fVIiFWD7t1it8V\nPLqlk9oFDL7xUnsZOfYcqv8Ct+aWE7L73gJVgUkDHP+gkdGTWKYm4zzYTLfqh1Iu\nyivOjn+KSyjjtsJsOGUDZBkh215OMKPp4JpWQpgQeK6kjTnwuMwEYYFyhfu/z5wU\nwN7z7Ad39fyGmQzkGbFXtP0te4MFElOVSkiHaB4T4lTM6690st6+uIhFI1Qo/oAY\n30ybOpOTLF7FZxwY5Z+BTW27hytyECLkG3b4iKIqKsRIvlFkwKP8cfKjq7ImSbBG\nOJ8JBcraffygrLznbJ2979Y9yN+n+8wW0xxxxxxxxxxov24snxDmm6fAMoO1\nxBM7c2KZA5ZoZDefcz9e28r7xxxx==\n-----END CERTIFICATE-----\n" + } + ], + "properties": { + "certificate": { + "type": "string", + "description": "Name of the CA", + "example": "-----BEGIN CERTIFICATE-----\naxxxxxxxxxxxxx+tkP9Uh9+PxxxxxcNAQEM\nBQAwOjE4MDYGA1UEAwwvZWYzMTc1xxxxxxxxxx0YjM2OWIz\nM2RkIFByb2plY3QgQ0EwHhcNMjEwMzMwMDgxNDU0WhcNMzEwMzI4MDgxNDU0WjA6\nMTgwNgYDVQQDDC9lZjMxNzU1NC1lNzYzLTQ5ZjUtODI4Ni1lZDRiMzY5YjMzZGQg\nUHJvamVjdCBDQTCCAaIwDQYJKoZIhvcNAQEBBQxxxxggGBAK1Vh4GR\nlfxPZ3Icw8E1WlS5+9rADOdrstYtL3oiHBqzljmjvKf1Vuu0LLHtszWrCElOvoZ4\nzhg6+yVIB9YcvTZJNU0BNlIilF0rafn/40pFjeKrtxxxxxxxxxxy48Hnk\nMAiqoRyJ6hGRpYmKVip2sbMEtI+X9xQahlhlTMLo9082gS2hI5nvmhDqRiOlly28\ntwr2I/nbsIao8pIE19bdptKVqrv9x+O51O2JK7NlyjxnJVaHS9Tv6z1gG0GZgzYW\nkram1U8oTu72cjvGhMIBhgz7AlQ74PMtAub/eH4hipGU4LDZQiZ+9kCT+FCD9uAq\nIq+ALiLPHTCaGiKTJYoerutgrmrz1HZp6RmxRc8Wk7MdPp8OHqSXUnewKSGlzEl3\nhlJ5UMOVQ+tSDffAuvA6phUS0mmm1xxxxxxxxxxxxxxxMcrVE8AjbF5nkieOV0r6hIwIDAQAB\noz8wPTAdBgNVHQ4EFxxxxgQUHTUNeVDpSFx8fjq9xxxxxxxxFDnqn8xY0iAwDwYDVR0TBAgwBgEB\n/wIBADALBgNxxxxxxxxxxLtt8qOjsbvS\nYZtePpqZjx7NkmFdScc0LOBj6oXFetcJlhLQKzrguQDi/trt29sxjZZ5zLnQufnE\ns8IYtbclhDbF0qGG15oP8tYVRXfzKLHF4HfuMrdiyqzF/q6Qy0fVIiFWD7t1it8V\nPLqlk9oFDL7xUnsZOfYcqv8Ct+aWE7L73gJVgUkDHP+gkdGTWKYm4zzYTLfqh1Iu\nyivOjn+KSyjjtsJsOGUDZBkh215OMKPp4JpWQpgQeK6kjTnwuMwEYYFyhfu/z5wU\nwN7z7Ad39fyGmQzkGbFXtP0te4MFElOVSkiHaB4T4lTM6690st6+uIhFI1Qo/oAY\n30ybOpOTLF7FZxwY5Z+BTW27hytyECLkG3b4iKIqKsRIvlFkwKP8cfKjq7ImSbBG\nOJ8JBcraffygrLznbJ2979Y9yN+n+8wW0xxxxxxxxxxov24snxDmm6fAMoO1\nxBM7c2KZA5ZoZDefcz9e28r7xxxx==\n-----END CERTIFICATE-----\n" + } + }, + "title": "AccountCaResponse", + "description": "Response schema for account CA" + }, + "databaseProjectAlertsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseProjectAlertResponse" + }, + "title": "ProjectAlertsResponse", + "description": "Schema for a project alerts" + }, + "databaseProjectAlertResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "create_time": "2025-08-01T10:40:04.140473Z", + "event": "pg-disk-full", + "uuid": "123e4567-e89b-12d3-a456-426614174000", + "title": "pg-1x2xcpu-2", + "service_type": "pg", + "severity": "critical" + } + ], + "properties": { + "create_time": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the alert was created", + "example": "2025-08-01T10:40:04.140473Z" + }, + "event": { + "type": "string", + "description": "Event type for the alert", + "example": "pg-disk-full" + }, + "uuid": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the alert", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "title": { + "type": "string", + "description": "Optional title of the alert", + "example": "pg-1x2xcpu-2" + }, + "service_type": { + "type": "string", + "description": "Service type related to the alert", + "example": "pg" + }, + "severity": { + "type": "string", + "description": "Severity of the alert", + "example": "critical" + } + }, + "title": "ProjectAlertResponse", + "description": "Schema for a project alert response" + }, + "databaseServiceStatusResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "state": "running" + } + ], + "properties": { + "state": { + "type": "string", + "description": "The service status indicates the service's current operational status.", + "example": "running" + } + }, + "title": "ServiceStatusResponse", + "description": "Schema for representing the status of a service instance." + }, + "databaseServiceVersionsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + "12", + "13", + "14", + "15", + "16" + ] + ], + "items": { + "type": "string", + "description": "Available service version", + "example": "12" + }, + "title": "ServiceVersionsResponse", + "description": "Schema for representing available service versions" + }, + "databaseUpCloudApiResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "examples": [ + { + "errors": [ + { + "message": "Invalid request", + "more_info": "https://developers.upcloud.com/errors", + "status": 400 + } + ], + "message": "An error occurred while processing your request." + } + ], + "properties": { + "errors": { + "type": "array", + "items": { + "properties": { + "message": { + "type": "string", + "description": "A descriptive error message." + }, + "more_info": { + "type": "string", + "description": "A URL pointing to more information about the error." + }, + "status": { + "type": "integer", + "format": "int32", + "description": "The HTTP status code associated with the error." + } + } + }, + "description": "A list of error messages returned by UpCloud's API.", + "example": [ + { + "message": "Invalid request", + "more_info": "https://developers.upcloud.com/errors", + "status": 400 + } + ] + }, + "message": { + "type": "string", + "description": "The time the backup was created.", + "example": "An error occurred while processing your request." + } + }, + "title": "UpCloudApiResponse", + "description": "Schema for UpCloud API error responses." + }, + "databaseServiceMigrationStatusResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "method": "replication", + "seconds_behind_master": 0, + "source_active": true, + "status": "done", + "databases": [ + { + "dbname": "defaultdb", + "method": "replication", + "status": "syncing" + } + ] + } + ], + "properties": { + "error": { + "type": "string", + "description": "Error message if any", + "example": "some error occurred" + }, + "method": { + "type": "string", + "description": "Migration method used", + "example": "replication" + }, + "seconds_behind_master": { + "type": "integer", + "format": "int32", + "description": "Seconds behind master", + "example": 10 + }, + "source_active": { + "type": "boolean", + "description": "Is source active", + "example": true + }, + "status": { + "type": "string", + "description": "Current status of the migration", + "example": "syncing" + }, + "databases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseMigrationStatusDetailsResponse" + } + } + }, + "title": "ServiceMigrationStatusResponse", + "description": "Response schema for service migration status" + }, + "databaseMigrationStatusDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "error": "some error occurred", + "dbname": "defaultdb", + "method": "replication", + "status": "syncing" + } + ], + "properties": { + "error": { + "type": "string", + "description": "Error message if any", + "example": "some error occurred" + }, + "dbname": { + "type": "string", + "description": "Name of the database", + "example": "defaultdb" + }, + "method": { + "type": "string", + "description": "Migration method used", + "example": "replication" + }, + "status": { + "type": "string", + "description": "Current status of the migration", + "example": "syncing" + } + }, + "title": "MigrationStatusDetailsResponse", + "description": "Schema for migration status details response." + }, + "databaseMetricsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "cpu_usage": { + "data": { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number" + }, + { + "label": "test-2 (standby)", + "type": "number" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 2.744682398273781, + 3.054323473090861 + ], + [ + "2022-01-21T13:11:00Z", + 3.0735645433218366, + 2.972423595745795 + ], + [ + "2022-01-21T13:11:30Z", + 2.61619694060839, + 3.1358378052207883 + ], + [ + "2022-01-21T13:12:00Z", + 3.275132296130991, + 4.196249043309251 + ] + ] + }, + "hints": { + "title": "CPU usage %" + } + }, + "disk_usage": { + "data": { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number" + }, + { + "label": "test-2 (standby)", + "type": "number" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 5.654416415900109, + 5.58959125727556 + ], + [ + "2022-01-21T13:11:00Z", + 5.654416415900109, + 5.58959125727556 + ], + [ + "2022-01-21T13:11:30Z", + 5.654416415900109, + 5.58959125727556 + ] + ] + }, + "hints": { + "title": "Disk space usage %" + } + }, + "diskio_reads": { + "data": { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number" + }, + { + "label": "test-2 (standby)", + "type": "number" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 0, + 0 + ], + [ + "2022-01-21T13:11:00Z", + 0, + 0 + ], + [ + "2022-01-21T13:11:30Z", + 0, + 0 + ] + ] + }, + "hints": { + "title": "Disk iops (reads)" + } + }, + "diskio_writes": { + "data": { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number" + }, + { + "label": "test-2 (standby)", + "type": "number" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 3, + 2 + ], + [ + "2022-01-21T13:11:00Z", + 2, + 3 + ], + [ + "2022-01-21T13:11:30Z", + 4, + 3 + ] + ] + }, + "hints": { + "title": "Disk iops (writes)" + } + }, + "load_average": { + "data": { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number" + }, + { + "label": "test-2 (standby)", + "type": "number" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 0.11, + 0.11 + ], + [ + "2022-01-21T13:11:00Z", + 0.14, + 0.1 + ], + [ + "2022-01-21T13:11:30Z", + 0.14, + 0.09 + ] + ] + }, + "hints": { + "title": "Load average (5 min)" + } + }, + "mem_usage": { + "data": { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number" + }, + { + "label": "test-2 (standby)", + "type": "number" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 11.491766148261078, + 12.318932883261219 + ], + [ + "2022-01-21T13:11:00Z", + 11.511967645759277, + 12.304403727425075 + ], + [ + "2022-01-21T13:11:30Z", + 11.488581675749048, + 12.272260458006759 + ] + ] + }, + "hints": { + "title": "Memory usage %" + } + }, + "net_receive": { + "data": { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number" + }, + { + "label": "test-2 (standby)", + "type": "number" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 442, + 470 + ], + [ + "2022-01-21T13:11:00Z", + 439, + 384 + ], + [ + "2022-01-21T13:11:30Z", + 466, + 458 + ] + ] + }, + "hints": { + "title": "Network receive (bytes/s)" + } + }, + "net_send": { + "data": { + "cols": [ + { + "label": "time", + "type": "date" + }, + { + "label": "test-1 (master)", + "type": "number" + }, + { + "label": "test-2 (standby)", + "type": "number" + } + ], + "rows": [ + [ + "2022-01-21T13:10:30Z", + 672, + 581 + ], + [ + "2022-01-21T13:11:00Z", + 660, + 555 + ], + [ + "2022-01-21T13:11:30Z", + 694, + 573 + ] + ] + }, + "hints": { + "title": "Network transmit (bytes/s)" + } + } + } + ], + "title": "MetricsResponse", + "additionalProperties": { + "$ref": "#/components/schemas/databaseMetricsItemResponse" + }, + "description": "Schema for metrics response." + }, + "databaseQueryStatisticsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "mysql": { + "type": "array", + "examples": [ + [ + { + "avg_timer_wait": 12345, + "count_star": 100, + "digest": "abc123def456", + "digest_text": "SELECT * FROM users WHERE id = ?", + "first_seen": "2024-06-01T12:00:00Z", + "last_seen": "2024-06-10T15:30:00Z" + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseQueryStatisticsMysqlResponse" + } + }, + "pg": { + "type": "array", + "examples": [ + [ + { + "blk_read_time": 0, + "blk_write_time": 0, + "calls": 57425, + "database_name": "defaultdb", + "local_blks_dirtied": 0, + "local_blks_hit": 0, + "local_blks_read": 0, + "local_blks_written": 0, + "max_time": 133387, + "mean_time": 1060, + "min_time": 151, + "query": "COMMIT", + "rows": 0, + "shared_blks_dirtied": 0, + "shared_blks_hit": 0, + "shared_blks_read": 0, + "shared_blks_written": 0, + "stddev_time": 0, + "temp_blks_read": 0, + "temp_blks_written": 0, + "total_time": 60879904, + "user_name": "upadmin" + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseQueryStatisticsPgResponse" + } + } + }, + "title": "QueryStatisticsResponse", + "description": "Schema for query statistics response." + }, + "databaseQueryStatisticsMysqlResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "avg_timer_wait": 12345, + "count_star": 100, + "digest": "abc123def456", + "digest_text": "SELECT * FROM users WHERE id = ?", + "first_seen": "2024-06-01T12:00:00Z", + "last_seen": "2024-06-10T15:30:00Z", + "max_timer_wait": 54321, + "min_timer_wait": 100, + "quantile_95": 20000, + "quantile_99": 30000, + "quantile_999": 40000, + "query_sample_seen": "2024-06-05T10:00:00Z", + "query_sample_text": "SELECT * FROM users WHERE id = 1", + "query_sample_timer_wait": 15000, + "schema_name": "my_database", + "sum_created_tmp_disk_tables": 2, + "sum_created_tmp_tables": 5, + "sum_errors": 0, + "sum_lock_time": 1000, + "sum_no_good_index_used": 1, + "sum_no_index_used": 3, + "sum_rows_affected": 10, + "sum_rows_examined": 1000, + "sum_rows_sent": 500, + "sum_select_full_join": 0, + "sum_select_full_range_join": 0, + "sum_select_range": 2, + "sum_select_range_check": 0, + "sum_select_scan": 4, + "sum_sort_merge_passes": 1, + "sum_sort_range": 2, + "sum_sort_rows": 100, + "sum_sort_scan": 3, + "sum_timer_wait": 20000, + "sum_warnings": 0 + } + ], + "properties": { + "avg_timer_wait": { + "type": "integer", + "format": "int64", + "description": "Average wait time for the query.", + "example": 12345 + }, + "count_star": { + "type": "integer", + "format": "int64", + "description": "Total number of times the query was executed.", + "example": 100 + }, + "digest": { + "type": "string", + "description": "Query digest hash.", + "example": "abc123def456" + }, + "digest_text": { + "type": "string", + "description": "Normalized query text.", + "example": "SELECT * FROM users WHERE id = ?" + }, + "first_seen": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the query was first seen.", + "example": "2024-06-01T12:00:00Z" + }, + "last_seen": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the query was last seen.", + "example": "2024-06-10T15:30:00Z" + }, + "max_timer_wait": { + "type": "integer", + "format": "int64", + "description": "Maximum wait time for the query.", + "example": 54321 + }, + "min_timer_wait": { + "type": "integer", + "format": "int64", + "description": "Minimum wait time for the query.", + "example": 100 + }, + "quantile_95": { + "type": "integer", + "format": "int64", + "description": "95th percentile wait time.", + "example": 20000 + }, + "quantile_99": { + "type": "integer", + "format": "int64", + "description": "99th percentile wait time.", + "example": 30000 + }, + "quantile_999": { + "type": "integer", + "format": "int64", + "description": "99.9th percentile wait time.", + "example": 40000 + }, + "query_sample_seen": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the sample query was seen.", + "example": "2024-06-05T10:00:00Z" + }, + "query_sample_text": { + "type": "string", + "description": "Sample query text.", + "example": "SELECT * FROM users WHERE id = 1" + }, + "query_sample_timer_wait": { + "type": "integer", + "format": "int64", + "description": "Wait time for the sample query.", + "example": 15000 + }, + "schema_name": { + "type": "string", + "description": "Name of the database schema.", + "example": "my_database" + }, + "sum_created_tmp_disk_tables": { + "type": "integer", + "format": "int64", + "description": "Total number of temporary disk tables created.", + "example": 2 + }, + "sum_created_tmp_tables": { + "type": "integer", + "format": "int64", + "description": "Total number of temporary tables created.", + "example": 5 + }, + "sum_errors": { + "type": "integer", + "format": "int64", + "description": "Total number of errors encountered.", + "example": 0 + }, + "sum_lock_time": { + "type": "integer", + "format": "int64", + "description": "Total lock time for the query.", + "example": 1000 + }, + "sum_no_good_index_used": { + "type": "integer", + "format": "int64", + "description": "Total number of times no good index was used.", + "example": 1 + }, + "sum_no_index_used": { + "type": "integer", + "format": "int64", + "description": "Total number of times no index was used.", + "example": 3 + }, + "sum_rows_affected": { + "type": "integer", + "format": "int64", + "description": "Total number of rows affected.", + "example": 10 + }, + "sum_rows_examined": { + "type": "integer", + "format": "int64", + "description": "Total number of rows examined.", + "example": 1000 + }, + "sum_rows_sent": { + "type": "integer", + "format": "int64", + "description": "Total number of rows sent.", + "example": 500 + }, + "sum_select_full_join": { + "type": "integer", + "format": "int64", + "description": "Total number of full joins performed.", + "example": 0 + }, + "sum_select_full_range_join": { + "type": "integer", + "format": "int64", + "description": "Total number of full range joins performed.", + "example": 0 + }, + "sum_select_range": { + "type": "integer", + "format": "int64", + "description": "Total number of range selects performed.", + "example": 2 + }, + "sum_select_range_check": { + "type": "integer", + "format": "int64", + "description": "Total number of range checks performed.", + "example": 0 + }, + "sum_select_scan": { + "type": "integer", + "format": "int64", + "description": "Total number of select scans performed.", + "example": 4 + }, + "sum_sort_merge_passes": { + "type": "integer", + "format": "int64", + "description": "Total number of sort merge passes.", + "example": 1 + }, + "sum_sort_range": { + "type": "integer", + "format": "int64", + "description": "Total number of sort range operations.", + "example": 2 + }, + "sum_sort_rows": { + "type": "integer", + "format": "int64", + "description": "Total number of rows sorted.", + "example": 100 + }, + "sum_sort_scan": { + "type": "integer", + "format": "int64", + "description": "Total number of sort scans performed.", + "example": 3 + }, + "sum_timer_wait": { + "type": "integer", + "format": "int64", + "description": "Total wait time for the query.", + "example": 20000 + }, + "sum_warnings": { + "type": "integer", + "format": "int64", + "description": "Total number of warnings generated.", + "example": 0 + } + }, + "title": "QueryStatisticsMysqlResponse", + "description": "Schema for MySQL query statistics response." + }, + "databaseQueryStatisticsPgResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "blk_read_time": 120, + "blk_write_time": 45, + "calls": 10, + "database_name": "mydb", + "local_blks_dirtied": 2, + "local_blks_hit": 100, + "local_blks_read": 5, + "local_blks_written": 3, + "max_time": 300, + "mean_time": 150, + "min_time": 100, + "query": "SELECT * FROM users WHERE id = 1", + "rows": 20, + "shared_blks_dirtied": 4, + "shared_blks_hit": 200, + "shared_blks_read": 8, + "shared_blks_written": 6, + "stddev_time": 20, + "temp_blks_read": 1, + "temp_blks_written": 1, + "total_time": 1500, + "user_name": "postgres" + } + ], + "properties": { + "blk_read_time": { + "type": "integer", + "format": "int64", + "description": "Time spent reading data blocks, in milliseconds.", + "example": 120 + }, + "blk_write_time": { + "type": "integer", + "format": "int64", + "description": "Time spent writing data blocks, in milliseconds.", + "example": 45 + }, + "calls": { + "type": "integer", + "format": "int64", + "description": "Number of times the query was executed.", + "example": 10 + }, + "database_name": { + "type": "string", + "description": "Name of the database.", + "example": "mydb" + }, + "local_blks_dirtied": { + "type": "integer", + "format": "int64", + "description": "Number of local blocks dirtied.", + "example": 2 + }, + "local_blks_hit": { + "type": "integer", + "format": "int64", + "description": "Number of local block cache hits.", + "example": 100 + }, + "local_blks_read": { + "type": "integer", + "format": "int64", + "description": "Number of local blocks read.", + "example": 5 + }, + "local_blks_written": { + "type": "integer", + "format": "int64", + "description": "Number of local blocks written.", + "example": 3 + }, + "max_time": { + "type": "integer", + "format": "int64", + "description": "Maximum execution time, in milliseconds.", + "example": 300 + }, + "mean_time": { + "type": "integer", + "format": "int64", + "description": "Mean execution time, in milliseconds.", + "example": 150 + }, + "min_time": { + "type": "integer", + "format": "int64", + "description": "Minimum execution time, in milliseconds.", + "example": 100 + }, + "query": { + "type": "string", + "description": "The SQL query text.", + "example": "SELECT * FROM users WHERE id = 1" + }, + "rows": { + "type": "integer", + "format": "int64", + "description": "Total number of rows returned or affected.", + "example": 20 + }, + "shared_blks_dirtied": { + "type": "integer", + "format": "int64", + "description": "Number of shared blocks dirtied.", + "example": 4 + }, + "shared_blks_hit": { + "type": "integer", + "format": "int64", + "description": "Number of shared block cache hits.", + "example": 200 + }, + "shared_blks_read": { + "type": "integer", + "format": "int64", + "description": "Number of shared blocks read.", + "example": 8 + }, + "shared_blks_written": { + "type": "integer", + "format": "int64", + "description": "Number of shared blocks written.", + "example": 6 + }, + "stddev_time": { + "type": "integer", + "format": "int64", + "description": "Standard deviation of execution time, in milliseconds.", + "example": 20 + }, + "temp_blks_read": { + "type": "integer", + "format": "int64", + "description": "Number of temporary blocks read.", + "example": 1 + }, + "temp_blks_written": { + "type": "integer", + "format": "int64", + "description": "Number of temporary blocks written.", + "example": 1 + }, + "total_time": { + "type": "integer", + "format": "int64", + "description": "Total execution time, in milliseconds.", + "example": 1500 + }, + "user_name": { + "type": "string", + "description": "Name of the user who executed the query.", + "example": "postgres" + } + }, + "title": "QueryStatisticsPgResponse", + "description": "Schema for PostgreSQL query statistics response." + }, + "databaseLogListResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "first_log_offset": "123456", + "offset": "123460", + "logs": [ + { + "hostname": "upcloud-doc-hostname", + "msg": "[10-1] pid=3328089,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG: connection authorized: user=postgres database=defaultdb", + "time": "2022-01-21T13:07:23.687241Z", + "service": "postgresql-13.service" + } + ] + } + ], + "properties": { + "first_log_offset": { + "type": "string", + "description": "Offset of the first log entry in the list.", + "example": "123456" + }, + "offset": { + "type": "string", + "description": "Current offset for pagination.", + "example": "123460" + }, + "logs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseLogEntryResponse" + }, + "description": "Array of log entries from UpCloud services.", + "example": [ + { + "hostname": "upc-pg-1a2b3c4d5e", + "msg": "UpCloud PostgreSQL backup completed successfully", + "time": "2024-06-12T14:23:00Z", + "service": "upcloud-pg" + } + ] + } + }, + "title": "LogListResponse", + "description": "Schema representing a paginated list of log entries from UpCloud services." + }, + "databaseLogEntryResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "hostname": "api-doc-hostname", + "msg": "[10-1] pid=3328089,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG: connection authorized: user=postgres database=defaultdb", + "time": "2022-01-21T13:07:23.687241Z", + "service": "postgresql-13.service" + } + ], + "properties": { + "hostname": { + "type": "string", + "description": "The name of the UpCloud service host where the log entry originated.", + "example": "api-doc-hostname" + }, + "msg": { + "type": "string", + "description": "The log message content.", + "example": "[10-1] pid=3328089,user=postgres,db=defaultdb,app=[unknown],client=[local] LOG: connection authorized: user=postgres database=defaultdb" + }, + "time": { + "type": "string", + "format": "date-time", + "description": "Timestamp of the log entry.", + "example": "2022-01-21T13:07:23.687241Z" + }, + "service": { + "type": "string", + "description": "Name of the UpCloud service that generated the log entry.", + "example": "postgresql-13.service" + } + }, + "title": "LogEntryResponse", + "description": "Schema representing a log entry from an UpCloud service." + }, + "databaseConnectionPoolsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseConnectionPoolResponse" + }, + "title": "ConnectionPoolsResponse", + "description": "An array of connection pool response objects." + }, + "databaseIndexesResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "create_time": "2023-05-11T13:24:10.623Z", + "docs": 1, + "health": "green", + "index_name": ".kibana_1", + "number_of_replicas": 0, + "number_of_shards": 1, + "read_only_allow_delete": false, + "size": 5313, + "status": "open" + } + ], + [ + { + "create_time": "2023-05-11T13:24:10.623Z", + "docs": 1, + "health": "green", + "index_name": ".kibana_1", + "number_of_replicas": 0, + "number_of_shards": 1, + "read_only_allow_delete": false, + "size": 5313, + "status": "open" + }, + { + "create_time": "2023-05-11T13:24:10.623Z", + "docs": 42, + "health": "yellow", + "index_name": "logs-2023.05.11", + "number_of_replicas": 1, + "number_of_shards": 3, + "read_only_allow_delete": false, + "size": 1048576, + "status": "open" + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseIndexResponse" + }, + "title": "IndexesResponse", + "description": "Response schema for indexes" + }, + "databaseIndexResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "create_time": "2023-05-11T13:24:10.623Z", + "docs": 1, + "health": "green", + "index_name": ".kibana_1", + "number_of_replicas": 0, + "number_of_shards": 1, + "read_only_allow_delete": false, + "size": 5313, + "status": "open" + } + ], + "properties": { + "create_time": { + "type": "string", + "format": "date-time", + "description": "Creation time of the index.", + "example": "2023-05-11T13:24:10.623Z" + }, + "docs": { + "type": "integer", + "format": "int64", + "description": "Number of documents in the index.", + "example": 1 + }, + "health": { + "type": "string", + "description": "Health status of the index.", + "example": "green" + }, + "index_name": { + "type": "string", + "description": "Name of the index.", + "example": ".kibana_1" + }, + "number_of_replicas": { + "type": "integer", + "format": "int32", + "description": "Number of replicas for the index.", + "example": 1 + }, + "number_of_shards": { + "type": "integer", + "format": "int32", + "description": "Number of shards for the index.", + "example": 1 + }, + "read_only_allow_delete": { + "type": "boolean", + "description": "Indicates if the index is read-only and allows deletion.", + "example": false + }, + "size": { + "type": "integer", + "format": "int64", + "description": "Size of the index in bytes.", + "example": 5313 + }, + "status": { + "type": "string", + "description": "Status of the index.", + "example": "open" + } + }, + "title": "IndexResponse", + "description": "Schema representing the details of an index." + }, + "databaseServiceIntegrationsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseServiceIntegrationResponse" + }, + "title": "ServiceIntegrationsResponse", + "description": "Schema for a list of service integrations" + }, + "databaseServiceNetworkDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "create_time": "2023-10-05T14:48:00.000Z", + "update_time": "2023-10-05T14:48:00.000Z", + "state": "active", + "network_peerings": [ + { + "create_time": "2023-10-05T14:48:00.000Z", + "update_time": "2023-10-05T14:48:00.000Z", + "network_peer": "03196597-b972-4815-ba3a-85bb18365ced", + "state": "active", + "state_info": "The peering is in active state." + } + ] + } + ], + "properties": { + "create_time": { + "type": [ + "string", + "null" + ], + "examples": [ + "2023-10-05T14:48:00.000Z" + ], + "format": "date-time", + "description": "The creation time of the service network." + }, + "update_time": { + "type": [ + "string", + "null" + ], + "examples": [ + "2023-10-05T14:48:00.000Z" + ], + "format": "date-time", + "description": "The last update time of the service network." + }, + "state": { + "type": "string", + "examples": [ + "active" + ], + "description": "The current state of the service network." + }, + "network_peerings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databasePeeringStatusResponse" + } + } + }, + "title": "ServiceNetworkDetailsResponse", + "description": "Schema for service network details response" + }, + "databasePeeringStatusResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "create_time": "2023-10-05T14:48:00.000Z", + "update_time": "2023-10-05T14:48:00.000Z", + "network_peer": "03196597-b972-4815-ba3a-85bb18365ced", + "state": "active", + "state_info": "The peering is in active state." + } + ], + "properties": { + "create_time": { + "type": "string", + "format": "date-time", + "description": "The time when the peering status was created.", + "example": "2023-10-05T14:48:00.000Z" + }, + "update_time": { + "type": "string", + "format": "date-time", + "description": "The time when the peering status was last updated.", + "example": "2023-10-05T14:48:00.000Z" + }, + "network_peer": { + "type": "string", + "format": "uuid", + "description": "The UUID of the network peer.", + "example": "03196597-b972-4815-ba3a-85bb18365ced" + }, + "state": { + "type": "string", + "description": "The current state of the peering connection.", + "example": "active" + }, + "state_info": { + "type": "string", + "description": "Additional information about the current state of the peering connection.", + "example": "The peering is in active state." + } + }, + "title": "PeeringStatusResponse", + "description": "Schema for peering status response." + }, + "databaseCurrentSessionsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "pg": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databasePgCurrentSessionResponse" + } + }, + "mysql": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseMysqlCurrentSessionResponse" + } + }, + "redis": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseRedisValkeyCurrentSessionResponse" + } + }, + "valkey": { + "type": "array", + "items": { + "$ref": "#/components/schemas/databaseRedisValkeyCurrentSessionResponse" + } + } + }, + "title": "CurrentSessionsResponse", + "description": "Schema for representing current sessions for various services" + }, + "databasePgCurrentSessionResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "application_name": "client 1.5.14", + "backend_start": "2025-09-21T12:34:56Z", + "backend_type": "client backend", + "backend_xid": 742, + "backend_xmin": 731, + "client_addr": "198.51.100.42", + "client_hostname": "app-host.example.internal", + "client_port": 52344, + "datid": 16384, + "datname": "defaultdb", + "id": "3328089", + "query": "SELECT name, setting FROM pg_settings WHERE source = $1", + "query_duration": "00:00:01.234", + "query_start": "2025-09-21T12:35:10Z", + "state": "active", + "state_change": "2025-09-21T12:35:10Z", + "usename": "upadmin", + "usesysid": 10, + "wait_event": "ClientRead", + "wait_event_type": "Client", + "xact_start": "2025-09-21T12:35:05Z" + } + ], + "properties": { + "application_name": { + "type": "string", + "description": "Name of the application that is connected to this service.", + "example": "client 1.5.14" + }, + "backend_start": { + "type": "string", + "format": "date-time", + "description": "Time when this process was started (when the client connected).", + "example": "2025-09-21T12:34:56Z" + }, + "backend_type": { + "type": "string", + "description": "Type of current service (e.g., client backend).", + "example": "client backend" + }, + "backend_xid": { + "type": "integer", + "format": "int64", + "description": "Top-level transaction identifier of this service, if any.", + "example": 742 + }, + "backend_xmin": { + "type": "integer", + "format": "int64", + "description": "The current service's xmin horizon.", + "example": 731 + }, + "client_addr": { + "type": "string", + "description": "IP address of the connected client.", + "example": "198.51.100.42" + }, + "client_hostname": { + "type": "string", + "description": "Hostname of the connected client (reverse DNS of client_addr).", + "example": "app-host.example.internal" + }, + "client_port": { + "type": "integer", + "format": "int32", + "description": "TCP port number used by the client, or -1 if a Unix socket is used.", + "example": 52344 + }, + "datid": { + "type": "integer", + "format": "int64", + "description": "OID of the database this service is connected to.", + "example": 16384 + }, + "datname": { + "type": "string", + "description": "Name of the database this service is connected to.", + "example": "defaultdb" + }, + "id": { + "type": "string", + "description": "Process ID of this service.", + "example": "3328089" + }, + "query": { + "type": "string", + "description": "Most recent query. If state is active, this is the currently executing query.", + "example": "SELECT name, setting FROM pg_settings WHERE source = $1" + }, + "query_duration": { + "type": "string", + "description": "The active query's current duration (as a string).", + "example": "00:00:01.234" + }, + "query_start": { + "type": "string", + "format": "date-time", + "description": "Time when the currently active (or last) query started.", + "example": "2025-09-21T12:35:10Z" + }, + "state": { + "type": "string", + "description": "Overall state of this service (e.g., 'active' or 'idle').", + "example": "active" + }, + "state_change": { + "type": "string", + "format": "date-time", + "description": "Time when the state was last changed.", + "example": "2025-09-21T12:35:10Z" + }, + "usename": { + "type": "string", + "description": "Name of the user logged into this service.", + "example": "upadmin" + }, + "usesysid": { + "type": "integer", + "format": "int64", + "description": "OID of the user logged into this service.", + "example": 10 + }, + "wait_event": { + "type": "string", + "description": "Wait event name if the service is currently waiting.", + "example": "ClientRead" + }, + "wait_event_type": { + "type": "string", + "description": "Type of event for which the service is waiting (if any).", + "example": "Client" + }, + "xact_start": { + "type": "string", + "format": "date-time", + "description": "Time when the current transaction started.", + "example": "2025-09-21T12:35:05Z" + } + }, + "title": "PgCurrentSessionResponse", + "description": "Schema for PostgreSQL current session response." + }, + "databaseMysqlCurrentSessionResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "application_name": "my-app", + "client_addr": "198.51.100.23", + "datname": "defaultdb", + "id": "3159", + "query": "SELECT 1", + "query_duration": 125000000, + "state": "active", + "usename": "appuser" + } + ], + "properties": { + "application_name": { + "type": "string", + "description": "Name of the application that is connected to this service.", + "example": "my-app" + }, + "client_addr": { + "type": "string", + "description": "IP address of the client connected to this service.", + "example": "198.51.100.23" + }, + "datname": { + "type": "string", + "description": "Name of the database this service is connected to.", + "example": "defaultdb" + }, + "id": { + "type": "string", + "description": "Process ID of this service.", + "example": "3159" + }, + "query": { + "type": "string", + "description": "Text of this service's most recent query. If state is active this shows the currently executing query; otherwise an empty string.", + "example": "SELECT 1" + }, + "query_duration": { + "type": "integer", + "format": "int64", + "description": "The active query’s current duration, serialized as nanoseconds.", + "example": 125000000 + }, + "state": { + "type": "string", + "description": "Current overall state of this service. Allowed values include: active (executing a query) and idle (waiting for a new client command).", + "example": "active" + }, + "usename": { + "type": "string", + "description": "Name of the user logged into this service.", + "example": "appuser" + } + }, + "title": "MysqlCurrentSessionResponse", + "description": "Schema for the current session of a MySQL service." + }, + "databaseRedisValkeyCurrentSessionResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "active_channel_subscriptions": 2, + "active_database": "0", + "active_pattern_matching_channel_subscriptions": 1, + "application_name": "my-app", + "client_addr": "[fff0:fff0:fff0:fff0:0:fff0:fff0:fff0]:39956", + "connection_age": 2079483000000000, + "connection_idle": 3000000000, + "flags": [ + "N", + "U" + ], + "flags_raw": "NU", + "id": "15", + "multi_exec_commands": -1, + "output_buffer": 0, + "output_buffer_memory": 0, + "output_list_length": 0, + "query": "info", + "query_buffer": 0, + "query_buffer_free": 0 + } + ], + "properties": { + "active_channel_subscriptions": { + "type": "integer", + "format": "int32", + "description": "Number of active channel subscriptions.", + "example": 2 + }, + "active_database": { + "type": "string", + "description": "Current database ID.", + "example": "0" + }, + "active_pattern_matching_channel_subscriptions": { + "type": "integer", + "format": "int32", + "description": "Number of pattern matching subscriptions.", + "example": 1 + }, + "application_name": { + "type": "string", + "description": "Name of the application that is connected to this service.", + "example": "my-app" + }, + "client_addr": { + "type": "string", + "description": "IP address of the client connected to this service.", + "example": "[fff0:fff0:fff0:fff0:0:fff0:fff0:fff0]:39956" + }, + "connection_age": { + "type": "integer", + "format": "int64", + "description": "Total duration of the connection in nanoseconds.", + "example": 2079483000000000 + }, + "connection_idle": { + "type": "integer", + "format": "int64", + "description": "Idle time of the connection in nanoseconds.", + "example": 3000000000 + }, + "flags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of flags describing the client connection.", + "example": [ + "N", + "U" + ] + }, + "flags_raw": { + "type": "string", + "description": "Client connection flags (raw string).", + "example": "NU" + }, + "id": { + "type": "string", + "description": "Process ID of this session.", + "example": "15" + }, + "multi_exec_commands": { + "type": "integer", + "format": "int32", + "description": "Number of commands in a MULTI/EXEC context.", + "example": -1 + }, + "output_buffer": { + "type": "integer", + "format": "int64", + "description": "Output buffer length.", + "example": 0 + }, + "output_buffer_memory": { + "type": "integer", + "format": "int64", + "description": "Output buffer memory usage.", + "example": 0 + }, + "output_list_length": { + "type": "integer", + "format": "int32", + "description": "Output list length (replies queued when buffer is full).", + "example": 0 + }, + "query": { + "type": "string", + "description": "The last executed command.", + "example": "info" + }, + "query_buffer": { + "type": "integer", + "format": "int64", + "description": "Query buffer length (0 means no query pending).", + "example": 0 + }, + "query_buffer_free": { + "type": "integer", + "format": "int64", + "description": "Free space of the query buffer (0 means the buffer is full).", + "example": 0 + } + }, + "title": "RedisValkeyCurrentSessionResponse", + "description": "Schema for Redis Valkey current session response." + }, + "databaseServiceTaskResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/databaseServiceTaskBaseResponse" + }, + { + "type": "object", + "properties": { + "operation_type": { + "type": "string", + "description": "The type of operation being performed.", + "example": "async" + } + } + } + ], + "examples": [ + { + "create_time": "2022-10-04T12:21:42Z", + "operation": "mysql_migration_check", + "id": "9b39f10d-e356-437b-b907-d6d5574721b2", + "result_codes": [], + "result": "All pre-checks passed successfully, preferred migration method will be [Replication]", + "success": true, + "operation_type": "async" + } + ], + "title": "ServiceTaskResponse", + "description": "Response schema for retrieving information about a service task, including the operation type." + }, + "databaseServiceTaskBaseResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "create_time": "2022-10-04T12:21:42Z", + "operation": "mysql_migration_check", + "id": "9b39f10d-e356-437b-b907-d6d5574721b2", + "result_codes": [], + "result": "All pre-checks passed successfully, preferred migration method will be [Replication]", + "success": true + } + ], + "properties": { + "create_time": { + "type": "string", + "format": "date-time", + "description": "The time when the service task was created", + "example": "2022-10-04T12:21:42Z" + }, + "result": { + "type": "string", + "description": "Optional result message", + "example": "All pre-checks passed successfully, preferred migration method will be [Replication]" + }, + "result_codes": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": "Optional list of result codes as key-value maps" + }, + "ignore_dbs": { + "type": "string", + "examples": [ + "defaultdb" + ], + "description": "Optional list of databases to ignore" + }, + "operation": { + "type": "string", + "description": "The operation being performed", + "example": "mysql_migration_check" + }, + "success": { + "type": "boolean", + "description": "Indicates if the operation was successful", + "example": true + }, + "method": { + "type": "string", + "description": "Optional method used for the operation", + "example": "Replication" + }, + "source_pg_version": { + "type": "string", + "description": "Optional source PostgreSQL version", + "example": "13" + }, + "target_pg_version": { + "type": "string", + "description": "Optional target PostgreSQL version", + "example": "14" + }, + "id": { + "type": "string", + "format": "uuid", + "description": "Optional identifier for the task", + "example": "9b39f10d-e356-437b-b907-d6d5574721b2" + } + }, + "title": "ServiceTaskBaseResponse", + "additionalProperties": false, + "description": "Schema for representing a service task response" + }, + "databaseServiceTaskDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/databaseServiceTaskBaseResponse" + }, + { + "type": "object", + "properties": { + "result_codes": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "result": { + "type": "string", + "description": "A human-readable summary of the task result.", + "example": "ok *Clusters are compatible*" + }, + "success": { + "type": "boolean", + "description": "Indicates whether the task completed successfully.", + "example": true + } + } + } + ], + "title": "ServiceTaskDetailsResponse", + "description": "Response schema for retrieving detailed information about a specific service task, including result codes and success status." + }, + "databaseUsersResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "username": "admin", + "password": "my-password", + "authentication": "caching_sha2_password", + "type": "admin" + } + ] + ], + "items": { + "$ref": "#/components/schemas/databaseUserResponse" + }, + "title": "UsersResponse", + "description": "Schema for the response containing a list of users" + }, + "gatewayMetricsDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "gateway-service", + "active_connections": 0, + "created_at": "2025-03-26T12:34:56Z", + "updated_at": "2025-03-26T12:34:56Z", + "total_accepted_connections": 0, + "total_rejected_sessions": 0 + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the gateway" + }, + "active_connections": { + "type": "integer", + "examples": [ + 0 + ], + "format": "int64", + "description": "Number of active connections" + }, + "created_at": { + "type": "string", + "examples": [ + "2025-03-26T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the metrics was created." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-03-26T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the metrics was last updated." + }, + "total_accepted_connections": { + "type": "integer", + "examples": [ + 0 + ], + "format": "int64", + "description": "Number of accepted connections" + }, + "total_rejected_sessions": { + "type": "integer", + "examples": [ + 0 + ], + "format": "int64", + "description": "Number of rejected sessions" + } + }, + "title": "Gateway metrics details response", + "description": "Response schema for gateway metrics details." + }, + "gatewayQueryParamLimit": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "examples": [ + 10, + 25, + 50, + 100 + ], + "title": "Query param limit", + "maximum": 100, + "minimum": 0, + "format": "int64", + "description": "Schema for a query parameter specifying the maximum number of entries to return (limit).", + "default": 10 + }, + "gatewayQueryParamOffset": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "examples": [ + 0, + 10, + 20, + 50 + ], + "title": "Query param offset", + "minimum": 0, + "format": "int64", + "description": "Schema for a query parameter specifying the offset for pagination.", + "default": 0 + }, + "gatewayName": { + "type": "string", + "examples": [ + "advanced", + "development" + ], + "title": "Name", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "The name for the resource." + }, + "gatewayUuid": { + "type": "string", + "examples": [ + "01234567-89ab-cdef-0123-456789abcdef", + "fedcba98-7654-3210-fedc-ba9876543210" + ], + "title": "UUID", + "format": "uuid", + "description": "The unique identifier for the resource." + }, + "gatewayServiceOperationalState": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "pending" + ], + "title": "Service operational state", + "enum": [ + "pending", + "setup-agent", + "setup-link-network", + "setup-service", + "setup-network", + "setup-gw", + "checkup", + "setup-dns", + "running", + "stopped", + "delete-dns", + "delete-gw", + "delete-network", + "delete-server", + "delete-link-network", + "delete-service", + "detach-link-network" + ], + "description": "Service operational state" + }, + "gatewayServiceConfiguredStatus": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "started" + ], + "title": "Service configured status", + "enum": [ + "started", + "stopped" + ], + "description": "Service configured status" + }, + "gatewayServiceFeatures": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "nat" + ], + "title": "Service features", + "enum": [ + "nat", + "vpn" + ], + "description": "Service features" + }, + "gatewayQueryParamSortServices": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "-created_at", + "name", + "-uuid" + ], + "title": "Query param sort services", + "enum": [ + "created_at", + "-created_at", + "name", + "-name", + "uuid", + "-uuid" + ], + "description": "Sort services by field. Prefix with '-' for descending order." + }, + "gatewayLabelKey": { + "type": "string", + "examples": [ + "environment", + "team", + "project", + "purpose", + "cost-center" + ], + "title": "Label key", + "maxLength": 32, + "minLength": 2, + "pattern": "^[\\x20-\\x5E\\x60-\\x7E][\\x20-\\x7E]+$", + "description": "The key of a label." + }, + "gatewayServiceCreateRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "gateway-service", + "plan": "development-gwaas-1c2g", + "zone": "fi-hel1", + "features": [], + "routers": [], + "addresses": [], + "connections": [], + "labels": [], + "configured_status": "started", + "automatic_tunnel_internal_ip_allocation": true + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the service" + }, + "plan": { + "type": "string", + "examples": [ + "development-gwaas-1c2g" + ], + "description": "Plan" + }, + "zone": { + "type": "string", + "examples": [ + "fi-hel1" + ], + "pattern": "^[a-z]{2}-[a-z]{3}\\d$", + "description": "Zone" + }, + "features": { + "type": "array", + "examples": [ + [ + "nat" + ] + ], + "items": { + "$ref": "#/components/schemas/gatewayServiceFeatures" + }, + "minItems": 1, + "description": "Active features" + }, + "routers": { + "type": "array", + "examples": [ + [ + { + "uuid": "fedcba98-7654-3210-fedc-ba9876543210" + } + ] + ], + "items": { + "$ref": "#/components/schemas/gatewayRouterCreateRequest" + }, + "maxItems": 1, + "minItems": 1, + "description": "Service routers" + }, + "addresses": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayAddressCreateRequest" + }, + "maxItems": 2, + "description": "Service addresses" + }, + "connections": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayConnectionCreateRequest" + }, + "description": "Service connections" + }, + "labels": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayLabelCreateRequest" + }, + "maxItems": 255, + "description": "Labels" + }, + "configured_status": { + "$ref": "#/components/schemas/gatewayServiceConfiguredStatus" + }, + "automatic_tunnel_internal_ip_allocation": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Allocate and use tunnel internal IPs automatically", + "default": true + } + }, + "title": "Service create request", + "required": [ + "name", + "plan", + "zone", + "features", + "routers", + "configured_status" + ], + "additionalProperties": false, + "description": "Gateway service" + }, + "gatewayRouterCreateRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "uuid": "01234567-89ab-cdef-0123-456789abcdef" + } + ], + "properties": { + "uuid": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "title": "Router create request", + "required": [ + "uuid" + ], + "additionalProperties": false, + "description": "Network gateway router" + }, + "gatewayAddressCreateRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "gateway-service" + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the address" + }, + "address": { + "type": "string", + "examples": [ + "203.0.113.10" + ], + "format": "ipv4", + "description": "Floating IP address" + } + }, + "title": "Address create request", + "required": [ + "name" + ], + "additionalProperties": false, + "description": "Gateway address" + }, + "gatewayConnectionCreateRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "gateway-service", + "type": "ipsec", + "local_routes": [], + "remote_routes": [], + "tunnels": [] + } + ], + "properties": { + "uuid": { + "$ref": "#/components/schemas/gatewayUuid" + }, + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the connection" + }, + "type": { + "$ref": "#/components/schemas/gatewayConnectionType" + }, + "local_routes": { + "type": "array", + "examples": [ + [ + { + "name": "upcloud-example-route", + "type": "static", + "static_network": "10.0.0.0/24" + } + ] + ], + "items": { + "$ref": "#/components/schemas/gatewayConnectionRouteRequest" + }, + "description": "Connection local routes" + }, + "remote_routes": { + "type": "array", + "examples": [ + [ + { + "name": "remote-example-route", + "type": "static", + "static_network": "10.0.1.0/24" + } + ] + ], + "items": { + "$ref": "#/components/schemas/gatewayConnectionRouteRequest" + }, + "description": "Connection remote routes" + }, + "tunnels": { + "type": "array", + "examples": [ + [ + { + "name": "example-tunnel-1", + "local_address": { + "name": "public-ip-1" + }, + "remote_address": { + "address": "100.10.0.111" + }, + "ipsec": { + "authentication": { + "authentication": "psk", + "psk": "{your PSK}" + } + }, + "tunnel_internal_ip": "169.254.17.1", + "internal_peer_ping_interval": 0 + } + ] + ], + "items": { + "$ref": "#/components/schemas/gatewayTunnelCreateRequest" + }, + "description": "Connection tunnels" + } + }, + "title": "Connection create request", + "required": [ + "name", + "type" + ], + "additionalProperties": false, + "description": "Network gateway VPN connection" + }, + "gatewayConnectionType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "ipsec" + ], + "title": "Connection type", + "enum": [ + "ipsec" + ], + "description": "Connection type" + }, + "gatewayConnectionRouteRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "gateway-service", + "type": "static", + "static_network": "10.0.0.0/24" + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Route name" + }, + "type": { + "$ref": "#/components/schemas/gatewayConnectionRouteType" + }, + "static_network": { + "type": "string", + "examples": [ + "10.0.0.0/24" + ], + "description": "Static network subnet" + } + }, + "title": "Connection route request", + "required": [ + "name", + "type", + "static_network" + ], + "additionalProperties": false, + "description": "Network gateway VPN connection route" + }, + "gatewayConnectionRouteType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "static" + ], + "title": "Connection route type", + "enum": [ + "static" + ], + "description": "Connection route type" + }, + "gatewayTunnelCreateRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "gateway-service", + "local_address": { + "name": "gateway-service" + }, + "remote_address": { + "address": "203.0.113.10" + }, + "ipsec": { + "authentication": { + "type": "psk", + "psk": "MySecretPsk123" + }, + "phase1_algorithms": [], + "phase2_algorithms": [], + "phase1_integrity_algorithms": [], + "phase2_integrity_algorithms": [], + "phase1_dh_group_numbers": [], + "phase2_dh_group_numbers": [] + }, + "tunnel_internal_ip": "10.0.0.1", + "internal_peer_ping_interval": 0 + } + ], + "properties": { + "uuid": { + "$ref": "#/components/schemas/gatewayUuid" + }, + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the tunnel" + }, + "local_address": { + "type": "object", + "properties": { + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the local peer address" + } + }, + "description": "Local peer address" + }, + "remote_address": { + "type": "object", + "properties": { + "address": { + "type": "string", + "examples": [ + "203.0.113.10" + ], + "maxLength": 64, + "minLength": 1, + "description": "Remote peer address" + } + }, + "description": "Remote peer address" + }, + "ipsec": { + "type": "object", + "properties": { + "authentication": { + "type": "object", + "properties": { + "authentication": { + "$ref": "#/components/schemas/gatewayIpsecAuthenticationType" + }, + "psk": { + "type": "string", + "examples": [ + "MySecretPsk123" + ], + "maxLength": 64, + "minLength": 8, + "pattern": "^[a-zA-Z1-9_.][a-zA-Z0-9_.]+$", + "description": "IPsec PSK" + } + }, + "required": [ + "authentication", + "psk" + ], + "additionalProperties": false, + "description": "IPsec authentication configuration" + }, + "phase1_algorithms": { + "type": "array", + "examples": [ + [ + "aes128", + "aes256", + "aes128gcm128", + "aes256gcm128" + ] + ], + "items": { + "$ref": "#/components/schemas/gatewaySupportedProposalAlgorithms" + }, + "uniqueItems": true, + "description": "Phase 1 proposal algorithms", + "default": [ + "aes128", + "aes256", + "aes128gcm128", + "aes256gcm128" + ] + }, + "phase2_algorithms": { + "type": "array", + "examples": [ + [ + "aes128", + "aes256", + "aes128gcm128", + "aes256gcm128" + ] + ], + "items": { + "$ref": "#/components/schemas/gatewaySupportedProposalAlgorithms" + }, + "uniqueItems": true, + "description": "Phase 2 security association algorithms", + "default": [ + "aes128", + "aes256", + "aes128gcm128", + "aes256gcm128" + ] + }, + "phase1_integrity_algorithms": { + "type": "array", + "examples": [ + [ + "sha256", + "sha384", + "sha512" + ] + ], + "items": { + "$ref": "#/components/schemas/gatewaySupportedIntegrityAlgorithms" + }, + "uniqueItems": true, + "description": "Phase 1 integrity algorithms", + "default": [ + "sha256", + "sha384", + "sha512" + ] + }, + "phase2_integrity_algorithms": { + "type": "array", + "examples": [ + [ + "sha256", + "sha384", + "sha512" + ] + ], + "items": { + "$ref": "#/components/schemas/gatewaySupportedIntegrityAlgorithms" + }, + "uniqueItems": true, + "description": "Phase 2 integrity algorithms", + "default": [ + "sha256", + "sha384", + "sha512" + ] + }, + "phase1_dh_group_numbers": { + "type": "array", + "examples": [ + [ + 16, + 18, + 19 + ] + ], + "items": { + "$ref": "#/components/schemas/gatewayDiffieHellmanGroupNumber" + }, + "uniqueItems": true, + "description": "Phase 1 Diffie-Hellman group numbers", + "default": [ + 14, + 16, + 18, + 19, + 20, + 21 + ] + }, + "phase2_dh_group_numbers": { + "type": "array", + "examples": [ + [ + 14, + 16, + 18, + 19 + ] + ], + "items": { + "$ref": "#/components/schemas/gatewayDiffieHellmanGroupNumber" + }, + "uniqueItems": true, + "description": "Phase 2 Diffie-Hellman group numbers", + "default": [ + 14, + 16, + 18, + 19, + 20, + 21 + ] + }, + "ike_lifetime": { + "type": "integer", + "examples": [ + 86400 + ], + "maximum": 2147483647, + "minimum": 0, + "format": "int32", + "description": "Maximum IKE SA lifetime in seconds", + "default": 86400 + }, + "rekey_time": { + "type": "integer", + "examples": [ + 14400 + ], + "maximum": 2147483647, + "minimum": 0, + "format": "int32", + "description": "IKE SA rekey time in seconds", + "default": 14400 + }, + "child_rekey_time": { + "type": "integer", + "examples": [ + 1440 + ], + "maximum": 2147483647, + "minimum": 0, + "format": "int32", + "description": "IKE child SA rekey time in seconds", + "default": 1440 + }, + "dpd_delay": { + "type": "integer", + "examples": [ + 30 + ], + "maximum": 2147483647, + "minimum": 0, + "format": "int32", + "description": "Delay before sending Dead Peer Detection packets if no traffic is detected, in seconds", + "default": 30 + }, + "dpd_timeout": { + "type": "integer", + "examples": [ + 120 + ], + "maximum": 2147483647, + "minimum": 0, + "format": "int32", + "description": "Timeout period for DPD reply before considering the peer to be dead, in seconds", + "default": 120 + } + }, + "required": [ + "authentication" + ], + "additionalProperties": false, + "description": "IPsec configuration" + }, + "tunnel_internal_ip": { + "type": "string", + "examples": [ + "169.254.17.1", + "" + ], + "maxLength": 64, + "description": "Tunnel internal IP address, \"\" if disabled", + "default": "" + }, + "internal_peer_ping_interval": { + "type": "integer", + "examples": [ + 0 + ], + "format": "int64", + "description": "Internal peer ping interval in seconds, or zero if disabled", + "default": 0 + } + }, + "title": "Tunnel create request", + "required": [ + "name", + "ipsec", + "local_address", + "remote_address" + ], + "additionalProperties": false, + "description": "Network gateway VPN connection tunnel" + }, + "gatewayIpsecAuthenticationType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "psk" + ], + "title": "IPsec authentication type", + "enum": [ + "psk" + ], + "description": "IPsec authentication type" + }, + "gatewaySupportedProposalAlgorithms": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "aes128gcm16" + ], + "title": "Supported proposal algorithms", + "enum": [ + "aes128gcm16", + "aes128gcm128", + "aes192gcm16", + "aes192gcm128", + "aes256gcm16", + "aes256gcm128", + "aes128", + "aes192", + "aes256" + ], + "description": "List of supported IPsec proposal algorithms" + }, + "gatewaySupportedIntegrityAlgorithms": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "sha1" + ], + "title": "Supported integrity algorithms", + "enum": [ + "aes128gmac", + "aes256gmac", + "sha1", + "sha256", + "sha384", + "sha512" + ], + "description": "List of supported IPsec integrity algorithms" + }, + "gatewayDiffieHellmanGroupNumber": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "examples": [ + 2, + 5, + 14 + ], + "title": "Diffie-Hellman group number", + "format": "int64", + "enum": [ + 2, + 5, + 14, + 15, + 16, + 18, + 19, + 20, + 21, + 24 + ], + "description": "Diffie-Hellman group number" + }, + "gatewayLabelCreateRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "environment", + "value": "production" + } + ], + "properties": { + "key": { + "$ref": "#/components/schemas/gatewayLabelKey" + }, + "value": { + "$ref": "#/components/schemas/gatewayLabelValue" + } + }, + "title": "Label create request", + "required": [ + "key", + "value" + ], + "additionalProperties": false, + "description": "Gateway label" + }, + "gatewayLabelValue": { + "type": "string", + "examples": [ + "production", + "backend", + "web-app", + "backup", + "engineering" + ], + "title": "Label value", + "maxLength": 255, + "pattern": "\\A[\\p{L}\\p{N}\\p{P}\\p{S}\\p{M}\\p{Z}]*\\z", + "description": "The value of a label.", + "nullable": true + }, + "gatewayServiceReplaceRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "gateway-service", + "plan": "development-gwaas-1c2g", + "configured_status": "started", + "labels": [], + "automatic_tunnel_internal_ip_allocation": true + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the service" + }, + "plan": { + "type": "string", + "examples": [ + "development-gwaas-1c2g" + ], + "description": "Plan" + }, + "configured_status": { + "$ref": "#/components/schemas/gatewayServiceConfiguredStatus" + }, + "connections": { + "description": "Service connections" + }, + "labels": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayLabelCreateRequest" + }, + "maxItems": 255, + "description": "Labels" + }, + "automatic_tunnel_internal_ip_allocation": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Allocate and use tunnel internal IPs automatically" + } + }, + "title": "Service replace request", + "required": [ + "name", + "configured_status" + ], + "additionalProperties": false, + "description": "Request to replace a gateway service" + }, + "gatewayServiceModifyRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "gateway-service", + "features": [], + "plan": "development-gwaas-1c2g", + "configured_status": "started", + "connections": [], + "labels": [], + "automatic_tunnel_internal_ip_allocation": true + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the service" + }, + "features": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayServiceFeatures" + }, + "minItems": 1, + "description": "Active features" + }, + "plan": { + "type": "string", + "examples": [ + "development-gwaas-1c2g" + ], + "description": "Plan" + }, + "configured_status": { + "$ref": "#/components/schemas/gatewayServiceConfiguredStatus" + }, + "connections": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayConnectionModifyRequest" + }, + "description": "Service connections" + }, + "labels": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayLabelCreateRequest" + }, + "maxItems": 255, + "description": "Labels" + }, + "automatic_tunnel_internal_ip_allocation": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Allocate and use tunnel internal IPs automatically" + } + }, + "title": "Service modify request", + "additionalProperties": false, + "description": "Request to modify a gateway service" + }, + "gatewayConnectionModifyRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "uuid": "01234567-89ab-cdef-0123-456789abcdef", + "name": "gateway-service", + "type": "ipsec", + "local_routes": [ + { + "name": "modified-routes", + "type": "static", + "static_network": "10.0.22.0/24" + } + ] + } + ], + "properties": { + "uuid": { + "$ref": "#/components/schemas/gatewayUuid" + }, + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the connection" + }, + "type": { + "$ref": "#/components/schemas/gatewayConnectionType" + }, + "local_routes": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayConnectionRouteRequest" + }, + "description": "Connection local routes" + }, + "remote_routes": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayConnectionRouteRequest" + }, + "description": "Connection remote routes" + }, + "tunnels": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayTunnelModifyRequest" + }, + "description": "Tunnels" + } + }, + "title": "Connection modify request", + "additionalProperties": false, + "description": "Network gateway VPN connection" + }, + "gatewayTunnelModifyRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "uuid": "01234567-89ab-cdef-0123-456789abcdef", + "name": "gateway-service", + "local_address": { + "name": "gateway-service" + }, + "remote_address": { + "address": "203.0.113.10" + }, + "ipsec": { + "authentication": { + "type": "psk", + "psk": "MySecretPsk123" + }, + "phase1_algorithms": [], + "phase2_algorithms": [], + "phase1_integrity_algorithms": [], + "phase2_integrity_algorithms": [], + "phase1_dh_group_numbers": [], + "phase2_dh_group_numbers": [] + }, + "tunnel_internal_ip": "10.0.0.1", + "internal_peer_ping_interval": 0 + } + ], + "properties": { + "uuid": { + "$ref": "#/components/schemas/gatewayUuid" + }, + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the tunnel" + }, + "local_address": { + "type": "object", + "properties": { + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the local peer address" + } + }, + "description": "Local peer address" + }, + "remote_address": { + "type": "object", + "properties": { + "address": { + "type": "string", + "examples": [ + "203.0.113.10" + ], + "maxLength": 64, + "minLength": 1, + "description": "Remote peer address" + } + }, + "description": "Remote peer address" + }, + "ipsec": { + "type": "object", + "properties": { + "authentication": { + "type": "object", + "properties": { + "authentication": { + "$ref": "#/components/schemas/gatewayIpsecAuthenticationType" + }, + "psk": { + "type": "string", + "examples": [ + "MySecretPsk123" + ], + "maxLength": 64, + "minLength": 8, + "pattern": "^[a-zA-Z1-9_.][a-zA-Z0-9_.]+$", + "description": "IPsec PSK" + } + }, + "required": [ + "authentication" + ], + "additionalProperties": false, + "description": "IPsec authentication configuration" + }, + "phase1_algorithms": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewaySupportedProposalAlgorithms" + }, + "uniqueItems": true, + "description": "Phase 1 algorithms" + }, + "phase2_algorithms": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewaySupportedProposalAlgorithms" + }, + "uniqueItems": true, + "description": "Phase 2 algorithms" + }, + "phase1_integrity_algorithms": { + "type": "array", + "examples": [ + [ + "sha256", + "sha384", + "sha512" + ] + ], + "items": { + "$ref": "#/components/schemas/gatewaySupportedIntegrityAlgorithms" + }, + "uniqueItems": true, + "description": "Phase 1 integrity algorithms", + "default": [ + "sha256", + "sha384", + "sha512" + ] + }, + "phase2_integrity_algorithms": { + "type": "array", + "examples": [ + [ + "sha256", + "sha384", + "sha512" + ] + ], + "items": { + "$ref": "#/components/schemas/gatewaySupportedIntegrityAlgorithms" + }, + "uniqueItems": true, + "description": "Phase 2 integrity algorithms", + "default": [ + "sha256", + "sha384", + "sha512" + ] + }, + "phase1_dh_group_numbers": { + "type": "array", + "examples": [ + [ + 16, + 18, + 19 + ] + ], + "items": { + "$ref": "#/components/schemas/gatewayDiffieHellmanGroupNumber" + }, + "uniqueItems": true, + "description": "Phase 1 Diffie-Hellman group numbers", + "default": [ + 14, + 16, + 18, + 19, + 20, + 21 + ] + }, + "phase2_dh_group_numbers": { + "type": "array", + "examples": [ + [ + 14, + 16, + 18, + 19 + ] + ], + "items": { + "$ref": "#/components/schemas/gatewayDiffieHellmanGroupNumber" + }, + "uniqueItems": true, + "description": "Phase 2 Diffie-Hellman group numbers", + "default": [ + 14, + 16, + 18, + 19, + 20, + 21 + ] + }, + "ike_lifetime": { + "type": "integer", + "examples": [ + 86400 + ], + "maximum": 2147483647, + "minimum": 0, + "format": "int32", + "description": "Maximum IKE SA lifetime in seconds", + "default": 86400 + }, + "rekey_time": { + "type": "integer", + "examples": [ + 14400 + ], + "maximum": 2147483647, + "minimum": 0, + "format": "int32", + "description": "IKE SA rekey time in seconds", + "default": 14400 + }, + "child_rekey_time": { + "type": "integer", + "examples": [ + 1440 + ], + "maximum": 2147483647, + "minimum": 0, + "format": "int32", + "description": "IKE child SA rekey time in seconds", + "default": 1440 + }, + "dpd_delay": { + "type": "integer", + "examples": [ + 30 + ], + "maximum": 2147483647, + "minimum": 0, + "format": "int32", + "description": "Delay before sending Dead Peer Detection packets if no traffic is detected, in seconds", + "default": 30 + }, + "dpd_timeout": { + "type": "integer", + "examples": [ + 120 + ], + "maximum": 2147483647, + "minimum": 0, + "format": "int32", + "description": "Timeout period for DPD reply before considering the peer to be dead, in seconds", + "default": 120 + } + }, + "required": [ + "authentication" + ], + "additionalProperties": false, + "description": "IPsec configuration" + }, + "tunnel_internal_ip": { + "type": "string", + "examples": [ + "10.0.0.1", + "" + ], + "maxLength": 64, + "description": "Tunnel internal IP address, \"\" if disabled" + }, + "internal_peer_ping_interval": { + "type": "integer", + "examples": [ + 0 + ], + "format": "int64", + "description": "Internal peer ping interval in seconds, or zero if disabled" + } + }, + "title": "Tunnel modify request", + "additionalProperties": false, + "description": "Request to modify a VPN tunnel" + }, + "gatewayLabelModifyRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "environment", + "value": "production" + } + ], + "properties": { + "key": { + "$ref": "#/components/schemas/gatewayLabelKey" + }, + "value": { + "$ref": "#/components/schemas/gatewayLabelValue" + } + }, + "title": "Label modify request", + "additionalProperties": false, + "description": "Gateway label" + }, + "gatewayAddressModifyRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "address": "203.0.113.10" + } + ], + "properties": { + "address": { + "type": "string", + "examples": [ + "203.0.113.10" + ], + "format": "ipv4", + "description": "Floating IP address to assign to the service address." + } + }, + "title": "Address modify request", + "required": [ + "address" + ], + "additionalProperties": false, + "description": "Gateway service address modify request" + }, + "gatewayServiceLogSessionCreateRequest": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "session_type": "vpn" + } + ], + "properties": { + "session_type": { + "$ref": "#/components/schemas/gatewayServiceLogSessionTypes" + } + }, + "title": "Service log session create request", + "required": [ + "session_type" + ], + "additionalProperties": false, + "description": "Request to create a new log session for a service." + }, + "gatewayServiceLogSessionTypes": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "vpn" + ], + "title": "Service log session types", + "enum": [ + "vpn" + ], + "description": "Service log session types" + }, + "gatewayPlanListResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayPlanDetailsResponse" + }, + "title": "Plan list response", + "description": "Response schema for a list of gateway plans." + }, + "gatewayPlanDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "gateway-service", + "server_number": 4, + "per_gateway_max_connections": 5005000, + "supported_features": [], + "vpn_tunnel_amount": 50, + "per_gateway_bandwidth_mbps": 5005, + "per_gateway_maximum_vpn_bandwidth_mbps": 5005 + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the plan" + }, + "server_number": { + "type": "integer", + "examples": [ + 4 + ], + "maximum": 8, + "minimum": 1, + "format": "int64", + "description": "Number of nodes" + }, + "per_gateway_max_connections": { + "type": "integer", + "examples": [ + 5005000 + ], + "maximum": 10000000, + "minimum": 10000, + "format": "int64", + "description": "Per gateway (agent node server) maximum conntrack connections" + }, + "supported_features": { + "type": "array", + "examples": [ + [ + "vpn" + ] + ], + "items": { + "$ref": "#/components/schemas/gatewayServiceFeatures" + }, + "minItems": 1 + }, + "vpn_tunnel_amount": { + "type": "integer", + "examples": [ + 50 + ], + "maximum": 100, + "minimum": 0, + "format": "int64", + "description": "Number of VPN tunnels this plan allows." + }, + "per_gateway_bandwidth_mbps": { + "type": "integer", + "examples": [ + 5005 + ], + "maximum": 10000, + "minimum": 10, + "format": "int64", + "description": "Per gateway (agent node server) bandwidth in megabits per second." + }, + "per_gateway_maximum_vpn_bandwidth_mbps": { + "type": "integer", + "examples": [ + 5005 + ], + "maximum": 10000, + "minimum": 10, + "format": "int64", + "description": "Per gateway (agent node server) maximum vpn bandwidth in megabits per second." + } + }, + "title": "Plan details response", + "description": "Response schema for gateway plan details." + }, + "gatewayErrorResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "type": "example", + "title": "Validation error.", + "correlation_id": "01K1K2TKEASWRJ6VFP9ZV5P2H4", + "status": 400, + "invalid_params": [] + } + ], + "properties": { + "type": { + "type": "string", + "examples": [ + "example" + ], + "description": "Error code string." + }, + "title": { + "type": "string", + "examples": [ + "Validation error.", + "The resource you requested does not exist.", + "Your request could not be fulfilled due to a technical issue." + ], + "description": "Short description of the error." + }, + "correlation_id": { + "type": "string", + "examples": [ + "01K1K2TKEASWRJ6VFP9ZV5P2H4" + ], + "description": "Unique identifier for the request, useful for debugging." + }, + "status": { + "type": "integer", + "examples": [ + 400, + 404, + 402, + 500 + ], + "format": "int32", + "description": "HTTP status code associated with the error." + }, + "invalid_params": { + "type": "array", + "examples": [ + [] + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "zone", + "networks.0.ip_address" + ], + "description": "Path to the field with invalid parameter." + }, + "reason": { + "type": "string", + "examples": [ + "Zone is not valid." + ], + "description": "Human-readable error message." + } + }, + "title": "InvalidParameters", + "required": [ + "name", + "reason" + ], + "description": "List of invalid parameters in the request." + } + }, + "title": "Error response", + "required": [ + "type", + "title", + "correlation_id", + "status" + ], + "additionalProperties": false, + "description": "Schema for error responses from the API." + }, + "gatewayAddressDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "gateway-service", + "address": "203.0.113.10", + "provisioned_by": "service" + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the address" + }, + "address": { + "type": "string", + "examples": [ + "203.0.113.10" + ], + "format": "ip-address", + "description": "VPN address" + }, + "provisioned_by": { + "type": "string", + "examples": [ + "service", + "user" + ], + "description": "Provisioner of the address" + } + }, + "title": "Address details response", + "additionalProperties": false, + "description": "Response schema for gateway address details." + }, + "gatewayLabelDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "environment", + "value": "production" + } + ], + "properties": { + "key": { + "type": "string", + "examples": [ + "environment", + "team" + ], + "maxLength": 32, + "minLength": 2, + "pattern": "^[\\x20-\\x5E\\x60-\\x7E][\\x20-\\x7E]+$", + "description": "Key" + }, + "value": { + "type": "string", + "examples": [ + "production", + "dev-1" + ], + "maxLength": 255, + "pattern": "\\A[\\p{L}\\p{N}\\p{P}\\p{S}\\p{Z}]*\\z", + "description": "Value" + } + }, + "title": "Label details response", + "required": [ + "key", + "value" + ], + "additionalProperties": false, + "description": "Gateway label" + }, + "gatewayIpsecMetricsDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "ike_sas": [] + } + ], + "properties": { + "ike_sas": { + "type": [ + "array", + "null" + ], + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayIpsecIkeSaMetricsDetailsResponse" + }, + "description": "List of IKE SAs" + } + }, + "title": "IPsec metrics details response", + "description": "Response schema for IPsec IKE SA metrics details." + }, + "gatewayIpsecIkeSaMetricsDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "gateway-service", + "tunnel_id": 0, + "unique_id": "gateway-service", + "version": 0, + "operational_state": "idle", + "internal_state": "uninitialized", + "initator": true, + "established": 0, + "rekey_time": 0, + "reauth_time": 0, + "child_sas": [], + "local_host": "203.0.113.10", + "remote_host": "203.0.113.10", + "local_id": "203.0.113.10", + "remote_id": "203.0.113.10", + "heuristic_state": "none", + "created_at": "2025-03-26T12:34:56Z", + "updated_at": "2025-03-26T12:34:56Z" + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the gateway" + }, + "tunnel_id": { + "type": "integer", + "examples": [ + 0 + ], + "format": "int64", + "description": "ID of the tunnel" + }, + "unique_id": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Unique ID of the IKE SA" + }, + "version": { + "type": "integer", + "examples": [ + 0 + ], + "format": "int64", + "description": "Version of the IKE SA" + }, + "operational_state": { + "type": "string", + "examples": [ + "idle" + ], + "enum": [ + "idle", + "connecting", + "established", + "destroying", + "unknown" + ], + "description": "Operational state of the IKE SA" + }, + "internal_state": { + "type": "string", + "examples": [ + "uninitialized" + ], + "enum": [ + "uninitialized", + "created", + "connecting", + "established", + "passive", + "rekeying", + "rekeyed", + "deleting", + "destroying", + "unavailable", + "unknown" + ], + "description": "Internal state of the IKE SA" + }, + "initator": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Whether the local gateway is the initiator of the IKE SA" + }, + "established": { + "type": "integer", + "examples": [ + 0 + ], + "format": "int64" + }, + "rekey_time": { + "type": "integer", + "examples": [ + 0 + ], + "format": "int64" + }, + "reauth_time": { + "type": "integer", + "examples": [ + 0 + ], + "format": "int64" + }, + "child_sas": { + "type": "array", + "examples": [ + [] + ], + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the child SA" + }, + "tunnel_id": { + "type": "integer", + "format": "int64" + }, + "unique_id": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Unique ID of the child SA" + }, + "state": { + "type": "string", + "enum": [ + "created", + "routed", + "installing", + "installed", + "updating", + "rekeyed", + "rekeying", + "retrying", + "deleting", + "deleted", + "destroying", + "unavailable", + "unknown" + ], + "description": "Operational state of the child SA" + }, + "spi_in": { + "type": "string" + }, + "spi_out": { + "type": "string" + }, + "bytes_in": { + "type": "integer", + "format": "int64" + }, + "bytes_out": { + "type": "integer", + "format": "int64" + }, + "packets_in": { + "type": "integer", + "format": "int64" + }, + "packets_out": { + "type": "integer", + "format": "int64" + }, + "rekey_time": { + "type": "integer", + "format": "int64" + }, + "life_time": { + "type": "integer", + "format": "int64" + }, + "install_time": { + "type": "integer", + "format": "int64" + }, + "local_traffic_selector": { + "type": "array", + "items": { + "type": "string" + } + }, + "remote_traffic_selector": { + "type": "array", + "items": { + "type": "string" + } + }, + "created_at": { + "type": "string", + "examples": [ + "2025-03-26T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the child SA was created." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-03-26T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the child SA was last updated." + } + } + } + }, + "local_host": { + "type": "string", + "examples": [ + "203.0.113.10" + ], + "format": "ip-address", + "description": "Local host IP address" + }, + "remote_host": { + "type": "string", + "examples": [ + "203.0.113.10" + ], + "format": "ip-address", + "description": "Remote host IP address" + }, + "local_id": { + "type": "string", + "examples": [ + "203.0.113.10" + ], + "format": "ip-address", + "description": "Local IKE identity" + }, + "remote_id": { + "type": "string", + "examples": [ + "203.0.113.10" + ], + "format": "ip-address", + "description": "Remote IKE identity" + }, + "heuristic_state": { + "type": "object", + "properties": { + "tunnel_up": { + "type": "boolean", + "examples": [ + true, + false + ] + }, + "tunnel_healthy": { + "type": "boolean", + "examples": [ + true, + false + ] + }, + "last_down_message": { + "type": "string", + "examples": [ + "IKE SA is down due to network issues" + ] + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-03-26T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the heuristic state was last updated." + }, + "last_down_message_updated_at": { + "type": "string", + "examples": [ + "2025-03-26T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the last down message was updated." + }, + "up_events": { + "type": "integer", + "examples": [ + 0 + ], + "format": "int64", + "description": "Number of times the IKE SA has transitioned to up state" + }, + "down_events": { + "type": "integer", + "examples": [ + 0 + ], + "format": "int64", + "description": "Number of times the IKE SA has transitioned to down state" + }, + "log_message_bad_events": { + "type": "integer", + "examples": [ + 0 + ], + "format": "int64", + "description": "Number of times the IKE SA has logged a bad message" + } + }, + "description": "Heuristic state of the IKE SA" + }, + "created_at": { + "type": "string", + "examples": [ + "2025-03-26T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the IKE SA was created." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-03-26T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the IKE SA was last updated." + } + }, + "title": "IPsec IKE SA metrics details response", + "description": "Response schema for IPsec IKE SA metrics details." + }, + "gatewayServiceListResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayServiceDetailsResponse" + }, + "title": "Service list response", + "description": "Response schema for a list of gateway services." + }, + "gatewayServiceDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "uuid": "01234567-89ab-cdef-0123-456789abcdef", + "name": "gateway-service", + "zone": "fi-hel1", + "plan": "development-gwaas-1c2g", + "features": [], + "addresses": [], + "connections": [], + "configured_status": "started", + "automatic_tunnel_internal_ip_allocation": true, + "labels": [], + "created_at": "2025-03-26T12:34:56Z", + "updated_at": "2025-03-26T12:34:56Z" + } + ], + "properties": { + "uuid": { + "$ref": "#/components/schemas/gatewayUuid" + }, + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the service" + }, + "zone": { + "type": "string", + "examples": [ + "fi-hel1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Zone of the service" + }, + "plan": { + "type": "string", + "examples": [ + "development-gwaas-1c2g" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Plan" + }, + "features": { + "type": "array", + "examples": [ + [ + "vpn" + ] + ], + "items": { + "$ref": "#/components/schemas/gatewayServiceFeatures" + }, + "minItems": 1, + "description": "Active features" + }, + "routers": { + "$ref": "#/components/schemas/gatewayRouterDetailsResponse" + }, + "addresses": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayAddressDetailsResponse" + } + }, + "connections": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayConnectionDetailsResponse" + } + }, + "configured_status": { + "$ref": "#/components/schemas/gatewayServiceConfiguredStatus" + }, + "operational_state": { + "$ref": "#/components/schemas/gatewayServiceOperationalState" + }, + "automatic_tunnel_internal_ip_allocation": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Allocate and use tunnel internal IPs automatically" + }, + "labels": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayLabelDetailsResponse" + }, + "maxItems": 255, + "description": "Labels" + }, + "created_at": { + "type": "string", + "examples": [ + "2025-03-26T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the service was created." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-03-26T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the service was last updated." + } + }, + "title": "Service details response", + "description": "Gateway service" + }, + "gatewayRouterDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "uuid": "01234567-89ab-cdef-0123-456789abcdef", + "created_at": "2025-03-26T12:34:56Z", + "updated_at": "2025-03-26T12:34:56Z" + } + ], + "properties": { + "uuid": { + "type": "string", + "examples": [ + "01234567-89ab-cdef-0123-456789abcdef" + ], + "format": "uuid", + "description": "Router UUID" + }, + "created_at": { + "type": "string", + "examples": [ + "2025-03-26T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the router was created." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-03-26T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the router was last updated." + } + }, + "title": "Router details response", + "description": "Response schema for gateway router details." + }, + "gatewayConnectionDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "uuid": "01234567-89ab-cdef-0123-456789abcdef", + "name": "gateway-service", + "type": "ipsec", + "local_routes": [], + "remote_routes": [], + "tunnels": [], + "created_at": "2025-03-26T12:34:56Z", + "updated_at": "2025-03-26T12:34:56Z" + } + ], + "properties": { + "uuid": { + "$ref": "#/components/schemas/gatewayUuid" + }, + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the connection" + }, + "type": { + "$ref": "#/components/schemas/gatewayConnectionType" + }, + "local_routes": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayConnectionRouteDetailsResponse" + }, + "description": "Local routes for the connection" + }, + "remote_routes": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayConnectionRouteDetailsResponse" + }, + "description": "Remote routes for the connection" + }, + "tunnels": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayTunnelDetailsResponse" + } + }, + "created_at": { + "type": "string", + "examples": [ + "2025-03-26T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the connection was created." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-03-26T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the connection was last updated." + } + }, + "title": "Connection details response", + "description": "Response schema for gateway connection details." + }, + "gatewayConnectionRouteDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "gateway-service", + "type": "static", + "static_network": "10.0.0.0/24" + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the connection" + }, + "type": { + "$ref": "#/components/schemas/gatewayConnectionRouteType" + }, + "static_network": { + "type": "string", + "examples": [ + "10.0.0.0/24" + ], + "format": "ip-network", + "description": "Static network for the connection route" + } + }, + "title": "Connection route details response", + "description": "Response schema for gateway connection route details." + }, + "gatewayTunnelDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "uuid": "01234567-89ab-cdef-0123-456789abcdef", + "name": "gateway-service", + "internal_peer_ping_interval": 0, + "operational_state": "established", + "created_at": "2025-03-26T12:34:56Z", + "updated_at": "2025-03-26T12:34:56Z", + "tunnel_up": true, + "tunnel_healthy": true + } + ], + "properties": { + "uuid": { + "$ref": "#/components/schemas/gatewayUuid" + }, + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the tunnel" + }, + "local_address": { + "$ref": "#/components/schemas/gatewayLocalPeerAddressDetailsResponse" + }, + "remote_address": { + "$ref": "#/components/schemas/gatewayRemotePeerAddressDetailsResponse" + }, + "ipsec": { + "$ref": "#/components/schemas/gatewayIpsecDetailsResponse" + }, + "tunnel_internal_ip": { + "$ref": "#/components/schemas/gatewayTunnelInternalIpDetailsResponse" + }, + "internal_peer_ping_interval": { + "type": "integer", + "examples": [ + 0 + ], + "minimum": 0, + "format": "int64", + "description": "Internal peer ping interval in seconds" + }, + "operational_state": { + "$ref": "#/components/schemas/gatewayTunnelOperationalState" + }, + "created_at": { + "type": "string", + "examples": [ + "2025-03-26T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the tunnel was created." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-03-26T12:34:56Z" + ], + "format": "date-time", + "description": "Timestamp of when the tunnel was last updated." + }, + "tunnel_up": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Indicates whether the tunnel is up" + }, + "tunnel_healthy": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Indicates whether the tunnel is healthy" + } + }, + "title": "Tunnel details response", + "additionalProperties": false, + "description": "Response schema for gateway tunnel details." + }, + "gatewayLocalPeerAddressDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "gateway-service" + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "gateway-service", + "vpn-tunnel-1" + ], + "maxLength": 64, + "minLength": 1, + "description": "Name of the local peer" + } + }, + "title": "Local peer address details response", + "description": "Response schema for local peer address details." + }, + "gatewayRemotePeerAddressDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "address": "203.0.113.10" + } + ], + "properties": { + "address": { + "type": "string", + "examples": [ + "203.0.113.10" + ], + "format": "ip-address", + "description": "Remote peer address" + } + }, + "title": "Remote peer address details response", + "description": "Response schema for remote peer address details." + }, + "gatewayIpsecDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "ike_lifetime": 30, + "rekey_time": 30, + "child_rekey_time": 60, + "dpd_delay": 40, + "dpd_timeout": 20, + "authentication": { + "authentication": "psk", + "psk": "{your PSK}" + } + } + ], + "properties": { + "authentication": { + "$ref": "#/components/schemas/gatewayAuthenticationDetailsResponse" + }, + "phase1_algorithms": { + "type": "array", + "examples": [ + [ + "aes128", + "aes256", + "aes128gcm128", + "aes256gcm128" + ] + ], + "items": { + "$ref": "#/components/schemas/gatewaySupportedProposalAlgorithms" + }, + "uniqueItems": true, + "description": "Phase 1 proposal algorithms", + "default": [ + "aes128", + "aes256", + "aes128gcm128", + "aes256gcm128" + ] + }, + "phase2_algorithms": { + "type": "array", + "examples": [ + [ + "aes128", + "aes256", + "aes128gcm128", + "aes256gcm128" + ] + ], + "items": { + "$ref": "#/components/schemas/gatewaySupportedProposalAlgorithms" + }, + "uniqueItems": true, + "description": "Phase 2 security association algorithms", + "default": [ + "aes128", + "aes256", + "aes128gcm128", + "aes256gcm128" + ] + }, + "phase1_integrity_algorithms": { + "type": "array", + "examples": [ + [ + "sha256", + "sha384", + "sha512" + ] + ], + "items": { + "$ref": "#/components/schemas/gatewaySupportedIntegrityAlgorithms" + }, + "uniqueItems": true, + "description": "Phase 1 integrity algorithms", + "default": [ + "sha256", + "sha384", + "sha512" + ] + }, + "phase2_integrity_algorithms": { + "type": "array", + "examples": [ + [ + "sha256", + "sha384", + "sha512" + ] + ], + "items": { + "$ref": "#/components/schemas/gatewaySupportedIntegrityAlgorithms" + }, + "uniqueItems": true, + "description": "Phase 2 integrity algorithms", + "default": [ + "sha256", + "sha384", + "sha512" + ] + }, + "ike_lifetime": { + "type": "integer", + "examples": [ + 86400 + ], + "maximum": 2147483647, + "minimum": 0, + "format": "int32", + "description": "Maximum IKE SA lifetime in seconds", + "default": 86400 + }, + "rekey_time": { + "type": "integer", + "examples": [ + 14400 + ], + "maximum": 2147483647, + "minimum": 0, + "format": "int32", + "description": "IKE SA rekey time in seconds", + "default": 14400 + }, + "child_rekey_time": { + "type": "integer", + "examples": [ + 1440 + ], + "maximum": 2147483647, + "minimum": 0, + "format": "int32", + "description": "IKE child SA rekey time in seconds", + "default": 1440 + }, + "dpd_delay": { + "type": "integer", + "examples": [ + 30 + ], + "maximum": 2147483647, + "minimum": 0, + "format": "int32", + "description": "Delay before sending Dead Peer Detection packets if no traffic is detected, in seconds", + "default": 30 + }, + "dpd_timeout": { + "type": "integer", + "examples": [ + 120 + ], + "maximum": 2147483647, + "minimum": 0, + "format": "int32", + "description": "Timeout period for DPD reply before considering the peer to be dead, in seconds", + "default": 120 + }, + "phase1_dh_group_numbers": { + "type": "array", + "examples": [ + [ + 16, + 18, + 19 + ] + ], + "items": { + "$ref": "#/components/schemas/gatewayDiffieHellmanGroupNumber" + }, + "uniqueItems": true, + "description": "Phase 1 Diffie-Hellman group numbers", + "default": [ + 14, + 16, + 18, + 19, + 20, + 21 + ] + }, + "phase2_dh_group_numbers": { + "type": "array", + "examples": [ + [ + 14, + 16, + 18, + 19 + ] + ], + "items": { + "$ref": "#/components/schemas/gatewayDiffieHellmanGroupNumber" + }, + "uniqueItems": true, + "description": "Phase 2 Diffie-Hellman group numbers", + "default": [ + 14, + 16, + 18, + 19, + 20, + 21 + ] + } + }, + "title": "IPsec details response", + "description": "Response schema for IPsec configuration details." + }, + "gatewayAuthenticationDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "authentication": "psk" + } + ], + "properties": { + "authentication": { + "$ref": "#/components/schemas/gatewayIpsecAuthenticationType" + } + }, + "title": "Authentication details response", + "additionalProperties": false, + "description": "Response schema for authentication details." + }, + "gatewayTunnelInternalIpDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "hasParseError": true + } + ], + "properties": { + "ip": { + "$ref": "#/components/schemas/gatewayAddress" + }, + "hasParseError": { + "type": "boolean", + "examples": [ + true, + false + ], + "description": "Indicates if there is a parse error with the tunnel internal IP" + } + }, + "title": "Tunnel internal IP details response", + "description": "Response schema for gateway tunnel internal IP details." + }, + "gatewayAddress": { + "type": "object", + "examples": [ + { + "addr": 0 + } + ], + "properties": { + "addr": { + "type": "integer", + "examples": [ + 0 + ], + "format": "int64", + "description": "Address" + } + }, + "title": "Address" + }, + "gatewayTunnelOperationalState": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "idle" + ], + "title": "Tunnel operational state", + "enum": [ + "idle", + "connecting", + "established", + "destroying", + "unknown" + ], + "description": "Tunnel operational state" + }, + "gatewayConnectionListResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayConnectionDetailsResponse" + }, + "title": "Connection list response", + "description": "Response schema for a list of gateway connections." + }, + "gatewayTunnelListResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayTunnelDetailsResponse" + }, + "title": "Tunnel list response", + "description": "Response schema for a list of gateway tunnels." + }, + "gatewayServiceLabelListResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayLabelDetailsResponse" + }, + "title": "Service label list response", + "description": "Response schema for a list of service labels." + }, + "gatewayAddressListResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayAddressDetailsResponse" + }, + "title": "Address list response", + "description": "Response schema for a list of gateway addresses." + }, + "gatewayServiceMetricsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "gateways": [] + } + ], + "properties": { + "gateways": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/gatewayMetricsDetailsResponse" + } + }, + "ipsec_metrics": { + "$ref": "#/components/schemas/gatewayIpsecMetricsDetailsResponse" + } + }, + "title": "Service metrics response", + "description": "Response schema for service metrics." + }, + "gatewayServiceLogSessionCreateResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "sessions": [ + "vpn" + ] + } + ], + "properties": { + "sessions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/gatewayServiceLogSessionDetailsResponse" + }, + "description": "List of service sessions created." + } + }, + "title": "Service log session create response", + "required": [ + "sessions" + ], + "additionalProperties": false, + "description": "Response schema for service log session creation." + }, + "gatewayServiceLogSessionDetailsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "sessions": [ + { + "session_id": "01234567-89ab-cdef-0123-456789abcdef", + "token": "01234567-89ab-cdef-0123-456789abcdef" + } + ] + } + ], + "properties": { + "session_id": { + "$ref": "#/components/schemas/gatewayUuid" + }, + "token": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "title": "Service log session details response", + "required": [ + "session_id", + "token" + ], + "additionalProperties": false, + "description": "Response schema for details of a service log session." + }, + "loadBalancerLimitParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "examples": [ + 10, + 50, + 100 + ], + "title": "LimitParameter", + "maximum": 100, + "minimum": 0, + "format": "int32", + "description": "Number of entries to receive at most.", + "default": 10 + }, + "loadBalancerOffsetParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "examples": [ + 0, + 10, + 20 + ], + "title": "OffsetParameter", + "minimum": 0, + "format": "int32", + "description": "Offset for retrieved results.", + "default": 0 + }, + "loadBalancerSortServicesParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "-created_at", + "name", + "-uuid" + ], + "title": "SortServicesParameter", + "enum": [ + "created_at", + "-created_at", + "name", + "-name", + "uuid", + "-uuid" + ], + "description": "Sort services by field. Prefix with '-' for descending order." + }, + "loadBalancerLabelFilterParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + "env=staging" + ], + [ + "env" + ], + [ + "env=staging", + "region=us" + ] + ], + "items": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+(=[a-zA-Z0-9_-]*)?$" + }, + "title": "LabelFilterParameter", + "description": "Filter resources by label. Can be provided multiple times for multiple labels. Format: 'key=value' for exact match or 'key' for existence check." + }, + "loadBalancerServiceParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "01234567-89ab-cdef-0123-456789abcdef", + "fedcba98-7654-3210-fedc-ba9876543210" + ], + "title": "ServiceParameter", + "format": "uuid", + "description": "The UUID of the service." + }, + "loadBalancerFrontendParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "example-frontend-1", + "example-frontend-2" + ], + "title": "FrontendParameter", + "description": "The name of the frontend." + }, + "loadBalancerTlsConfigParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "example-tls-config-1", + "example-tls-config-2" + ], + "title": "TlsConfigParameter", + "description": "The name of the TLS configuration." + }, + "loadBalancerRuleParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "example-rule-1", + "example-rule-2" + ], + "title": "RuleParameter", + "description": "The name of the rule." + }, + "loadBalancerBackendParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "backend-infra", + "backend-customer-1" + ], + "title": "BackendParameter", + "description": "The name of the backend." + }, + "loadBalancerMemberParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "dev-member", + "qa-member" + ], + "title": "MemberParameter", + "description": "The name of the member." + }, + "loadBalancerNetworkParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "example-network-1", + "example-network-2" + ], + "title": "NetworkParameter", + "description": "The name of the network." + }, + "loadBalancerIpAddressParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "192.168.1.1", + "2001:db8::1" + ], + "title": "IpAddressParameter", + "description": "The IP address parameter." + }, + "loadBalancerResolverParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "example-resolver-1", + "example-resolver-2" + ], + "title": "ResolverParameter", + "description": "The name of the resolver." + }, + "loadBalancerLabelParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "example-key-1", + "example-key-2" + ], + "title": "LabelParameter", + "description": "The label key parameter." + }, + "loadBalancerMetricsSortParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "start_at", + "-start_at" + ], + "title": "MetricsSortParameter", + "enum": [ + "start_at", + "-start_at" + ], + "description": "Sort metrics by field. Prefix with '-' for descending order." + }, + "loadBalancerCertificateBundleParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "01234567-89ab-cdef-0123-456789abcdef", + "fedcba98-7654-3210-fedc-ba9876543210" + ], + "title": "CertificateBundleParameter", + "format": "uuid", + "description": "The UUID of the certificate bundle." + }, + "loadBalancerPlanParameter": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "example-plan-1", + "example-plan-2" + ], + "title": "PlanParameter", + "description": "The name of the plan." + }, + "loadBalancerServiceCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "my-loadbalancer", + "zone": "fi-hel1", + "plan": "production-small", + "configured_status": "started", + "frontends": [] + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "description": "Name of the service", + "example": "my-loadbalancer" + }, + "zone": { + "type": "string", + "pattern": "^[a-z]{2}-[a-z]{3}\\d$", + "description": "Zone", + "example": "fi-hel1" + }, + "plan": { + "type": "string", + "description": "Plan", + "example": "production" + }, + "configured_status": { + "$ref": "#/components/schemas/loadBalancerServiceConfiguredStatus" + }, + "frontends": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerFrontendCreate" + }, + "description": "Service frontends" + }, + "backends": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerBackendCreate" + }, + "description": "Service backends" + }, + "resolvers": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerResolverCreate" + }, + "description": "Service resolvers" + }, + "network_uuid": { + "type": "string", + "format": "uuid", + "description": "Private Network UUID", + "example": "01234567-89ab-cdef-0123-456789abcdef" + }, + "networks": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerNetworkCreate" + }, + "description": "Service networks" + }, + "labels": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerLabelCreate" + }, + "maxItems": 255, + "description": "Labels" + }, + "maintenance_dow": { + "$ref": "#/components/schemas/loadBalancerMaintenanceDayOfWeek" + }, + "maintenance_time": { + "$ref": "#/components/schemas/loadBalancerMaintenanceTime" + }, + "ip_addresses": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerIpAddressCreate" + }, + "description": "List of IP addresses for the network" + } + }, + "title": "Service Create", + "required": [ + "name", + "zone", + "plan", + "configured_status", + "frontends" + ], + "additionalProperties": false, + "description": "Load Balancer Service" + }, + "loadBalancerServiceConfiguredStatus": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Service configured status", + "enum": [ + "started", + "stopped" + ], + "description": "Service configured status", + "example": "started" + }, + "loadBalancerFrontendCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "my-frontend", + "port": 80, + "mode": "http", + "default_backend": "my-backend" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the frontend", + "example": "my-frontend" + }, + "port": { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "format": "int32", + "description": "Port to listen" + }, + "mode": { + "$ref": "#/components/schemas/loadBalancerFrontendMode" + }, + "default_backend": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Default backend" + }, + "networks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerFrontendNetworkCreate" + }, + "description": "Network names" + }, + "tls_configs": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/loadBalancerTlsConfigCreate" + }, + "description": "TLS Configs" + }, + "rules": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/loadBalancerRuleCreate" + }, + "description": "Rules" + }, + "properties": { + "$ref": "#/components/schemas/loadBalancerFrontendPropertiesCreate" + } + }, + "title": "Frontend Create", + "required": [ + "name", + "port", + "mode", + "default_backend" + ], + "additionalProperties": false, + "description": "Load Balancer Frontend" + }, + "loadBalancerFrontendMode": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Frontend mode", + "enum": [ + "http", + "tcp" + ], + "description": "Mode" + }, + "loadBalancerFrontendNetworkCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the Network", + "example": "public-network-1" + } + }, + "title": "Frontend Network Create", + "required": [ + "name" + ], + "additionalProperties": false, + "description": "Load Balancer Network", + "example": { + "name": "public-network-1" + } + }, + "loadBalancerTlsConfigCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the config", + "example": "tls-config-1" + }, + "certificate_bundle_uuid": { + "type": "string", + "format": "uuid", + "description": "Certificate Bundle UUID", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "title": "TLS Config Create", + "required": [ + "name", + "certificate_bundle_uuid" + ], + "additionalProperties": false, + "description": "Load Balancer TLS Config", + "example": { + "name": "tls-config-1", + "certificate_bundle_uuid": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "loadBalancerRuleCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "my-rule", + "priority": 10, + "matching_condition": "and", + "matchers": [], + "actions": [ + { + "type": "use_backend", + "action_use_backend": { + "backend": "backend-1" + } + } + ] + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the rule", + "example": "my-rule" + }, + "priority": { + "type": "integer", + "maximum": 100, + "minimum": 0, + "format": "int32", + "description": "Priority", + "example": 10 + }, + "matching_condition": { + "$ref": "#/components/schemas/loadBalancerMatchingCondition" + }, + "matchers": { + "type": [ + "array", + "null" + ], + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerMatcherCreate" + }, + "maxItems": 40, + "description": "Rule matchers" + }, + "actions": { + "type": "array", + "examples": [ + [ + { + "type": "use_backend", + "action_use_backend": { + "backend": "backend-1" + } + } + ] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerActionCreate" + }, + "maxItems": 40, + "minItems": 1, + "description": "Rule actions" + } + }, + "title": "Rule Create", + "required": [ + "name", + "priority", + "matchers", + "actions" + ], + "additionalProperties": false, + "description": "Load Balancer Forwarding Rule" + }, + "loadBalancerMatchingCondition": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "and" + ], + "title": "MatchingCondition", + "enum": [ + "and", + "or" + ], + "description": "Defines how multiple matching criteria are combined to evaluate a condition." + }, + "loadBalancerMatcherCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "properties": { + "type": { + "const": "src_ip" + }, + "inverse": { + "type": "boolean", + "description": "Inverse rule" + }, + "match_src_ip": { + "$ref": "#/components/schemas/loadBalancerMatcherIpCreate" + } + }, + "required": [ + "type", + "match_src_ip" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "src_port" + }, + "inverse": { + "type": "boolean", + "description": "Inverse rule" + }, + "match_src_port": { + "$ref": "#/components/schemas/loadBalancerMatcherIntCreate" + } + }, + "required": [ + "type", + "match_src_port" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "body_size" + }, + "inverse": { + "type": "boolean", + "description": "Inverse rule" + }, + "match_body_size": { + "$ref": "#/components/schemas/loadBalancerMatcherIntCreate" + } + }, + "required": [ + "type", + "match_body_size" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "cookie" + }, + "inverse": { + "type": "boolean", + "description": "Inverse rule" + }, + "match_cookie": { + "$ref": "#/components/schemas/loadBalancerMatcherStringArgCreate" + } + }, + "required": [ + "type", + "match_cookie" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "header" + }, + "inverse": { + "type": "boolean", + "description": "Inverse rule" + }, + "match_header": { + "$ref": "#/components/schemas/loadBalancerMatcherStringArgCreate" + } + }, + "required": [ + "type", + "match_header" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "url_param" + }, + "inverse": { + "type": "boolean", + "description": "Inverse rule" + }, + "match_url_param": { + "$ref": "#/components/schemas/loadBalancerMatcherStringArgCreate" + } + }, + "required": [ + "type", + "match_url_param" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "http_method" + }, + "inverse": { + "type": "boolean", + "description": "Inverse rule" + }, + "match_http_method": { + "$ref": "#/components/schemas/loadBalancerMatcherHttpMethodCreate" + } + }, + "required": [ + "type", + "match_http_method" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "path" + }, + "inverse": { + "type": "boolean", + "description": "Inverse rule" + }, + "match_path": { + "$ref": "#/components/schemas/loadBalancerMatcherStringCreate" + } + }, + "required": [ + "type", + "match_path" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "url" + }, + "inverse": { + "type": "boolean", + "description": "Inverse rule" + }, + "match_url": { + "$ref": "#/components/schemas/loadBalancerMatcherStringCreate" + } + }, + "required": [ + "type", + "match_url" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "host" + }, + "inverse": { + "type": "boolean", + "description": "Inverse rule" + }, + "match_host": { + "$ref": "#/components/schemas/loadBalancerMatcherHostCreate" + } + }, + "required": [ + "type", + "match_host" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "url_query" + }, + "inverse": { + "type": "boolean", + "description": "Inverse rule" + }, + "match_url_query": { + "$ref": "#/components/schemas/loadBalancerMatcherStringCreate" + } + }, + "required": [ + "type", + "match_url_query" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "num_members_up" + }, + "inverse": { + "type": "boolean", + "description": "Inverse rule" + }, + "match_num_members_up": { + "$ref": "#/components/schemas/loadBalancerMatcherBackendCreate" + } + }, + "required": [ + "type", + "match_num_members_up" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "request_header" + }, + "inverse": { + "type": "boolean", + "description": "Inverse rule" + }, + "match_request_header": { + "$ref": "#/components/schemas/loadBalancerMatcherStringArgCreate" + } + }, + "required": [ + "type", + "match_request_header" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "response_header" + }, + "inverse": { + "type": "boolean", + "description": "Inverse rule" + }, + "match_response_header": { + "$ref": "#/components/schemas/loadBalancerMatcherStringArgCreate" + } + }, + "required": [ + "type", + "match_response_header" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "http_status" + }, + "inverse": { + "type": "boolean", + "description": "Inverse rule" + }, + "match_http_status": { + "$ref": "#/components/schemas/loadBalancerMatcherIntCreate" + } + }, + "required": [ + "type", + "match_http_status" + ], + "additionalProperties": false + } + ], + "title": "Matcher Create", + "description": "Load Balancer Forwarding Rule Matcher" + }, + "loadBalancerMatcherIpCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "IP address or CIDR to match against. Accepts IPv4 (e.g., 192.168.1.1), IPv6 (e.g., 2001:db8::1), or CIDR notation (e.g., 192.168.1.0/24).", + "example": "192.168.1.1" + } + }, + "title": "Matcher IP Create", + "required": [ + "value" + ], + "additionalProperties": false, + "description": "Forwarding rule IP matcher for matching source IP addresses. Accepts IPv4, IPv6 addresses or CIDR notation.", + "example": { + "value": "192.168.1.1" + } + }, + "loadBalancerMatcherIntCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "oneOf": [ + { + "properties": { + "value": { + "type": "null" + } + }, + "title": "Range matcher", + "required": [ + "method", + "range_start", + "range_end" + ] + }, + { + "properties": { + "range_start": { + "type": "null" + }, + "range_end": { + "type": "null" + } + }, + "title": "Equality/comparison matcher", + "required": [ + "method", + "value" + ] + } + ], + "properties": { + "method": { + "$ref": "#/components/schemas/loadBalancerRuleMatcherIntMethod" + }, + "value": { + "type": "integer", + "format": "int32", + "description": "Value" + }, + "range_start": { + "type": "integer", + "format": "int32", + "description": "Value" + }, + "range_end": { + "type": "integer", + "format": "int32", + "description": "Value" + } + }, + "title": "Matcher Int Create", + "required": [ + "method" + ], + "additionalProperties": false, + "description": "Forwarding rule integer matcher" + }, + "loadBalancerRuleMatcherIntMethod": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Rule matcher int method", + "enum": [ + "range", + "equal", + "greater_or_equal", + "greater", + "less_or_equal", + "less" + ], + "description": "Method" + }, + "loadBalancerMatcherStringArgCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "properties": { + "method": { + "$ref": "#/components/schemas/loadBalancerStringMatcherMethods" + }, + "name": { + "type": "string", + "description": "Name of the parameter" + }, + "value": { + "type": "string", + "description": "Value" + }, + "ignore_case": { + "type": "boolean", + "description": "Ignore case" + } + }, + "required": [ + "method", + "name", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "method": { + "$ref": "#/components/schemas/loadBalancerStringMatcherMethodsNoValue" + }, + "name": { + "type": "string", + "description": "Name of the parameter" + } + }, + "required": [ + "method", + "name" + ], + "additionalProperties": false + } + ], + "title": "Matcher String Arg Create", + "description": "Forwarding rule string matcher" + }, + "loadBalancerStringMatcherMethods": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "exact", + "substring", + "starts" + ], + "title": "String matcher methods", + "enum": [ + "exact", + "substring", + "regexp", + "starts", + "ends", + "domain" + ], + "description": "String matcher methods", + "example": "substring" + }, + "loadBalancerStringMatcherMethodsNoValue": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "exists", + "ip" + ], + "title": "String matcher methods no value", + "enum": [ + "exists", + "ip" + ], + "description": "String matcher methods (no value)", + "example": "exists" + }, + "loadBalancerMatcherHttpMethodCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "value": { + "$ref": "#/components/schemas/loadBalancerHttpMethods" + } + }, + "title": "Matcher HTTP Method Create", + "required": [ + "value" + ], + "additionalProperties": false, + "description": "Forwarding rule HTTP method matcher" + }, + "loadBalancerHttpMethods": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "HTTP methods", + "enum": [ + "GET", + "HEAD", + "POST", + "PUT", + "PATCH", + "DELETE", + "CONNECT", + "OPTIONS", + "TRACE" + ], + "description": "HTTP methods" + }, + "loadBalancerMatcherStringCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "properties": { + "method": { + "$ref": "#/components/schemas/loadBalancerStringMatcherMethods" + }, + "value": { + "type": "string", + "description": "Value" + }, + "ignore_case": { + "type": "boolean", + "description": "Ignore case" + } + }, + "required": [ + "method", + "value" + ], + "additionalProperties": false + }, + { + "properties": { + "method": { + "$ref": "#/components/schemas/loadBalancerStringMatcherMethodsNoValue" + } + }, + "required": [ + "method" + ], + "additionalProperties": false + } + ], + "title": "Matcher String Create", + "description": "Forwarding rule string matcher" + }, + "loadBalancerMatcherHostCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "value": { + "type": "string", + "format": "hostname", + "description": "Value" + } + }, + "title": "Matcher Host Create", + "required": [ + "value" + ], + "additionalProperties": false, + "description": "Forwarding rule host matcher", + "example": { + "value": "example.com" + } + }, + "loadBalancerMatcherBackendCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "oneOf": [ + { + "properties": { + "value": { + "type": "null" + } + }, + "title": "Range matcher", + "required": [ + "backend", + "method", + "range_start", + "range_end" + ] + }, + { + "properties": { + "range_start": { + "type": "null" + }, + "range_end": { + "type": "null" + } + }, + "title": "Equality/comparison matcher", + "required": [ + "backend", + "method", + "value" + ] + } + ], + "properties": { + "backend": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the backend" + }, + "method": { + "$ref": "#/components/schemas/loadBalancerRuleMatcherIntMethod" + }, + "value": { + "type": "integer", + "maximum": 100, + "minimum": 0, + "format": "int32", + "description": "Value" + }, + "range_start": { + "type": "integer", + "maximum": 100, + "minimum": 0, + "format": "int32", + "description": "Value" + }, + "range_end": { + "type": "integer", + "maximum": 100, + "minimum": 0, + "format": "int32", + "description": "Value" + } + }, + "title": "Matcher Backend Create", + "additionalProperties": false, + "description": "Forwarding rule backend matcher" + }, + "loadBalancerActionCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "properties": { + "type": { + "const": "use_backend" + }, + "action_use_backend": { + "$ref": "#/components/schemas/loadBalancerActionUseBackendCreate" + } + }, + "required": [ + "type", + "action_use_backend" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "http_return" + }, + "action_http_return": { + "$ref": "#/components/schemas/loadBalancerActionHttpReturnCreate" + } + }, + "required": [ + "type", + "action_http_return" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "http_redirect" + }, + "action_http_redirect": { + "$ref": "#/components/schemas/loadBalancerActionHttpRedirectCreate" + } + }, + "required": [ + "type", + "action_http_redirect" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "tcp_reject" + }, + "action_tcp_reject": { + "$ref": "#/components/schemas/loadBalancerActionTcpRejectCreate" + } + }, + "required": [ + "type", + "action_tcp_reject" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "set_forwarded_headers" + }, + "action_set_forwarded_headers": { + "$ref": "#/components/schemas/loadBalancerActionSetForwardedHeaders" + } + }, + "required": [ + "type", + "action_set_forwarded_headers" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "set_request_header" + }, + "action_set_request_header": { + "$ref": "#/components/schemas/loadBalancerActionSetHeaderCreate" + } + }, + "required": [ + "type", + "action_set_request_header" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "set_response_header" + }, + "action_set_response_header": { + "$ref": "#/components/schemas/loadBalancerActionSetHeaderCreate" + } + }, + "required": [ + "type", + "action_set_response_header" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "http_rewrite_path" + }, + "action_http_rewrite_path": { + "$ref": "#/components/schemas/loadBalancerActionHttpRewritePathCreate" + } + }, + "required": [ + "type", + "action_http_rewrite_path" + ], + "additionalProperties": false + }, + { + "properties": { + "type": { + "const": "http_rewrite_uri" + }, + "action_http_rewrite_uri": { + "$ref": "#/components/schemas/loadBalancerActionHttpRewriteUriCreate" + } + }, + "required": [ + "type", + "action_http_rewrite_uri" + ], + "additionalProperties": false + } + ], + "title": "Action Create", + "description": "Load Balancer Forwarding Rule Action" + }, + "loadBalancerActionUseBackendCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "backend": "backend-1" + } + ], + "properties": { + "backend": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the backend", + "example": "backend-1" + } + }, + "title": "Action Use Backend Create", + "required": [ + "backend" + ], + "additionalProperties": false, + "description": "Forwarding rule use backend action", + "example": { + "backend": "backend-1" + } + }, + "loadBalancerActionHttpReturnCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "status": 200, + "content_type": "text/plain", + "payload": "SGVsbG8gV29ybGQ=" + } + ], + "properties": { + "status": { + "type": "integer", + "maximum": 599, + "minimum": 100, + "format": "int32", + "description": "HTTP Status code", + "example": 200 + }, + "content_type": { + "$ref": "#/components/schemas/loadBalancerContentTypes" + }, + "payload": { + "type": "string", + "maxLength": 4096, + "minLength": 1, + "format": "base64", + "description": "Response body content to return to the client." + } + }, + "title": "Action HTTP Return Create", + "required": [ + "status", + "content_type", + "payload" + ], + "additionalProperties": false, + "description": "Forwarding rule HTTP Return action" + }, + "loadBalancerContentTypes": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Content types", + "enum": [ + "text/plain", + "text/html", + "application/javascript", + "application/json" + ], + "description": "Content types" + }, + "loadBalancerActionHttpRedirectCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "type": "object", + "properties": { + "location": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "format": "uri-reference", + "description": "Value" + }, + "status": { + "type": "integer", + "title": "ActionHttpRedirectStatus", + "format": "int32", + "enum": [ + 301, + 302, + 303, + 307, + 308 + ], + "description": "HTTP Status code" + } + }, + "required": [ + "location" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "title": "ActionHttpRedirectScheme", + "enum": [ + "http", + "https" + ], + "description": "URL Schemes" + }, + "status": { + "type": "integer", + "title": "ActionHttpRedirectStatus", + "format": "int32", + "enum": [ + 301, + 302, + 303, + 307, + 308 + ], + "description": "HTTP Status code" + } + }, + "required": [ + "scheme" + ], + "additionalProperties": false + } + ], + "examples": [ + { + "location": "https://example.com/new-path", + "status": 302 + }, + { + "scheme": "https", + "status": 301 + } + ], + "title": "Action HTTP Redirect Create", + "description": "Forwarding rule HTTP Redirect action" + }, + "loadBalancerActionTcpRejectCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Action TCP Reject Create", + "additionalProperties": false, + "description": "Forwarding rule TCP reject action", + "example": {} + }, + "loadBalancerActionSetForwardedHeaders": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Action Set Forwarded Headers", + "additionalProperties": false, + "description": "Forwarding rule Set forwarded headers", + "example": {} + }, + "loadBalancerActionSetHeaderCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "header": { + "type": "string", + "maxLength": 256, + "minLength": 1, + "description": "Name of the HTTP header to set or modify in the request or response.", + "example": "X-Custom-Header" + }, + "value": { + "type": "string", + "maxLength": 256, + "description": "Value to assign to the specified HTTP header.", + "example": "CustomValue" + } + }, + "title": "Action Set Header Create", + "required": [ + "header" + ], + "additionalProperties": false, + "description": "Forwarding rule HTTP set header action", + "example": { + "header": "X-Custom-Header", + "value": "CustomValue" + } + }, + "loadBalancerActionHttpRewritePathCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "match_pattern": { + "type": "string", + "examples": [ + "^(.*/)$", + "^/api/(.*)$", + "^(.*)$", + "" + ], + "description": "Regex pattern to match against the path. Use empty string \"\" to match the entire path (defaults to ^(.*)$)" + }, + "rewrite_to": { + "type": "string", + "examples": [ + "\\1index.html", + "/new-path/\\1", + "/static/content.html" + ], + "minLength": 1, + "description": "Replacement pattern (can use capture groups like \\1 if match_pattern is provided)" + } + }, + "title": "Action HTTP Rewrite Path Create", + "required": [ + "match_pattern", + "rewrite_to" + ], + "additionalProperties": false, + "description": "Rewrite HTTP request path using regex pattern" + }, + "loadBalancerActionHttpRewriteUriCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "match_pattern": { + "type": "string", + "examples": [ + "^(.*)\\?(.*)$", + "^/api/(.*)$", + "^(.*)$", + "" + ], + "description": "Regex pattern to match against the full URI. Use empty string \"\" to match the entire URI (defaults to ^(.*)$)" + }, + "rewrite_to": { + "type": "string", + "examples": [ + "/v2/\\1", + "/new-path/\\1?\\2", + "/static/resource" + ], + "minLength": 1, + "description": "Replacement pattern (can use capture groups like \\1 if match_pattern is provided)" + } + }, + "title": "Action HTTP Rewrite Uri Create", + "required": [ + "match_pattern", + "rewrite_to" + ], + "additionalProperties": false, + "description": "Rewrite HTTP request URI using regex pattern" + }, + "loadBalancerFrontendPropertiesCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "timeout_client": { + "type": "integer", + "maximum": 86400, + "minimum": 1, + "format": "int32", + "description": "Client timeout", + "example": 60 + }, + "inbound_proxy_protocol": { + "type": "boolean", + "description": "Enable or disable inbound proxy protocol support", + "example": false + }, + "http2_enabled": { + "type": "boolean", + "description": "Allows for HTTP2 connection via ALPN" + } + }, + "title": "Frontend Properties Create", + "additionalProperties": false, + "description": "Frontend Properties", + "example": { + "timeout_client": 60, + "inbound_proxy_protocol": false, + "http2_enabled": true + } + }, + "loadBalancerBackendCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "my-backend", + "members": [] + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the backend", + "example": "my-backend" + }, + "members": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/loadBalancerMemberCreate" + }, + "description": "Backend members" + }, + "tls_configs": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/loadBalancerTlsConfigCreate" + }, + "description": "TLS Configs" + }, + "resolver": { + "oneOf": [ + { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Resolver reference" + }, + "properties": { + "$ref": "#/components/schemas/loadBalancerBackendPropertiesCreate" + } + }, + "title": "Backend Create", + "required": [ + "name", + "members" + ], + "additionalProperties": false, + "description": "Load Balancer Backend" + }, + "loadBalancerMemberCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "oneOf": [ + { + "properties": { + "type": { + "const": "static" + }, + "ip": { + "type": "string", + "oneOf": [ + { + "type": "string", + "format": "ipv4" + }, + { + "type": "string", + "format": "ipv6" + } + ], + "format": "ip", + "description": "Target IP address (IPv4 or IPv6)" + }, + "port": { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "format": "int32", + "description": "Target Port" + } + }, + "title": "Static member", + "required": [ + "name", + "ip", + "port", + "weight", + "max_sessions", + "type", + "enabled" + ] + }, + { + "properties": { + "type": { + "const": "dynamic" + }, + "ip": { + "oneOf": [ + { + "type": "string", + "oneOf": [ + { + "type": "string", + "format": "ipv4" + }, + { + "type": "string", + "format": "ipv6" + } + ], + "format": "ip" + }, + { + "type": "null" + } + ], + "description": "Fallback IP address (IPv4 or IPv6)" + }, + "port": { + "oneOf": [ + { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "format": "int32" + }, + { + "type": "null" + } + ], + "description": "Target Port" + } + }, + "title": "Dynamic member", + "required": [ + "name", + "weight", + "max_sessions", + "type", + "enabled" + ] + } + ], + "examples": [ + { + "name": "member-1", + "weight": 100, + "max_sessions": 1000, + "type": "dynamic", + "enabled": true + } + ], + "properties": { + "name": { + "type": "string", + "format": "domainname", + "description": "Name of the member", + "example": "member-1" + }, + "server_uuid": { + "type": "string", + "format": "uuid", + "description": "Target server UUID", + "example": "01234567-89ab-cdef-0123-456789abcdef" + }, + "weight": { + "type": "integer", + "examples": [ + 100 + ], + "maximum": 100, + "minimum": 0, + "format": "int32", + "description": "Target weight" + }, + "max_sessions": { + "type": "integer", + "examples": [ + 1000 + ], + "maximum": 500000, + "minimum": 0, + "format": "int32", + "description": "Maximum number of sessions before queueing" + }, + "type": { + "$ref": "#/components/schemas/loadBalancerMemberType" + }, + "enabled": { + "type": "boolean", + "description": "Is member enabled" + }, + "backup": { + "type": "boolean", + "description": "Is backup member" + }, + "ip": { + "type": [ + "string", + "null" + ], + "description": "IP address of the backend member server. Depending on the member type, this can be an IPv4 address, IPv6 address, or a domain name for dynamic members." + }, + "port": { + "type": [ + "integer", + "null" + ], + "description": "Port number on which the backend member server listens." + } + }, + "title": "Member Create", + "additionalProperties": false, + "description": "Load Balancer backend member" + }, + "loadBalancerMemberType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "dynamic" + ], + "title": "Member type", + "enum": [ + "static", + "dynamic" + ], + "description": "Member type" + }, + "loadBalancerBackendPropertiesCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "timeout_server": { + "type": "integer", + "maximum": 2145600, + "minimum": 1, + "format": "int32", + "description": "Server timeout" + }, + "timeout_tunnel": { + "type": "integer", + "maximum": 2145600, + "minimum": 1, + "format": "int32", + "description": "Tunnel timeout" + }, + "outbound_proxy_protocol": { + "$ref": "#/components/schemas/loadBalancerProxyProtocolVersionOrDisabled" + }, + "health_check_type": { + "$ref": "#/components/schemas/loadBalancerHealthCheckType" + }, + "health_check_interval": { + "type": "integer", + "maximum": 86400, + "minimum": 1, + "format": "int32", + "description": "Interval between health checks" + }, + "health_check_fall": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "format": "int32", + "description": "Sets how many failed health checks are allowed" + }, + "health_check_rise": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "format": "int32", + "description": "Sets how many passing checks there must be before returning server to the rotation" + }, + "health_check_url": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "description": "Target url for health check HTTP GET requests" + }, + "health_check_expected_status": { + "type": "integer", + "maximum": 599, + "minimum": 100, + "format": "int32", + "description": "Expected HTTP status code returned by the customer application to mark server as healthy", + "example": 200 + }, + "health_check_on_down": { + "$ref": "#/components/schemas/loadBalancerChecksOnDown" + }, + "health_check_tls_verify": { + "type": "boolean", + "description": "Allows health check CA verification on TLS connections" + }, + "sticky_session_cookie_name": { + "type": [ + "string", + "null" + ], + "maxLength": 64, + "pattern": "^[a-zA-Z0-9_-]*$", + "description": "Sets sticky session cookie name. Empty string disables sticky session." + }, + "sticky_session_cookie_attributes": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "maxLength": 64, + "pattern": "^$|^[a-zA-Z0-9=;\\s]+$" + } + ], + "description": "Controls additional cookie attributes appended to sticky session cookies. Supports combinations of: SameSite=Strict|Lax|None, Secure, HttpOnly, Partitioned (semicolon-separated). Note: SameSite=None and Partitioned require Secure." + }, + "tls_enabled": { + "type": "boolean", + "description": "Enables TLS between LB backend and member servers" + }, + "tls_verify": { + "type": "boolean", + "description": "Enables CA verification on TLS backend connections" + }, + "tls_use_system_ca": { + "type": "boolean", + "description": "Force Load Balancer to verify member certificates against system CA bundle" + }, + "http2_enabled": { + "type": "boolean", + "description": "Allows for HTTP2 connection via ALPN" + } + }, + "title": "Backend Properties Create", + "additionalProperties": false, + "description": "Backend Properties" + }, + "loadBalancerProxyProtocolVersionOrDisabled": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": [ + "string", + "null" + ], + "title": "Proxy protocol version or disabled", + "enum": [ + "v1", + "v2", + "", + null + ], + "description": "Empty string means disabled" + }, + "loadBalancerHealthCheckType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Health check type", + "enum": [ + "tcp", + "http" + ], + "description": "Health check type" + }, + "loadBalancerChecksOnDown": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Checks on down", + "enum": [ + "", + "shutdown-sessions" + ], + "description": "Checks on down category" + }, + "loadBalancerResolverCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the resolver", + "example": "default-resolver" + }, + "nameservers": { + "type": "array", + "items": { + "type": "string", + "format": "ipv4-port" + }, + "maxItems": 10, + "minItems": 1, + "description": "Nameservers", + "example": [ + "1.1.1.1:53", + "8.8.8.8:53" + ] + }, + "retries": { + "type": "integer", + "maximum": 10, + "minimum": 1, + "format": "int32", + "description": "Number of retries on failure", + "example": 3 + }, + "timeout": { + "type": "integer", + "maximum": 60, + "minimum": 1, + "format": "int32", + "description": "Timeout for the query in seconds", + "example": 5 + }, + "timeout_retry": { + "type": "integer", + "maximum": 60, + "minimum": 1, + "format": "int32", + "description": "Timeout for the query retries in seconds", + "example": 3 + }, + "cache_valid": { + "type": "integer", + "maximum": 86400, + "minimum": 1, + "format": "int32", + "description": "Time in seconds to cache valid results", + "example": 300 + }, + "cache_invalid": { + "type": "integer", + "maximum": 86400, + "minimum": 1, + "format": "int32", + "description": "Time in seconds to cache invalid results", + "example": 60 + } + }, + "title": "Resolver Create", + "required": [ + "name", + "nameservers", + "retries", + "timeout", + "timeout_retry", + "cache_valid", + "cache_invalid" + ], + "additionalProperties": false, + "description": "Load Balancer Resolver", + "example": { + "name": "default-resolver", + "nameservers": [ + "1.1.1.1:53", + "8.8.8.8:53" + ], + "retries": 3, + "timeout": 5, + "timeout_retry": 3, + "cache_valid": 300, + "cache_invalid": 60 + } + }, + "loadBalancerNetworkCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "my-network", + "type": "private", + "family": "IPv4" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the network" + }, + "uuid": { + "type": "string", + "format": "uuid", + "description": "Network UUID" + }, + "type": { + "$ref": "#/components/schemas/loadBalancerNetworkType" + }, + "family": { + "$ref": "#/components/schemas/loadBalancerNetworkFamily" + } + }, + "title": "Network Create", + "required": [ + "name", + "type", + "family" + ], + "additionalProperties": false, + "description": "Load Balancer Network." + }, + "loadBalancerNetworkType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Network type", + "enum": [ + "public", + "private" + ], + "description": "Network type" + }, + "loadBalancerNetworkFamily": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Network family", + "enum": [ + "IPv4", + "IPv6" + ], + "description": "Network family" + }, + "loadBalancerLabelCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "key": { + "type": "string", + "maxLength": 32, + "minLength": 2, + "pattern": "^[\\x20-\\x5E\\x60-\\x7E][\\x20-\\x7E]+$", + "description": "Key" + }, + "value": { + "type": [ + "string", + "null" + ], + "maxLength": 255, + "pattern": "\\A[\\p{L}\\p{N}\\p{P}\\p{S}\\p{M}\\p{Z}]*\\z", + "description": "Value" + } + }, + "title": "Label Create", + "required": [ + "key", + "value" + ], + "additionalProperties": false, + "description": "Load Balancer Label", + "example": { + "key": "environment", + "value": "production" + } + }, + "loadBalancerMaintenanceDayOfWeek": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "maintenance day of week", + "enum": [ + "sunday", + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday" + ], + "description": "Day of week", + "example": "monday" + }, + "loadBalancerMaintenanceTime": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Maintenance Time", + "pattern": "^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]Z$", + "description": "Maintenance time", + "example": "03:15:00Z" + }, + "loadBalancerIpAddressCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "address": { + "type": "string", + "format": "ipv4", + "description": "IP address", + "example": "192.168.1.10" + }, + "network_name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the target network", + "example": "private-net-1" + } + }, + "title": "IP Address Create", + "required": [ + "address" + ], + "additionalProperties": false, + "description": "IP address object", + "example": { + "address": "192.168.1.10", + "network_name": "private-net-1" + } + }, + "loadBalancerServiceReplace": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "my-loadbalancer", + "plan": "production", + "configured_status": "started" + } + ], + "properties": { + "name": { + "type": "string", + "examples": [ + "my-loadbalancer" + ], + "maxLength": 64, + "minLength": 1, + "description": "Name of the service" + }, + "plan": { + "type": "string", + "examples": [ + "production" + ], + "description": "Plan" + }, + "configured_status": { + "$ref": "#/components/schemas/loadBalancerServiceConfiguredStatus" + }, + "frontends": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerFrontendCreate" + }, + "description": "Service frontends" + }, + "backends": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerBackendCreate" + }, + "description": "Service backends" + }, + "resolvers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerResolverCreate" + }, + "description": "Service resolvers" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerLabelCreate" + }, + "maxItems": 255, + "description": "Labels" + }, + "maintenance_dow": { + "$ref": "#/components/schemas/loadBalancerMaintenanceDayOfWeek" + }, + "maintenance_time": { + "$ref": "#/components/schemas/loadBalancerMaintenanceTime" + }, + "ip_addresses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerIpAddressCreate" + }, + "description": "List of IP addresses for the network" + } + }, + "title": "Service Replace", + "required": [ + "name", + "plan", + "configured_status" + ], + "additionalProperties": false, + "description": "Load Balancer Service." + }, + "loadBalancerServiceModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "updated-loadbalancer" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "description": "Name of the service", + "example": "updated-loadbalancer" + }, + "plan": { + "type": "string", + "description": "Plan", + "example": "production" + }, + "configured_status": { + "$ref": "#/components/schemas/loadBalancerServiceConfiguredStatus" + }, + "frontends": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/loadBalancerFrontendCreate" + }, + "description": "Service frontends" + }, + "backends": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/loadBalancerBackendCreate" + }, + "description": "Service backends" + }, + "resolvers": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/loadBalancerResolverCreate" + }, + "description": "Service resolvers" + }, + "labels": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/loadBalancerLabelCreate" + }, + "maxItems": 255, + "description": "Labels" + }, + "maintenance_dow": { + "$ref": "#/components/schemas/loadBalancerMaintenanceDayOfWeek" + }, + "maintenance_time": { + "$ref": "#/components/schemas/loadBalancerMaintenanceTime" + }, + "ip_addresses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerIpAddressCreate" + }, + "description": "List of IP addresses for the network" + } + }, + "title": "Service Modify", + "additionalProperties": false, + "description": "Load Balancer Service" + }, + "loadBalancerFrontendModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "updated-frontend", + "port": 443 + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the frontend" + }, + "port": { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "format": "int32", + "description": "Port to listen" + }, + "mode": { + "$ref": "#/components/schemas/loadBalancerFrontendMode" + }, + "default_backend": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Default backend" + }, + "properties": { + "$ref": "#/components/schemas/loadBalancerFrontendPropertiesCreate" + }, + "networks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerFrontendNetworkCreate" + }, + "description": "Network names" + }, + "tls_configs": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/loadBalancerTlsConfigCreate" + }, + "description": "TLS Configs" + }, + "rules": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/loadBalancerRuleCreate" + }, + "description": "Rules" + } + }, + "title": "Frontend Modify", + "additionalProperties": false, + "description": "Load Balancer Frontend" + }, + "loadBalancerTlsConfigModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "updated-tls-config" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the config" + }, + "certificate_bundle_uuid": { + "type": "string", + "format": "uuid", + "description": "Certificate Bundle UUID" + } + }, + "title": "TLS Config Modify", + "additionalProperties": false, + "description": "Load Balancer TLS Config", + "example": { + "name": "tls-config-1", + "certificate_bundle_uuid": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "loadBalancerRuleModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "updated-rule", + "priority": 10 + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the rule" + }, + "priority": { + "type": "integer", + "maximum": 100, + "minimum": 0, + "format": "int32", + "description": "Priority" + }, + "matching_condition": { + "$ref": "#/components/schemas/loadBalancerMatchingCondition" + }, + "matchers": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/loadBalancerMatcherCreate" + }, + "maxItems": 40, + "description": "Rule matchers" + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerActionCreate" + }, + "maxItems": 40, + "minItems": 1, + "description": "Rule actions" + } + }, + "title": "Rule Modify", + "additionalProperties": false, + "description": "Load Balancer Forwarding Rule" + }, + "loadBalancerBackendModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "updated-backend" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the backend" + }, + "members": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/loadBalancerMemberModify" + }, + "description": "Backend members" + }, + "tls_configs": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/components/schemas/loadBalancerTlsConfigCreate" + }, + "description": "TLS Configs" + }, + "resolver": { + "oneOf": [ + { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Resolver reference" + }, + "properties": { + "$ref": "#/components/schemas/loadBalancerBackendPropertiesCreate" + } + }, + "title": "Backend Modify", + "additionalProperties": false, + "description": "Load Balancer Backend" + }, + "loadBalancerMemberModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "oneOf": [ + { + "properties": { + "type": { + "const": "static" + }, + "ip": { + "type": "string", + "oneOf": [ + { + "type": "string", + "format": "ipv4" + }, + { + "type": "string", + "format": "ipv6" + } + ], + "format": "ip", + "description": "Target IP address (IPv4 or IPv6)" + }, + "port": { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "format": "int32", + "description": "Target Port" + } + }, + "title": "Static member" + }, + { + "properties": { + "type": { + "const": "dynamic" + }, + "ip": { + "oneOf": [ + { + "type": "string", + "oneOf": [ + { + "type": "string", + "format": "ipv4" + }, + { + "type": "string", + "format": "ipv6" + } + ], + "format": "ip" + }, + { + "type": "null" + } + ], + "description": "Fallback IP address (IPv4 or IPv6)" + }, + "port": { + "oneOf": [ + { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "format": "int32" + }, + { + "type": "null" + } + ], + "description": "Target Port" + } + }, + "title": "Dynamic member", + "required": [ + "type" + ] + } + ], + "examples": [ + { + "name": "updated-member", + "enabled": true + } + ], + "properties": { + "name": { + "type": "string", + "format": "domainname", + "description": "Name of the member" + }, + "server_uuid": { + "type": "string", + "format": "uuid", + "description": "Target server UUID" + }, + "weight": { + "type": "integer", + "maximum": 100, + "minimum": 0, + "format": "int32", + "description": "Target weight" + }, + "max_sessions": { + "type": "integer", + "maximum": 500000, + "minimum": 0, + "format": "int32", + "description": "Maximum number of sessions before queueing" + }, + "type": { + "$ref": "#/components/schemas/loadBalancerMemberType" + }, + "enabled": { + "type": "boolean", + "description": "Is member enabled" + }, + "backup": { + "type": "boolean", + "description": "Is backup member" + }, + "ip": { + "type": [ + "string", + "null" + ], + "description": "IP address of the backend member server. Depending on the member type, this can be an IPv4 address, IPv6 address, or a domain name for dynamic members." + }, + "port": { + "type": [ + "integer", + "null" + ], + "description": "Port number on which the backend member server listens." + } + }, + "title": "Member Modify", + "additionalProperties": false, + "description": "Load Balancer backend member" + }, + "loadBalancerNetworkModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "updated-network" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the network" + } + }, + "title": "Network Modify", + "additionalProperties": false, + "description": "Load Balancer Network" + }, + "loadBalancerResolverModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "updated-resolver" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the resolver", + "example": "custom-resolver" + }, + "nameservers": { + "type": "array", + "items": { + "type": "string", + "format": "ipv4-port" + }, + "maxItems": 10, + "minItems": 1, + "description": "Nameservers", + "example": [ + "1.1.1.1:53", + "8.8.8.8:53" + ] + }, + "retries": { + "type": "integer", + "maximum": 10, + "minimum": 1, + "format": "int32", + "description": "Number of retries on failure", + "example": 3 + }, + "timeout": { + "type": "integer", + "maximum": 60, + "minimum": 1, + "format": "int32", + "description": "Timeout for the query in seconds", + "example": 5 + }, + "timeout_retry": { + "type": "integer", + "maximum": 60, + "minimum": 1, + "format": "int32", + "description": "Timeout for the query retries in seconds", + "example": 3 + }, + "cache_valid": { + "type": "integer", + "maximum": 86400, + "minimum": 1, + "format": "int32", + "description": "Time in seconds to cache valid results", + "example": 300 + }, + "cache_invalid": { + "type": "integer", + "maximum": 86400, + "minimum": 1, + "format": "int32", + "description": "Time in seconds to cache invalid results", + "example": 60 + } + }, + "title": "Resolver Modify", + "additionalProperties": false, + "description": "Load Balancer Resolver", + "example": { + "name": "default-resolver", + "nameservers": [ + "1.1.1.1:53", + "8.8.8.8:53" + ], + "retries": 3, + "timeout": 5, + "timeout_retry": 3, + "cache_valid": 300, + "cache_invalid": 60 + } + }, + "loadBalancerLabelModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "updated-key", + "value": "updated-value" + } + ], + "properties": { + "key": { + "type": "string", + "maxLength": 32, + "minLength": 2, + "pattern": "^[\\x20-\\x5E\\x60-\\x7E][\\x20-\\x7E]+$", + "description": "Key" + }, + "value": { + "type": [ + "string", + "null" + ], + "maxLength": 255, + "pattern": "\\A[\\p{L}\\p{N}\\p{P}\\p{S}\\p{M}\\p{Z}]*\\z", + "description": "Value" + } + }, + "title": "Label Modify", + "additionalProperties": false, + "description": "Load Balancer Label", + "example": { + "key": "environment", + "value": "production" + } + }, + "loadBalancerCertificateBundleCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "oneOf": [ + { + "properties": { + "type": { + "const": "manual" + }, + "hostnames": { + "type": "null" + }, + "key_type": { + "type": "null" + } + }, + "title": "Manual bundle", + "required": [ + "name", + "type", + "certificate", + "private_key" + ] + }, + { + "properties": { + "type": { + "const": "dynamic" + }, + "certificate": { + "type": "null" + }, + "intermediates": { + "type": "null" + }, + "private_key": { + "type": "null" + } + }, + "title": "Dynamic bundle", + "required": [ + "name", + "type", + "hostnames", + "key_type" + ] + }, + { + "properties": { + "type": { + "const": "authority" + }, + "hostnames": { + "type": "null" + }, + "key_type": { + "type": "null" + }, + "private_key": { + "type": "null" + }, + "intermediates": { + "type": "null" + } + }, + "title": "Authority bundle", + "required": [ + "name", + "type", + "certificate" + ] + } + ], + "examples": [ + { + "name": "my-certificate", + "type": "manual", + "certificate": "LS0tLS1CRUdJTi...==", + "private_key": "LS0tLS1CRUdJTi...==" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the bundle", + "example": "my-certificate-bundle" + }, + "type": { + "type": "string", + "title": "CertificateBundleCreateTlsType", + "enum": [ + "manual", + "dynamic", + "authority" + ], + "description": "Certificate bundle type", + "example": "manual" + }, + "hostnames": { + "type": "array", + "items": { + "type": "string", + "format": "domainname-allow-wildcard" + }, + "maxItems": 100, + "minItems": 1, + "description": "Array of hostnames" + }, + "certificate": { + "type": [ + "string", + "null" + ], + "format": "certificate", + "description": "Certificate", + "contentEncoding": "base64" + }, + "intermediates": { + "type": [ + "string", + "null" + ], + "format": "multiple-certificates", + "description": "Intermediate certificates", + "contentEncoding": "base64" + }, + "private_key": { + "type": [ + "string", + "null" + ], + "format": "private-key", + "description": "Private key", + "contentEncoding": "base64" + }, + "challenge_key": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "description": "Unique key used for ACME DNS challenge validation when obtaining certificates dynamically." + }, + "key_type": { + "type": "string", + "title": "CertificateBundleCreateKeyType", + "enum": [ + "rsa", + "ecdsa" + ], + "description": "Private key type" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerLabelCreate" + }, + "maxItems": 255, + "description": "Labels" + } + }, + "title": "Certificate Bundle Create", + "required": [ + "name", + "type" + ], + "additionalProperties": false, + "description": "Load Balancer certificate bundle" + }, + "loadBalancerCertificateBundleModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "$ref": "#/components/schemas/loadBalancerCertificateBundleManualModify" + }, + { + "$ref": "#/components/schemas/loadBalancerCertificateBundleDynamicModify" + }, + { + "$ref": "#/components/schemas/loadBalancerCertificateBundleAuthorityModify" + } + ], + "examples": [ + { + "name": "updated-cert-bundle", + "certificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t...", + "private_key": "LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQo=" + } + ], + "title": "Certificate Bundle Modify", + "description": "Modify a load balancer certificate bundle (manual, dynamic, or authority type)" + }, + "loadBalancerCertificateBundleManualModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "updated-manual-cert" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the bundle" + }, + "certificate": { + "type": [ + "string", + "null" + ], + "format": "certificate", + "description": "Certificate", + "contentEncoding": "base64" + }, + "intermediates": { + "type": [ + "string", + "null" + ], + "format": "multiple-certificates", + "description": "Intermediate certificates", + "contentEncoding": "base64" + }, + "private_key": { + "type": [ + "string", + "null" + ], + "format": "private-key", + "description": "Private key", + "contentEncoding": "base64" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerLabelCreate" + }, + "maxItems": 255, + "description": "Labels" + } + }, + "title": "Certificate Bundle Manual Modify", + "additionalProperties": false, + "description": "Load Balancer certificate bundle manual type" + }, + "loadBalancerCertificateBundleDynamicModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "updated-dynamic-cert" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the bundle" + }, + "hostnames": { + "type": "array", + "items": { + "type": "string", + "format": "domainname-allow-wildcard" + }, + "maxItems": 1000, + "minItems": 1, + "description": "Array of hostnames" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerLabelCreate" + }, + "maxItems": 255, + "description": "Labels" + }, + "challenge_key": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "description": "Unique key used for ACME DNS challenge validation when obtaining certificates dynamically." + } + }, + "title": "Certificate Bundle Dynamic Modify", + "additionalProperties": false, + "description": "Load Balancer certificate bundle dynamic type" + }, + "loadBalancerCertificateBundleAuthorityModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "updated-cert-bundle" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the bundle" + }, + "certificate": { + "type": "string", + "format": "certificate", + "description": "Certificate", + "contentEncoding": "base64" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerLabelCreate" + }, + "maxItems": 255, + "description": "Labels" + } + }, + "title": "Certificate Bundle Authority Modify", + "additionalProperties": false, + "description": "Load Balancer certificate bundle dynamic type" + }, + "loadBalancerServicesResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerService" + }, + "title": "Services Response", + "description": "Response schema for a list of services." + }, + "loadBalancerService": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "uuid": "b7a3f6a4-4a8f-4a5c-b7a5-9c9a1e5a6d3e", + "name": "loadbalancer-prod-eu", + "zone": "de-fra1", + "plan": "medium", + "configured_status": "configured", + "operational_state": "running", + "frontends": [], + "backends": [], + "resolvers": [], + "networks": [], + "ip_addresses": [], + "labels": [], + "maintenance_dow": "tuesday", + "maintenance_time": "02:00:00.000Z", + "created_at": "2025-11-06T08:00:00.000Z", + "updated_at": "2025-11-06T09:15:00.000Z" + } + ], + "properties": { + "uuid": { + "type": "string", + "format": "uuid", + "description": "Unique identifier of the service.", + "example": "b7a3f6a4-4a8f-4a5c-b7a5-9c9a1e5a6d3e" + }, + "name": { + "type": "string", + "description": "Human-readable name assigned to the service.", + "example": "loadbalancer-prod-eu" + }, + "zone": { + "type": "string", + "description": "UpCloud zone where the service is deployed.", + "example": "de-fra1" + }, + "plan": { + "type": "string", + "description": "Selected load balancer plan defining node size, performance, and pricing tier.", + "example": "medium" + }, + "configured_status": { + "type": "string", + "description": "Configuration status of the service (e.g., whether all components are correctly provisioned).", + "example": "configured" + }, + "operational_state": { + "type": "string", + "enum": [ + "pending", + "running", + "failing", + "stopped", + "degraded" + ], + "description": "Current operational state of the service, describing its runtime behavior and availability.", + "example": "running" + }, + "frontends": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerFrontend" + }, + "description": "List of frontend configurations associated with the service." + }, + "backends": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerBackend" + }, + "description": "List of backend configurations linked to this service." + }, + "resolvers": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerResolver" + }, + "description": "DNS resolvers available for this service." + }, + "networks": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerNetwork" + }, + "description": "Networks attached to this service." + }, + "ip_addresses": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerIpAddress" + }, + "description": "IP addresses assigned to this service." + }, + "labels": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerLabelResponse" + }, + "description": "Labels associated with the service for metadata tagging and identification." + }, + "maintenance_dow": { + "type": "string", + "enum": [ + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday", + "sunday" + ], + "description": "Day of week scheduled for maintenance operations.", + "example": "tuesday" + }, + "maintenance_time": { + "type": "string", + "examples": [ + "2025-11-06T08:00:00.000Z" + ], + "format": "time", + "description": "Time of day (in UTC) scheduled for maintenance operations." + }, + "created_at": { + "type": "string", + "examples": [ + "2025-11-06T08:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the service was created." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-11-06T09:15:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the service was last updated." + }, + "network_uuid": { + "type": "string", + "description": "Deprecated: old field replaced by the networks array." + }, + "dns_name": { + "type": "string", + "description": "Deprecated: legacy DNS field replaced by service-level IP addressing." + } + }, + "title": "Service", + "required": [ + "uuid", + "name", + "zone", + "plan", + "configured_status", + "created_at", + "updated_at" + ], + "additionalProperties": false, + "description": "Represents a load balancer service instance that groups together frontends, backends, and related agents. It defines the service plan, network configuration, and operational state across all nodes." + }, + "loadBalancerFrontend": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "frontend-1", + "port": 80, + "mode": "http", + "default_backend": "backend-1", + "tls_configs": [ + { + "name": "frontend-tls-config", + "certificate_bundle_uuid": "a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001", + "created_at": "2025-11-06T10:15:00.000Z", + "updated_at": "2025-11-06T11:00:00.000Z" + } + ], + "rules": [ + { + "name": "redirect-to-https", + "priority": 1, + "matching_condition": "and", + "matchers": [ + { + "type": "path", + "inverse": false, + "match_path": { + "method": "starts_with", + "value": "/api", + "ignore_case": true + } + } + ], + "actions": [ + { + "type": "set_forwarded_headers", + "action_set_forwarded_headers": {} + }, + { + "type": "set_request_header", + "action_set_request_header": { + "header": "X-Forwarded-Proto", + "value": "https" + } + }, + { + "type": "http_redirect", + "action_http_redirect": { + "location": "https://example.com", + "status": 301 + } + } + ], + "created_at": "2025-11-06T09:00:00.000Z", + "updated_at": "2025-11-06T09:30:00.000Z" + } + ], + "properties": { + "inbound_proxy_protocol": false, + "timeout_client": 50000, + "http2_enabled": true, + "frontend_id": 301 + }, + "networks": [ + { + "name": "public-network" + }, + { + "name": "private-network" + } + ], + "created_at": "2025-11-06T09:00:00.000Z", + "updated_at": "2025-12-06T09:00:00.000Z" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Human-readable name assigned to the frontend.", + "example": "frontend-1" + }, + "port": { + "type": "integer", + "format": "int32", + "description": "Port number on which the frontend listens for incoming connections.", + "example": 80 + }, + "mode": { + "type": "string", + "enum": [ + "http", + "tcp" + ], + "description": "Operating mode defining the protocol layer at which the frontend operates.", + "example": "http" + }, + "default_backend": { + "type": "string", + "description": "Name of the backend used when no routing rules match the incoming request.", + "example": "backend-1" + }, + "tls_configs": { + "$ref": "#/components/schemas/loadBalancerTlsConfigsResponse" + }, + "rules": { + "$ref": "#/components/schemas/loadBalancerRulesResponse" + }, + "properties": { + "$ref": "#/components/schemas/loadBalancerFrontendPropertiesResponse" + }, + "networks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + }, + "example": [ + { + "name": "public-network" + }, + { + "name": "private-network" + } + ] + }, + "created_at": { + "type": "string", + "examples": [ + "2025-11-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the frontend was created (RFC 3339 format)." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-12-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the frontend was last updated (RFC 3339 format)." + } + }, + "title": "Frontend", + "required": [ + "name", + "port", + "mode", + "default_backend", + "tls_configs", + "rules", + "properties", + "networks", + "created_at", + "updated_at" + ], + "description": "Represents a frontend configuration in the load balancer service, defining how client connections are received, the listening port and protocol, TLS settings, routing rules, and default backend association." + }, + "loadBalancerTlsConfigsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerTlsConfig" + }, + "title": "TLS Configs Response", + "description": "Represents a list of TLS configuration for a frontend or backend, defining the certificate bundle and associated identifiers within the load balancer service." + }, + "loadBalancerTlsConfig": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "frontend-tls-config", + "certificate_bundle_uuid": "a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001", + "created_at": "2025-11-06T10:15:00.000Z", + "updated_at": "2025-11-06T11:00:00.000Z" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Human-readable name assigned to the TLS configuration.", + "example": "frontend-tls-config" + }, + "certificate_bundle_uuid": { + "type": "string", + "format": "uuid", + "description": "UUID of the certificate bundle used for TLS encryption.", + "example": "a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001" + }, + "created_at": { + "type": "string", + "examples": [ + "2025-11-06T10:15:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the TLS configuration was created (RFC 3339 format)." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-11-06T11:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the TLS configuration was last updated (RFC 3339 format)." + } + }, + "title": "TLS Config", + "required": [ + "name", + "certificate_bundle_uuid", + "created_at", + "updated_at" + ], + "description": "Represents a TLS configuration for a frontend or backend, defining the certificate bundle and associated identifiers within the load balancer service." + }, + "loadBalancerRulesResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerRule" + }, + "title": "Rules Response", + "description": "Represents a list of load balancer rules that define how incoming requests are matched and processed, including conditions, actions, and backend target associations." + }, + "loadBalancerRule": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "redirect-to-https", + "priority": 1, + "matching_condition": "and", + "matchers": [ + { + "type": "path", + "inverse": false, + "match_path": { + "method": "starts_with", + "value": "/api", + "ignore_case": true + } + } + ], + "actions": [ + { + "type": "set_forwarded_headers", + "action_set_forwarded_headers": {} + }, + { + "type": "set_request_header", + "action_set_request_header": { + "header": "X-Forwarded-Proto", + "value": "https" + } + }, + { + "type": "http_redirect", + "action_http_redirect": { + "location": "https://example.com", + "status": 301 + } + } + ], + "created_at": "2025-11-06T09:00:00.000Z", + "updated_at": "2025-11-06T09:30:00.000Z" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Human-readable name assigned to the routing rule.", + "example": "redirect-to-https" + }, + "priority": { + "type": "integer", + "format": "int32", + "description": "Priority order for rule evaluation, where lower values indicate higher priority.", + "example": 100 + }, + "matching_condition": { + "type": "string", + "enum": [ + "and", + "or" + ], + "description": "Logical operator determining how multiple matchers are combined (and/or).", + "example": "and" + }, + "matchers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerMatcherResponse" + }, + "description": "List of conditions that incoming requests must satisfy for this rule to apply.", + "example": [ + { + "type": "path", + "inverse": false, + "match_path": { + "method": "starts_with", + "value": "/api", + "ignore_case": true + } + } + ] + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerActionResponse" + }, + "description": "List of actions to execute when the rule matches an incoming request.", + "example": [ + { + "type": "set_forwarded_headers", + "action_set_forwarded_headers": {} + }, + { + "type": "set_request_header", + "action_set_request_header": { + "header": "X-Forwarded-Proto", + "value": "https" + } + }, + { + "type": "http_redirect", + "action_http_redirect": { + "location": "https://example.com", + "status": 301 + } + } + ] + }, + "created_at": { + "type": "string", + "examples": [ + "2025-11-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the rule was created (RFC 3339 format)." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-12-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the rule was last updated (RFC 3339 format)." + } + }, + "title": "Rule", + "required": [ + "name", + "priority", + "matching_condition", + "matchers", + "actions", + "created_at", + "updated_at" + ], + "description": "Represents a load balancer rule that defines how incoming traffic is matched and processed by a frontend, including priority, matching conditions, and actions to perform." + }, + "loadBalancerMatcherResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "src_ip", + "src_port", + "body_size", + "cookie", + "header", + "url_param", + "request_header", + "response_header", + "http_status", + "http_method", + "path", + "url", + "host", + "url_query", + "num_members_up" + ], + "description": "Type of matcher defining which aspect of the request or response to evaluate." + }, + "inverse": { + "type": "boolean", + "description": "Indicates whether to invert the match result (true) or use it as-is (false)." + }, + "match_src_ip": { + "$ref": "#/components/schemas/loadBalancerMatchIpResponse" + }, + "match_src_port": { + "$ref": "#/components/schemas/loadBalancerMatchIntResponse" + }, + "match_body_size": { + "$ref": "#/components/schemas/loadBalancerMatchIntResponse" + }, + "match_cookie": { + "$ref": "#/components/schemas/loadBalancerMatchStringWithArgResponse" + }, + "match_header": { + "$ref": "#/components/schemas/loadBalancerMatchStringWithArgResponse" + }, + "match_url_param": { + "$ref": "#/components/schemas/loadBalancerMatchStringWithArgResponse" + }, + "match_request_header": { + "$ref": "#/components/schemas/loadBalancerMatchStringWithArgResponse" + }, + "match_response_header": { + "$ref": "#/components/schemas/loadBalancerMatchStringWithArgResponse" + }, + "match_http_status": { + "$ref": "#/components/schemas/loadBalancerMatchIntResponse" + }, + "match_http_method": { + "$ref": "#/components/schemas/loadBalancerMatchStringResponse" + }, + "match_path": { + "$ref": "#/components/schemas/loadBalancerMatchStringResponse" + }, + "match_url": { + "$ref": "#/components/schemas/loadBalancerMatchStringResponse" + }, + "match_host": { + "$ref": "#/components/schemas/loadBalancerMatchStringResponse" + }, + "match_url_query": { + "$ref": "#/components/schemas/loadBalancerMatchStringResponse" + }, + "match_num_members_up": { + "$ref": "#/components/schemas/loadBalancerMatchBackendResponse" + } + }, + "title": "Matcher Response", + "required": [ + "type", + "inverse" + ], + "additionalProperties": false, + "description": "Defines a matcher used to evaluate specific conditions in requests or responses.", + "example": { + "type": "src_ip", + "inverse": false, + "match_src_ip": { + "value": "192.168.1.0/24" + } + } + }, + "loadBalancerMatchIpResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "IP address or CIDR subnet to match against the source IP. Accepts IPv4, IPv6, or CIDR notation." + } + }, + "title": "Match IP Response", + "required": [ + "value" + ], + "additionalProperties": false, + "description": "Defines a match condition based on the source IP address or subnet. Used when the matcher type is 'src_ip'.", + "example": { + "value": "192.168.1.0/24" + } + }, + "loadBalancerMatchIntResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "method": { + "type": "string", + "enum": [ + "equal", + "greater_or_equal", + "greater", + "less_or_equal", + "less" + ], + "description": "Comparison method used to evaluate the integer value.", + "example": "greater_or_equal" + }, + "value": { + "type": "integer", + "minimum": 0, + "format": "int32", + "description": "Integer value to compare against using the specified comparison method." + }, + "range_start": { + "type": "integer", + "format": "int32", + "description": "Starting value of the range for range-based integer matching.", + "example": 0 + }, + "range_end": { + "type": "integer", + "format": "int32", + "description": "Ending value of the range for range-based integer matching.", + "example": 1024 + } + }, + "title": "Match Int Response", + "required": [ + "method", + "value" + ], + "additionalProperties": true, + "description": "Defines integer matching criteria for requests or responses.", + "example": { + "method": "greater_or_equal", + "value": 100, + "range_start": 0, + "range_end": 1024 + } + }, + "loadBalancerMatchStringWithArgResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "allOf": [ + { + "$ref": "#/components/schemas/loadBalancerMatchStringResponse" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "Authorization" + } + }, + "required": [ + "name" + ] + } + ], + "title": "Match String With Arg Response", + "description": "Extends MatchString with an additional 'name' parameter, used for matchers that require a key-value pair (e.g., matching headers, cookies, or URL parameters).", + "example": { + "name": "Authorization", + "method": "contains", + "value": "/api", + "ignore_case": true + } + }, + "loadBalancerMatchStringResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "method": { + "type": "string", + "enum": [ + "equal", + "contains", + "starts_with", + "ends_with", + "regex" + ], + "description": "String comparison method used to evaluate the match condition.", + "example": "contains" + }, + "value": { + "type": "string", + "description": "String value or pattern to match against using the specified comparison method.", + "example": "/api" + }, + "ignore_case": { + "type": "boolean", + "description": "Indicates whether the string comparison should be case-insensitive.", + "example": true + } + }, + "title": "Match String Response", + "additionalProperties": true, + "description": "Defines a string-based match condition, used for matching values such as paths, headers, URLs, or hostnames.", + "example": { + "method": "contains", + "value": "/api", + "ignore_case": true + } + }, + "loadBalancerMatchBackendResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "allOf": [ + { + "$ref": "#/components/schemas/loadBalancerMatchIntResponse" + }, + { + "type": "object", + "properties": { + "backend": { + "type": "string", + "example": "backend-1" + } + }, + "required": [ + "backend" + ], + "additionalProperties": true + } + ], + "title": "Match Backend Response", + "description": "Defines a backend health matcher used to compare the number of healthy (up) members in a specific backend against a threshold value. Used when the matcher type is 'num_members_up'.", + "example": { + "backend": "backend-1", + "method": "greater_or_equal", + "value": 2, + "range_start": 0, + "range_end": 10 + } + }, + "loadBalancerActionResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "use_backend", + "http_return", + "http_redirect", + "tcp_reject", + "set_forwarded_headers", + "set_request_header", + "set_response_header", + "http_rewrite_path", + "http_rewrite_uri" + ], + "description": "Type of action defining how matched requests should be processed or modified.", + "example": "use_backend" + }, + "action_use_backend": { + "$ref": "#/components/schemas/loadBalancerActionUseBackendResponse" + }, + "action_http_return": { + "$ref": "#/components/schemas/loadBalancerActionHttpReturnResponse" + }, + "action_http_redirect": { + "$ref": "#/components/schemas/loadBalancerActionHttpRedirectResponse" + }, + "action_tcp_reject": { + "$ref": "#/components/schemas/loadBalancerActionTcpRejectResponse" + }, + "action_set_forwarded_headers": { + "$ref": "#/components/schemas/loadBalancerActionSetForwardedHeadersResponse" + }, + "action_set_request_header": { + "$ref": "#/components/schemas/loadBalancerActionSetHeaderResponse" + }, + "action_set_response_header": { + "$ref": "#/components/schemas/loadBalancerActionSetHeaderResponse" + }, + "action_http_rewrite_path": { + "$ref": "#/components/schemas/loadBalancerActionHttpRewritePathResponse" + }, + "action_http_rewrite_uri": { + "$ref": "#/components/schemas/loadBalancerActionHttpRewriteUriResponse" + } + }, + "title": "Action Response", + "required": [ + "type" + ], + "additionalProperties": false, + "description": "Represents a rule action that defines how matched traffic should be processed or modified within the load balancer. Each action type includes a corresponding configuration object.", + "example": { + "type": "use_backend", + "action_use_backend": { + "backend": "api-backend" + } + } + }, + "loadBalancerActionUseBackendResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "backend": { + "type": "string", + "description": "Name of the backend to which the request should be routed when this action executes.", + "example": "api-backend" + } + }, + "title": "Action Use Backend Response", + "required": [ + "backend" + ], + "additionalProperties": false, + "description": "Defines the backend target to which the request should be routed when the rule matches. Used when the action type is 'use_backend'.", + "example": { + "backend": "api-backend" + } + }, + "loadBalancerActionHttpReturnResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "status": { + "type": "integer", + "maximum": 599, + "minimum": 100, + "format": "int32", + "description": "HTTP status code to return.", + "example": 403 + }, + "content_type": { + "type": "string", + "description": "MIME type of the response body.", + "example": "text/plain" + }, + "payload": { + "type": "string", + "description": "Base64-encoded payload returned as the response body.", + "contentEncoding": "base64", + "example": "QWNjZXNzIERlbmllZAo=" + } + }, + "title": "Action HTTP Return Response", + "required": [ + "status", + "content_type", + "payload" + ], + "additionalProperties": false, + "description": "Defines a custom HTTP response returned to the client when a rule matches. Used when the action type is 'http_return'.", + "example": { + "status": 403, + "content_type": "text/plain", + "payload": "QWNjZXNzIERlbmllZAo=" + } + }, + "loadBalancerActionHttpRedirectResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "Absolute or relative URL to which requests are redirected.", + "example": "https://example.com" + }, + "status": { + "type": "integer", + "format": "int32", + "description": "HTTP status code for the redirection. Common values are 301 (permanent) or 302 (temporary).", + "example": 301 + } + }, + "title": "Action HTTP Redirect Response", + "required": [ + "location", + "status" + ], + "additionalProperties": false, + "description": "Defines an HTTP redirection action used to redirect incoming requests to a specified URL with a given HTTP status code. Used when the action type is 'http_redirect'.", + "example": { + "location": "https://example.com", + "status": 301 + } + }, + "loadBalancerActionTcpRejectResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Action TCP Reject Response", + "additionalProperties": false, + "description": "Defines a TCP rejection action that immediately closes incoming connections when a rule matches. Used when the action type is 'tcp_reject'.", + "example": {} + }, + "loadBalancerActionSetForwardedHeadersResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Action Set Forwarded Headers Response", + "additionalProperties": false, + "description": "Defines an action that automatically adds standard X-Forwarded-* headers (such as X-Forwarded-For and X-Forwarded-Proto) to requests before forwarding them to the backend. Used when the action type is 'set_forwarded_headers'.", + "example": {} + }, + "loadBalancerActionSetHeaderResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "header": { + "type": "string", + "description": "Name of the HTTP header to add or modify.", + "example": "X-Custom-Header" + }, + "value": { + "type": "string", + "description": "Value to assign to the specified header.", + "example": "Processed-By-UpCloud-LB" + } + }, + "title": "Action Set Header Response", + "required": [ + "header", + "value" + ], + "additionalProperties": false, + "description": "Defines an action that adds or modifies an HTTP header in a request or response. Used when the action type is 'set_request_header' or 'set_response_header'.", + "example": { + "header": "X-Custom-Header", + "value": "Processed-By-UpCloud-LB" + } + }, + "loadBalancerActionHttpRewritePathResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "match_pattern": { + "type": "string", + "description": "Regex pattern to match against the path." + }, + "rewrite_to": { + "type": "string", + "description": "Replacement pattern (can use capture groups like \\1)." + } + }, + "title": "Action HTTP Rewrite Path Response", + "required": [ + "match_pattern", + "rewrite_to" + ], + "additionalProperties": false, + "description": "Defines an action that rewrites the HTTP request path using a regex pattern.", + "example": { + "match_pattern": "^/api/(.*)$", + "rewrite_to": "/v2/\\1" + } + }, + "loadBalancerActionHttpRewriteUriResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "match_pattern": { + "type": "string", + "description": "Regex pattern to match against the full URI." + }, + "rewrite_to": { + "type": "string", + "description": "Replacement pattern (can use capture groups like \\1)." + } + }, + "title": "Action HTTP Rewrite Uri Response", + "required": [ + "match_pattern", + "rewrite_to" + ], + "additionalProperties": false, + "description": "Defines an action that rewrites the HTTP request URI using a regex pattern.", + "example": { + "match_pattern": "^/api/(.*)$", + "rewrite_to": "/v2/\\1" + } + }, + "loadBalancerFrontendPropertiesResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "inbound_proxy_protocol": { + "type": "boolean", + "description": "Enables or disables support for the Proxy Protocol on inbound connections, allowing client IP addresses to be forwarded to the backend.", + "example": false + }, + "timeout_client": { + "type": "integer", + "format": "int32", + "description": "Maximum inactivity timeout for a client connection, in milliseconds. Determines how long a client connection can remain idle before being closed.", + "example": 50000 + }, + "http2_enabled": { + "type": "boolean", + "description": "Indicates whether HTTP/2 protocol support is enabled for this frontend.", + "example": true + }, + "frontend_id": { + "type": "integer", + "format": "int32", + "description": "Identifier linking these properties to the parent frontend configuration.", + "example": 301 + } + }, + "title": "Frontend Properties Response", + "required": [ + "timeout_client", + "frontend_id" + ], + "additionalProperties": false, + "description": "Defines configurable properties for a frontend, such as client timeout settings, protocol options, and linkage to its parent frontend resource.", + "example": { + "inbound_proxy_protocol": false, + "timeout_client": 50000, + "http2_enabled": true, + "frontend_id": 301 + } + }, + "loadBalancerBackend": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "api-backend", + "members": [ + { + "name": "member-1", + "ip": "192.168.1.10", + "port": 8080, + "weight": 10, + "max_sessions": 100, + "type": "static", + "enabled": true, + "backup": false, + "created_at": "2025-11-05T12:30:00.000Z", + "updated_at": "2025-11-05T13:45:00.000Z" + } + ], + "tls_configs": [ + { + "name": "backend-tls-config", + "certificate_bundle_uuid": "a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001", + "created_at": "2025-11-06T10:15:00.000Z", + "updated_at": "2025-11-06T11:00:00.000Z" + } + ], + "resolver": "resolver-default", + "properties": { + "backend_id": 401, + "timeout_server": 5000, + "timeout_tunnel": 15000, + "health_check_type": "http", + "health_check_interval": 10, + "health_check_fall": 3, + "health_check_rise": 2, + "health_check_url": "/status", + "health_check_expected_status": 200, + "health_check_tls_verify": true, + "health_check_on_down": "shutdown-sessions", + "tls_enabled": true, + "tls_verify": true, + "tls_use_system_ca": false, + "http2_enabled": true + }, + "created_at": "2025-11-06T09:00:00.000Z", + "updated_at": "2025-11-06T11:30:00.000Z" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Human-readable name of the backend", + "example": "api-backend" + }, + "members": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerMember" + }, + "description": "List of backend member servers (nodes) participating in this backend configuration.", + "example": [ + { + "name": "member-1", + "ip": "192.168.1.10", + "port": 8080, + "weight": 10, + "max_sessions": 100, + "type": "static", + "enabled": true, + "backup": false, + "created_at": "2025-11-05T12:30:00.000Z", + "updated_at": "2025-11-05T13:45:00.000Z" + }, + { + "name": "member-2", + "ip": "192.168.1.11", + "port": 8080, + "weight": 8, + "max_sessions": 120, + "type": "static", + "enabled": true, + "backup": false, + "created_at": "2025-11-05T12:35:00.000Z", + "updated_at": "2025-11-05T13:50:00.000Z" + } + ] + }, + "tls_configs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerTlsConfig" + }, + "description": "TLS configurations associated with this backend, specifying certificate bundles and identifiers.", + "example": [ + { + "name": "backend-tls-config", + "certificate_bundle_uuid": "a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001", + "created_at": "2025-11-06T10:15:00.000Z", + "updated_at": "2025-11-06T11:00:00.000Z" + } + ] + }, + "resolver": { + "type": [ + "string", + "null" + ], + "description": "Optional outbound DNS resolver reference used by this backend. Null when not set.", + "example": "resolver-default" + }, + "properties": { + "$ref": "#/components/schemas/loadBalancerBackendPropertiesResponse" + }, + "created_at": { + "type": "string", + "examples": [ + "2025-11-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the backend was created (RFC 3339 format)." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-11-06T11:30:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the backend was last updated (RFC 3339 format)." + } + }, + "title": "Backend", + "required": [ + "name", + "members", + "tls_configs", + "properties", + "created_at", + "updated_at" + ], + "description": "Represents a backend configuration in the load balancer service, containing backend members, resolver settings, TLS configurations, and backend-specific properties such as timeouts and health checks." + }, + "loadBalancerMember": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "member-1", + "ip": "192.168.1.10", + "port": 8080, + "weight": 10, + "max_sessions": 100, + "type": "static", + "enabled": true, + "backup": false, + "created_at": "2025-11-05T12:30:00.000Z", + "updated_at": "2025-11-05T13:45:00.000Z" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Human-readable name assigned to the backend member.", + "example": "member-1" + }, + "ip": { + "type": "string", + "format": "ipv4", + "description": "IP address of the backend member server.", + "example": "192.168.1.1" + }, + "port": { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "format": "int32", + "description": "Port number on which the backend member server listens.", + "example": 80 + }, + "weight": { + "type": "integer", + "format": "int32", + "description": "Relative weight for load balancing, determining the proportion of requests sent to this member.", + "example": 100 + }, + "max_sessions": { + "type": "integer", + "format": "int32", + "description": "Maximum number of concurrent connections allowed to this backend member.", + "example": 1000 + }, + "type": { + "type": "string", + "enum": [ + "static", + "dynamic" + ], + "description": "Type of backend configuration. Allowed values are 'static' and 'dynamic'.", + "example": "static" + }, + "enabled": { + "type": "boolean", + "description": "Indicates whether the backend member is actively participating in load balancing.", + "example": true + }, + "backup": { + "type": "boolean", + "description": "Indicates whether this member serves as a backup, only receiving traffic when all primary members are unavailable.", + "example": false + }, + "created_at": { + "type": "string", + "examples": [ + "2023-01-01T00:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the backend member was created (RFC 3339 format)." + }, + "updated_at": { + "type": "string", + "examples": [ + "2023-01-02T00:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the backend member was last updated (RFC 3339 format)." + } + }, + "title": "Member", + "required": [ + "name", + "ip", + "port", + "weight", + "max_sessions", + "type", + "enabled", + "backup", + "created_at", + "updated_at" + ], + "description": "Represents a single backend member (server node) participating in a load balancer backend configuration." + }, + "loadBalancerBackendPropertiesResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "backend_id": { + "type": "integer", + "format": "int32", + "description": "Identifier of the backend.", + "example": 401 + }, + "outbound_proxy_protocol": { + "$ref": "#/components/schemas/loadBalancerProxyProtocolVersionOrDisabled" + }, + "timeout_server": { + "type": "integer", + "format": "int32", + "description": "Server timeout in milliseconds.", + "example": 30000 + }, + "timeout_tunnel": { + "type": "integer", + "format": "int32", + "description": "Tunnel timeout in milliseconds.", + "example": 30000 + }, + "health_check_type": { + "type": "string", + "description": "Type of health check.", + "example": "http" + }, + "health_check_interval": { + "type": "integer", + "format": "int32", + "description": "Interval between health checks in seconds.", + "example": 10 + }, + "health_check_fall": { + "type": "integer", + "format": "int32", + "description": "Number of failed checks before marking as unhealthy.", + "example": 3 + }, + "health_check_rise": { + "type": "integer", + "format": "int32", + "description": "Number of successful checks before marking as healthy.", + "example": 2 + }, + "health_check_url": { + "type": "string", + "description": "URL for HTTP health checks.", + "example": "/status" + }, + "health_check_expected_status": { + "type": "integer", + "format": "int32", + "description": "Expected HTTP status code from health check.", + "example": 200 + }, + "health_check_tls_verify": { + "type": "boolean", + "description": "Whether to verify TLS in health check.", + "example": true + }, + "health_check_on_down": { + "type": "string", + "description": "Action to take when backend is down.", + "example": "shutdown-sessions" + }, + "sticky_session_cookie_name": { + "type": [ + "string", + "null" + ], + "description": "Name of the sticky session cookie.", + "example": "SESSIONID" + }, + "sticky_session_cookie_attributes": { + "type": [ + "string", + "null" + ], + "description": "Additional cookie attributes appended to sticky session cookies. Supports combinations of: SameSite=Strict|Lax|None, Secure, HttpOnly, Partitioned (semicolon-separated).", + "example": "SameSite=Strict; Secure; HttpOnly" + }, + "tls_enabled": { + "type": "boolean", + "description": "Whether TLS is enabled.", + "example": true + }, + "tls_verify": { + "type": "boolean", + "description": "Whether to verify backend TLS certificate.", + "example": false + }, + "tls_use_system_ca": { + "type": "boolean", + "description": "Whether to use system CA for backend TLS.", + "example": true + }, + "http2_enabled": { + "type": "boolean", + "description": "Whether HTTP/2 is enabled for the backend.", + "example": true + } + }, + "title": "Backend Properties Response", + "required": [ + "backend_id", + "timeout_server", + "timeout_tunnel", + "health_check_type", + "health_check_interval", + "health_check_fall", + "health_check_rise", + "health_check_url", + "health_check_expected_status", + "health_check_tls_verify", + "health_check_on_down", + "tls_enabled", + "tls_verify", + "tls_use_system_ca", + "http2_enabled" + ], + "additionalProperties": false, + "description": "Properties of a backend configuration.", + "example": { + "backend_id": 401, + "outbound_proxy_protocol": "v2", + "timeout_server": 30000, + "timeout_tunnel": 30000, + "health_check_type": "http", + "health_check_interval": 10, + "health_check_fall": 3, + "health_check_rise": 2, + "health_check_url": "/status", + "health_check_expected_status": 200, + "health_check_tls_verify": true, + "health_check_on_down": "shutdown-sessions", + "sticky_session_cookie_name": "SESSIONID", + "sticky_session_cookie_attributes": "SameSite=Strict; Secure; HttpOnly", + "tls_enabled": true, + "tls_verify": false, + "tls_use_system_ca": true, + "http2_enabled": true + } + }, + "loadBalancerResolver": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "default-resolver", + "nameservers": [ + "94.237.127.9", + "94.237.40.9" + ], + "retries": 3, + "timeout": 1000, + "timeout_retry": 1500, + "cache_valid": 86400, + "cache_invalid": 60, + "created_at": "2025-11-06T09:00:00.000Z", + "updated_at": "2025-11-06T09:30:00.000Z" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Human-readable name assigned to the DNS resolver.", + "example": "default-resolver" + }, + "nameservers": { + "type": "array", + "items": { + "type": "string", + "format": "ipv4-port" + }, + "description": "List of DNS nameserver addresses (with optional port) used to resolve backend member hostnames.", + "example": [ + "1.1.1.1:53", + "8.8.8.8:53" + ] + }, + "retries": { + "type": "integer", + "format": "int32", + "description": "Number of retry attempts for failed DNS queries.", + "example": 3 + }, + "timeout": { + "type": "integer", + "format": "int32", + "description": "Initial timeout in milliseconds for DNS query responses.", + "example": 30 + }, + "timeout_retry": { + "type": "integer", + "format": "int32", + "description": "Timeout in milliseconds for DNS query retry attempts.", + "example": 5 + }, + "cache_valid": { + "type": "integer", + "format": "int32", + "description": "Time in seconds to cache valid (successful) DNS responses.", + "example": 60 + }, + "cache_invalid": { + "type": "integer", + "format": "int32", + "description": "Time in seconds to cache invalid (failed) DNS responses.", + "example": 5 + }, + "created_at": { + "type": "string", + "examples": [ + "2025-11-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the DNS resolver was created (RFC 3339 format)." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-12-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the DNS resolver was last updated (RFC 3339 format)." + } + }, + "title": "Resolver", + "required": [ + "name", + "nameservers", + "retries", + "timeout", + "timeout_retry", + "cache_valid", + "cache_invalid", + "created_at", + "updated_at" + ], + "description": "Represents a DNS resolver configuration for a load balancer service, defining the nameservers, retry behavior, and caching rules used to resolve backend hostnames." + }, + "loadBalancerNetwork": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "public-network", + "uuid": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d", + "type": "private", + "family": "IPv4", + "dns_name": "lb-network.local", + "created_at": "2025-11-06T09:00:00.000Z", + "updated_at": "2025-11-06T11:15:00.000Z" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Human-readable name assigned to the network.", + "example": "public-network" + }, + "uuid": { + "type": "string", + "description": "UUID represented as a string", + "example": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d" + }, + "type": { + "type": "string", + "description": "Network type indicating the visibility scope (public or private).", + "example": "public" + }, + "family": { + "type": "string", + "description": "IP address family used by this network (IPv4 or IPv6).", + "example": "IPv4" + }, + "dns_name": { + "type": "string", + "description": "Fully qualified domain name (FQDN) for accessing the load balancer through this network.", + "example": "lb-0a498284629e4629a55d0415a6e89dda-1.upcloudlb.com" + }, + "created_at": { + "type": "string", + "examples": [ + "2025-11-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the network was created (RFC 3339 format)." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-11-06T09:30:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the network was last updated (RFC 3339 format)." + } + }, + "title": "Network", + "required": [ + "name", + "uuid", + "type", + "family", + "created_at", + "updated_at" + ], + "additionalProperties": false, + "description": "Represent a network from where traffic is consumed and routed." + }, + "loadBalancerIpAddress": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "address": "192.168.1.10", + "network_name": "public-network", + "created_at": "2025-11-06T09:00:00.000Z", + "updated_at": "2025-11-06T11:15:00.000Z" + } + ], + "properties": { + "address": { + "type": "string", + "description": "IP address assigned to the load balancer service on this network.", + "example": "192.168.1.10" + }, + "network_name": { + "type": "string", + "description": "Name of the network to which this IP address belongs.", + "example": "public-network" + }, + "created_at": { + "type": "string", + "examples": [ + "2025-11-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the IP address was created (RFC 3339 format)." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-11-06T11:15:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the IP address was last updated (RFC 3339 format)." + } + }, + "title": "IP Address", + "required": [ + "address", + "network_name", + "created_at", + "updated_at" + ], + "description": "Represents an IP address associated with a network interface of the load balancer service, including addressing details and provisioning information." + }, + "loadBalancerLabelResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "environment", + "value": "production" + } + ], + "properties": { + "key": { + "type": "string", + "description": "Label key used for identification and filtering.", + "example": "environment" + }, + "value": { + "type": [ + "string", + "null" + ], + "description": "The value of the label (optional).", + "example": "production" + } + }, + "title": "Label Response", + "required": [ + "key" + ], + "additionalProperties": false, + "description": "Represents a key-value label associated with the load balancer service" + }, + "loadBalancerErrorResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "examples": [ + { + "error_message": "Authentication credentials wrong", + "error_code": "401" + } + ], + "properties": { + "error_message": { + "type": "string", + "description": "Error message describing the error." + }, + "error_code": { + "type": "string", + "description": "Error code associated with the error." + } + }, + "required": [ + "error_message", + "error_code" + ], + "description": "Error details containing the error message and code." + } + }, + "title": "ErrorResponse", + "additionalProperties": false, + "description": "Schema for error responses from the API." + }, + "loadBalancerFrontendsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerFrontend" + }, + "title": "Frontends Response", + "description": "An array of frontend configurations for a load balancer service." + }, + "loadBalancerFrontendTlsConfigsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerTlsConfig" + }, + "title": "Frontend TLS Configs Response", + "description": "Represents a list of TLS configurations for a frontend or backend, defining the certificate bundle and associated identifiers within the load balancer service." + }, + "loadBalancerBackendsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerBackend" + }, + "title": "Backends Response", + "description": "Response schema for a list of backends." + }, + "loadBalancerMembersResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerMember" + }, + "title": "Members Response", + "description": "Response schema for a list of members." + }, + "loadBalancerIpAddressesResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerIpAddress" + }, + "title": "IP Addresses Response", + "description": "A list of floating public IPv4 addresses attached to the load balancer service, each including its network interface metadata." + }, + "loadBalancerResolversResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerResolver" + }, + "title": "Resolvers Response", + "description": "Represents a list of DNS resolver configurations for a load balancer service." + }, + "loadBalancerServiceLabelsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerLabelResponse" + }, + "title": "Service Labels Response", + "description": "Represents a list of key-value label associated with the load balancer service" + }, + "loadBalancerMetrics": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "frontends": [], + "backends": [] + } + ], + "properties": { + "frontends": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerFrontendMetricsResponse" + }, + "description": "List of frontend metrics." + }, + "backends": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerBackendMetricsResponse" + }, + "description": "List of backend metrics." + } + }, + "title": "Metrics", + "required": [ + "frontends", + "backends" + ], + "additionalProperties": false, + "description": "Represents a snapshot of load balancer metrics collected by the monitoring agent, including frontend and backend statistics for a given service at a specific timestamp." + }, + "loadBalancerFrontendMetricsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/loadBalancerCommonMetricsResponse" + }, + { + "$ref": "#/components/schemas/loadBalancerRequestMetricsResponse" + } + ], + "properties": { + "frontend_id": { + "type": "integer", + "format": "int32", + "description": "Unique identifier for the frontend.", + "example": 301 + }, + "name": { + "type": "string", + "description": "Human-readable name of the frontend.", + "example": "frontend-http" + }, + "request_rate": { + "type": "integer", + "format": "int32", + "description": "Rate of incoming requests per second.", + "example": 120 + }, + "total_denied_connections": { + "type": "integer", + "format": "int32", + "description": "Total number of denied client connections.", + "example": 5 + }, + "total_denied_sessions": { + "type": "integer", + "format": "int32", + "description": "Total number of denied sessions due to connection or rule constraints.", + "example": 3 + }, + "total_invalid_requests": { + "type": "integer", + "format": "int32", + "description": "Total number of malformed or invalid HTTP requests received.", + "example": 7 + }, + "created_at": { + "type": "string", + "examples": [ + "2025-11-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp indicating when the frontend metrics entry was created." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-11-06T09:30:00.000Z" + ], + "format": "date-time", + "description": "Timestamp indicating when the frontend metrics entry was last updated." + } + }, + "title": "Frontend Metrics Response", + "required": [ + "frontend_id", + "name", + "request_rate", + "total_denied_connections", + "total_denied_sessions", + "total_invalid_requests", + "created_at", + "updated_at" + ], + "additionalProperties": false, + "description": "Represents aggregated performance and traffic metrics for a load balancer frontend, including connection statistics, HTTP response counts, and per-second request rates. Combines general metrics, request-specific metrics, and creation timestamps for observability and monitoring purposes." + }, + "loadBalancerCommonMetricsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "total_request_bytes": { + "type": "integer", + "format": "int64", + "description": "Total number of request bytes processed.", + "example": 12543000 + }, + "total_response_bytes": { + "type": "integer", + "format": "int64", + "description": "Total number of response bytes processed.", + "example": 11789000 + }, + "total_denied_responses": { + "type": "integer", + "format": "int32", + "description": "Total number of denied responses.", + "example": 2 + }, + "total_http_responses_1xx": { + "type": "integer", + "format": "int32", + "description": "Total number of HTTP 1xx informational responses.", + "example": 5 + }, + "total_http_responses_2xx": { + "type": "integer", + "format": "int32", + "description": "Total number of HTTP 2xx successful responses.", + "example": 984 + }, + "total_http_responses_3xx": { + "type": "integer", + "format": "int32", + "description": "Total number of HTTP 3xx redirection responses.", + "example": 45 + }, + "total_http_responses_4xx": { + "type": "integer", + "format": "int32", + "description": "Total number of HTTP 4xx client error responses.", + "example": 22 + }, + "total_http_responses_5xx": { + "type": "integer", + "format": "int32", + "description": "Total number of HTTP 5xx server error responses.", + "example": 8 + }, + "total_http_responses_other": { + "type": "integer", + "format": "int32", + "description": "Total number of HTTP responses outside the standard 1xx–5xx range.", + "example": 0 + }, + "total_sessions": { + "type": "integer", + "format": "int32", + "description": "Total number of sessions handled.", + "example": 1100 + }, + "session_rate": { + "type": "integer", + "format": "int32", + "description": "Average rate of sessions per second.", + "example": 25 + }, + "current_sessions": { + "type": "integer", + "format": "int32", + "description": "Current number of active sessions.", + "example": 4 + } + }, + "title": "Common Metrics Response", + "required": [ + "total_request_bytes", + "total_response_bytes", + "total_denied_responses", + "total_http_responses_1xx", + "total_http_responses_2xx", + "total_http_responses_3xx", + "total_http_responses_4xx", + "total_http_responses_5xx", + "total_http_responses_other", + "total_sessions", + "session_rate", + "current_sessions" + ], + "additionalProperties": false, + "description": "Represents general traffic and session statistics collected for a load balancer frontend or backend, including request and response byte counts, HTTP status distribution, and session activity metrics." + }, + "loadBalancerRequestMetricsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "total_http_requests": { + "type": "integer", + "format": "int32", + "description": "Total number of HTTP requests processed.", + "example": 12500 + }, + "total_denied_requests": { + "type": "integer", + "format": "int32", + "description": "Total number of denied HTTP requests.", + "example": 35 + }, + "total_intercepted_requests": { + "type": "integer", + "format": "int32", + "description": "Total number of intercepted HTTP requests by internal rules or actions.", + "example": 12 + } + }, + "title": "Request Metrics Response", + "required": [ + "total_http_requests", + "total_denied_requests", + "total_intercepted_requests" + ], + "additionalProperties": false, + "description": "Represents basic HTTP request statistics collected by the load balancer, including the total number of processed, denied, and intercepted requests." + }, + "loadBalancerBackendMetricsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/loadBalancerCommonMetricsResponse" + }, + { + "$ref": "#/components/schemas/loadBalancerServerMetricsResponse" + }, + { + "$ref": "#/components/schemas/loadBalancerAvgTimeMetricsResponse" + } + ], + "properties": { + "backend_id": { + "type": "integer", + "format": "int32", + "description": "Unique identifier for the backend.", + "example": 401 + }, + "name": { + "type": "string", + "description": "Human-readable name of the backend.", + "example": "backend-api" + }, + "downtime_s": { + "type": "integer", + "format": "int32", + "description": "Total downtime duration in seconds.", + "example": 45 + }, + "active_servers": { + "type": "integer", + "format": "int32", + "description": "Number of currently active servers in the backend.", + "example": 3 + }, + "backup_servers": { + "type": "integer", + "format": "int32", + "description": "Number of backup servers available for failover.", + "example": 1 + }, + "members": { + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerMemberMetricsResponse" + }, + "description": "List of metrics for individual backend members (servers)." + }, + "created_at": { + "type": "string", + "examples": [ + "2025-11-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the backend metrics record was created." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-11-06T09:30:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when the backend metrics record was last updated." + } + }, + "title": "Backend Metrics Response", + "required": [ + "backend_id", + "name", + "downtime_s", + "active_servers", + "backup_servers", + "members", + "created_at", + "updated_at" + ], + "additionalProperties": false, + "description": "Represents collected performance, availability, and traffic statistics for a load balancer backend, including member activity, response times, and aggregated server metrics." + }, + "loadBalancerServerMetricsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "total_failed_checks_transitions": { + "type": "integer", + "format": "int32", + "description": "Total number of times the server transitioned from healthy to failed state due to failed health checks.", + "example": 3 + }, + "total_client_aborted": { + "type": "integer", + "format": "int32", + "description": "Total number of sessions aborted by clients before completion.", + "example": 12 + }, + "total_failed_connections": { + "type": "integer", + "format": "int32", + "description": "Total number of failed connection attempts to the server.", + "example": 5 + }, + "total_invalid_responses": { + "type": "integer", + "format": "int32", + "description": "Total number of invalid responses received from the server.", + "example": 2 + }, + "total_routed_requests": { + "type": "integer", + "format": "int32", + "description": "Total number of requests successfully routed to the server.", + "example": 14892 + }, + "total_server_aborted": { + "type": "integer", + "format": "int32", + "description": "Total number of sessions aborted by the server before completion.", + "example": 4 + }, + "total_server_redispatches": { + "type": "integer", + "format": "int32", + "description": "Total number of requests that were redispatched to another server after failure.", + "example": 7 + }, + "total_server_connection_retries": { + "type": "integer", + "format": "int32", + "description": "Total number of retries attempted for failed server connections.", + "example": 9 + }, + "connections_waiting": { + "type": "integer", + "format": "int32", + "description": "Current number of connections waiting for a server slot.", + "example": 1 + } + }, + "title": "Server Metrics Response", + "required": [ + "total_failed_checks_transitions", + "total_client_aborted", + "total_failed_connections", + "total_invalid_responses", + "total_routed_requests", + "total_server_aborted", + "total_server_redispatches", + "total_server_connection_retries", + "connections_waiting" + ], + "additionalProperties": false, + "description": "Represents detailed server-level performance and reliability metrics, including connection errors, aborted sessions, and routing statistics for a load balancer backend member." + }, + "loadBalancerAvgTimeMetricsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "avg_connection_time_ms": { + "type": "integer", + "format": "int32", + "description": "Average time taken to establish a connection in milliseconds.", + "example": 12 + }, + "avg_queue_time_ms": { + "type": "integer", + "format": "int32", + "description": "Average time spent in queue before being processed, in milliseconds.", + "example": 5 + }, + "avg_server_response_time_ms": { + "type": "integer", + "format": "int32", + "description": "Average server response time in milliseconds.", + "example": 28 + }, + "avg_total_time_ms": { + "type": "integer", + "format": "int32", + "description": "Average total time from connection start to response completion, in milliseconds.", + "example": 45 + } + }, + "title": "Avg Time Metrics Response", + "required": [ + "avg_connection_time_ms", + "avg_queue_time_ms", + "avg_server_response_time_ms", + "avg_total_time_ms" + ], + "additionalProperties": false, + "description": "Represents average timing statistics for backend performance, including connection establishment, queuing, server response, and total transaction times, all measured in milliseconds." + }, + "loadBalancerMemberMetricsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/loadBalancerCommonMetricsResponse" + }, + { + "$ref": "#/components/schemas/loadBalancerServerMetricsResponse" + }, + { + "$ref": "#/components/schemas/loadBalancerAvgTimeMetricsResponse" + } + ], + "properties": { + "member_id": { + "type": "integer", + "format": "int32", + "description": "Unique identifier of the backend member.", + "example": 101 + }, + "name": { + "type": "string", + "description": "Human-readable name of the backend member.", + "example": "backend-member-1" + }, + "backend_id": { + "type": "integer", + "format": "int32", + "description": "Identifier of the backend this member belongs to.", + "example": 401 + }, + "status": { + "type": "string", + "enum": [ + "up", + "down", + "unknown", + "maint", + "drain" + ], + "description": "Current operational status of the member.", + "example": "up" + }, + "check_status": { + "type": "string", + "enum": [ + "checking", + "failed", + "passing", + "unknown" + ], + "description": "Result of the latest health check for the member.", + "example": "passing" + }, + "check_http_code": { + "type": "integer", + "format": "int32", + "description": "HTTP status code returned by the last health check (if applicable).", + "example": 200 + }, + "last_check_content": { + "type": "string", + "description": "Response content returned by the last health check.", + "example": "OK" + }, + "last_check_desc": { + "type": "string", + "description": "Description or additional diagnostic information from the last health check.", + "example": "Health check passed successfully." + }, + "total_failed_checks": { + "type": "integer", + "format": "int32", + "description": "Total number of failed health checks recorded for this member.", + "example": 2 + }, + "created_at": { + "type": "string", + "examples": [ + "2025-11-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp of when the member was created." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-11-06T09:30:00.000Z" + ], + "format": "date-time", + "description": "Timestamp of when the member metrics were last updated." + } + }, + "title": "Member Metrics Response", + "required": [ + "member_id", + "name", + "backend_id", + "status", + "check_status", + "check_http_code", + "total_failed_checks", + "created_at", + "updated_at" + ], + "additionalProperties": false, + "description": "Represents detailed performance and health metrics for an individual backend member (server) within a load balancer. Includes operational status, health check results, and aggregated traffic and timing statistics." + }, + "loadBalancerMetricsSeriesResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerMetrics" + }, + "title": "Metrics Series Response", + "description": "Response schema for a mapping of metric series identifiers to their corresponding metrics data." + }, + "loadBalancerFrontendMetricsSeriesResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerFrontendMetricsSeries" + }, + "title": "Frontend Metrics Series Response", + "description": "Response schema for a list of frontend metrics series." + }, + "loadBalancerFrontendMetricsSeries": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "start_at": "2025-11-06T09:00:00.000Z", + "end_at": "2025-11-06T09:05:00.000Z", + "frontends": [ + "frontend-http", + "frontend-https" + ], + "denied_connections": 15, + "denied_sessions": 8, + "invalid_requests": 12, + "request_bytes": 15432000, + "response_bytes": 14321000, + "denied_responses": 6, + "http_responses_1xx": 2, + "http_responses_2xx": 940, + "http_responses_3xx": 47, + "http_responses_4xx": 33, + "http_responses_5xx": 12, + "http_responses_other": 0, + "sessions": 1040, + "http_requests": 15000, + "denied_requests": 28, + "intercepted_requests": 9 + } + ], + "properties": { + "start_at": { + "type": "string", + "examples": [ + "2025-11-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp marking the beginning of the metrics aggregation period." + }, + "end_at": { + "type": "string", + "examples": [ + "2025-11-06T09:05:00.000Z" + ], + "format": "date-time", + "description": "Timestamp marking the end of the metrics aggregation period." + }, + "frontends": { + "type": "array", + "items": { + "type": "string", + "example": "frontend-http" + }, + "description": "List of frontend names or identifiers included in the aggregated data.", + "example": [ + "frontend-http", + "frontend-https" + ] + }, + "denied_connections": { + "type": "integer", + "format": "int32", + "description": "Total number of denied frontend connections within the time range.", + "example": 15 + }, + "denied_sessions": { + "type": "integer", + "format": "int32", + "description": "Total number of denied sessions during the period.", + "example": 8 + }, + "invalid_requests": { + "type": "integer", + "format": "int32", + "description": "Number of malformed or invalid HTTP requests received.", + "example": 12 + }, + "request_bytes": { + "type": "integer", + "format": "int32", + "description": "Total size of incoming request payloads, in bytes.", + "example": 15432000 + }, + "response_bytes": { + "type": "integer", + "format": "int32", + "description": "Total size of outgoing response payloads, in bytes.", + "example": 14321000 + }, + "denied_responses": { + "type": "integer", + "format": "int32", + "description": "Number of HTTP responses that were denied or rejected.", + "example": 6 + }, + "http_responses_1xx": { + "type": "integer", + "format": "int32", + "description": "Count of informational (1xx) HTTP responses.", + "example": 2 + }, + "http_responses_2xx": { + "type": "integer", + "format": "int32", + "description": "Count of successful (2xx) HTTP responses.", + "example": 940 + }, + "http_responses_3xx": { + "type": "integer", + "format": "int32", + "description": "Count of redirection (3xx) HTTP responses.", + "example": 47 + }, + "http_responses_4xx": { + "type": "integer", + "format": "int32", + "description": "Count of client error (4xx) HTTP responses.", + "example": 33 + }, + "http_responses_5xx": { + "type": "integer", + "format": "int32", + "description": "Count of server error (5xx) HTTP responses.", + "example": 12 + }, + "http_responses_other": { + "type": "integer", + "format": "int32", + "description": "Count of HTTP responses with codes outside the 1xx–5xx range.", + "example": 0 + }, + "sessions": { + "type": "integer", + "format": "int32", + "description": "Total number of frontend sessions handled.", + "example": 1040 + }, + "http_requests": { + "type": "integer", + "format": "int32", + "description": "Total number of HTTP requests processed during the aggregation period.", + "example": 15000 + }, + "denied_requests": { + "type": "integer", + "format": "int32", + "description": "Total number of HTTP requests denied.", + "example": 28 + }, + "intercepted_requests": { + "type": "integer", + "format": "int32", + "description": "Number of requests intercepted before reaching the backend.", + "example": 9 + } + }, + "title": "Frontend Metrics Series", + "required": [ + "start_at", + "end_at", + "frontends" + ], + "additionalProperties": false, + "description": "Aggregated time-series metrics for load balancer frontends, representing cumulative statistics between a start and end timestamp across one or more frontend instances." + }, + "loadBalancerBackendMetricsSeriesResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [] + ], + "items": { + "$ref": "#/components/schemas/loadBalancerBackendMetricsSeries" + }, + "title": "Backend Metrics Series Response", + "description": "Response schema for a list of backend metrics series." + }, + "loadBalancerBackendMetricsSeries": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "start_at": { + "type": "string", + "examples": [ + "2025-11-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp marking the start of the metrics collection period." + }, + "end_at": { + "type": "string", + "examples": [ + "2025-11-06T10:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp marking the end of the metrics collection period." + }, + "backends": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of backend identifiers included in the metrics series.", + "example": [ + "backend-api", + "backend-web" + ] + }, + "request_bytes": { + "type": "integer", + "format": "int64", + "description": "Total number of request bytes processed.", + "example": 12345678 + }, + "response_bytes": { + "type": "integer", + "format": "int64", + "description": "Total number of response bytes sent.", + "example": 11876543 + }, + "denied_responses": { + "type": "integer", + "format": "int32", + "description": "Total number of denied responses.", + "example": 12 + }, + "http_responses_1xx": { + "type": "integer", + "format": "int32", + "description": "Count of HTTP 1xx informational responses.", + "example": 2 + }, + "http_responses_2xx": { + "type": "integer", + "format": "int32", + "description": "Count of HTTP 2xx successful responses.", + "example": 9500 + }, + "http_responses_3xx": { + "type": "integer", + "format": "int32", + "description": "Count of HTTP 3xx redirection responses.", + "example": 35 + }, + "http_responses_4xx": { + "type": "integer", + "format": "int32", + "description": "Count of HTTP 4xx client error responses.", + "example": 18 + }, + "http_responses_5xx": { + "type": "integer", + "format": "int32", + "description": "Count of HTTP 5xx server error responses.", + "example": 6 + }, + "http_responses_other": { + "type": "integer", + "format": "int32", + "description": "Count of HTTP responses outside the 1xx–5xx range.", + "example": 0 + }, + "sessions": { + "type": "integer", + "format": "int32", + "description": "Total number of sessions.", + "example": 220 + }, + "downtime": { + "type": "integer", + "format": "int32", + "description": "Total downtime in seconds.", + "example": 45 + }, + "failed_checks_transitions": { + "type": "integer", + "format": "int32", + "description": "Number of transitions from healthy to failed health checks.", + "example": 3 + }, + "client_aborted": { + "type": "integer", + "format": "int32", + "description": "Number of client-aborted connections.", + "example": 5 + }, + "failed_connections": { + "type": "integer", + "format": "int32", + "description": "Number of failed connections.", + "example": 2 + }, + "invalid_responses": { + "type": "integer", + "format": "int32", + "description": "Number of invalid responses.", + "example": 1 + }, + "routed_requests": { + "type": "integer", + "format": "int32", + "description": "Number of routed requests.", + "example": 15200 + }, + "server_aborted": { + "type": "integer", + "format": "int32", + "description": "Number of server-aborted connections.", + "example": 2 + }, + "server_redispatches": { + "type": "integer", + "format": "int32", + "description": "Number of server redispatches.", + "example": 3 + }, + "server_connection_retries": { + "type": "integer", + "format": "int32", + "description": "Number of server connection retries.", + "example": 4 + } + }, + "title": "Backend Metrics Series", + "required": [ + "start_at", + "end_at", + "backends" + ], + "additionalProperties": false, + "description": "Aggregated performance, availability, and traffic statistics for a load balancer backend, including member metrics and average timing metrics." + }, + "loadBalancerMemberMetricsSeriesResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "start_at": "2025-11-06T09:00:00.000Z", + "end_at": "2025-11-06T10:00:00.000Z", + "members": [ + "backend-member-1", + "backend-member-2" + ], + "request_bytes": 12345678, + "response_bytes": 11876543, + "denied_responses": 12, + "http_responses_1xx": 2, + "http_responses_2xx": 9500, + "http_responses_3xx": 35, + "http_responses_4xx": 18, + "http_responses_5xx": 6, + "http_responses_other": 0, + "sessions": 220, + "downtime": 45, + "failed_checks_transitions": 3, + "client_aborted": 7, + "failed_connections": 2, + "invalid_responses": 1, + "routed_requests": 10234, + "server_aborted": 4, + "server_redispatches": 5, + "server_connection_retries": 9, + "failed_checks": 15 + } + ], + "properties": { + "start_at": { + "type": "string", + "examples": [ + "2025-11-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp marking the start of the metrics collection period." + }, + "end_at": { + "type": "string", + "examples": [ + "2025-11-06T10:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp marking the end of the metrics collection period." + }, + "members": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of backend member identifiers included in the metrics series.", + "example": [ + "backend-member-1", + "backend-member-2" + ] + }, + "request_bytes": { + "type": "integer", + "format": "int64", + "description": "Total number of request bytes processed by all members in the series.", + "example": 12345678 + }, + "response_bytes": { + "type": "integer", + "format": "int64", + "description": "Total number of response bytes sent by all members.", + "example": 11876543 + }, + "denied_responses": { + "type": "integer", + "format": "int32", + "description": "Total number of denied responses returned during the period.", + "example": 12 + }, + "http_responses_1xx": { + "type": "integer", + "format": "int32", + "description": "Count of HTTP 1xx informational responses.", + "example": 2 + }, + "http_responses_2xx": { + "type": "integer", + "format": "int32", + "description": "Count of HTTP 2xx successful responses.", + "example": 9500 + }, + "http_responses_3xx": { + "type": "integer", + "format": "int32", + "description": "Count of HTTP 3xx redirection responses.", + "example": 35 + }, + "http_responses_4xx": { + "type": "integer", + "format": "int32", + "description": "Count of HTTP 4xx client error responses.", + "example": 18 + }, + "http_responses_5xx": { + "type": "integer", + "format": "int32", + "description": "Count of HTTP 5xx server error responses.", + "example": 6 + }, + "http_responses_other": { + "type": "integer", + "format": "int32", + "description": "Count of HTTP responses outside the 1xx–5xx range.", + "example": 0 + }, + "sessions": { + "type": "integer", + "format": "int32", + "description": "Total number of active or completed sessions during the metrics window.", + "example": 220 + }, + "downtime": { + "type": "integer", + "format": "int32", + "description": "Total downtime duration in seconds.", + "example": 45 + }, + "failed_checks_transitions": { + "type": "integer", + "format": "int32", + "description": "Number of transitions from healthy to failed health checks detected during the period.", + "example": 3 + }, + "client_aborted": { + "type": "integer", + "format": "int32", + "description": "Number of connections aborted by the client.", + "example": 7 + }, + "failed_connections": { + "type": "integer", + "format": "int32", + "description": "Number of backend connection attempts that failed.", + "example": 2 + }, + "invalid_responses": { + "type": "integer", + "format": "int32", + "description": "Number of invalid or malformed responses detected.", + "example": 1 + }, + "routed_requests": { + "type": "integer", + "format": "int32", + "description": "Total number of requests successfully routed to the backend members.", + "example": 10234 + }, + "server_aborted": { + "type": "integer", + "format": "int32", + "description": "Number of connections aborted by the backend server.", + "example": 4 + }, + "server_redispatches": { + "type": "integer", + "format": "int32", + "description": "Number of requests redispatched to another backend member after an initial failure.", + "example": 5 + }, + "server_connection_retries": { + "type": "integer", + "format": "int32", + "description": "Number of backend connection retry attempts.", + "example": 9 + }, + "failed_checks": { + "type": "integer", + "format": "int32", + "description": "Total number of failed health checks for all members combined.", + "example": 15 + } + }, + "title": "Member Metrics Series Response", + "required": [ + "start_at", + "end_at", + "members" + ], + "additionalProperties": false, + "description": "Aggregated time-series metrics for backend members, showing request and response statistics, connection health, and server performance during a given time window." + }, + "loadBalancerCertificatesBundleResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerCertificateBundle" + }, + "title": "Certificates Bundle Response", + "description": "Response schema for a list of certificate bundles." + }, + "loadBalancerCertificateBundle": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "uuid": "8d2f4a1e-0e3f-44a9-a0f5-9b8c84e9c701", + "name": "mydomain-cert-bundle", + "tls_type": "dynamic", + "operational_state": "setup-challenge", + "hostnames": [ + "example.com", + "www.example.com" + ], + "key_type": "rsa", + "labels": [], + "not_before": "2025-11-06T09:00:00.000Z", + "not_after": "2026-11-06T09:00:00.000Z", + "created_at": "2025-11-06T09:00:00.000Z", + "updated_at": "2025-11-06T11:00:00.000Z" + } + ], + "properties": { + "uuid": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the certificate bundle.", + "example": "8d2f4a1e-0e3f-44a9-a0f5-9b8c84e9c701" + }, + "name": { + "type": "string", + "description": "Human-readable name assigned to the certificate bundle.", + "example": "mydomain-cert-bundle" + }, + "tls_type": { + "type": "string", + "enum": [ + "manual", + "dynamic", + "authority" + ], + "description": "The certificate bundle type. Determines how the certificate is provisioned and managed.", + "example": "dynamic" + }, + "operational_state": { + "type": "string", + "enum": [ + "pending", + "setup-challenge", + "complete-challenge", + "idle", + "failed-challenge" + ], + "description": "Current operational state of the certificate bundle.", + "example": "pending" + }, + "certificate": { + "type": "string", + "description": "PEM-encoded certificate data (base64).", + "contentEncoding": "base64", + "example": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t..." + }, + "intermediates": { + "type": "string", + "description": "PEM-encoded intermediate certificates (base64).", + "contentEncoding": "base64", + "example": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t..." + }, + "hostnames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of hostnames covered by this certificate bundle.", + "example": [ + "example.com", + "www.example.com" + ] + }, + "challenge_problems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerChallengeProblemResponse" + }, + "description": "Problems reported during ACME challenge validation." + }, + "key_type": { + "type": "string", + "enum": [ + "rsa", + "ecdsa" + ], + "description": "Type of private key used for this certificate bundle.", + "example": "rsa" + }, + "services": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerEmbeddedServiceResponse" + }, + "description": "List of load balancer services that use this certificate bundle." + }, + "not_before": { + "type": "string", + "examples": [ + "2025-11-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "The start date and time of certificate validity." + }, + "not_after": { + "type": "string", + "examples": [ + "2026-11-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "The expiration date and time of certificate validity." + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerLabelResponse" + }, + "description": "List of labels attached to this certificate bundle." + }, + "created_at": { + "type": "string", + "examples": [ + "2025-11-06T09:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when this certificate bundle was created." + }, + "updated_at": { + "type": "string", + "examples": [ + "2025-11-06T11:00:00.000Z" + ], + "format": "date-time", + "description": "Timestamp when this certificate bundle was last updated." + } + }, + "title": "Certificate Bundle", + "required": [ + "uuid", + "name", + "tls_type", + "operational_state", + "created_at", + "updated_at" + ], + "additionalProperties": false, + "description": "Represents a certificate bundle used in a load balancer TLS configuration. A bundle may be manually uploaded, dynamically issued via ACME, or represent an authority certificate. It includes certificate data, challenge details, and metadata about its lifecycle." + }, + "loadBalancerChallengeProblemResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "hostname": { + "type": "string", + "description": "The hostname for which the ACME challenge validation failed or encountered an error.", + "example": "example.com" + }, + "problem": { + "$ref": "#/components/schemas/loadBalancerProblemResponse" + } + }, + "title": "Challenge Problem Response", + "required": [ + "hostname", + "problem" + ], + "additionalProperties": false, + "description": "Represents a problem encountered during ACME challenge validation for a specific hostname. Includes detailed error information following the Problem Details (RFC7807) format.", + "example": { + "hostname": "example.com", + "problem": { + "type": "https://api.example.com/problems/dns-lookup-failed", + "title": "DNS lookup failed", + "detail": "The DNS resolver could not resolve the domain name 'example.com'.", + "status": 400, + "correlation_id": "req-7b39a1c9b6a14e07b9d4c2a4c5d8b7f2" + } + } + }, + "loadBalancerProblemResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "type": { + "type": "string", + "format": "uri", + "description": "A URI reference identifying the problem type. When dereferenced, it typically provides human-readable documentation for the error.", + "example": "https://api.example.com/problems/invalid-request" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type. This value should not vary between occurrences of the same error type.", + "example": "Invalid request" + }, + "detail": { + "type": "string", + "description": "A human-readable explanation specific to this occurrence of the problem.", + "example": "The provided domain name is not valid." + }, + "status": { + "type": "integer", + "format": "int64", + "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", + "example": 400 + }, + "invalid_params": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerProblemInvalidParamResponse" + }, + "description": "A list of invalid parameters that caused the problem. Used to provide detailed feedback for validation errors.", + "example": [ + { + "name": "hostnames[0]", + "reason": "Invalid domain name format" + } + ] + }, + "correlation_id": { + "type": "string", + "format": "uuid", + "description": "A unique identifier for this error instance, useful for tracing or debugging requests.", + "example": "req-8b29d3a6a4cf4d22a17e2b8e31cd4a12" + } + }, + "title": "Problem Response", + "required": [ + "type", + "title", + "status" + ], + "additionalProperties": false, + "description": "Represents an error object following the Problem Details specification (RFC7807). Provides machine-readable and human-readable information about an error that occurred while processing a request.", + "example": { + "type": "https://api.example.com/problems/invalid-request", + "title": "Invalid request", + "detail": "The provided domain name is not valid.", + "status": 400, + "invalid_params": [ + { + "name": "hostnames[0]", + "reason": "Invalid domain name format" + } + ], + "correlation_id": "req-8b29d3a6a4cf4d22a17e2b8e31cd4a12" + } + }, + "loadBalancerProblemInvalidParamResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the parameter or form field that caused the validation error. It can include structural delimiters to indicate nested fields (e.g., 'data.attributes.email').", + "example": "hostnames[0]" + }, + "reason": { + "type": "string", + "description": "A human-readable message explaining why the parameter value was invalid, either syntactically or semantically.", + "example": "Invalid domain name format" + } + }, + "title": "Problem Invalid Param Response", + "required": [ + "name", + "reason" + ], + "additionalProperties": false, + "description": "Provides detailed information about a specific invalid parameter that caused a request to fail validation, as an extension of RFC7807 Problem Details.", + "example": { + "name": "hostnames[0]", + "reason": "Invalid domain name format" + } + }, + "loadBalancerEmbeddedServiceResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the load balancer service.", + "example": "d9f1b2a4-5c8d-4b73-91e0-8d5a0dc2e734" + }, + "name": { + "type": "string", + "description": "Human-readable name of the embedded service.", + "example": "customer-service-lb" + }, + "frontends": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerEmbeddedFrontendResponse" + }, + "description": "List of frontends associated with the service. Each frontend defines how client connections are received.", + "example": [ + { + "name": "frontend-http", + "tls_configs": [ + { + "id": 42, + "name": "frontend-tls-config", + "frontend_id": 7, + "backend_id": 12, + "certificate_bundle_uuid": "a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001", + "created_at": "2025-11-06T10:15:00.000Z", + "updated_at": "2025-11-06T11:00:00.000Z" + } + ] + } + ] + }, + "backends": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerEmbeddedBackendResponse" + }, + "description": "List of backends associated with the service. Each backend defines how traffic is distributed to target servers.", + "example": [ + { + "name": "backend-app", + "tls_configs": [ + { + "id": 56, + "name": "backend-tls-config", + "frontend_id": 7, + "backend_id": 9, + "certificate_bundle_uuid": "b1a5f3d8-2b3e-4b61-981f-d42cfb9a43e2", + "created_at": "2025-11-06T10:45:00.000Z", + "updated_at": "2025-11-06T11:20:00.000Z" + } + ] + } + ] + }, + "deleted": { + "type": "boolean", + "description": "Indicates whether the service has been marked as deleted.", + "example": false + } + }, + "title": "Embedded Service Response", + "required": [ + "uuid", + "name" + ], + "additionalProperties": false, + "description": "Represents a minimal embedded reference to a load balancer service, including its UUID, name, and lists of associated frontends and backends.", + "example": { + "uuid": "d9f1b2a4-5c8d-4b73-91e0-8d5a0dc2e734", + "name": "customer-service-lb", + "frontends": [ + { + "name": "frontend-http", + "tls_configs": [ + { + "id": 42, + "name": "frontend-tls-config", + "frontend_id": 7, + "backend_id": 12, + "certificate_bundle_uuid": "a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001", + "created_at": "2025-11-06T10:15:00.000Z", + "updated_at": "2025-11-06T11:00:00.000Z" + } + ] + } + ], + "backends": [ + { + "name": "backend-app", + "tls_configs": [ + { + "id": 56, + "name": "backend-tls-config", + "frontend_id": 7, + "backend_id": 9, + "certificate_bundle_uuid": "b1a5f3d8-2b3e-4b61-981f-d42cfb9a43e2", + "created_at": "2025-11-06T10:45:00.000Z", + "updated_at": "2025-11-06T11:20:00.000Z" + } + ] + } + ], + "deleted": false + } + }, + "loadBalancerEmbeddedFrontendResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Human-readable name of the embedded frontend within the load balancer service.", + "example": "frontend-http" + }, + "tls_configs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerTlsConfig" + }, + "description": "List of TLS configuration objects associated with this frontend. Each entry references a certificate bundle used for secure connections.", + "example": [ + { + "id": 42, + "name": "frontend-tls-config", + "frontend_id": 7, + "backend_id": 12, + "certificate_bundle_uuid": "a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001", + "created_at": "2025-11-06T10:15:00.000Z", + "updated_at": "2025-11-06T11:00:00.000Z" + } + ] + } + }, + "title": "Embedded Frontend Response", + "required": [ + "name" + ], + "additionalProperties": false, + "description": "Represents a minimal embedded reference to a frontend within a load balancer service, including its name and any associated TLS configurations.", + "example": { + "name": "frontend-http", + "tls_configs": [ + { + "id": 42, + "name": "frontend-tls-config", + "frontend_id": 7, + "backend_id": 12, + "certificate_bundle_uuid": "a4b9f1a3-9b7c-4f21-8b33-fd68efb7c001", + "created_at": "2025-11-06T10:15:00.000Z", + "updated_at": "2025-11-06T11:00:00.000Z" + } + ] + } + }, + "loadBalancerEmbeddedBackendResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Human-readable name of the embedded backend within the load balancer service.", + "example": "backend-app" + }, + "tls_configs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerTlsConfig" + }, + "description": "List of TLS configuration objects associated with this backend. Each entry defines a certificate bundle used for secure connections to backend servers.", + "example": [ + { + "id": 56, + "name": "backend-tls-config", + "frontend_id": 7, + "backend_id": 9, + "certificate_bundle_uuid": "b1a5f3d8-2b3e-4b61-981f-d42cfb9a43e2", + "created_at": "2025-11-06T10:45:00.000Z", + "updated_at": "2025-11-06T11:20:00.000Z" + } + ] + } + }, + "title": "Embedded Backend Response", + "required": [ + "name" + ], + "additionalProperties": false, + "description": "Represents a minimal embedded reference to a backend within the load balancer service, including its name and associated TLS configurations.", + "example": { + "name": "backend-app", + "tls_configs": [ + { + "id": 56, + "name": "backend-tls-config", + "frontend_id": 7, + "backend_id": 9, + "certificate_bundle_uuid": "b1a5f3d8-2b3e-4b61-981f-d42cfb9a43e2", + "created_at": "2025-11-06T10:45:00.000Z", + "updated_at": "2025-11-06T11:20:00.000Z" + } + ] + } + }, + "loadBalancerCertificateBundleLabelsResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerLabelResponse" + }, + "title": "Certificate Bundle Labels Response", + "description": "Represents a list of label key-value pairs attached to a certificate bundle within the load-balancer service, used for resource classification, billing and filtering." + }, + "loadBalancerDnsChallengeDomainResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "The DNS challenge domain to use for ACME validation.", + "example": "_acme-challenge.example.upcloudlb.com" + } + }, + "title": "DNS Challenge Domain Response", + "required": [ + "domain" + ], + "additionalProperties": false, + "description": "Response schema for DNS challenge domain information." + }, + "loadBalancerPlansResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "$ref": "#/components/schemas/loadBalancerPlan" + }, + "title": "Plans Response", + "description": "List of available load balancer plans, each defining the node size, performance characteristics, and associated pricing options." + }, + "loadBalancerPlan": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the plan.", + "example": "development" + }, + "server_number": { + "type": "integer", + "format": "int32", + "description": "Number of servers included in the plan.", + "example": 2 + }, + "per_server_max_sessions": { + "type": "integer", + "format": "int32", + "description": "Maximum number of sessions allowed per server.", + "example": 100 + } + }, + "title": "Plan", + "additionalProperties": false, + "description": "Represents a load balancer plan, defining the node size, performance characteristics, and associated pricing options." + }, + "firewallRulesetVersion": { + "type": "integer", + "examples": [ + 1, + 678 + ], + "title": "Firewall Ruleset Version", + "minimum": 1, + "format": "int64", + "description": "The firewall ruleset version." + }, + "createFirewallRuleset": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "example_firewall_ruleset", + "stateful": true, + "enabled": false, + "default_dns_rules_enabled": false + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the firewall ruleset" + }, + "description": { + "type": "string", + "maxLength": 250, + "description": "Description of the firewall ruleset" + }, + "stateful": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + }, + "default_dns_rules_enabled": { + "type": "boolean" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/firewallRulesetCreateLabel" + }, + "maxItems": 255, + "description": "Labels" + } + }, + "title": "Create Firewall Ruleset", + "required": [ + "name" + ], + "additionalProperties": false, + "description": "Create firewall ruleset" + }, + "firewallRulesetModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "name": "modified_example_firewall_ruleset", + "description": "Modified example stateless firewall ruleset", + "enabled": false, + "labels": [] + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the ruleset" + }, + "description": { + "type": "string", + "maxLength": 250, + "description": "Description of the firewall ruleset" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/firewallRulesetCreateLabel" + }, + "maxItems": 255, + "description": "Labels" + }, + "enabled": { + "type": "boolean", + "description": "Enabled" + }, + "default_dns_rules_enabled": { + "type": "boolean" + } + }, + "title": "Firewall ruleset modify", + "additionalProperties": false, + "description": "Modify firewall ruleset" + }, + "firewallRulesetListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "uuid": "1200ecde-db95-4d1c-9133-6508f3232567", + "name": "example_stateless_firewall_ruleset", + "description": "Example stateless firewall ruleset", + "stateful": false, + "enabled": true, + "default_dns_rules_enabled": false, + "labels": [ + { + "key": "example-key", + "value": "example-value" + } + ], + "server_uuid": "03aa7245-2ff9-49c8-9f0e-7ca0270d71a4" + }, + { + "uuid": "1200ecde-db95-4d1c-9133-6508f3232445", + "name": "example_stateful_firewall_ruleset", + "description": "Example stateful firewall ruleset", + "stateful": true, + "enabled": true, + "default_dns_rules_enabled": false, + "labels": [ + { + "key": "example-key", + "value": "example-value" + } + ] + } + ] + ], + "items": { + "$ref": "#/components/schemas/firewallRulesetDetailResponse" + }, + "title": "Firewall Ruleset List Response", + "description": "Response schema for a list of firewall rulesets." + }, + "firewallRulesetDetailResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "uuid": "1200ecde-db95-4d1c-9133-6508f3232567", + "name": "example_firewall_ruleset", + "description": "Example stateless firewall ruleset", + "stateful": false, + "enabled": true, + "default_dns_rules_enabled": false, + "labels": [ + { + "key": "example-key", + "value": "example-value" + } + ], + "server_uuid": "03aa7245-2ff9-49c8-9f0e-7ca0270d71a4" + } + ], + "properties": { + "uuid": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + }, + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "description": "Name of the firewall ruleset" + }, + "description": { + "type": "string", + "maxLength": 250, + "description": "Description of the firewall ruleset" + }, + "stateful": { + "type": "boolean" + }, + "version": { + "$ref": "#/components/schemas/firewallRulesetVersion" + }, + "enabled": { + "type": "boolean" + }, + "default_dns_rules_enabled": { + "type": "boolean" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/firewallRulesetCreateLabel" + }, + "maxItems": 255, + "description": "Labels" + }, + "server_uuid": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "title": "Firewall Ruleset Detail Response", + "additionalProperties": false, + "description": "Response schema for firewall ruleset details, including UUID, name, description, stateful, enabled, labels and serverUUID." + }, + "firewallRulesetRuleDetailResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "examples": [ + { + "uuid": "16e7d7fc-9a90-4f42-83f5-ea0396f1592b", + "direction": "in", + "action": "accept", + "family": "IPv4", + "protocol": "tcp", + "enabled": false + } + ], + "properties": { + "uuid": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + }, + "enabled": { + "type": "boolean", + "description": "Enabled" + }, + "action": {}, + "comment": { + "type": "string", + "maxLength": 250, + "description": "Comments" + }, + "destination_address_start": { + "type": "string", + "format": "ip-address" + }, + "destination_address_end": { + "type": "string", + "format": "ip-address" + }, + "destination_port_start": { + "type": "integer", + "maximum": 65535, + "minimum": 0, + "format": "int64" + }, + "destination_port_end": { + "type": "integer", + "maximum": 65535, + "minimum": 0, + "format": "int64" + }, + "destination_address_cidr": { + "type": "string" + }, + "direction": {}, + "family": {}, + "icmp_type": { + "type": "integer", + "maximum": 255, + "minimum": 0, + "format": "int64" + }, + "position": { + "type": "integer", + "maximum": 1000, + "minimum": 0, + "format": "int64" + }, + "protocol": {}, + "source_address_start": { + "type": "string", + "format": "ip-address" + }, + "source_address_end": { + "type": "string", + "format": "ip-address" + }, + "source_port_start": { + "type": "integer", + "maximum": 65535, + "minimum": 0, + "format": "int64" + }, + "source_port_end": { + "type": "integer", + "maximum": 65535, + "minimum": 0, + "format": "int64" + }, + "source_address_cidr": { + "type": "string", + "format": "ip-address" + } + }, + "title": "Firewall Ruleset Rule Detail Response", + "required": [ + "action", + "direction", + "family" + ], + "additionalProperties": false, + "description": "Response schema for firewall ruleset rule details." + }, + "firewallRulesetQueryParamLimit": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "examples": [ + 10, + 25, + 50, + 100 + ], + "title": "QueryParamLimit", + "maximum": 100, + "minimum": 0, + "format": "int64", + "description": "Schema for a query parameter specifying the maximum number of entries to return (limit).", + "default": 10 + }, + "firewallRulesetQueryParamOffset": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "examples": [ + 0, + 10, + 20, + 50 + ], + "title": "Query Param Offset", + "minimum": 0, + "format": "int64", + "description": "Schema for a query parameter specifying the offset for pagination.", + "default": 0 + }, + "firewallRulesetQueryParamSort": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "name", + "created_at", + "updated_at" + ], + "title": "Query Param Sort", + "description": "Schema for a query parameter specifying the sort field.", + "default": "-created_at" + }, + "firewallRulesetServerUuid": { + "type": "string", + "examples": [ + "01234567-89ab-cdef-0123-456789abcdef", + "fedcba98-7654-3210-fedc-ba9876543210" + ], + "title": "Server UUID", + "format": "uuid", + "description": "The unique identifier for the server." + }, + "firewallRulesetLabelKey": { + "type": "string", + "examples": [ + "environment", + "team", + "project", + "purpose", + "cost-center" + ], + "title": "Label Key", + "maxLength": 32, + "minLength": 2, + "pattern": "^[\\x20-\\x5E\\x60-\\x7E][\\x20-\\x7E]+$", + "description": "The key of a label." + }, + "firewallRulesetServerFirewallRulePosition": { + "type": "integer", + "examples": [ + 1, + 678 + ], + "title": "Server Firewall Rule Position", + "maximum": 1000, + "minimum": 1, + "format": "int64", + "description": "The server firewall rule position." + }, + "firewallRulesetCreateLabel": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "dev", + "value": "dev-1" + }, + { + "key": "staging", + "value": "stg-1" + } + ], + "properties": { + "key": { + "type": "string", + "maxLength": 32, + "minLength": 2, + "pattern": "^[\\x20-\\x5E\\x60-\\x7E][\\x20-\\x7E]+$", + "description": "Key" + }, + "value": { + "type": "string", + "maxLength": 255, + "pattern": "\\A[\\p{L}\\p{N}\\p{P}\\p{S}\\p{Z}]*\\z", + "description": "Value" + } + }, + "title": "Create Label", + "required": [ + "key", + "value" + ], + "additionalProperties": false, + "description": "UpCloud firewall ruleset Label" + }, + "firewallRulesetFirewallMultipleRuleCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + [ + { + "direction": "in", + "action": "accept", + "family": "IPv4", + "protocol": "tcp", + "enabled": false + }, + { + "direction": "out", + "action": "drop", + "family": "IPv6" + } + ] + ], + "properties": { + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/firewallRulesetFirewallRuleCreate" + } + } + }, + "required": [ + "rules" + ], + "additionalProperties": false + }, + "firewallRulesetFirewallRuleCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "direction": "in", + "action": "accept", + "family": "IPv4", + "protocol": "tcp", + "enabled": false + }, + { + "direction": "out", + "action": "drop", + "family": "IPv6" + } + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "Enabled" + }, + "action": { + "$ref": "#/components/schemas/firewallRulesetRuleAction" + }, + "comment": { + "type": "string", + "maxLength": 250, + "description": "Comments" + }, + "destination_address_start": { + "type": "string", + "format": "ip-address" + }, + "destination_address_end": { + "type": "string", + "format": "ip-address" + }, + "destination_port_start": { + "type": "integer", + "maximum": 65535, + "minimum": 0, + "format": "int64" + }, + "destination_port_end": { + "type": "integer", + "maximum": 65535, + "minimum": 0, + "format": "int64" + }, + "destination_address_cidr": { + "type": "string" + }, + "direction": { + "$ref": "#/components/schemas/firewallRulesetRuleDirection" + }, + "family": { + "$ref": "#/components/schemas/firewallRulesetRuleFamily" + }, + "icmp_type": { + "$ref": "#/components/schemas/firewallRulesetIcmpType" + }, + "position": { + "type": "integer", + "maximum": 1000, + "minimum": 0, + "format": "int64" + }, + "protocol": { + "$ref": "#/components/schemas/firewallRulesetRuleProtocol" + }, + "source_address_start": { + "type": "string", + "format": "ip-address" + }, + "source_address_end": { + "type": "string", + "format": "ip-address" + }, + "source_port_start": { + "type": "integer", + "maximum": 65535, + "minimum": 0, + "format": "int64" + }, + "source_port_end": { + "type": "integer", + "maximum": 65535, + "minimum": 0, + "format": "int64" + }, + "source_address_cidr": { + "type": "string" + } + }, + "required": [ + "action", + "direction", + "family" + ], + "additionalProperties": false + }, + "firewallRulesetRuleAction": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Rule Action", + "enum": [ + "accept", + "drop" + ], + "description": "Rule action." + }, + "firewallRulesetRuleDirection": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Rule Direction", + "enum": [ + "in", + "out" + ], + "description": "Rule direction." + }, + "firewallRulesetRuleFamily": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Rule Family", + "enum": [ + "IPv4", + "IPv6", + "" + ], + "description": "Rule family." + }, + "firewallRulesetIcmpType": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "title": "ICMP Type", + "maximum": 255, + "minimum": -1, + "format": "int64", + "description": "ICMP type.", + "default": -1 + }, + "firewallRulesetRuleProtocol": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Rule Protocol", + "enum": [ + "tcp", + "udp", + "icmp", + "esp", + "ah", + "all", + "" + ], + "description": "Rule protocol." + }, + "firewallRulesetFirewallRuleModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "direction": "in", + "action": "accept", + "family": "IPv4", + "protocol": "tcp", + "enabled": false + }, + { + "direction": "out", + "action": "drop", + "family": "IPv6" + } + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "Enabled" + }, + "action": { + "$ref": "#/components/schemas/firewallRulesetRuleAction" + }, + "comment": { + "type": "string", + "maxLength": 250, + "description": "Comments" + }, + "destination_address_start": { + "type": "string", + "format": "ip-address" + }, + "destination_address_end": { + "type": "string", + "format": "ip-address" + }, + "destination_port_start": { + "type": "integer", + "maximum": 65535, + "minimum": 0, + "format": "int64" + }, + "destination_port_end": { + "type": "integer", + "maximum": 65535, + "minimum": 0, + "format": "int64" + }, + "destination_address_cidr": { + "type": "string" + }, + "direction": { + "$ref": "#/components/schemas/firewallRulesetRuleDirection" + }, + "family": { + "$ref": "#/components/schemas/firewallRulesetRuleFamily" + }, + "icmp_type": { + "$ref": "#/components/schemas/firewallRulesetIcmpType" + }, + "position": { + "type": "integer", + "maximum": 1000, + "minimum": 0, + "format": "int64" + }, + "protocol": { + "$ref": "#/components/schemas/firewallRulesetRuleProtocol" + }, + "source_address_start": { + "type": "string", + "format": "ip-address" + }, + "source_address_end": { + "type": "string", + "format": "ip-address" + }, + "source_port_start": { + "type": "integer", + "maximum": 65535, + "minimum": 0, + "format": "int64" + }, + "source_port_end": { + "type": "integer", + "maximum": 65535, + "minimum": 0, + "format": "int64" + }, + "source_address_cidr": { + "type": "string", + "format": "ip-address" + } + }, + "additionalProperties": true + }, + "firewallRulesetLabelModify": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "foo", + "value": "bar" + } + ], + "properties": { + "key": { + "$ref": "#/components/schemas/firewallRulesetLabelKey" + }, + "value": { + "$ref": "#/components/schemas/firewallRulesetLabelValue" + } + }, + "title": "Label Modify", + "additionalProperties": false, + "description": "Schema for modifying a label with a key-value pair." + }, + "firewallRulesetLabelValue": { + "type": "string", + "examples": [ + "production", + "backend", + "web-app", + "backup", + "engineering" + ], + "title": "Label Value", + "maxLength": 255, + "pattern": "\\A[\\p{L}\\p{N}\\p{P}\\p{S}\\p{M}\\p{Z}]*\\z", + "description": "Schema for a label value property, allowing a string or null with specific character constraints.", + "nullable": true + }, + "firewallRulesetServerMultipleFirewallRulesCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "firewall_rules": { + "firewall_rule": [ + { + "action": "accept", + "comment": "Allow SSH from this network", + "destination_address_start": null, + "destination_address_end": null, + "destination_port_start": "22", + "destination_port_end": "22", + "direction": "in", + "family": "IPv4", + "source_address_start": "192.168.1.1", + "source_address_end": "192.168.1.255", + "source_port_start": null, + "source_port_end": null, + "icmp_type": null, + "protocol": "tcp" + }, + { + "action": "accept", + "comment": "Allow DNS from this network", + "destination_address_start": null, + "destination_address_end": null, + "destination_port_start": "53", + "destination_port_end": "53", + "direction": "in", + "family": "IPv4", + "source_address_start": "1.1.1.1", + "source_address_end": "1.1.1.1", + "source_port_start": null, + "source_port_end": null, + "icmp_type": null, + "protocol": "tcp" + }, + { + "action": "drop", + "comment": "dfg", + "destination_address_start": "100.100.128.2", + "destination_address_end": "100.100.128.2", + "destination_port_start": "89", + "destination_port_end": "89", + "direction": "out", + "family": "IPv4", + "source_address_start": null, + "source_address_end": null, + "source_port_start": null, + "source_port_end": null, + "icmp_type": null, + "protocol": "tcp" + }, + { + "action": "accept", + "comment": "'w???''?p'2'?12??12?3?'231", + "destination_address_start": "2a04:3540:1001:1000:1411:4dff:fea5:1bab", + "destination_address_end": "2a04:3540:1001:1000:1411:4dff:fea5:1bab", + "destination_port_start": null, + "destination_port_end": null, + "direction": "out", + "family": "IPv6", + "source_address_start": null, + "source_address_end": null, + "source_port_start": null, + "source_port_end": null, + "icmp_type": "12", + "protocol": "icmp" + } + ] + } + }, + { + "firewall_rules": null + } + ], + "properties": { + "firewall_rules": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "examples": [ + { + "firewall_rule": [ + { + "direction": "in", + "action": "accept", + "family": "IPv4", + "protocol": "tcp" + }, + { + "direction": "out", + "action": "drop", + "family": "IPv4" + } + ] + } + ], + "properties": { + "firewall_rule": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/firewallRulesetServerFirewallRule" + } + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "firewall_rule" + ], + "additionalProperties": false + } + ] + } + }, + "title": "Server Multiple Firewall Rules Create", + "required": [ + "firewall_rules" + ], + "additionalProperties": false, + "description": "Creates multiple server firewall rules." + }, + "firewallRulesetServerFirewallRule": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "direction": "in", + "action": "accept", + "family": "IPv4", + "protocol": "tcp" + }, + { + "direction": "out", + "action": "drop", + "family": "IPv4" + } + ], + "properties": { + "direction": { + "$ref": "#/components/schemas/firewallRulesetRuleDirection" + }, + "action": { + "$ref": "#/components/schemas/firewallRulesetRuleAction" + }, + "position": { + "oneOf": [ + { + "type": "integer", + "maximum": 1000, + "minimum": 1, + "format": "int64" + }, + { + "type": "string", + "pattern": "^([1-9][0-9]?[0-9]?|1000)$|^$" + } + ], + "description": "Rule position" + }, + "family": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "pattern": "^(IPv4|IPv6)$" + }, + { + "type": "string", + "pattern": "^$" + } + ] + }, + "protocol": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "pattern": "^(tcp|udp|icmp)$" + }, + { + "type": "string", + "pattern": "^$" + } + ], + "description": "Rule protocol" + }, + "enabled": { + "type": "string", + "pattern": "^(true|1|yes|false|0|no)$|^$", + "description": "Rule enabled" + }, + "icmp_type": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer", + "maximum": 255, + "minimum": 0, + "format": "int64" + }, + { + "type": "string", + "pattern": "^([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$|^$" + } + ], + "description": "ICMP type" + }, + "destination_port_start": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "format": "int64" + }, + { + "type": "string", + "pattern": "^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$|^$" + } + ], + "description": "Destination port range starts from this port number" + }, + "destination_port_end": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "format": "int64" + }, + { + "type": "string", + "pattern": "^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$|^$" + } + ], + "description": "Destination port range ends at this port number" + }, + "source_port_start": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "format": "int64" + }, + { + "type": "string", + "pattern": "^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$|^$" + } + ], + "description": "Source port range starts from this port number" + }, + "source_port_end": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "format": "int64" + }, + { + "type": "string", + "pattern": "^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$|^$" + } + ], + "description": "Source port range ends at this port number" + }, + "destination_address_start": { + "anyOf": [ + { + "type": "string", + "format": "ipv4" + }, + { + "type": "string", + "format": "ipv6" + }, + { + "type": "string", + "pattern": "^$" + }, + { + "type": "null" + } + ], + "description": "Destination address range starts from this address" + }, + "destination_address_end": { + "anyOf": [ + { + "type": "string", + "format": "ipv4" + }, + { + "type": "string", + "format": "ipv6" + }, + { + "type": "string", + "pattern": "^$" + }, + { + "type": "null" + } + ], + "description": "Destination address range ends from to this address" + }, + "source_address_start": { + "anyOf": [ + { + "type": "string", + "format": "ipv4" + }, + { + "type": "string", + "format": "ipv6" + }, + { + "type": "string", + "pattern": "^$" + }, + { + "type": "null" + } + ], + "description": "Source address range starts from this address" + }, + "source_address_end": { + "anyOf": [ + { + "type": "string", + "format": "ipv4" + }, + { + "type": "string", + "format": "ipv6" + }, + { + "type": "string", + "pattern": "^$" + }, + { + "type": "null" + } + ], + "description": "Source address range ends at this address" + }, + "comment": { + "type": "string", + "maxLength": 250, + "description": "Comment" + } + }, + "title": "Server Firewall Rule", + "required": [ + "direction", + "action" + ], + "additionalProperties": false, + "description": "Server firewall rule" + }, + "firewallRulesetServerFirewallRuleCreate": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "firewall_rule": { + "position": "1", + "direction": "in", + "family": "IPv4", + "protocol": "tcp", + "source_address_start": "192.168.1.1", + "source_address_end": "192.168.1.255", + "source_port_end": "", + "source_port_start": "", + "destination_address_start": "", + "destination_address_end": "", + "destination_port_start": "22", + "destination_port_end": "22", + "icmp_type": "", + "action": "accept", + "comment": "Allow SSH from this network" + } + } + ], + "properties": { + "firewall_rule": { + "$ref": "#/components/schemas/firewallRulesetServerFirewallRule" + } + }, + "required": [ + "firewall_rule" + ], + "additionalProperties": false + }, + "firewallRulesetErrorResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_INVALID_REQUEST", + "title": "Validation error.", + "invalid_params": [ + { + "name": "configured_status", + "reason": "Value must be one of \"started\", \"stopped\"." + } + ], + "correlation_id": "01K1ZM92JWR9YMWTCMV6JPSQ0J", + "status": 400 + }, + { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_NOT_FOUND", + "title": "The resource you requested does not exist.", + "correlation_id": "01K1ZJC6MSN91RQS3JMEESGG92", + "status": 404 + }, + { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_GENERAL_FAILURE", + "title": "Your request could not be fulfilled due to a technical issue.", + "correlation_id": "01HEPYJ027RF0H29CKHWHCH7RE", + "status": 500 + } + ], + "properties": { + "type": { + "type": "string", + "description": "Error code string." + }, + "title": { + "type": "string", + "examples": [ + "Validation error.", + "The resource you requested does not exist.", + "Your request could not be fulfilled due to a technical issue." + ], + "description": "Short description of the error." + }, + "correlation_id": { + "type": "string", + "examples": [ + "01K1K2TKEASWRJ6VFP9ZV5P2H4" + ], + "description": "Unique identifier for the request, useful for debugging." + }, + "status": { + "type": "integer", + "examples": [ + 400, + 404, + 402, + 500 + ], + "format": "int32", + "description": "HTTP status code associated with the error." + }, + "invalid_params": { + "type": "array", + "properties": { + "name": { + "type": "string", + "examples": [ + "zone", + "networks.0.ip_address" + ], + "description": "Path to the field with invalid parameter." + }, + "reason": { + "type": "string", + "examples": [ + "Zone is not valid." + ], + "description": "Human-readable error message." + } + }, + "title": "InvalidParameters", + "required": [ + "name", + "reason" + ], + "description": "List of invalid parameters in the request." + } + }, + "title": "Error Response", + "required": [ + "type", + "title", + "correlation_id", + "status" + ], + "additionalProperties": false, + "description": "Schema for error responses from the API." + }, + "firewallRulesetFirewallRuleListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "rules": [ + { + "uuid": "16e7d7fc-9a90-4f42-83f5-ea0396f1592b", + "direction": "in", + "action": "accept", + "family": "IPv4", + "protocol": "tcp", + "enabled": false + } + ] + } + ], + "properties": { + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/firewallRulesetRuleDetailResponse" + } + } + }, + "title": "Firewall Rule List Response", + "required": [ + "rules" + ], + "description": "Response schema for a list of firewall ruleset rules." + }, + "firewallRulesetLabelListResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "array", + "examples": [ + [ + { + "key": "foo", + "value": "bar" + } + ] + ], + "items": { + "$ref": "#/components/schemas/firewallRulesetLabelDetailResponse" + }, + "title": "Label List Response", + "description": "Response schema for listing labels." + }, + "firewallRulesetLabelDetailResponse": { + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "key": "foo", + "value": "bar" + } + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "title": "Label Detail Response", + "description": "Schema for label details including key-value pairs." + }, + "firewallRulesetServerFirewallDetailResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "firewall_rules": { + "firewall_rule": [ + { + "direction": "in", + "action": "accept", + "family": "IPv4", + "protocol": "tcp" + }, + { + "direction": "out", + "action": "drop", + "family": "IPv4" + } + ] + } + } + ], + "properties": { + "firewall_rules": { + "$ref": "#/components/schemas/firewallRulesetServerFirewallRules" + } + }, + "title": "Server Firewall Detail Response", + "required": [ + "firewall_rules" + ], + "additionalProperties": false, + "description": "Server firewall detail response." + }, + "firewallRulesetServerFirewallRules": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "firewall_rule": [ + { + "direction": "in", + "action": "accept", + "family": "IPv4", + "protocol": "tcp" + }, + { + "direction": "out", + "action": "drop", + "family": "IPv4" + } + ] + } + ], + "properties": { + "firewall_rule": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/firewallRulesetServerFirewallRule" + } + }, + { + "type": "null" + } + ] + } + }, + "title": "Server Firewall Rules", + "required": [ + "firewall_rule" + ], + "additionalProperties": false, + "description": "Server firewall rules." + }, + "firewallRulesetErrorLegacyResponse": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "error": { + "error_code": "SERVER_INVALID", + "error_message": "The server UUID is invalid." + } + } + ], + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "SERVER_INVALID" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "The server UUID is invalid." + ] + } + }, + "description": "Schema for legacy error response." + } + }, + "title": "Error Legacy Response", + "required": [ + "error" + ], + "additionalProperties": false, + "description": "Schema for legacy error responses from API." + }, + "firewallRulesetServerFirewallRuleDetail": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "examples": [ + { + "firewall_rule": { + "direction": "in", + "action": "accept", + "family": "IPv4", + "protocol": "tcp" + } + } + ], + "properties": { + "firewall_rule": { + "$ref": "#/components/schemas/firewallRulesetServerFirewallRule" + } + }, + "title": "Server Firewall Rule Detail", + "required": [ + "firewall_rule" + ], + "additionalProperties": false, + "description": "Server firewall rule detail" + }, + "vncKeymapKeymaps": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "keymaps": { + "type": "object", + "properties": { + "keymap": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "fi", + "us" + ] + } + }, + "required": [ + "keymap" + ], + "additionalProperties": false, + "example": { + "keymap": [ + "fi", + "us", + "de" + ] + } + } + }, + "required": [ + "keymaps" + ], + "additionalProperties": false, + "description": "List of available VNC keymaps", + "example": { + "keymaps": { + "keymap": [ + "fi", + "us", + "de" + ] + } + } + }, + "vncKeymapError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "zone": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "examples": [ + "fi-hel1", + "de-fra1", + "us-nyc1" + ], + "maxLength": 15, + "minLength": 2, + "pattern": "^[a-z][a-z0-9-]{0,14}[a-z0-9]$", + "description": "Zone identifier" + }, + "zones": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "zones": { + "type": "object", + "properties": { + "zone": { + "type": "array", + "items": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "id": { + "$ref": "#/components/schemas/zone" + }, + "public": { + "$ref": "#/components/schemas/zoneBooleanYesno" + } + }, + "required": [ + "description", + "id", + "public" + ], + "additionalProperties": false + }, + "example": [ + { + "id": "de-fra1", + "description": "Germany, Frankfurt", + "public": "yes" + } + ] + } + }, + "required": [ + "zone" + ], + "additionalProperties": false, + "example": { + "zone": [ + { + "id": "de-fra1", + "description": "Germany, Frankfurt", + "public": "yes" + } + ] + } + } + }, + "required": [ + "zones" + ], + "additionalProperties": false, + "description": "Zones schema", + "example": { + "zones": { + "zone": [ + { + "id": "de-fra1", + "description": "Germany, Frankfurt", + "public": "yes" + }, + { + "id": "fi-hel2", + "description": "Finland, Helsinki", + "public": "no" + } + ] + } + } + }, + "zoneVlans": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "zone_vlans": { + "type": "object", + "properties": { + "vlan": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": 1, + "format": "int64" + }, + "access": { + "type": "string", + "maxLength": 255 + }, + "description": { + "type": "string", + "maxLength": 255 + }, + "default": { + "$ref": "#/components/schemas/zoneBoolean01" + } + }, + "required": [ + "id", + "access", + "description", + "default" + ], + "additionalProperties": false + }, + "example": [ + { + "id": 100, + "access": "public", + "description": "default public vlan", + "default": 1 + } + ] + } + }, + "required": [ + "vlan" + ], + "additionalProperties": false, + "example": { + "vlan": [ + { + "id": 100, + "access": "public", + "description": "default public vlan", + "default": 1 + } + ] + } + } + }, + "required": [ + "zone_vlans" + ], + "additionalProperties": false, + "description": "Schema for zone VLANs", + "example": { + "zone_vlans": { + "vlan": [ + { + "id": 100, + "access": "public", + "description": "default public vlan", + "default": 1 + } + ] + } + } + }, + "zoneBooleanYesno": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "enum": [ + "yes", + "no" + ], + "description": "Boolean value represented as yes/no", + "example": "yes" + }, + "zoneError": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "error_code": { + "type": "string", + "examples": [ + "GENERAL_FAILURE" + ] + }, + "error_message": { + "type": "string", + "examples": [ + "Your request could not be fulfilled due to a technical issue." + ] + } + }, + "required": [ + "error_code", + "error_message" + ], + "additionalProperties": false + } + }, + "required": [ + "error" + ], + "additionalProperties": false, + "description": "A general error response indicating that the request could not be fulfilled due to a technical issue." + }, + "zoneBoolean01": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1 + ], + "description": "Schema for boolean-like values encoded as 0 or 1." + } + }, + "responses": { + "accountDetails200": { + "description": "Account details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + } + }, + "accountDetailsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountError" + } + } + } + }, + "listAccounts200": { + "description": "Account list.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/accounts" + } + } + } + }, + "listAccountsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountError" + } + } + } + }, + "getAccountNetworkTopUsage200": { + "description": "Top resource network usage statistics.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/accountResourceNetworkUsage" + } + } + } + }, + "getAccountNetworkTopUsageDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountError" + } + } + } + }, + "getAccountNetworkUsage200": { + "description": "Account network usage statistics.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/accountNetworkUsage" + } + } + } + }, + "getAccountNetworkUsageDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountError" + } + } + } + }, + "getAccountResourceUsage200": { + "description": "Current account resource usage.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/accountResourceUsage" + } + } + } + }, + "getAccountResourceUsageDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountError" + } + } + } + }, + "getAccountResourceNetworkUsage200": { + "description": "Resource network usage statistics.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/accountResourceNetworkUsage" + } + } + } + }, + "getAccountResourceNetworkUsageDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountError" + } + } + } + }, + "createSubaccount204": { + "description": "Subaccount created." + }, + "createSubaccountDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountError" + } + } + } + }, + "deleteSubaccount204": { + "description": "Subaccount deleted." + }, + "deleteSubaccountDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountError" + } + } + } + }, + "accountGetMonthlyDetailedBillingSummary200": { + "description": "Detailed monthly billing summary.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/accountBillingSummary" + } + } + } + }, + "accountGetMonthlyDetailedBillingSummaryDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountError" + } + } + } + }, + "accountGetMonthlyBillingSummary200": { + "description": "Monthly billing summary.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/accountBillingSummaryResponse" + } + } + } + }, + "accountGetMonthlyBillingSummaryDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountError" + } + } + } + }, + "accountGetCurrentNetworkUsage200": { + "description": "Current Fair Transfer Policy usage.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/accountCurrentNetworkUsage" + } + } + } + }, + "accountGetCurrentNetworkUsageDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountError" + } + } + } + }, + "accountCreateMSLMASigningLink201": { + "description": "LMA signing link created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/accountCreateMsLmaSigningLinkResponse" + } + } + } + }, + "accountCreateMSLMASigningLinkDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountError" + } + } + } + }, + "accountGetMonthlyResourceBillingSummary200": { + "description": "Monthly resource billing summary.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/accountResourceBillingSummaryResponse" + } + } + } + }, + "accountGetMonthlyResourceBillingSummaryDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountError" + } + } + } + }, + "kubernetesBadRequest": { + "description": "400 Bad request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/kubernetesError" + }, + "example": { + "type": "https://developers.upcloud.com/1.3/errors#INVALID_REQUEST", + "title": "payload validation failed", + "correlation_id": "01GSCRT0RDS9EB2HMMMP5550ZR", + "status": 400 + } + } + } + }, + "kubernetesDeleteCluster": { + "description": "202 deleteCluster response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesAccepted" + }, + "example": { + "message": "deletion started for cluster 11111111-1111-1111-1111-1111" + } + } + } + }, + "kubernetesDeleteNodeGroup": { + "description": "202 deleteNodeGroup response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesAccepted" + }, + "example": { + "message": "deletion started for node group 'small'" + } + } + } + }, + "kubernetesDeleteNodeGroupNode": { + "description": "202 deleteNodeGroup response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesAccepted" + }, + "example": { + "message": "deletion started for node group node 'small/node-xyz'" + } + } + } + }, + "kubernetesGetCluster": { + "description": "200 getCluster response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesCluster" + }, + "example": { + "control_plane_ip_filter": [ + "1.2.3.4/24", + "1.1.1.1" + ], + "name": "example-cluster", + "network": "33333333-3333-3333-333333333333", + "network_cidr": "172.16.0.0/24", + "node_groups": [ + { + "count": 4, + "kubelet_args": [ + { + "key": "log-flush-frequency", + "value": "5s" + } + ], + "labels": [ + { + "key": "managedBy", + "value": "exampleDevelopmentTeam" + }, + { + "key": "environment", + "value": "development" + } + ], + "name": "small", + "plan": "K8S-2xCPU-4GB", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV" + ], + "state": "running", + "storage": "01000000-0000-4000-8000-000160010100", + "taints": [ + { + "effect": "NoSchedule", + "key": "environment", + "value": "development" + } + ] + }, + { + "count": 8, + "kubelet_args": [ + { + "key": "log-flush-frequency", + "value": "15s" + } + ], + "labels": [ + { + "key": "managedBy", + "value": "exampleStagingTeam" + }, + { + "key": "environment", + "value": "staging" + } + ], + "name": "medium", + "plan": "K8S-4xCPU-8GB", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV" + ], + "state": "pending", + "storage": "01000000-0000-4000-8000-000160010100", + "taints": [ + { + "effect": "NoSchedule", + "key": "environment", + "value": "staging" + } + ] + } + ], + "uuid": "11111111-1111-1111-1111-111111111111", + "state": "running", + "zone": "de-fra1" + } + } + } + }, + "kubernetesGetClusterKubeconfig": { + "description": "200 getClusterKubeconfig response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesClusterKubeconfig" + }, + "example": { + "kubeconfig": "apiVersion: v1\nclusters:\n- cluster:\n certificate-authority-data: FAKEBASE64=\n server: https://server\n name: example-cluster\ncontexts:\n- context:\n cluster: example-cluster\n user: example-cluster-admin\n name: example-cluster-admin@example-cluster\ncurrent-context: example-cluster-admin@example-cluster\nkind: Config\npreferences: {}\nusers:\n- name: example-cluster-admin\n user:\n client-certificate-data: FAKEBASE64=\n client-key-data: FAKEBASE64=\n" + } + } + } + }, + "kubernetesGetNodeGroupDetails": { + "description": "200 getNodeGroupDetails response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesNodeGroupDetails" + } + } + } + }, + "kubernetesGetAvailableUpgrades": { + "description": "200 upgrades response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesClusterAvailableUpgrades" + }, + "example": [ + { + "versions": [ + "1.31.8", + "1.32.0" + ] + } + ] + } + } + }, + "kubernetesPostUpgrade": { + "description": "200 upgrades response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesClusterAvailableUpgradesPost" + }, + "example": { + "version": "1.31", + "strategy": { + "type": "manual" + } + } + } + } + }, + "kubernetesGetNodeGroups": { + "description": "200 getNodeGroups response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesNodeGroups" + }, + "example": [ + { + "count": 4, + "kubelet_args": [ + { + "key": "log-flush-frequency", + "value": "5s" + } + ], + "labels": [ + { + "key": "managedBy", + "value": "exampleDevelopmentTeam" + }, + { + "key": "environment", + "value": "development" + } + ], + "name": "small", + "plan": "K8S-2xCPU-4GB", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV" + ], + "state": "running", + "storage": "01000000-0000-4000-8000-000160010100", + "taints": [ + { + "effect": "NoSchedule", + "key": "environment", + "value": "development" + } + ] + }, + { + "count": 8, + "kubelet_args": [ + { + "key": "log-flush-frequency", + "value": "15s" + } + ], + "labels": [ + { + "key": "managedBy", + "value": "exampleStagingTeam" + }, + { + "key": "environment", + "value": "staging" + } + ], + "name": "medium", + "plan": "K8S-4xCPU-8GB", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV" + ], + "state": "pending", + "storage": "01000000-0000-4000-8000-000160010100", + "taints": [ + { + "effect": "NoSchedule", + "key": "environment", + "value": "staging" + } + ] + } + ] + } + } + }, + "kubernetesGetClusters": { + "description": "200 getClusters response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesClusters" + }, + "example": [ + { + "control_plane_ip_filter": [ + "1.2.3.4/24", + "1.1.1.1" + ], + "name": "example-cluster", + "network": "33333333-3333-3333-333333333333", + "network_cidr": "172.16.0.0/24", + "node_groups": [ + { + "count": 4, + "kubelet_args": [ + { + "key": "log-flush-frequency", + "value": "5s" + } + ], + "labels": [ + { + "key": "managedBy", + "value": "exampleDevelopmentTeam" + }, + { + "key": "environment", + "value": "development" + } + ], + "name": "small", + "plan": "K8S-2xCPU-4GB", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV" + ], + "state": "running", + "storage": "01000000-0000-4000-8000-000160010100", + "taints": [ + { + "effect": "NoSchedule", + "key": "environment", + "value": "development" + } + ] + }, + { + "count": 8, + "kubelet_args": [ + { + "key": "log-flush-frequency", + "value": "15s" + } + ], + "labels": [ + { + "key": "managedBy", + "value": "exampleStagingTeam" + }, + { + "key": "environment", + "value": "staging" + } + ], + "name": "medium", + "plan": "K8S-4xCPU-8GB", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV" + ], + "state": "pending", + "storage": "01000000-0000-4000-8000-000160010100", + "taints": [ + { + "effect": "NoSchedule", + "key": "environment", + "value": "staging" + } + ] + } + ], + "uuid": "11111111-1111-1111-1111-111111111111", + "state": "running", + "zone": "de-fra1" + }, + { + "name": "another-example-cluster", + "network": "another33333333-3333-3333-333333333333", + "network_cidr": "172.16.0.0/24", + "node_groups": [ + { + "count": 4, + "name": "large", + "plan": "K8S-8xCPU-32GB", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV" + ], + "state": "running", + "storage": "01000000-0000-4000-8000-000160010100" + } + ], + "uuid": "22222222-2222-2222-2222-222222222222", + "state": "pending", + "zone": "de-fra1" + } + ] + } + } + }, + "kubernetesGetPlan": { + "description": "200 getPlans response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesPlans" + }, + "example": [ + { + "description": "K8S-2xCPU-4GB", + "name": "small" + }, + { + "description": "K8S-4xCPU-8GB", + "name": "medium" + }, + { + "description": "K8S-8xCPU-32GB", + "name": "large" + } + ] + } + } + }, + "kubernetesGetVersion": { + "description": "200 getVersions response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesVersions" + }, + "example": [ + { + "id": "1.26", + "version": "1.26.4" + }, + { + "id": "1.27", + "version": "1.27.2" + } + ] + } + } + }, + "kubernetesInternalServerError": { + "description": "500 Internal server error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/kubernetesError" + }, + "example": { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_GENERIC_ERROR", + "title": "failed to get version.", + "correlation_id": "01GSCRT0RDS9EB2HMMMP5550ZR", + "status": 500 + } + } + } + }, + "kubernetesNotFound": { + "description": "404 Not found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/kubernetesError" + }, + "example": { + "type": "https://developers.upcloud.com/1.3/errors#ERROR_NOT_FOUND", + "title": "cluster not found.", + "correlation_id": "01GSCRT0RDS9EB2HMMMP5550ZR", + "status": 404 + } + } + } + }, + "kubernetesConflict": { + "description": "409 Conflict", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/kubernetesError" + }, + "example": { + "type": "https://developers.upcloud.com/1.3/errors#CONFLICT", + "title": "an authentication entry with this name already exists.", + "correlation_id": "01GSCRT0RDS9EB2HMMMP5550ZR", + "status": 409 + } + } + } + }, + "kubernetesPostCluster": { + "description": "201 postCluster response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesCluster" + }, + "example": { + "control_plane_ip_filter": [ + "1.2.3.0/24", + "1.1.1.1" + ], + "name": "example-cluster", + "network": "33333333-3333-3333-333333333333", + "network_cidr": "172.16.0.0/24", + "node_groups": [ + { + "count": 4, + "kubelet_args": [ + { + "key": "log-flush-frequency", + "value": "5s" + } + ], + "labels": [ + { + "key": "managedBy", + "value": "exampleDevelopmentTeam" + }, + { + "key": "environment", + "value": "development" + } + ], + "name": "example-node-group-small", + "plan": "K8S-2xCPU-4GB", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV" + ], + "state": "pending", + "storage": "01000000-0000-4000-8000-000160010100", + "taints": [ + { + "effect": "NoSchedule", + "key": "environment", + "value": "development" + } + ] + }, + { + "count": 8, + "kubelet_args": [ + { + "key": "log-flush-frequency", + "value": "15s" + } + ], + "labels": [ + { + "key": "managedBy", + "value": "exampleStagingTeam" + }, + { + "key": "environment", + "value": "staging" + } + ], + "name": "example-node-group-medium", + "plan": "K8S-4xCPU-8GB", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV" + ], + "state": "pending", + "storage": "01000000-0000-4000-8000-000160010100", + "taints": [ + { + "effect": "NoSchedule", + "key": "environment", + "value": "staging" + } + ] + } + ], + "uuid": "11111111-1111-1111-1111-111111111111", + "state": "pending", + "zone": "de-fra1" + } + } + } + }, + "kubernetesPatchCluster": { + "description": "202 patchCluster response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesCluster" + }, + "example": { + "control_plane_ip_filter": [ + "1.2.3.0/24", + "1.1.1.1" + ], + "name": "example-cluster", + "network": "33333333-3333-3333-333333333333", + "network_cidr": "172.16.0.0/24", + "node_groups": [ + { + "count": 4, + "kubelet_args": [ + { + "key": "log-flush-frequency", + "value": "5s" + } + ], + "labels": [ + { + "key": "managedBy", + "value": "exampleDevelopmentTeam" + }, + { + "key": "environment", + "value": "development" + } + ], + "name": "example-node-group-small", + "plan": "K8S-2xCPU-4GB", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV" + ], + "state": "pending", + "storage": "01000000-0000-4000-8000-000160010100", + "taints": [ + { + "effect": "NoSchedule", + "key": "environment", + "value": "development" + } + ] + }, + { + "count": 8, + "kubelet_args": [ + { + "key": "log-flush-frequency", + "value": "15s" + } + ], + "labels": [ + { + "key": "managedBy", + "value": "exampleStagingTeam" + }, + { + "key": "environment", + "value": "staging" + } + ], + "name": "example-node-group-medium", + "plan": "K8S-4xCPU-8GB", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV" + ], + "state": "running", + "storage": "01000000-0000-4000-8000-000160010100", + "taints": [ + { + "effect": "NoSchedule", + "key": "environment", + "value": "staging" + } + ] + } + ], + "uuid": "11111111-1111-1111-1111-111111111111", + "state": "running", + "zone": "de-fra1" + } + } + } + }, + "kubernetesPatchNodeGroup": { + "description": "200 patchNodeGroup response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesNodeGroup" + }, + "example": { + "count": 16, + "kubelet_args": [ + { + "key": "log-flush-frequency", + "value": "5s" + } + ], + "labels": [ + { + "key": "managedBy", + "value": "exampleDevelopmentTeam" + }, + { + "key": "environment", + "value": "development" + } + ], + "name": "small", + "plan": "K8S-2xCPU-4GB", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV" + ], + "state": "running", + "storage": "01000000-0000-4000-8000-000160010100", + "taints": [ + { + "effect": "NoSchedule", + "key": "environment", + "value": "development" + } + ] + } + } + } + }, + "kubernetesPostNodeGroup": { + "description": "201 postNodeGroup response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesNodeGroup" + }, + "example": { + "count": 4, + "kubelet_args": [ + { + "key": "log-flush-frequency", + "value": "5s" + } + ], + "labels": [ + { + "key": "managedBy", + "value": "exampleDevelopmentTeam" + }, + { + "key": "environment", + "value": "development" + } + ], + "name": "small", + "plan": "K8S-2xCPU-4GB", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV" + ], + "state": "pending", + "storage": "01000000-0000-4000-8000-000160010100", + "taints": [ + { + "effect": "NoSchedule", + "key": "environment", + "value": "development" + } + ] + } + } + } + }, + "kubernetesUnAuthorized": { + "description": "401 Unauthorized", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/kubernetesError" + }, + "example": { + "type": "https://developers.upcloud.com/1.3/errors#AUTHENTICATION_FAILED", + "title": "Authentication failed using the given username and password.", + "correlation_id": "01GSCRT0RDS9EB2HMMMP5550ZR", + "status": 401 + } + } + } + }, + "kubernetesUnProcessableEntity": { + "description": "422 Unprocessable entity", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/kubernetesError" + }, + "example": { + "type": "https://developers.upcloud.com/1.3/errors#INVALID_REQUEST", + "title": "zone is not valid", + "correlation_id": "01GSCRT0RDS9EB2HMMMP5550ZR", + "status": 422 + } + } + } + }, + "kubernetesListClusterAuthentication200": { + "description": "List of authentication entries.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesAuthenticationConfiguration" + } + } + } + }, + "kubernetesCreateClusterAuthentication201": { + "description": "Authentication entry created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesAuthenticationIssuerConfig" + } + } + } + }, + "kubernetesSetClusterAuthentication200": { + "description": "Authentication configuration replaced.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesAuthenticationConfiguration" + } + } + } + }, + "kubernetesImportClusterAuthentication200": { + "description": "Authentication configuration imported.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesAuthenticationConfiguration" + } + } + } + }, + "kubernetesGetClusterAuthentication200": { + "description": "Authentication entry details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesAuthenticationIssuerConfig" + } + } + } + }, + "kubernetesUpdateClusterAuthentication200": { + "description": "Authentication entry updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesAuthenticationIssuerConfig" + } + } + } + }, + "kubernetesDeleteClusterAuthentication204": { + "description": "Authentication entry deleted." + }, + "currencyListCurrencies200": { + "description": "A list of currencies with their exchange rates.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/currencyCurrencies" + } + } + } + }, + "currencyListCurrenciesDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/currencyError" + } + } + } + }, + "getAvailablePassthroughDevices200": { + "description": "A list of available passthrough devices.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/devices" + } + } + } + }, + "getAvailablePassthroughDevicesDefault": { + "description": "General failure", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deviceError" + } + } + } + }, + "listEvents200": { + "description": "A list of events.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/events" + } + } + } + }, + "listEventsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/eventsError" + } + } + } + }, + "listIPAddresses200": { + "description": "A list of servers.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ipAddressesResponse" + } + } + } + }, + "listIPAddressesDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ipAddressError" + } + } + } + }, + "addIPAddress201": { + "description": "The newly created IP address.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ipAddressRequest" + } + } + } + }, + "addIPAddress409": { + "description": "The Cloud Server is not in a valid state, an IP address limit would be exceeded, the requested address, prefix, or VLAN is unavailable, or the maximum network interface index 255 of the Cloud Server is already occupied", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ipAddressError" + } + } + } + }, + "addIPAddressDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ipAddressError" + } + } + } + }, + "bulkModifyIPAddresses204": { + "description": "The IP addresses were successfully modified." + }, + "bulkModifyIPAddressesDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ipAddressError" + } + } + } + }, + "getIPAddressDetails200": { + "description": "Details of the specified IP address.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ipAddressResponse" + } + } + } + }, + "getIPAddressDetailsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ipAddressError" + } + } + } + }, + "modifyIPAddress202": { + "description": "The modified IP address.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ipAddressRequest" + } + } + } + }, + "modifyIPAddressDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ipAddressError" + } + } + } + }, + "deleteIPAddress204": { + "description": "IP address successfully deleted." + }, + "deleteIPAddressDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ipAddressError" + } + } + } + }, + "patchModifyIPAddress202": { + "description": "The modified IP address.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ipAddressRequest" + } + } + } + }, + "patchModifyIPAddressDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ipAddressError" + } + } + } + }, + "listNetworkPeerings200": { + "description": "A list of network peerings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networkPeerings" + } + } + } + }, + "listNetworkPeeringsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/networkPeeringError" + } + } + } + }, + "createNetworkPeering201": { + "description": "The network peering was successfully created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networkPeering" + } + } + } + }, + "createNetworkPeering400": { + "description": "Invalid request data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networkPeeringError" + } + } + } + }, + "createNetworkPeering404": { + "description": "One of the specified networks does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networkPeeringError" + } + } + } + }, + "createNetworkPeering409": { + "description": "A peering between the specified networks already exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networkPeeringError" + } + } + } + }, + "createNetworkPeeringDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/networkPeeringError" + } + } + } + }, + "getNetworkPeering200": { + "description": "Details of the specified network peering.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networkPeering" + } + } + } + }, + "getNetworkPeering404": { + "description": "The specified network peering does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networkPeeringError" + } + } + } + }, + "getNetworkPeeringDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/networkPeeringError" + } + } + } + }, + "deleteNetworkPeering204": { + "description": "The network peering was successfully deleted." + }, + "deleteNetworkPeering404": { + "description": "The specified network peering does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networkPeeringError" + } + } + } + }, + "deleteNetworkPeeringDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/networkPeeringError" + } + } + } + }, + "modifyNetworkPeering200": { + "description": "The network peering was successfully modified.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networkPeering" + } + } + } + }, + "modifyNetworkPeering400": { + "description": "Invalid request data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networkPeeringError" + } + } + } + }, + "modifyNetworkPeering404": { + "description": "The specified network peering does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networkPeeringError" + } + } + } + }, + "modifyNetworkPeeringDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/networkPeeringError" + } + } + } + }, + "listNetworks200": { + "description": "List of networks.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networks" + } + } + } + }, + "listNetworksDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/networkError" + } + } + } + }, + "createNetwork201": { + "description": "Created network.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/network" + } + } + } + }, + "createNetworkDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/networkError" + } + } + } + }, + "listNetworkInterfaces200": { + "description": "List of network interfaces.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networkInterfaces" + } + } + } + }, + "listNetworkInterfacesDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/networkError" + } + } + } + }, + "createNetworkInterface201": { + "description": "Created network interface.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networkInterface" + } + } + } + }, + "createNetworkInterfaceDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/networkError" + } + } + } + }, + "getNetworkInterfaceDetails200": { + "description": "Details of the requested network interface.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/network" + } + } + } + }, + "getNetworkInterfaceDetailsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/networkError" + } + } + } + }, + "deleteNetworkInterface204": { + "description": "Network interface successfully deleted." + }, + "deleteNetworkInterfaceDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/networkError" + } + } + } + }, + "getNetworkDetails200": { + "description": "Details of the requested network.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/network" + } + } + } + }, + "getNetworkDetailsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/networkError" + } + } + } + }, + "modifyNetwork200": { + "description": "Updated network details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/network" + } + } + } + }, + "modifyNetworkDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/networkError" + } + } + } + }, + "deleteNetwork204": { + "description": "Network successfully deleted." + }, + "deleteNetworkDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/networkError" + } + } + } + }, + "listAuditLogs200": { + "description": "Successful response", + "headers": { + "UpCloud-Total-Count": { + "description": "Total count of items available", + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/auditLogsResponse" + } + } + } + }, + "listAuditLogsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/auditLogsErrorResponse" + } + } + } + }, + "exportAuditLogs200": { + "description": "File download. Returns JSON array of audit logs when format=json, or CSV when format=csv.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/auditLogsResponse" + } + } + } + }, + "exportAuditLogsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/auditLogsErrorResponse" + } + } + } + }, + "auditLogsGetAuditLog200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/auditLogsAuditLog" + } + } + } + }, + "auditLogsGetAuditLogDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/auditLogsErrorResponse" + } + } + } + }, + "auditLogsGetFilterOptions200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/auditLogsFilterOptionsResponse" + } + } + } + }, + "auditLogsGetFilterOptionsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/auditLogsErrorResponse" + } + } + } + }, + "listPartnerAccounts200": { + "description": "A list of partner accounts.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/partnerAccounts" + } + } + } + }, + "listPartnerAccountsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/partnerError" + } + } + } + }, + "createPartnerAccount201": { + "description": "Created partner account.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/partnerAccount" + } + } + } + }, + "createPartnerAccount400": { + "description": "Invalid or missing attribute(s) in the request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/partnerError400" + } + } + } + }, + "createPartnerAccount403": { + "description": "Partner specific account creation limit has been reached.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/partnerError403" + } + } + } + }, + "createPartnerAccount409": { + "description": "An account using the given `username` already exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/partnerError409" + } + } + } + }, + "createPartnerAccountDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/partnerError" + } + } + } + }, + "listPermissions200": { + "description": "A list of permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/permissions" + } + } + } + }, + "listPermissionsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/permissionError" + } + } + } + }, + "replacePermissions200": { + "description": "The updated list of permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/permissions" + } + } + } + }, + "replacePermissionsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/permissionError" + } + } + } + }, + "grantPermission200": { + "description": "The granted permission.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/permission" + } + } + } + }, + "grantPermissionDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/permissionError" + } + } + } + }, + "revokePermission204": { + "description": "Permission successfully revoked. No content in response body." + }, + "revokePermissionDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/permissionError" + } + } + } + }, + "revokeAllPermissionsByTarget204": { + "description": "All permissions for the specified target successfully revoked. No content in response body." + }, + "revokeAllPermissionsByTargetDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/permissionError" + } + } + } + }, + "revokeAllPermissionsByUser204": { + "description": "All permissions for the specified user successfully revoked. No content in response body." + }, + "revokeAllPermissionsByUserDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/permissionError" + } + } + } + }, + "listPlans200": { + "description": "A list of plans.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/plan" + } + } + } + }, + "listPlansDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/planError" + } + } + } + }, + "getPrice200": { + "description": "A price list.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/prices" + } + } + } + }, + "getPrice400": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/priceError400" + } + } + } + }, + "getPriceDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/priceError" + } + } + } + }, + "listRouters200": { + "description": "A list of routers.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/routers" + } + } + } + }, + "listRoutersDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/routerError" + } + } + } + }, + "createRouter201": { + "description": "Router created successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/router" + } + } + } + }, + "createRouter400": { + "description": "Invalid input data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/routerError" + } + } + } + }, + "createRouter409": { + "description": "Router with the same name already exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/routerError" + } + } + } + }, + "createRouterDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/routerError" + } + } + } + }, + "getRouter200": { + "description": "Router details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/router" + } + } + } + }, + "getRouter404": { + "description": "Router not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/routerError" + } + } + } + }, + "getRouterDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/routerError" + } + } + } + }, + "deleteRouter204": { + "description": "Router deleted successfully." + }, + "deleteRouter404": { + "description": "Router not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/routerError" + } + } + } + }, + "deleteRouter409": { + "description": "Router cannot be deleted due to existing dependencies.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/routerError" + } + } + } + }, + "deleteRouterDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/routerError" + } + } + } + }, + "modifyRouter200": { + "description": "Router modified successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/router" + } + } + } + }, + "modifyRouter400": { + "description": "Invalid input data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/routerError" + } + } + } + }, + "modifyRouter404": { + "description": "Router not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/routerError" + } + } + } + }, + "modifyRouter409": { + "description": "Conflict in modifying the router.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/routerError" + } + } + } + }, + "modifyRouterDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/routerError" + } + } + } + }, + "listServerGroups200": { + "description": "A list of server groups.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverGroups" + } + } + } + }, + "listServerGroupsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverGroupError" + } + } + } + }, + "createServerGroup200": { + "description": "Details of the created server group.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverGroup" + } + } + } + }, + "createServerGroupDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverGroupError" + } + } + } + }, + "getServerGroup200": { + "description": "Details of the server group.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverGroup" + } + } + } + }, + "getServerGroupDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverGroupError" + } + } + } + }, + "deleteServerGroup204": { + "description": "The server group was successfully deleted. No content is returned." + }, + "deleteServerGroupDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverGroupError" + } + } + } + }, + "modifyServerGroup200": { + "description": "Details of the modified server group.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverGroup" + } + } + } + }, + "modifyServerGroupDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverGroupError" + } + } + } + }, + "listServerGroupMembers200": { + "description": "A list of servers in the server group.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverGroupServers" + } + } + } + }, + "listServerGroupMembersDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverGroupError" + } + } + } + }, + "serverGroupAddServerToGroup204": { + "description": "The server was successfully added to the group. No content is returned." + }, + "serverGroupAddServerToGroupDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverGroupError" + } + } + } + }, + "serverGroupRemoveServerFromGroup204": { + "description": "The server was successfully removed from the group. No content is returned." + }, + "serverGroupRemoveServerFromGroupDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverGroupError" + } + } + } + }, + "listServers200": { + "description": "Cloud Server list returned successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/getServerList" + } + } + } + }, + "listServers400": { + "description": "Invalid filter or sorting parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "listServers403": { + "description": "Access denied or insufficient permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "listServers404": { + "description": "A requested tag does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "listServers409": { + "description": "A repeated filter exceeds its allowed limit or a UUID is invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "listServersDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "createServer202": { + "description": "Created a Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createServerResponse" + } + } + } + }, + "createServer400": { + "description": "Invalid request parameters or malformed request body", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "createServer403": { + "description": "Access denied or insufficient permissions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "createServer404": { + "description": "Passthrough device not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "createServer409": { + "description": "Conflicting operation in progress or invalid resource state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "createServerDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "getServer200": { + "description": "Cloud Server details returned successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/server" + } + } + } + }, + "getServer400": { + "description": "The Cloud Server UUID is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "getServer403": { + "description": "Username does not have access to this Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "getServer404": { + "description": "Cloud Server does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "getServerDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "modifyServer202": { + "description": "Modified a Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/server" + } + } + } + }, + "modifyServer400": { + "description": "Invalid request parameters or malformed request body", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "modifyServer403": { + "description": "Access denied or insufficient permissions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "modifyServer404": { + "description": "Cloud Server not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "modifyServer409": { + "description": "Conflicting operation in progress or invalid resource state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "modifyServerDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "deleteServer204": { + "description": "Cloud Server deleted." + }, + "deleteServer400": { + "description": "Invalid Cloud Server or deletion policy.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "deleteServer403": { + "description": "Access denied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "deleteServer404": { + "description": "Cloud Server not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "deleteServer409": { + "description": "Cloud Server or storage is in an invalid state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "deleteServerDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "cancelServerOperation204": { + "description": "Operation cancelled." + }, + "cancelServerOperation400": { + "description": "The Cloud Server UUID is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "cancelServerOperation403": { + "description": "Username does not have access to this Cloud Server or the Cloud Server is not in a state that allows its operation to be cancelled", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "cancelServerOperation404": { + "description": "Cloud Server does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "cancelServerOperation409": { + "description": "Operation cannot be cancelled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "cancelServerOperationDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "listServerGPUs200": { + "description": "GPU list returned successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverGpus" + } + } + } + }, + "listServerGPUs400": { + "description": "The Cloud Server UUID is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "listServerGPUs403": { + "description": "Username does not have access to this Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "listServerGPUs404": { + "description": "Cloud Server does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "listServerGPUsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "getServerNetworking200": { + "description": "Cloud Server networking details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverNetworkingResponse" + } + } + } + }, + "getServerNetworking400": { + "description": "The Cloud Server UUID is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "getServerNetworking403": { + "description": "Username does not have access to this Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "getServerNetworking404": { + "description": "Cloud Server does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "getServerNetworkingDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "addServerInterface201": { + "description": "Network interface added", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverInterfaceResponse" + } + } + } + }, + "addServerInterface400": { + "description": "The Cloud Server UUID is invalid or the request body is malformed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "addServerInterface403": { + "description": "Username does not have access to this Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "addServerInterface404": { + "description": "Cloud Server or network does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "addServerInterface409": { + "description": "The Cloud Server is not stopped, the requested index is in use, the maximum interface index 255 is already occupied when no index is given, or an interface, address, or device limit would be exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "addServerInterfaceDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "modifyServerInterface200": { + "description": "Network interface modified", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverInterfaceResponse" + } + } + } + }, + "modifyServerInterface400": { + "description": "The Cloud Server UUID or interface index is invalid or the request body is malformed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "modifyServerInterface403": { + "description": "Username does not have access to this Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "modifyServerInterface404": { + "description": "Cloud Server or interface does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "modifyServerInterface409": { + "description": "The Cloud Server is not stopped, the requested new index is in use, or the requested interface configuration is not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "modifyServerInterfaceDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "deleteServerInterface204": { + "description": "Success" + }, + "deleteServerInterface400": { + "description": "The Cloud Server UUID or interface index is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "deleteServerInterface403": { + "description": "Username does not have access to this Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "deleteServerInterface404": { + "description": "Cloud Server or interface does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "deleteServerInterface409": { + "description": "The Cloud Server is not stopped", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "deleteServerInterfaceDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "addServerInterfaceIpAddress201": { + "description": "IP address added", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverIpAddressInterfaceResponse" + } + } + } + }, + "addServerInterfaceIpAddress400": { + "description": "The Cloud Server UUID or interface index is invalid or the request body is malformed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "addServerInterfaceIpAddress403": { + "description": "Username does not have access to this Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "addServerInterfaceIpAddress404": { + "description": "Cloud Server or interface does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "addServerInterfaceIpAddress409": { + "description": "The interface type does not support this operation, the address is already attached or invalid for the network, the address family conflicts, or an address limit would be exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "addServerInterfaceIpAddressDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "deleteServerInterfaceIpAddress204": { + "description": "Success" + }, + "deleteServerInterfaceIpAddress400": { + "description": "The Cloud Server UUID, interface index or IP address is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "deleteServerInterfaceIpAddress403": { + "description": "Username does not have access to this Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "deleteServerInterfaceIpAddress404": { + "description": "Cloud Server, interface, or attached IP address does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "deleteServerInterfaceIpAddress409": { + "description": "The interface type does not support this operation or deleting the address would violate the minimum address limit", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "deleteServerInterfaceIpAddressDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "rebuildServer202": { + "description": "Cloud Server rebuild initiated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/server" + } + } + } + }, + "rebuildServer400": { + "description": "The Cloud Server UUID is invalid or the request body is malformed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "rebuildServer403": { + "description": "Access denied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "rebuildServer404": { + "description": "Cloud Server or storage does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "rebuildServer409": { + "description": "Cloud Server or storage cannot be rebuilt in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "rebuildServerDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "relocateServer200": { + "description": "Cloud Server relocated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/server" + } + } + } + }, + "relocateServer400": { + "description": "The Cloud Server UUID is invalid or the request body is malformed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "relocateServer403": { + "description": "Access denied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "relocateServer404": { + "description": "Cloud Server or zone does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "relocateServer409": { + "description": "Cloud Server or an attached resource cannot be relocated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "relocateServerDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "restartServer200": { + "description": "Cloud Server restart initiated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/server" + } + } + } + }, + "restartServer400": { + "description": "Invalid Cloud Server or restart options.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "restartServer403": { + "description": "Access denied or quota exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "restartServer404": { + "description": "Cloud Server or host not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "restartServer409": { + "description": "Cloud Server cannot be restarted in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "restartServerDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "startServer200": { + "description": "Cloud Server start initiated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/server" + } + } + } + }, + "startServer400": { + "description": "Invalid Cloud Server or start options.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "startServer403": { + "description": "Access denied or quota exceeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "startServer404": { + "description": "Cloud Server or host not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "startServer409": { + "description": "Cloud Server cannot be started in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "startServerDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "stopServer200": { + "description": "Cloud Server stop initiated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/server" + } + } + } + }, + "stopServer400": { + "description": "The Cloud Server UUID is invalid or the request body is malformed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "stopServer403": { + "description": "Access denied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "stopServer404": { + "description": "Cloud Server does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "stopServer409": { + "description": "Cloud Server cannot be stopped in its current state.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "stopServerDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverListFirewallRulesetRelationships200": { + "description": "Cloud Servers related to the firewall ruleset", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetRelatedServers" + } + } + } + }, + "serverListFirewallRulesetRelationships400": { + "description": "The firewall ruleset UUID is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverListFirewallRulesetRelationshipsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverGetLabels200": { + "description": "Cloud Server labels returned successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/getAllServerLabels" + } + } + } + }, + "serverGetLabelsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverAttachPrivateFirewallRuleset200": { + "description": "Private firewall ruleset relationship", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverFirewallRulesetRelationship" + } + } + } + }, + "serverAttachPrivateFirewallRuleset400": { + "description": "The Cloud Server UUID is invalid or the request body is malformed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverAttachPrivateFirewallRuleset403": { + "description": "Username does not have access to this Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverAttachPrivateFirewallRuleset404": { + "description": "Cloud Server or firewall ruleset does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverAttachPrivateFirewallRuleset409": { + "description": "The Cloud Server state does not allow the ruleset relationship to be changed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "serverAttachPrivateFirewallRulesetDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverEjectCDROM200": { + "description": "CD-ROM ejected; updated Cloud Server details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/server" + } + } + } + }, + "serverEjectCDROM400": { + "description": "The Cloud Server UUID is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverEjectCDROM403": { + "description": "The Cloud Server or loaded storage is not accessible to the authenticated account", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverEjectCDROM404": { + "description": "Cloud Server does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverEjectCDROM409": { + "description": "The Cloud Server or storage state does not allow ejecting the CD-ROM, or no CD-ROM device is attached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "serverEjectCDROM511": { + "description": "The CD-ROM media could not be ejected from the running Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError511" + } + } + } + }, + "serverEjectCDROMDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverLoadCDROM200": { + "description": "CD-ROM image loaded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/server" + } + } + } + }, + "serverLoadCDROM400": { + "description": "The Cloud Server UUID is invalid or the request body is malformed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverLoadCDROM403": { + "description": "The Cloud Server or storage is not accessible to the authenticated account", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverLoadCDROM404": { + "description": "Cloud Server or storage does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverLoadCDROM409": { + "description": "The Cloud Server or storage state does not allow loading the CD-ROM, no CD-ROM device is attached, or the storage is already attached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "serverLoadCDROM511": { + "description": "The CD-ROM media could not be ejected or loaded on the running Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError511" + } + } + } + }, + "serverLoadCDROMDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverDetachPrivateFirewallRuleset200": { + "description": "Private firewall ruleset relationship", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverFirewallRulesetRelationship" + } + } + } + }, + "serverDetachPrivateFirewallRuleset400": { + "description": "The Cloud Server UUID is invalid or the request body is malformed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverDetachPrivateFirewallRuleset403": { + "description": "Username does not have access to this Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverDetachPrivateFirewallRuleset404": { + "description": "Cloud Server, firewall ruleset, or relationship does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverDetachPrivateFirewallRuleset409": { + "description": "The Cloud Server state does not allow the ruleset relationship to be changed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "serverDetachPrivateFirewallRulesetDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverListFirewallRules200": { + "description": "A list of firewall rules", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverFirewallRules" + } + } + } + }, + "serverListFirewallRules400": { + "description": "The Cloud Server UUID is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverListFirewallRules403": { + "description": "Username does not have access to this Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverListFirewallRules404": { + "description": "Cloud Server does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverListFirewallRulesDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverUpdateFirewallRules204": { + "description": "Firewall rules replaced" + }, + "serverUpdateFirewallRules400": { + "description": "The Cloud Server UUID is invalid or the request body is malformed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverUpdateFirewallRules403": { + "description": "Username does not have access to this Cloud Server or the Cloud Server is not in a state that allows firewall rules to be updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverUpdateFirewallRules404": { + "description": "Cloud Server does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverUpdateFirewallRules409": { + "description": "A conflicting operation is already in progress for this Cloud Server (unless /force is used) or there are duplicate firewall rule positions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "serverUpdateFirewallRulesDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverCreateFirewallRule201": { + "description": "Created firewall rule", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverFirewallRule" + } + } + } + }, + "serverCreateFirewallRule400": { + "description": "The Cloud Server UUID is invalid or the request body is malformed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverCreateFirewallRule403": { + "description": "Username does not have access to this Cloud Server or the Cloud Server is not in a state that allows firewall rules to be created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverCreateFirewallRule404": { + "description": "Cloud Server does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverCreateFirewallRule409": { + "description": "A conflicting operation is already in progress for this Cloud Server or the firewall rule position is already in use", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "serverCreateFirewallRuleDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverGetFirewallRule200": { + "description": "Firewall rule details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverFirewallRule" + } + } + } + }, + "serverGetFirewallRule400": { + "description": "The Cloud Server UUID or rule ID is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverGetFirewallRule403": { + "description": "Username does not have access to this Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverGetFirewallRule404": { + "description": "Cloud Server or firewall rule does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverGetFirewallRuleDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverDeleteFirewallRule204": { + "description": "Success" + }, + "serverDeleteFirewallRule400": { + "description": "The Cloud Server UUID or rule ID is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverDeleteFirewallRule403": { + "description": "Username does not have access to this Cloud Server or the Cloud Server is not in a state that allows firewall rules to be deleted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverDeleteFirewallRule404": { + "description": "Cloud Server or firewall rule does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverDeleteFirewallRule409": { + "description": "A conflicting operation is already in progress for this Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "serverDeleteFirewallRuleDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverListPrivateFirewallRulesetRelationships200": { + "description": "Private firewall ruleset relationships", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverFirewallRulesetRelationships" + } + } + } + }, + "serverListPrivateFirewallRulesetRelationships400": { + "description": "The Cloud Server UUID is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverListPrivateFirewallRulesetRelationships403": { + "description": "Username does not have access to this Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverListPrivateFirewallRulesetRelationships404": { + "description": "Cloud Server does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverListPrivateFirewallRulesetRelationshipsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverGetRemoteAccessDetails200": { + "description": "Remote access details returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverRemoteAccessDetails" + } + } + } + }, + "serverGetRemoteAccessDetails400": { + "description": "Invalid Cloud Server UUID.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverGetRemoteAccessDetails403": { + "description": "Access denied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverGetRemoteAccessDetails404": { + "description": "Cloud Server not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverGetRemoteAccessDetailsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverGetCPUStats200": { + "description": "CPU statistics returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverCpuStats" + } + } + } + }, + "serverGetCPUStats400": { + "description": "Invalid Cloud Server UUID or statistics period.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverGetCPUStats403": { + "description": "Access denied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverGetCPUStats404": { + "description": "Cloud Server not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverGetCPUStatsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverGetCPUStatsByPeriod200": { + "description": "CPU statistics returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverCpuStats" + } + } + } + }, + "serverGetCPUStatsByPeriod400": { + "description": "Invalid Cloud Server UUID or statistics period.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverGetCPUStatsByPeriod403": { + "description": "Access denied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverGetCPUStatsByPeriod404": { + "description": "Cloud Server not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverGetCPUStatsByPeriodDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverGetDiskStats200": { + "description": "Disk statistics returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverDiskStats" + } + } + } + }, + "serverGetDiskStats400": { + "description": "Invalid Cloud Server UUID, activity type, or statistics period.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverGetDiskStats403": { + "description": "Access denied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverGetDiskStats404": { + "description": "Cloud Server not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverGetDiskStatsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverGetDiskStatsByPeriod200": { + "description": "Disk statistics returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverDiskStats" + } + } + } + }, + "serverGetDiskStatsByPeriod400": { + "description": "Invalid Cloud Server UUID, activity type, or statistics period.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverGetDiskStatsByPeriod403": { + "description": "Access denied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverGetDiskStatsByPeriod404": { + "description": "Cloud Server not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverGetDiskStatsByPeriodDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverGetNetworkStats200": { + "description": "Network statistics returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverNetworkStats" + } + } + } + }, + "serverGetNetworkStats400": { + "description": "Invalid Cloud Server UUID, activity type, network type, or statistics period.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverGetNetworkStats403": { + "description": "Access denied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverGetNetworkStats404": { + "description": "Cloud Server not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverGetNetworkStatsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverGetNetworkStatsByNetwork200": { + "description": "Network statistics returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverNetworkStats" + } + } + } + }, + "serverGetNetworkStatsByNetwork400": { + "description": "Invalid Cloud Server UUID, activity type, network type, or statistics period.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverGetNetworkStatsByNetwork403": { + "description": "Access denied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverGetNetworkStatsByNetwork404": { + "description": "Cloud Server not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverGetNetworkStatsByNetworkDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverGetNetworkStatsByNetworkAndPeriod200": { + "description": "Network statistics returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverNetworkStats" + } + } + } + }, + "serverGetNetworkStatsByNetworkAndPeriod400": { + "description": "Invalid Cloud Server UUID, activity type, network type, or statistics period.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverGetNetworkStatsByNetworkAndPeriod403": { + "description": "Access denied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverGetNetworkStatsByNetworkAndPeriod404": { + "description": "Cloud Server not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverGetNetworkStatsByNetworkAndPeriodDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverAttachStorageDevice200": { + "description": "Storage device attached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/server" + } + } + } + }, + "serverAttachStorageDevice400": { + "description": "The Cloud Server UUID is invalid or the request body is malformed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverAttachStorageDevice403": { + "description": "The Cloud Server or storage resource is not accessible to the authenticated account", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverAttachStorageDevice404": { + "description": "Cloud Server or storage resource does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverAttachStorageDevice409": { + "description": "A conflicting operation is already in progress for this Cloud Server or the storage device is already attached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "serverAttachStorageDeviceDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverDetachStorageDevice200": { + "description": "Storage device detached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/server" + } + } + } + }, + "serverDetachStorageDevice400": { + "description": "The Cloud Server UUID is invalid or the request body is malformed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverDetachStorageDevice403": { + "description": "The Cloud Server or attached storage resource is not accessible to the authenticated account", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverDetachStorageDevice404": { + "description": "Cloud Server does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverDetachStorageDevice409": { + "description": "A conflicting operation is already in progress for this Cloud Server or the storage device is not attached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError409" + } + } + } + }, + "serverDetachStorageDevice511": { + "description": "The running Cloud Server could not hot-detach the storage device", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError511" + } + } + } + }, + "serverDetachStorageDeviceDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "serverGetVNCDetails200": { + "description": "VNC connection details returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverRemoteAccessDetails" + } + } + } + }, + "serverGetVNCDetails400": { + "description": "Invalid Cloud Server UUID.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError400" + } + } + } + }, + "serverGetVNCDetails403": { + "description": "Access denied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError403" + } + } + } + }, + "serverGetVNCDetails404": { + "description": "Cloud Server not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverError404" + } + } + } + }, + "serverGetVNCDetailsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverError" + } + } + } + }, + "listServerSizes200": { + "description": "A list of server sizes.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverSizes" + } + } + } + }, + "listServerSizesDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverSizeError" + } + } + } + }, + "getServerSizeLimits200": { + "description": "Server size limits.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverSizeLimits" + } + } + } + }, + "getServerSizeLimitsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/serverSizeError" + } + } + } + }, + "getStorageList200": { + "description": "A list of storage resources", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storages" + } + } + } + }, + "getStorageList400": { + "description": "Invalid query parameter value", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageListDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "createStorage201": { + "description": "Block storage created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createStorageResponse" + } + } + } + }, + "createStorageDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageListByBackup200": { + "description": "A list of storage resources", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storages" + } + } + } + }, + "getStorageListByBackup400": { + "description": "Invalid query parameter value", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageListByBackupDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageListByCdrom200": { + "description": "A list of storage resources", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storages" + } + } + } + }, + "getStorageListByCdrom400": { + "description": "Invalid query parameter value", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageListByCdromDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getFavoriteStorageList200": { + "description": "A list of favorite storage resources", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storages" + } + } + } + }, + "getFavoriteStorageListDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageListByNormal200": { + "description": "A list of storage resources", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storages" + } + } + } + }, + "getStorageListByNormal400": { + "description": "Invalid query parameter value", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageListByNormalDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageListByPrivateAccess200": { + "description": "A list of storage resources", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storages" + } + } + } + }, + "getStorageListByPrivateAccess400": { + "description": "Invalid query parameter value", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageListByPrivateAccessDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageListByPublicAccess200": { + "description": "A list of storage resources", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storages" + } + } + } + }, + "getStorageListByPublicAccess400": { + "description": "Invalid query parameter value", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageListByPublicAccessDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageListByTemplate200": { + "description": "A list of storage resources", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storages" + } + } + } + }, + "getStorageListByTemplate400": { + "description": "Invalid query parameter value", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageListByTemplateDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageListByTypeAndAccess200": { + "description": "A list of storage resources", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storages" + } + } + } + }, + "getStorageListByTypeAndAccess400": { + "description": "Invalid query parameter value", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageListByTypeAndAccessDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageInfo200": { + "description": "Storage resource details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storage" + } + } + } + }, + "getStorageInfo404": { + "description": "Storage resource not found" + }, + "getStorageInfoDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "modifyStorage200": { + "description": "Block storage modified", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/modifyStorageResponse" + } + } + } + }, + "modifyStorageDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "deleteStorage204": { + "description": "Storage resource deleted" + }, + "deleteStorageDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "attachStorageToServer200": { + "description": "Storage resource attached to Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/attachStorageResponse" + } + } + } + }, + "attachStorageToServerDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "cancelStorageOperation204": { + "description": "Block storage operation cancelled" + }, + "cancelStorageOperationDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "cloneStorage201": { + "description": "Block storage cloned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createStorageResponse" + } + } + } + }, + "cloneStorage404": { + "description": "Storage resource not found" + }, + "cloneStorageDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "detachStorageFromServer200": { + "description": "Storage resource detached from Cloud Server", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/detachStorageResponse" + } + } + } + }, + "detachStorageFromServerDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "addStorageToFavorites204": { + "description": "Storage resource added to favorites" + }, + "addStorageToFavoritesDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "removeStorageFromFavorites204": { + "description": "Storage resource removed from favorites" + }, + "removeStorageFromFavoritesDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageImportDetails200": { + "description": "Storage import details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageImportResponse" + } + } + } + }, + "getStorageImportDetails404": { + "description": "The storage resource has no import task", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "getStorageImportDetailsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "createStorageImport201": { + "description": "Storage import created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageImportResponse" + } + } + } + }, + "createStorageImport400": { + "description": "Invalid import parameters or unsupported storage type", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "createStorageImport409": { + "description": "The storage or attached Cloud Server is in an incompatible state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "createStorageImport503": { + "description": "Storage import is temporarily unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "createStorageImportDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "cancelStorageImport202": { + "description": "Storage import cancellation requested", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageImportResponse" + } + } + } + }, + "cancelStorageImport404": { + "description": "The storage resource has no import task", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "cancelStorageImport409": { + "description": "The storage import is not in progress", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "cancelStorageImportDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "resizeStorage200": { + "description": "Block storage resize started", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/resizeStorageResponse" + } + } + } + }, + "resizeStorageDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "restoreStorageFromBackup204": { + "description": "Block storage restore started" + }, + "restoreStorageFromBackupDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "createTemplateFromStorage201": { + "description": "Template created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createStorageTemplateResponse" + } + } + } + }, + "createTemplateFromStorageDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "storageCreateOnDemandBackup201": { + "description": "On-demand backup created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createStorageBackupResponse" + } + } + } + }, + "storageCreateOnDemandBackupDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/storageError" + } + } + } + }, + "listTags200": { + "description": "A list of tags.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tags" + } + } + } + }, + "listTagsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/tagError" + } + } + } + }, + "createTag200": { + "description": "Created tag.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tag" + } + } + } + }, + "createTag400": { + "description": "The tag name is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tagError400" + } + } + } + }, + "createTag403": { + "description": "Username does not have access to this tag", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tagError403" + } + } + } + }, + "createTag409": { + "description": "Tag already exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tagError409" + } + } + } + }, + "createTagDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/tagError" + } + } + } + }, + "getTag200": { + "description": "Tag details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tag" + } + } + } + }, + "getTag400": { + "description": "The tag name is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tagError400" + } + } + } + }, + "getTag403": { + "description": "Username does not have access to this tag", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tagError403" + } + } + } + }, + "getTag404": { + "description": "Tag does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tagError404" + } + } + } + }, + "getTagDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/tagError" + } + } + } + }, + "modifyTag200": { + "description": "Modified tag.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tag" + } + } + } + }, + "modifyTag400": { + "description": "The tag name is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tagError400" + } + } + } + }, + "modifyTag403": { + "description": "Username does not have access to this tag", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tagError403" + } + } + } + }, + "modifyTag404": { + "description": "Tag does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tagError404" + } + } + } + }, + "modifyTagDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/tagError" + } + } + } + }, + "deleteTag204": { + "description": "Tag deleted successfully." + }, + "deleteTag400": { + "description": "The tag name is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tagError400" + } + } + } + }, + "deleteTag403": { + "description": "Username does not have access to this tag", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tagError403" + } + } + } + }, + "deleteTag404": { + "description": "Tag does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tagError404" + } + } + } + }, + "deleteTagDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/tagError" + } + } + } + }, + "listTimezones200": { + "description": "A list of timezones.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/timezones" + } + } + } + }, + "listTimezonesDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/timezoneError" + } + } + } + }, + "accountTokensCreateToken201": { + "description": "Token created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/accountTokensToken" + } + } + } + }, + "accountTokensCreateToken400": { + "description": "Invalid input for token creation", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountTokensProblem400" + } + } + } + }, + "accountTokensCreateToken401": { + "description": "Unauthorized user for token creation", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountTokensProblem401" + } + } + } + }, + "accountTokensCreateToken403": { + "description": "The token used to authenticate is not allowed to create additional tokens", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountTokensProblem403" + } + } + } + }, + "accountTokensCreateToken409": { + "description": "A token with the same already exists", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountTokensProblem409" + } + } + } + }, + "accountTokensCreateTokenDefault": { + "description": "Unexpected Problem creating token", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountTokensProblem" + } + } + } + }, + "accountTokensListTokens200": { + "description": "A paged array of tokens", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/accountTokensListTokensResponse" + } + } + } + }, + "accountTokensListTokens401": { + "description": "Unauthorized user for listing tokens", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountTokensProblem401" + } + } + } + }, + "accountTokensListTokensDefault": { + "description": "Unexpected Problem listing tokens", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountTokensProblem" + } + } + } + }, + "accountTokensGetToken200": { + "description": "Details of the token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/accountTokensGetTokenResponse" + } + } + } + }, + "accountTokensGetToken401": { + "description": "Unauthorized user for getting token details", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountTokensProblem401" + } + } + } + }, + "accountTokensGetToken404": { + "description": "Token not found, or not accessible to the authorized account.\n", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountTokensProblem404" + } + } + } + }, + "accountTokensGetTokenDefault": { + "description": "Unexpected Problem", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountTokensProblem" + } + } + } + }, + "accountTokensRevokeToken204": { + "description": "Token was revoked successfully" + }, + "accountTokensRevokeToken401": { + "description": "Unauthorized user for deleting token", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountTokensProblem401" + } + } + } + }, + "accountTokensRevokeToken404": { + "description": "Token not found, or not accessible to the authorized account\n", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountTokensProblem404" + } + } + } + }, + "accountTokensRevokeTokenDefault": { + "description": "Unexpected Problem deleting token", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/accountTokensProblem" + } + } + } + }, + "createObjectStorage201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceDetailResponse" + } + } + } + }, + "getObjectStorage200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceDetailResponse" + } + } + } + }, + "replaceObjectStorage200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceDetailResponse" + } + } + } + }, + "deleteObjectStorage204": { + "description": "No Content" + }, + "modifyObjectStorage200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceDetailResponse" + } + } + } + }, + "objectStorage2ListObjectStorages200": { + "description": "OK", + "headers": { + "UpCloud-Total-Count": { + "description": "Total count of items available", + "schema": { + "type": "integer", + "format": "int32" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceListResponse" + } + } + } + }, + "objectStorage2ListObjectStoragesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStorageDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ReplaceObjectStorageDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ModifyObjectStorageDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageNetworks200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2NetworkListResponse" + } + } + } + }, + "objectStorage2ListObjectStorageNetworksDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageNetwork201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2NetworkDetailResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageNetworkDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStorageNetwork200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2NetworkDetailResponse" + } + } + } + }, + "objectStorage2GetObjectStorageNetworkDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageNetwork204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStorageNetworkDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageCustomDomains200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2CustomDomainListResponse" + } + } + } + }, + "objectStorage2ListObjectStorageCustomDomainsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2AttachObjectStorageCustomDomain201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2CustomDomainDetailResponse" + } + } + } + }, + "objectStorage2AttachObjectStorageCustomDomainDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStorageCustomDomain200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2CustomDomainDetailResponse" + } + } + } + }, + "objectStorage2GetObjectStorageCustomDomainDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageCustomDomain204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStorageCustomDomainDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ModifyObjectStorageCustomDomain200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2CustomDomainDetailResponse" + } + } + } + }, + "objectStorage2ModifyObjectStorageCustomDomainDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageRegions200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2RegionListResponse" + } + } + } + }, + "objectStorage2ListObjectStorageRegionsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStorageRegion200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2RegionDetailResponse" + } + } + } + }, + "objectStorage2GetObjectStorageRegionDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStorageMetrics200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2MetricsUsageResponse" + } + } + } + }, + "objectStorage2GetObjectStorageMetricsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageBucketMetrics200": { + "description": "OK", + "headers": { + "UpCloud-Total-Count": { + "description": "Total count of items available", + "schema": { + "type": "integer", + "format": "int32" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2BucketListResponse" + } + } + } + }, + "objectStorage2ListObjectStorageBucketMetricsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageBucket201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2BucketDetailResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageBucketDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageBucket204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStorageBucketDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageMetricsSeries200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2MetricsSeriesListResponse" + } + } + } + }, + "objectStorage2ListObjectStorageMetricsSeriesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageLabels200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2LabelListResponse" + } + } + } + }, + "objectStorage2ListObjectStorageLabelsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageLabel201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2LabelDetailResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStorageLabel200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2LabelDetailResponse" + } + } + } + }, + "objectStorage2GetObjectStorageLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageLabel204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStorageLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ModifyObjectStorageLabel200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2LabelDetailResponse" + } + } + } + }, + "objectStorage2ModifyObjectStorageLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageStaticWebsites200": { + "description": "OK" + }, + "objectStorage2ListObjectStorageStaticWebsitesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageStaticWebsite201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2StaticWebsiteConfig" + } + } + } + }, + "objectStorage2CreateObjectStorageStaticWebsiteDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStorageStaticWebsite200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2StaticWebsiteConfig" + } + } + } + }, + "objectStorage2GetObjectStorageStaticWebsiteDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageStaticWebsite204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStorageStaticWebsiteDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ModifyObjectStorageStaticWebsite200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2StaticWebsiteConfig" + } + } + } + }, + "objectStorage2ModifyObjectStorageStaticWebsiteDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageDomains200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceDomains" + } + } + } + }, + "objectStorage2ListObjectStorageDomainsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageUsers200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2UserListResponse" + } + } + } + }, + "objectStorage2ListObjectStorageUsersDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageUser201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2UserDetailResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageUserDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStorageUser200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2UserDetailResponse" + } + } + } + }, + "objectStorage2GetObjectStorageUserDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageUser204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStorageUserDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageAccessKeys200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2AccessKeyListResponse" + } + } + } + }, + "objectStorage2ListObjectStorageAccessKeysDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageAccessKey201": { + "description": "Created. Note: secret_access_key is returned only on creation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2CreateAccessKeyResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageAccessKeyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStorageAccessKeyDetails200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2AccessKeyDetailResponse" + } + } + } + }, + "objectStorage2GetObjectStorageAccessKeyDetailsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageAccessKey204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStorageAccessKeyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ModifyObjectStorageAccessKeyDetails200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2AccessKeyDetailResponse" + } + } + } + }, + "objectStorage2ModifyObjectStorageAccessKeyDetailsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageAttachedUserPolicies200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyAttachmentListResponse" + } + } + } + }, + "objectStorage2ListObjectStorageAttachedUserPoliciesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2AttachObjectStorageUserPolicy204": { + "description": "No Content" + }, + "objectStorage2AttachObjectStorageUserPolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DetachObjectStorageUserPolicy204": { + "description": "No Content" + }, + "objectStorage2DetachObjectStorageUserPolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStorageUserInlinePolicy200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2InlinePolicyResponse" + } + } + } + }, + "objectStorage2GetObjectStorageUserInlinePolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageUserInlinePolicy204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStorageUserInlinePolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageUserInlinePolicies200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2InlinePolicyListResponse" + } + } + } + }, + "objectStorage2ListObjectStorageUserInlinePoliciesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageUserInlinePolicy201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2InlinePolicyResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageUserInlinePolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStorageUserTags200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2TagListResponse" + } + } + } + }, + "objectStorage2GetObjectStorageUserTagsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ReplaceObjectStorageUserTags200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2TagListResponse" + } + } + } + }, + "objectStorage2ReplaceObjectStorageUserTagsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageUserTag204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStorageUserTagDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageUserPermissionsBoundary200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PermissionsBoundaryResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageUserPermissionsBoundaryDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageUserPermissionsBoundary204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStorageUserPermissionsBoundaryDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStoragePolicyVersions200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyVersionListResponse" + } + } + } + }, + "objectStorage2ListObjectStoragePolicyVersionsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2CreateObjectStoragePolicyVersion201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyVersionResponse" + } + } + } + }, + "objectStorage2CreateObjectStoragePolicyVersionDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStoragePolicyVersion200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyVersionResponse" + } + } + } + }, + "objectStorage2GetObjectStoragePolicyVersionDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStoragePolicyVersion204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStoragePolicyVersionDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStoragePolicy200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyDetailResponse" + } + } + } + }, + "objectStorage2GetObjectStoragePolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStoragePolicy204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStoragePolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2SetObjectStorageDefaultPolicyVersion200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyDetailResponse" + } + } + } + }, + "objectStorage2SetObjectStorageDefaultPolicyVersionDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStoragePolicies200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyListResponse" + } + } + } + }, + "objectStorage2ListObjectStoragePoliciesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2CreateObjectStoragePolicy201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyDetailResponse" + } + } + } + }, + "objectStorage2CreateObjectStoragePolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageIAMGroupPolicies200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyAttachmentListResponse" + } + } + } + }, + "objectStorage2ListObjectStorageIAMGroupPoliciesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2AttachObjectStorageIAMGroupPolicy204": { + "description": "No Content" + }, + "objectStorage2AttachObjectStorageIAMGroupPolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DetachObjectStorageIAMGroupPolicy204": { + "description": "No Content" + }, + "objectStorage2DetachObjectStorageIAMGroupPolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageGroups200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2GroupListResponse" + } + } + } + }, + "objectStorage2ListObjectStorageGroupsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageGroup201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2GroupResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageGroupDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStorageGroup200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2GroupResponse" + } + } + } + }, + "objectStorage2GetObjectStorageGroupDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageGroup204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStorageGroupDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2AttachObjectStorageUserToGroup204": { + "description": "No Content" + }, + "objectStorage2AttachObjectStorageUserToGroupDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2RemoveObjectStorageUserFromGroup204": { + "description": "No Content" + }, + "objectStorage2RemoveObjectStorageUserFromGroupDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageGroupInlinePolicies200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2InlinePolicyListResponse" + } + } + } + }, + "objectStorage2ListObjectStorageGroupInlinePoliciesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageGroupInlinePolicy201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2InlinePolicyResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageGroupInlinePolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStorageGroupInlinePolicy200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2InlinePolicyResponse" + } + } + } + }, + "objectStorage2GetObjectStorageGroupInlinePolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageGroupInlinePolicy204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStorageGroupInlinePolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageRoles200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2RoleListResponse" + } + } + } + }, + "objectStorage2ListObjectStorageRolesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageRole201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2RoleResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageRoleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStorageRole200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2RoleResponse" + } + } + } + }, + "objectStorage2GetObjectStorageRoleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageRole204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStorageRoleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2UpdateObjectStorageRole200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2RoleResponse" + } + } + } + }, + "objectStorage2UpdateObjectStorageRoleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageRoleInlinePolicies200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2InlinePolicyListResponse" + } + } + } + }, + "objectStorage2ListObjectStorageRoleInlinePoliciesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageRoleInlinePolicy201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2InlinePolicyResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageRoleInlinePolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStorageRoleInlinePolicy200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2InlinePolicyResponse" + } + } + } + }, + "objectStorage2GetObjectStorageRoleInlinePolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageRoleInlinePolicy204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStorageRoleInlinePolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageRolePermissionsBoundary200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PermissionsBoundaryResponse" + } + } + } + }, + "objectStorage2CreateObjectStorageRolePermissionsBoundaryDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageRolePermissionsBoundary204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStorageRolePermissionsBoundaryDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2AssumeObjectStorageRolePolicy200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2AssumeRolePolicyResponse" + } + } + } + }, + "objectStorage2AssumeObjectStorageRolePolicyDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ListObjectStorageAttachedRolePolicies200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyAttachmentListResponse" + } + } + } + }, + "objectStorage2ListObjectStorageAttachedRolePoliciesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2AttachObjectStoragePolicyToRole204": { + "description": "No Content" + }, + "objectStorage2AttachObjectStoragePolicyToRoleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DetachObjectStoragePolicyFromRole204": { + "description": "No Content" + }, + "objectStorage2DetachObjectStoragePolicyFromRoleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2GetObjectStorageRoleTags200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2TagListResponse" + } + } + } + }, + "objectStorage2GetObjectStorageRoleTagsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2ReplaceObjectStorageRoleTags200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2TagListResponse" + } + } + } + }, + "objectStorage2ReplaceObjectStorageRoleTagsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "objectStorage2DeleteObjectStorageRoleTag204": { + "description": "No Content" + }, + "objectStorage2DeleteObjectStorageRoleTagDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ErrorResponse" + } + } + } + }, + "listFileStorages200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageServiceListResponse" + } + } + } + }, + "listFileStoragesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "createFileStorage201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageServiceDetailResponse" + } + } + } + }, + "createFileStorageDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "getFileStorage200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageServiceDetailResponse" + } + } + } + }, + "getFileStorageDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "replaceFileStorage200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageServiceDetailResponse" + } + } + } + }, + "replaceFileStorageDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "deleteFileStorage204": { + "description": "No Content" + }, + "deleteFileStorageDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "modifyFileStorage200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageServiceDetailResponse" + } + } + } + }, + "modifyFileStorageDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "listFileStorageNetworks200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageNetworkListResponse" + } + } + } + }, + "listFileStorageNetworksDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "createFileStorageNetwork201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageNetworkDetailResponse" + } + } + } + }, + "createFileStorageNetworkDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "getFileStorageNetwork200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageNetworkDetailResponse" + } + } + } + }, + "getFileStorageNetworkDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "deleteFileStorageNetwork204": { + "description": "No Content" + }, + "deleteFileStorageNetworkDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "modifyFileStorageNetwork200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageNetworkDetailResponse" + } + } + } + }, + "modifyFileStorageNetworkDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "listFileStorageShares200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageShareListResponse" + } + } + } + }, + "listFileStorageSharesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "createFileStorageShare201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageShareDetailResponse" + } + } + } + }, + "createFileStorageShareDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "getFileStorageShare200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageShareDetailResponse" + } + } + } + }, + "getFileStorageShareDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "deleteFileStorageShare204": { + "description": "No Content" + }, + "deleteFileStorageShareDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "modifyFileStorageShare200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageShareDetailResponse" + } + } + } + }, + "modifyFileStorageShareDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "listFileStorageAcls200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageAclListResponse" + } + } + } + }, + "listFileStorageAclsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "createFileStorageAcl201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageAclDetailResponse" + } + } + } + }, + "createFileStorageAclDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "getFileStorageAcl200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageAclDetailResponse" + } + } + } + }, + "getFileStorageAclDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "deleteFileStorageAcl204": { + "description": "No Content" + }, + "deleteFileStorageAclDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "modifyFileStorageAcl200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageAclDetailResponse" + } + } + } + }, + "modifyFileStorageAclDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "listFileStorageLabels200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageLabelsListResponse" + } + } + } + }, + "listFileStorageLabelsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "createFileStorageLabel201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageLabelDetails" + } + } + } + }, + "createFileStorageLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "getFileStorageLabel200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageLabelDetails" + } + } + } + }, + "getFileStorageLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "deleteFileStorageLabel204": { + "description": "No Content" + }, + "deleteFileStorageLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "modifyFileStorageLabel200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageLabelDetails" + } + } + } + }, + "modifyFileStorageLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "getFileStorageCurrentState200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageServiceDetailResponse" + } + } + } + }, + "getFileStorageCurrentStateDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/fileStorageErrorResponse" + } + } + } + }, + "listDatabaseTypes200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseAvailableServiceTypesResponse" + } + } + } + }, + "listDatabaseTypesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "listDatabasePlans200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databasePlansResponse" + } + } + } + }, + "listDatabasePlansDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseType200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceTypeResponse" + } + } + } + }, + "getDatabaseTypeDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "listDatabases200": { + "description": "OK", + "headers": { + "UpCloud-Total-Count": { + "description": "Total count of items available", + "schema": { + "type": "integer", + "format": "int32" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceInformationListResponse" + } + } + } + }, + "listDatabasesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "createDatabase201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceInformationResponse" + } + } + } + }, + "createDatabaseDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabase200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceInformationResponse" + } + } + } + }, + "getDatabaseDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "deleteDatabase204": { + "description": "No Content" + }, + "deleteDatabaseDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "modifyDatabase200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceInformationResponse" + } + } + } + }, + "modifyDatabaseDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "modifyDatabaseType200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceInformationResponse" + } + } + } + }, + "modifyDatabaseTypeDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "cloneDatabase201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceInformationResponse" + } + } + } + }, + "cloneDatabaseDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "listDatabaseNetworks200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseNetworksInformationResponse" + } + } + } + }, + "listDatabaseNetworksDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "createDatabaseNetwork201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseNetworkInformationDetailsResponse" + } + } + } + }, + "createDatabaseNetworkDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseNetwork200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseNetworkInformationDetailsResponse" + } + } + } + }, + "getDatabaseNetworkDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "deleteDatabaseNetwork204": { + "description": "No Content" + }, + "deleteDatabaseNetworkDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "upgradeDatabase201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceInformationResponse" + } + } + } + }, + "upgradeDatabaseDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "listDatabaseLabels200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseLabelsResponse" + } + } + } + }, + "listDatabaseLabelsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "createDatabaseLabel201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseLabelResponse" + } + } + } + }, + "createDatabaseLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseLabel200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseLabelResponse" + } + } + } + }, + "getDatabaseLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "deleteDatabaseLabel204": { + "description": "No Content" + }, + "deleteDatabaseLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "modifyDatabaseLabel200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseLabelResponse" + } + } + } + }, + "modifyDatabaseLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseAvailableExtensions200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseAvailableExtensionsResponse" + } + } + } + }, + "getDatabaseAvailableExtensionsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseTypeVersions200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseVersionsResponse" + } + } + } + }, + "getDatabaseTypeVersionsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseAccessControl200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseAccessControlSettingsResponse" + } + } + } + }, + "getDatabaseAccessControlDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "modifyDatabaseAccessControl200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseAccessControlSettingsResponse" + } + } + } + }, + "modifyDatabaseAccessControlDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseSecurity200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseOpenSearchSecurityPluginStatusResponse" + } + } + } + }, + "getDatabaseSecurityDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "modifyDatabaseSecurityAdmin200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseOpenSearchSecurityPluginStatusResponse" + } + } + } + }, + "modifyDatabaseSecurityAdminDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "enableDatabaseSecurityAdmin201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseOpenSearchSecurityPluginStatusResponse" + } + } + } + }, + "enableDatabaseSecurityAdminDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "listDatabaseIntegrationEndpoints200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseIntegrationEndpointsResponse" + } + } + } + }, + "listDatabaseIntegrationEndpointsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "createDatabaseIntegrationEndpoint201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseIntegrationEndpointResponse" + } + } + } + }, + "createDatabaseIntegrationEndpointDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseIntegrationEndpoint200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseIntegrationEndpointResponse" + } + } + } + }, + "getDatabaseIntegrationEndpointDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "deleteDatabaseIntegrationEndpoint204": { + "description": "No Content" + }, + "deleteDatabaseIntegrationEndpointDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "modifyDatabaseIntegrationEndpoint200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseIntegrationEndpointResponse" + } + } + } + }, + "modifyDatabaseIntegrationEndpointDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseAccountCA200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseAccountCaResponse" + } + } + } + }, + "getDatabaseAccountCADefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "listDatabaseAlerts200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseProjectAlertsResponse" + } + } + } + }, + "listDatabaseAlertsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseStatus200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceStatusResponse" + } + } + } + }, + "getDatabaseStatusDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseVersions200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceVersionsResponse" + } + } + } + }, + "getDatabaseVersionsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "startDatabaseManualMaintenance200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseUpCloudApiResponse" + } + } + } + }, + "startDatabaseManualMaintenanceDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "enableDatabaseTemporaryWrites201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseUpCloudApiResponse" + } + } + } + }, + "enableDatabaseTemporaryWritesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseMigrationStatus200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceMigrationStatusResponse" + } + } + } + }, + "getDatabaseMigrationStatusDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseAlerts200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceAlertsResponse" + } + } + } + }, + "getDatabaseAlertsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseMetrics200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseMetricsResponse" + } + } + } + }, + "getDatabaseMetricsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseQueryStatistics200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseQueryStatisticsResponse" + } + } + } + }, + "getDatabaseQueryStatisticsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseLogs200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseLogListResponse" + } + } + } + }, + "getDatabaseLogsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "listDatabaseConnectionPools200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseConnectionPoolsResponse" + } + } + } + }, + "listDatabaseConnectionPoolsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "createDatabaseConnectionPool201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseConnectionPoolResponse" + } + } + } + }, + "createDatabaseConnectionPoolDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseConnectionPool200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseConnectionPoolResponse" + } + } + } + }, + "getDatabaseConnectionPoolDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "deleteDatabaseConnectionPool204": { + "description": "No Content" + }, + "deleteDatabaseConnectionPoolDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "modifyDatabaseConnectionPool200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseConnectionPoolResponse" + } + } + } + }, + "modifyDatabaseConnectionPoolDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "listDatabaseIndices200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseIndexesResponse" + } + } + } + }, + "listDatabaseIndicesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "deleteDatabaseIndex204": { + "description": "No Content" + }, + "deleteDatabaseIndexDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "listDatabaseIntegrations200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceIntegrationsResponse" + } + } + } + }, + "listDatabaseIntegrationsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "createDatabaseIntegration201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceIntegrationResponse" + } + } + } + }, + "createDatabaseIntegrationDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseIntegration200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceIntegrationResponse" + } + } + } + }, + "getDatabaseIntegrationDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "deleteDatabaseIntegration204": { + "description": "No Content" + }, + "deleteDatabaseIntegrationDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "modifyDatabaseIntegration200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceIntegrationResponse" + } + } + } + }, + "modifyDatabaseIntegrationDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "listDatabaseLogicalDatabases200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LogicalDatabasesResponse" + } + } + } + }, + "listDatabaseLogicalDatabasesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "createDatabaseLogicalDatabase201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LogicalDatabaseResponse" + } + } + } + }, + "createDatabaseLogicalDatabaseDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "deleteDatabaseLogicalDatabase204": { + "description": "No Content" + }, + "deleteDatabaseLogicalDatabaseDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabasePeeringsStatus200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceNetworkDetailsResponse" + } + } + } + }, + "getDatabasePeeringsStatusDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseSessions200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseCurrentSessionsResponse" + } + } + } + }, + "getDatabaseSessionsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "terminateDatabaseSession204": { + "description": "No Content" + }, + "terminateDatabaseSessionDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "createDatabaseTask201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceTaskResponse" + } + } + } + }, + "createDatabaseTaskDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseTask200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceTaskDetailsResponse" + } + } + } + }, + "getDatabaseTaskDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "listDatabaseUsers200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseUsersResponse" + } + } + } + }, + "listDatabaseUsersDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "createDatabaseUser201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseUserResponse" + } + } + } + }, + "createDatabaseUserDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "getDatabaseUser200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseUserResponse" + } + } + } + }, + "getDatabaseUserDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "deleteDatabaseUser204": { + "description": "No Content" + }, + "deleteDatabaseUserDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "modifyDatabaseUser200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseUserResponse" + } + } + } + }, + "modifyDatabaseUserDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "modifyDatabaseUserAccessControl200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseUserResponse" + } + } + } + }, + "modifyDatabaseUserAccessControlDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "databaseGetPGAvailableExtensions200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databasePGAvailableExtensionsResponse" + } + } + } + }, + "databaseGetPGAvailableExtensionsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/databaseErrorResponse" + } + } + } + }, + "listGatewayPlans200": { + "description": "OK", + "headers": { + "UpCloud-Total-Count": { + "description": "Total count of items available", + "schema": { + "type": "integer", + "format": "int32" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayPlanListResponse" + } + } + } + }, + "listGatewayPlansDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "getGatewayPlan200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayPlanDetailsResponse" + } + } + } + }, + "getGatewayPlanDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "listGatewayServices200": { + "description": "OK", + "headers": { + "UpCloud-Total-Count": { + "description": "Total count of items available", + "schema": { + "type": "integer", + "format": "int32" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayServiceListResponse" + } + } + } + }, + "listGatewayServicesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "createGatewayService200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayServiceDetailsResponse" + } + } + } + }, + "createGatewayServiceDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "getGatewayService200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayServiceDetailsResponse" + } + } + } + }, + "getGatewayServiceDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "replaceGatewayService200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayServiceDetailsResponse" + } + } + } + }, + "replaceGatewayServiceDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "deleteGatewayService204": { + "description": "No Content" + }, + "deleteGatewayServiceDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "modifyGatewayService200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayServiceDetailsResponse" + } + } + } + }, + "modifyGatewayServiceDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "flushGatewayNat200": { + "description": "No Content" + }, + "flushGatewayNatDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "listGatewayConnections200": { + "description": "OK", + "headers": { + "UpCloud-Total-Count": { + "description": "Total count of items available", + "schema": { + "type": "integer", + "format": "int32" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayConnectionListResponse" + } + } + } + }, + "listGatewayConnectionsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "createGatewayConnection200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayConnectionDetailsResponse" + } + } + } + }, + "createGatewayConnectionDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "getGatewayConnection200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayConnectionDetailsResponse" + } + } + } + }, + "getGatewayConnectionDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "deleteGatewayConnection204": { + "description": "No Content" + }, + "deleteGatewayConnectionDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "modifyGatewayConnection200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayConnectionDetailsResponse" + } + } + } + }, + "modifyGatewayConnectionDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "listGatewayTunnels200": { + "description": "OK", + "headers": { + "UpCloud-Total-Count": { + "description": "Total count of items available", + "schema": { + "type": "integer", + "format": "int32" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayTunnelListResponse" + } + } + } + }, + "listGatewayTunnelsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "createGatewayTunnel200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayTunnelDetailsResponse" + } + } + } + }, + "createGatewayTunnelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "getGatewayTunnel200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayTunnelDetailsResponse" + } + } + } + }, + "getGatewayTunnelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "deleteGatewayTunnel204": { + "description": "No Content" + }, + "deleteGatewayTunnelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "modifyGatewayTunnel200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayTunnelDetailsResponse" + } + } + } + }, + "modifyGatewayTunnelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "listGatewayServiceLabels200": { + "description": "OK", + "headers": { + "UpCloud-Total-Count": { + "description": "Total count of items available", + "schema": { + "type": "integer", + "format": "int32" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayServiceLabelListResponse" + } + } + } + }, + "listGatewayServiceLabelsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "createGatewayServiceLabel201": { + "description": "Created" + }, + "createGatewayServiceLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "getGatewayServiceLabel200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayLabelDetailsResponse" + } + } + } + }, + "getGatewayServiceLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "deleteGatewayServiceLabel204": { + "description": "No Content" + }, + "deleteGatewayServiceLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "modifyGatewayServiceLabel200": { + "description": "OK" + }, + "modifyGatewayServiceLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "listGatewayAddresses200": { + "description": "OK", + "headers": { + "UpCloud-Total-Count": { + "description": "Total count of items available", + "schema": { + "type": "integer", + "format": "int32" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayAddressListResponse" + } + } + } + }, + "listGatewayAddressesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "getGatewayAddress200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayAddressDetailsResponse" + } + } + } + }, + "getGatewayAddressDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "modifyGatewayAddress200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayAddressDetailsResponse" + } + } + } + }, + "modifyGatewayAddressDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "releaseGatewayFloatingIp202": { + "description": "Accepted" + }, + "releaseGatewayFloatingIpDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "getGatewayMetrics200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayServiceMetricsResponse" + } + } + } + }, + "getGatewayMetricsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "createGatewayServiceLogSession200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayServiceLogSessionCreateResponse" + } + } + } + }, + "createGatewayServiceLogSessionDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/gatewayErrorResponse" + } + } + } + }, + "listLoadBalancers200": { + "description": "Created", + "headers": { + "UpCloud-Total-Count": { + "description": "Total count of items available", + "schema": { + "type": "integer", + "format": "int32" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerServicesResponse" + } + } + } + }, + "listLoadBalancersDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "createLoadBalancer201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerService" + } + } + } + }, + "createLoadBalancerDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancer200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerService" + } + } + } + }, + "getLoadBalancerDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "replaceLoadBalancer200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerService" + } + } + } + }, + "replaceLoadBalancerDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "deleteLoadBalancer204": { + "description": "No Content" + }, + "deleteLoadBalancerDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "modifyLoadBalancer200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerService" + } + } + } + }, + "modifyLoadBalancerDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "listLoadBalancerFrontends200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendsResponse" + } + } + } + }, + "listLoadBalancerFrontendsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "createLoadBalancerFrontend201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontend" + } + } + } + }, + "createLoadBalancerFrontendDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerFrontend200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontend" + } + } + } + }, + "getLoadBalancerFrontendDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "deleteLoadBalancerFrontend204": { + "description": "No Content" + }, + "deleteLoadBalancerFrontendDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "modifyLoadBalancerFrontend200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontend" + } + } + } + }, + "modifyLoadBalancerFrontendDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "listLoadBalancerFrontendTlsConfigs200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendTlsConfigsResponse" + } + } + } + }, + "listLoadBalancerFrontendTlsConfigsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "createLoadBalancerFrontendTlsConfig201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfig" + } + } + } + }, + "createLoadBalancerFrontendTlsConfigDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerFrontendTlsConfig200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfig" + } + } + } + }, + "getLoadBalancerFrontendTlsConfigDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "deleteLoadBalancerFrontendTlsConfig204": { + "description": "No Content" + }, + "deleteLoadBalancerFrontendTlsConfigDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "modifyLoadBalancerFrontendTlsConfig200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfig" + } + } + } + }, + "modifyLoadBalancerFrontendTlsConfigDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "listLoadBalancerRules200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerRulesResponse" + } + } + } + }, + "listLoadBalancerRulesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "createLoadBalancerRule201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerRule" + } + } + } + }, + "createLoadBalancerRuleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerRule200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerRule" + } + } + } + }, + "getLoadBalancerRuleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "replaceLoadBalancerRule200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerRule" + } + } + } + }, + "replaceLoadBalancerRuleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "deleteLoadBalancerRule204": { + "description": "No Content" + }, + "deleteLoadBalancerRuleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "modifyLoadBalancerRule200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerRule" + } + } + } + }, + "modifyLoadBalancerRuleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "listLoadBalancerBackends200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendsResponse" + } + } + } + }, + "listLoadBalancerBackendsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "createLoadBalancerBackend201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerBackend" + } + } + } + }, + "createLoadBalancerBackendDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerBackend200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerBackend" + } + } + } + }, + "getLoadBalancerBackendDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "deleteLoadBalancerBackend204": { + "description": "No Content" + }, + "deleteLoadBalancerBackendDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "modifyLoadBalancerBackend200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerBackend" + } + } + } + }, + "modifyLoadBalancerBackendDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "listLoadBalancerMembers200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerMembersResponse" + } + } + } + }, + "listLoadBalancerMembersDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "createLoadBalancerMember201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerMember" + } + } + } + }, + "createLoadBalancerMemberDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerMember200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerMember" + } + } + } + }, + "getLoadBalancerMemberDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "deleteLoadBalancerMember204": { + "description": "No Content" + }, + "deleteLoadBalancerMemberDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "modifyLoadBalancerMember200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerMember" + } + } + } + }, + "modifyLoadBalancerMemberDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "listLoadBalancerBackendTlsConfigs200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfigsResponse" + } + } + } + }, + "listLoadBalancerBackendTlsConfigsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "createLoadBalancerBackendTlsConfig201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfig" + } + } + } + }, + "createLoadBalancerBackendTlsConfigDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerBackendTlsConfig200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfig" + } + } + } + }, + "getLoadBalancerBackendTlsConfigDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "deleteLoadBalancerBackendTlsConfig204": { + "description": "No Content" + }, + "deleteLoadBalancerBackendTlsConfigDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "modifyLoadBalancerBackendTlsConfig200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfig" + } + } + } + }, + "modifyLoadBalancerBackendTlsConfigDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "modifyLoadBalancerNetwork200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerNetwork" + } + } + } + }, + "modifyLoadBalancerNetworkDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "listLoadBalancerIpAddresses200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerIpAddressesResponse" + } + } + } + }, + "listLoadBalancerIpAddressesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "createLoadBalancerIpAddress201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerIpAddress" + } + } + } + }, + "createLoadBalancerIpAddressDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerIpAddress200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerIpAddressesResponse" + } + } + } + }, + "getLoadBalancerIpAddressDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "deleteLoadBalancerIpAddress204": { + "description": "No Content" + }, + "deleteLoadBalancerIpAddressDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "listLoadBalancerResolvers200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerResolversResponse" + } + } + } + }, + "listLoadBalancerResolversDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "createLoadBalancerResolver201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerResolver" + } + } + } + }, + "createLoadBalancerResolverDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerResolver200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerResolver" + } + } + } + }, + "getLoadBalancerResolverDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "deleteLoadBalancerResolver204": { + "description": "No Content" + }, + "deleteLoadBalancerResolverDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "modifyLoadBalancerResolver200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerResolver" + } + } + } + }, + "modifyLoadBalancerResolverDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "listLoadBalancerLabels200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceLabelsResponse" + } + } + } + }, + "listLoadBalancerLabelsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "createLoadBalancerLabel201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelResponse" + } + } + } + }, + "createLoadBalancerLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerLabel200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelResponse" + } + } + } + }, + "getLoadBalancerLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "deleteLoadBalancerLabel204": { + "description": "No Content" + }, + "deleteLoadBalancerLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "modifyLoadBalancerLabel200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelResponse" + } + } + } + }, + "modifyLoadBalancerLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerMetrics200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerMetrics" + } + } + } + }, + "getLoadBalancerMetricsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerMetricsSeries200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerMetricsSeriesResponse" + } + } + } + }, + "getLoadBalancerMetricsSeriesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerFrontendCombinedMetricsSeries200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendMetricsSeriesResponse" + } + } + } + }, + "getLoadBalancerFrontendCombinedMetricsSeriesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerFrontendMetricsSeries200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendMetricsSeriesResponse" + } + } + } + }, + "getLoadBalancerFrontendMetricsSeriesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerBackendCombinedMetricsSeries200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendMetricsSeriesResponse" + } + } + } + }, + "getLoadBalancerBackendCombinedMetricsSeriesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerBackendMetricsSeries200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendMetricsSeriesResponse" + } + } + } + }, + "getLoadBalancerBackendMetricsSeriesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerMemberCombinedMetricsSeries200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerMemberMetricsSeriesResponse" + } + } + } + }, + "getLoadBalancerMemberCombinedMetricsSeriesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerMemberMetricsSeries200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerMemberMetricsSeriesResponse" + } + } + } + }, + "getLoadBalancerMemberMetricsSeriesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "listLoadBalancerCertificateBundles200": { + "description": "Created", + "headers": { + "UpCloud-Total-Count": { + "description": "Total count of items available", + "schema": { + "type": "integer", + "format": "int32" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerCertificatesBundleResponse" + } + } + } + }, + "listLoadBalancerCertificateBundlesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "createLoadBalancerCertificateBundle201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerCertificateBundle" + } + } + } + }, + "createLoadBalancerCertificateBundleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerCertificateBundle200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerCertificateBundle" + } + } + } + }, + "getLoadBalancerCertificateBundleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "deleteLoadBalancerCertificateBundle204": { + "description": "No Content" + }, + "deleteLoadBalancerCertificateBundleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "modifyLoadBalancerCertificateBundle200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerCertificateBundle" + } + } + } + }, + "modifyLoadBalancerCertificateBundleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "listLoadBalancerCertificateBundleLabels200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerCertificateBundleLabelsResponse" + } + } + } + }, + "listLoadBalancerCertificateBundleLabelsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "createLoadBalancerCertificateBundleLabel201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelResponse" + } + } + } + }, + "createLoadBalancerCertificateBundleLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerCertificateBundleLabel200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelResponse" + } + } + } + }, + "getLoadBalancerCertificateBundleLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "deleteLoadBalancerCertificateBundleLabel204": { + "description": "No Content" + }, + "deleteLoadBalancerCertificateBundleLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "modifyLoadBalancerCertificateBundleLabel200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelResponse" + } + } + } + }, + "modifyLoadBalancerCertificateBundleLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerDnsChallengeDomain200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerDnsChallengeDomainResponse" + } + } + } + }, + "getLoadBalancerDnsChallengeDomainDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "listLoadBalancerPlans200": { + "description": "Created", + "headers": { + "UpCloud-Total-Count": { + "description": "Total count of items available", + "schema": { + "type": "integer", + "format": "int32" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerPlansResponse" + } + } + } + }, + "listLoadBalancerPlansDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "getLoadBalancerPlan200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerPlan" + } + } + } + }, + "getLoadBalancerPlanDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerErrorResponse" + } + } + } + }, + "listFirewallRulesets200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetListResponse" + } + } + } + }, + "listFirewallRulesetsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "createFirewallRuleset201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetDetailResponse" + } + } + } + }, + "createFirewallRulesetDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "getFirewallRuleset200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetDetailResponse" + } + } + } + }, + "getFirewallRulesetDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "deleteFirewallRuleset204": { + "description": "No Content" + }, + "deleteFirewallRulesetDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "modifyFirewallRuleset200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetDetailResponse" + } + } + } + }, + "modifyFirewallRulesetDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "restoreFirewallRuleset200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetDetailResponse" + } + } + } + }, + "restoreFirewallRulesetDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "listFirewallRulesetRules200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetFirewallRuleListResponse" + } + } + } + }, + "listFirewallRulesetRulesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "createMultipleFirewallRulesetRule200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetFirewallRuleListResponse" + } + } + } + }, + "createMultipleFirewallRulesetRuleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "createFirewallRulesetRule201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetRuleDetailResponse" + } + } + } + }, + "createFirewallRulesetRuleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "getFirewallRulesetRule200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetRuleDetailResponse" + } + } + } + }, + "getFirewallRulesetRuleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "deleteFirewallRulesetRule204": { + "description": "No Content" + }, + "deleteFirewallRulesetRuleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "modifyFirewallRulesetRule200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetRuleDetailResponse" + } + } + } + }, + "modifyFirewallRulesetRuleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "listFirewallRulesetLabels200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetLabelListResponse" + } + } + } + }, + "listFirewallRulesetLabelsDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "createFirewallRulesetLabel201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetLabelDetailResponse" + } + } + } + }, + "createFirewallRulesetLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "listFirewallRulesetAttachedServers200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetLabelListResponse" + } + } + } + }, + "listFirewallRulesetAttachedServersDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "getFirewallRulesetLabel200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetLabelDetailResponse" + } + } + } + }, + "getFirewallRulesetLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "deleteFirewallRulesetLabel204": { + "description": "No Content" + }, + "deleteFirewallRulesetLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "modifyFirewallRulesetLabel200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetLabelDetailResponse" + } + } + } + }, + "modifyFirewallRulesetLabelDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "firewallRulesetListServerFirewallRule200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerFirewallDetailResponse" + } + } + } + }, + "firewallRulesetListServerFirewallRuleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "firewallRulesetCreateMultipleServerFirewallRules200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerFirewallDetailResponse" + } + } + } + }, + "firewallRulesetCreateMultipleServerFirewallRules400": { + "description": "Invalid input", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorLegacyResponse" + } + } + } + }, + "firewallRulesetCreateMultipleServerFirewallRules403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorLegacyResponse" + } + } + } + }, + "firewallRulesetCreateMultipleServerFirewallRules404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorLegacyResponse" + } + } + } + }, + "firewallRulesetCreateMultipleServerFirewallRules409": { + "description": "Conflict", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorLegacyResponse" + } + } + } + }, + "firewallRulesetCreateMultipleServerFirewallRulesDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "firewallRulesetCreateServerFirewallRule201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerFirewallRuleDetail" + } + } + } + }, + "firewallRulesetCreateServerFirewallRule400": { + "description": "Invalid input", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorLegacyResponse" + } + } + } + }, + "firewallRulesetCreateServerFirewallRule403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorLegacyResponse" + } + } + } + }, + "firewallRulesetCreateServerFirewallRule404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorLegacyResponse" + } + } + } + }, + "firewallRulesetCreateServerFirewallRule409": { + "description": "Conflict", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorLegacyResponse" + } + } + } + }, + "firewallRulesetCreateServerFirewallRuleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "firewallRulesetGetServerFirewallRule200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerFirewallRuleDetail" + } + } + } + }, + "firewallRulesetGetServerFirewallRuleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "firewallRulesetDeleteServerFirewallRule204": { + "description": "No Content" + }, + "firewallRulesetDeleteServerFirewallRule400": { + "description": "Invalid input", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorLegacyResponse" + } + } + } + }, + "firewallRulesetDeleteServerFirewallRule403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorLegacyResponse" + } + } + } + }, + "firewallRulesetDeleteServerFirewallRule404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorLegacyResponse" + } + } + } + }, + "firewallRulesetDeleteServerFirewallRule409": { + "description": "Conflict", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorLegacyResponse" + } + } + } + }, + "firewallRulesetDeleteServerFirewallRuleDefault": { + "description": "Unexpected error", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetErrorResponse" + } + } + } + }, + "listVNCKeymaps200": { + "description": "A list of VNC keymaps.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/vncKeymapKeymaps" + } + } + } + }, + "listVNCKeymapsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/vncKeymapError" + } + } + } + }, + "listZones200": { + "description": "A list of zones.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/zones" + } + } + } + }, + "listZonesDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/zoneError" + } + } + } + }, + "listZoneVLANs200": { + "description": "A list of zones.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/zoneVlans" + } + } + } + }, + "listZoneVLANsDefault": { + "description": "General failure", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/zoneError" + } + } + } + } + }, + "parameters": { + "listAccountsLabel": { + "name": "label", + "in": "query", + "description": "Filter by label key or key-value pair. Repeat the parameter to require all labels. Label keys are matched case-insensitively.", + "required": false, + "schema": { + "type": "string" + } + }, + "getAccountNetworkTopUsageFrom": { + "name": "from", + "in": "query", + "description": "Start of the usage period.", + "required": true, + "schema": { + "$ref": "#/components/schemas/accountRfc3339Datetime" + } + }, + "getAccountNetworkTopUsageTo": { + "name": "to", + "in": "query", + "description": "End of the usage period.", + "required": true, + "schema": { + "$ref": "#/components/schemas/accountRfc3339Datetime" + } + }, + "getAccountNetworkTopUsageService": { + "name": "service", + "in": "query", + "description": "Filter by service type. Repeat the parameter to include multiple service types.", + "required": false, + "schema": { + "$ref": "#/components/schemas/accountResourceNetworkUsageType" + } + }, + "getAccountNetworkTopUsageZone": { + "name": "zone", + "in": "query", + "description": "Filter by zone. Repeat the parameter to include multiple zones.", + "required": false, + "schema": { + "$ref": "#/components/schemas/accountZone" + } + }, + "getAccountNetworkTopUsageAccumulate": { + "name": "accumulate", + "in": "query", + "description": "Accumulation period for the usage statistics.", + "required": false, + "schema": { + "$ref": "#/components/schemas/accountUsageAccumulateParameter" + } + }, + "getAccountNetworkUsageFrom": { + "name": "from", + "in": "query", + "description": "First measurement timestamp in RFC 3339 format.", + "required": true, + "schema": { + "$ref": "#/components/schemas/accountRfc3339Datetime" + } + }, + "getAccountNetworkUsageTo": { + "name": "to", + "in": "query", + "description": "Last measurement timestamp in RFC 3339 format.", + "required": true, + "schema": { + "$ref": "#/components/schemas/accountRfc3339Datetime" + } + }, + "getAccountNetworkUsageAccumulate": { + "name": "accumulate", + "in": "query", + "description": "Accumulate the transfer statistics by hour or day.", + "required": false, + "schema": { + "$ref": "#/components/schemas/accountUsageAccumulateParameter" + } + }, + "getAccountResourceNetworkUsageFrom": { + "name": "from", + "in": "query", + "description": "Data start timestamp in RFC 3339 format.", + "required": true, + "schema": { + "$ref": "#/components/schemas/accountRfc3339Datetime" + } + }, + "getAccountResourceNetworkUsageTo": { + "name": "to", + "in": "query", + "description": "Data end timestamp in RFC 3339 format.", + "required": true, + "schema": { + "$ref": "#/components/schemas/accountRfc3339Datetime" + } + }, + "getAccountResourceNetworkUsageService": { + "name": "service", + "in": "query", + "description": "Limit results to a service type. Repeat the parameter to include multiple service types.", + "required": false, + "schema": { + "$ref": "#/components/schemas/accountResourceNetworkUsageType" + } + }, + "getAccountResourceNetworkUsageResourceId": { + "name": "resource_id", + "in": "query", + "description": "Limit results to this resource UUID.", + "required": false, + "schema": { + "$ref": "#/components/schemas/accountUuid" + } + }, + "getAccountResourceNetworkUsageZone": { + "name": "zone", + "in": "query", + "description": "Limit results to a zone. Repeat the parameter to include multiple zones.", + "required": false, + "schema": { + "$ref": "#/components/schemas/accountZone" + } + }, + "getAccountResourceNetworkUsageAccumulate": { + "name": "accumulate", + "in": "query", + "description": "Accumulate the transfer statistics by hour or day.", + "required": false, + "schema": { + "$ref": "#/components/schemas/accountUsageAccumulateParameter" + } + }, + "deleteSubaccountUsername": { + "name": "username", + "in": "path", + "description": "Subaccount username.", + "required": true, + "schema": { + "$ref": "#/components/schemas/accountUserName" + } + }, + "accountGetMonthlyDetailedBillingSummaryYear": { + "name": "year", + "in": "path", + "description": "Billing year.", + "required": true, + "schema": { + "type": "string", + "pattern": "^20\\d{2}$" + } + }, + "accountGetMonthlyDetailedBillingSummaryMonth": { + "name": "month", + "in": "path", + "description": "Billing month.", + "required": true, + "schema": { + "type": "string", + "pattern": "^(0[1-9]|1[0-2])$" + } + }, + "accountGetMonthlyDetailedBillingSummaryUsername": { + "name": "username", + "in": "query", + "description": "Return the billing summary for this account instead of the calling account. Requires Partner API access and an existing association with the account.", + "required": false, + "schema": { + "$ref": "#/components/schemas/accountUserName" + } + }, + "accountGetMonthlyDetailedBillingSummaryResourceId": { + "name": "resource_id", + "in": "query", + "description": "Return details only for this resource UUID or IP address.", + "required": false, + "schema": { + "type": "string", + "maxLength": 128 + } + }, + "accountGetMonthlyBillingSummaryYear": { + "name": "year", + "in": "path", + "description": "Billing year.", + "required": true, + "schema": { + "type": "string", + "pattern": "^20\\d{2}$" + } + }, + "accountGetMonthlyBillingSummaryMonth": { + "name": "month", + "in": "path", + "description": "Billing month.", + "required": true, + "schema": { + "type": "string", + "pattern": "^(0[1-9]|1[0-2])$" + } + }, + "accountGetMonthlyResourceBillingSummaryResourceId": { + "name": "resource_id", + "in": "path", + "description": "Server UUID, storage UUID, or IP address.", + "required": true, + "schema": { + "type": "string" + } + }, + "accountGetMonthlyResourceBillingSummaryYear": { + "name": "year", + "in": "path", + "description": "Billing year.", + "required": true, + "schema": { + "type": "string", + "pattern": "^20\\d{2}$" + } + }, + "accountGetMonthlyResourceBillingSummaryMonth": { + "name": "month", + "in": "path", + "description": "Billing month.", + "required": true, + "schema": { + "type": "string", + "pattern": "^(0[1-9]|1[0-2])$" + } + }, + "getKubernetesClusterOIDCKubeconfigAudience": { + "name": "audience", + "in": "query", + "description": "Which of the issuer's configured audiences to use as the OIDC client id in the generated kubeconfig. When omitted, the issuer's first audience is used. Must match one of the issuer's audiences.\n", + "required": false, + "schema": { + "type": "string" + } + }, + "kubernetesUuid": { + "name": "uuid", + "in": "path", + "description": "UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/kubernetesUuid" + } + }, + "kubernetesName": { + "name": "name", + "in": "path", + "description": "Name", + "required": true, + "schema": { + "$ref": "#/components/schemas/kubernetesName" + } + }, + "kubernetesNodeName": { + "name": "node-name", + "in": "path", + "description": "Node name", + "required": true, + "schema": { + "$ref": "#/components/schemas/kubernetesNodeName" + } + }, + "getAvailablePassthroughDevicesZone": { + "name": "zone", + "in": "query", + "description": "Filter results to a specific zone.", + "required": false, + "schema": { + "type": "string" + } + }, + "getAvailablePassthroughDevicesType": { + "name": "type", + "in": "query", + "description": "Filter results to a specific device type. The only valid type is \"gpu\" for now.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "gpu" + ] + } + }, + "listEventsServerUuid": { + "name": "server_uuid", + "in": "path", + "description": "Filter results to a specific server.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + "listEventsOffset": { + "name": "offset", + "in": "path", + "description": "The number of items to skip before starting to collect the result set. Default is 0.", + "required": true, + "schema": { + "type": "integer", + "minimum": 0 + } + }, + "listEventsCount": { + "name": "count", + "in": "path", + "description": "The numbers of items to return.", + "required": true, + "schema": { + "type": "integer", + "maximum": 10000, + "minimum": 1 + } + }, + "getIPAddressDetailsAddress": { + "name": "address", + "in": "path", + "description": "The IP address to retrieve details for.", + "required": true, + "schema": { + "type": "string", + "format": "ipv4" + } + }, + "modifyIPAddressAddress": { + "name": "address", + "in": "path", + "description": "The IP address to modify.", + "required": true, + "schema": { + "$ref": "#/components/schemas/ipAddress" + } + }, + "deleteIPAddressAddress": { + "name": "address", + "in": "path", + "description": "The IP address to delete.", + "required": true, + "schema": { + "$ref": "#/components/schemas/ipAddress" + } + }, + "patchModifyIPAddressAddress": { + "name": "address", + "in": "path", + "description": "The IP address to modify.", + "required": true, + "schema": { + "type": "string", + "format": "ipv4" + } + }, + "listNetworkPeeringsUuid": { + "name": "uuid", + "in": "query", + "description": "Filter by network peering UUID.", + "required": false, + "schema": { + "$ref": "#/components/schemas/networkPeeringUuid" + } + }, + "listNetworkPeeringsNetworkUuidLocal": { + "name": "network_uuid_local", + "in": "query", + "description": "Filter by local network uuid.", + "required": false, + "schema": { + "$ref": "#/components/schemas/networkPeeringUuid" + } + }, + "listNetworkPeeringsNetworkUuidPeer": { + "name": "network_uuid_peer", + "in": "query", + "description": "Filter by peer network uuid.", + "required": false, + "schema": { + "$ref": "#/components/schemas/networkPeeringUuid" + } + }, + "listNetworkPeeringsLabel": { + "name": "label", + "in": "query", + "description": "Label filter in the form key=value. Can be specified multiple times to filter by multiple labels.", + "required": false, + "schema": { + "type": "string" + } + }, + "getNetworkPeeringPeeringUuid": { + "name": "peering_uuid", + "in": "path", + "description": "The network peering identifier.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + "deleteNetworkPeeringPeeringUuid": { + "name": "peering_uuid", + "in": "path", + "description": "The network peering identifier.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + "modifyNetworkPeeringPeeringUuid": { + "name": "peering_uuid", + "in": "path", + "description": "The network peering identifier.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + "listNetworksLabel": { + "name": "label", + "in": "query", + "description": "Filter networks by labels.", + "required": false, + "schema": { + "$ref": "#/components/schemas/networkLabel" + } + }, + "getNetworkInterfaceDetailsUuid": { + "name": "uuid", + "in": "path", + "description": "UUID of the network interface.", + "required": true, + "schema": { + "$ref": "#/components/schemas/networkUuid" + } + }, + "deleteNetworkInterfaceUuid": { + "name": "uuid", + "in": "path", + "description": "UUID of the network.", + "required": true, + "schema": { + "$ref": "#/components/schemas/networkUuid" + } + }, + "getNetworkDetailsUuid": { + "name": "uuid", + "in": "path", + "description": "UUID of the network.", + "required": true, + "schema": { + "$ref": "#/components/schemas/networkUuid" + } + }, + "modifyNetworkUuid": { + "name": "uuid", + "in": "path", + "description": "UUID of the network.", + "required": true, + "schema": { + "$ref": "#/components/schemas/networkUuid" + } + }, + "deleteNetworkUuid": { + "name": "uuid", + "in": "path", + "description": "UUID of the network.", + "required": true, + "schema": { + "$ref": "#/components/schemas/networkUuid" + } + }, + "listAuditLogsQ": { + "name": "q", + "in": "query", + "description": "Filter audit logs using a keyword such as account username, resource ID or IP address.", + "required": false, + "schema": { + "$ref": "#/components/schemas/auditLogsQueryParameter" + } + }, + "listAuditLogsLimit": { + "name": "limit", + "in": "query", + "description": "Number of results to return (max 100, default 50)", + "required": false, + "schema": { + "$ref": "#/components/schemas/auditLogsLimitParameter" + } + }, + "listAuditLogsOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results. (default 0)", + "required": false, + "schema": { + "$ref": "#/components/schemas/auditLogsOffsetParameter" + } + }, + "listAuditLogsActions": { + "name": "actions", + "in": "query", + "description": "List of actions to filter by", + "required": false, + "schema": { + "$ref": "#/components/schemas/auditLogsActionsParameter" + } + }, + "listAuditLogsOrigins": { + "name": "origins", + "in": "query", + "description": "List of origins to filter by", + "required": false, + "schema": { + "$ref": "#/components/schemas/auditLogsOriginsParameter" + } + }, + "listAuditLogsResourceTypes": { + "name": "resource_types", + "in": "query", + "description": "List of resource types to filter by", + "required": false, + "schema": { + "$ref": "#/components/schemas/auditLogsResourceTypesParameter" + } + }, + "listAuditLogsCreatedAfter": { + "name": "created_after", + "in": "query", + "description": "List audit logs created after the given timestamp (including the time of timestamp). Format: ISO timestamp eg. 2024-01-01T23:45:56Z", + "required": false, + "schema": { + "$ref": "#/components/schemas/auditLogsCreatedAfterParameter" + } + }, + "listAuditLogsCreatedBefore": { + "name": "created_before", + "in": "query", + "description": "List audit logs created before the given timestamp (including the time of timestamp). Format: ISO timestamp eg. 2024-01-01T23:45:56Z", + "required": false, + "schema": { + "$ref": "#/components/schemas/auditLogsCreatedBeforeParameter" + } + }, + "exportAuditLogsFormat": { + "name": "format", + "in": "query", + "description": "Export format: 'csv' or 'json' (default: csv)", + "required": false, + "schema": { + "$ref": "#/components/schemas/auditLogsFormatParameter" + } + }, + "auditLogsGetAuditLogCloudEventID": { + "name": "cloudEventID", + "in": "path", + "description": "Cloud event ID (ULID format)", + "required": true, + "schema": { + "$ref": "#/components/schemas/auditLogsCloudEventIDParameter" + } + }, + "grantPermissionSkipTargetCheck": { + "name": "skip_target_check", + "in": "query", + "description": "If true, skips the check whether the target resource exists. Default is false.", + "required": false, + "schema": { + "type": "boolean" + } + }, + "revokeAllPermissionsByTargetTargetType": { + "name": "target_type", + "in": "path", + "description": "The type of the target resource (e.g., \"server\", \"storage\").", + "required": true, + "schema": { + "type": "string" + } + }, + "revokeAllPermissionsByTargetTargetIdentifier": { + "name": "target_identifier", + "in": "path", + "description": "The identifier of the target resource.", + "required": true, + "schema": { + "type": "string" + } + }, + "revokeAllPermissionsByTargetMainAccountId": { + "name": "main_account_id", + "in": "query", + "description": "If specified, revokes permissions for resources owned by the specified main account ID. Default is the current main account.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + "revokeAllPermissionsByUserUser": { + "name": "user", + "in": "path", + "description": "The username of the sub-account.", + "required": true, + "schema": { + "type": "string" + } + }, + "getPriceZone": { + "name": "zone", + "in": "query", + "description": "Filter results to a specific zone. Can be specified multiple times.", + "required": false, + "schema": { + "type": "string" + } + }, + "listRoutersLabel": { + "name": "label", + "in": "query", + "description": "A label filter. Can be specified multiple times to create an AND condition. Format: label=key:value", + "schema": { + "$ref": "#/components/schemas/routerLabel" + } + }, + "getRouterRouter": { + "name": "router", + "in": "path", + "description": "The router identifier.", + "required": true, + "schema": { + "$ref": "#/components/schemas/routerUuid" + } + }, + "deleteRouterRouter": { + "name": "router", + "in": "path", + "description": "The router identifier.", + "required": true, + "schema": { + "$ref": "#/components/schemas/routerUuid" + } + }, + "modifyRouterRouter": { + "name": "router", + "in": "path", + "description": "The router identifier.", + "required": true, + "schema": { + "$ref": "#/components/schemas/routerUuid" + } + }, + "listServerGroupsLabel": { + "name": "label", + "in": "query", + "description": "A label filter to apply. Format: key:value. Multiple labels can be specified by repeating the parameter.", + "required": false, + "schema": { + "$ref": "#/components/schemas/serverGroupLabel" + } + }, + "getServerGroupUuid": { + "name": "uuid", + "in": "path", + "description": "The UUID of the server group to retrieve.", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverGroupUuid" + } + }, + "deleteServerGroupUuid": { + "name": "uuid", + "in": "path", + "description": "The UUID of the server group to delete.", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverGroupUuid" + } + }, + "modifyServerGroupUuid": { + "name": "uuid", + "in": "path", + "description": "The UUID of the server group to modify.", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverGroupUuid" + } + }, + "listServerGroupMembersUuid": { + "name": "uuid", + "in": "path", + "description": "The UUID of the server group whose members are to be listed.", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverGroupUuid" + } + }, + "serverGroupAddServerToGroupUuid": { + "name": "uuid", + "in": "path", + "description": "The UUID of the server group to which the server will be added.", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverGroupUuid" + } + }, + "serverGroupRemoveServerFromGroupUuid": { + "name": "uuid", + "in": "path", + "description": "The UUID of the server group from which the server will be removed.", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverGroupUuid" + } + }, + "serverGroupRemoveServerFromGroupServerUuid": { + "name": "server_uuid", + "in": "path", + "description": "The UUID of the server to remove from the group.", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverGroupUuid" + } + }, + "listServersLabel": { + "name": "label", + "in": "query", + "description": "Filter by label key or key-value pair using \"key\" or \"key=value\". Repeat the parameter to require all labels.", + "required": false, + "schema": { + "type": "string" + } + }, + "listServersUuid": { + "name": "uuid", + "in": "query", + "description": "Filter by Cloud Server UUID. Repeat the parameter to match any of up to five UUIDs.", + "required": false, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "listServersHost": { + "name": "host", + "in": "query", + "description": "Filter by Private Cloud host ID. Repeat the parameter to match any of up to five hosts.", + "required": false, + "schema": { + "$ref": "#/components/schemas/serverEncodedHostId" + } + }, + "listServersDevice": { + "name": "device", + "in": "query", + "description": "Filter by attached device using \"type=gpu\" or \"type!=gpu\". Repeat the parameter for up to five filters.", + "required": false, + "schema": { + "type": "string" + } + }, + "listServersState": { + "name": "state", + "in": "query", + "description": "Filter by the current Cloud Server state.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "started", + "stopped", + "maintenance", + "error" + ] + } + }, + "listServersTag": { + "name": "tag", + "in": "query", + "description": "Filter by tag name. Separate names with commas to match any tag or colons to require all tags.", + "required": false, + "schema": { + "$ref": "#/components/schemas/serverTagList" + } + }, + "listServersSearch": { + "name": "search", + "in": "query", + "description": "Search UUIDs, titles, hostnames, zones, zone descriptions, IP addresses, tags, and template names.", + "required": false, + "schema": { + "type": "string" + } + }, + "listServersSortBy": { + "name": "sort_by", + "in": "query", + "description": "Field to sort by.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "title", + "zone", + "size", + "cores", + "memory", + "popularity" + ] + } + }, + "listServersOrderBy": { + "name": "order_by", + "in": "query", + "description": "Sort direction. Only applied when sort_by is specified.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + } + }, + "listServersLimit": { + "name": "limit", + "in": "query", + "description": "Maximum number of Cloud Servers to return.", + "required": false, + "schema": { + "$ref": "#/components/schemas/serverLimit" + } + }, + "listServersOffset": { + "name": "offset", + "in": "query", + "description": "Number of Cloud Servers to skip.", + "required": false, + "schema": { + "$ref": "#/components/schemas/serverOffset" + } + }, + "getServerUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "modifyServerUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "deleteServerUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "deleteServerStorages": { + "name": "storages", + "in": "query", + "description": "Whether to delete attached storage devices.", + "required": false, + "schema": { + "$ref": "#/components/schemas/serverLegacyBoolean" + } + }, + "deleteServerBackups": { + "name": "backups", + "in": "query", + "description": "How to handle backups when deleting storage devices. The delete value is valid only when storages is set to a truthy value.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "keep", + "keep_latest", + "delete" + ] + } + }, + "cancelServerOperationUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "listServerGPUsUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "getServerNetworkingUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "addServerInterfaceUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "modifyServerInterfaceUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "modifyServerInterfaceIndex": { + "name": "index", + "in": "path", + "description": "Network interface index", + "required": true, + "schema": { + "type": "integer", + "minimum": 1, + "format": "int32" + } + }, + "deleteServerInterfaceUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "deleteServerInterfaceIndex": { + "name": "index", + "in": "path", + "description": "Network interface index", + "required": true, + "schema": { + "type": "integer", + "minimum": 1, + "format": "int32" + } + }, + "addServerInterfaceIpAddressUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "addServerInterfaceIpAddressIndex": { + "name": "index", + "in": "path", + "description": "Network interface index", + "required": true, + "schema": { + "type": "integer", + "minimum": 1, + "format": "int32" + } + }, + "addServerInterfaceIpAddressForce": { + "name": "force", + "in": "query", + "description": "Move the address from another interface when that interface can retain its required minimum number of addresses", + "required": false, + "schema": { + "$ref": "#/components/schemas/serverBooleanYesno" + } + }, + "deleteServerInterfaceIpAddressUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "deleteServerInterfaceIpAddressIndex": { + "name": "index", + "in": "path", + "description": "Network interface index", + "required": true, + "schema": { + "type": "integer", + "minimum": 1, + "format": "int32" + } + }, + "deleteServerInterfaceIpAddressIp": { + "name": "ip", + "in": "path", + "description": "IP address to delete", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverIpAddress" + } + }, + "rebuildServerUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "relocateServerUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "restartServerUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "startServerUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "stopServerUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverListFirewallRulesetRelationshipsRulesetUuid": { + "name": "ruleset_uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverAttachPrivateFirewallRulesetUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverEjectCDROMUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverLoadCDROMUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverDetachPrivateFirewallRulesetUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverListFirewallRulesUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverUpdateFirewallRulesUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverCreateFirewallRuleUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverGetFirewallRuleUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverGetFirewallRulePosition": { + "name": "position", + "in": "path", + "description": "Firewall rule position", + "required": true, + "schema": { + "type": "integer", + "maximum": 1000, + "minimum": 1, + "format": "int32" + } + }, + "serverDeleteFirewallRuleUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverDeleteFirewallRulePosition": { + "name": "position", + "in": "path", + "description": "Firewall rule position", + "required": true, + "schema": { + "type": "integer", + "maximum": 1000, + "minimum": 1, + "format": "int32" + } + }, + "serverListPrivateFirewallRulesetRelationshipsUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverGetRemoteAccessDetailsUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverGetCPUStatsUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverGetCPUStatsByPeriodUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverGetCPUStatsByPeriodPeriod": { + "name": "period", + "in": "path", + "description": "Statistics period.", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverStatsPeriod" + } + }, + "serverGetDiskStatsUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverGetDiskStatsType": { + "name": "type", + "in": "path", + "description": "Measure disk activity as transferred bytes or I/O requests.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "bytes", + "requests" + ] + } + }, + "serverGetDiskStatsByPeriodUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverGetDiskStatsByPeriodType": { + "name": "type", + "in": "path", + "description": "Measure disk activity as transferred bytes or I/O requests.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "bytes", + "requests" + ] + } + }, + "serverGetDiskStatsByPeriodPeriod": { + "name": "period", + "in": "path", + "description": "Statistics period.", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverStatsPeriod" + } + }, + "serverGetNetworkStatsUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverGetNetworkStatsType": { + "name": "type", + "in": "path", + "description": "Measure network activity as transferred bytes or packets.", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverStatsNetworkType" + } + }, + "serverGetNetworkStatsByNetworkUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverGetNetworkStatsByNetworkType": { + "name": "type", + "in": "path", + "description": "Measure network activity as transferred bytes or packets.", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverStatsNetworkType" + } + }, + "serverGetNetworkStatsByNetworkNetwork": { + "name": "network", + "in": "path", + "description": "Network access type to aggregate.", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverNetworkType" + } + }, + "serverGetNetworkStatsByNetworkAndPeriodUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverGetNetworkStatsByNetworkAndPeriodType": { + "name": "type", + "in": "path", + "description": "Measure network activity as transferred bytes or packets.", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverStatsNetworkType" + } + }, + "serverGetNetworkStatsByNetworkAndPeriodNetwork": { + "name": "network", + "in": "path", + "description": "Network access type to aggregate.", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverNetworkType" + } + }, + "serverGetNetworkStatsByNetworkAndPeriodPeriod": { + "name": "period", + "in": "path", + "description": "Statistics period.", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverStatsPeriod" + } + }, + "serverAttachStorageDeviceUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverDetachStorageDeviceUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "serverGetVNCDetailsUuid": { + "name": "uuid", + "in": "path", + "description": "Cloud Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/serverUuid" + } + }, + "getStorageListLabel": { + "name": "label", + "in": "query", + "description": "Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageLabelFilter" + } + }, + "getStorageListSearch": { + "name": "search", + "in": "query", + "description": "Search storage resource titles and UUIDs by partial match.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageSearch" + } + }, + "getStorageListSortBy": { + "name": "sort_by", + "in": "query", + "description": "Field by which to sort the results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageSortBy" + } + }, + "getStorageListOrderBy": { + "name": "order_by", + "in": "query", + "description": "Sort direction. Used only when `sort_by` is specified.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageOrderBy" + } + }, + "getStorageListLimit": { + "name": "limit", + "in": "query", + "description": "Maximum number of storage resources to return.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageLimit" + } + }, + "getStorageListOffset": { + "name": "offset", + "in": "query", + "description": "Number of storage resources to skip before returning results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageOffset" + } + }, + "getStorageListByBackupLabel": { + "name": "label", + "in": "query", + "description": "Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageLabelFilter" + } + }, + "getStorageListByBackupSearch": { + "name": "search", + "in": "query", + "description": "Search storage resource titles and UUIDs by partial match.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageSearch" + } + }, + "getStorageListByBackupSortBy": { + "name": "sort_by", + "in": "query", + "description": "Field by which to sort the results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageSortBy" + } + }, + "getStorageListByBackupOrderBy": { + "name": "order_by", + "in": "query", + "description": "Sort direction. Used only when `sort_by` is specified.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageOrderBy" + } + }, + "getStorageListByBackupLimit": { + "name": "limit", + "in": "query", + "description": "Maximum number of storage resources to return.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageLimit" + } + }, + "getStorageListByBackupOffset": { + "name": "offset", + "in": "query", + "description": "Number of storage resources to skip before returning results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageOffset" + } + }, + "getStorageListByCdromLabel": { + "name": "label", + "in": "query", + "description": "Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageLabelFilter" + } + }, + "getStorageListByCdromSearch": { + "name": "search", + "in": "query", + "description": "Search storage resource titles and UUIDs by partial match.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageSearch" + } + }, + "getStorageListByCdromSortBy": { + "name": "sort_by", + "in": "query", + "description": "Field by which to sort the results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageSortBy" + } + }, + "getStorageListByCdromOrderBy": { + "name": "order_by", + "in": "query", + "description": "Sort direction. Used only when `sort_by` is specified.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageOrderBy" + } + }, + "getStorageListByCdromLimit": { + "name": "limit", + "in": "query", + "description": "Maximum number of storage resources to return.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageLimit" + } + }, + "getStorageListByCdromOffset": { + "name": "offset", + "in": "query", + "description": "Number of storage resources to skip before returning results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageOffset" + } + }, + "getStorageListByNormalLabel": { + "name": "label", + "in": "query", + "description": "Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageLabelFilter" + } + }, + "getStorageListByNormalSearch": { + "name": "search", + "in": "query", + "description": "Search storage resource titles and UUIDs by partial match.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageSearch" + } + }, + "getStorageListByNormalSortBy": { + "name": "sort_by", + "in": "query", + "description": "Field by which to sort the results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageSortBy" + } + }, + "getStorageListByNormalOrderBy": { + "name": "order_by", + "in": "query", + "description": "Sort direction. Used only when `sort_by` is specified.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageOrderBy" + } + }, + "getStorageListByNormalLimit": { + "name": "limit", + "in": "query", + "description": "Maximum number of storage resources to return.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageLimit" + } + }, + "getStorageListByNormalOffset": { + "name": "offset", + "in": "query", + "description": "Number of storage resources to skip before returning results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageOffset" + } + }, + "getStorageListByPrivateAccessLabel": { + "name": "label", + "in": "query", + "description": "Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageLabelFilter" + } + }, + "getStorageListByPrivateAccessSearch": { + "name": "search", + "in": "query", + "description": "Search storage resource titles and UUIDs by partial match.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageSearch" + } + }, + "getStorageListByPrivateAccessSortBy": { + "name": "sort_by", + "in": "query", + "description": "Field by which to sort the results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageSortBy" + } + }, + "getStorageListByPrivateAccessOrderBy": { + "name": "order_by", + "in": "query", + "description": "Sort direction. Used only when `sort_by` is specified.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageOrderBy" + } + }, + "getStorageListByPrivateAccessLimit": { + "name": "limit", + "in": "query", + "description": "Maximum number of storage resources to return.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageLimit" + } + }, + "getStorageListByPrivateAccessOffset": { + "name": "offset", + "in": "query", + "description": "Number of storage resources to skip before returning results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageOffset" + } + }, + "getStorageListByPublicAccessLabel": { + "name": "label", + "in": "query", + "description": "Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageLabelFilter" + } + }, + "getStorageListByPublicAccessSearch": { + "name": "search", + "in": "query", + "description": "Search storage resource titles and UUIDs by partial match.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageSearch" + } + }, + "getStorageListByPublicAccessSortBy": { + "name": "sort_by", + "in": "query", + "description": "Field by which to sort the results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageSortBy" + } + }, + "getStorageListByPublicAccessOrderBy": { + "name": "order_by", + "in": "query", + "description": "Sort direction. Used only when `sort_by` is specified.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageOrderBy" + } + }, + "getStorageListByPublicAccessLimit": { + "name": "limit", + "in": "query", + "description": "Maximum number of storage resources to return.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageLimit" + } + }, + "getStorageListByPublicAccessOffset": { + "name": "offset", + "in": "query", + "description": "Number of storage resources to skip before returning results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageOffset" + } + }, + "getStorageListByTemplateLabel": { + "name": "label", + "in": "query", + "description": "Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageLabelFilter" + } + }, + "getStorageListByTemplateSearch": { + "name": "search", + "in": "query", + "description": "Search storage resource titles and UUIDs by partial match.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageSearch" + } + }, + "getStorageListByTemplateSortBy": { + "name": "sort_by", + "in": "query", + "description": "Field by which to sort the results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageSortBy" + } + }, + "getStorageListByTemplateOrderBy": { + "name": "order_by", + "in": "query", + "description": "Sort direction. Used only when `sort_by` is specified.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageOrderBy" + } + }, + "getStorageListByTemplateLimit": { + "name": "limit", + "in": "query", + "description": "Maximum number of storage resources to return.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageLimit" + } + }, + "getStorageListByTemplateOffset": { + "name": "offset", + "in": "query", + "description": "Number of storage resources to skip before returning results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageOffset" + } + }, + "getStorageListByTypeAndAccessType": { + "name": "type", + "in": "path", + "description": "Storage resource type to return.", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageType" + } + }, + "getStorageListByTypeAndAccessAccess": { + "name": "access", + "in": "path", + "description": "Storage resource access type to return.", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageAccessFilter" + } + }, + "getStorageListByTypeAndAccessLabel": { + "name": "label", + "in": "query", + "description": "Filter by label key or key-value pair. Repeat the parameter to require multiple labels; label keys are matched case-insensitively.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageLabelFilter" + } + }, + "getStorageListByTypeAndAccessSearch": { + "name": "search", + "in": "query", + "description": "Search storage resource titles and UUIDs by partial match.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageSearch" + } + }, + "getStorageListByTypeAndAccessSortBy": { + "name": "sort_by", + "in": "query", + "description": "Field by which to sort the results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageSortBy" + } + }, + "getStorageListByTypeAndAccessOrderBy": { + "name": "order_by", + "in": "query", + "description": "Sort direction. Used only when `sort_by` is specified.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageOrderBy" + } + }, + "getStorageListByTypeAndAccessLimit": { + "name": "limit", + "in": "query", + "description": "Maximum number of storage resources to return.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageLimit" + } + }, + "getStorageListByTypeAndAccessOffset": { + "name": "offset", + "in": "query", + "description": "Number of storage resources to skip before returning results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/storageOffset" + } + }, + "getStorageInfoUuid": { + "name": "uuid", + "in": "path", + "description": "Storage resource UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageUuid" + } + }, + "modifyStorageUuid": { + "name": "uuid", + "in": "path", + "description": "Block storage UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageUuid" + } + }, + "deleteStorageUuid": { + "name": "uuid", + "in": "path", + "description": "Storage resource UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageUuid" + } + }, + "deleteStorageBackups": { + "name": "backups", + "in": "query", + "description": "Policy for handling backups when deleting a storage resource. Defaults to `keep`. Allowed values: keep, delete, keep_latest", + "required": false, + "schema": { + "type": "string", + "enum": [ + "keep", + "delete", + "keep_latest" + ] + } + }, + "attachStorageToServerUuid": { + "name": "uuid", + "in": "path", + "description": "Storage resource UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageUuid" + } + }, + "cancelStorageOperationUuid": { + "name": "uuid", + "in": "path", + "description": "Block storage UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageUuid" + } + }, + "cloneStorageUuid": { + "name": "uuid", + "in": "path", + "description": "Storage resource UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageUuid" + } + }, + "detachStorageFromServerUuid": { + "name": "uuid", + "in": "path", + "description": "Storage resource UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageUuid" + } + }, + "addStorageToFavoritesUuid": { + "name": "uuid", + "in": "path", + "description": "Storage resource UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageUuid" + } + }, + "removeStorageFromFavoritesUuid": { + "name": "uuid", + "in": "path", + "description": "Storage resource UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageUuid" + } + }, + "getStorageImportDetailsUuid": { + "name": "uuid", + "in": "path", + "description": "Storage resource UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageUuid" + } + }, + "createStorageImportUuid": { + "name": "uuid", + "in": "path", + "description": "Storage resource UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageUuid" + } + }, + "cancelStorageImportUuid": { + "name": "uuid", + "in": "path", + "description": "Storage resource UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageUuid" + } + }, + "resizeStorageUuid": { + "name": "uuid", + "in": "path", + "description": "Block storage UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageUuid" + } + }, + "restoreStorageFromBackupUuid": { + "name": "uuid", + "in": "path", + "description": "Backup UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageUuid" + } + }, + "createTemplateFromStorageUuid": { + "name": "uuid", + "in": "path", + "description": "Block storage UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageUuid" + } + }, + "storageCreateOnDemandBackupUuid": { + "name": "uuid", + "in": "path", + "description": "Block storage UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/storageUuid" + } + }, + "getTagName": { + "name": "name", + "in": "path", + "description": "Tag name", + "required": true, + "schema": { + "$ref": "#/components/schemas/tagName" + } + }, + "modifyTagName": { + "name": "name", + "in": "path", + "description": "Tag name", + "required": true, + "schema": { + "$ref": "#/components/schemas/tagName" + } + }, + "deleteTagName": { + "name": "name", + "in": "path", + "description": "Tag name", + "required": true, + "schema": { + "$ref": "#/components/schemas/tagName" + } + }, + "accountTokensListTokensLimit": { + "name": "limit", + "in": "query", + "description": "How many tokens to return at per page", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "format": "int32", + "default": 20 + } + }, + "accountTokensListTokensOffset": { + "name": "offset", + "in": "query", + "description": "Offset to start listing the tokens from", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "format": "int32", + "default": 0 + } + }, + "accountTokensListTokensGui": { + "name": "gui", + "in": "query", + "description": "Filter tokens based on GUI flag (true or false). Default is no value, i.e. no filtering and all tokens are returned.", + "required": false, + "schema": { + "type": "boolean", + "example": true + } + }, + "accountTokensListTokensSort": { + "name": "sort", + "in": "query", + "description": "Comma-separated list of fields to sort by. Prefix with '+' for ascending or '-' for descending order. Supported fields: created_at, expires_at, last_used_at, name. Example: sort=+name,-created_at. If no prefix is given, descending is assumed. Follows OpenAPI collectionFormat 'csv'.\n", + "required": false, + "schema": { + "type": "string", + "example": "+name,-created_at" + } + }, + "accountTokensGetTokenTokenUuid": { + "name": "token-uuid", + "in": "path", + "description": "The uuid of the token to get", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + "accountTokensRevokeTokenTokenUuid": { + "name": "token-uuid", + "in": "path", + "description": "The uuid of the token to delete", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + "objectStorage2ListObjectStoragesLimit": { + "name": "limit", + "in": "query", + "description": "Number of entries to receive at most.", + "required": false, + "schema": { + "$ref": "#/components/schemas/objectStorage2QueryParamLimit" + } + }, + "objectStorage2ListObjectStoragesOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/objectStorage2QueryParamOffset" + } + }, + "objectStorage2ListObjectStoragesSort": { + "name": "sort", + "in": "query", + "description": "Order of returned results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/objectStorage2QueryParamSort" + } + }, + "objectStorage2GetObjectStorageServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ReplaceObjectStorageServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageForce": { + "name": "force", + "in": "query", + "description": "If the parameter is provided, the deletion process starts even if the service is not empty.", + "required": false, + "schema": { + "$ref": "#/components/schemas/objectStorage2QueryParamForce" + } + }, + "objectStorage2ModifyObjectStorageServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ListObjectStorageNetworksServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2CreateObjectStorageNetworkServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageNetworkServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageNetworkNetworkName": { + "name": "network-name", + "in": "path", + "description": "The name of the network.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageNetworkServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageNetworkNetworkName": { + "name": "network-name", + "in": "path", + "description": "The name of the network.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2ListObjectStorageCustomDomainsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2AttachObjectStorageCustomDomainServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageCustomDomainServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageCustomDomainCustomDomainName": { + "name": "custom-domain-name", + "in": "path", + "description": "The domain name.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2CustomDomainName" + } + }, + "objectStorage2DeleteObjectStorageCustomDomainServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageCustomDomainCustomDomainName": { + "name": "custom-domain-name", + "in": "path", + "description": "The domain name.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2CustomDomainName" + } + }, + "objectStorage2ModifyObjectStorageCustomDomainServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ModifyObjectStorageCustomDomainCustomDomainName": { + "name": "custom-domain-name", + "in": "path", + "description": "The domain name.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2CustomDomainName" + } + }, + "objectStorage2GetObjectStorageRegionRegionName": { + "name": "region-name", + "in": "path", + "description": "The name of the region.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2GetObjectStorageMetricsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ListObjectStorageBucketMetricsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ListObjectStorageBucketMetricsLimit": { + "name": "limit", + "in": "query", + "description": "Number of entries to receive at most.", + "required": false, + "schema": { + "$ref": "#/components/schemas/objectStorage2QueryParamLimit" + } + }, + "objectStorage2ListObjectStorageBucketMetricsOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/objectStorage2QueryParamOffset" + } + }, + "objectStorage2CreateObjectStorageBucketServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageBucketServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageBucketBucketName": { + "name": "bucket-name", + "in": "path", + "description": "The name of the bucket.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2ListObjectStorageMetricsSeriesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ListObjectStorageMetricsSeriesFrom": { + "name": "from", + "in": "query", + "description": "Beginning of the time range for which to return metrics.", + "required": false, + "schema": { + "$ref": "#/components/schemas/objectStorage2QueryParamTimestamp" + } + }, + "objectStorage2ListObjectStorageMetricsSeriesTo": { + "name": "to", + "in": "query", + "description": "End of the time range for which to return metrics.", + "required": false, + "schema": { + "$ref": "#/components/schemas/objectStorage2QueryParamTimestamp" + } + }, + "objectStorage2ListObjectStorageMetricsSeriesInterval": { + "name": "interval", + "in": "query", + "description": "Metrics aggregation interval.", + "required": false, + "schema": { + "$ref": "#/components/schemas/objectStorage2QueryParamInterval" + } + }, + "objectStorage2ListObjectStorageMetricsSeriesSort": { + "name": "sort", + "in": "query", + "description": "Order of returned results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/objectStorage2QueryParamSort" + } + }, + "objectStorage2ListObjectStorageMetricsSeriesLimit": { + "name": "limit", + "in": "query", + "description": "Number of entries to receive at most.", + "required": false, + "schema": { + "$ref": "#/components/schemas/objectStorage2QueryParamLimit" + } + }, + "objectStorage2ListObjectStorageMetricsSeriesOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/objectStorage2QueryParamOffset" + } + }, + "objectStorage2ListObjectStorageLabelsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2CreateObjectStorageLabelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageLabelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "The key of the label.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2LabelKey" + } + }, + "objectStorage2DeleteObjectStorageLabelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "The key of the label.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2LabelKey" + } + }, + "objectStorage2ModifyObjectStorageLabelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ModifyObjectStorageLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "The key of the label.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2LabelKey" + } + }, + "objectStorage2ListObjectStorageStaticWebsitesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2CreateObjectStorageStaticWebsiteServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageStaticWebsiteServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageStaticWebsiteCustomDomainName": { + "name": "custom-domain-name", + "in": "path", + "description": "The domain name.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2CustomDomainName" + } + }, + "objectStorage2DeleteObjectStorageStaticWebsiteServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageStaticWebsiteCustomDomainName": { + "name": "custom-domain-name", + "in": "path", + "description": "The domain name.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2CustomDomainName" + } + }, + "objectStorage2ModifyObjectStorageStaticWebsiteServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ModifyObjectStorageStaticWebsiteCustomDomainName": { + "name": "custom-domain-name", + "in": "path", + "description": "The domain name.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2CustomDomainName" + } + }, + "objectStorage2ListObjectStorageDomainsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ListObjectStorageUsersServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2CreateObjectStorageUserServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageUserServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageUserUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageUserServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageUserUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2ListObjectStorageAccessKeysServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ListObjectStorageAccessKeysUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2CreateObjectStorageAccessKeyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2CreateObjectStorageAccessKeyUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2GetObjectStorageAccessKeyDetailsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageAccessKeyDetailsUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2GetObjectStorageAccessKeyDetailsAccessKeyId": { + "name": "access-key-id", + "in": "path", + "description": "The ID of the access key.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2AccessKeyID" + } + }, + "objectStorage2DeleteObjectStorageAccessKeyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageAccessKeyUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageAccessKeyAccessKeyId": { + "name": "access-key-id", + "in": "path", + "description": "The ID of the access key.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2AccessKeyID" + } + }, + "objectStorage2ModifyObjectStorageAccessKeyDetailsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ModifyObjectStorageAccessKeyDetailsUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2ModifyObjectStorageAccessKeyDetailsAccessKeyId": { + "name": "access-key-id", + "in": "path", + "description": "The ID of the access key.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2AccessKeyID" + } + }, + "objectStorage2ListObjectStorageAttachedUserPoliciesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ListObjectStorageAttachedUserPoliciesUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2AttachObjectStorageUserPolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2AttachObjectStorageUserPolicyUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DetachObjectStorageUserPolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DetachObjectStorageUserPolicyUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DetachObjectStorageUserPolicyNestedName": { + "name": "nested-name", + "in": "path", + "description": "The name of the policy to detach.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2GetObjectStorageUserInlinePolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageUserInlinePolicyUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2GetObjectStorageUserInlinePolicyUserPolicyName": { + "name": "user-policy-name", + "in": "path", + "description": "The name of the inline policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageUserInlinePolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageUserInlinePolicyUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageUserInlinePolicyUserPolicyName": { + "name": "user-policy-name", + "in": "path", + "description": "The name of the inline policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2ListObjectStorageUserInlinePoliciesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ListObjectStorageUserInlinePoliciesUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2CreateObjectStorageUserInlinePolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2CreateObjectStorageUserInlinePolicyUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2GetObjectStorageUserTagsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageUserTagsUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2ReplaceObjectStorageUserTagsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ReplaceObjectStorageUserTagsUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageUserTagServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageUserTagUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageUserTagUserTagKey": { + "name": "user-tag-key", + "in": "path", + "description": "The key of the user tag.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2TagKey" + } + }, + "objectStorage2CreateObjectStorageUserPermissionsBoundaryServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2CreateObjectStorageUserPermissionsBoundaryUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageUserPermissionsBoundaryServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageUserPermissionsBoundaryUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2ListObjectStoragePolicyVersionsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ListObjectStoragePolicyVersionsPolicyName": { + "name": "policy-name", + "in": "path", + "description": "The name of the policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2CreateObjectStoragePolicyVersionServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2CreateObjectStoragePolicyVersionPolicyName": { + "name": "policy-name", + "in": "path", + "description": "The name of the policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2GetObjectStoragePolicyVersionServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStoragePolicyVersionPolicyName": { + "name": "policy-name", + "in": "path", + "description": "The name of the policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2GetObjectStoragePolicyVersionPolicyVersion": { + "name": "policy-version", + "in": "path", + "description": "The version identifier of the policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyVersionID" + } + }, + "objectStorage2DeleteObjectStoragePolicyVersionServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStoragePolicyVersionPolicyName": { + "name": "policy-name", + "in": "path", + "description": "The name of the policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStoragePolicyVersionPolicyVersion": { + "name": "policy-version", + "in": "path", + "description": "The version identifier of the policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyVersionID" + } + }, + "objectStorage2GetObjectStoragePolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStoragePolicyPolicyName": { + "name": "policy-name", + "in": "path", + "description": "The name of the policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStoragePolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStoragePolicyPolicyName": { + "name": "policy-name", + "in": "path", + "description": "The name of the policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2SetObjectStorageDefaultPolicyVersionServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2SetObjectStorageDefaultPolicyVersionPolicyName": { + "name": "policy-name", + "in": "path", + "description": "The name of the policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2ListObjectStoragePoliciesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2CreateObjectStoragePolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ListObjectStorageIAMGroupPoliciesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ListObjectStorageIAMGroupPoliciesGroupName": { + "name": "group-name", + "in": "path", + "description": "The name of the group.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2AttachObjectStorageIAMGroupPolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2AttachObjectStorageIAMGroupPolicyGroupName": { + "name": "group-name", + "in": "path", + "description": "The name of the group.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DetachObjectStorageIAMGroupPolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DetachObjectStorageIAMGroupPolicyGroupName": { + "name": "group-name", + "in": "path", + "description": "The name of the group.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DetachObjectStorageIAMGroupPolicyPolicyName": { + "name": "policy-name", + "in": "path", + "description": "The name of the policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2ListObjectStorageGroupsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2CreateObjectStorageGroupServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageGroupServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageGroupGroupName": { + "name": "group-name", + "in": "path", + "description": "The name of the group.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageGroupServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageGroupGroupName": { + "name": "group-name", + "in": "path", + "description": "The name of the group.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2AttachObjectStorageUserToGroupServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2AttachObjectStorageUserToGroupGroupName": { + "name": "group-name", + "in": "path", + "description": "The name of the group.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2AttachObjectStorageUserToGroupUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2RemoveObjectStorageUserFromGroupServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2RemoveObjectStorageUserFromGroupGroupName": { + "name": "group-name", + "in": "path", + "description": "The name of the group.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2RemoveObjectStorageUserFromGroupUsername": { + "name": "username", + "in": "path", + "description": "The name of the user.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2ListObjectStorageGroupInlinePoliciesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ListObjectStorageGroupInlinePoliciesGroupName": { + "name": "group-name", + "in": "path", + "description": "The name of the group.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2CreateObjectStorageGroupInlinePolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2CreateObjectStorageGroupInlinePolicyGroupName": { + "name": "group-name", + "in": "path", + "description": "The name of the group.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2GetObjectStorageGroupInlinePolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageGroupInlinePolicyGroupName": { + "name": "group-name", + "in": "path", + "description": "The name of the group.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2GetObjectStorageGroupInlinePolicyGroupPolicyName": { + "name": "group-policy-name", + "in": "path", + "description": "The name of the inline policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageGroupInlinePolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageGroupInlinePolicyGroupName": { + "name": "group-name", + "in": "path", + "description": "The name of the group.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageGroupInlinePolicyGroupPolicyName": { + "name": "group-policy-name", + "in": "path", + "description": "The name of the inline policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2ListObjectStorageRolesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2CreateObjectStorageRoleServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageRoleServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageRoleRoleName": { + "name": "role-name", + "in": "path", + "description": "The name of the role.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageRoleServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageRoleRoleName": { + "name": "role-name", + "in": "path", + "description": "The name of the role.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2UpdateObjectStorageRoleServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2UpdateObjectStorageRoleRoleName": { + "name": "role-name", + "in": "path", + "description": "The name of the role.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2ListObjectStorageRoleInlinePoliciesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ListObjectStorageRoleInlinePoliciesRoleName": { + "name": "role-name", + "in": "path", + "description": "The name of the role.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2CreateObjectStorageRoleInlinePolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2CreateObjectStorageRoleInlinePolicyRoleName": { + "name": "role-name", + "in": "path", + "description": "The name of the role.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2GetObjectStorageRoleInlinePolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageRoleInlinePolicyRoleName": { + "name": "role-name", + "in": "path", + "description": "The name of the role.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2GetObjectStorageRoleInlinePolicyRolePolicyName": { + "name": "role-policy-name", + "in": "path", + "description": "The name of the inline policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageRoleInlinePolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageRoleInlinePolicyRoleName": { + "name": "role-name", + "in": "path", + "description": "The name of the role.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageRoleInlinePolicyRolePolicyName": { + "name": "role-policy-name", + "in": "path", + "description": "The name of the inline policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2CreateObjectStorageRolePermissionsBoundaryServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2CreateObjectStorageRolePermissionsBoundaryRoleName": { + "name": "role-name", + "in": "path", + "description": "The name of the role.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageRolePermissionsBoundaryServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageRolePermissionsBoundaryRoleName": { + "name": "role-name", + "in": "path", + "description": "The name of the role.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2AssumeObjectStorageRolePolicyServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2AssumeObjectStorageRolePolicyRoleName": { + "name": "role-name", + "in": "path", + "description": "The name of the role.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2ListObjectStorageAttachedRolePoliciesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ListObjectStorageAttachedRolePoliciesRoleName": { + "name": "role-name", + "in": "path", + "description": "The name of the role.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2AttachObjectStoragePolicyToRoleServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2AttachObjectStoragePolicyToRoleRoleName": { + "name": "role-name", + "in": "path", + "description": "The name of the role.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DetachObjectStoragePolicyFromRoleServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DetachObjectStoragePolicyFromRoleRoleName": { + "name": "role-name", + "in": "path", + "description": "The name of the role.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DetachObjectStoragePolicyFromRoleRolePolicyName": { + "name": "role-policy-name", + "in": "path", + "description": "The name of the inline policy.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2GetObjectStorageRoleTagsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2GetObjectStorageRoleTagsRoleName": { + "name": "role-name", + "in": "path", + "description": "The name of the role.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2ReplaceObjectStorageRoleTagsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2ReplaceObjectStorageRoleTagsRoleName": { + "name": "role-name", + "in": "path", + "description": "The name of the role.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageRoleTagServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceUUID" + } + }, + "objectStorage2DeleteObjectStorageRoleTagRoleName": { + "name": "role-name", + "in": "path", + "description": "The name of the role.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2Name" + } + }, + "objectStorage2DeleteObjectStorageRoleTagRoleTagKey": { + "name": "role-tag-key", + "in": "path", + "description": "The key of the role tag.", + "required": true, + "schema": { + "$ref": "#/components/schemas/objectStorage2TagKey" + } + }, + "listFileStoragesLimit": { + "name": "limit", + "in": "query", + "description": "Number of entries to receive at most.", + "required": false, + "schema": { + "$ref": "#/components/schemas/fileStorageQueryParameterLimit" + } + }, + "listFileStoragesOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/fileStorageQueryParamOffset" + } + }, + "listFileStoragesSort": { + "name": "sort", + "in": "query", + "description": "Order of returned results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/fileStorageQueryParamSort" + } + }, + "getFileStorageServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "replaceFileStorageServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "deleteFileStorageServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "modifyFileStorageServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "listFileStorageNetworksServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "createFileStorageNetworkServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "getFileStorageNetworkServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "getFileStorageNetworkNetworkName": { + "name": "network-name", + "in": "path", + "description": "The name of the network.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageName" + } + }, + "deleteFileStorageNetworkServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "deleteFileStorageNetworkNetworkName": { + "name": "network-name", + "in": "path", + "description": "The name of the network.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageName" + } + }, + "modifyFileStorageNetworkServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "modifyFileStorageNetworkNetworkName": { + "name": "network-name", + "in": "path", + "description": "The name of the network.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageName" + } + }, + "listFileStorageSharesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "createFileStorageShareServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "getFileStorageShareServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "getFileStorageShareShareName": { + "name": "share-name", + "in": "path", + "description": "The name of the share.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageName" + } + }, + "deleteFileStorageShareServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "deleteFileStorageShareShareName": { + "name": "share-name", + "in": "path", + "description": "The name of the share.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageName" + } + }, + "modifyFileStorageShareServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "modifyFileStorageShareShareName": { + "name": "share-name", + "in": "path", + "description": "The name of the share.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageName" + } + }, + "listFileStorageAclsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "listFileStorageAclsShareName": { + "name": "share-name", + "in": "path", + "description": "The name of the share.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageName" + } + }, + "createFileStorageAclServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "createFileStorageAclShareName": { + "name": "share-name", + "in": "path", + "description": "The name of the share.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageName" + } + }, + "getFileStorageAclServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "getFileStorageAclShareName": { + "name": "share-name", + "in": "path", + "description": "The name of the share.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageName" + } + }, + "getFileStorageAclAclName": { + "name": "acl-name", + "in": "path", + "description": "The name of the ACL.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageName" + } + }, + "deleteFileStorageAclServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "deleteFileStorageAclShareName": { + "name": "share-name", + "in": "path", + "description": "The name of the share.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageName" + } + }, + "deleteFileStorageAclAclName": { + "name": "acl-name", + "in": "path", + "description": "The name of the ACL.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageName" + } + }, + "modifyFileStorageAclServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "modifyFileStorageAclShareName": { + "name": "share-name", + "in": "path", + "description": "The name of the share.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageName" + } + }, + "modifyFileStorageAclAclName": { + "name": "acl-name", + "in": "path", + "description": "The name of the ACL.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageName" + } + }, + "listFileStorageLabelsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "createFileStorageLabelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "getFileStorageLabelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "getFileStorageLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "The key of the label.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageLabelKey" + } + }, + "deleteFileStorageLabelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "deleteFileStorageLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "The key of the label.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageLabelKey" + } + }, + "modifyFileStorageLabelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "modifyFileStorageLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "The key of the label.", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageLabelKey" + } + }, + "getFileStorageCurrentStateServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/fileStorageEntityUUID" + } + }, + "getDatabaseTypeServiceTypeName": { + "name": "service-type-name", + "in": "path", + "description": "Service type parameter", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseServiceType" + } + }, + "listDatabasesLimit": { + "name": "limit", + "in": "query", + "description": "Number of entries to receive at most.", + "required": false, + "schema": { + "$ref": "#/components/schemas/databaseQueryParamLimit" + } + }, + "listDatabasesOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/databaseQueryParamOffset" + } + }, + "listDatabasesSort": { + "name": "sort", + "in": "query", + "description": "Sort results by the specified field. Prefix with '-' for descending order. Supported fields: `created_at`, `name` (service hostname), `operational_state` (service status), `zone` (location).", + "required": false, + "schema": { + "$ref": "#/components/schemas/databaseQueryParamSort" + } + }, + "getDatabaseUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "deleteDatabaseUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "modifyDatabaseUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "modifyDatabaseTypeUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "cloneDatabaseUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "listDatabaseNetworksUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "createDatabaseNetworkUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseNetworkUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseNetworkNetworkName": { + "name": "network-name", + "in": "path", + "description": "Network UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "deleteDatabaseNetworkUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "deleteDatabaseNetworkNetworkName": { + "name": "network-name", + "in": "path", + "description": "Network UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "upgradeDatabaseUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "listDatabaseLabelsUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "createDatabaseLabelUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseLabelUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "Label ID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseLabelKey" + } + }, + "deleteDatabaseLabelUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "deleteDatabaseLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "Label ID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseLabelKey" + } + }, + "modifyDatabaseLabelUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "modifyDatabaseLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "Label ID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseLabelKey" + } + }, + "getDatabaseAvailableExtensionsUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseAccessControlUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "modifyDatabaseAccessControlUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseSecurityUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "modifyDatabaseSecurityAdminUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "enableDatabaseSecurityAdminUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseIntegrationEndpointIntegrationUuid": { + "name": "integration-uuid", + "in": "path", + "description": "Integration UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseIntegrationUUID" + } + }, + "deleteDatabaseIntegrationEndpointIntegrationUuid": { + "name": "integration-uuid", + "in": "path", + "description": "Integration UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseIntegrationUUID" + } + }, + "modifyDatabaseIntegrationEndpointIntegrationUuid": { + "name": "integration-uuid", + "in": "path", + "description": "Integration UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseIntegrationUUID" + } + }, + "getDatabaseStatusUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseVersionsUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "startDatabaseManualMaintenanceUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "enableDatabaseTemporaryWritesUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseMigrationStatusUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseAlertsUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseMetricsUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseQueryStatisticsUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseQueryStatisticsLimit": { + "name": "limit", + "in": "query", + "description": "Number of entries to receive at most.", + "required": false, + "schema": { + "$ref": "#/components/schemas/databaseQueryParamLimit" + } + }, + "getDatabaseQueryStatisticsOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/databaseQueryParamOffset" + } + }, + "getDatabaseQueryStatisticsOrder": { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "$ref": "#/components/schemas/databaseQueryParamOrder" + } + }, + "getDatabaseLogsUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseLogsLimit": { + "name": "limit", + "in": "query", + "description": "Number of entries to receive at most.", + "required": false, + "schema": { + "$ref": "#/components/schemas/databaseQueryParamLimit" + } + }, + "getDatabaseLogsOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/databaseQueryParamOffset" + } + }, + "getDatabaseLogsOrder": { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "$ref": "#/components/schemas/databaseQueryParamOrder" + } + }, + "listDatabaseConnectionPoolsUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "listDatabaseConnectionPoolsSort": { + "name": "sort", + "in": "query", + "description": "Order of returned results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/databaseQueryParamOrder" + } + }, + "createDatabaseConnectionPoolUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseConnectionPoolUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseConnectionPoolPoolName": { + "name": "pool-name", + "in": "path", + "description": "Connection Pool Name", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseTitle" + } + }, + "deleteDatabaseConnectionPoolUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "deleteDatabaseConnectionPoolPoolName": { + "name": "pool-name", + "in": "path", + "description": "Connection Pool Name", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseTitle" + } + }, + "modifyDatabaseConnectionPoolUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "modifyDatabaseConnectionPoolPoolName": { + "name": "pool-name", + "in": "path", + "description": "Connection Pool Name", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseTitle" + } + }, + "listDatabaseIndicesUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "deleteDatabaseIndexUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "deleteDatabaseIndexIndexName": { + "name": "index-name", + "in": "path", + "description": "OpenSearch Index Name", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseTitle" + } + }, + "listDatabaseIntegrationsUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "createDatabaseIntegrationUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseIntegrationUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseIntegrationIntegrationUuid": { + "name": "integration-uuid", + "in": "path", + "description": "Integration UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseIntegrationUUID" + } + }, + "deleteDatabaseIntegrationUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "deleteDatabaseIntegrationIntegrationUuid": { + "name": "integration-uuid", + "in": "path", + "description": "Integration UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseIntegrationUUID" + } + }, + "modifyDatabaseIntegrationUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "modifyDatabaseIntegrationIntegrationUuid": { + "name": "integration-uuid", + "in": "path", + "description": "Integration UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseIntegrationUUID" + } + }, + "listDatabaseLogicalDatabasesUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "createDatabaseLogicalDatabaseUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "deleteDatabaseLogicalDatabaseUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "deleteDatabaseLogicalDatabaseDatabaseName": { + "name": "database-name", + "in": "path", + "description": "Database name", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseTitle" + } + }, + "getDatabasePeeringsStatusUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseSessionsUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseSessionsLimit": { + "name": "limit", + "in": "query", + "description": "Number of entries to receive at most.", + "required": false, + "schema": { + "$ref": "#/components/schemas/databaseQueryParamLimit" + } + }, + "getDatabaseSessionsOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/databaseQueryParamOffset" + } + }, + "getDatabaseSessionsOrder": { + "name": "order", + "in": "query", + "description": "Sort order", + "required": false, + "schema": { + "$ref": "#/components/schemas/databaseQueryParamOrder" + } + }, + "terminateDatabaseSessionUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "terminateDatabaseSessionPid": { + "name": "pid", + "in": "path", + "description": "Session PID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseId" + } + }, + "createDatabaseTaskUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseTaskUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseTaskTaskId": { + "name": "task-id", + "in": "path", + "description": "Task ID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseId" + } + }, + "listDatabaseUsersUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "createDatabaseUserUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseUserUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "getDatabaseUserUsername": { + "name": "username", + "in": "path", + "description": "Username identifier", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseTitle" + } + }, + "deleteDatabaseUserUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "deleteDatabaseUserUsername": { + "name": "username", + "in": "path", + "description": "Username identifier", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseTitle" + } + }, + "modifyDatabaseUserUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "modifyDatabaseUserUsername": { + "name": "username", + "in": "path", + "description": "Username identifier", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseTitle" + } + }, + "modifyDatabaseUserAccessControlUuid": { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseUuid" + } + }, + "modifyDatabaseUserAccessControlUsername": { + "name": "username", + "in": "path", + "description": "Username identifier", + "required": true, + "schema": { + "$ref": "#/components/schemas/databaseTitle" + } + }, + "listGatewayPlansLimit": { + "name": "limit", + "in": "query", + "description": "Number of entries to receive at most.", + "required": false, + "schema": { + "$ref": "#/components/schemas/gatewayQueryParamLimit" + } + }, + "listGatewayPlansOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/gatewayQueryParamOffset" + } + }, + "getGatewayPlanPlanName": { + "name": "plan-name", + "in": "path", + "description": "Plan identifier", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayName" + } + }, + "listGatewayServicesLimit": { + "name": "limit", + "in": "query", + "description": "Number of entries to receive at most.", + "required": false, + "schema": { + "$ref": "#/components/schemas/gatewayQueryParamLimit" + } + }, + "listGatewayServicesOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/gatewayQueryParamOffset" + } + }, + "listGatewayServicesSort": { + "name": "sort", + "in": "query", + "description": "Sort resources by field. Prefix with '-' for descending order.", + "required": false, + "schema": { + "$ref": "#/components/schemas/gatewayQueryParamSortServices" + } + }, + "getGatewayServiceServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "replaceGatewayServiceServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "deleteGatewayServiceServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "modifyGatewayServiceServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "flushGatewayNatServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "listGatewayConnectionsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "createGatewayConnectionServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "getGatewayConnectionServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "getGatewayConnectionConnectionUuid": { + "name": "connection-uuid", + "in": "path", + "description": "Connection UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "deleteGatewayConnectionServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "deleteGatewayConnectionConnectionUuid": { + "name": "connection-uuid", + "in": "path", + "description": "Connection UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "modifyGatewayConnectionServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "modifyGatewayConnectionConnectionUuid": { + "name": "connection-uuid", + "in": "path", + "description": "Connection UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "listGatewayTunnelsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "listGatewayTunnelsConnectionUuid": { + "name": "connection-uuid", + "in": "path", + "description": "Connection UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "createGatewayTunnelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "createGatewayTunnelConnectionUuid": { + "name": "connection-uuid", + "in": "path", + "description": "Connection UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "getGatewayTunnelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "getGatewayTunnelConnectionUuid": { + "name": "connection-uuid", + "in": "path", + "description": "Connection UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "getGatewayTunnelTunnelUuid": { + "name": "tunnel-uuid", + "in": "path", + "description": "Tunnel UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "deleteGatewayTunnelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "deleteGatewayTunnelConnectionUuid": { + "name": "connection-uuid", + "in": "path", + "description": "Connection UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "deleteGatewayTunnelTunnelUuid": { + "name": "tunnel-uuid", + "in": "path", + "description": "Tunnel UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "modifyGatewayTunnelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "modifyGatewayTunnelConnectionUuid": { + "name": "connection-uuid", + "in": "path", + "description": "Connection UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "modifyGatewayTunnelTunnelUuid": { + "name": "tunnel-uuid", + "in": "path", + "description": "Tunnel UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "listGatewayServiceLabelsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "createGatewayServiceLabelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "getGatewayServiceLabelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "getGatewayServiceLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "Label identifier", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayLabelKey" + } + }, + "deleteGatewayServiceLabelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "deleteGatewayServiceLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "Label identifier", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayLabelKey" + } + }, + "modifyGatewayServiceLabelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "modifyGatewayServiceLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "Label identifier", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayLabelKey" + } + }, + "listGatewayAddressesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "getGatewayAddressServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "getGatewayAddressAddressName": { + "name": "address-name", + "in": "path", + "description": "Address identifier", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayName" + } + }, + "modifyGatewayAddressServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "modifyGatewayAddressAddressName": { + "name": "address-name", + "in": "path", + "description": "Address identifier", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayName" + } + }, + "releaseGatewayFloatingIpServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "releaseGatewayFloatingIpAddressName": { + "name": "address-name", + "in": "path", + "description": "Address identifier", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayName" + } + }, + "getGatewayMetricsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "createGatewayServiceLogSessionServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/gatewayUuid" + } + }, + "listLoadBalancersLimit": { + "name": "limit", + "in": "query", + "description": "Number of entries to receive at most.", + "required": false, + "schema": { + "$ref": "#/components/schemas/loadBalancerLimitParameter" + } + }, + "listLoadBalancersOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/loadBalancerOffsetParameter" + } + }, + "listLoadBalancersSort": { + "name": "sort", + "in": "query", + "description": "Sort resources by field. Prefix with '-' for descending order.", + "required": false, + "schema": { + "$ref": "#/components/schemas/loadBalancerSortServicesParameter" + } + }, + "listLoadBalancersLabel": { + "name": "label", + "in": "query", + "description": "Filter resources by label. Can be provided multiple times for multiple labels. Format: 'key=value' for exact match or 'key' for existence check.", + "required": false, + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelFilterParameter" + } + }, + "getLoadBalancerServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "replaceLoadBalancerServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "deleteLoadBalancerServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "modifyLoadBalancerServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "listLoadBalancerFrontendsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "createLoadBalancerFrontendServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerFrontendServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerFrontendFrontendName": { + "name": "frontend-name", + "in": "path", + "description": "The unique identifier for the frontend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendParameter" + } + }, + "deleteLoadBalancerFrontendServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "deleteLoadBalancerFrontendFrontendName": { + "name": "frontend-name", + "in": "path", + "description": "The unique identifier for the frontend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendParameter" + } + }, + "modifyLoadBalancerFrontendServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "modifyLoadBalancerFrontendFrontendName": { + "name": "frontend-name", + "in": "path", + "description": "The unique identifier for the frontend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendParameter" + } + }, + "listLoadBalancerFrontendTlsConfigsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "listLoadBalancerFrontendTlsConfigsFrontendName": { + "name": "frontend-name", + "in": "path", + "description": "The unique identifier for the frontend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendParameter" + } + }, + "createLoadBalancerFrontendTlsConfigServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "createLoadBalancerFrontendTlsConfigFrontendName": { + "name": "frontend-name", + "in": "path", + "description": "The unique identifier for the frontend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendParameter" + } + }, + "getLoadBalancerFrontendTlsConfigServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerFrontendTlsConfigFrontendName": { + "name": "frontend-name", + "in": "path", + "description": "The unique identifier for the frontend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendParameter" + } + }, + "getLoadBalancerFrontendTlsConfigTlsConfigName": { + "name": "tls-config-name", + "in": "path", + "description": "The unique identifier for the TLS configuration.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfigParameter" + } + }, + "deleteLoadBalancerFrontendTlsConfigServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "deleteLoadBalancerFrontendTlsConfigFrontendName": { + "name": "frontend-name", + "in": "path", + "description": "The unique identifier for the frontend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendParameter" + } + }, + "deleteLoadBalancerFrontendTlsConfigTlsConfigName": { + "name": "tls-config-name", + "in": "path", + "description": "The unique identifier for the TLS configuration.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfigParameter" + } + }, + "modifyLoadBalancerFrontendTlsConfigServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "modifyLoadBalancerFrontendTlsConfigFrontendName": { + "name": "frontend-name", + "in": "path", + "description": "The unique identifier for the frontend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendParameter" + } + }, + "modifyLoadBalancerFrontendTlsConfigTlsConfigName": { + "name": "tls-config-name", + "in": "path", + "description": "The unique identifier for the TLS configuration.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfigParameter" + } + }, + "listLoadBalancerRulesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "listLoadBalancerRulesFrontendName": { + "name": "frontend-name", + "in": "path", + "description": "The unique identifier for the frontend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendParameter" + } + }, + "createLoadBalancerRuleServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "createLoadBalancerRuleFrontendName": { + "name": "frontend-name", + "in": "path", + "description": "The unique identifier for the frontend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendParameter" + } + }, + "getLoadBalancerRuleServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerRuleFrontendName": { + "name": "frontend-name", + "in": "path", + "description": "The unique identifier for the frontend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendParameter" + } + }, + "getLoadBalancerRuleRuleName": { + "name": "rule-name", + "in": "path", + "description": "The unique identifier for the rule.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerRuleParameter" + } + }, + "replaceLoadBalancerRuleServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "replaceLoadBalancerRuleFrontendName": { + "name": "frontend-name", + "in": "path", + "description": "The unique identifier for the frontend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendParameter" + } + }, + "replaceLoadBalancerRuleRuleName": { + "name": "rule-name", + "in": "path", + "description": "The unique identifier for the rule.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerRuleParameter" + } + }, + "deleteLoadBalancerRuleServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "deleteLoadBalancerRuleFrontendName": { + "name": "frontend-name", + "in": "path", + "description": "The unique identifier for the frontend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendParameter" + } + }, + "deleteLoadBalancerRuleRuleName": { + "name": "rule-name", + "in": "path", + "description": "The unique identifier for the rule.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerRuleParameter" + } + }, + "modifyLoadBalancerRuleServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "modifyLoadBalancerRuleFrontendName": { + "name": "frontend-name", + "in": "path", + "description": "The unique identifier for the frontend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendParameter" + } + }, + "modifyLoadBalancerRuleRuleName": { + "name": "rule-name", + "in": "path", + "description": "The unique identifier for the rule.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerRuleParameter" + } + }, + "listLoadBalancerBackendsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "createLoadBalancerBackendServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerBackendServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerBackendBackendName": { + "name": "backend-name", + "in": "path", + "description": "The unique identifier for the backend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendParameter" + } + }, + "deleteLoadBalancerBackendServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "deleteLoadBalancerBackendBackendName": { + "name": "backend-name", + "in": "path", + "description": "The unique identifier for the backend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendParameter" + } + }, + "modifyLoadBalancerBackendServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "modifyLoadBalancerBackendBackendName": { + "name": "backend-name", + "in": "path", + "description": "The unique identifier for the backend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendParameter" + } + }, + "listLoadBalancerMembersServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "listLoadBalancerMembersBackendName": { + "name": "backend-name", + "in": "path", + "description": "The unique identifier for the backend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendParameter" + } + }, + "createLoadBalancerMemberServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "createLoadBalancerMemberBackendName": { + "name": "backend-name", + "in": "path", + "description": "The unique identifier for the backend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendParameter" + } + }, + "getLoadBalancerMemberServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerMemberBackendName": { + "name": "backend-name", + "in": "path", + "description": "The unique identifier for the backend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendParameter" + } + }, + "getLoadBalancerMemberMemberName": { + "name": "member-name", + "in": "path", + "description": "The unique identifier for the member.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerMemberParameter" + } + }, + "deleteLoadBalancerMemberServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "deleteLoadBalancerMemberBackendName": { + "name": "backend-name", + "in": "path", + "description": "The unique identifier for the backend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendParameter" + } + }, + "deleteLoadBalancerMemberMemberName": { + "name": "member-name", + "in": "path", + "description": "The unique identifier for the member.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerMemberParameter" + } + }, + "modifyLoadBalancerMemberServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "modifyLoadBalancerMemberBackendName": { + "name": "backend-name", + "in": "path", + "description": "The unique identifier for the backend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendParameter" + } + }, + "modifyLoadBalancerMemberMemberName": { + "name": "member-name", + "in": "path", + "description": "The unique identifier for the member.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerMemberParameter" + } + }, + "listLoadBalancerBackendTlsConfigsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "listLoadBalancerBackendTlsConfigsBackendName": { + "name": "backend-name", + "in": "path", + "description": "The unique identifier for the backend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendParameter" + } + }, + "createLoadBalancerBackendTlsConfigServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "createLoadBalancerBackendTlsConfigBackendName": { + "name": "backend-name", + "in": "path", + "description": "The unique identifier for the backend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendParameter" + } + }, + "getLoadBalancerBackendTlsConfigServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerBackendTlsConfigBackendName": { + "name": "backend-name", + "in": "path", + "description": "The unique identifier for the backend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendParameter" + } + }, + "getLoadBalancerBackendTlsConfigTlsConfigName": { + "name": "tls-config-name", + "in": "path", + "description": "The unique identifier for the TLS configuration.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfigParameter" + } + }, + "deleteLoadBalancerBackendTlsConfigServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "deleteLoadBalancerBackendTlsConfigBackendName": { + "name": "backend-name", + "in": "path", + "description": "The unique identifier for the backend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendParameter" + } + }, + "deleteLoadBalancerBackendTlsConfigTlsConfigName": { + "name": "tls-config-name", + "in": "path", + "description": "The unique identifier for the TLS configuration.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfigParameter" + } + }, + "modifyLoadBalancerBackendTlsConfigServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "modifyLoadBalancerBackendTlsConfigBackendName": { + "name": "backend-name", + "in": "path", + "description": "The unique identifier for the backend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendParameter" + } + }, + "modifyLoadBalancerBackendTlsConfigTlsConfigName": { + "name": "tls-config-name", + "in": "path", + "description": "The unique identifier for the TLS configuration.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfigParameter" + } + }, + "modifyLoadBalancerNetworkServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "modifyLoadBalancerNetworkNetworkName": { + "name": "network-name", + "in": "path", + "description": "The unique identifier for the network.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerNetworkParameter" + } + }, + "listLoadBalancerIpAddressesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "createLoadBalancerIpAddressServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerIpAddressServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerIpAddressIpAddress": { + "name": "ip-address", + "in": "path", + "description": "The unique identifier for the IP address.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerIpAddressParameter" + } + }, + "deleteLoadBalancerIpAddressServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "deleteLoadBalancerIpAddressIpAddress": { + "name": "ip-address", + "in": "path", + "description": "The unique identifier for the IP address.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerIpAddressParameter" + } + }, + "listLoadBalancerResolversServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "createLoadBalancerResolverServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerResolverServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerResolverResolverName": { + "name": "resolver-name", + "in": "path", + "description": "The unique identifier for the resolver.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerResolverParameter" + } + }, + "deleteLoadBalancerResolverServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "deleteLoadBalancerResolverResolverName": { + "name": "resolver-name", + "in": "path", + "description": "The unique identifier for the resolver.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerResolverParameter" + } + }, + "modifyLoadBalancerResolverServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "modifyLoadBalancerResolverResolverName": { + "name": "resolver-name", + "in": "path", + "description": "The unique identifier for the resolver.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerResolverParameter" + } + }, + "listLoadBalancerLabelsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "createLoadBalancerLabelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerLabelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "The unique identifier for the label.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelParameter" + } + }, + "deleteLoadBalancerLabelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "deleteLoadBalancerLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "The unique identifier for the label.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelParameter" + } + }, + "modifyLoadBalancerLabelServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "modifyLoadBalancerLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "The unique identifier for the label.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelParameter" + } + }, + "getLoadBalancerMetricsServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerMetricsSeriesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerFrontendCombinedMetricsSeriesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerFrontendCombinedMetricsSeriesSort": { + "name": "sort", + "in": "query", + "description": "Sort metrics by field. Prefix with '-' for descending order.", + "required": false, + "schema": { + "$ref": "#/components/schemas/loadBalancerMetricsSortParameter" + } + }, + "getLoadBalancerFrontendMetricsSeriesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerFrontendMetricsSeriesFrontendName": { + "name": "frontend-name", + "in": "path", + "description": "The unique identifier for the frontend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendParameter" + } + }, + "getLoadBalancerFrontendMetricsSeriesSort": { + "name": "sort", + "in": "query", + "description": "Sort metrics by field. Prefix with '-' for descending order.", + "required": false, + "schema": { + "$ref": "#/components/schemas/loadBalancerMetricsSortParameter" + } + }, + "getLoadBalancerBackendCombinedMetricsSeriesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerBackendCombinedMetricsSeriesSort": { + "name": "sort", + "in": "query", + "description": "Sort metrics by field. Prefix with '-' for descending order.", + "required": false, + "schema": { + "$ref": "#/components/schemas/loadBalancerMetricsSortParameter" + } + }, + "getLoadBalancerBackendMetricsSeriesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerBackendMetricsSeriesBackendName": { + "name": "backend-name", + "in": "path", + "description": "The unique identifier for the backend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendParameter" + } + }, + "getLoadBalancerBackendMetricsSeriesSort": { + "name": "sort", + "in": "query", + "description": "Sort metrics by field. Prefix with '-' for descending order.", + "required": false, + "schema": { + "$ref": "#/components/schemas/loadBalancerMetricsSortParameter" + } + }, + "getLoadBalancerMemberCombinedMetricsSeriesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerMemberCombinedMetricsSeriesBackendName": { + "name": "backend-name", + "in": "path", + "description": "The unique identifier for the backend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendParameter" + } + }, + "getLoadBalancerMemberCombinedMetricsSeriesSort": { + "name": "sort", + "in": "query", + "description": "Sort metrics by field. Prefix with '-' for descending order.", + "required": false, + "schema": { + "$ref": "#/components/schemas/loadBalancerMetricsSortParameter" + } + }, + "getLoadBalancerMemberMetricsSeriesServiceUuid": { + "name": "service-uuid", + "in": "path", + "description": "The unique identifier for the service.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceParameter" + } + }, + "getLoadBalancerMemberMetricsSeriesBackendName": { + "name": "backend-name", + "in": "path", + "description": "The unique identifier for the backend.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendParameter" + } + }, + "getLoadBalancerMemberMetricsSeriesMemberName": { + "name": "member-name", + "in": "path", + "description": "The unique identifier for the member.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerMemberParameter" + } + }, + "getLoadBalancerMemberMetricsSeriesSort": { + "name": "sort", + "in": "query", + "description": "Sort metrics by field. Prefix with '-' for descending order.", + "required": false, + "schema": { + "$ref": "#/components/schemas/loadBalancerMetricsSortParameter" + } + }, + "listLoadBalancerCertificateBundlesLimit": { + "name": "limit", + "in": "query", + "description": "Number of entries to receive at most.", + "required": false, + "schema": { + "$ref": "#/components/schemas/loadBalancerLimitParameter" + } + }, + "listLoadBalancerCertificateBundlesOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/loadBalancerOffsetParameter" + } + }, + "listLoadBalancerCertificateBundlesLabel": { + "name": "label", + "in": "query", + "description": "Filter resources by label. Can be provided multiple times for multiple labels. Format: 'key=value' for exact match or 'key' for existence check.", + "required": false, + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelFilterParameter" + } + }, + "getLoadBalancerCertificateBundleBundleUuid": { + "name": "bundle-uuid", + "in": "path", + "description": "The unique identifier for the certificate bundle.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerCertificateBundleParameter" + } + }, + "deleteLoadBalancerCertificateBundleBundleUuid": { + "name": "bundle-uuid", + "in": "path", + "description": "The unique identifier for the certificate bundle.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerCertificateBundleParameter" + } + }, + "modifyLoadBalancerCertificateBundleBundleUuid": { + "name": "bundle-uuid", + "in": "path", + "description": "The unique identifier for the certificate bundle.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerCertificateBundleParameter" + } + }, + "listLoadBalancerCertificateBundleLabelsBundleUuid": { + "name": "bundle-uuid", + "in": "path", + "description": "The unique identifier for the certificate bundle.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerCertificateBundleParameter" + } + }, + "createLoadBalancerCertificateBundleLabelBundleUuid": { + "name": "bundle-uuid", + "in": "path", + "description": "The unique identifier for the certificate bundle.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerCertificateBundleParameter" + } + }, + "getLoadBalancerCertificateBundleLabelBundleUuid": { + "name": "bundle-uuid", + "in": "path", + "description": "The unique identifier for the certificate bundle.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerCertificateBundleParameter" + } + }, + "getLoadBalancerCertificateBundleLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "The unique identifier for the label.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelParameter" + } + }, + "deleteLoadBalancerCertificateBundleLabelBundleUuid": { + "name": "bundle-uuid", + "in": "path", + "description": "The unique identifier for the certificate bundle.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerCertificateBundleParameter" + } + }, + "deleteLoadBalancerCertificateBundleLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "The unique identifier for the label.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelParameter" + } + }, + "modifyLoadBalancerCertificateBundleLabelBundleUuid": { + "name": "bundle-uuid", + "in": "path", + "description": "The unique identifier for the certificate bundle.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerCertificateBundleParameter" + } + }, + "modifyLoadBalancerCertificateBundleLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "The unique identifier for the label.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelParameter" + } + }, + "listLoadBalancerPlansLimit": { + "name": "limit", + "in": "query", + "description": "Number of entries to receive at most.", + "required": false, + "schema": { + "$ref": "#/components/schemas/loadBalancerLimitParameter" + } + }, + "listLoadBalancerPlansOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/loadBalancerOffsetParameter" + } + }, + "getLoadBalancerPlanPlanName": { + "name": "plan-name", + "in": "path", + "description": "The unique identifier for the plan.", + "required": true, + "schema": { + "$ref": "#/components/schemas/loadBalancerPlanParameter" + } + }, + "listFirewallRulesetsLimit": { + "name": "limit", + "in": "query", + "description": "Number of entries to receive at most.", + "required": false, + "schema": { + "$ref": "#/components/schemas/firewallRulesetQueryParamLimit" + } + }, + "listFirewallRulesetsOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/firewallRulesetQueryParamOffset" + } + }, + "listFirewallRulesetsSort": { + "name": "sort", + "in": "query", + "description": "Order of returned results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/firewallRulesetQueryParamSort" + } + }, + "getFirewallRulesetRulesetUuid": { + "name": "ruleset-uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "deleteFirewallRulesetRulesetUuid": { + "name": "ruleset-uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "modifyFirewallRulesetRulesetUuid": { + "name": "ruleset-uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "restoreFirewallRulesetRulesetUuid": { + "name": "ruleset-uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "restoreFirewallRulesetRulesetVersion": { + "name": "ruleset-version", + "in": "path", + "description": "Firewall ruleset version", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetVersion" + } + }, + "listFirewallRulesetRulesRulesetUuid": { + "name": "ruleset-uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "listFirewallRulesetRulesLimit": { + "name": "limit", + "in": "query", + "description": "Number of entries to receive at most.", + "required": false, + "schema": { + "$ref": "#/components/schemas/firewallRulesetQueryParamLimit" + } + }, + "listFirewallRulesetRulesOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/firewallRulesetQueryParamOffset" + } + }, + "listFirewallRulesetRulesSort": { + "name": "sort", + "in": "query", + "description": "Order of returned results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/firewallRulesetQueryParamSort" + } + }, + "createMultipleFirewallRulesetRuleRulesetUuid": { + "name": "ruleset-uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "createFirewallRulesetRuleRulesetUuid": { + "name": "ruleset-uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "getFirewallRulesetRuleRulesetUuid": { + "name": "ruleset-uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "getFirewallRulesetRuleRuleId": { + "name": "rule-id", + "in": "path", + "description": "Firewall ruleset rule UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "deleteFirewallRulesetRuleRulesetUuid": { + "name": "ruleset-uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "deleteFirewallRulesetRuleRuleId": { + "name": "rule-id", + "in": "path", + "description": "Firewall ruleset rule UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "modifyFirewallRulesetRuleRulesetUuid": { + "name": "ruleset-uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "modifyFirewallRulesetRuleRuleId": { + "name": "rule-id", + "in": "path", + "description": "Firewall ruleset rule UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "listFirewallRulesetLabelsRulesetUuid": { + "name": "ruleset-uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "createFirewallRulesetLabelRulesetUuid": { + "name": "ruleset-uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "listFirewallRulesetAttachedServersRulesetUuid": { + "name": "ruleset-uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "getFirewallRulesetLabelRulesetUuid": { + "name": "ruleset-uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "getFirewallRulesetLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "The key of the label.", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetLabelKey" + } + }, + "deleteFirewallRulesetLabelRulesetUuid": { + "name": "ruleset-uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "deleteFirewallRulesetLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "The key of the label.", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetLabelKey" + } + }, + "modifyFirewallRulesetLabelRulesetUuid": { + "name": "ruleset-uuid", + "in": "path", + "description": "Firewall ruleset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "modifyFirewallRulesetLabelLabelKey": { + "name": "label-key", + "in": "path", + "description": "The key of the label.", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetLabelKey" + } + }, + "firewallRulesetListServerFirewallRuleServerUuid": { + "name": "server-uuid", + "in": "path", + "description": "Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "firewallRulesetListServerFirewallRuleLimit": { + "name": "limit", + "in": "query", + "description": "Number of entries to receive at most.", + "required": false, + "schema": { + "$ref": "#/components/schemas/firewallRulesetQueryParamLimit" + } + }, + "firewallRulesetListServerFirewallRuleOffset": { + "name": "offset", + "in": "query", + "description": "Offset for retrieved results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/firewallRulesetQueryParamOffset" + } + }, + "firewallRulesetListServerFirewallRuleSort": { + "name": "sort", + "in": "query", + "description": "Order of returned results.", + "required": false, + "schema": { + "$ref": "#/components/schemas/firewallRulesetQueryParamSort" + } + }, + "firewallRulesetCreateMultipleServerFirewallRulesServerUuid": { + "name": "server-uuid", + "in": "path", + "description": "Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "firewallRulesetCreateServerFirewallRuleServerUuid": { + "name": "server-uuid", + "in": "path", + "description": "Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "firewallRulesetGetServerFirewallRuleServerUuid": { + "name": "server-uuid", + "in": "path", + "description": "Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "firewallRulesetGetServerFirewallRulePosition": { + "name": "position", + "in": "path", + "description": "Server firewall rule position", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerFirewallRulePosition" + } + }, + "firewallRulesetDeleteServerFirewallRuleServerUuid": { + "name": "server-uuid", + "in": "path", + "description": "Server UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerUuid" + } + }, + "firewallRulesetDeleteServerFirewallRulePosition": { + "name": "position", + "in": "path", + "description": "Server firewall rule position", + "required": true, + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerFirewallRulePosition" + } + }, + "listZoneVLANsZone": { + "name": "zone", + "in": "path", + "description": "The zone identifier.", + "required": true, + "schema": { + "$ref": "#/components/schemas/zone" + } + } + }, + "requestBodies": { + "createSubaccount": { + "description": "Subaccount details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createSubaccountRequest" + } + } + } + }, + "kubernetesPostCluster": { + "description": "postCluster requestBody", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesCluster" + }, + "example": { + "control_plane_ip_filter": [ + "1.2.3.0/24", + "1.1.1.1" + ], + "name": "example-cluster", + "network": "33333333-3333-3333-333333333333", + "network_cidr": "172.16.0.0/24", + "labels": [ + { + "key": "env", + "value": "prod" + }, + { + "key": "app", + "value": "cats-dating-app" + } + ], + "node_groups": [ + { + "count": 4, + "kubelet_args": [ + { + "key": "log-flush-frequency", + "value": "5s" + } + ], + "labels": [ + { + "key": "managedBy", + "value": "exampleDevelopmentTeam" + }, + { + "key": "environment", + "value": "development" + } + ], + "name": "small", + "plan": "K8S-2xCPU-4GB", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV" + ], + "storage": "01000000-0000-4000-8000-000160010100", + "taints": [ + { + "effect": "NoSchedule", + "key": "environment", + "value": "development" + } + ] + }, + { + "count": 8, + "kubelet_args": [ + { + "key": "log-flush-frequency", + "value": "15s" + } + ], + "labels": [ + { + "key": "managedBy", + "value": "exampleStagingTeam" + }, + { + "key": "environment", + "value": "staging" + } + ], + "name": "medium", + "plan": "K8S-4xCPU-8GB", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV" + ], + "storage": "01000000-0000-4000-8000-000160010100", + "taints": [ + { + "effect": "NoSchedule", + "key": "environment", + "value": "staging" + } + ] + } + ], + "zone": "de-fra1" + } + } + } + }, + "kubernetesPatchCluster": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesClusterPatch" + }, + "example": { + "control_plane_ip_filter": [ + "1.2.3.0/24", + "1.1.1.1" + ], + "labels": [ + { + "key": "env", + "value": "prod" + }, + { + "key": "app", + "value": "cats-dating-app" + } + ] + } + } + } + }, + "kubernetesPatchNodeGroup": { + "description": "patchNodeGroup requestBody", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesNodeGroupPatch" + }, + "example": { + "count": 16 + } + } + } + }, + "kubernetesPostNodeGroup": { + "description": "postNodeGroup requestBody", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesNodeGroup" + }, + "example": { + "count": 4, + "kubelet_args": [ + { + "key": "log-flush-frequency", + "value": "5s" + } + ], + "labels": [ + { + "key": "managedBy", + "value": "exampleDevelopmentTeam" + }, + { + "key": "environment", + "value": "development" + } + ], + "name": "small", + "plan": "K8S-2xCPU-4GB", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCDxPPyWRTVHYOOaCE/gqDzcdJFZdo1mD8k+BBvZ4an/khT+rzJGT/K1kvxs1vS1AMzaVbuWH1bLVk8XVDVJ3J7Rf76E50O1mj3+SWW81bjneVlAxw7DRoxZInFio7TMFTt6eSRkOGQ2GVpvkePgunVZsk+XE13fSnthqS1TiiivnmaNXsaVIOSZICzTWVKqRz1XVR4fdyKJxEpFhHCIu0ui9SeB887IdcS3KshvNqJo3Jm0LmBLL1vzcbucc7T02wiqvdDSPO7TO8Wlc7sJXwmMImEDBkPYQTHmeOqsKbW0OiGuJniwg93pBt0BqNhn3gxtYLrmjha+PqO9gVR6XkV" + ], + "storage": "01000000-0000-4000-8000-000160010100", + "taints": [ + { + "effect": "NoSchedule", + "key": "environment", + "value": "development" + } + ] + } + } + } + }, + "kubernetesPostUpgrade": { + "description": "postUpgrade request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesClusterAvailableUpgradesPost" + }, + "example": { + "version": "1.31" + } + } + } + }, + "kubernetesCreateClusterAuthentication": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesAuthenticationIssuerConfig" + } + } + }, + "required": true + }, + "kubernetesSetClusterAuthentication": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesAuthenticationConfiguration" + } + } + }, + "required": true + }, + "kubernetesImportClusterAuthentication": { + "content": { + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/kubernetesAuthenticationConfigurationYAML" + } + } + }, + "required": true + }, + "kubernetesUpdateClusterAuthentication": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/kubernetesAuthenticationIssuerConfig" + } + } + }, + "required": true + }, + "addIPAddress": { + "description": "Attributes for the new IP address.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/addIpAddressRequest" + } + } + } + }, + "bulkModifyIPAddresses": { + "description": "List of IP addresses and their attributes to modify.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bulkPatchIpAddressesRequestV1.3" + } + } + } + }, + "modifyIPAddress": { + "description": "Attributes to modify for the IP address.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/modifyIpAddressRequestV1.0" + } + } + } + }, + "patchModifyIPAddress": { + "description": "Attributes to modify for the IP address.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/patchIpAddressRequestV1.3" + } + } + } + }, + "createNetworkPeering": { + "description": "Attributes for the new network peering.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networkPeeringCreate" + } + } + } + }, + "modifyNetworkPeering": { + "description": "Attributes to modify for the network peering.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networkPeeringModify" + } + } + } + }, + "createNetwork": { + "description": "Attributes for the new network.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createNetworkRequest" + } + } + } + }, + "createNetworkInterface": { + "description": "Attributes for the new network interface.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/networkCreateInterfaceRequest" + } + } + } + }, + "modifyNetwork": { + "description": "Attributes to modify for the network.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/modifyNetworkRequest" + } + } + } + }, + "createPartnerAccount": { + "description": "Account to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/partnerCreateAccount" + } + } + } + }, + "replacePermissions": { + "description": "The new set of permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/permission" + } + } + } + }, + "grantPermission": { + "description": "The permission to be granted.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/permission" + } + } + } + }, + "revokePermission": { + "description": "The permission to be revoked.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/permission" + } + } + } + }, + "createRouter": { + "description": "Router creation parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/routerCreate" + } + } + } + }, + "modifyRouter": { + "description": "Router modification parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/routerModify" + } + } + } + }, + "createServerGroup": { + "description": "The server group to create.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverGroupModify" + } + } + } + }, + "modifyServerGroup": { + "description": "The server group attributes to modify.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverGroupModify" + } + } + } + }, + "serverGroupAddServerToGroup": { + "description": "The server to add to the group.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverGroupServerAdd" + } + } + } + }, + "createServer": { + "description": "Cloud Server to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createServer" + } + } + } + }, + "modifyServer": { + "description": "Cloud Server to modify", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/modifyServer" + } + } + } + }, + "addServerInterface": { + "description": "Network interface to add", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverAddInterface" + } + } + } + }, + "modifyServerInterface": { + "description": "Network interface changes", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverModifyInterface" + } + } + } + }, + "addServerInterfaceIpAddress": { + "description": "IP address to add", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverAddIpAddress" + } + } + } + }, + "rebuildServer": { + "description": "Cloud Server rebuild details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverRebuild" + } + } + } + }, + "relocateServer": { + "description": "Zone to relocate the Cloud Server to", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/relocateServer" + } + } + } + }, + "restartServer": { + "description": "Cloud Server restart options", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/restartServer" + } + } + } + }, + "startServer": { + "description": "Cloud Server start options", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/startServer" + } + } + } + }, + "stopServer": { + "description": "Cloud Server to stop", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/stopServer" + } + } + } + }, + "serverAttachPrivateFirewallRuleset": { + "description": "Private firewall ruleset to attach", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverAttachPrivateFirewallRuleset" + } + } + } + }, + "serverLoadCDROM": { + "description": "Storage to load into the CD-ROM device", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverLoadCdrom" + } + } + } + }, + "serverDetachPrivateFirewallRuleset": { + "description": "Private firewall ruleset to detach", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverDetachPrivateFirewallRuleset" + } + } + } + }, + "serverUpdateFirewallRules": { + "description": "Firewall rules to update", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverUpdateFirewallRules" + } + } + } + }, + "serverCreateFirewallRule": { + "description": "Firewall rule to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverCreateFirewallRule" + } + } + } + }, + "serverAttachStorageDevice": { + "description": "Storage device to attach", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverAttachStorage" + } + } + } + }, + "serverDetachStorageDevice": { + "description": "Storage device to detach", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/serverDetachStorage" + } + } + } + }, + "createStorage": { + "description": "Block storage creation parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createStorageRequest" + } + } + } + }, + "modifyStorage": { + "description": "Block storage modification parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/modifyStorageBody" + } + } + } + }, + "attachStorageToServer": { + "description": "Storage attachment parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/attachStorageRequest" + } + } + } + }, + "cloneStorage": { + "description": "Block storage clone parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cloneStorageRequest" + } + } + } + }, + "createStorageImport": { + "description": "Storage import parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createStorageImportRequest" + } + } + } + }, + "createTemplateFromStorage": { + "description": "Template creation parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createStorageTemplateRequest" + } + } + } + }, + "storageCreateOnDemandBackup": { + "description": "On-demand backup creation parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createStorageBackupRequest" + } + } + } + }, + "createTag": { + "description": "Tag to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tag" + } + } + } + }, + "modifyTag": { + "description": "Tag to modify", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tag" + } + } + } + }, + "accountTokensCreateToken": { + "description": "Parameters for creating a new token.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/accountTokensCreateTokenRequest" + } + } + }, + "required": true + }, + "objectStorage2CreateObjectStorage": { + "description": "Creates a new object storage service.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceCreate" + } + } + } + }, + "objectStorage2ReplaceObjectStorage": { + "description": "Replaces existing object storage service by given {service_uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceReplace" + } + } + } + }, + "objectStorage2ModifyObjectStorage": { + "description": "Modifies existing object storage service by given {service_uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2ServiceModify" + } + } + } + }, + "objectStorage2CreateObjectStorageNetwork": { + "description": "Creates a new service network by given {service_uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2NetworkCreate" + } + } + } + }, + "objectStorage2AttachObjectStorageCustomDomain": { + "description": "Attaches a new custom domain to the service identified by {service_uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2CustomDomainCreate" + } + } + } + }, + "objectStorage2ModifyObjectStorageCustomDomain": { + "description": "Modifies existing custom domain by given {service_uuid} and {domain_name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2CustomDomainModify" + } + } + } + }, + "objectStorage2CreateObjectStorageBucket": { + "description": "Creates a new service bucket by the given {service_uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2BucketCreate" + } + } + } + }, + "objectStorage2CreateObjectStorageLabel": { + "description": "Creates a new label by given {service_uuid}. Labels are used for service filtering.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2LabelCreate" + } + } + } + }, + "objectStorage2ModifyObjectStorageLabel": { + "description": "Modifies existing label by given {service_uuid} and {key}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2LabelModify" + } + } + } + }, + "objectStorage2CreateObjectStorageStaticWebsite": { + "description": "Creates a new static website hosting configuration for a domain.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2StaticWebsiteConfigCreate" + } + } + } + }, + "objectStorage2ModifyObjectStorageStaticWebsite": { + "description": "Updates an existing static website configuration.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2StaticWebsiteConfigModify" + } + } + } + }, + "objectStorage2CreateObjectStorageUser": { + "description": "Creates a new service user by given {service_uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2UserCreate" + } + } + } + }, + "objectStorage2ModifyObjectStorageAccessKeyDetails": { + "description": "Modifies access key details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2AccessKeyModify" + } + } + } + }, + "objectStorage2AttachObjectStorageUserPolicy": { + "description": "Attach a policy to a user.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyAttachmentCreate" + } + } + } + }, + "objectStorage2CreateObjectStorageUserInlinePolicy": { + "description": "Creates a user inline policy by the given {service_uuid}, and {username}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2InlinePolicyCreate" + } + } + } + }, + "objectStorage2ReplaceObjectStorageUserTags": { + "description": "Replaces a user's tags by the given {service_uuid}, and {username}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2TagListRequest" + } + } + } + }, + "objectStorage2CreateObjectStorageUserPermissionsBoundary": { + "description": "Creates a user's permissions boundary by the given {service_uuid}, and {username}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PermissionsBoundaryCreate" + } + } + } + }, + "objectStorage2CreateObjectStoragePolicyVersion": { + "description": "Creates a policy version by the given {service_uuid}, and {policy_name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyVersionCreate" + } + } + } + }, + "objectStorage2SetObjectStorageDefaultPolicyVersion": { + "description": "Sets the default version for a policy. Note: This is mapped from ModifyPolicyVersion handler.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicySetDefaultVersion" + } + } + } + }, + "objectStorage2CreateObjectStoragePolicy": { + "description": "Creates a new service policy by given {service_uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyCreate" + } + } + } + }, + "objectStorage2AttachObjectStorageIAMGroupPolicy": { + "description": "Attaches a policy to a group.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyAttachmentCreate" + } + } + } + }, + "objectStorage2CreateObjectStorageGroup": { + "description": "Creates an iam group.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2GroupCreate" + } + } + } + }, + "objectStorage2CreateObjectStorageGroupInlinePolicy": { + "description": "Creates a group inline policy by the given {service_uuid}, and {group_name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2InlinePolicyCreate" + } + } + } + }, + "objectStorage2CreateObjectStorageRole": { + "description": "Creates a service IAM role.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2RoleCreate" + } + } + } + }, + "objectStorage2UpdateObjectStorageRole": { + "description": "Updates a service's IAM role.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2RoleUpdate" + } + } + } + }, + "objectStorage2CreateObjectStorageRoleInlinePolicy": { + "description": "Creates a role inline policy by the given {service_uuid}, and {role_name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2InlinePolicyCreate" + } + } + } + }, + "objectStorage2CreateObjectStorageRolePermissionsBoundary": { + "description": "Creates a role policy's permissions boundary by the given {service_uuid}, and {role_name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PermissionsBoundaryCreate" + } + } + } + }, + "objectStorage2AssumeObjectStorageRolePolicy": { + "description": "Assume a role policy by the given {service_uuid}, and {role_name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2AssumeRolePolicyRequest" + } + } + } + }, + "objectStorage2AttachObjectStoragePolicyToRole": { + "description": "Attaches a policy to a service's IAM role.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2PolicyAttachmentCreate" + } + } + } + }, + "objectStorage2ReplaceObjectStorageRoleTags": { + "description": "Replaces a role's tags by the given {service_uuid}, and {role_name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/objectStorage2TagListRequest" + } + } + } + }, + "createFileStorage": { + "description": "Creates a new File Storage service.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageServiceCreate" + } + } + } + }, + "replaceFileStorage": { + "description": "Replaces existing File Storage service by given {service_uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageServiceReplace" + } + } + } + }, + "modifyFileStorage": { + "description": "Modifies existing File Storage service by given {service_uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageServiceModify" + } + } + } + }, + "createFileStorageNetwork": { + "description": "Creates a new service network by given {service_uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageNetworkCreate" + } + } + } + }, + "modifyFileStorageNetwork": { + "description": "Modifies existing service network by given {service_uuid} and {network_name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageNetworkModify" + } + } + } + }, + "createFileStorageShare": { + "description": "Creates a new service share by given {service_uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageShareCreate" + } + } + } + }, + "modifyFileStorageShare": { + "description": "Modifies existing service share by given {service_uuid} and {share_name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageShareModify" + } + } + } + }, + "createFileStorageAcl": { + "description": "Creates a new share ACL by given {service_uuid} and {share_name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageAclCreate" + } + } + } + }, + "modifyFileStorageAcl": { + "description": "Modifies existing ACL by given {service_uuid}, {share_name} and {acl_name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageAclModify" + } + } + } + }, + "createFileStorageLabel": { + "description": "Creates a new label by given {service_uuid}. Labels are used for service filtering.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageLabelCreate" + } + } + } + }, + "modifyFileStorageLabel": { + "description": "Modifies existing label by given {service_uuid} and {key}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/fileStorageLabelModify" + } + } + } + }, + "createDatabase": { + "description": "Creates a new Managed Database instance. New databases are started by default. An initial backup is created automatically on startup and the API will be fully functional only after this backup has been created. The creation might take a while. Note that different databases have different properties that can be passed on creation. For PostgreSQL and MySQL, select the plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceCreateOpenAPI" + } + } + } + }, + "modifyDatabase": { + "description": "Modifies Managed Database service details by its {uuid} including upgrading plans, migration to other zones and database type-specific configurations. For PostgreSQL and MySQL, change the plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceModifyOpenAPI" + } + } + } + }, + "modifyDatabaseType": { + "description": "Update a service's type by the given {service-uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceTypeModify" + } + } + } + }, + "cloneDatabase": { + "description": "Creates a clone of a Managed Database service based on its {uuid}. It is possible to change location, plans and use the point in time feature to clone your service at a specific time using your backups. For PostgreSQL and MySQL, select the clone's plan with the plan_compute, plan_node_count, plan_storage_gib and plan_backups fields; the plan name field is deprecated for these engines.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceCloneOpenAPI" + } + } + } + }, + "createDatabaseNetwork": { + "description": "Attaches an SDN network to a Managed Database service by its {uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseNetworkCreate" + } + } + } + }, + "upgradeDatabase": { + "description": "Upgrades your PostgreSQL Managed Database service database to a newer major version. Downgrades are not permitted.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceUpgrade" + } + } + } + }, + "createDatabaseLabel": { + "description": "Creates a new label by given {service_uuid}. Labels used for service filtering.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseLabelCreate" + } + } + } + }, + "modifyDatabaseLabel": { + "description": "Modifies existing label by given {service_uuid} and {key}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseLabelModify" + } + } + } + }, + "modifyDatabaseAccessControl": { + "description": "Modifies the user {username} access control for the Managed Database service {uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceAclModify" + } + } + } + }, + "modifyDatabaseSecurityAdmin": { + "description": "Modifies Security management admin password for the OpenSearch Managed Database service {uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceSecurityModify" + } + } + } + }, + "enableDatabaseSecurityAdmin": { + "description": "Enables Security management admin for the OpenSearch Managed Database service {uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceSecurityEnable" + } + } + } + }, + "createDatabaseIntegrationEndpoint": { + "description": "Creates a new integration endpoint.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseIntegrationEndpointCreate" + } + } + } + }, + "modifyDatabaseIntegrationEndpoint": { + "description": "Modifies existing integration endpoint by given {integration-uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseIntegrationEndpointModify" + } + } + } + }, + "createDatabaseConnectionPool": { + "description": "Creates a connection pool for the Managed Database service {uuid}. Connection pool endpoints are for PostgreSQL Managed Databases only.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseConnectionPoolCreate" + } + } + } + }, + "modifyDatabaseConnectionPool": { + "description": "Modifies the connection pool {pool-name} for the Managed Database service {uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseConnectionPoolModify" + } + } + } + }, + "createDatabaseIntegration": { + "description": "Creates a new integration by given {service-uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceIntegrationCreate" + } + } + } + }, + "modifyDatabaseIntegration": { + "description": "Modifies existing integration by given {service-uuid} and {integration-uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceIntegrationModify" + } + } + } + }, + "createDatabaseLogicalDatabase": { + "description": "Creates a new logical database for the Managed Database service {uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LogicalDatabaseCreate" + } + } + } + }, + "createDatabaseTask": { + "description": "Creates a task that checks for potential errors before starting a migration or upgrade for a Managed Database service by its {uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceTaskCreate" + } + } + } + }, + "createDatabaseUser": { + "description": "Creates a new user for the Managed Database service {uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceUserCreate" + } + } + } + }, + "modifyDatabaseUser": { + "description": "Modifies the user {username} details for the Managed Database service {uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceUserModify" + } + } + } + }, + "modifyDatabaseUserAccessControl": { + "description": "Return access controls settings for the OpenSearch Managed Database service {uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/databaseServiceUserAclModify" + } + } + } + }, + "createGatewayService": { + "description": "Create a new service.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayServiceCreateRequest" + } + } + } + }, + "replaceGatewayService": { + "description": "Replace service configuration.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayServiceReplaceRequest" + } + } + } + }, + "modifyGatewayService": { + "description": "Modify service configuration.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayServiceModifyRequest" + } + } + } + }, + "createGatewayConnection": { + "description": "Create a new connection.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayConnectionCreateRequest" + } + } + } + }, + "modifyGatewayConnection": { + "description": "Modify connection configuration.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayConnectionModifyRequest" + } + } + } + }, + "createGatewayTunnel": { + "description": "Create a new tunnel.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayTunnelCreateRequest" + } + } + } + }, + "modifyGatewayTunnel": { + "description": "Modify tunnel configuration.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayTunnelModifyRequest" + } + } + } + }, + "createGatewayServiceLabel": { + "description": "Create a new service label.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayLabelCreateRequest" + } + } + } + }, + "modifyGatewayServiceLabel": { + "description": "Modify service label configuration.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayLabelModifyRequest" + } + } + } + }, + "modifyGatewayAddress": { + "description": "Modify existing service address by given {service-address-identifier}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayAddressModifyRequest" + } + } + } + }, + "createGatewayServiceLogSession": { + "description": "Create a new service log session.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/gatewayServiceLogSessionCreateRequest" + } + } + } + }, + "createLoadBalancer": { + "description": "Creates a new load balancer service.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceCreate" + } + } + } + }, + "replaceLoadBalancer": { + "description": "Replaces existing load balancer service by given {service-uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceReplace" + } + } + } + }, + "modifyLoadBalancer": { + "description": "Modifies existing load balancer service by given {service-uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerServiceModify" + } + } + } + }, + "createLoadBalancerFrontend": { + "description": "Creates a new service frontend by given {service-uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendCreate" + } + } + } + }, + "modifyLoadBalancerFrontend": { + "description": "Modifies existing service frontend by given {service-uuid} and {frontend-name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerFrontendModify" + } + } + } + }, + "createLoadBalancerFrontendTlsConfig": { + "description": "Creates a new TLS config by given {service-uuid} and {frontend-name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfigCreate" + } + } + } + }, + "modifyLoadBalancerFrontendTlsConfig": { + "description": "Modifies existing TLS config by given {service-uuid}, {frontend-name}, and {tls-config-name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfigModify" + } + } + } + }, + "createLoadBalancerRule": { + "description": "Creates a new rule by given {service-uuid} and {frontend-name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerRuleCreate" + } + } + } + }, + "replaceLoadBalancerRule": { + "description": "Replaces existing rule by given {service-uuid}, {frontend-name}, and {rule-name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerRuleCreate" + } + } + } + }, + "modifyLoadBalancerRule": { + "description": "Modifies existing rule by given {service-uuid}, {frontend-name}, and {rule-name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerRuleModify" + } + } + } + }, + "createLoadBalancerBackend": { + "description": "Creates a new backend by given {service-uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendCreate" + } + } + } + }, + "modifyLoadBalancerBackend": { + "description": "Modifies existing backend by given {service-uuid} and {backend-name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerBackendModify" + } + } + } + }, + "createLoadBalancerMember": { + "description": "Creates a new member by given {service-uuid} and {backend-name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerMemberCreate" + } + } + } + }, + "modifyLoadBalancerMember": { + "description": "Modifies existing member by given {service-uuid}, {backend-name} and {member-name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerMemberModify" + } + } + } + }, + "createLoadBalancerBackendTlsConfig": { + "description": "Creates a new TLS config by given {service-uuid} and {backend-name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfigCreate" + } + } + } + }, + "modifyLoadBalancerBackendTlsConfig": { + "description": "Modifies existing TLS config by given {service-uuid}, {backend-name}, and {tls-config-name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerTlsConfigModify" + } + } + } + }, + "modifyLoadBalancerNetwork": { + "description": "Modifies existing service network by given {service-uuid} and {network-name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerNetworkModify" + } + } + } + }, + "createLoadBalancerIpAddress": { + "description": "Attach a floating public IPv4 address to the service using the specified {service-uuid}. The number of attachable floating IPv4 addresses is limited to the number of nodes in the plan, and all addresses must be in the same zone as the service and detached.\n\nNote: Floating public IPv4 addresses have configurable release policies. When the service is deleted or an IP address is detached, addresses with the keep policy will be converted to detached floating IPs that remain available in your account. Addresses with the release policy will be automatically deleted. For more details, see IP Addresses.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerIpAddressCreate" + } + } + } + }, + "createLoadBalancerResolver": { + "description": "Creates a new resolver by given {service-uuid}.\n\nResolver is a DNS server usually residing in a user's private network. It's used to resolve IPs for backend members of type dynamic.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerResolverCreate" + } + } + } + }, + "modifyLoadBalancerResolver": { + "description": "Modifies existing resolver by given {service-uuid} and {resolver-name}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerResolverModify" + } + } + } + }, + "createLoadBalancerLabel": { + "description": "Creates a new label by given {service-uuid}.\n\nLabels used for service filtering.\n\nService labels usage examples\nBelow are some examples of what certain GET requests might look like.\n\nexact match: GET /1.3/load-balancer?label=env%3Dstaging\nexistence: GET /1.3/load-balancer?label=env\nmultiple: GET /1.3/load-balancer?label=env&label=foo%3Dbar\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelCreate" + } + } + } + }, + "modifyLoadBalancerLabel": { + "description": "Modifies existing label by given {service-uuid} and {label-key}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelModify" + } + } + } + }, + "createLoadBalancerCertificateBundle": { + "description": "Creates a new certificate bundle.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerCertificateBundleCreate" + } + } + } + }, + "modifyLoadBalancerCertificateBundle": { + "description": "Modifies existing a manual, dynamic or authority certificate bundle by given {bundle-uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerCertificateBundleModify" + } + } + } + }, + "createLoadBalancerCertificateBundleLabel": { + "description": "Creates a new label by given {bundle-uuid}.\n\nLabels used for certificate bundles filtering.\n\nCertificate bundle labels usage examples\nBelow are some examples of what certain GET requests might look like.\n\nexact match: GET /1.3/load-balancer/certificate-bundles?label=env%3Dstaging\nexistence: GET /1.3/load-balancer/certificate-bundles?label=env\nmultiple: GET /1.3/load-balancer/certificate-bundles?label=env&label=foo%3Dbar", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelCreate" + } + } + } + }, + "modifyLoadBalancerCertificateBundleLabel": { + "description": "Modifies existing label by given {bundle-uuid} and {label-key}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/loadBalancerLabelModify" + } + } + } + }, + "createFirewallRuleset": { + "description": "Creates a new firewall ruleset.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createFirewallRuleset" + } + } + } + }, + "modifyFirewallRuleset": { + "description": "Modifies existing firewall ruleset by given {ruleset-uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetModify" + } + } + } + }, + "createMultipleFirewallRulesetRule": { + "description": "Creates multiple firewall ruleset rules by the given {ruleset-uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetFirewallMultipleRuleCreate" + } + } + } + }, + "createFirewallRulesetRule": { + "description": "Creates a new firewall ruleset rule by the given {ruleset-uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetFirewallRuleCreate" + } + } + } + }, + "modifyFirewallRulesetRule": { + "description": "Modifies existing firewall ruleset rule by given {ruleset_uuid} and {rule-uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetFirewallRuleModify" + } + } + } + }, + "createFirewallRulesetLabel": { + "description": "Creates a new label by given {ruleset-uuid}. Labels are used for group filtering.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetCreateLabel" + } + } + } + }, + "modifyFirewallRulesetLabel": { + "description": "Modifies existing label by given {ruleset-uuid} and {label-key}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetLabelModify" + } + } + } + }, + "firewallRulesetCreateMultipleServerFirewallRules": { + "description": "Creates multiple server firewall rules by given {server-uuid}.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerMultipleFirewallRulesCreate" + } + } + } + }, + "firewallRulesetCreateServerFirewallRule": { + "description": "Creates a new server firewall rule.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/firewallRulesetServerFirewallRuleCreate" + } + } + } + } + }, + "securitySchemes": { + "apiToken": { + "type": "http", + "description": "UpCloud API uses HTTP Bearer authentication. An API token is required to authenticate. The API token can be created in the UpCloud control panel. Alternatively, you can create an API token using the API directly, or with upctl. Note that if you want to use HTTP Basic authentication on API or with upctl, you will need to enable API access in the UpCloud control panel first.", + "scheme": "bearer" + } + } + }, + "security": [ + { + "apiToken": [] + } + ], + "tags": [ + { + "name": "upcloud", + "description": "UpCloud" + }, + { + "name": "account", + "description": "Account management and authentication" + }, + { + "name": "kubernetes", + "description": "Kubernetes is a container orchestration system for automating, managing and scaling software deployment.\nManaged Kubernetes allows you to easily create Kubernetes clusters without having to take care about low level details.\n" + }, + { + "name": "currency", + "description": "Currency management" + }, + { + "name": "device", + "description": "Device management" + }, + { + "name": "events", + "description": "Event management" + }, + { + "name": "ip_address", + "description": "\nThe UpCloud network has public and private IP addresses.\n\nPublic IP addresses are used to connect to the server from the Internet.\n\nPrivate Utility network addresses are available for all servers within a\nsingle account, and can communicate with each other globally as long\nas the servers have the utility network interfaces configured. This is\nadded to servers by default.\n\nA server has a minimum of zero and a maximum of five public IPv4 and IPv6\naddresses. Every server can have one utility network IPv4 address only,\nand must have at least one IP address. The UpCloud API assigns the IP addresses\nautomatically in networks configured to use DHCP. IP addresses cannot be\nreserved for later use, except for floating IPs that can be reserved and\nswitched from server to another freely within their specific zone.\n\nThe operating system running on the server will see a separate network interface\nper IP address. On a typical server, there are three network interfaces. The\nfirst network interface is assigned to the public network and the second to the\nUtility network. If the server has an IPv6 address configured it will use the\nthird network interface. DHCP service is provided on all public IPv4 network\ninterfaces and all private DHCP-enabled networks for automatic configuration\nof the correct IP address. IPv6 network interfaces should use stateless\naddress autoconfiguration (SLAAC) with IPv6 privacy extensions disabled.\nOn IPv6-only server DNS parameters can be obtained with stateless DHCPv6.\n\nAdditionally, there are floating IPs: IPv4 addresses that can be\nattached to any IPv4 interface in their specific zone (eg. de-fra1 or fi-hel2).\nFloating IP addresses can be instantly switched from one server to another when\ndoing maintenance or dealing with technical issues. More information on floating\nIPs and their configuration can be found from [our tutorials](https://upcloud.com/community/tutorials/floating-ip-addresses/).\n\n## Release policy\n\nThe release policy defines what happens to an IP address when its dependent resource is deleted, such as a server or service it's attached to. The following values are supported:\n\n`release`: The address is also deleted. This applies to both normal and floating IP addresses.\n\n`keep`: For normal (non-floating) IP addresses, they are converted to detached floating IPs when their dependent resource is deleted. For floating IP addresses, they remain as detached floating IPs that can be reattached elsewhere.\n\nFloating IP addresses are created with `keep` as default policy, ensuring they remain available even after dependency deletion.\n\nThe release policy can be set when creating a new IP address or modified for an existing one through the API.\n\nNote that release policy functionality is currently only supported for public IPv4 addresses.\n\n## Service delegation\n\nAssign existing Floating IPv4 addresses to a service instead of a server. This enables the service to manage the IP address and use your dedicated floating IP address in the service's DNS records.\n\nDelegated IP addresses can be tracked with the `is_delegated` attribute in the API response.\n\nWhen an IP address is delegated to a service, it becomes subject to specific access restrictions. The IP address becomes managed by the service until you explicitly remove it. During the delegation: \n\n* You cannot delete the IP address.\n* You cannot modify its MAC address.\n* You can only update the release policy and PTR record.\n\nThese restrictions ensure service stability and are automatically lifted once the IP address is removed from the service and as long as the release policy is set to `keep` so the IP address remains available in your account.\n\nCurrently only Load Balancer supports IP address delegation.\n" + }, + { + "name": "network-peering", + "description": "Network peering management" + }, + { + "name": "network", + "description": "\nThe network API calls present the different networks attached to cloud servers and allow the configuration of SDN private networks.\n\nNetworks define a secure connections between attached cloud servers using a specialised network interface. A cloud server may belong to any number of virtual networks at the same time.\nServer interfaces are identified and ordered by their index.\n\n## Network types\n\n### Public networks\n\nPublic networks provide internet connectivity to the cloud servers. Public networks are automatically added as public [IP addresses](https://upcloudltd.github.io/upcloud-openapi-spec/api/ip-address) are attached to cloud servers.\n\n### Utility network\n\nThe Utility network is a simple to use, yet functionally limited network connecting all cloud servers under the same UpCloud account. All cloud servers are connected to the Utility network by default. This way the Utility network forms a secure connection between all servers within one account, no matter where they are located. IP addressing on the Utility network is specified automatically and cannot be changed. The Utility network is limited to one connection per cloud server. SDN private networks are to be used for production workloads and any advanced network setups. The Utility network is added by [adding a utility IP address](https://upcloudltd.github.io/upcloud-openapi-spec/api/ip-address#assign-ip-address).\n\n### Private virtual LAN\n\nSDN private networks provide flexible and customisable network configuration options beyond that of the Utility network and are recommended for production workloads.\n\nThese networks provide secure connections between attached cloud servers using dedicated network interfaces. Servers can be attached and detached from SDN private networks at will using the API commands. SDN private networks allow a practically unlimited number of cloud servers to be attached simultaneously and a cloud server may belong to any number of SDN private networks at the same time. IP addressing may be defined automatically or custom IP addressing may be used. SDN private networks are configured per zone allowing cloud server on the same zone to be attached.\n\n#### Available IP subnets in Private virtual LANs\n\nGenerally, you can use any _global unicast_ address for your subnet address, even public ones. However, we recommend staying with well-known private address ranges.\n\nPrivate address ranges include: **10.0.0.0/8**, **172.16.0.0/12**, **192.168.0.0/16**.\n\nAllowed subnet prefix lengths (sizes): minimum length 8 bits, maximum length 29 bits.\n\nExcluded ranges:\n\n* 100.64.0.0/10 (CGNAT)\n* 127.0.0.0/8 (localhost)\n* 224.0.0.0/4 (IP multicast)\n* 169.254.0.0/16 (link local)\n\nThe above ranges are not available for use in Private virtual LANs.\n\nFor more information on:\n * adding network interfaces to cloud servers [see](https://upcloudltd.github.io/upcloud-openapi-spec/api/server#add-a-network-interface).\n * modifying network interfaces from cloud servers [see](https://upcloudltd.github.io/upcloud-openapi-spec/api/server#modify-a-network-interface).\n * deleting network interfaces from cloud servers [see](https://upcloudltd.github.io/upcloud-openapi-spec/api/server#delete-a-network-interface-2).\n * assigning IP addresses to cloud servers [see](https://upcloudltd.github.io/upcloud-openapi-spec/api/server#add-an-ip-address-to-a-network-interface).\n * deleting addresses from cloud servers [see](https://upcloudltd.github.io/upcloud-openapi-spec/api/server#delete-an-ip-address-from-a-network-interface).\n" + }, + { + "name": "audit-logs", + "description": "The Audit Log Service API allows customers to query and export their audit logs.\n\t\t\nAudit logs track all actions performed on customer accounts, including resource creation, modification, and deletion. \nThe API provides filtering, pagination, and export capabilities.\n\nAll endpoints require HTTP Basic authentication using UpCloud account credentials." + }, + { + "name": "partner", + "description": "Partner API gives UpCloud partners the ability manage accounts for their customers.\n\nNote that use of this API is available only to accounts provisioned as partner accounts. Please contact your account representative for further details.\n" + }, + { + "name": "permission", + "description": "Manage permissions for sub-accounts to access resources owned by the main account." + }, + { + "name": "plan", + "description": "Plans are preconfigured server configurations with fixed price. Each plan includes certain number of CPU cores, memory amount, storage and transfer quota. Most plans also include one public IPv4 address. Utility IPv4 addresses and public IPv6 addresses are currently free of charge, so they are not included in plan.\n\nIn addition to plans available in a zone, there is always possibility for free scaling of CPU, memory and disk resources. In such cases the plan used by server will be reported as \"custom\" by API. It is possible to change existing \"custom\" server to a fixed plan provided that CPU cores and memory amount matches the selected plan.\n\nGPU plans also have additional `gpu_amount` and `gpu_model` attributes, which indicate the number of GPUs and their model included in the plan.\n\nIf server's storage or network resources do not fit to plan's specification, they are billed on an hourly basis. The storage device(s) and IP addresses included in fixed plan price have `part_of_plan` attribute with value \"yes\" in server details response.\n" + }, + { + "name": "price", + "description": "Retrieve pricing information for UpCloud resources and services." + }, + { + "name": "router", + "description": "Router management" + }, + { + "name": "server-group", + "description": "Server group management" + }, + { + "name": "server", + "description": "Manages Cloud Servers" + }, + { + "name": "server_size", + "description": "Server size management" + }, + { + "name": "storage", + "description": "Block Storage is similar to a physical hard disk. It can be used to install an operating system or hold another filesystem for a Cloud Server.\n\nWritable Block Storage and CD-ROM resources can be freely attached to any Cloud Server within the same zone and under the same account. A maximum of 16 storage devices can be attached to a Cloud Server at the same time; however, the combined limit for network interfaces and storage devices is 24.\n\n

Storage resource types

\n\nThere are four different storage resource types: normal, CD-ROM, template, and backup. The normal type represents writable Block Storage.\n" + }, + { + "name": "tag", + "description": "User can define a set of free-form tags to group and identify a subset\nof their servers. Tags can be for example _webserver_, _database_, _PROD_, _QA_, _DEV_ etc.\n\nA server can have several tags. API can be used to return only servers\nmatching specified tags. Note that all operations changing server's\nstate or attributes must still be done individually for each server\nUUID, tags can be used only to return a list of servers.\n\n__Warning! Consider using labels instead of tags:__ Tags are an access control feature and only available for a limited set of resources. Use labels to describe and filter your resources. Documentation for labels can be found on the resource specific documentation pages.\n\nCreating and modifying tags is allowed **only by main account**. Subaccounts\nhave access only to listing tags and tagged servers they are granted\naccess to.\n" + }, + { + "name": "timezone", + "description": "Timezone management" + }, + { + "name": "account-tokens", + "description": "UpCloud API calls can be authenticated with HTTP Bearer (token) authentication. The token API requests below allow creation, management and deletion of bearer tokens.\n\nThe bearer token can be used for authentication by setting the Authorization header of the API request:\n\n`Authorization: Bearer ucat_01DQE3AJDEBFEKECFM558TGH2F`.\n" + }, + { + "name": "object-storage-2", + "description": "Object Storage is a computer data storage architecture that manages data as objects as opposed to block storage which manages data as blocks within sectors and tracks. Managed Object storage is commonly used to manage large amounts of unstructured data for example storing large datasets like photos, music, or files in online collaboration services. All customers data is encrypted by default using encryption at rest.\n\nManaged Object Storage API commands allow creation, management and deletion of Object Storage devices as well as viewing Object Storage network data usage. Managed Object Storage is fully S3-compliant allowing file and bucket management using existing S3 clients.\n\nAPI follows JSON Merge Patch semantics. Note when modifying nested structures payload should contain entire array, which in a sense is PUT within PATCH for them. JSON Merge Patch uses null to explicitly indicate property deletion while absent properties are ignored, i.e. not modified." + }, + { + "name": "file-storage", + "description": "File Storage is a scalable file storage service that provides shared access to files over a network using the NFS protocol.\n\nThe File Storage API allows the creation, configuration, and deletion of file storage service, as well as monitoring of network and storage usage.\n\nAPI follows JSON Merge Patch semantics. Note when modifying nested structures payload should contain entire array, which in a sense is PUT within PATCH for them. JSON Merge Patch uses null to explicitly indicate property deletion while absent properties are ignored, i.e. not modified." + }, + { + "name": "database", + "description": "A Managed Database is a database-as-a-service that lets customers use a database without setting up servers or database software. The service configuration defines high availability, resources, the database software version, and security parameters.\n\nThe Managed Database API lets you manage instances of supported open-source engines, including MySQL, PostgreSQL, Valkey, and OpenSearch. Managed Databases are available in every UpCloud zone. All request and response payloads are JSON." + }, + { + "name": "gateway", + "description": "UpCloud Gateway API. Allows creation, management and deletion of gateways." + }, + { + "name": "load-balancer", + "description": "A Managed load balancer works as the network level frontend of customer application by directing connections to the backend servers.\n\nThe Managed load balancer API allows customer to manage their services. Managed load balancers are available in every UpCloud zone. The API requests and responses payload are in JSON format only.\n\nAPI follows JSON Merge Patch semantics. Note when modifying nested structures payload should contain entire array, which in a sense is PUT within PATCH for them. JSON Merge Patch uses null to explicitly indicate property deletion while absent properties are ignored, i.e. not modified.\n\nIt is recommended to use the hostnames of your load balancer when directing your domain to it. This ensures utilization of all addresses that the load balancer might possess.\n\nFor the subdomains of your domain, use CNAME. For the primary domain, you might need to use ALIAS, or whatever is supported by your DNS provider." + }, + { + "name": "firewall-ruleset", + "description": "UpCloud SDN Firewall API. Allows creation, management and deletion of Firewall rulesets and Firewall rules." + }, + { + "name": "vnc_keymap", + "description": "VNC keymap management" + }, + { + "name": "zone", + "description": "Operations for managing zones." + } + ], + "x-upcloud-visibility": "public" +} diff --git a/generator/scripts/generate.sh b/generator/scripts/generate.sh new file mode 100755 index 00000000..b2ee0616 --- /dev/null +++ b/generator/scripts/generate.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +set -euo pipefail + +echo "== PHP SDK GENERATION ==" + +SPEC_PATH="generator/openapi/spec.json" +PATCHED_SPEC_PATH="generator/openapi/spec.patched.json" + +# Install Fern CLI if not available +if ! command -v fern &> /dev/null; then + echo "Installing Fern CLI..." + npm install -g fern-api +fi + +# Ensure spec is present +if [ ! -f "$SPEC_PATH" ]; then + echo "ERROR: Missing spec.json" + exit 1 +fi + +if ! command -v python3 &> /dev/null; then + echo "ERROR: python3 not found" + exit 1 +fi + +echo "Patching OpenAPI spec for PHP compatibility..." +python3 generator/scripts/patch_openapi.py "$SPEC_PATH" "$PATCHED_SPEC_PATH" + +# Run Fern generation +cd fern + +# Validate the patched spec and Fern configuration before generation. +fern check + +# Generate PHP SDK +fern generate --local + +cd - + +echo "Setting Packagist package metadata..." +php -r ' +$path = "fern/sdk/composer.json"; +$manifest = json_decode(file_get_contents($path), true, 512, JSON_THROW_ON_ERROR); +$package = json_decode(file_get_contents("composer.json"), true, 512, JSON_THROW_ON_ERROR); +foreach (["name", "description", "license", "homepage", "support"] as $field) { + $manifest[$field] = $package[$field]; +} +unset($manifest["version"]); +file_put_contents($path, json_encode($manifest, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL); +' + +echo "Applying the maintained README to the generated package..." +cp README.md fern/sdk/README.md + +echo "Patching generated PHP for strict null checks..." +python3 generator/scripts/patch_generated_php.py fern/sdk/src + +echo "Generation complete." \ No newline at end of file diff --git a/generator/scripts/patch_generated_php.py b/generator/scripts/patch_generated_php.py new file mode 100644 index 00000000..49b49efd --- /dev/null +++ b/generator/scripts/patch_generated_php.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python3 +"""Apply compatibility fixes to generated PHP source files.""" + +import re +import sys +from pathlib import Path + +# Matches "!= null" / "null !=" while excluding "!==" / "=== null", which are already strict. +LOOSE_NULL_PATTERN = re.compile(r"!=(?!=)\s*null\b|\bnull\s*!=(?!=)") + + +def find_loose_null_checks(source_directory: Path) -> dict[Path, list[int]]: + """Return 1-based line numbers of loose null comparisons, keyed by file.""" + matches: dict[Path, list[int]] = {} + for path in sorted(source_directory.rglob("*.php")): + lines = path.read_text(encoding="utf-8").splitlines() + hits = [line_no for line_no, line in enumerate(lines, start=1) if LOOSE_NULL_PATTERN.search(line)] + if hits: + matches[path] = hits + return matches + + +def patch_strict_null_checks(source_directory: Path) -> dict[Path, list[int]]: + """Rewrite loose null comparisons to strict ones. Returns the locations patched.""" + before = find_loose_null_checks(source_directory) + for path in before: + source = path.read_text(encoding="utf-8") + patched = LOOSE_NULL_PATTERN.sub(lambda m: m.group(0).replace("!=", "!==", 1), source) + path.write_text(patched, encoding="utf-8") + return before + + +def verify_patch(source_directory: Path, expected: dict[Path, list[int]]) -> list[str]: + """Confirm every previously-flagged line was actually converted, and none remain.""" + errors = [] + + still_loose = find_loose_null_checks(source_directory) + for path, line_numbers in still_loose.items(): + errors.append(f"{path}: still loose at line(s) {line_numbers}") + + for path, line_numbers in expected.items(): + current_lines = path.read_text(encoding="utf-8").splitlines() + for line_no in line_numbers: + line = current_lines[line_no - 1] + if "!==" not in line: + errors.append(f"{path}:{line_no}: expected strict comparison, got: {line.strip()}") + + return errors + + +def main() -> int: + if len(sys.argv) != 2: + print("Usage: patch_generated_php.py ", file=sys.stderr) + return 2 + + source_directory = Path(sys.argv[1]) + if not source_directory.is_dir(): + print(f"ERROR: generated source directory not found: {source_directory}", file=sys.stderr) + return 2 + + before = find_loose_null_checks(source_directory) + total_before = sum(len(line_numbers) for line_numbers in before.values()) + print(f"Found {total_before} loose null comparison(s) in {len(before)} file(s):") + for path, line_numbers in sorted(before.items()): + print(f" {path.relative_to(source_directory)}: line(s) {line_numbers}") + + if total_before == 0: + return 0 + + patch_strict_null_checks(source_directory) + + errors = verify_patch(source_directory, before) + if errors: + print("ERROR: verification failed for the following locations:", file=sys.stderr) + for error in errors: + print(f" {error}", file=sys.stderr) + return 1 + + print(f"Verified {total_before} loose null check(s) in {len(before)} file(s) are now strict") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) \ No newline at end of file diff --git a/generator/scripts/patch_openapi.py b/generator/scripts/patch_openapi.py new file mode 100644 index 00000000..7ad1a9f2 --- /dev/null +++ b/generator/scripts/patch_openapi.py @@ -0,0 +1,122 @@ +#!/usr/bin/env python3 +"""Apply PHP SDK compatibility fixes to the OpenAPI document.""" + +import json +import sys +from pathlib import Path +from typing import Any + +SORT_ENUM_SCHEMAS = { + "objectStorage2QueryParamSort", + "fileStorageQueryParamSort", + "databaseQueryParamSort", + "gatewayQueryParamSortServices", + "loadBalancerSortServicesParameter", + "loadBalancerMetricsSortParameter", +} + +HTTP_METHODS = {"get", "put", "post", "delete", "options", "head", "patch", "trace"} + + +def patch_firewall_rule_position(spec: dict[str, Any]) -> bool: + """Make numeric firewall-rule path positions usable by PHP wire-test generation.""" + schemas = spec.get("components", {}).get("schemas", {}) + schema = schemas.get("firewallRulesetServerFirewallRulePosition") + if not isinstance(schema, dict) or schema.get("type") != "string": + return False + + schema["type"] = "integer" + schema.pop("pattern", None) + schema["examples"] = [int(value) for value in schema.get("examples", [])] + return True + + +def patch_sort_enums(spec: dict[str, Any]) -> int: + schemas = spec.get("components", {}).get("schemas", {}) + removed = 0 + + for schema_name in SORT_ENUM_SCHEMAS: + schema = schemas.get(schema_name) + if not isinstance(schema, dict) or not isinstance(schema.get("enum"), list): + continue + + original = schema["enum"] + schema["enum"] = [ + value + for value in original + if not (isinstance(value, str) and value.startswith("-")) + ] + removed += len(original) - len(schema["enum"]) + + return removed + + +def patch_no_content_responses(spec: dict[str, Any]) -> int: + """Remove response bodies from HTTP 204 responses, which cannot contain content.""" + component_responses = spec.get("components", {}).get("responses", {}) + patched = 0 + + for path_item in spec.get("paths", {}).values(): + if not isinstance(path_item, dict): + continue + for method, operation in path_item.items(): + if method not in HTTP_METHODS or not isinstance(operation, dict): + continue + response = operation.get("responses", {}).get("204") + if not isinstance(response, dict): + continue + + target = response + reference = response.get("$ref") + if isinstance(reference, str) and reference.startswith("#/components/responses/"): + response_name = reference.rsplit("/", 1)[-1] + referenced_response = component_responses.get(response_name) + if isinstance(referenced_response, dict): + target = referenced_response + + if "content" in target: + target.pop("content") + patched += 1 + + return patched + + +def main() -> int: + if len(sys.argv) != 3: + print("Usage: patch_openapi.py ", file=sys.stderr) + return 2 + + input_path = Path(sys.argv[1]) + output_path = Path(sys.argv[2]) + + try: + with input_path.open(encoding="utf-8") as source: + spec = json.load(source) + except FileNotFoundError: + print(f"ERROR: input spec not found: {input_path}", file=sys.stderr) + return 2 + except json.JSONDecodeError as error: + print(f"ERROR: input spec is not valid JSON: {error}", file=sys.stderr) + return 2 + + if not isinstance(spec, dict): + print("ERROR: OpenAPI document must be a JSON object", file=sys.stderr) + return 2 + + removed = patch_sort_enums(spec) + firewall_position_patched = patch_firewall_rule_position(spec) + no_content_responses_patched = patch_no_content_responses(spec) + output_path.parent.mkdir(parents=True, exist_ok=True) + with output_path.open("w", encoding="utf-8") as destination: + json.dump(spec, destination, indent=2) + destination.write("\n") + + print(f"Removed {removed} descending sort enum values") + if firewall_position_patched: + print("Patched firewall rule position schema for PHP wire-test generation") + print(f"Removed content from {no_content_responses_patched} HTTP 204 responses") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/generator/scripts/prepare-release.sh b/generator/scripts/prepare-release.sh new file mode 100644 index 00000000..0f23f346 --- /dev/null +++ b/generator/scripts/prepare-release.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -euo pipefail + +SDK_DIR="fern/sdk" + +if [ ! -f "$SDK_DIR/composer.json" ]; then + echo "ERROR: $SDK_DIR/composer.json not found. SDK not generated?" + exit 1 +fi + +echo "== Validating composer.json (non-strict) ==" +composer validate --no-check-publish +composer validate --no-check-publish --working-dir "$SDK_DIR" + +echo "== Creating SDK package ==" +ARTIFACT="php-sdk.tar.gz" +mkdir -p generator/release-artifacts +git archive --format=tar.gz --prefix=php-sdk/ \ + --output="generator/release-artifacts/$ARTIFACT" HEAD + +echo "Created artifact: generator/release-artifacts/$ARTIFACT" diff --git a/generator/scripts/prepare_docs.py b/generator/scripts/prepare_docs.py new file mode 100644 index 00000000..a8ba1a05 --- /dev/null +++ b/generator/scripts/prepare_docs.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python3 +"""Adapt Fern's GitHub Markdown for Jekyll without modifying the SDK reference.""" +import argparse +import re +from pathlib import Path + + +def services(source): + return re.findall(r'^## ([a-zA-Z0-9_-]+)$', source, re.MULTILINE) + + +def prepare_reference(source, version): + # Rebuild metadata when processing an already prepared snapshot. + source = re.sub(r'\A---\n.*?\n---\n', '', source, count=1, flags=re.DOTALL) + areas = services(source) + output = [] + fenced = False + for line in source.splitlines(): + if line.startswith('```'): + fenced = not fenced + if not fenced: + if re.fullmatch(r'', line): + continue + match = re.fullmatch(r'
(.*)', line) + if match: + output.extend(['
', + '' + match[1] + '', '']) + continue + if line == '
': + output.extend(['', line, '']) + continue + if line.startswith('## ') and line[3:] in areas: + output.extend([line, '{:#' + line[3:] + 'Anchor}', '']) + continue + if re.fullmatch(r'\{:#.*Anchor\}', line): + continue + if line == '# Reference': + line = '# API reference' + line = re.sub(r'^#### [πŸ“πŸ”Œβš™οΈ]+\s*', '#### ', line) + output.append(line) + # Do not collapse whitespace inside code examples. + compact = [] + fenced = False + for line in output: + if line.startswith('```'): + fenced = not fenced + if not fenced and not line.strip() and compact and not compact[-1].strip(): + continue + compact.append(line if fenced else line.rstrip()) + body = '\n'.join(compact).strip() + '\n' + metadata = ['---', 'layout: sdk', f'title: "API reference Β· {version}"', + f'version: "{version}"', 'services:'] + metadata.extend(f' - {area}' for area in areas) + return '\n'.join(metadata + ['---', '']) + body + + +def prepare_index(docs): + areas = services((docs / 'latest/reference.md').read_text()) + versions = sorted((p.name for p in docs.iterdir() + if re.fullmatch(r'v\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?', p.name) and + (p / 'reference.md').exists()), + key=lambda value: (tuple(map(int, value[1:].split('-')[0].split('.'))), '-' not in value, value), reverse=True) + lines = ['---', 'layout: sdk', 'title: UpCloud PHP SDK', '---', + '# UpCloud PHP SDK', '', + 'A typed PHP client for the UpCloud API. Browse service methods, request parameters, and PHP usage examples.', '', + '## Getting started', '', 'Requires PHP **8.1 or later** and Composer.', '', + '```sh', 'composer require upcloudltd/upcloud-php-api', '```', '', + '```php', 'account->details();', '```', '', + 'Set `UPCLOUD_TOKEN` to your API token before running the example.', '', + '[Installation, authentication, and error handling](https://github.com/UpCloudLtd/upcloud-php-api#requirements)', '', + 'Latest follows the generated SDK on main, including prerelease development. Stable Composer installs do not opt into alpha versions.', '', + '[Legacy v3 source and documentation](https://github.com/UpCloudLtd/upcloud-php-api/tree/v3.0.0)', '', + '## API reference', '', + '[Browse the latest reference](latest/reference.html). Choose a service below to jump to its methods. Expand a method to see its description, usage, and parameters.', '', + '### Services', '', '
', ''] + lines.extend(f'- [{area.replace("_", " ").replace("-", " ").title()}](latest/reference.html#{area}Anchor)' for area in areas) + lines.extend(['', '
', '', '## Tagged releases', '', + 'Versioned SDK reference snapshots. The v0.0.x snapshots predate migration and are not legacy Packagist v1-v3 releases.', '']) + lines.extend(f'- [{version}]({version}/reference.html)' for version in versions) + (docs / 'index.md').write_text('\n'.join(lines) + '\n') + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--docs', type=Path, default=Path('docs')) + parser.add_argument('--source', type=Path, default=Path('fern/sdk/reference.md')) + parser.add_argument('--version', help='Copy the generated reference to latest and this release') + args = parser.parse_args() + if args.version: + if not re.fullmatch(r'v\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?', args.version): + parser.error('version must be a release tag such as v0.0.65') + source = args.source.read_text() + for version in ('latest', args.version): + directory = args.docs / version + directory.mkdir(parents=True, exist_ok=True) + (directory / 'reference.md').write_text(source) + for reference in sorted(args.docs.glob('*/reference.md')): + reference.write_text(prepare_reference(reference.read_text(), reference.parent.name)) + prepare_index(args.docs) + + +if __name__ == '__main__': + main() diff --git a/generator/scripts/publish.sh b/generator/scripts/publish.sh new file mode 100644 index 00000000..1daadec3 --- /dev/null +++ b/generator/scripts/publish.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash +set -euo pipefail + +TAG="${1:-}" +PACKAGE_NAME="upcloudltd/upcloud-php-api" +if [[ ! "$TAG" =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-(alpha|beta|rc)(\.(0|[1-9][0-9]*))?)?$ ]]; then + echo "ERROR: expected vX.Y.Z or an alpha, beta, or rc tag, such as v4.0.0-rc.1" + exit 1 +fi + +if [ -z "${PACKAGIST_USERNAME:-}" ] || [ -z "${PACKAGIST_TOKEN:-}" ]; then + echo "ERROR: PACKAGIST_USERNAME and PACKAGIST_TOKEN must be set" + exit 1 +fi + +if [[ "${GITHUB_REPOSITORY,,}" != upcloudltd/upcloud-php-api ]]; then + echo "ERROR: publication must run from UpCloudLtd/upcloud-php-api" + exit 1 +fi + +if [[ ! "${RELEASE_COMMIT:-}" =~ ^[0-9a-f]{40}$ ]]; then + echo "ERROR: RELEASE_COMMIT must be the full verified release commit" + exit 1 +fi + +echo "== Trigger Packagist update for $PACKAGE_NAME at $TAG ==" + +curl --fail-with-body --silent --show-error --request POST \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer ${PACKAGIST_USERNAME}:${PACKAGIST_TOKEN}" \ + -d "$(php -r 'echo json_encode(["repository" => "https://github.com/" . getenv("GITHUB_REPOSITORY")], JSON_THROW_ON_ERROR | JSON_UNESCAPED_SLASHES);')" \ + https://packagist.org/api/update-package | + php -r '$response = json_decode(stream_get_contents(STDIN), true); if (($response["status"] ?? null) !== "success") { fwrite(STDERR, "Packagist rejected the update request\n"); exit(1); }' + +echo "Packagist update requested; waiting for $TAG to become available..." +for attempt in {1..20}; do + if curl --fail --silent --show-error \ + "https://repo.packagist.org/p2/${PACKAGE_NAME}.json" | + php -r ' + $metadata = json_decode(stream_get_contents(STDIN), true); + if (!is_array($metadata)) { + exit(1); + } + $version = []; + foreach (($metadata["packages"]["upcloudltd/upcloud-php-api"] ?? []) as $entry) { + $version = array_replace($version, $entry); + foreach ($version as $key => $value) { + if ($value === "__unset") { + unset($version[$key]); + } + } + if (($version["version"] ?? null) !== $argv[1]) { + continue; + } + $repository = "https://github.com/" . getenv("GITHUB_REPOSITORY"); + $commit = getenv("RELEASE_COMMIT"); + $source = $version["source"] ?? []; + $dist = $version["dist"] ?? []; + if (($source["type"] ?? null) !== "git" + || strtolower(preg_replace("{\\.git$}", "", $source["url"] ?? "")) !== strtolower($repository) + || ($source["reference"] ?? null) !== $commit + || ($dist["type"] ?? null) !== "zip" + || ($dist["reference"] ?? null) !== $commit + || strtolower($dist["url"] ?? "") !== strtolower("https://api.github.com/repos/" . getenv("GITHUB_REPOSITORY") . "/zipball/" . $commit)) { + fwrite(STDERR, "Registry version does not match the verified release source and archive\n"); + exit(1); + } + $receipt = [ + "package" => "upcloudltd/upcloud-php-api", + "version" => $argv[1], + "repository" => $repository, + "commit" => $commit, + "source" => $source, + "dist" => $dist, + "verified_at" => gmdate(DATE_ATOM), + ]; + file_put_contents("publication-receipt.json", json_encode($receipt, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL); + exit(0); + } + exit(1); + ' "$TAG"; then + echo "Verified $PACKAGE_NAME $TAG on Packagist." + exit 0 + fi + if [[ "$attempt" -lt 20 ]]; then + sleep 15 + fi +done + +echo "ERROR: $PACKAGE_NAME $TAG did not appear on Packagist within five minutes." +exit 1 diff --git a/generator/tests/check_docs_site.py b/generator/tests/check_docs_site.py new file mode 100644 index 00000000..2ff5abea --- /dev/null +++ b/generator/tests/check_docs_site.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python3 +"""Check actual Jekyll output, including link targets and native disclosures.""" +import re +import sys +from html.parser import HTMLParser +from pathlib import Path +from urllib.parse import unquote, urlsplit + + +class Page(HTMLParser): + def __init__(self, html): + super().__init__() + self.ids = set() + self.links = [] + self.methods = [] + self.current = None + self.stack = [] + self.feed(html) + assert self.current is None, 'Unclosed method disclosure' + + def handle_starttag(self, tag, attrs): + attrs = dict(attrs) + if 'id' in attrs: + self.ids.add(attrs['id']) + if tag == 'a' and 'href' in attrs: + self.links.append(attrs['href']) + if tag == 'details': + assert self.current is None, 'Unexpected nested method disclosure' + self.current = {'summary': 0, 'pre': 0, 'description': False} + if self.current is not None and tag in ('summary', 'pre'): + self.current[tag] += 1 + if tag not in ('meta', 'link', 'br', 'hr', 'img', 'input', 'wbr'): + self.stack.append(tag) + + def handle_endtag(self, tag): + if tag == 'details': + assert self.current is not None + self.methods.append(self.current) + self.current = None + if tag in self.stack: + self.stack = self.stack[:len(self.stack) - 1 - self.stack[::-1].index(tag)] + + def handle_data(self, data): + assert not re.search(r'', data), 'Leaked HTML markup' + if self.current is not None and 'h4' in self.stack and data.strip() == 'Description': + self.current['description'] = True + + +def check(site, source): + pages = {p.relative_to(site).as_posix(): Page(p.read_text()) for p in site.rglob('*.html')} + assert 'index.html' in pages + checked = 0 + for name, page in pages.items(): + for href in page.links: + url = urlsplit(href) + if url.scheme or url.netloc: + continue + path = unquote(url.path) + if path.startswith('/upcloud-php-api/'): + path = path[len('/upcloud-php-api/'):] + elif path.startswith('/'): + raise AssertionError(f'Link missing project base path: {href}') + elif path: + path = (Path(name).parent / path).as_posix() + else: + path = name + if not path or path.endswith('/'): + path += 'index.html' + assert path in pages, (name, href, 'missing page') + if url.fragment: + assert unquote(url.fragment) in pages[path].ids, (name, href, 'missing anchor') + checked += 1 + if name.endswith('/reference.html'): + markdown = (source / name.replace('.html', '.md')).read_text() + assert len(page.methods) == markdown.count('
]*>(.*?)
', markdown, re.S) + assert len(sources) == len(page.methods), name + for method, source_method in zip(page.methods, sources): + signature = re.search(r']*>(.*?)', source_method, re.S) + label = signature[1] if signature else '(missing summary)' + assert method['summary'] == 1, (name, label, 'Expected one summary') + assert method['pre'] >= 1, (name, label, 'Missing code example') + if re.search(r'^#### Description\s*$', source_method, re.M): + assert method['description'], (name, label, 'Description lost during rendering') + print(f'Checked {len(pages)} pages, {checked} local links, and ' + f'{sum(len(p.methods) for p in pages.values())} method disclosures.') + + +if __name__ == '__main__': + check(Path(sys.argv[1]), Path(sys.argv[2] if len(sys.argv) > 2 else 'docs')) diff --git a/generator/tests/check_endpoint_coverage.py b/generator/tests/check_endpoint_coverage.py new file mode 100644 index 00000000..0661b366 --- /dev/null +++ b/generator/tests/check_endpoint_coverage.py @@ -0,0 +1,108 @@ +#!/usr/bin/env python3 +"""Check that OpenAPI operations have matching generated PHP client methods.""" + +import json +import re +import sys +from pathlib import Path +from typing import Any + +HTTP_METHODS = {"delete", "get", "head", "options", "patch", "post", "put", "trace"} +FUNCTION_PATTERN = re.compile(r"^ public function ([A-Za-z_][A-Za-z0-9_]*)\(", re.MULTILINE) +PATH_PATTERN = re.compile(r'\bpath: "([^"]+)"') +METHOD_PATTERN = re.compile(r"\bmethod: HttpMethod::([A-Z]+)") +PATH_PARAMETER_PATTERN = re.compile(r"\{(?:\$)?[^}]+\}") + + +def normalize_path(path: str) -> str: + path = path.lstrip("/") + return PATH_PARAMETER_PATTERN.sub("{}", path) + + +def load_spec(path: Path) -> dict[str, Any]: + with path.open(encoding="utf-8") as source: + document = json.load(source) + if not isinstance(document, dict): + raise ValueError("OpenAPI document must be a JSON object") + return document + + +def openapi_operations(spec: dict[str, Any]) -> list[dict[str, str]]: + operations = [] + for path, path_item in spec.get("paths", {}).items(): + if not isinstance(path_item, dict): + continue + for method, operation in path_item.items(): + if method not in HTTP_METHODS or not isinstance(operation, dict): + continue + operation_id = operation.get("operationId") + if isinstance(operation_id, str): + operations.append({"id": operation_id, "method": method.upper(), "path": normalize_path(path)}) + return operations + + +def generated_operations(source_directory: Path) -> list[dict[str, str]]: + operations = [] + for path in sorted(source_directory.glob("*/*Client.php")): + content = path.read_text(encoding="utf-8") + functions = list(FUNCTION_PATTERN.finditer(content)) + for index, function in enumerate(functions): + name = function.group(1) + if name == "__construct": + continue + end = functions[index + 1].start() if index + 1 < len(functions) else len(content) + block = content[function.start():end] + path_match = PATH_PATTERN.search(block) + method_match = METHOD_PATTERN.search(block) + if path_match and method_match: + operations.append({ + "id": name, + "method": method_match.group(1), + "path": normalize_path(path_match.group(1)), + }) + return operations + + +def check_coverage(spec_path: Path, source_directory: Path) -> list[str]: + expected = openapi_operations(load_spec(spec_path)) + generated = generated_operations(source_directory) + generated_by_contract = { + (operation["method"], operation["path"]): operation for operation in generated + } + errors = [] + + for operation in expected: + if (operation["method"], operation["path"]) not in generated_by_contract: + errors.append(f"missing method for {operation['id']}: {operation['method']} {operation['path']}") + + expected_contracts = {(operation["method"], operation["path"]) for operation in expected} + for operation in generated: + contract = (operation["method"], operation["path"]) + if contract not in expected_contracts: + errors.append( + f"unexpected generated method {operation['id']}: " + f"{operation['method']} {operation['path']}" + ) + + return errors + + +def main() -> int: + if len(sys.argv) != 3: + print("Usage: check_endpoint_coverage.py ", file=sys.stderr) + return 2 + + errors = check_coverage(Path(sys.argv[1]), Path(sys.argv[2])) + if errors: + print(f"Endpoint coverage failed: {len(errors)} issue(s)", file=sys.stderr) + for error in errors: + print(f"- {error}", file=sys.stderr) + return 1 + + operation_count = len(openapi_operations(load_spec(Path(sys.argv[1])))) + print(f"Endpoint coverage passed: {operation_count} OpenAPI operations") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/generator/tests/generated_model_fixtures.php b/generator/tests/generated_model_fixtures.php new file mode 100644 index 00000000..80b9ed83 --- /dev/null +++ b/generator/tests/generated_model_fixtures.php @@ -0,0 +1,50 @@ +toJson(), true, 512, JSON_THROW_ON_ERROR); + $expected = json_decode($json, true, 512, JSON_THROW_ON_ERROR); + $expected = array_filter($expected, static fn ($value): bool => $value !== null); + assert_fixture($encoded === $expected, "{$fixtureName} round-trip changed the JSON shape"); +} + +$storageJson = '{"access":"private","encrypted":"no","labels":[{"key":"team","value":"platform"}],"license":0,"backup_rule":{},"part_of_plan":null,"servers":{"server":[]},"size":10240,"state":"online","tier":"maxiops","title":"Ubuntu 24.04","type":"normal","uuid":"00000000-0000-0000-0000-000000000001","zone":"fi-hel1"}'; +assert_json_round_trip('storage details', $storageJson, StorageDetails::class); + +$storage = StorageDetails::fromJson($storageJson); +assert_fixture($storage->labels[0] instanceof StorageLabel, 'Storage label was not deserialized as a generated model'); +assert_fixture($storage->servers->server === [], 'Storage servers were not deserialized as a generated model'); +assert_fixture($storage->backupRule === [], 'Empty storage backup rule was not preserved'); +assert_fixture($storage->partOfPlan === null, 'Nullable storage field was not preserved'); + +$databaseJson = '{"state_error":{"node-1":"unavailable"}}'; +assert_json_round_trip('database service information', $databaseJson, DatabaseServiceInformationResponse::class); +$database = DatabaseServiceInformationResponse::fromJson($databaseJson); +assert_fixture($database->stateError === ['node-1' => 'unavailable'], 'Database state error map was not deserialized correctly'); + +$maintenanceJson = '{"dow":"Monday","time":"02:00:00","pending_updates":[]}'; +assert_json_round_trip('maintenance window', $maintenanceJson, DatabaseMaintenanceWindowResponse::class); +$maintenance = DatabaseMaintenanceWindowResponse::fromJson($maintenanceJson); +assert_fixture($maintenance->time === '02:00:00', 'Maintenance time string was not preserved'); + +assert_fixture(StorageSortBy::Created->value === 'created', 'Generated enum wire value is incorrect'); + +printf("Generated model fixture checks passed: nested objects, arrays, maps, unions, nullables, time strings, and enums\n"); diff --git a/generator/tests/generated_request_behavior.php b/generator/tests/generated_request_behavior.php new file mode 100644 index 00000000..d108e7ac --- /dev/null +++ b/generator/tests/generated_request_behavior.php @@ -0,0 +1,102 @@ + 'https://api.example.test', + 'client' => new Client(['handler' => $handler]), + ], + ); +} + +$mockHandler = new MockHandler(); +$client = mock_client($mockHandler); + +$mockHandler->append(new Response(200, [], json_encode(['storages' => ['storage' => []]], JSON_THROW_ON_ERROR))); +$client->storage->getStorageList(new GetStorageListRequest([ + 'label' => 'team name', + 'search' => 'ubuntu/24', + 'sortBy' => 'created', + 'orderBy' => 'desc', + 'limit' => 10, + 'offset' => 20, +])); + +$request = $mockHandler->getLastRequest(); +assert_test($request->getMethod() === 'GET', 'Expected GET request for storage list'); +assert_test( + (string)$request->getUri() === 'https://api.example.test/1.3/storage?label=team+name&search=ubuntu%2F24&sort_by=created&order_by=desc&limit=10&offset=20', + 'Storage list request did not encode path and query parameters as expected: ' . $request->getUri(), +); +assert_test($request->getHeaderLine('Authorization') === 'Bearer smoke-test-token', 'Bearer authentication header is missing'); + +$mockHandler->append(new Response(200, [], json_encode(['tag' => [ + 'name' => 'production', + 'description' => 'Production servers', + 'servers' => [], +]], JSON_THROW_ON_ERROR))); +$client->tag->modifyTag( + 'production', + new ModifyTagRequest([ + 'body' => new Tag([ + 'tag' => new TagTag([ + 'name' => 'production', + 'description' => 'Production servers', + 'servers' => new TagServers(), + ]), + ]), + ]), +); + +$request = $mockHandler->getLastRequest(); +assert_test($request->getMethod() === 'PUT', 'Expected PUT request for tag modification'); +assert_test((string)$request->getUri() === 'https://api.example.test/1.3/tag/production', 'Tag request path is incorrect'); +assert_test( + (string)$request->getBody() === '{"tag":{"description":"Production servers","name":"production","servers":[]}}', + 'Tag request body is incorrect: ' . $request->getBody(), +); + +$mockHandler->append(new Response(404, [], '{"error":"missing"}')); +try { + $client->ipAddress->deleteIpAddress('192.0.2.10'); + fail_test('Expected a 404 response to throw UpcloudApiException'); +} catch (UpcloudApiException $exception) { + assert_test($exception->getCode() === 404, 'API exception status code is incorrect'); + assert_test($exception->getBody() === '{"error":"missing"}', 'API exception body is incorrect'); +} +$request = $mockHandler->getLastRequest(); +assert_test($request->getMethod() === 'DELETE', 'Expected DELETE request for IP address deletion'); +assert_test((string)$request->getUri() === 'https://api.example.test/1.3/ip_address/192.0.2.10', 'IP address path is incorrect'); + +printf("Generated request behavior checks passed: query, JSON body, auth, and errors\n"); diff --git a/generator/tests/generated_sdk_smoke.php b/generator/tests/generated_sdk_smoke.php new file mode 100644 index 00000000..88a6ebf8 --- /dev/null +++ b/generator/tests/generated_sdk_smoke.php @@ -0,0 +1,98 @@ +isFile() && $file->getExtension() === 'php') { + $phpFiles[] = $file->getPathname(); + } +} + +sort($phpFiles); + +if ($phpFiles === []) { + throw new RuntimeException('No generated PHP files found'); +} + +// Check syntax and load every generated source file with Composer available. +foreach ($phpFiles as $file) { + exec('php -l ' . escapeshellarg($file), $output, $status); + if ($status !== 0) { + throw new RuntimeException( + "PHP syntax check failed: {$file}\n" . implode("\n", $output) + ); + } + require_once $file; +} + +// Check enum case names and backing values for collisions that break PHP or serialization. +$enumCount = 0; +foreach (get_declared_classes() as $className) { + if (!str_starts_with($className, 'Upcloud\\') || !enum_exists($className)) { + continue; + } + + $enum = new ReflectionEnum($className); + $caseNames = []; + $backingValues = []; + + foreach ($enum->getCases() as $case) { + $caseName = $case->getName(); + if (isset($caseNames[$caseName])) { + throw new RuntimeException("Duplicate enum case {$className}::{$caseName}"); + } + $caseNames[$caseName] = true; + + if ($enum->isBacked()) { + $value = $case->getBackingValue(); + if (isset($backingValues[$value])) { + throw new RuntimeException("Duplicate backing value {$className}: {$value}"); + } + $backingValues[$value] = true; + } + } + $enumCount++; +} + +// Check that the root client initializes every generated service client. +$client = new UpcloudClient( + token: 'smoke-test-token', + options: ['client' => new Client()], +); +$clientReflection = new ReflectionClass($client); +$serviceClientCount = 0; + +foreach ($clientReflection->getProperties() as $property) { + if (!$property->isPublic() || !str_ends_with($property->getType()?->getName() ?? '', 'Client')) { + continue; + } + + $expectedClass = $property->getType()->getName(); + $value = $property->getValue($client); + if (!$value instanceof $expectedClass) { + throw new RuntimeException("Service client property is not initialized: {$property->getName()}"); + } + $serviceClientCount++; +} + +printf( + "Generated SDK smoke checks passed: %d PHP files, %d enums, %d service clients\n", + count($phpFiles), + $enumCount, + $serviceClientCount, +); diff --git a/generator/tests/release.test.mjs b/generator/tests/release.test.mjs new file mode 100644 index 00000000..d9857959 --- /dev/null +++ b/generator/tests/release.test.mjs @@ -0,0 +1,230 @@ +import assert from 'node:assert/strict'; +import { execFileSync, spawnSync } from 'node:child_process'; +import { mkdtempSync, readFileSync, writeFileSync, mkdirSync, existsSync, rmSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import test from 'node:test'; + +const root = fileURLToPath(new URL('../../', import.meta.url)); +const publisher = resolve(root, 'generator/scripts/publish.sh'); +const commit = 'a'.repeat(40); +const repository = 'UpCloudLtd/upcloud-php-api'; + +function workspace(context) { + const directory = mkdtempSync(join(tmpdir(), 'php-release-test-')); + context.after(() => rmSync(directory, { recursive: true, force: true })); + return directory; +} + +function packageVersion(overrides = {}) { + return { + version: 'v4.0.0-alpha.1', + source: { type: 'git', url: `https://github.com/${repository}.git`, reference: commit }, + dist: { type: 'zip', url: `https://api.github.com/repos/${repository}/zipball/${commit}`, reference: commit }, + ...overrides, + }; +} + +function publish(context, versions, update = { status: 'success' }) { + const directory = workspace(context); + const bin = join(directory, 'bin'); + mkdirSync(bin); + writeFileSync(join(directory, 'update.json'), JSON.stringify(update)); + writeFileSync(join(directory, 'metadata.json'), JSON.stringify({ + minified: 'composer/2.0', packages: { 'upcloudltd/upcloud-php-api': versions }, + })); + writeFileSync(join(bin, 'curl'), `#!/usr/bin/env bash +set -euo pipefail +if [[ "$*" == *api/update-package* ]]; then + [[ "$*" == *'Authorization: Bearer fixture-user:fixture-token'* ]] + [[ "$*" == *'"repository":"https://github.com/UpCloudLtd/upcloud-php-api"'* ]] + cat "$FIXTURE/update.json" +else + [[ "$*" == *repo.packagist.org/p2/upcloudltd/upcloud-php-api.json* ]] + cat "$FIXTURE/metadata.json" +fi +`, { mode: 0o755 }); + writeFileSync(join(bin, 'sleep'), '#!/usr/bin/env bash\nexit 0\n', { mode: 0o755 }); + const result = spawnSync('bash', [publisher, 'v4.0.0-alpha.1'], { + cwd: directory, encoding: 'utf8', + env: { ...process.env, PATH: `${bin}:${process.env.PATH}`, FIXTURE: directory, + GITHUB_REPOSITORY: repository, RELEASE_COMMIT: commit, + PACKAGIST_USERNAME: 'fixture-user', PACKAGIST_TOKEN: 'fixture-token' }, + }); + return { result, receipt: join(directory, 'publication-receipt.json') }; +} + +test('stable, alpha, beta and rc tags pass format validation; malformed tags do not', () => { + for (const tag of ['v4.0.0', 'v0.0.0', 'v4.0.0-alpha', 'v4.0.0-alpha.0', 'v4.0.0-alpha.1', 'v4.0.0-beta.2', 'v4.0.0-rc.1']) { + const result = spawnSync('bash', [publisher, tag], { + encoding: 'utf8', env: { ...process.env, PACKAGIST_USERNAME: '', PACKAGIST_TOKEN: '' }, + }); + assert.match(result.stdout, /PACKAGIST_USERNAME and PACKAGIST_TOKEN must be set/); + } + for (const tag of ['main', '4.0.0', 'v4.0', 'v4.0.0-dev', 'v4.0.0-alpha.', + 'v4.0.0-rc.foo', 'v4.0.0-alpha.1.extra', 'v4.0.0-alpha.01', 'v04.0.0', 'v4.00.0']) { + const result = spawnSync('bash', [publisher, tag], { encoding: 'utf8' }); + assert.equal(result.status, 1); + assert.match(result.stdout, /expected vX.Y.Z/); + } +}); + +test('workflow validators match the publisher numeric prerelease contract', () => { + const publisherText = readFileSync(publisher, 'utf8'); + const pattern = publisherText.match(/=~ (\^v\S+) \]\]/)[1]; + const release = readFileSync(resolve(root, '.github/workflows/release.yml'), 'utf8'); + const publish = readFileSync(resolve(root, '.github/workflows/publish.yml'), 'utf8'); + const patterns = [...`${release}\n${publish}`.matchAll(/=~ (\^v\S+) \]\]/g)]; + assert.equal(patterns.length, 3); + for (const match of patterns) assert.equal(match[1], pattern); +}); + +test('tag-based documentation PRs explicitly target the default branch', () => { + const workflow = readFileSync(resolve(root, '.github/workflows/update-docs.yml'), 'utf8'); + assert.match(workflow, /ref: \$\{\{ env.VERSION \}\}/); + const creation = workflow.slice(workflow.indexOf('- name: Create PR for docs update')); + assert.match(creation, /base: \$\{\{ github.event.repository.default_branch \}\}/); +}); + +test('verified alpha source and archive produce an evidence-based receipt', context => { + const { result, receipt } = publish(context, [packageVersion()]); + assert.equal(result.status, 0, result.stdout + result.stderr); + const proof = JSON.parse(readFileSync(receipt)); + assert.equal(proof.source.reference, commit); + assert.equal(proof.dist.reference, commit); + assert.equal(proof.version, 'v4.0.0-alpha.1'); +}); + +test('compressed registry metadata inherits unchanged source and dist', context => { + const { result } = publish(context, [packageVersion({ version: 'v4.0.0-alpha.2' }), { version: 'v4.0.0-alpha.1' }]); + assert.equal(result.status, 0, result.stdout + result.stderr); +}); + +test('wrong source, archive, commit, missing version and rejected update never produce receipts', context => { + const cases = [ + [packageVersion({ source: { type: 'git', url: 'https://github.com/attacker/repo.git', reference: commit } })], + [packageVersion({ source: { type: 'git', url: `https://github.com/${repository}.git`, reference: 'b'.repeat(40) } })], + [packageVersion({ dist: { type: 'zip', url: `https://api.github.com/repos/${repository}/zipball/${commit}`, reference: 'b'.repeat(40) } })], + [packageVersion({ dist: { type: 'zip', url: 'https://example.com/archive.zip', reference: commit } })], + [packageVersion({ source: '__unset' })], + [], + ]; + for (const versions of cases) { + const { result, receipt } = publish(context, versions); + assert.notEqual(result.status, 0); + assert.equal(existsSync(receipt), false); + } + const { result, receipt } = publish(context, [packageVersion()], { status: 'error' }); + assert.notEqual(result.status, 0); + assert.equal(existsSync(receipt), false); +}); + +function verificationScript(file, name) { + const lines = readFileSync(resolve(root, file), 'utf8').split('\n'); + const start = lines.findIndex(line => line.trim() === `- name: ${name}`); + assert.ok(start >= 0); + const run = lines.findIndex((line, index) => index > start && line.trim() === 'run: |'); + assert.ok(run > start); + const script = []; + for (const line of lines.slice(run + 1)) { + if (line.trim() && !line.startsWith(' ')) break; + script.push(line.slice(10)); + } + return script.join('\n'); +} + +test('spec-download token is only used after allowlisting the exact GitHub asset endpoint', () => { + const file = '.github/workflows/regenerate.yml'; + const workflow = readFileSync(resolve(root, file), 'utf8'); + assert.ok(workflow.indexOf('Validate trusted spec asset URL') < workflow.indexOf('SPECS_ACCESS_PAT:')); + assert.match(workflow, /--proto '=https' --proto-redir '=https'/); + assert.doesNotMatch(workflow, /--location-trusted|set -eux/); + const script = verificationScript(file, 'Validate trusted spec asset URL'); + const trusted = 'https://api.github.com/repos/UpCloudLtd/upcloud-openapi-spec/releases/assets/123'; + for (const url of [trusted, trusted.replace('/123', '/987654321')]) { + const result = spawnSync('bash', ['-c', script], { encoding: 'utf8', env: { ...process.env, ASSET_URL: url } }); + assert.equal(result.status, 0, result.stderr); + } + for (const url of ['', 'https://example.com/asset', trusted.replace('https:', 'http:'), + trusted.replace('api.github.com', 'api.github.com.attacker.test'), + trusted.replace('api.github.com', 'api.github.com@attacker.test'), + trusted.replace('api.github.com', 'user@api.github.com'), + trusted.replace('api.github.com', 'api.github.com:443'), + trusted.replace('upcloud-openapi-spec', 'another-repo'), + trusted.replace('/123', '/123/other'), `${trusted}?redirect=other`, `${trusted}#other`]) { + const result = spawnSync('bash', ['-c', script], { encoding: 'utf8', env: { ...process.env, ASSET_URL: url } }); + assert.notEqual(result.status, 0, url); + } +}); + +test('release identity must match the completed run, repository and commit before checkout', context => { + const directory = workspace(context); + mkdirSync(join(directory, 'release-identity')); + const script = verificationScript('.github/workflows/publish.yml', 'Validate explicit release identity'); + const identity = { tag: 'v4.0.0-alpha.1', commit, repository, run_id: '123' }; + const check = overrides => { + writeFileSync(join(directory, 'release-identity/release.json'), JSON.stringify({ ...identity, ...overrides })); + return spawnSync('bash', ['-c', script], { cwd: directory, encoding: 'utf8', + env: { ...process.env, RELEASE_COMMIT: commit, RELEASE_RUN_ID: '123', + GITHUB_REPOSITORY: repository, GITHUB_OUTPUT: join(directory, 'outputs') } }); + }; + assert.equal(check({}).status, 0); + for (const overrides of [ + { commit: 'b'.repeat(40) }, { repository: 'attacker/repo' }, + { run_id: '124' }, { tag: 'main' }, { tag: 'v4.0.0-alpha.1\nextra=value' }, + ]) { + assert.notEqual(check(overrides).status, 0); + } +}); + +test('both workflow guards accept annotated main tags and reject unmerged or mismatched commits', context => { + const directory = workspace(context); + const origin = join(directory, 'origin'); + mkdirSync(origin); + const git = (cwd, ...args) => execFileSync('git', args, { cwd, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] }).trim(); + git(origin, 'init', '-b', 'main'); + git(origin, 'config', 'user.name', 'Release test'); + git(origin, 'config', 'user.email', 'release-test@example.invalid'); + git(origin, 'commit', '--allow-empty', '-m', 'trusted'); + const trusted = git(origin, 'rev-parse', 'HEAD'); + git(origin, 'tag', '-a', 'v4.0.0-alpha.1', '-m', 'alpha'); + git(origin, 'switch', '-c', 'unmerged'); + git(origin, 'commit', '--allow-empty', '-m', 'untrusted'); + const untrusted = git(origin, 'rev-parse', 'HEAD'); + git(origin, 'tag', '-a', 'v4.0.0-beta.1', '-m', 'beta'); + git(origin, 'switch', 'main'); + const checkout = join(directory, 'checkout'); + git(directory, 'clone', origin, checkout); + const guards = [ + ['.github/workflows/release.yml', 'Verify tag is on the default branch'], + ['.github/workflows/publish.yml', 'Verify release tag and commit are on the default branch'], + ]; + for (const [file, name] of guards) { + const script = verificationScript(file, name); + const check = (tag, sha) => { + git(checkout, 'checkout', '--detach', sha); + return spawnSync('bash', ['-c', script], { cwd: checkout, encoding: 'utf8', + env: { ...process.env, DEFAULT_BRANCH: 'main', RELEASE_TAG: tag, RELEASE_COMMIT: sha, + GITHUB_REF: `refs/tags/${tag}`, GITHUB_SHA: sha, GH_TOKEN: 'fixture-token' } }); + }; + const valid = check('v4.0.0-alpha.1', trusted); + assert.equal(valid.status, 0, valid.stdout + valid.stderr); + assert.notEqual(check('v4.0.0-beta.1', untrusted).status, 0); + assert.notEqual(check('v4.0.0-beta.1', trusted).status, 0); + assert.notEqual(check('not-a-version', trusted).status, 0); + } +}); + +test('default-branch publisher verifies run-bound identity and has no pre-verification Packagist token', () => { + const workflow = readFileSync(resolve(root, '.github/workflows/publish.yml'), 'utf8'); + assert.doesNotMatch(workflow, /head_branch|environment:/); + assert.match(workflow, /workflow_run:/); + assert.match(workflow, /run-id: \$\{\{ github.event.workflow_run.id \}\}/); + assert.ok(workflow.indexOf('Validate explicit release identity') < workflow.indexOf('Check out the exact release commit')); + assert.ok(workflow.indexOf('Verify release tag and commit') < workflow.indexOf('PACKAGIST_TOKEN: ${{ secrets.')); + const release = readFileSync(resolve(root, '.github/workflows/release.yml'), 'utf8'); + assert.match(release, /name: sdk-release-identity/); + assert.match(release, /continue-on-error: true/); + assert.match(release, /make_latest:.*'false'/); +}); \ No newline at end of file diff --git a/generator/tests/test_check_docs_site.py b/generator/tests/test_check_docs_site.py new file mode 100644 index 00000000..99a851b5 --- /dev/null +++ b/generator/tests/test_check_docs_site.py @@ -0,0 +1,50 @@ +"""Descriptions are optional, but must survive rendering when provided.""" +import importlib.util +import tempfile +import unittest +from pathlib import Path + +spec = importlib.util.spec_from_file_location( + 'check_docs_site', Path(__file__).with_name('check_docs_site.py')) +site_check = importlib.util.module_from_spec(spec) +spec.loader.exec_module(site_check) + + +class CheckDocsSiteTests(unittest.TestCase): + def test_project_links_use_the_destination_base_path(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + site = root / 'site' + site.mkdir() + page = site / 'index.html' + page.write_text('Home') + site_check.check(site, root) + page.write_text('Home') + with self.assertRaisesRegex(AssertionError, 'Link missing project base path'): + site_check.check(site, root) + + def check_fixture(self, source_description, rendered_description): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + for folder in ('site/latest', 'docs/latest'): + (root / folder).mkdir(parents=True) + (root / 'site/index.html').write_text('

SDK

') + (root / 'site/latest/reference.html').write_text( + '
method()' + rendered_description + + '
method();
') + (root / 'docs/latest/reference.md').write_text( + '
method()\n' + + source_description + '\n```php\nmethod();\n```\n
') + site_check.check(root / 'site', root / 'docs') + + def test_description_optional_when_absent_from_source(self): + self.check_fixture('', '') + + def test_present_description_must_render(self): + self.check_fixture('#### Description\nExample.', '

Description

Example.

') + with self.assertRaisesRegex(AssertionError, 'Description lost during rendering'): + self.check_fixture('#### Description\nExample.', '') + + +if __name__ == '__main__': + unittest.main() diff --git a/generator/tests/test_endpoint_coverage.py b/generator/tests/test_endpoint_coverage.py new file mode 100644 index 00000000..29f5fdbb --- /dev/null +++ b/generator/tests/test_endpoint_coverage.py @@ -0,0 +1,68 @@ +import json +import tempfile +import unittest +from pathlib import Path + +from check_endpoint_coverage import check_coverage, normalize_path + + +class EndpointCoverageTest(unittest.TestCase): + def test_normalizes_openapi_and_php_path_parameters(self): + self.assertEqual(normalize_path("/1.3/server/{uuid}"), "1.3/server/{}") + self.assertEqual(normalize_path("1.3/server/{$uuid}"), "1.3/server/{}") + + def test_accepts_renamed_generated_method_when_contract_matches(self): + spec = {"paths": {"/1.3/account": {"get": {"operationId": "accountDetails"}}}} + php = '''offset != null) {}\n", encoding="utf-8") + core.write_text("$headers = $contentType != null ? [] : null;\n", encoding="utf-8") + + found = self.patch_generated_php.find_loose_null_checks(source_directory) + + self.assertEqual(found, {client: [1], core: [1]}) + + def test_ignores_already_strict_comparisons(self): + with tempfile.TemporaryDirectory() as directory: + source_directory = Path(directory) + client = source_directory / "ServiceClient.php" + client.write_text("if ($response === null) {}\nif ($value !== null) {}\n", encoding="utf-8") + + found = self.patch_generated_php.find_loose_null_checks(source_directory) + + self.assertEqual(found, {}) + + def test_patches_and_verifies_every_flagged_location(self): + with tempfile.TemporaryDirectory() as directory: + source_directory = Path(directory) + client = source_directory / "ServiceClient.php" + model = source_directory / "Model.php" + client.write_text("if ($request->offset != null) {}\n", encoding="utf-8") + model.write_text("if (null != $value) {}\n", encoding="utf-8") + + before = self.patch_generated_php.patch_strict_null_checks(source_directory) + + self.assertEqual(before, {client: [1], model: [1]}) + self.assertEqual(client.read_text(encoding="utf-8"), "if ($request->offset !== null) {}\n") + self.assertEqual(model.read_text(encoding="utf-8"), "if (null !== $value) {}\n") + + errors = self.patch_generated_php.verify_patch(source_directory, before) + self.assertEqual(errors, []) + + def test_verify_patch_reports_unconverted_locations(self): + with tempfile.TemporaryDirectory() as directory: + source_directory = Path(directory) + client = source_directory / "ServiceClient.php" + client.write_text("if ($request->offset != null) {}\n", encoding="utf-8") + expected = {client: [1]} + + errors = self.patch_generated_php.verify_patch(source_directory, expected) + + self.assertEqual(len(errors), 2) + + +if __name__ == "__main__": + unittest.main() \ No newline at end of file diff --git a/generator/tests/test_patch_openapi.py b/generator/tests/test_patch_openapi.py new file mode 100644 index 00000000..08fc7101 --- /dev/null +++ b/generator/tests/test_patch_openapi.py @@ -0,0 +1,176 @@ +import importlib.util +import json +import subprocess +import sys +import tempfile +import unittest +from pathlib import Path + + +REPOSITORY_ROOT = Path(__file__).parents[2] +PATCH_SCRIPT = REPOSITORY_ROOT / "generator" / "scripts" / "patch_openapi.py" + + +def load_patch_module(): + module_spec = importlib.util.spec_from_file_location("patch_openapi", PATCH_SCRIPT) + if module_spec is None or module_spec.loader is None: + raise RuntimeError(f"Unable to load {PATCH_SCRIPT}") + module = importlib.util.module_from_spec(module_spec) + module_spec.loader.exec_module(module) + return module + + +class PatchOpenApiTest(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.patch_openapi = load_patch_module() + + def test_removes_descending_values_from_all_target_schemas(self): + spec = { + "components": { + "schemas": { + schema_name: { + "type": "string", + "enum": ["created_at", "-created_at", "name", "-name"], + } + for schema_name in self.patch_openapi.SORT_ENUM_SCHEMAS + } + } + } + + removed = self.patch_openapi.patch_sort_enums(spec) + + self.assertEqual(removed, len(self.patch_openapi.SORT_ENUM_SCHEMAS) * 2) + for schema in spec["components"]["schemas"].values(): + self.assertEqual(schema["enum"], ["created_at", "name"]) + + def test_preserves_non_target_enums_and_non_sort_values(self): + spec = { + "components": { + "schemas": { + "fileStorageQueryParamSort": { + "enum": ["ascending", "-ascending", "other"] + }, + "unrelated": {"enum": ["yes", "-no"]}, + } + } + } + + removed = self.patch_openapi.patch_sort_enums(spec) + + self.assertEqual(removed, 1) + self.assertEqual( + spec["components"]["schemas"]["fileStorageQueryParamSort"]["enum"], + ["ascending", "other"], + ) + self.assertEqual(spec["components"]["schemas"]["unrelated"]["enum"], ["yes", "-no"]) + + def test_tolerates_missing_target_schemas(self): + spec = {"components": {"schemas": {}}} + + self.assertEqual(self.patch_openapi.patch_sort_enums(spec), 0) + self.assertEqual(spec, {"components": {"schemas": {}}}) + + def test_patches_numeric_firewall_rule_position(self): + spec = { + "components": { + "schemas": { + "firewallRulesetServerFirewallRulePosition": { + "type": "string", + "examples": ["1", "678"], + "pattern": "^[1-9]$", + } + } + } + } + + self.assertTrue(self.patch_openapi.patch_firewall_rule_position(spec)) + self.assertEqual( + spec["components"]["schemas"]["firewallRulesetServerFirewallRulePosition"], + {"type": "integer", "examples": [1, 678]}, + ) + + def test_removes_content_from_inline_and_referenced_204_responses(self): + spec = { + "paths": { + "/inline": { + "delete": { + "responses": { + "204": { + "description": "No content", + "content": {"application/json": {"schema": {"type": "object"}}}, + } + } + } + }, + "/referenced": { + "delete": { + "responses": { + "204": {"$ref": "#/components/responses/delete204"} + } + } + }, + }, + "components": { + "responses": { + "delete204": { + "description": "No content", + "content": {"application/json": {"schema": {"type": "object"}}}, + } + } + }, + } + + self.assertEqual(self.patch_openapi.patch_no_content_responses(spec), 2) + self.assertNotIn("content", spec["paths"]["/inline"]["delete"]["responses"]["204"]) + self.assertNotIn("content", spec["components"]["responses"]["delete204"]) + + def test_preserves_content_for_non_204_responses(self): + response = { + "description": "OK", + "content": {"application/json": {"schema": {"type": "object"}}}, + } + spec = {"paths": {"/resource": {"get": {"responses": {"200": response}}}}} + + self.assertEqual(self.patch_openapi.patch_no_content_responses(spec), 0) + self.assertIn("content", response) + + def test_cli_writes_patched_copy_without_changing_input(self): + source_spec = { + "info": {"version": "test"}, + "components": { + "schemas": { + "fileStorageQueryParamSort": { + "type": "string", + "enum": ["created_at", "-created_at"], + } + } + }, + } + + with tempfile.TemporaryDirectory() as directory: + directory_path = Path(directory) + input_path = directory_path / "input.json" + output_path = directory_path / "nested" / "output.json" + input_path.write_text(json.dumps(source_spec), encoding="utf-8") + + result = subprocess.run( + [sys.executable, str(PATCH_SCRIPT), str(input_path), str(output_path)], + check=False, + capture_output=True, + text=True, + ) + + self.assertEqual(result.returncode, 0, result.stderr) + self.assertIn("Removed 1 descending sort enum values", result.stdout) + self.assertEqual(json.loads(input_path.read_text(encoding="utf-8")), source_spec) + self.assertEqual( + json.loads(output_path.read_text(encoding="utf-8"))["components"]["schemas"][ + "fileStorageQueryParamSort" + ]["enum"], + ["created_at"], + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/generator/tests/test_prepare_docs.py b/generator/tests/test_prepare_docs.py new file mode 100644 index 00000000..7fb7c27b --- /dev/null +++ b/generator/tests/test_prepare_docs.py @@ -0,0 +1,63 @@ +"""Regression coverage for Fern-to-Pages conversion.""" +import importlib.util +import re +import tempfile +import unittest +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[2] +spec = importlib.util.spec_from_file_location('prepare_docs', ROOT / 'generator/scripts/prepare_docs.py') +docs = importlib.util.module_from_spec(spec) +spec.loader.exec_module(docs) + + +class PrepareDocsTests(unittest.TestCase): + def test_index_identifies_legacy_docs_and_prerelease_snapshots(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + for version in ('latest', 'v0.0.105', 'v4.0.0-alpha.1'): + (root / version).mkdir() + (root / version / 'reference.md').write_text('## server\n') + docs.prepare_index(root) + index = (root / 'index.md').read_text() + self.assertIn('https://github.com/UpCloudLtd/upcloud-php-api#requirements', index) + self.assertNotIn('upcloud-php-sdk', index) + self.assertIn('v4.0.0-alpha.1/reference.html', index) + self.assertIn('are not legacy Packagist v1-v3 releases', index) + self.assertIn('/tree/v3.0.0', index) + + def test_preserves_examples_and_method_count_in_each_snapshot(self): + for path in (ROOT / 'docs').glob('*/reference.md'): + with self.subTest(version=path.parent.name): + original = path.read_text() + prepared = docs.prepare_reference(original, path.parent.name) + self.assertEqual(re.findall(r'```.*?```', original, re.S), + re.findall(r'```.*?```', prepared, re.S)) + self.assertEqual(original.count('$client->ipAddress->list() +
+
+ +#### πŸ“ Description + +List addresses. +
+
+
+''' + result = docs.prepare_reference(source, 'latest') + self.assertIn('{:#ip_addressAnchor}', result) + self.assertIn('
\n', result) + self.assertIn('#### Description', result) + self.assertNotIn('
', result) + self.assertNotIn('
', result) + + +if __name__ == '__main__': + unittest.main() diff --git a/lib/ApiException.php b/lib/ApiException.php deleted file mode 100644 index 9b330057..00000000 --- a/lib/ApiException.php +++ /dev/null @@ -1,95 +0,0 @@ -responseHeaders = $responseHeaders; - $this->responseBody = $responseBody; - } - - /** - * Gets the HTTP response header - * - * @return string[]|null HTTP response header - */ - public function getResponseHeaders() - { - return $this->responseHeaders; - } - - /** - * Gets the HTTP body of the server response either as Json or string - * - * @return mixed HTTP body of the server response either as \stdClass or string - */ - public function getResponseBody() - { - return $this->responseBody; - } - - /** - * Sets the deseralized response object (during deserialization) - * - * @param mixed $obj Deserialized response object - * - * @return void - */ - public function setResponseObject($obj) - { - $this->responseObject = $obj; - } - - /** - * Gets the deseralized response object (during deserialization) - * - * @return mixed the deserialized response object - */ - public function getResponseObject() - { - return $this->responseObject; - } -} diff --git a/lib/Configuration.php b/lib/Configuration.php deleted file mode 100644 index e52abe59..00000000 --- a/lib/Configuration.php +++ /dev/null @@ -1,368 +0,0 @@ -apiKeys[$apiKeyIdentifier] = $key; - - return $this; - } - - /** - * Gets API key. - * - * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * - * @return null|string API key or token - */ - public function getApiKey(string $apiKeyIdentifier) - { - return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null; - } - - /** - * Sets the prefix for API key (e.g. Bearer). - * - * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * @param string $prefix API key prefix, e.g. Bearer - * - * @return $this - */ - public function setApiKeyPrefix(string $apiKeyIdentifier, string $prefix) - { - $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; - - return $this; - } - - /** - * Gets API key prefix. - * - * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * - * @return null|string - */ - public function getApiKeyPrefix(string $apiKeyIdentifier) - { - return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null; - } - - /** - * Sets the access token for OAuth. - * - * @param string $accessToken Token for OAuth - * - * @return $this - */ - public function setAccessToken(string $accessToken) - { - $this->accessToken = $accessToken; - - return $this; - } - - /** - * Gets the access token for OAuth. - * - * @return string Access token for OAuth - */ - public function getAccessToken() - { - return $this->accessToken; - } - - /** - * Sets the username for HTTP basic authentication. - * - * @param string $username Username for HTTP basic authentication - * - * @return $this - */ - public function setUsername(string $username) - { - $this->username = $username; - - return $this; - } - - /** - * Gets the username for HTTP basic authentication. - * - * @return string Username for HTTP basic authentication - */ - public function getUsername() - { - return $this->username; - } - - /** - * Sets the password for HTTP basic authentication. - * - * @param string $password Password for HTTP basic authentication - * - * @return $this - */ - public function setPassword(string $password) - { - $this->password = $password; - - return $this; - } - - /** - * Gets the password for HTTP basic authentication. - * - * @return string Password for HTTP basic authentication - */ - public function getPassword() - { - return $this->password; - } - - /** - * Sets the host. - * - * @param string $host Host - * - * @return $this - */ - public function setHost(string $host) - { - $this->host = $host; - - return $this; - } - - /** - * Gets the host. - * - * @return string Host - */ - public function getHost() - { - return $this->host; - } - - /** - * Sets the user agent of the api client. - * - * @param string $userAgent the user agent of the api client - * - * @throws InvalidArgumentException - * - * @return $this - */ - public function setUserAgent(string $userAgent) - { - $this->userAgent = $userAgent; - - return $this; - } - - /** - * Gets the user agent of the api client. - * - * @return string user agent - */ - public function getUserAgent() - { - return $this->userAgent; - } - - /** - * Sets debug flag. - * - * @param bool $debug Debug flag - * - * @return $this - */ - public function setDebug(bool $debug) - { - $this->debug = $debug; - - return $this; - } - - /** - * Gets the debug flag. - * - * @return bool - */ - public function getDebug() - { - return $this->debug; - } - - /** - * Sets the debug file. - * - * @param string $debugFile Debug file - * - * @return $this - */ - public function setDebugFile(string $debugFile) - { - $this->debugFile = $debugFile; - - return $this; - } - - /** - * Gets the debug file. - * - * @return string - */ - public function getDebugFile() - { - return $this->debugFile; - } - - /** - * Gets the default configuration instance. - * - * @return Configuration - */ - public static function getDefaultConfiguration() - { - if (self::$defaultConfiguration === null) { - self::$defaultConfiguration = new Configuration(); - } - - return self::$defaultConfiguration; - } - - /** - * Sets the detault configuration instance. - * - * @param Configuration $config An instance of the Configuration Object - */ - public static function setDefaultConfiguration(Configuration $config): void - { - self::$defaultConfiguration = $config; - } - - /** - * Gets the essential information for debugging. - * - * @return string The report for debugging - */ - public static function toDebugReport() - { - $report = 'PHP SDK (Upcloud\ApiClient) Debug Report:'.PHP_EOL; - $report .= ' OS: '.php_uname().PHP_EOL; - $report .= ' PHP Version: '.PHP_VERSION.PHP_EOL; - $report .= ' OpenAPI Spec Version: 1.2.0'.PHP_EOL; - - return $report; - } - - /** - * Get API key (with prefix if set). - * - * @param string $apiKeyIdentifier name of apikey - * - * @return string API key with the prefix - */ - public function getApiKeyWithPrefix(string $apiKeyIdentifier) - { - $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); - $apiKey = $this->getApiKey($apiKeyIdentifier); - - if ($apiKey === null) { - return null; - } - - if ($prefix === null) { - $keyWithPrefix = $apiKey; - } else { - $keyWithPrefix = $prefix.' '.$apiKey; - } - - return $keyWithPrefix; - } -} diff --git a/lib/HttpClient/UpcloudApiRequest.php b/lib/HttpClient/UpcloudApiRequest.php deleted file mode 100644 index fd8ab5e9..00000000 --- a/lib/HttpClient/UpcloudApiRequest.php +++ /dev/null @@ -1,26 +0,0 @@ -serializer = $serializer ?? new Serializer; - } - - public function __toString() - { - return $this->serializer->serialize($this); - } -} diff --git a/lib/HttpClient/UpcloudApiResponse.php b/lib/HttpClient/UpcloudApiResponse.php deleted file mode 100644 index 2899ae37..00000000 --- a/lib/HttpClient/UpcloudApiResponse.php +++ /dev/null @@ -1,125 +0,0 @@ -statusCode = $statusCode; - $this->headers = $headers; - $this->body = $body; - $this->serializer = new Serializer; - } - - public static function createFromResponse(ResponseInterface $response): self - { - return new self( - $response->getHeaders(), - $response->getBody(), - $response->getStatusCode() - ); - } - - /** - * Return the response headers. - * - * @return array - */ - public function getHeaders(): array - { - return $this->headers; - } - - /** - * Return the body of the response. - * - * @return StreamInterface - */ - public function getBody(): StreamInterface - { - return $this->body; - } - - /** - * Return the HTTP response code. - * - * @return int - */ - public function getStatusCode(): int - { - return $this->statusCode; - } - - /** - * @param SerializerInterface $serializer - * @return $this - */ - public function setSerializer(SerializerInterface $serializer): self - { - - $this->serializer = $serializer; - - return $this; - } - - /** - * @param $class - * @return array|mixed|object - */ - public function deserializeBody($class) - { - return $this->serializer->deserialize( - (string) $this->getBody(), - $class, - 'json' - ); - } - - /** - * @param null $class - * @return array - */ - public function toArray($class = null): array - { - return [ - $class ? $this->deserializeBody($class) : null, - $this->statusCode, - $this->headers - ]; - } -} diff --git a/lib/HttpClient/UpcloudHttpClient.php b/lib/HttpClient/UpcloudHttpClient.php deleted file mode 100644 index 6713894d..00000000 --- a/lib/HttpClient/UpcloudHttpClient.php +++ /dev/null @@ -1,143 +0,0 @@ - 'application/json; charset=UTF-8' - ]; - - /** - * @param ClientInterface|null $client - * @param Configuration|null $config - */ - public function __construct(ClientInterface $client = null, Configuration $config = null) - { - $this->config = $config ?: Configuration::getDefaultConfiguration(); - $this->client = $client ?: new Client([ - 'base_uri' => rtrim($this->config->getHost(), '/') . '/' - ]); - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Send an HTTP request. - * - * @param RequestInterface $request Request to send - * @param array $options Request options to apply to the given - * request and to the transfer. - * - * @return UpcloudApiResponse - * @throws ApiException|GuzzleException - */ - public function send(RequestInterface $request, array $options = []): UpcloudApiResponse - { - $request = $this->combineRequest($request); - - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody() : null - ); - } - - return UpcloudApiResponse::createFromResponse($response); - } - - /** - * Asynchronously send an HTTP request. - * - * @param RequestInterface $request Request to send - * @param array $options Request options to apply to the given - * request and to the transfer. - * @return PromiseInterface - */ - public function sendAsync(RequestInterface $request, array $options = []): PromiseInterface - { - $request = $this->combineRequest($request); - - return $this->client->sendAsync($request, $options) - ->then(function (ResponseInterface $response) { - return UpcloudApiResponse::createFromResponse($response); - }, function (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody() : null - ); - }); - } - - /** - * @param RequestInterface $request - * @return RequestInterface - */ - private function combineRequest(RequestInterface $request): RequestInterface - { - $modify = []; - foreach ($this->getDefaultHeaders() as $key => $value) { - if (!$request->hasHeader($key)) { - $modify['set_headers'][$key] = $value; - } - } - - return Psr7\Utils::modifyRequest($request, $modify); - } - - /** - * @return array - */ - private function getDefaultHeaders(): array - { - return array_merge( - $this->headers, - [ - 'User-Agent' => $this->config->getUserAgent() - ], - [ - 'Authorization' => 'Basic ' . base64_encode( - $this->config->getUsername() . ":" . $this->config->getPassword() - ) - ] - ); - } -} diff --git a/lib/Model/Account.php b/lib/Model/Account.php deleted file mode 100644 index f83b1009..00000000 --- a/lib/Model/Account.php +++ /dev/null @@ -1,99 +0,0 @@ -setCredits($data['credits'] ?? null); - $this->setUsername($data['username'] ?? null); - $this->setResourceLimits($data['resource_limits'] ?? null); - } - - /** - * Gets credits - * @return float|null - */ - public function getCredits(): ?float - { - return $this->credits; - } - - /** - * Sets credits - * @param float|null $credits - * @return Account - */ - public function setCredits(?float $credits): Account - { - $this->credits = $credits; - - return $this; - } - - /** - * Gets username - * @return string - */ - public function getUsername(): ?string - { - return $this->username; - } - - /** - * Sets username - * @param string|null $username - * @return Account - */ - public function setUsername(?string $username): Account - { - $this->username = $username; - - return $this; - } - - /** - * @return AccountResourceLimits|null - */ - public function getResourceLimits(): ?AccountResourceLimits - { - return $this->resourceLimits; - } - - /** - * @param AccountResourceLimits|array|null $resourceLimits - * @return Account - */ - public function setResourceLimits($resourceLimits): Account - { - if (is_array($resourceLimits)) { - $this->resourceLimits = new AccountResourceLimits($resourceLimits); - } else { - $this->resourceLimits = $resourceLimits; - } - - return $this; - } -} diff --git a/lib/Model/AccountResourceLimits.php b/lib/Model/AccountResourceLimits.php deleted file mode 100644 index 5d423b3f..00000000 --- a/lib/Model/AccountResourceLimits.php +++ /dev/null @@ -1,213 +0,0 @@ -cores = $data['cores'] ?? null; - $this->detachedFloatingIps = $data['detached_floating_ips'] ?? null; - $this->memory = $data['memory'] ?? null; - $this->networks = $data['networks'] ?? null; - $this->publicIpv4 = $data['public_ipv4'] ?? null; - $this->publicIpv6 = $data['public_ipv6'] ?? null; - $this->storageHdd = $data['storage_hdd'] ?? null; - $this->storageSsd = $data['storage_ssd'] ?? null; - } - - /** - * @return int|null - */ - public function getCores(): ?int - { - return $this->cores; - } - - /** - * @param int|null $cores - * @return AccountResourceLimits - */ - public function setCores(?int $cores): AccountResourceLimits - { - $this->cores = $cores; - - return $this; - } - - /** - * @return int|null - */ - public function getDetachedFloatingIps(): ?int - { - return $this->detachedFloatingIps; - } - - /** - * @param int|null $detachedFloatingIps - * @return AccountResourceLimits - */ - public function setDetachedFloatingIps(?int $detachedFloatingIps): AccountResourceLimits - { - $this->detachedFloatingIps = $detachedFloatingIps; - - return $this; - } - - /** - * @return int|null - */ - public function getMemory(): ?int - { - return $this->memory; - } - - /** - * @param int|null $memory - * @return AccountResourceLimits - */ - public function setMemory(?int $memory): AccountResourceLimits - { - $this->memory = $memory; - - return $this; - } - - /** - * @return int|null - */ - public function getNetworks(): ?int - { - return $this->networks; - } - - /** - * @param int|null $networks - * @return AccountResourceLimits - */ - public function setNetworks(?int $networks): AccountResourceLimits - { - $this->networks = $networks; - - return $this; - } - - /** - * @return int|null - */ - public function getPublicIpv4(): ?int - { - return $this->publicIpv4; - } - - /** - * @param int|null $publicIpv4 - * @return AccountResourceLimits - */ - public function setPublicIpv4(?int $publicIpv4): AccountResourceLimits - { - $this->publicIpv4 = $publicIpv4; - - return $this; - } - - /** - * @return int|null - */ - public function getPublicIpv6(): ?int - { - return $this->publicIpv6; - } - - /** - * @param int|null $publicIpv6 - * @return AccountResourceLimits - */ - public function setPublicIpv6(?int $publicIpv6): AccountResourceLimits - { - $this->publicIpv6 = $publicIpv6; - - return $this; - } - - /** - * @return int|null - */ - public function getStorageHdd(): ?int - { - return $this->storageHdd; - } - - /** - * @param int|null $storageHdd - * @return AccountResourceLimits - */ - public function setStorageHdd(?int $storageHdd): AccountResourceLimits - { - $this->storageHdd = $storageHdd; - - return $this; - } - - /** - * @return int|null - */ - public function getStorageSsd(): ?int - { - return $this->storageSsd; - } - - /** - * @param int|null $storageSsd - * @return AccountResourceLimits - */ - public function setStorageSsd(?int $storageSsd): AccountResourceLimits - { - $this->storageSsd = $storageSsd; - - return $this; - } -} diff --git a/lib/Model/AccountResponse.php b/lib/Model/AccountResponse.php deleted file mode 100644 index 10898c9e..00000000 --- a/lib/Model/AccountResponse.php +++ /dev/null @@ -1,41 +0,0 @@ -setAccount($data['account'] ?? null); - } - - /** - * @return Account|null - */ - public function getAccount(): ?Account - { - return $this->account; - } - - /** - * @param Account|array|null $account - * @return AccountResponse - */ - public function setAccount($account): AccountResponse - { - if (is_array($account)) { - $this->account = new Account($account); - } else { - $this->account = $account; - } - - return $this; - } -} diff --git a/lib/Model/AddIpRequest.php b/lib/Model/AddIpRequest.php deleted file mode 100644 index b2bf783c..00000000 --- a/lib/Model/AddIpRequest.php +++ /dev/null @@ -1,50 +0,0 @@ -setIpAddress($data['ip_address'] ?? null); - } - - /** - * @return IpAddress|null - */ - public function getIpAddress(): ?IpAddress - { - return $this->ipAddress; - } - - /** - * @param IpAddress|array|null $ipAddress - * @return AddIpRequest - */ - public function setIpAddress($ipAddress): AddIpRequest - { - if (is_array($ipAddress)) { - $this->ipAddress = new IpAddress($ipAddress); - } else { - $this->ipAddress = $ipAddress; - } - - return $this; - } -} - - diff --git a/lib/Model/AssignIpResponse.php b/lib/Model/AssignIpResponse.php deleted file mode 100644 index 69828ee3..00000000 --- a/lib/Model/AssignIpResponse.php +++ /dev/null @@ -1,48 +0,0 @@ -setIpAddress($data['ip_address'] ?? null); - } - - /** - * @return IpAddress|null - */ - public function getIpAddress(): ?IpAddress - { - return $this->ipAddress; - } - - /** - * @param IpAddress|array|null $ipAddress - * @return AssignIpResponse - */ - public function setIpAddress($ipAddress): AssignIpResponse - { - if (is_array($ipAddress)) { - $this->ipAddress = new IpAddress($ipAddress); - } else { - $this->ipAddress = $ipAddress; - } - - return $this; - } - -} - - diff --git a/lib/Model/AttachNetwork.php b/lib/Model/AttachNetwork.php deleted file mode 100644 index 317aac6f..00000000 --- a/lib/Model/AttachNetwork.php +++ /dev/null @@ -1,41 +0,0 @@ -setNetwork($data['network'] ?? null); - } - - /** - * @return string[]|null - */ - public function getNetwork(): ?array - { - return $this->network; - } - - /** - * @param string[]|null $network - * @return AttachNetwork - */ - public function setNetwork(?array $network): AttachNetwork - { - $this->network = $network; - - return $this; - } -} diff --git a/lib/Model/AttachStorageDeviceRequest.php b/lib/Model/AttachStorageDeviceRequest.php deleted file mode 100644 index 4dc860f8..00000000 --- a/lib/Model/AttachStorageDeviceRequest.php +++ /dev/null @@ -1,21 +0,0 @@ -serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'title', 'size', 'tier', 'action', 'partOfPlan', 'storageSize', 'storageTitle' - ] - ]); - } -} - - diff --git a/lib/Model/AvailablePlanListResponse.php b/lib/Model/AvailablePlanListResponse.php deleted file mode 100644 index 35bb9145..00000000 --- a/lib/Model/AvailablePlanListResponse.php +++ /dev/null @@ -1,48 +0,0 @@ -setPlans($data['plans'] ?? null); - } - - /** - * @return AvailablePlanListResponsePlans|null - */ - public function getPlans(): ?AvailablePlanListResponsePlans - { - return $this->plans; - } - - /** - * @param AvailablePlanListResponsePlans|array|null $plans - * @return AvailablePlanListResponse - */ - public function setPlans($plans): AvailablePlanListResponse - { - if (is_array($plans)) { - $this->plans = new AvailablePlanListResponsePlans($plans); - } else { - $this->plans = $plans; - } - - return $this; - } - -} - - diff --git a/lib/Model/AvailablePlanListResponsePlans.php b/lib/Model/AvailablePlanListResponsePlans.php deleted file mode 100644 index e7523adc..00000000 --- a/lib/Model/AvailablePlanListResponsePlans.php +++ /dev/null @@ -1,49 +0,0 @@ -setPlan($data['plan'] ?? null); - } - - /** - * @return Plan[]|null - */ - public function getPlan(): ?array - { - return $this->plan; - } - - /** - * @param Plan[]|null $plan - * @return AvailablePlanListResponsePlans - */ - public function setPlan(?array $plan): AvailablePlanListResponsePlans - { - if (is_array($plan)) { - foreach ($plan as $item) { - $this->plan[] = $item instanceof Plan - ? $item - : new Plan($item); - } - } else { - $this->plan = $plan; - } - - return $this; - } -} diff --git a/lib/Model/BackupRule.php b/lib/Model/BackupRule.php deleted file mode 100644 index 32236289..00000000 --- a/lib/Model/BackupRule.php +++ /dev/null @@ -1,118 +0,0 @@ -setInterval($data['interval'] ?? null); - $this->time = $data['time'] ?? null; - $this->retention = $data['retention'] ?? null; - } - - /** - * @return string|null - */ - public function getInterval(): ?string - { - return $this->interval; - } - - /** - * @param string|null $interval - * @return BackupRule - */ - public function setInterval(?string $interval): BackupRule - { - if (!is_null($interval)) { - Assert::oneOf($interval, [ - self::INTERVAL_DAILY, - self::INTERVAL_MON, - self::INTERVAL_TUE, - self::INTERVAL_WED, - self::INTERVAL_THU, - self::INTERVAL_FRI, - self::INTERVAL_SAT, - self::INTERVAL_SUN, - ]); - } - - $this->interval = $interval; - - return $this; - } - - /** - * @return string|null - */ - public function getTime(): ?string - { - return $this->time; - } - - /** - * @param string|null $time - * @return BackupRule - */ - public function setTime(?string $time): BackupRule - { - $this->time = $time; - - return $this; - } - - /** - * @return float|string|null - */ - public function getRetention() - { - return $this->retention; - } - - /** - * @param float|string|null $retention - * @return BackupRule - */ - public function setRetention($retention): BackupRule - { - $this->retention = $retention; - - return $this; - } -} - - diff --git a/lib/Model/CloneStorageRequest.php b/lib/Model/CloneStorageRequest.php deleted file mode 100644 index 997c065b..00000000 --- a/lib/Model/CloneStorageRequest.php +++ /dev/null @@ -1,23 +0,0 @@ -serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'access', 'backupRule', 'backups', 'license', 'servers', 'size', 'state', - 'type', 'uuid', 'origin', 'created' - ] - ]); - } -} - - diff --git a/lib/Model/ConfigurationListResponse.php b/lib/Model/ConfigurationListResponse.php deleted file mode 100644 index f1d9a121..00000000 --- a/lib/Model/ConfigurationListResponse.php +++ /dev/null @@ -1,47 +0,0 @@ -serverSizes = $data['server_sizes'] ?? null; - } - - /** - * @return ConfigurationListResponseServerSizes|null - */ - public function getServerSizes(): ?ConfigurationListResponseServerSizes - { - return $this->serverSizes; - } - - /** - * @param ConfigurationListResponseServerSizes|array|null $serverSizes - * @return ConfigurationListResponse - */ - public function setServerSizes($serverSizes): ConfigurationListResponse - { - if (is_array($serverSizes)) { - $this->serverSizes = new ConfigurationListResponseServerSizes($serverSizes); - } else { - $this->serverSizes = $serverSizes; - } - - return $this; - } -} - - diff --git a/lib/Model/ConfigurationListResponseServerSizes.php b/lib/Model/ConfigurationListResponseServerSizes.php deleted file mode 100644 index a0b7bcb5..00000000 --- a/lib/Model/ConfigurationListResponseServerSizes.php +++ /dev/null @@ -1,49 +0,0 @@ -setServerSize($data['server_size'] ?? null); - } - - /** - * @return ServerSize[]|null - */ - public function getServerSize(): ?array - { - return $this->serverSize; - } - - /** - * @param ServerSize[]|array|null $serverSize - * @return ConfigurationListResponseServerSizes - */ - public function setServerSize(?array $serverSize): ConfigurationListResponseServerSizes - { - if (is_array($serverSize)) { - foreach ($serverSize as $item) { - $this->serverSize[] = $item instanceof ServerSize - ? $item - : new ServerSize($item); - } - } else { - $this->serverSize = $serverSize; - } - - return $this; - } -} diff --git a/lib/Model/CreateBackupStorageRequest.php b/lib/Model/CreateBackupStorageRequest.php deleted file mode 100644 index cff73246..00000000 --- a/lib/Model/CreateBackupStorageRequest.php +++ /dev/null @@ -1,23 +0,0 @@ -serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'access', 'backupRule', 'backups', 'license', 'servers', 'size', 'state', - 'tier', 'type', 'uuid', 'zone', 'origin', 'created' - ] - ]); - } -} - - diff --git a/lib/Model/CreateNetworkInterfaceRequest.php b/lib/Model/CreateNetworkInterfaceRequest.php deleted file mode 100644 index 933fc08d..00000000 --- a/lib/Model/CreateNetworkInterfaceRequest.php +++ /dev/null @@ -1,19 +0,0 @@ -serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'mac' - ] - ]); - } -} diff --git a/lib/Model/CreateNetworkRequest.php b/lib/Model/CreateNetworkRequest.php deleted file mode 100644 index 75d05e4f..00000000 --- a/lib/Model/CreateNetworkRequest.php +++ /dev/null @@ -1,19 +0,0 @@ -serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'type', 'uuid', 'servers', - ] - ]); - } -} diff --git a/lib/Model/CreateNewTagResponse.php b/lib/Model/CreateNewTagResponse.php deleted file mode 100644 index 7c757371..00000000 --- a/lib/Model/CreateNewTagResponse.php +++ /dev/null @@ -1,47 +0,0 @@ -setTag($data['tag'] ?? null); - } - - /** - * @return Tag|null - */ - public function getTag(): ?Tag - { - return $this->tag; - } - - /** - * @param Tag|array|null $tag - * @return CreateNewTagResponse - */ - public function setTag($tag): CreateNewTagResponse - { - if (is_array($tag)) { - $this->tag = new Tag($tag); - } else { - $this->tag = $tag; - } - - return $this; - } -} - - diff --git a/lib/Model/CreateObjectStorageRequest.php b/lib/Model/CreateObjectStorageRequest.php deleted file mode 100644 index 10c6dbc0..00000000 --- a/lib/Model/CreateObjectStorageRequest.php +++ /dev/null @@ -1,19 +0,0 @@ -serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'uuid', 'state', 'url', 'created', 'used_space' - ] - ]); - } -} diff --git a/lib/Model/CreateServerRequest.php b/lib/Model/CreateServerRequest.php deleted file mode 100644 index 37b060ce..00000000 --- a/lib/Model/CreateServerRequest.php +++ /dev/null @@ -1,20 +0,0 @@ -serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - // 'networking', 'ipAddresses', - 'license', 'planIpv4Bytes', 'planIpv6Bytes', 'state', 'tags', 'uuid' - ] - ]); - } -} diff --git a/lib/Model/CreateServerResponse.php b/lib/Model/CreateServerResponse.php deleted file mode 100644 index f1b9ef13..00000000 --- a/lib/Model/CreateServerResponse.php +++ /dev/null @@ -1,45 +0,0 @@ -setServer($data['server'] ?? null); - } - - /** - * @return Server|null - */ - public function getServer(): ?Server - { - return $this->server; - } - - /** - * @param Server|array|null $server - * @return CreateServerResponse - */ - public function setServer($server): CreateServerResponse - { - if (is_array($server)) { - $this->server = new Server($server); - } else { - $this->server = $server; - } - - return $this; - } -} diff --git a/lib/Model/CreateStorageRequest.php b/lib/Model/CreateStorageRequest.php deleted file mode 100644 index b7796cf0..00000000 --- a/lib/Model/CreateStorageRequest.php +++ /dev/null @@ -1,21 +0,0 @@ -serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'access', 'backups', 'license', 'servers', 'state', - 'type', 'uuid', 'origin', 'created' - ] - ]); - } -} diff --git a/lib/Model/CreateStorageResponse.php b/lib/Model/CreateStorageResponse.php deleted file mode 100644 index c58f3414..00000000 --- a/lib/Model/CreateStorageResponse.php +++ /dev/null @@ -1,47 +0,0 @@ -setStorage($data['storage'] ?? null); - } - - /** - * @return Storage|null - */ - public function getStorage(): ?Storage - { - return $this->storage; - } - - /** - * @param Storage|array|null $storage - * @return CreateStorageResponse - */ - public function setStorage($storage): CreateStorageResponse - { - if (is_array($storage)) { - $this->storage = new Storage($storage); - } else { - $this->storage = $storage; - } - - return $this; - } -} - - diff --git a/lib/Model/Error.php b/lib/Model/Error.php deleted file mode 100644 index 6ccc980a..00000000 --- a/lib/Model/Error.php +++ /dev/null @@ -1,47 +0,0 @@ -setError($data['error'] ?? null); - } - - /** - * @return ErrorError|null - */ - public function getError(): ?ErrorError - { - return $this->error; - } - - /** - * @param ErrorError|array|null $error - * @return Error - */ - public function setError($error): Error - { - if (is_array($error)) { - $this->error = new ErrorError($error); - } else { - $this->error = $error; - } - - return $this; - } -} - - diff --git a/lib/Model/ErrorCode.php b/lib/Model/ErrorCode.php deleted file mode 100644 index f82a69ed..00000000 --- a/lib/Model/ErrorCode.php +++ /dev/null @@ -1,138 +0,0 @@ -setErrorCode($data['error_code'] ?? null); - $this->setErrorStatus($data['error_status'] ?? null); - } - - /** - * @return string|null - */ - public function getErrorCode(): ?string - { - return $this->errorCode; - } - - /** - * @param string|null $errorCode - * @return ErrorError - */ - public function setErrorCode(?string $errorCode): ErrorError - { - if (!is_null($errorCode)) { - Assert::oneOf($errorCode, ErrorCode::getAllowableEnumValues()); - } - - $this->errorCode = $errorCode; - - return $this; - } - - /** - * @return string|null - */ - public function getErrorStatus(): ?string - { - return $this->errorStatus; - } - - /** - * @param string|null $errorStatus - * @return ErrorError - */ - public function setErrorStatus(?string $errorStatus): ErrorError - { - if (!is_null($errorStatus)) { - Assert::oneOf($errorStatus, ErrorStatus::getAllowableEnumValues()); - } - - $this->errorStatus = $errorStatus; - - return $this; - } -} - - diff --git a/lib/Model/ErrorStatus.php b/lib/Model/ErrorStatus.php deleted file mode 100644 index a7eadfc1..00000000 --- a/lib/Model/ErrorStatus.php +++ /dev/null @@ -1,40 +0,0 @@ -setDirection($data['direction'] ?? null); - $this->setAction($data['action'] ?? null); - $this->setPosition($data['position'] ?? null); - $this->setFamily($data['family'] ?? null); - $this->setProtocol($data['protocol'] ?? null); - $this->setIcmpType($data['icmp_type'] ?? null); - $this->setDestinationAddressStart($data['destination_address_start'] ?? null); - $this->setDestinationAddressEnd($data['destination_address_end'] ?? null); - $this->setDestinationPortStart($data['destination_port_start'] ?? null); - $this->setDestinationPortEnd($data['destination_port_end'] ?? null); - $this->setSourceAddressStart($data['source_address_start'] ?? null); - $this->setSourceAddressEnd($data['source_address_end'] ?? null); - $this->setSourcePortStart($data['source_port_start'] ?? null); - $this->setSourcePortEnd($data['source_port_end'] ?? null); - $this->setComment($data['comment'] ?? null); - } - - public function getDirection(): ?string - { - return $this->direction; - } - - public function setDirection(?string $direction): FirewallRule - { - if (!\is_null($direction) && $direction !== '') { - Assert::oneOf($direction, [ - self::DIRECTION_IN, - self::DIRECTION_OUT, - ]); - } - - $this->direction = $direction; - - return $this; - } - - public function getAction(): ?string - { - return $this->action; - } - - public function setAction(?string $action): FirewallRule - { - if (!\is_null($action) && $action !== '') { - Assert::oneOf($action, [ - self::ACTION_ACCEPT, - self::ACTION_DROP, - self::ACTION_REJECT, - ]); - } - - $this->action = $action; - - return $this; - } - - /** - * @return string|float|null - */ - public function getPosition() - { - return $this->position; - } - - /** - * @param string|float|null $position - */ - public function setPosition($position): FirewallRule - { - if (!\is_null($position) && $position !== '') { - Assert::range($position, '1', '10000'); - } - - $this->position = $position; - - return $this; - } - - public function getFamily(): ?string - { - return $this->family; - } - - public function setFamily(?string $family): FirewallRule - { - if (!\is_null($family) && $family !== '') { - Assert::oneOf($family, [ - self::FAMILY_IP_V4, - self::FAMILY_IP_V6, - ]); - } - - $this->family = $family; - - return $this; - } - - public function getProtocol(): ?string - { - return $this->protocol; - } - - public function setProtocol(?string $protocol): FirewallRule - { - if (!\is_null($protocol) && $protocol !== '') { - Assert::oneOf($protocol, [ - self::PROTOCOL_TCP, - self::PROTOCOL_UDP, - self::PROTOCOL_ICMP, - ]); - } - - $this->protocol = $protocol; - - return $this; - } - - public function getIcmpType(): ?string - { - return $this->icmpType; - } - - public function setIcmpType(?string $icmpType): FirewallRule - { - if (!\is_null($icmpType) && $icmpType !== '') { - Assert::range($icmpType, '0', '255'); - } - - $this->icmpType = $icmpType; - - return $this; - } - - public function getDestinationAddressStart(): ?string - { - return $this->destinationAddressStart; - } - - public function setDestinationAddressStart(?string $destinationAddressStart): FirewallRule - { - if (!\is_null($destinationAddressStart) && $destinationAddressStart !== '') { - if ($this->family === self::FAMILY_IP_V6) { - Assert::ipv6($destinationAddressStart); - } else { - Assert::ipv4($destinationAddressStart); - } - } - - $this->destinationAddressStart = $destinationAddressStart; - - return $this; - } - - public function getDestinationAddressEnd(): ?string - { - return $this->destinationAddressEnd; - } - - public function setDestinationAddressEnd(?string $destinationAddressEnd): FirewallRule - { - if (!\is_null($destinationAddressEnd) && $destinationAddressEnd !== '') { - if ($this->family === self::FAMILY_IP_V6) { - Assert::ipv6($destinationAddressEnd); - } else { - Assert::ipv4($destinationAddressEnd); - } - } - - $this->destinationAddressEnd = $destinationAddressEnd; - - return $this; - } - - /** - * @return string|float|null - */ - public function getDestinationPortStart() - { - return $this->destinationPortStart; - } - - /** - * @param string|float|null $destinationPortStart - */ - public function setDestinationPortStart($destinationPortStart): FirewallRule - { - if (!\is_null($destinationPortStart) && $destinationPortStart !== '') { - Assert::range($destinationPortStart, '1', '65535'); - } - - $this->destinationPortStart = $destinationPortStart; - - return $this; - } - - /** - * @return string|float|null - */ - public function getDestinationPortEnd() - { - return $this->destinationPortEnd; - } - - /** - * @param string|float|null $destinationPortEnd - */ - public function setDestinationPortEnd($destinationPortEnd): FirewallRule - { - if (!\is_null($destinationPortEnd) && $destinationPortEnd !== '') { - Assert::range($destinationPortEnd, '1', '65535'); - } - - $this->destinationPortEnd = $destinationPortEnd; - - return $this; - } - - public function getSourceAddressStart(): ?string - { - return $this->sourceAddressStart; - } - - public function setSourceAddressStart(?string $sourceAddressStart): FirewallRule - { - if (!\is_null($sourceAddressStart) && $sourceAddressStart !== '') { - if ($this->family === self::FAMILY_IP_V6) { - Assert::ipv6($sourceAddressStart); - } else { - Assert::ipv4($sourceAddressStart); - } - } - - $this->sourceAddressStart = $sourceAddressStart; - - return $this; - } - - public function getSourceAddressEnd(): ?string - { - return $this->sourceAddressEnd; - } - - public function setSourceAddressEnd(?string $sourceAddressEnd): FirewallRule - { - if (!\is_null($sourceAddressEnd) && $sourceAddressEnd !== '') { - if ($this->family === self::FAMILY_IP_V6) { - Assert::ipv6($sourceAddressEnd); - } else { - Assert::ipv4($sourceAddressEnd); - } - } - - $this->sourceAddressEnd = $sourceAddressEnd; - - return $this; - } - - /** - * @return string|float|null - */ - public function getSourcePortStart() - { - return $this->sourcePortStart; - } - - /** - * @param string|float|null $sourcePortStart - */ - public function setSourcePortStart($sourcePortStart): FirewallRule - { - if (!\is_null($sourcePortStart) && $sourcePortStart !== '') { - Assert::range($sourcePortStart, '1', '65535'); - } - - $this->sourcePortStart = $sourcePortStart; - - return $this; - } - - /** - * @return string|float|null - */ - public function getSourcePortEnd() - { - return $this->sourcePortEnd; - } - - /** - * @param string|float|null $sourcePortEnd - */ - public function setSourcePortEnd($sourcePortEnd): FirewallRule - { - if (!\is_null($sourcePortEnd) && $sourcePortEnd !== '') { - Assert::range($sourcePortEnd, '1', '65535'); - } - - $this->sourcePortEnd = $sourcePortEnd; - - return $this; - } - - public function getComment(): ?string - { - return $this->comment; - } - - public function setComment(?string $comment): FirewallRule - { - if (!\is_null($comment) && $comment !== '') { - Assert::maxLength($comment, '250'); - } - - $this->comment = $comment; - - return $this; - } -} diff --git a/lib/Model/FirewallRuleCreateResponse.php b/lib/Model/FirewallRuleCreateResponse.php deleted file mode 100644 index b7f8e38f..00000000 --- a/lib/Model/FirewallRuleCreateResponse.php +++ /dev/null @@ -1,45 +0,0 @@ -setFirewallRule($data['firewall_rule'] ?? null); - } - - /** - * @return FirewallRule|null - */ - public function getFirewallRule(): ?FirewallRule - { - return $this->firewallRule; - } - - /** - * @param FirewallRule|array|null $firewallRule - * @return FirewallRuleCreateResponse - */ - public function setFirewallRule($firewallRule): FirewallRuleCreateResponse - { - if (is_array($firewallRule)) { - $this->firewallRule = new FirewallRule($firewallRule); - } else { - $this->firewallRule = $firewallRule; - } - - return $this; - } -} diff --git a/lib/Model/FirewallRuleListResponse.php b/lib/Model/FirewallRuleListResponse.php deleted file mode 100644 index 53847797..00000000 --- a/lib/Model/FirewallRuleListResponse.php +++ /dev/null @@ -1,47 +0,0 @@ -firewallRules = $data['firewall_rules'] ?? null; - } - - /** - * @return FirewallRuleListResponseFirewallRules|null - */ - public function getFirewallRules(): ?FirewallRuleListResponseFirewallRules - { - return $this->firewallRules; - } - - /** - * @param FirewallRuleListResponseFirewallRules|array|null $firewallRules - * @return FirewallRuleListResponse - */ - public function setFirewallRules($firewallRules): FirewallRuleListResponse - { - if (is_array($firewallRules)) { - $this->firewallRules = new FirewallRuleListResponseFirewallRules($firewallRules); - } else { - $this->firewallRules = $firewallRules; - } - - return $this; - } -} - - diff --git a/lib/Model/FirewallRuleListResponseFirewallRules.php b/lib/Model/FirewallRuleListResponseFirewallRules.php deleted file mode 100644 index 8b0bde7d..00000000 --- a/lib/Model/FirewallRuleListResponseFirewallRules.php +++ /dev/null @@ -1,51 +0,0 @@ -setFirewallRule($data['firewall_rule'] ?? null); - } - - /** - * @return FirewallRule[]|null - */ - public function getFirewallRule(): ?array - { - return $this->firewallRule; - } - - /** - * @param FirewallRule[]|array|null $firewallRule - * @return FirewallRuleListResponseFirewallRules - */ - public function setFirewallRule(?array $firewallRule): FirewallRuleListResponseFirewallRules - { - if (is_array($firewallRule)) { - foreach ($firewallRule as $item) { - $this->firewallRule[] = $item instanceof FirewallRule - ? $item - : new FirewallRule($item); - } - } else { - $this->firewallRule = $firewallRule; - } - - return $this; - } -} - - diff --git a/lib/Model/FirewallRuleRequest.php b/lib/Model/FirewallRuleRequest.php deleted file mode 100644 index 6390fb1b..00000000 --- a/lib/Model/FirewallRuleRequest.php +++ /dev/null @@ -1,51 +0,0 @@ -setFirewallRule($data['firewall_rule'] ?? null); - } - - /** - * @return FirewallRule|null - */ - public function getFirewallRule(): ?FirewallRule - { - return $this->firewallRule; - } - - /** - * @param FirewallRule|array|null $firewallRule - * @return FirewallRuleRequest - */ - public function setFirewallRule($firewallRule): FirewallRuleRequest - { - if (is_array($firewallRule)) { - $this->firewallRule = new FirewallRule($firewallRule); - } else { - $this->firewallRule = $firewallRule; - } - - return $this; - } - -} - - diff --git a/lib/Model/FirewallRulesRequest.php b/lib/Model/FirewallRulesRequest.php deleted file mode 100644 index 115ff161..00000000 --- a/lib/Model/FirewallRulesRequest.php +++ /dev/null @@ -1,46 +0,0 @@ - [] - ]; - - /** - * Constructor - * @param mixed[] $data - */ - public function __construct(array $data = null) - { - parent::__construct(); - $this->setFirewallRules($data['firewall_rules'] ?? []); - } - - /** - * @return FirewallRule[] - */ - public function getFirewallRules(): array - { - return $this->firewallRules; - } - - /** - * @param FirewallRule[] $firewallRules - * @return FirewallRulesRequest - */ - public function setFirewallRules(array $firewallRules): FirewallRulesRequest - { - $this->firewallRules['firewall_rule'] = $firewallRules; - - return $this; - } -} \ No newline at end of file diff --git a/lib/Model/Host.php b/lib/Model/Host.php deleted file mode 100644 index effbc6fc..00000000 --- a/lib/Model/Host.php +++ /dev/null @@ -1,159 +0,0 @@ -setId($data['id'] ?? null); - $this->setDescription($data['description'] ?? null); - $this->setZone($data['zone'] ?? null); - $this->setWindowsEnabled($data['windows_enabled'] ?? null); - $this->setStats($data['stats'] ?? null); - } - - /** - * @return float|string|null - */ - public function getId() - { - return $this->id; - } - - /** - * @param float|string|null $id - * @return Host - */ - public function setId($id): Host - { - $this->id = $id; - - return $this; - } - - /** - * @return string|null - */ - public function getDescription(): ?string - { - return $this->description; - } - - /** - * @param string|null $description - * @return Host - */ - public function setDescription(?string $description): Host - { - $this->description = $description; - - return $this; - } - - /** - * @return string|null - */ - public function getZone(): ?string - { - return $this->zone; - } - - /** - * @param string|null $zone - * @return Host - */ - public function setZone(?string $zone): Host - { - $this->zone = $zone; - - return $this; - } - - /** - * @return string|null - */ - public function getWindowsEnabled(): ?string - { - return $this->windowsEnabled; - } - - /** - * @param string|null $windowsEnabled - * @return Host - */ - public function setWindowsEnabled(?string $windowsEnabled): Host - { - - if (!is_null($windowsEnabled)) { - Assert::oneOf($windowsEnabled, [ - self::WINDOWS_ENABLE_NO, - self::WINDOWS_ENABLE_YES - ]); - } - - $this->windowsEnabled = $windowsEnabled; - - return $this; - } - - /** - * @return Stats|null - */ - public function getStats(): ?Stats - { - return $this->stats; - } - - /** - * @param Stats|array|null $stats - * @return Host - */ - public function setStats($stats): Host - { - if (is_array($stats)) { - $this->stats = new Stats($stats); - } else { - $this->stats = $stats; - } - - return $this; - } -} diff --git a/lib/Model/HostListResponse.php b/lib/Model/HostListResponse.php deleted file mode 100644 index fbf17fe7..00000000 --- a/lib/Model/HostListResponse.php +++ /dev/null @@ -1,45 +0,0 @@ -setHosts($data['hosts'] ?? null); - } - - /** - * @return Hosts|null - */ - public function getHosts(): ?Hosts - { - return $this->hosts; - } - - /** - * @param Hosts|array|null $hosts - * @return HostListResponse - */ - public function setHosts($hosts): HostListResponse - { - if (is_array($hosts)) { - $this->hosts = new Hosts($hosts); - } else { - $this->hosts = $hosts; - } - - return $this; - } -} diff --git a/lib/Model/HostResponse.php b/lib/Model/HostResponse.php deleted file mode 100644 index 2a9b11a8..00000000 --- a/lib/Model/HostResponse.php +++ /dev/null @@ -1,46 +0,0 @@ -setHost($data['host'] ?? null); - } - - /** - * @return Host|null - */ - public function getHost(): ?Host - { - return $this->host; - } - - /** - * @param Host|array|null $host - * @return HostResponse - */ - public function setHost($host): HostResponse - { - if (is_array($host)) { - $this->host =new Host($host); - } else { - $this->host = $host; - } - - return $this; - } - -} diff --git a/lib/Model/Hosts.php b/lib/Model/Hosts.php deleted file mode 100644 index 8ae7c9b7..00000000 --- a/lib/Model/Hosts.php +++ /dev/null @@ -1,50 +0,0 @@ -setHost($data['host'] ?? null); - } - - /** - * @return Host[]|null - */ - public function getHost(): ?array - { - return $this->host; - } - - /** - * @param Host[]|array|null $host - * @return Hosts - */ - public function setHost(?array $host): Hosts - { - if (is_array($host)) { - foreach ($host as $item) { - $this->host[] = $item instanceof Host - ? $item - : new Host($item); - } - } else { - $this->host = $host; - } - - return $this; - } - -} diff --git a/lib/Model/IpAddress.php b/lib/Model/IpAddress.php deleted file mode 100644 index 191a2ad3..00000000 --- a/lib/Model/IpAddress.php +++ /dev/null @@ -1,296 +0,0 @@ -setAccess($data['access'] ?? null); - $this->setFamily($data['family'] ?? null); - $this->setAddress($data['address'] ?? null); - $this->setPtrRecord($data['ptr_record'] ?? null); - $this->setServer($data['server'] ?? null); - $this->setPartOfPlan($data['part_of_plan'] ?? null); - $this->setMac($data['mac'] ?? null); - $this->setFloating($data['floating'] ?? null); - $this->setZone($data['zone'] ?? null); - } - - /** - * @return string|null - */ - public function getAccess(): ?string - { - return $this->access; - } - - /** - * @param string|null $access - * - * @return IpAddress - * @throws InvalidArgumentException - */ - public function setAccess(?string $access): IpAddress - { - if (!is_null($access)) { - Assert::oneOf($access, [ - self::ACCESS__UTILITY, - self::ACCESS__PRIVATE, - self::ACCESS__PUBLIC - ]); - } - - $this->access = $access; - - return $this; - } - - /** - * @return string|null - */ - public function getFamily(): ?string - { - return $this->family; - } - - /** - * @param string|null $family - * @return IpAddress - */ - public function setFamily(?string $family): IpAddress - { - if (!is_null($family)) { - Assert::oneOf($family, [ - self::FAMILY_IP_V4, - self::FAMILY_IP_V6, - ]); - } - - $this->family = $family; - - return $this; - } - - /** - * @return string|null - */ - public function getAddress(): ?string - { - return $this->address; - } - - /** - * @param string|null $address - * - * @return IpAddress - */ - public function setAddress(?string $address): IpAddress - { - $this->address = $address; - - return $this; - } - - /** - * @return string|null - */ - public function getPtrRecord(): ?string - { - return $this->ptrRecord; - } - - /** - * @param string|null $ptrRecord - * - * @return IpAddress - */ - public function setPtrRecord(?string $ptrRecord): IpAddress - { - $this->ptrRecord = $ptrRecord; - - return $this; - } - - /** - * @return string|null - */ - public function getServer(): ?string - { - return $this->server; - } - - /** - * @param string|null $server - * - * @return IpAddress - */ - public function setServer(?string $server): IpAddress - { - $this->server = $server; - - return $this; - } - - /** - * @return string|null - */ - public function getPartOfPlan(): ?string - { - return $this->partOfPlan; - } - - /** - * @param string|null $partOfPlan - * - * @return IpAddress - */ - public function setPartOfPlan(?string $partOfPlan): IpAddress - { - if (!is_null($partOfPlan)) { - Assert::oneOf($partOfPlan, [ - self::PART_OF_PLAN_NO, - self::PART_OF_PLAN_YES, - ]); - } - - $this->partOfPlan = $partOfPlan; - - return $this; - } - - /** - * @return string|null - */ - public function getMac(): ?string - { - return $this->mac; - } - - /** - * @param string|null $mac - * - * @return IpAddress - */ - public function setMac(?string $mac): IpAddress - { - $this->mac = $mac; - - return $this; - } - - /** - * @return string|null - */ - public function getFloating(): ?string - { - return $this->floating; - } - - /** - * @param string|null $floating - * - * @return IpAddress - */ - public function setFloating(?string $floating): IpAddress - { - if (!is_null($floating)) { - Assert::oneOf($floating, [ - self::FLOATING_NO, - self::FLOATING_YES, - ]); - } - - $this->floating = $floating; - - return $this; - } - - /** - * @return string|null - */ - public function getZone(): ?string - { - return $this->zone; - } - - /** - * @param string|null $zone - * - * @return IpAddress - */ - public function setZone(?string $zone): IpAddress - { - $this->zone = $zone; - - return $this; - } -} diff --git a/lib/Model/IpAddressListResponse.php b/lib/Model/IpAddressListResponse.php deleted file mode 100644 index 250d2cfb..00000000 --- a/lib/Model/IpAddressListResponse.php +++ /dev/null @@ -1,48 +0,0 @@ -setIpAddresses($data['ip_addresses'] ?? null); - } - - /** - * @return IpAddresses|null - */ - public function getIpAddresses(): ?IpAddresses - { - return $this->ipAddresses; - } - - /** - * @param IpAddresses|array|null $ipAddresses - * - * @return IpAddressListResponse - */ - public function setIpAddresses($ipAddresses): IpAddressListResponse - { - if (is_array($ipAddresses)) { - $this->ipAddresses = new IpAddresses($ipAddresses); - } else { - $this->ipAddresses = $ipAddresses; - } - - return $this; - } -} - - diff --git a/lib/Model/IpAddresses.php b/lib/Model/IpAddresses.php deleted file mode 100644 index 1959e338..00000000 --- a/lib/Model/IpAddresses.php +++ /dev/null @@ -1,54 +0,0 @@ -setIpAddress($data['ip_address'] ?? null); - } - - /** - * @return IpAddress[]|null - */ - public function getIpAddress(): ?array - { - return $this->ipAddress; - } - - /** - * @param IpAddress[]|null $ipAddress - * - * @return IpAddresses - */ - public function setIpAddress(?array $ipAddress): IpAddresses - { - if (is_array($ipAddress)) { - foreach ($ipAddress as $address) { - $this->ipAddress[] = $address instanceof IpAddress - ? $address - : new IpAddress($address); - } - } else { - $this->ipAddress = $ipAddress; - } - - return $this; - } - - -} - - diff --git a/lib/Model/IpNetwork.php b/lib/Model/IpNetwork.php deleted file mode 100644 index 4f0b2da5..00000000 --- a/lib/Model/IpNetwork.php +++ /dev/null @@ -1,222 +0,0 @@ -setFamily($data['family'] ?? null); - $this->setAddress($data['address'] ?? null); - $this->setDhcp($data['dhcp'] ?? null); - $this->setDhcpDefaultRoute($data['dhcp_default_route'] ?? null); - $this->setDhcpDns($data['dhcp_dns'] ?? null); - $this->setGateway($data['gateway'] ?? null); - $this->setDhcpBootfileUrl($data['dhcp_bootfile_url'] ?? null); - } - - /** - * @return string|null - */ - public function getFamily(): ?string - { - return $this->family; - } - - /** - * @param string|null $family - * @return IpNetwork - */ - public function setFamily(?string $family): IpNetwork - { - if (!is_null($family)) { - Assert::oneOf($family, [ - self::FAMILY_IP_V4, - self::FAMILY_IP_V6, - ]); - } - - $this->family = $family; - - return $this; - } - - /** - * @return string|null - */ - public function getAddress(): ?string - { - return $this->address; - } - - /** - * @param string|null $address - * - * @return IpNetwork - */ - public function setAddress(?string $address): IpNetwork - { - $this->address = $address; - - return $this; - } - - /** - * @return string|null - */ - public function getDhcp(): ?string - { - return $this->dhcp; - } - - /** - * @param string|null $dhcp - * @return IpNetwork - */ - public function setDhcp(?string $dhcp): IpNetwork - { - if (!is_null($dhcp)) { - Assert::oneOf($dhcp, [ - self::DHCP_NO, - self::DHCP_YES, - ]); - } - - $this->dhcp = $dhcp; - - return $this; - } - - /** - * @return string|null - */ - public function getDhcpDefaultRoute(): ?string - { - return $this->dhcpDefaultRoute; - } - - /** - * @param string|null $dhcpDefaultRoute - * @return IpNetwork - */ - public function setDhcpDefaultRoute(?string $dhcpDefaultRoute): IpNetwork - { - if (!is_null($dhcpDefaultRoute)) { - Assert::oneOf($dhcpDefaultRoute, [ - self::DHCP_DEFAULT_ROUTE_NO, - self::DHCP_DEFAULT_ROUTE_YES, - ]); - } - - $this->dhcpDefaultRoute = $dhcpDefaultRoute; - - return $this; - } - - /** - * @return string[]|null - */ - public function getDhcpDns(): ?array - { - return $this->dhcpDns; - } - - /** - * @param string[]|null $dhcpDns - * @return IpNetwork - */ - public function setDhcpDns(?array $dhcpDns): IpNetwork - { - $this->dhcpDns = $dhcpDns; - - return $this; - } - - /** - * @return string|null - */ - public function getGateway(): ?string - { - return $this->gateway; - } - - /** - * @param string|null $gateway - * @return IpNetwork - */ - public function setGateway(?string $gateway): IpNetwork - { - $this->gateway = $gateway; - - return $this; - } - - /** - * @return string|null - */ - public function getDhcpBootfileUrl(): ?string - { - return $this->dhcpBootfileUrl; - } - - /** - * @param string|null $dhcpBootfileUrl - * @return IpNetwork - */ - public function setDhcpBootfileUrl(?string $dhcpBootfileUrl): IpNetwork - { - $this->dhcpBootfileUrl = $dhcpBootfileUrl; - - return $this; - } -} diff --git a/lib/Model/IpNetworks.php b/lib/Model/IpNetworks.php deleted file mode 100644 index f06085e6..00000000 --- a/lib/Model/IpNetworks.php +++ /dev/null @@ -1,49 +0,0 @@ -setIpNetwork($data['ip_network'] ?? null); - } - - /** - * @return IpNetwork[]|null - */ - public function getIpNetwork(): ?array - { - return $this->ipNetwork; - } - - /** - * @param IpNetwork[]|null $ipNetwork - * @return IpNetworks - */ - public function setIpNetwork(?array $ipNetwork): IpNetworks - { - if (is_array($ipNetwork)) { - foreach ($ipNetwork as $item) { - $this->ipNetwork[] = $item instanceof IpNetwork - ? $item - : new IpNetwork($item); - } - } else { - $this->ipNetwork = $ipNetwork; - } - - return $this; - } -} diff --git a/lib/Model/ModifyHostRequest.php b/lib/Model/ModifyHostRequest.php deleted file mode 100644 index 560814c6..00000000 --- a/lib/Model/ModifyHostRequest.php +++ /dev/null @@ -1,58 +0,0 @@ -setHost($data['host'] ?? null); - } - - /** - * @return Host|null - */ - public function getHost(): ?Host - { - return $this->host; - } - - /** - * @param Host|array|null $host - * @return ModifyHostRequest - */ - public function setHost($host): ModifyHostRequest - { - if (is_array($host)) { - $this->host = new Host($host); - } else { - $this->host = $host; - } - - return $this; - } - - public function __toString() - { - return $this->serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'id', 'zone', 'windows_enabled', 'stats' - ] - ]); - } -} diff --git a/lib/Model/ModifyIpRequest.php b/lib/Model/ModifyIpRequest.php deleted file mode 100644 index 9bf6c3be..00000000 --- a/lib/Model/ModifyIpRequest.php +++ /dev/null @@ -1,51 +0,0 @@ -setIpAddress($data['ip_address'] ?? null); - } - - /** - * @return IpAddress|null - */ - public function getIpAddress(): ?IpAddress - { - return $this->ipAddress; - } - - /** - * @param IpAddress|array|null $ipAddress - * @return ModifyIpRequest - */ - public function setIpAddress($ipAddress): ModifyIpRequest - { - if (is_array($ipAddress)) { - $this->ipAddress = new IpAddress($ipAddress); - } else { - $this->ipAddress = $ipAddress; - } - - return $this; - } -} - - diff --git a/lib/Model/ModifyNetworkInterfaceRequest.php b/lib/Model/ModifyNetworkInterfaceRequest.php deleted file mode 100644 index 57550bee..00000000 --- a/lib/Model/ModifyNetworkInterfaceRequest.php +++ /dev/null @@ -1,19 +0,0 @@ -serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'network', 'type', 'mac' - ] - ]); - } -} diff --git a/lib/Model/ModifyNetworkRequest.php b/lib/Model/ModifyNetworkRequest.php deleted file mode 100644 index 8b18a7fa..00000000 --- a/lib/Model/ModifyNetworkRequest.php +++ /dev/null @@ -1,19 +0,0 @@ -serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'type', 'uuid', 'servers', 'zone', 'address' - ] - ]); - } -} diff --git a/lib/Model/ModifyObjectStorageRequest.php b/lib/Model/ModifyObjectStorageRequest.php deleted file mode 100644 index b2411c37..00000000 --- a/lib/Model/ModifyObjectStorageRequest.php +++ /dev/null @@ -1,19 +0,0 @@ -serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'uuid', 'name', 'zone', 'state', 'url', 'created', 'usedSpace' - ] - ]); - } -} diff --git a/lib/Model/ModifyServerRequest.php b/lib/Model/ModifyServerRequest.php deleted file mode 100644 index 799f7179..00000000 --- a/lib/Model/ModifyServerRequest.php +++ /dev/null @@ -1,23 +0,0 @@ -serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'avoidHost', 'host', 'networking', 'loginUser', 'ipAddresses', 'license', 'metadata', - 'passwordDelivery', 'planIpv4Bytes', 'planIpv6Bytes', 'state', 'storageDevices', - 'tags', 'uuid', 'userData', 'zone' - ] - ]); - } -} - - diff --git a/lib/Model/ModifyStorageRequest.php b/lib/Model/ModifyStorageRequest.php deleted file mode 100644 index 388ae557..00000000 --- a/lib/Model/ModifyStorageRequest.php +++ /dev/null @@ -1,20 +0,0 @@ -serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'access', 'backups', 'license', 'servers', 'state', - 'tier', 'type', 'uuid', 'zone', 'origin', 'created' - ] - ]); - } -} diff --git a/lib/Model/ModifyTagRequest.php b/lib/Model/ModifyTagRequest.php deleted file mode 100644 index 4c6100db..00000000 --- a/lib/Model/ModifyTagRequest.php +++ /dev/null @@ -1,49 +0,0 @@ -tag = $data['tag'] ?? null; - } - - /** - * @return Tag|null - */ - public function getTag(): ?Tag - { - return $this->tag; - } - - /** - * @param Tag|array|null $tag - * @return ModifyTagRequest - */ - public function setTag($tag): ModifyTagRequest - { - if (is_array($tag)) { - $this->tag = new Tag($tag); - } else { - $this->tag = $tag; - } - - return $this; - } -} diff --git a/lib/Model/Network.php b/lib/Model/Network.php deleted file mode 100644 index 14b5b893..00000000 --- a/lib/Model/Network.php +++ /dev/null @@ -1,219 +0,0 @@ -setName($data['name'] ?? null); - $this->setType($data['type'] ?? null); - $this->setUuid($data['uuid'] ?? null); - $this-> setZone($data['zone'] ?? null); - $this->setRouter($data['router'] ?? null); - $this->setIpNetworks($data['ip_networks'] ?? null); - $this->setServers($data['servers'] ?? null); - } - - /** - * @return string|null - */ - public function getName(): ?string - { - return $this->name; - } - - /** - * @param string|null $name - * @return Network - */ - public function setName(?string $name): Network - { - $this->name = $name; - - return $this; - } - - /** - * @return string|null - */ - public function getType(): ?string - { - return $this->type; - } - - /** - * @param string|null $type - * @return Network - */ - public function setType(?string $type): Network - { - if (!is_null($type)) { - Assert::oneOf($type, [ - self::TYPE_PRIVATE, - self::TYPE_PUBLIC, - self::TYPE_UTILITY, - ]); - } - - $this->type = $type; - - return $this; - } - - /** - * @return string|null - */ - public function getUuid(): ?string - { - return $this->uuid; - } - - /** - * @param string|null $uuid - * @return Network - */ - public function setUuid(?string $uuid): Network - { - if (!is_null($uuid)) { - Assert::uuid($uuid); - } - - $this->uuid = $uuid; - - return $this; - } - - /** - * @return string|null - */ - public function getZone(): ?string - { - return $this->zone; - } - - /** - * @param string|null $zone - * @return Network - */ - public function setZone(?string $zone): Network - { - $this->zone = $zone; - - return $this; - } - - /** - * @return string|null - */ - public function getRouter(): ?string - { - return $this->router; - } - - /** - * @param string|null $router - * @return Network - */ - public function setRouter(?string $router): Network - { - $this->router = $router; - - return $this; - } - - /** - * @return IpNetworks|null - */ - public function getIpNetworks(): ?IpNetworks - { - return $this->ipNetworks; - } - - /** - * @param IpNetworks|array|null $ipNetworks - * @return Network - */ - public function setIpNetworks($ipNetworks): Network - { - if (is_array($ipNetworks)) { - $this->ipNetworks = new IpNetworks($ipNetworks); - } else { - $this->ipNetworks = $ipNetworks; - } - - - return $this; - } - - /** - * @return Servers|null - */ - public function getServers(): ?Servers - { - return $this->servers; - } - - /** - * @param Servers|array|null $servers - * @return Network - */ - public function setServers($servers): Network - { - if (is_array($servers)) { - $this->servers = new Servers($servers); - } else { - $this->servers = $servers; - } - - return $this; - } -} diff --git a/lib/Model/NetworkInterface.php b/lib/Model/NetworkInterface.php deleted file mode 100644 index ca119f23..00000000 --- a/lib/Model/NetworkInterface.php +++ /dev/null @@ -1,234 +0,0 @@ -setNetwork($data['network'] ?? null); - $this->setType($data['type'] ?? null); - $this->setIndex($data['index'] ?? null); - $this->setIpAddresses($data['ip_addresses'] ?? null); - $this->setSourceIpFiltering($data['source_ip_filtering'] ?? null); - $this->setBootable($data['bootable'] ?? null); - $this->setMac($data['mac'] ?? null); - } - - /** - * @return string|null - */ - public function getNetwork(): ?string - { - return $this->network; - } - - /** - * @param string|null $network - * @return NetworkInterface - */ - public function setNetwork(?string $network): NetworkInterface - { - if (!is_null($network)) { - Assert::uuid($network); - } - - $this->network = $network; - - return $this; - } - - /** - * @return string|null - */ - public function getType(): ?string - { - return $this->type; - } - - /** - * @param string|null $type - * @return NetworkInterface - */ - public function setType(?string $type): NetworkInterface - { - if (!is_null($type)) { - Assert::oneOf($type, [ - self::TYPE__PUBLIC, - self::TYPE__PRIVATE, - self::TYPE__UTILITY - ]); - } - - $this->type = $type; - - return $this; - } - - /** - * @return int|null - */ - public function getIndex(): ?int - { - return $this->index; - } - - /** - * @param int|null $index - * @return NetworkInterface - */ - public function setIndex(?int $index): NetworkInterface - { - $this->index = $index; - - return $this; - } - - /** - * @return IpAddresses|null - */ - public function getIpAddresses(): ?IpAddresses - { - return $this->ipAddresses; - } - - /** - * @param IpAddresses|array|null $ipAddresses - * - * @return NetworkInterface - */ - public function setIpAddresses($ipAddresses): NetworkInterface - { - if (is_array($ipAddresses)) { - $this->ipAddresses = new IpAddresses($ipAddresses); - } else { - $this->ipAddresses = $ipAddresses; - } - - return $this; - } - - /** - * @return string|null - */ - public function getSourceIpFiltering(): ?string - { - return $this->sourceIpFiltering; - } - - /** - * @param string|null $sourceIpFiltering - * @return NetworkInterface - */ - public function setSourceIpFiltering(?string $sourceIpFiltering): NetworkInterface - { - if (!is_null($sourceIpFiltering)) { - Assert::oneOf($sourceIpFiltering, [ - self::SOURCE_IP_FILTERING_YES, - self::SOURCE_IP_FILTERING_NO - ]); - } - - $this->sourceIpFiltering = $sourceIpFiltering; - - return $this; - } - - /** - * @return string|null - */ - public function getBootable(): ?string - { - return $this->bootable; - } - - /** - * @param string|null $bootable - * @return NetworkInterface - */ - public function setBootable(?string $bootable): NetworkInterface - { - if (!is_null($bootable)) { - Assert::oneOf($bootable, [ - self::BOOTABLE_NO, - self::BOOTABLE_YES - ]); - } - - $this->bootable = $bootable; - - return $this; - } - - /** - * @return string|null - */ - public function getMac(): ?string - { - return $this->mac; - } - - /** - * @param string|null $mac - * @return NetworkInterface - */ - public function setMac(?string $mac): NetworkInterface - { - $this->mac = $mac; - - return $this; - } -} diff --git a/lib/Model/NetworkInterfaceList.php b/lib/Model/NetworkInterfaceList.php deleted file mode 100644 index 67267848..00000000 --- a/lib/Model/NetworkInterfaceList.php +++ /dev/null @@ -1,45 +0,0 @@ -setInterfaces($data['interfaces'] ?? null); - } - - /** - * @return NetworkInterfaces|null - */ - public function getInterfaces(): ?NetworkInterfaces - { - return $this->interfaces; - } - - /** - * @param NetworkInterfaces|array|null $interfaces - * @return NetworkInterfaceList - */ - public function setInterfaces($interfaces): NetworkInterfaceList - { - if (is_array($interfaces)) { - $this->interfaces = new NetworkInterfaces($interfaces); - } else { - $this->interfaces = $interfaces; - } - - return $this; - } -} diff --git a/lib/Model/NetworkInterfaceRequest.php b/lib/Model/NetworkInterfaceRequest.php deleted file mode 100644 index 7a32b376..00000000 --- a/lib/Model/NetworkInterfaceRequest.php +++ /dev/null @@ -1,48 +0,0 @@ -setInterface($data['interface'] ?? null); - } - - /** - * @return NetworkInterface|null - */ - public function getInterface(): ?NetworkInterface - { - return $this->interface; - } - - /** - * @param NetworkInterface|array|null $interface - * @return NetworkInterfaceRequest - */ - public function setInterface(?array $interface): NetworkInterfaceRequest - { - if (is_array($interface)) { - $this->interface = new NetworkInterface($interface); - } else { - $this->interface = $interface; - } - - return $this; - } -} diff --git a/lib/Model/NetworkInterfaceResponse.php b/lib/Model/NetworkInterfaceResponse.php deleted file mode 100644 index 7a4a65d8..00000000 --- a/lib/Model/NetworkInterfaceResponse.php +++ /dev/null @@ -1,47 +0,0 @@ -setInterface($data['interface'] ?? null); - } - - /** - * @return NetworkInterface|null - */ - public function getInterface(): ?array - { - return $this->interface; - } - - /** - * @param NetworkInterface|array|null $interface - * @return NetworkInterfaceResponse - */ - public function setInterface(?array $interface): NetworkInterfaceResponse - { - if (is_array($interface)) { - $this->interface[] = $interface instanceof NetworkInterface - ? $interface - : new NetworkInterface($interface); - } else { - $this->interface = $interface; - } - - return $this; - } -} diff --git a/lib/Model/NetworkInterfaces.php b/lib/Model/NetworkInterfaces.php deleted file mode 100644 index 5b29878d..00000000 --- a/lib/Model/NetworkInterfaces.php +++ /dev/null @@ -1,47 +0,0 @@ -setInterface($data['interface'] ?? null); - } - - /** - * @return NetworkInterface[]|null - */ - public function getInterface(): ?array - { - return $this->interface; - } - - /** - * @param NetworkInterface[]|null $interface - * @return NetworkInterfaces - */ - public function setInterface(?array $interface): NetworkInterfaces - { - if (is_array($interface)) { - foreach ($interface as $item) { - $this->interface[] = $item instanceof NetworkInterface ? $item : new NetworkInterface($item); - } - } else { - $this->interface = $interface; - } - - return $this; - } -} diff --git a/lib/Model/NetworkRequest.php b/lib/Model/NetworkRequest.php deleted file mode 100644 index 4b344127..00000000 --- a/lib/Model/NetworkRequest.php +++ /dev/null @@ -1,48 +0,0 @@ -setNetwork($data['network'] ?? null); - } - - /** - * @return Network|null - */ - public function getNetwork(): ?Network - { - return $this->network; - } - - /** - * @param Network|array|null $network - * @return NetworkRequest - */ - public function setNetwork($network): NetworkRequest - { - if (is_array($network)) { - $this->network = new Network($network); - } else { - $this->network = $network; - } - - return $this; - } -} diff --git a/lib/Model/NetworkResponse.php b/lib/Model/NetworkResponse.php deleted file mode 100644 index 6e1e6274..00000000 --- a/lib/Model/NetworkResponse.php +++ /dev/null @@ -1,48 +0,0 @@ -setNetwork($data['network'] ?? null); - } - - /** - * @return Network|null - */ - public function getNetwork(): ?Network - { - return $this->network; - } - - /** - * @param Network|array|null $network - * @return NetworkResponse - */ - public function setNetwork($network): NetworkResponse - { - if (is_array($network)) { - $this->network = new Network($network); - } else { - $this->network = $network; - } - - return $this; - } - -} - - diff --git a/lib/Model/Networks.php b/lib/Model/Networks.php deleted file mode 100644 index 1fb9e5f6..00000000 --- a/lib/Model/Networks.php +++ /dev/null @@ -1,49 +0,0 @@ -setNetwork($data['network'] ?? null); - } - - /** - * @return Network[]|null - */ - public function getNetwork(): ?array - { - return $this->network; - } - - /** - * @param Network[]|null $network - * @return Networks - */ - public function setNetwork(?array $network): Networks - { - if (is_array($network)) { - foreach ($network as $item) { - $this->network[] = $item instanceof Network - ? $item - : new Network($item); - } - } else { - $this->network = $network; - } - - return $this; - } -} diff --git a/lib/Model/NetworksListResponse.php b/lib/Model/NetworksListResponse.php deleted file mode 100644 index debdb2b0..00000000 --- a/lib/Model/NetworksListResponse.php +++ /dev/null @@ -1,48 +0,0 @@ -setNetworks($data['networks'] ?? null); - } - - /** - * @return Networks|null - */ - public function getNetworks(): ?Networks - { - return $this->networks; - } - - /** - * @param Networks|array|null $networks - * @return NetworksListResponse - */ - public function setNetworks($networks): NetworksListResponse - { - - if (is_array($networks)) { - $this->networks = new Networks($networks); - } else { - $this->networks = $networks; - } - - return $this; - } -} - - diff --git a/lib/Model/ObjectStorage.php b/lib/Model/ObjectStorage.php deleted file mode 100644 index 2807c957..00000000 --- a/lib/Model/ObjectStorage.php +++ /dev/null @@ -1,317 +0,0 @@ -setUuid($data['uuid'] ?? null); - $this->setName($data['name'] ?? null); - $this->setDescription($data['description'] ?? null); - $this->setZone($data['zone'] ?? null); - $this->setSize($data['size'] ?? null); - $this->setState($data['state'] ?? null); - $this->setUrl($data['url'] ?? null); - $this->setCreated($data['created'] ?? null); - $this->setAccessKey($data['access_key'] ?? null); - $this->setSecretKey($data['secret_key'] ?? null); - $this->setUsedSpace($data['used_space'] ?? null); - } - - /** - * @return string|null - */ - public function getUuid(): ?string - { - return $this->uuid; - } - - /** - * @param string|null $uuid - * @return ObjectStorage - */ - public function setUuid(?string $uuid): ObjectStorage - { - if (!is_null($uuid)) { - Assert::uuid($uuid); - } - - $this->uuid = $uuid; - - return $this; - } - - /** - * @return string|null - */ - public function getName(): ?string - { - return $this->name; - } - - /** - * @param string|null $name - * @return ObjectStorage - */ - public function setName(?string $name): ObjectStorage - { - if (!is_null($name)) { - Assert::range(strlen($name), 3, 32); - } - - $this->name = $name; - - return $this; - } - - /** - * @return string|null - */ - public function getDescription(): ?string - { - return $this->description; - } - - /** - * @param string|null $description - * @return ObjectStorage - */ - public function setDescription(?string $description): ObjectStorage - { - if (!is_null($description)) { - Assert::range(strlen($description), 1, 255); - } - - $this->description = $description; - - return $this; - } - - /** - * @return string|null - */ - public function getZone(): ?string - { - return $this->zone; - } - - /** - * @param string|null $zone - * @return ObjectStorage - */ - public function setZone(?string $zone): ObjectStorage - { - $this->zone = $zone; - - return $this; - } - - /** - * @return int|null - */ - public function getSize(): ?int - { - return $this->size; - } - - /** - * @param int|null $size - * @return ObjectStorage - */ - public function setSize(?int $size): ObjectStorage - { - if (!is_null($size)) { - Assert::oneOf($size, [250, 500, 1000]); - } - - $this->size = $size; - - return $this; - } - - /** - * @return int|null - */ - public function getUsedSpace(): ?int - { - return $this->usedSpace; - } - - /** - * @param int|null $usedSpace - * @return ObjectStorage - */ - public function setUsedSpace(?int $usedSpace): ObjectStorage - { - $this->usedSpace = $usedSpace; - - return $this; - } - - /** - * @return string|null - */ - public function getState(): ?string - { - return $this->state; - } - - /** - * @param string|null $state - * @return ObjectStorage - */ - public function setState(?string $state): ObjectStorage - { - $this->state = $state; - - return $this; - } - - /** - * @return string|null - */ - public function getUrl(): ?string - { - return $this->url; - } - - /** - * @param string|null $url - * @return ObjectStorage - */ - public function setUrl(?string $url): ObjectStorage - { - $this->url = $url; - - return $this; - } - - /** - * @return string|null - */ - public function getCreated(): ?string - { - return $this->created; - } - - /** - * @param string|null $created - * @return ObjectStorage - */ - public function setCreated(?string $created): ObjectStorage - { - $this->created = $created; - - return $this; - } - - /** - * @return string|null - */ - public function getAccessKey(): ?string - { - return $this->accessKey; - } - - /** - * @param string|null $accessKey - * @return ObjectStorage - */ - public function setAccessKey(?string $accessKey): ObjectStorage - { - if (!is_null($accessKey)) { - Assert::range(strlen($accessKey), 4, 255); - } - - $this->accessKey = $accessKey; - - return $this; - } - - /** - * @return string|null - */ - public function getSecretKey(): ?string - { - return $this->secretKey; - } - - /** - * @param string|null $secretKey - * @return ObjectStorage - */ - public function setSecretKey(?string $secretKey): ObjectStorage - { - if (!is_null($secretKey)) { - Assert::range(strlen($secretKey), 8, 255); - } - - $this->secretKey = $secretKey; - - return $this; - } -} diff --git a/lib/Model/ObjectStorageListResponse.php b/lib/Model/ObjectStorageListResponse.php deleted file mode 100644 index 816bc9be..00000000 --- a/lib/Model/ObjectStorageListResponse.php +++ /dev/null @@ -1,45 +0,0 @@ -setObjectStorages($data['object_storages'] ?? null); - } - - /** - * @return ObjectStorages|null - */ - public function getObjectStorages(): ?ObjectStorages - { - return $this->objectStorages; - } - - /** - * @param ObjectStorages|array|null $objectStorages - * @return ObjectStorageListResponse - */ - public function setObjectStorages($objectStorages): ObjectStorageListResponse - { - if (is_array($objectStorages)) { - $this->objectStorages = new ObjectStorages($objectStorages); - } else { - $this->objectStorages = $objectStorages; - } - - return $this; - } -} diff --git a/lib/Model/ObjectStorageRequest.php b/lib/Model/ObjectStorageRequest.php deleted file mode 100644 index a7d161f9..00000000 --- a/lib/Model/ObjectStorageRequest.php +++ /dev/null @@ -1,48 +0,0 @@ -setObjectStorage($data['object_storage'] ?? null); - } - - /** - * @return ObjectStorage|null - */ - public function getObjectStorage(): ?ObjectStorage - { - return $this->objectStorage; - } - - /** - * @param ObjectStorage|array|null $objectStorage - * @return $this - */ - public function setObjectStorage($objectStorage): self - { - if (is_array($objectStorage)) { - $this->objectStorage = new ObjectStorage($objectStorage); - } else { - $this->objectStorage = $objectStorage; - } - - return $this; - } -} diff --git a/lib/Model/ObjectStorageResponse.php b/lib/Model/ObjectStorageResponse.php deleted file mode 100644 index 9ea20f1d..00000000 --- a/lib/Model/ObjectStorageResponse.php +++ /dev/null @@ -1,46 +0,0 @@ -setObjectStorage($data['object_storage'] ?? null); - } - - /** - * @return ObjectStorage|null - */ - public function getObjectStorage(): ?ObjectStorage - { - return $this->objectStorage; - } - - /** - * @param ObjectStorage|array|null $objectStorage - * @return ObjectStorageResponse - */ - public function setObjectStorage($objectStorage): ObjectStorageResponse - { - if (is_array($objectStorage)) { - $this->objectStorage =new ObjectStorage($objectStorage); - } else { - $this->objectStorage = $objectStorage; - } - - return $this; - } - -} diff --git a/lib/Model/ObjectStorages.php b/lib/Model/ObjectStorages.php deleted file mode 100644 index 3e193bc1..00000000 --- a/lib/Model/ObjectStorages.php +++ /dev/null @@ -1,47 +0,0 @@ -setObjectStorage($data['object_storage'] ?? null); - } - - /** - * @return ObjectStorage[]|null - */ - public function getObjectStorage(): ?array - { - return $this->objectStorage; - } - - /** - * @param ObjectStorage[]|array|null $objectStorage - * @return ObjectStorages - */ - public function setObjectStorage(?array $objectStorage): ObjectStorages - { - if (is_array($objectStorage)) { - foreach ($objectStorage as $item) { - $this->objectStorage[] = $item instanceof ObjectStorage ? $item : new ObjectStorage($item); - } - } else { - $this->objectStorage = $objectStorage; - } - - return $this; - } -} diff --git a/lib/Model/Plan.php b/lib/Model/Plan.php deleted file mode 100644 index 948f208a..00000000 --- a/lib/Model/Plan.php +++ /dev/null @@ -1,168 +0,0 @@ -setCoreNumber($data['core_number'] ?? null); - $this->setMemoryAmount($data['memory_amount'] ?? null); - $this->setName($data['name'] ?? null); - $this->setPublicTrafficOut($data['public_traffic_out'] ?? null); - $this->setStorageSize($data['storage_size'] ?? null); - $this->setStorageTier($data['storage_tier'] ?? null); - } - - /** - * @return float|null - */ - public function getCoreNumber(): ?float - { - return $this->coreNumber; - } - - /** - * @param float|null $coreNumber - * @return Plan - */ - public function setCoreNumber(?float $coreNumber): Plan - { - $this->coreNumber = $coreNumber; - - return $this; - } - - /** - * @return float|null - */ - public function getMemoryAmount(): ?float - { - return $this->memoryAmount; - } - - /** - * @param float|null $memoryAmount - * @return Plan - */ - public function setMemoryAmount(?float $memoryAmount): Plan - { - $this->memoryAmount = $memoryAmount; - - return $this; - } - - /** - * @return string|null - */ - public function getName(): ?string - { - return $this->name; - } - - /** - * @param string|null $name - * @return Plan - */ - public function setName(?string $name): Plan - { - $this->name = $name; - - return $this; - } - - /** - * @return float|null - */ - public function getPublicTrafficOut(): ?float - { - return $this->publicTrafficOut; - } - - /** - * @param float|null $publicTrafficOut - * @return Plan - */ - public function setPublicTrafficOut(?float $publicTrafficOut): Plan - { - $this->publicTrafficOut = $publicTrafficOut; - - return $this; - } - - /** - * @return float|null - */ - public function getStorageSize(): ?float - { - return $this->storageSize; - } - - /** - * @param float|null $storageSize - * @return Plan - */ - public function setStorageSize(?float $storageSize): Plan - { - $this->storageSize = $storageSize; - - return $this; - } - - /** - * @return string|null - */ - public function getStorageTier(): ?string - { - return $this->storageTier; - } - - /** - * @param string|null $storageTier - * @return Plan - */ - public function setStorageTier(?string $storageTier): Plan - { - $this->storageTier = $storageTier; - - return $this; - } -} - - diff --git a/lib/Model/Price.php b/lib/Model/Price.php deleted file mode 100644 index 19c9ff65..00000000 --- a/lib/Model/Price.php +++ /dev/null @@ -1,68 +0,0 @@ -setAmount($data['amount'] ?? null); - $this->setPrice($data['price'] ?? null); - } - - /** - * @return float|null - */ - public function getAmount(): ?float - { - return $this->amount; - } - - /** - * @param float|null $amount - * @return Price - */ - public function setAmount(?float $amount): Price - { - $this->amount = $amount; - - return $this; - } - - /** - * @return float|null - */ - public function getPrice(): ?float - { - return $this->price; - } - - /** - * @param float|null $price - * @return Price - */ - public function setPrice(?float $price): Price - { - $this->price = $price; - - return $this; - } -} - - diff --git a/lib/Model/PriceListResponse.php b/lib/Model/PriceListResponse.php deleted file mode 100644 index ec4d8346..00000000 --- a/lib/Model/PriceListResponse.php +++ /dev/null @@ -1,47 +0,0 @@ -setPrices($data['prices'] ?? null); - } - - /** - * @return PriceListResponsePrices|null - */ - public function getPrices(): ?PriceListResponsePrices - { - return $this->prices; - } - - /** - * @param PriceListResponsePrices|array|null $prices - * @return PriceListResponse - */ - public function setPrices($prices): PriceListResponse - { - if (is_array($prices)) { - $this->prices = new PriceListResponsePrices($prices); - } else { - $this->prices = $prices; - } - - return $this; - } -} - - diff --git a/lib/Model/PriceListResponsePrices.php b/lib/Model/PriceListResponsePrices.php deleted file mode 100644 index ca82a80e..00000000 --- a/lib/Model/PriceListResponsePrices.php +++ /dev/null @@ -1,51 +0,0 @@ -setZone($data['zone'] ?? null); - } - - /** - * @return PriceZone[]|null - */ - public function getZone(): ?array - { - return $this->zone; - } - - /** - * @param PriceZone[]|null $zone - * @return PriceListResponsePrices - */ - public function setZone(?array $zone): PriceListResponsePrices - { - if (is_array($zone)) { - foreach ($zone as $item) { - $this->zone[] = $item instanceof PriceZone - ? $item - : new PriceZone($item); - } - } else { - $this->zone = $zone; - } - - return $this; - } -} - - diff --git a/lib/Model/PriceZone.php b/lib/Model/PriceZone.php deleted file mode 100644 index 86b4d202..00000000 --- a/lib/Model/PriceZone.php +++ /dev/null @@ -1,769 +0,0 @@ -setName($data['name'] ?? null); - $this->setFirewall($data['firewall'] ?? null); - $this->setIoRequestBackup($data['io_request_backup'] ?? null); - $this->setIoRequestHdd($data['io_request_hdd'] ?? null); - $this->setIoRequestMaxiops($data['io_request_maxiops'] ?? null); - $this->setIpv4Address($data['ipv4_address'] ?? null); - $this->setIpv6Address($data['ipv6_address'] ?? null); - $this->setPublicIpv4BandwidthIn($data['public_ipv4_bandwidth_in'] ?? null); - $this->setPublicIpv4BandwidthOut($data['public_ipv4_bandwidth_out'] ?? null); - $this->setPublicIpv6BandwidthIn($data['public_ipv6_bandwidth_in'] ?? null); - $this->setPublicIpv6BandwidthOut($data['public_ipv6_bandwidth_out'] ?? null); - $this->setServerCore($data['server_core'] ?? null); - $this->setServerMemory($data['server_memory'] ?? null); - $this->setStorageBackup($data['storage_backup'] ?? null); - $this->setStorageHdd($data['storage_hdd'] ?? null); - $this->setStorageMaxiops($data['storage_maxiops'] ?? null); - $this->setServerPlan1xCpu1Gb($data['server_plan_1xCPU-1GB'] ?? null); - $this->setServerPlan1xCpu2Gb($data['server_plan_1xCPU-2GB'] ?? null); - $this->setServerPlan20xCpu128Gb($data['server_plan_20xCPU-128GB'] ?? null); - $this->setServerPlan20xCpu96Gb($data['server_plan_20xCPU-96GB'] ?? null); - $this->setServerPlan2xCpu4Gb($data['server_plan_2xCPU-4GB'] ?? null); - $this->setServerPlan4xCpu8Gb($data['server_plan_4xCPU-8GB'] ?? null); - $this->setServerPlan6xCpu16Gb($data['server_plan_6xCPU-16GB'] ?? null); - $this->setServerPlan8xCpu32Gb($data['server_plan_8xCPU-32GB'] ?? null); - $this->setServerPlan12xCpu48Gb($data['server_plan_12xCPU-48GB'] ?? null); - $this->setServerPlan16xCpu64Gb($data['server_plan_16xCPU-64GB'] ?? null); - } - - /** - * @return string|null - */ - public function getName(): ?string - { - return $this->name; - } - - /** - * @param string|null $name - * @return PriceZone - */ - public function setName(?string $name): PriceZone - { - $this->name = $name; - - return $this; - } - - /** - * @return Price|null - */ - public function getFirewall(): ?Price - { - return $this->firewall; - } - - /** - * @param Price|array|null $firewall - * @return PriceZone - */ - public function setFirewall($firewall): PriceZone - { - if (is_array($firewall)) { - $this->firewall = new Price($firewall); - } else { - $this->firewall = $firewall; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getIoRequestBackup(): ?Price - { - return $this->ioRequestBackup; - } - - /** - * @param Price|array|null $ioRequestBackup - * @return PriceZone - */ - public function setIoRequestBackup($ioRequestBackup): PriceZone - { - if (is_array($ioRequestBackup)) { - $this->ioRequestBackup = new Price($ioRequestBackup); - } else { - $this->ioRequestBackup = $ioRequestBackup; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getIoRequestHdd(): ?Price - { - return $this->ioRequestHdd; - } - - /** - * @param Price|array|null $ioRequestHdd - * @return PriceZone - */ - public function setIoRequestHdd($ioRequestHdd): PriceZone - { - if (is_array($ioRequestHdd)) { - $this->ioRequestHdd = new Price($ioRequestHdd); - } else { - $this->ioRequestHdd = $ioRequestHdd; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getIoRequestMaxiops(): ?Price - { - return $this->ioRequestMaxiops; - } - - /** - * @param Price|array|null $ioRequestMaxiops - * @return PriceZone - */ - public function setIoRequestMaxiops($ioRequestMaxiops): PriceZone - { - if (is_array($ioRequestMaxiops)) { - $this->ioRequestMaxiops = new Price($ioRequestMaxiops); - } else { - $this->ioRequestMaxiops = $ioRequestMaxiops; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getIpv4Address(): ?Price - { - return $this->ipv4Address; - } - - /** - * @param Price|array|null $ipv4Address - * @return PriceZone - */ - public function setIpv4Address($ipv4Address): PriceZone - { - if (is_array($ipv4Address)) { - $this->ipv4Address = new Price($ipv4Address); - } else { - $this->ipv4Address = $ipv4Address; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getIpv6Address(): ?Price - { - return $this->ipv6Address; - } - - /** - * @param Price|array|null $ipv6Address - * @return PriceZone - */ - public function setIpv6Address($ipv6Address): PriceZone - { - if (is_array($ipv6Address)) { - $this->ipv6Address = new Price($ipv6Address); - } else { - $this->ipv6Address = $ipv6Address; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getPublicIpv4BandwidthIn(): ?Price - { - return $this->publicIpv4BandwidthIn; - } - - /** - * @param Price|array|null $publicIpv4BandwidthIn - * @return PriceZone - */ - public function setPublicIpv4BandwidthIn($publicIpv4BandwidthIn): PriceZone - { - - if (is_array($publicIpv4BandwidthIn)) { - $this->publicIpv4BandwidthIn = new Price($publicIpv4BandwidthIn); - } else { - $this->publicIpv4BandwidthIn = $publicIpv4BandwidthIn; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getPublicIpv4BandwidthOut(): ?Price - { - return $this->publicIpv4BandwidthOut; - } - - /** - * @param Price|array|null $publicIpv4BandwidthOut - * @return PriceZone - */ - public function setPublicIpv4BandwidthOut($publicIpv4BandwidthOut): PriceZone - { - if (is_array($publicIpv4BandwidthOut)) { - $this->publicIpv4BandwidthOut = new Price($publicIpv4BandwidthOut); - } else { - $this->publicIpv4BandwidthOut = $publicIpv4BandwidthOut; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getPublicIpv6BandwidthIn(): ?Price - { - return $this->publicIpv6BandwidthIn; - } - - /** - * @param Price|array|null $publicIpv6BandwidthIn - * @return PriceZone - */ - public function setPublicIpv6BandwidthIn($publicIpv6BandwidthIn): PriceZone - { - if (is_array($publicIpv6BandwidthIn)) { - $this->publicIpv6BandwidthIn = new Price($publicIpv6BandwidthIn); - } else { - $this->publicIpv6BandwidthIn = $publicIpv6BandwidthIn; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getPublicIpv6BandwidthOut(): ?Price - { - return $this->publicIpv6BandwidthOut; - } - - /** - * @param Price|array|null $publicIpv6BandwidthOut - * @return PriceZone - */ - public function setPublicIpv6BandwidthOut($publicIpv6BandwidthOut): PriceZone - { - if (is_array($publicIpv6BandwidthOut)) { - $this->publicIpv6BandwidthOut = new Price($publicIpv6BandwidthOut); - } else { - $this->publicIpv6BandwidthOut = $publicIpv6BandwidthOut; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getServerCore(): ?Price - { - return $this->serverCore; - } - - /** - * @param Price|array|null $serverCore - * @return PriceZone - */ - public function setServerCore($serverCore): PriceZone - { - if (is_array($serverCore)) { - $this->serverCore = new Price($serverCore); - } else { - $this->serverCore = $serverCore; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getServerMemory(): ?Price - { - return $this->serverMemory; - } - - /** - * @param Price|array|null $serverMemory - * @return PriceZone - */ - public function setServerMemory($serverMemory): PriceZone - { - if (is_array($serverMemory)) { - $this->serverMemory = new Price($serverMemory); - } else { - $this->serverMemory = $serverMemory; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getStorageBackup(): ?Price - { - return $this->storageBackup; - } - - /** - * @param Price|array|null $storageBackup - * @return PriceZone - */ - public function setStorageBackup($storageBackup): PriceZone - { - if (is_array($storageBackup)) { - $this->storageBackup = new Price($storageBackup); - } else { - $this->storageBackup = $storageBackup; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getStorageHdd(): ?Price - { - return $this->storageHdd; - } - - /** - * @param Price|array|null $storageHdd - * @return PriceZone - */ - public function setStorageHdd($storageHdd): PriceZone - { - if (is_array($storageHdd)) { - $this->storageHdd = new Price($storageHdd); - } else { - $this->storageHdd = $storageHdd; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getStorageMaxiops(): ?Price - { - return $this->storageMaxiops; - } - - /** - * @param Price|array|null $storageMaxiops - * @return PriceZone - */ - public function setStorageMaxiops($storageMaxiops): PriceZone - { - if (is_array($storageMaxiops)) { - $this->storageMaxiops = new Price($storageMaxiops); - } else { - $this->storageMaxiops = $storageMaxiops; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getServerPlan1xCpu1Gb(): ?Price - { - return $this->serverPlan1xCpu1Gb; - } - - /** - * @param Price|array|null $serverPlan1xCpu1Gb - * @return PriceZone - */ - public function setServerPlan1xCpu1Gb($serverPlan1xCpu1Gb): PriceZone - { - if (is_array($serverPlan1xCpu1Gb)) { - $this->serverPlan1xCpu1Gb = new Price($serverPlan1xCpu1Gb); - } else { - $this->serverPlan1xCpu1Gb = $serverPlan1xCpu1Gb; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getServerPlan1xCpu2Gb(): ?Price - { - return $this->serverPlan1xCpu2Gb; - } - - /** - * @param Price|array|null $serverPlan1xCpu2Gb - * @return PriceZone - */ - public function setServerPlan1xCpu2Gb($serverPlan1xCpu2Gb): PriceZone - { - if (is_array($serverPlan1xCpu2Gb)) { - $this->serverPlan1xCpu2Gb = new Price($serverPlan1xCpu2Gb); - } else { - $this->serverPlan1xCpu2Gb = $serverPlan1xCpu2Gb; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getServerPlan20xCpu128Gb(): ?Price - { - return $this->serverPlan20xCpu128Gb; - } - - /** - * @param Price|array|null $serverPlan20xCpu128Gb - * @return PriceZone - */ - public function setServerPlan20xCpu128Gb($serverPlan20xCpu128Gb): PriceZone - { - if (is_array($serverPlan20xCpu128Gb)) { - $this->serverPlan20xCpu128Gb = new Price($serverPlan20xCpu128Gb); - } else { - $this->serverPlan20xCpu128Gb = $serverPlan20xCpu128Gb; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getServerPlan20xCpu96Gb(): ?Price - { - return $this->serverPlan20xCpu96Gb; - } - - /** - * @param Price|array|null $serverPlan20xCpu96Gb - * @return PriceZone - */ - public function setServerPlan20xCpu96Gb($serverPlan20xCpu96Gb): PriceZone - { - if (is_array($serverPlan20xCpu96Gb)) { - $this->serverPlan20xCpu96Gb = new Price($serverPlan20xCpu96Gb); - } else { - $this->serverPlan20xCpu96Gb = $serverPlan20xCpu96Gb; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getServerPlan2xCpu4Gb(): ?Price - { - return $this->serverPlan2xCpu4Gb; - } - - /** - * @param Price|array|null $serverPlan2xCpu4Gb - * @return PriceZone - */ - public function setServerPlan2xCpu4Gb($serverPlan2xCpu4Gb): PriceZone - { - if (is_array($serverPlan2xCpu4Gb)) { - $this->serverPlan2xCpu4Gb = new Price($serverPlan2xCpu4Gb); - } else { - $this->serverPlan2xCpu4Gb = $serverPlan2xCpu4Gb; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getServerPlan4xCpu8Gb(): ?Price - { - return $this->serverPlan4xCpu8Gb; - } - - /** - * @param Price|array|null $serverPlan4xCpu8Gb - * @return PriceZone - */ - public function setServerPlan4xCpu8Gb($serverPlan4xCpu8Gb): PriceZone - { - if (is_array($serverPlan4xCpu8Gb)) { - $this->serverPlan4xCpu8Gb = new Price($serverPlan4xCpu8Gb); - } else { - $this->serverPlan4xCpu8Gb = $serverPlan4xCpu8Gb; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getServerPlan6xCpu16Gb(): ?Price - { - return $this->serverPlan6xCpu16Gb; - } - - /** - * @param Price|array|null $serverPlan6xCpu16Gb - * @return PriceZone - */ - public function setServerPlan6xCpu16Gb($serverPlan6xCpu16Gb): PriceZone - { - if (is_array($serverPlan6xCpu16Gb)) { - $this->serverPlan6xCpu16Gb = new Price($serverPlan6xCpu16Gb); - } else { - $this->serverPlan6xCpu16Gb = $serverPlan6xCpu16Gb; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getServerPlan8xCpu32Gb(): ?Price - { - return $this->serverPlan8xCpu32Gb; - } - - /** - * @param Price|array|null $serverPlan8xCpu32Gb - * @return PriceZone - */ - public function setServerPlan8xCpu32Gb($serverPlan8xCpu32Gb): PriceZone - { - if (is_array($serverPlan8xCpu32Gb)) { - $this->serverPlan8xCpu32Gb = new Price($serverPlan8xCpu32Gb); - } else { - $this->serverPlan8xCpu32Gb = $serverPlan8xCpu32Gb; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getServerPlan12xCpu48Gb(): ?Price - { - return $this->serverPlan12xCpu48Gb; - } - - /** - * @param Price|array|null $serverPlan12xCpu48Gb - * @return PriceZone - */ - public function setServerPlan12xCpu48Gb($serverPlan12xCpu48Gb): PriceZone - { - if (is_array($serverPlan12xCpu48Gb)) { - $this->serverPlan12xCpu48Gb = new Price($serverPlan12xCpu48Gb); - } else { - $this->serverPlan12xCpu48Gb = $serverPlan12xCpu48Gb; - } - - return $this; - } - - /** - * @return Price|null - */ - public function getServerPlan16xCpu64Gb(): ?Price - { - return $this->serverPlan16xCpu64Gb; - } - - /** - * @param Price|array|null $serverPlan16xCpu64Gb - * @return PriceZone - */ - public function setServerPlan16xCpu64Gb($serverPlan16xCpu64Gb): PriceZone - { - if (is_array($serverPlan16xCpu64Gb)) { - $this->serverPlan16xCpu64Gb = new Price($serverPlan16xCpu64Gb); - } else { - $this->serverPlan16xCpu64Gb = $serverPlan16xCpu64Gb; - } - - return $this; - } -} - - diff --git a/lib/Model/RestartServer.php b/lib/Model/RestartServer.php deleted file mode 100644 index b6140978..00000000 --- a/lib/Model/RestartServer.php +++ /dev/null @@ -1,51 +0,0 @@ -restartServer = $data['restart_server'] ?? - new RestartServerRequest; - } - - /** - * @return RestartServerRequest - */ - public function getRestartServer(): RestartServerRequest - { - return $this->restartServer; - } - - /** - * @param RestartServerRequest|array $restartServer - * @return RestartServer - */ - public function setRestartServer($restartServer): RestartServer - { - if (is_array($restartServer)) { - $this->restartServer = new RestartServerRequest($restartServer); - } else { - $this->restartServer = $restartServer; - } - - return $this; - } -} - - diff --git a/lib/Model/RestartServerRequest.php b/lib/Model/RestartServerRequest.php deleted file mode 100644 index 4af8a68b..00000000 --- a/lib/Model/RestartServerRequest.php +++ /dev/null @@ -1,112 +0,0 @@ -setStopType($data['stop_type'] ?? self::STOP_TYPE_SOFT); - $this->setTimeoutAction($data['timeout_action'] ?? null); - $this->setTimeout($data['timeout'] ?? 60); - } - - /** - * @return string - */ - public function getStopType(): string - { - return $this->stopType; - } - - /** - * @param string $stopType - * @return RestartServerRequest - */ - public function setStopType(string $stopType): RestartServerRequest - { - Assert::oneOf($stopType, [ - self::STOP_TYPE_SOFT, - self::STOP_TYPE_HARD - ]); - - $this->stopType = $stopType; - - return $this; - } - - /** - * @return string|null - */ - public function getTimeoutAction(): ?string - { - return $this->timeoutAction; - } - - /** - * @param string|null $timeoutAction - * @return RestartServerRequest - */ - public function setTimeoutAction(?string $timeoutAction): RestartServerRequest - { - if (!is_null($timeoutAction)) { - Assert::oneOf($timeoutAction, [ - self::TIMEOUT_ACTION_DESTROY, - self::TIMEOUT_ACTION_IGNORE - ]); - } - - $this->timeoutAction = $timeoutAction; - - return $this; - } - - /** - * @return float|string|null - */ - public function getTimeout() - { - return $this->timeout; - } - - /** - * @param float|string|null $timeout - * @return RestartServerRequest - */ - public function setTimeout($timeout): RestartServerRequest - { - $this->timeout = $timeout; - - return $this; - } -} diff --git a/lib/Model/Router.php b/lib/Model/Router.php deleted file mode 100644 index a5f761f0..00000000 --- a/lib/Model/Router.php +++ /dev/null @@ -1,129 +0,0 @@ -setName($data['name'] ?? null); - $this->setType($data['type'] ?? null); - $this->setUuid($data['uuid'] ?? null); - $this->setAttachedNetworks($data['attached_networks'] ?? null); - } - - /** - * @return string|null - */ - public function getName(): ?string - { - return $this->name; - } - - /** - * @param string|null $name - * @return Router - */ - public function setName(?string $name): Router - { - $this->name = $name; - - return $this; - } - - /** - * @return string|null - */ - public function getType(): ?string - { - return $this->type; - } - - /** - * @param string|null $type - * @return Router - */ - public function setType(?string $type): Router - { - - $this->type = $type; - - return $this; - } - - /** - * @return string|null - */ - public function getUuid(): ?string - { - return $this->uuid; - } - - /** - * @param string|null $uuid - * @return Router - */ - public function setUuid(?string $uuid): Router - { - if (!is_null($uuid)) { - Assert::uuid($uuid); - } - - $this->uuid = $uuid; - - return $this; - } - - /** - * @return AttachNetwork|null - */ - public function getAttachedNetworks(): ?AttachNetwork - { - return $this->attachedNetworks; - } - - /** - * @param AttachNetwork|array|null $attachedNetworks - * @return Router - */ - public function setAttachedNetworks($attachedNetworks): Router - { - if (is_array($attachedNetworks)) { - $this->attachedNetworks = new AttachNetwork($attachedNetworks); - } else { - $this->attachedNetworks = $attachedNetworks; - } - - return $this; - } -} diff --git a/lib/Model/RouterRequest.php b/lib/Model/RouterRequest.php deleted file mode 100644 index d0364bd1..00000000 --- a/lib/Model/RouterRequest.php +++ /dev/null @@ -1,58 +0,0 @@ -setRouter($data['router'] ?? null); - } - - /** - * @return Router|null - */ - public function getRouter(): ?Router - { - return $this->router; - } - - /** - * @param Router|array|null $router - * @return RouterRequest - */ - public function setRouter($router): RouterRequest - { - if (is_array($router)) { - $this->router = new Router($router); - } else { - $this->router = $router; - } - - return $this; - } - - public function __toString() - { - return $this->serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'attachedNetworks', 'uuid', 'type', - ] - ]); - } -} diff --git a/lib/Model/RouterResponse.php b/lib/Model/RouterResponse.php deleted file mode 100644 index 25f841c8..00000000 --- a/lib/Model/RouterResponse.php +++ /dev/null @@ -1,48 +0,0 @@ -setRouter($data['router'] ?? null); - } - - /** - * @return Router|null - */ - public function getRouter(): ?Router - { - return $this->router; - } - - /** - * @param Router|array|null $router - * @return RouterResponse - */ - public function setRouter($router): RouterResponse - { - if (is_array($router)) { - $this->router = new Router($router); - } else { - $this->router = $router; - } - - return $this; - } - -} - - diff --git a/lib/Model/Routers.php b/lib/Model/Routers.php deleted file mode 100644 index 2e47be3f..00000000 --- a/lib/Model/Routers.php +++ /dev/null @@ -1,49 +0,0 @@ -setRouter($data['router'] ?? null); - } - - /** - * @return Router[]|null - */ - public function getRouter(): ?array - { - return $this->router; - } - - /** - * @param Router[]|null $router - * @return Routers - */ - public function setRouter(?array $router): Routers - { - if (is_array($router)) { - foreach ($router as $item) { - $this->router[] = $item instanceof Router - ? $item - : new Router($item); - } - } else { - $this->router = $router; - } - - return $this; - } -} diff --git a/lib/Model/RoutersListResponse.php b/lib/Model/RoutersListResponse.php deleted file mode 100644 index 602bca4b..00000000 --- a/lib/Model/RoutersListResponse.php +++ /dev/null @@ -1,47 +0,0 @@ -setRouters($data['routers'] ?? null); - } - - /** - * @return Routers|null - */ - public function getRouters(): ?Routers - { - return $this->routers; - } - - /** - * @param Routers|array|null $routers - * @return RoutersListResponse - */ - public function setRouters($routers): RoutersListResponse - { - if (is_array($routers)) { - $this->routers = new Routers($routers); - } else { - $this->routers = $routers; - } - - return $this; - } -} - - diff --git a/lib/Model/Server.php b/lib/Model/Server.php deleted file mode 100644 index c523f16d..00000000 --- a/lib/Model/Server.php +++ /dev/null @@ -1,880 +0,0 @@ -setAvoidHost($data['avoid_host'] ?? null); - $this->setBootOrder($data['boot_order'] ?? null); - $this->setCoreNumber($data['core_number'] ?? null); - $this->setFirewall($data['firewall'] ?? self::FIREWALL_ON); - $this->setHost($data['host'] ?? null); - $this->setHostname($data['hostname'] ?? null); - $this->setNetworking($data['networking'] ?? null); - $this->setLoginUser($data['login_user'] ?? null); - $this->setIpAddresses($data['ip_addresses'] ?? null); - $this->setLicense($data['license'] ?? null); - $this->setMemoryAmount($data['memory_amount'] ?? null); - $this->setMetadata($data['metadata'] ?? null); - $this->setNicModel($data['nic_model'] ?? self::NIC_MODEL_VIRTIO); - $this->setPasswordDelivery($data['password_delivery'] ?? null); - $this->setPlan($data['plan'] ?? 'custom'); - $this->setPlanIpv4Bytes($data['plan_ipv4_bytes'] ?? null); - $this->setPlanIpv6Bytes($data['plan_ipv6_bytes'] ?? null); - $this->setState($data['state'] ?? null); - $this->setStorageDevices($data['storage_devices'] ?? null); - $this->setTags($data['tags'] ?? null); - $this->setTimezone($data['timezone'] ?? null); - $this->setTitle($data['title'] ?? null); - $this->setUuid($data['uuid'] ?? null); - $this->setUserData($data['user_data'] ?? null); - $this->setVideoModel($data['video_model'] ?? self::VIDEO_MODEL_VGA); - $this->setRemoteAccessType($data['remote_access_type'] ?? self::REMOTE_ACCESS_TYPE_VNC); - $this->setRemoteAccessEnabled($data['remote_access_enabled'] ?? self::REMOTE_ACCESS_ENABLED_NO); - $this->setRemoteAccessPassword($data['remote_access_password'] ?? null); - $this->setSimpleBackup($data['simple_backup'] ?? null); - $this->setZone($data['zone'] ?? null); - } - - /** - * @return float|string|null - */ - public function getAvoidHost() - { - return $this->avoidHost; - } - - /** - * @param float|string|null $avoidHost - * @return Server - */ - public function setAvoidHost($avoidHost): Server - { - $this->avoidHost = $avoidHost; - - return $this; - } - - /** - * @return string|null - */ - public function getBootOrder(): ?string - { - return $this->bootOrder; - } - - /** - * @param string|null $bootOrder - * @return Server - */ - public function setBootOrder(?string $bootOrder): Server - { - if (!is_null($bootOrder)) { - Assert::oneOf($bootOrder, [ - self::BOOT_ORDER_DISK, - self::BOOT_ORDER_CDROM, - self::BOOT_ORDER_DISKCDROM, - self::BOOT_ORDER_CDROMDISK - ]); - } - $this->bootOrder = $bootOrder; - - return $this; - } - - /** - * @return float|string|null - */ - public function getCoreNumber() - { - return $this->coreNumber; - } - - /** - * @param float|string|null $coreNumber - * @return Server - */ - public function setCoreNumber($coreNumber): Server - { - $this->coreNumber = $coreNumber; - - return $this; - } - - /** - * @return string - */ - public function getFirewall(): string - { - return $this->firewall; - } - - /** - * @param string $firewall - * @return Server - */ - public function setFirewall(string $firewall): Server - { - Assert::oneOf($firewall, [ - self::FIREWALL_ON, - self::FIREWALL_OFF - ]); - - $this->firewall = $firewall; - - return $this; - } - - /** - * @return float|string|null - */ - public function getHost() - { - return $this->host; - } - - /** - * @param float|string|null $host - * @return Server - */ - public function setHost($host): Server - { - $this->host = $host; - - return $this; - } - - /** - * @return string|null - */ - public function getHostname(): ?string - { - return $this->hostname; - } - - /** - * @param string|null $hostname - * @return Server - */ - public function setHostname(?string $hostname): Server - { - $this->hostname = $hostname; - - return $this; - } - - /** - * @return NetworkInterfaceList|null - */ - public function getNetworking(): ?NetworkInterfaceList - { - return $this->networking; - } - - /** - * @param NetworkInterfaceList|array|null $networking - * @return Server - */ - public function setNetworking($networking): Server - { - if (is_array($networking)) { - $this->networking = new NetworkInterfaceList($networking); - } else { - $this->networking = $networking; - } - return $this; - } - - /** - * @return ServerLoginUser|null - */ - public function getLoginUser(): ?ServerLoginUser - { - return $this->loginUser; - } - - /** - * @param ServerLoginUser|array|null $loginUser - * @return Server - */ - public function setLoginUser($loginUser): Server - { - if (is_array($loginUser)) { - $this->loginUser = new ServerLoginUser($loginUser); - } else { - $this->loginUser = $loginUser; - } - - return $this; - } - - /** - * @return IpAddresses|null - */ - public function getIpAddresses(): ?IpAddresses - { - return $this->ipAddresses; - } - - /** - * @param IpAddresses|array|null $ipAddresses - * @return Server - */ - public function setIpAddresses($ipAddresses): Server - { - if (is_array($ipAddresses)) { - $this->ipAddresses = new IpAddresses($ipAddresses); - } else { - $this->ipAddresses = $ipAddresses; - } - - return $this; - } - - /** - * @return float|string|null - */ - public function getLicense() - { - return $this->license; - } - - /** - * @param float|string|null $license - * @return Server - */ - public function setLicense($license): Server - { - $this->license = $license; - - return $this; - } - - /** - * @return float|string|null - */ - public function getMemoryAmount() - { - return $this->memoryAmount; - } - - /** - * @param float|string|null $memoryAmount - * @return Server - */ - public function setMemoryAmount($memoryAmount): Server - { - $this->memoryAmount = $memoryAmount; - - return $this; - } - - /** - * @return string|null - */ - public function getMetadata(): ?string - { - return $this->metadata; - } - - /** - * @param string|null $metadata - * @return Server - */ - public function setMetadata(?string $metadata): Server - { - if (!is_null($metadata)) { - Assert::oneOf($metadata, [ - self::METADATA_YES, - self::METADATA_NO - ]); - } - $this->metadata = $metadata; - - return $this; - } - - /** - * @return string - */ - public function getNicModel(): string - { - return $this->nicModel; - } - - /** - * @param string $nicModel - * @return Server - */ - public function setNicModel(string $nicModel): Server - { - Assert::oneOf($nicModel, [ - self::NIC_MODEL_VIRTIO, - self::NIC_MODEL_E1000, - self::NIC_MODEL_RTL8139 - ]); - - $this->nicModel = $nicModel; - - return $this; - } - - /** - * @return string|null - */ - public function getPasswordDelivery(): ?string - { - return $this->passwordDelivery; - } - - /** - * @param string|null $passwordDelivery - * @return Server - */ - public function setPasswordDelivery(?string $passwordDelivery): Server - { - if (!is_null($passwordDelivery)) { - Assert::oneOf($passwordDelivery, [ - self::PASSWORD_DELIVERY_NONE, - self::PASSWORD_DELIVERY_EMAIL, - self::PASSWORD_DELIVERY_SMS - ]); - } - - $this->passwordDelivery = $passwordDelivery; - - return $this; - } - - /** - * @return string - */ - public function getPlan(): string - { - return $this->plan; - } - - /** - * @param string $plan - * @return Server - */ - public function setPlan(string $plan): Server - { - $this->plan = $plan; - - return $this; - } - - /** - * @return float|string|null - */ - public function getPlanIpv4Bytes() - { - return $this->planIpv4Bytes; - } - - /** - * @param float|string|null $planIpv4Bytes - * @return Server - */ - public function setPlanIpv4Bytes($planIpv4Bytes): Server - { - $this->planIpv4Bytes = $planIpv4Bytes; - - return $this; - } - - /** - * @return float|string|null - */ - public function getPlanIpv6Bytes() - { - return $this->planIpv6Bytes; - } - - /** - * @param float|string|null $planIpv6Bytes - * @return Server - */ - public function setPlanIpv6Bytes($planIpv6Bytes): Server - { - $this->planIpv6Bytes = $planIpv6Bytes; - - return $this; - } - - /** - * @return string|null - */ - public function getState(): ?string - { - return $this->state; - } - - /** - * @param string|null $state - * @return Server - */ - public function setState(?string $state): Server - { - if (!is_null($state)) { - Assert::oneOf($state, ServerState::getAllowableEnumValues()); - } - - $this->state = $state; - - return $this; - } - - /** - * @return ServerStorageDevices|null - */ - public function getStorageDevices(): ?ServerStorageDevices - { - return $this->storageDevices; - } - - /** - * @param ServerStorageDevices|array|null $storageDevices - * @return Server - */ - public function setStorageDevices($storageDevices): Server - { - if (is_array($storageDevices)) { - $this->storageDevices = new ServerStorageDevices($storageDevices); - } else { - $this->storageDevices = $storageDevices; - } - - return $this; - } - - /** - * @return ServerTags|null - */ - public function getTags(): ?ServerTags - { - return $this->tags; - } - - /** - * @param ServerTags|array|null $tags - * @return Server - */ - public function setTags($tags): Server - { - if (is_array($tags)) { - $this->tags = new ServerTags($tags); - } else { - $this->tags = $tags; - } - - return $this; - } - - /** - * @return string|null - */ - public function getTimezone(): ?string - { - return $this->timezone; - } - - /** - * @param string|null $timezone - * @return Server - */ - public function setTimezone(?string $timezone): Server - { - $this->timezone = $timezone; - - return $this; - } - - /** - * @return string|null - */ - public function getTitle(): ?string - { - return $this->title; - } - - /** - * @param string|null $title - * @return Server - */ - public function setTitle(?string $title): Server - { - if (!is_null($title)) { - Assert::maxLength($title, 64); - } - - $this->title = $title; - - return $this; - } - - /** - * @return string|null - */ - public function getUuid(): ?string - { - return $this->uuid; - } - - /** - * @param string|null $uuid - * @return Server - */ - public function setUuid(?string $uuid): Server - { - if (!is_null($uuid)) { - Assert::uuid($uuid); - } - - $this->uuid = $uuid; - - return $this; - } - - /** - * @return string|null - */ - public function getUserData(): ?string - { - return $this->userData; - } - - /** - * @param string|null $userData - * @return Server - */ - public function setUserData(?string $userData): Server - { - $this->userData = $userData; - - return $this; - } - - /** - * @return string - */ - public function getVideoModel(): string - { - return $this->videoModel; - } - - /** - * @param string $videoModel - * @return Server - */ - public function setVideoModel(string $videoModel): Server - { - Assert::oneOf($videoModel, [ - self::VIDEO_MODEL_VGA, - self::VIDEO_MODEL_CIRRUS - ]); - - $this->videoModel = $videoModel; - - return $this; - } - - /** - * @return string - */ - public function getRemoteAccessType(): string - { - return $this->remoteAccessType; - } - - /** - * @param string $remoteAccessType - * @return Server - */ - public function setRemoteAccessType(string $remoteAccessType): Server - { - Assert::oneOf($remoteAccessType, [ - self::REMOTE_ACCESS_TYPE_VNC, - self::REMOTE_ACCESS_TYPE_SPICE - ]); - - $this->remoteAccessType = $remoteAccessType; - - return $this; - } - - /** - * @return string - */ - public function getRemoteAccessEnabled(): string - { - return $this->remoteAccessEnabled; - } - - /** - * @param string $remoteAccessEnabled - * @return Server - */ - public function setRemoteAccessEnabled(string $remoteAccessEnabled): Server - { - Assert::oneOf($remoteAccessEnabled, [ - self::REMOTE_ACCESS_ENABLED_YES, - self::REMOTE_ACCESS_ENABLED_NO - ]); - - $this->remoteAccessEnabled = $remoteAccessEnabled; - - return $this; - } - - /** - * @return string|null - */ - public function getRemoteAccessPassword(): ?string - { - return $this->remoteAccessPassword; - } - - /** - * @param string|null $remoteAccessPassword - * @return Server - */ - public function setRemoteAccessPassword(?string $remoteAccessPassword): Server - { - $this->remoteAccessPassword = $remoteAccessPassword; - - return $this; - } - - /** - * @return string|null - */ - public function getSimpleBackup(): ?string - { - return $this->simpleBackup; - } - - /** - * @param string|null $simpleBackup - * @return Server - */ - public function setSimpleBackup(?string $simpleBackup): Server - { - $this->simpleBackup = $simpleBackup; - - return $this; - } - - /** - * @return string|null - */ - public function getZone(): ?string - { - return $this->zone; - } - - /** - * @param string|null $zone - * @return Server - */ - public function setZone(?string $zone): Server - { - $this->zone = $zone; - - return $this; - } - -} - - diff --git a/lib/Model/ServerListResponse.php b/lib/Model/ServerListResponse.php deleted file mode 100644 index 8f8b6c9f..00000000 --- a/lib/Model/ServerListResponse.php +++ /dev/null @@ -1,49 +0,0 @@ -servers = $data['servers'] ?? null; - } - - /** - * @return ServerListResponseServers|null - */ - public function getServers(): ?ServerListResponseServers - { - return $this->servers; - } - - /** - * @param ServerListResponseServers|array|null $servers - * @return ServerListResponse - */ - public function setServers($servers): ServerListResponse - { - if (is_array($servers)) { - $this->servers = new ServerListResponseServers($servers); - } else { - $this->servers = $servers; - } - - return $this; - } - -} - - diff --git a/lib/Model/ServerListResponseServers.php b/lib/Model/ServerListResponseServers.php deleted file mode 100644 index d4455c40..00000000 --- a/lib/Model/ServerListResponseServers.php +++ /dev/null @@ -1,49 +0,0 @@ -setServer($data['server'] ?? null); - } - - /** - * @return Server[]|null - */ - public function getServer(): ?array - { - return $this->server; - } - - /** - * @param Server[]|null $server - * @return ServerListResponseServers - */ - public function setServer(?array $server): ServerListResponseServers - { - if (is_array($server)) { - foreach ($server as $item) { - $this->server[] = $item instanceof Server ? $item : new Server($item); - } - } else { - $this->server = $server; - } - - return $this; - } -} - - diff --git a/lib/Model/ServerLoginUser.php b/lib/Model/ServerLoginUser.php deleted file mode 100644 index 076cf7e1..00000000 --- a/lib/Model/ServerLoginUser.php +++ /dev/null @@ -1,107 +0,0 @@ -setCreatePassword($data['create_password'] ?? self::CREATE_PASSWORD_YES); - $this->setUsername($data['username'] ?? null); - $this->setSshKeys($data['ssh_keys'] ?? null); - } - - /** - * @return string - */ - public function getCreatePassword(): string - { - return $this->createPassword; - } - - /** - * @param string $createPassword - * @return ServerLoginUser - */ - public function setCreatePassword(string $createPassword): ServerLoginUser - { - Assert::oneOf($createPassword, [ - self::CREATE_PASSWORD_YES, - self::CREATE_PASSWORD_NO - ]); - - $this->createPassword = $createPassword; - - return $this; - } - - /** - * @return string|null - */ - public function getUsername(): ?string - { - return $this->username; - } - - /** - * @param string|null $username - * @return ServerLoginUser - */ - public function setUsername(?string $username): ServerLoginUser - { - $this->username = $username; - - return $this; - } - - /** - * @return ServerSshKey|null - */ - public function getSshKeys(): ?ServerSshKey - { - return $this->sshKeys; - } - - /** - * @param ServerSshKey|array|null $sshKeys - * @return ServerLoginUser - */ - public function setSshKeys($sshKeys): ServerLoginUser - { - if (is_array($sshKeys)) { - $this->sshKeys = new ServerSshKey($sshKeys); - } else { - $this->sshKeys = $sshKeys; - } - - return $this; - } - -} diff --git a/lib/Model/ServerNetworksListResponse.php b/lib/Model/ServerNetworksListResponse.php deleted file mode 100644 index 153e06fe..00000000 --- a/lib/Model/ServerNetworksListResponse.php +++ /dev/null @@ -1,47 +0,0 @@ -setNetworking($data['networking'] ?? null); - } - - /** - * @return NetworkInterfaceList|null - */ - public function getNetworking(): ?NetworkInterfaceList - { - return $this->networking; - } - - /** - * @param NetworkInterfaceList|array|null $networking - * @return ServerNetworksListResponse - */ - public function setNetworking($networking): ServerNetworksListResponse - { - if (is_array($networking)) { - $this->networking = new NetworkInterfaceList($networking); - } else { - $this->networking = $networking; - } - - return $this; - } -} - - diff --git a/lib/Model/ServerRequest.php b/lib/Model/ServerRequest.php deleted file mode 100644 index 498cb4ec..00000000 --- a/lib/Model/ServerRequest.php +++ /dev/null @@ -1,48 +0,0 @@ -setServer($data['server'] ?? null); - } - - /** - * @return Server|null - */ - public function getServer(): ?Server - { - return $this->server; - } - - /** - * @param Server|array|null $server - * @return $this - */ - public function setServer($server): self - { - if (is_array($server)) { - $this->server = new Server($server); - } else { - $this->server = $server; - } - - return $this; - } -} diff --git a/lib/Model/ServerSize.php b/lib/Model/ServerSize.php deleted file mode 100644 index 5a0e5204..00000000 --- a/lib/Model/ServerSize.php +++ /dev/null @@ -1,69 +0,0 @@ -setCoreNumber($data['core_number'] ?? null); - $this->setMemoryAmount($data['memory_amount'] ?? null); - } - - /** - * @return float|string|null - */ - public function getCoreNumber() - { - return $this->coreNumber; - } - - /** - * @param float|string|null $coreNumber - * @return ServerSize - */ - public function setCoreNumber($coreNumber): ServerSize - { - $this->coreNumber = $coreNumber; - - return $this; - } - - /** - * @return float|string|null - */ - public function getMemoryAmount() - { - return $this->memoryAmount; - } - - /** - * @param float|string|null $memoryAmount - * @return ServerSize - */ - public function setMemoryAmount($memoryAmount): ServerSize - { - $this->memoryAmount = $memoryAmount; - - return $this; - } - -} - - diff --git a/lib/Model/ServerSshKey.php b/lib/Model/ServerSshKey.php deleted file mode 100644 index 0e111673..00000000 --- a/lib/Model/ServerSshKey.php +++ /dev/null @@ -1,48 +0,0 @@ -setSshKey($data['ssh_key'] ?? null); - } - - /** - * @return string[]|null - */ - public function getSshKey(): ?array - { - return $this->sshKey; - } - - /** - * @param string[]|null $sshKey - * @return ServerSshKey - */ - public function setSshKey(?array $sshKey): ServerSshKey - { - if (is_array($sshKey)) { - foreach ($sshKey as $item) { - $this->sshKey[] = $item; - } - } else { - $this->sshKey = $sshKey; - } - - return $this; - } - -} diff --git a/lib/Model/ServerState.php b/lib/Model/ServerState.php deleted file mode 100644 index 089516c6..00000000 --- a/lib/Model/ServerState.php +++ /dev/null @@ -1,32 +0,0 @@ -setStorageDevice($data['storage_device'] ?? null); - } - - /** - * @return StorageDevice[]|null - */ - public function getStorageDevice(): ?array - { - return $this->storageDevice; - } - - /** - * @param StorageDevice[]|null $storageDevice - * @return ServerStorageDevices - */ - public function setStorageDevice(?array $storageDevice): ServerStorageDevices - { - if (is_array($storageDevice)) { - foreach ($storageDevice as $item) { - $this->storageDevice[] = $item instanceof StorageDevice ? $item : new StorageDevice($item); - } - } else { - $this->storageDevice = $storageDevice; - } - - return $this; - } - -} - - diff --git a/lib/Model/ServerTags.php b/lib/Model/ServerTags.php deleted file mode 100644 index d14a5caa..00000000 --- a/lib/Model/ServerTags.php +++ /dev/null @@ -1,49 +0,0 @@ -setTag($data['tag'] ?? null); - } - - /** - * @return string[]|null - */ - public function getTag(): ?array - { - return $this->tag; - } - - /** - * @param string[]|null $tag - * @return ServerTags - */ - public function setTag(?array $tag): ServerTags - { - if (is_array($tag)) { - foreach ($tag as $item) { - $this->tag[] = $item; - } - } else { - $this->tag = $tag; - } - - return $this; - } -} - - diff --git a/lib/Model/Servers.php b/lib/Model/Servers.php deleted file mode 100644 index 9079a510..00000000 --- a/lib/Model/Servers.php +++ /dev/null @@ -1,49 +0,0 @@ -setServer($data['server'] ?? null); - } - - /** - * @return string[]|null - */ - public function getServer(): ?array - { - return $this->server; - } - - /** - * @param string[]|null $server - * @return Servers - */ - public function setServer(?array $server): Servers - { - if (is_array($server)) { - foreach ($server as $item) { - $this->server[] = $item; - } - } else { - $this->server = $server; - } - - return $this; - } -} - - diff --git a/lib/Model/Stat.php b/lib/Model/Stat.php deleted file mode 100644 index a082cbd1..00000000 --- a/lib/Model/Stat.php +++ /dev/null @@ -1,92 +0,0 @@ -setName($data['name'] ?? null); - $this->setTimestamp($data['timestamp'] ?? null); - $this->setValue($data['value'] ?? null); - } - - /** - * @return string|null - */ - public function getName(): ?string - { - return $this->name; - } - - /** - * @param string|null $name - * @return Stat - */ - public function setName(?string $name): Stat - { - $this->name = $name; - - return $this; - } - - /** - * @return string|null - */ - public function getTimestamp(): ?string - { - return $this->timestamp; - } - - /** - * @param string|null $timestamp - * @return Stat - */ - public function setTimestamp(?string $timestamp): Stat - { - $this->timestamp = $timestamp; - - return $this; - } - - /** - * @return float|string|null - */ - public function getValue() - { - return $this->value; - } - - /** - * @param float|string|null $value - * @return Stat - */ - public function setValue($value): Stat - { - $this->value = $value; - - return $this; - } - -} diff --git a/lib/Model/Stats.php b/lib/Model/Stats.php deleted file mode 100644 index 20299a8a..00000000 --- a/lib/Model/Stats.php +++ /dev/null @@ -1,48 +0,0 @@ -setStat($data['stat'] ?? null); - } - - /** - * @return Stat[]|null - */ - public function getStat(): ?array - { - return $this->stat; - } - - /** - * @param Stat[]|array|null $stat - * @return Stats - */ - public function setStat(?array $stat): Stats - { - if (is_array($stat)) { - foreach ($stat as $item) { - $this->stat[] = $item instanceof Stat ? $item : new Stat($item); - } - } else { - $this->stat = $stat; - } - - return $this; - } -} diff --git a/lib/Model/StopServer.php b/lib/Model/StopServer.php deleted file mode 100644 index 7c20c843..00000000 --- a/lib/Model/StopServer.php +++ /dev/null @@ -1,48 +0,0 @@ -setStopServer($data['stop_server'] ?? null); - } - - /** - * @return StopServerRequest|null - */ - public function getStopServer(): ?StopServerRequest - { - return $this->stopServer; - } - - /** - * @param StopServerRequest|array|null $stopServer - * @return StopServer - */ - public function setStopServer($stopServer): StopServer - { - if (is_array($stopServer)) { - $this->stopServer = new StopServerRequest($stopServer); - } else { - $this->stopServer = $stopServer; - } - - return $this; - } -} diff --git a/lib/Model/StopServerRequest.php b/lib/Model/StopServerRequest.php deleted file mode 100644 index a1275f63..00000000 --- a/lib/Model/StopServerRequest.php +++ /dev/null @@ -1,83 +0,0 @@ -setStopType($data['stop_type'] ?? self::STOP_TYPE_SOFT); - $this->setTimeout($data['timeout'] ?? null); - } - - /** - * @return string - */ - public function getStopType(): string - { - return $this->stopType; - } - - /** - * @param string $stopType - * @return StopServerRequest - */ - public function setStopType(string $stopType): StopServerRequest - { - Assert::oneOf($stopType, [ - self::STOP_TYPE_SOFT, - self::STOP_TYPE_HARD - ]); - - $this->stopType = $stopType; - - return $this; - } - - /** - * @return float|string|null - */ - public function getTimeout() - { - return $this->timeout; - } - - /** - * @param float|string|null $timeout - * @return StopServerRequest - */ - public function setTimeout($timeout): StopServerRequest - { - if (!is_null($timeout)) { - Assert::range($timeout, '1', '600'); - } - - $this->timeout = $timeout; - - return $this; - } -} - - diff --git a/lib/Model/Storage.php b/lib/Model/Storage.php deleted file mode 100644 index 1efa70f1..00000000 --- a/lib/Model/Storage.php +++ /dev/null @@ -1,405 +0,0 @@ -setAccess($data['access'] ?? null); - $this->setBackupRule($data['backup_rule'] ?? null); - $this->setBackups($data['backups'] ?? null); - $this->setLicense($data['license'] ?? null); - $this->setServers($data['servers'] ?? null); - $this->setSize($data['size'] ?? null); - $this->setState($data['state'] ?? null); - $this->setTier($data['tier'] ?? null); - $this->setTitle($data['title'] ?? null); - $this->setType($data['type'] ?? null); - $this->setUuid($data['uuid'] ?? null); - $this->setZone($data['zone'] ?? null); - $this->setOrigin($data['origin'] ?? null); - $this->setCreated($data['created'] ?? null); - } - - /** - * @return string|null - */ - public function getAccess(): ?string - { - return $this->access; - } - - /** - * @param string|null $access - * @return Storage - */ - public function setAccess(?string $access): Storage - { - if (!is_null($access)) { - Assert::oneOf($access, StorageAccessType::getAllowableEnumValues()); - } - - $this->access = $access; - - return $this; - } - - /** - * @return BackupRule|null - */ - public function getBackupRule(): ?BackupRule - { - return $this->backupRule; - } - - /** - * @param BackupRule|array|null $backupRule - * @return Storage - */ - public function setBackupRule($backupRule): Storage - { - if (is_array($backupRule)) { - $this->backupRule = new BackupRule($backupRule); - } else { - $this->backupRule = $backupRule; - } - - return $this; - } - - /** - * @return StorageBackups|null - */ - public function getBackups(): ?StorageBackups - { - return $this->backups; - } - - /** - * @param StorageBackups|array|null $backups - * @return Storage - */ - public function setBackups($backups): Storage - { - if (is_array($backups)) { - $this->backups = new StorageBackups($backups); - } else { - $this->backups = $backups; - } - - return $this; - } - - /** - * @return float|string|null - */ - public function getLicense() - { - return $this->license; - } - - /** - * @param float|string|null $license - * @return Storage - */ - public function setLicense($license): Storage - { - $this->license = $license; - - return $this; - } - - /** - * @return Servers|null - */ - public function getServers(): ?Servers - { - return $this->servers; - } - - /** - * @param Servers|array|null $servers - * @return Storage - */ - public function setServers($servers): Storage - { - if (is_array($servers)) { - $this->servers = new Servers($servers); - } else { - $this->servers = $servers; - } - - return $this; - } - - /** - * @return float|string|null - */ - public function getSize() - { - return $this->size; - } - - /** - * @param float|string|null $size - * @return Storage - */ - public function setSize($size): Storage - { - $this->size = $size; - - return $this; - } - - /** - * @return string|null - */ - public function getState(): ?string - { - return $this->state; - } - - /** - * @param string|null $state - * @return Storage - */ - public function setState(?string $state): Storage - { - if (!is_null($state)) { - Assert::oneOf($state, StorageState::getAllowableEnumValues()); - } - - $this->state = $state; - - return $this; - } - - /** - * @return string|null - */ - public function getTier(): ?string - { - return $this->tier; - } - - /** - * @param string|null $tier - * @return Storage - */ - public function setTier(?string $tier): Storage - { - if (!is_null($tier)) { - Assert::oneOf($tier, StorageTier::getAllowableEnumValues()); - } - - $this->tier = $tier; - - return $this; - } - - /** - * @return string|null - */ - public function getTitle(): ?string - { - return $this->title; - } - - /** - * @param string|null $title - * @return Storage - */ - public function setTitle(?string $title): Storage - { - if (!is_null($title)) { - Assert::maxLength($title, 64); - } - - $this->title = $title; - - return $this; - } - - /** - * @return string|null - */ - public function getType(): ?string - { - return $this->type; - } - - /** - * @param string|null $type - * @return Storage - */ - public function setType(?string $type): Storage - { - if (!is_null($type)) { - Assert::oneOf($type, StorageType::getAllowableEnumValues()); - } - - $this->type = $type; - - return $this; - } - - /** - * @return string|null - */ - public function getUuid(): ?string - { - return $this->uuid; - } - - /** - * @param string|null $uuid - * @return Storage - */ - public function setUuid(?string $uuid): Storage - { - if (!is_null($uuid)) { - Assert::uuid($uuid); - } - - $this->uuid = $uuid; - - return $this; - } - - /** - * @return string|null - */ - public function getZone(): ?string - { - return $this->zone; - } - - /** - * @param string|null $zone - * @return Storage - */ - public function setZone(?string $zone): Storage - { - $this->zone = $zone; - - return $this; - } - - /** - * @return string|null - */ - public function getOrigin(): ?string - { - return $this->origin; - } - - /** - * @param string|null $origin - * @return Storage - */ - public function setOrigin(?string $origin): Storage - { - $this->origin = $origin; - - return $this; - } - - /** - * @return string|null - */ - public function getCreated(): ?string - { - return $this->created; - } - - /** - * @param string|null $created - * @return Storage - */ - public function setCreated(?string $created): Storage - { - $this->created = $created; - - return $this; - } -} diff --git a/lib/Model/StorageAccessType.php b/lib/Model/StorageAccessType.php deleted file mode 100644 index c2f66f49..00000000 --- a/lib/Model/StorageAccessType.php +++ /dev/null @@ -1,26 +0,0 @@ -setBackup($data['backup'] ?? null); - } - - /** - * @return string[]|null - */ - public function getBackup(): ?array - { - return $this->backup; - } - - /** - * @param string[]|null $backup - * @return StorageBackups - */ - public function setBackup(?array $backup): StorageBackups - { - if (is_array($backup)) { - foreach ($backup as $item) { - $this->backup[] = $item; - } - } else { - $this->backup = $backup; - } - - return $this; - } -} - - diff --git a/lib/Model/StorageDevice.php b/lib/Model/StorageDevice.php deleted file mode 100644 index e2ceffba..00000000 --- a/lib/Model/StorageDevice.php +++ /dev/null @@ -1,325 +0,0 @@ -setTitle($data['title'] ?? null); - $this->setSize($data['size'] ?? null); - $this->setTier($data['tier'] ?? null); - $this->setAction($data['action'] ?? null); - $this->setAddress($data['address'] ?? null); - $this->setPartOfPlan($data['part_of_plan'] ?? null); - $this->setStorage($data['storage'] ?? null); - $this->setStorageSize($data['storage_size'] ?? null); - $this->setStorageTitle($data['storage_title'] ?? null); - $this->setType($data['type'] ?? null); - $this->setBootDisk($data['boot_disk'] ?? null); - } - - /** - * @return string|null - */ - public function getTitle(): ?string - { - return $this->title; - } - - /** - * @param string|null $title - * @return StorageDevice - */ - public function setTitle(?string $title): StorageDevice - { - $this->title = $title; - - return $this; - } - - /** - * @return float|string|null - */ - public function getSize() - { - return $this->size; - } - - /** - * @param float|string|null $size - * @return StorageDevice - */ - public function setSize($size): StorageDevice - { - $this->size = $size; - - return $this; - } - - /** - * @return string|null - */ - public function getTier(): ?string - { - return $this->tier; - } - - /** - * @param string|null $tier - * @return StorageDevice - */ - public function setTier(?string $tier): StorageDevice - { - $this->tier = $tier; - - return $this; - } - - /** - * @return string|null - */ - public function getAction(): ?string - { - return $this->action; - } - - /** - * @param string|null $action - * @return StorageDevice - */ - public function setAction(?string $action): StorageDevice - { - $this->action = $action; - - return $this; - } - - /** - * @return string|null - */ - public function getAddress(): ?string - { - return $this->address; - } - - /** - * @param string|null $address - * @return StorageDevice - */ - public function setAddress(?string $address): StorageDevice - { - $this->address = $address; - - return $this; - } - - /** - * @return string|null - */ - public function getPartOfPlan(): ?string - { - return $this->partOfPlan; - } - - /** - * @param string|null $partOfPlan - * @return StorageDevice - */ - public function setPartOfPlan(?string $partOfPlan): StorageDevice - { - if (!is_null($partOfPlan)) { - Assert::oneOf($partOfPlan, [ - self::PART_OF_PLAN_YES, - self::PART_OF_PLAN_NO, - ]); - } - $this->partOfPlan = $partOfPlan; - - return $this; - } - - /** - * @return string|null - */ - public function getStorage(): ?string - { - return $this->storage; - } - - /** - * @param string|null $storage - * @return StorageDevice - */ - public function setStorage(?string $storage): StorageDevice - { - $this->storage = $storage; - - return $this; - } - - /** - * @return float|null - */ - public function getStorageSize(): ?float - { - return $this->storageSize; - } - - /** - * @param float|null $storageSize - * @return StorageDevice - */ - public function setStorageSize(?float $storageSize): StorageDevice - { - $this->storageSize = $storageSize; - - return $this; - } - - /** - * @return string|null - */ - public function getStorageTitle(): ?string - { - return $this->storageTitle; - } - - /** - * @param string|null $storageTitle - * @return StorageDevice - */ - public function setStorageTitle(?string $storageTitle): StorageDevice - { - $this->storageTitle = $storageTitle; - - return $this; - } - - /** - * @return string|null - */ - public function getType(): ?string - { - return $this->type; - } - - /** - * @param string|null $type - * @return StorageDevice - */ - public function setType(?string $type): StorageDevice - { - if (!is_null($type)) { - Assert::oneOf($type, [ - self::TYPE_CDROM, - self::TYPE_DISK, - ]); - } - $this->type = $type; - - return $this; - } - - /** - * @return string|null - */ - public function getBootDisk(): ?string - { - return $this->bootDisk; - } - - /** - * @param string|null $bootDisk - * @return StorageDevice - */ - public function setBootDisk(?string $bootDisk): StorageDevice - { - if (!is_null($bootDisk)) { - Assert::oneOf($bootDisk, [ - self::BOOT_DISK_NO, - self::BOOT_DISK_YES, - ]); - } - - $this->bootDisk = $bootDisk; - - return $this; - } -} - - diff --git a/lib/Model/StorageDeviceDetachRequest.php b/lib/Model/StorageDeviceDetachRequest.php deleted file mode 100644 index a10d02e6..00000000 --- a/lib/Model/StorageDeviceDetachRequest.php +++ /dev/null @@ -1,20 +0,0 @@ -serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'title', 'size', 'tier', 'action', 'partOfPlan', 'storage', - 'storageSize', 'storageTitle', 'type', 'boot_disk' - ] - ]); - } -} diff --git a/lib/Model/StorageDeviceLoadRequest.php b/lib/Model/StorageDeviceLoadRequest.php deleted file mode 100644 index eefb5398..00000000 --- a/lib/Model/StorageDeviceLoadRequest.php +++ /dev/null @@ -1,21 +0,0 @@ -serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'title', 'size', 'tier', 'action', 'address', - 'partOfPlan', 'storageSize', 'storageTitle', 'type', 'bootDisk' - ] - ]); - } -} diff --git a/lib/Model/StorageDeviceRequest.php b/lib/Model/StorageDeviceRequest.php deleted file mode 100644 index 14151b88..00000000 --- a/lib/Model/StorageDeviceRequest.php +++ /dev/null @@ -1,48 +0,0 @@ -storageDevice = $data['storage_device'] ?? null; - } - - /** - * @return StorageDevice|null - */ - public function getStorageDevice(): ?StorageDevice - { - return $this->storageDevice; - } - - /** - * @param StorageDevice|array|null $storageDevice - * @return $this - */ - public function setStorageDevice($storageDevice): self - { - if (is_array($storageDevice)) { - $this->storageDevice = new StorageDevice($storageDevice); - } else { - $this->storageDevice = $storageDevice; - } - - return $this; - } -} diff --git a/lib/Model/StorageRequest.php b/lib/Model/StorageRequest.php deleted file mode 100644 index a1181aed..00000000 --- a/lib/Model/StorageRequest.php +++ /dev/null @@ -1,48 +0,0 @@ -setStorage($data['storage'] ?? null); - } - - /** - * @return Storage|null - */ - public function getStorage(): ?Storage - { - return $this->storage; - } - - /** - * @param Storage|array|null $storage - * @return $this - */ - public function setStorage($storage): self - { - if (is_array($storage)) { - $this->storage = new Storage($storage); - } else { - $this->storage = $storage; - } - - return $this; - } -} diff --git a/lib/Model/StorageState.php b/lib/Model/StorageState.php deleted file mode 100644 index a1ffda0c..00000000 --- a/lib/Model/StorageState.php +++ /dev/null @@ -1,34 +0,0 @@ -setStorages($data['storages'] ?? null); - } - - /** - * @return SuccessStoragesResponseStorages|null - */ - public function getStorages(): ?SuccessStoragesResponseStorages - { - return $this->storages; - } - - /** - * @param SuccessStoragesResponseStorages|array|null $storages - * @return SuccessStoragesResponse - */ - public function setStorages($storages): SuccessStoragesResponse - { - if (is_array($storages)) { - $this->storages = new SuccessStoragesResponseStorages($storages); - } else { - $this->storages = $storages; - } - - return $this; - } -} - - diff --git a/lib/Model/SuccessStoragesResponseStorages.php b/lib/Model/SuccessStoragesResponseStorages.php deleted file mode 100644 index fad5260d..00000000 --- a/lib/Model/SuccessStoragesResponseStorages.php +++ /dev/null @@ -1,49 +0,0 @@ -setStorage($data['storage'] ?? null); - } - - /** - * @return Storage[]|null - */ - public function getStorage(): ?array - { - return $this->storage; - } - - /** - * @param Storage[]|array|null $storage - * @return SuccessStoragesResponseStorages - */ - public function setStorage(?array $storage): SuccessStoragesResponseStorages - { - if (is_array($storage)) { - foreach ($storage as $item) { - $this->storage[] = $item instanceof Storage ? $item : new Storage($item); - } - } else { - $this->storage = $storage; - } - - return $this; - } -} - - diff --git a/lib/Model/Tag.php b/lib/Model/Tag.php deleted file mode 100644 index 0c566504..00000000 --- a/lib/Model/Tag.php +++ /dev/null @@ -1,97 +0,0 @@ -setName($data['name'] ?? null); - $this->setDescription($data['description'] ?? null); - $this->setServers($data['servers'] ?? null); - } - - /** - * @return string|null - */ - public function getName(): ?string - { - return $this->name; - } - - /** - * @param string|null $name - * @return Tag - */ - public function setName(?string $name): Tag - { - $this->name = $name; - - return $this; - } - - /** - * @return string|null - */ - public function getDescription(): ?string - { - return $this->description; - } - - /** - * @param string|null $description - * @return Tag - */ - public function setDescription(?string $description): Tag - { - $this->description = $description; - - return $this; - } - - /** - * @return TagServers|null - */ - public function getServers(): ?TagServers - { - return $this->servers; - } - - /** - * @param TagServers|array|null $servers - * @return Tag - */ - public function setServers($servers): Tag - { - if (is_array($servers)) { - $this->servers = new TagServers($servers); - } else { - $this->servers = $servers; - } - - return $this; - } -} - - diff --git a/lib/Model/TagCreateRequest.php b/lib/Model/TagCreateRequest.php deleted file mode 100644 index 94b3cf77..00000000 --- a/lib/Model/TagCreateRequest.php +++ /dev/null @@ -1,49 +0,0 @@ -tag = $data['tag'] ?? null; - } - - /** - * @return Tag|null - */ - public function getTag(): ?Tag - { - return $this->tag; - } - - /** - * @param Tag|array|null $tag - * @return TagCreateRequest - */ - public function setTag($tag): TagCreateRequest - { - if (is_array($tag)) { - $this->tag = new Tag($tag); - } else { - $this->tag = $tag; - } - - return $this; - } -} diff --git a/lib/Model/TagListResponse.php b/lib/Model/TagListResponse.php deleted file mode 100644 index 877a1fde..00000000 --- a/lib/Model/TagListResponse.php +++ /dev/null @@ -1,47 +0,0 @@ -tags = $data['tags'] ?? null; - } - - /** - * @return TagListResponseTags|null - */ - public function getTags(): ?TagListResponseTags - { - return $this->tags; - } - - /** - * @param TagListResponseTags|array|null $tags - * @return TagListResponse - */ - public function setTags($tags): TagListResponse - { - if (is_array($tags)) { - $this->tags = new TagListResponseTags($tags); - } else { - $this->tags = $tags; - } - - return $this; - } -} - - diff --git a/lib/Model/TagListResponseTags.php b/lib/Model/TagListResponseTags.php deleted file mode 100644 index a5cc841b..00000000 --- a/lib/Model/TagListResponseTags.php +++ /dev/null @@ -1,49 +0,0 @@ -setTag($data['tag'] ?? null); - } - - /** - * @return Tag[]|null - */ - public function getTag(): ?array - { - return $this->tag; - } - - /** - * @param Tag[]|null $tag - * @return TagListResponseTags - */ - public function setTag(?array $tag): TagListResponseTags - { - if (is_array($tag)) { - foreach ($tag as $item) { - $this->tag[] = $item instanceof Tag ? $item : new Tag($item); - } - } else { - $this->tag = $tag; - } - - return $this; - } -} - - diff --git a/lib/Model/TagServers.php b/lib/Model/TagServers.php deleted file mode 100644 index 3eb610ce..00000000 --- a/lib/Model/TagServers.php +++ /dev/null @@ -1,50 +0,0 @@ -setServer($data['server'] ?? null); - } - - /** - * @return string[]|null - */ - public function getServer(): ?array - { - return $this->server; - } - - /** - * @param string[]|null $server - * @return TagServers - */ - public function setServer(?array $server): TagServers - { - if (is_array($server)) { - foreach ($server as $item) { - $this->server[] = $item; - } - } else { - $this->server = $server; - } - - return $this; - } - -} - - diff --git a/lib/Model/TemplitizeStorageRequest.php b/lib/Model/TemplitizeStorageRequest.php deleted file mode 100644 index 23b00fe5..00000000 --- a/lib/Model/TemplitizeStorageRequest.php +++ /dev/null @@ -1,22 +0,0 @@ -serializer->serialize($this, 'json', [ - AbstractNormalizer::IGNORED_ATTRIBUTES => [ - 'access', 'backupRule', 'backups', 'license', 'servers', 'size', 'state', - 'tier', 'type', 'uuid', 'zone', 'origin', 'created' - ] - ]); - } -} - - diff --git a/lib/Model/TimezoneListResponse.php b/lib/Model/TimezoneListResponse.php deleted file mode 100644 index fc79ffe9..00000000 --- a/lib/Model/TimezoneListResponse.php +++ /dev/null @@ -1,47 +0,0 @@ -setTimezones($data['timezones'] ?? null); - } - - /** - * @return TimezoneListResponseTimezones|null - */ - public function getTimezones(): ?TimezoneListResponseTimezones - { - return $this->timezones; - } - - /** - * @param TimezoneListResponseTimezones|array|null $timezones - * @return TimezoneListResponse - */ - public function setTimezones($timezones): TimezoneListResponse - { - if (is_array($timezones)) { - $this->timezones = new TimezoneListResponseTimezones($timezones); - } else { - $this->timezones = $timezones; - } - - return $this; - } -} - - diff --git a/lib/Model/TimezoneListResponseTimezones.php b/lib/Model/TimezoneListResponseTimezones.php deleted file mode 100644 index 8600e436..00000000 --- a/lib/Model/TimezoneListResponseTimezones.php +++ /dev/null @@ -1,49 +0,0 @@ -setTimezone($data['timezone'] ?? null); - } - - /** - * @return string[]|null - */ - public function getTimezone(): ?array - { - return $this->timezone; - } - - /** - * @param string[]|null $timezone - * @return TimezoneListResponseTimezones - */ - public function setTimezone(?array $timezone): TimezoneListResponseTimezones - { - if (is_array($timezone)) { - foreach ($timezone as $item) { - $this->timezone[] = $item; - } - } else { - $this->timezone = $timezone; - } - - return $this; - } -} - - diff --git a/lib/Model/Zone.php b/lib/Model/Zone.php deleted file mode 100644 index 302964fc..00000000 --- a/lib/Model/Zone.php +++ /dev/null @@ -1,106 +0,0 @@ -setId($data['id'] ?? null); - $this->setDescription($data['description'] ?? null); - $this->setPublic($data['public'] ?? null); - } - - /** - * @return string|null - */ - public function getId(): ?string - { - return $this->id; - } - - /** - * @param string|null $id - * @return Zone - */ - public function setId(?string $id): Zone - { - $this->id = $id; - - return $this; - } - - /** - * @return string|null - */ - public function getDescription(): ?string - { - return $this->description; - } - - /** - * @param string|null $description - * @return Zone - */ - public function setDescription(?string $description): Zone - { - $this->description = $description; - - return $this; - } - - /** - * @return string|null - */ - public function getPublic(): ?string - { - return $this->public; - } - - /** - * @param string|null $public - * @return Zone - */ - public function setPublic(?string $public): Zone - { - if (!is_null($public)) { - Assert::oneOf($public, [ - self::PUBLIC_NO, - self::PUBLIC_YES, - ]); - } - - $this->public = $public; - - return $this; - } - -} - - diff --git a/lib/Model/ZoneListResponse.php b/lib/Model/ZoneListResponse.php deleted file mode 100644 index 39f53401..00000000 --- a/lib/Model/ZoneListResponse.php +++ /dev/null @@ -1,48 +0,0 @@ -setZones($data['zones'] ?? null); - } - - /** - * @return ZoneListResponseZones|null - */ - public function getZones(): ?ZoneListResponseZones - { - return $this->zones; - } - - /** - * @param ZoneListResponseZones|array|null $zones - * @return ZoneListResponse - */ - public function setZones($zones): ZoneListResponse - { - if (is_array($zones)) { - $this->zones = new ZoneListResponseZones($zones); - } else { - $this->zones = $zones; - } - - return $this; - } - -} - - diff --git a/lib/Model/ZoneListResponseZones.php b/lib/Model/ZoneListResponseZones.php deleted file mode 100644 index 4408711a..00000000 --- a/lib/Model/ZoneListResponseZones.php +++ /dev/null @@ -1,49 +0,0 @@ -setZone($data['zone'] ?? null); - } - - /** - * @return Zone[]|null - */ - public function getZone(): ?array - { - return $this->zone; - } - - /** - * @param Zone[]|array|null $zone - * @return ZoneListResponseZones - */ - public function setZone(?array $zone): ZoneListResponseZones - { - if (is_array($zone)) { - foreach ($zone as $item) { - $this->zone[] = $item instanceof Zone ? $item : new Zone($item); - } - } else { - $this->zone = $zone; - } - - return $this; - } -} - - diff --git a/lib/Serializer.php b/lib/Serializer.php deleted file mode 100644 index 02b79545..00000000 --- a/lib/Serializer.php +++ /dev/null @@ -1,40 +0,0 @@ -serializer = new BaseSerializer([$normalizer], [new JsonEncoder()]); - } - - public function deserialize(mixed $data, string $type, string $format = 'json', array $context = []): object|array - { - return $this->serializer->deserialize($data, $type, $format, $context); - } - - public function serialize(mixed $data, string $format = 'json', array $context = []): string - { - return $this->serializer->serialize($data, $format, array_merge([ - 'json_encode_options' => self::DEFAULT_ENCODING_OPTIONS, - ObjectNormalizer::SKIP_NULL_VALUES => true - ], $context)); - } -} diff --git a/lib/SerializerInterface.php b/lib/SerializerInterface.php deleted file mode 100644 index f9a5395e..00000000 --- a/lib/SerializerInterface.php +++ /dev/null @@ -1,33 +0,0 @@ -toCamelCase($key); - - return property_exists($this, $key); - } - - public function offsetGet($key) - { - return $this->get($key); - } - - public function offsetSet($key, $value) - { - $this->set($key, $value); - } - - public function offsetUnset($key) - { - if ($this->offsetExists($key)) { - $key = $this->toCamelCase($key); - unset($this->{$key}); - } - } - - private function set($key, $value) - { - if (!$this->offsetExists($key)) { - throw new InvalidArgumentException("Undefined index: {$key}"); - } - - $key = $this->toCamelCase($key); - - $this->{$key} = $value; - } - - private function get($key) - { - if (!$this->offsetExists($key)) { - throw new InvalidArgumentException("Undefined index: {$key}"); - } - - $key = $this->toCamelCase($key); - - return $this->{$key}; - } - - private function toCamelCase($string) - { - return lcfirst(str_replace('_', '', ucwords($string, '_'))); - } -} diff --git a/lib/Upcloud/AccountApi.php b/lib/Upcloud/AccountApi.php deleted file mode 100644 index 593dc854..00000000 --- a/lib/Upcloud/AccountApi.php +++ /dev/null @@ -1,88 +0,0 @@ -getAccountWithHttpInfo(); - return $response; - } - - /** - * Operation getAccountWithHttpInfo - * - * Account information - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException | GuzzleException - * @return array of AccountResponse, - * HTTP status code, - * HTTP response headers (array of strings) - */ - public function getAccountWithHttpInfo(): array - { - $request = new Request('GET', 'account'); - $response = $this->client->send($request); - - return $response->toArray(AccountResponse::class); - } - - /** - * Operation getAccountAsync - * - * Account information - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getAccountAsync(): PromiseInterface - { - return $this->getAccountAsyncWithHttpInfo()->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation getAccountAsyncWithHttpInfo - * - * Account information - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getAccountAsyncWithHttpInfo(): PromiseInterface - { - $request = new Request('GET', 'account'); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(AccountResponse::class); - }); - } -} diff --git a/lib/Upcloud/BaseApi.php b/lib/Upcloud/BaseApi.php deleted file mode 100644 index f67ce04f..00000000 --- a/lib/Upcloud/BaseApi.php +++ /dev/null @@ -1,66 +0,0 @@ -config = $config ?: Configuration::getDefaultConfiguration(); - $this->client = new UpcloudHttpClient($client, $this->config); - } - - /** - * @return Configuration - */ - public function getConfig(): Configuration - { - return $this->config; - } - - /** - * @param string $path - * @param array $parts - * @return string - */ - protected function buildPath(string $path, array $parts = []): string - { - foreach ($parts as $search => $replace) { - $path = str_replace('{' . $search . '}', $this->toPathValue($replace), $path); - } - return $path; - } - - protected function toPathValue($value) - { - return rawurlencode($this->toString($value)); - } - - protected function toString($value) - { - if ($value instanceof \DateTime) { // datetime in ISO8601 format - return $value->format(\DateTime::ATOM); - } else { - return strval($value); - } - } -} diff --git a/lib/Upcloud/FirewallApi.php b/lib/Upcloud/FirewallApi.php deleted file mode 100644 index b198c2f5..00000000 --- a/lib/Upcloud/FirewallApi.php +++ /dev/null @@ -1,438 +0,0 @@ -createFirewallRuleWithHttpInfo($serverId, $firewallRule); - return $response; - } - - /** - * Operation createFirewallRuleWithHttpInfo - * - * Create firewall rule - * - * @param string $serverId Server id (required) - * @param FirewallRuleRequest $firewallRule (required) - * @return array of FirewallRuleCreateResponse, - * HTTP status code, - * HTTP response headers (array of strings) - * @throws InvalidArgumentException|GuzzleException - * @throws ApiException on non-2xx response - */ - public function createFirewallRuleWithHttpInfo(string $serverId, FirewallRuleRequest $firewallRule): array - { - $url = $this->buildPath('server/{serverId}/firewall_rule', compact('serverId')); - $request = new Request('POST', $url, [], $firewallRule); - - $response = $this->client->send($request); - - return $response->toArray(FirewallRuleCreateResponse::class); - } - - /** - * Operation createFirewallRuleAsync - * - * Create firewall rule - * - * @param string $serverId Server id (required) - * @param FirewallRuleRequest $firewallRule (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createFirewallRuleAsync(string $serverId, FirewallRuleRequest $firewallRule): PromiseInterface - { - return $this->createFirewallRuleAsyncWithHttpInfo($serverId, $firewallRule)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation createFirewallRuleAsyncWithHttpInfo - * - * Create firewall rule - * - * @param string $serverId Server id (required) - * @param FirewallRuleRequest $firewallRule (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createFirewallRuleAsyncWithHttpInfo( - string $serverId, - FirewallRuleRequest $firewallRule - ): PromiseInterface { - - $url = $this->buildPath('server/{serverId}/firewall_rule', compact('serverId')); - $request = new Request('POST', $url, [], $firewallRule); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(FirewallRuleCreateResponse::class); - }); - } - - /** - * Operation createFirewallRules - * - * Create multiple firewall rules - * - * @param string $serverId Server id (required) - * @param FirewallRulesRequest $firewallRules (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - */ - public function createFirewallRules( - string $serverId, - FirewallRulesRequest $firewallRules - ): void { - $this->createFirewallRulesWithHttpInfo($serverId, $firewallRules); - } - - /** - * Operation createFirewallRulesWithHttpInfo - * - * Create multiple firewall rules - * - * @param string $serverId Server id (required) - * @param FirewallRulesRequest $firewallRules (required) - * @return array of null, HTTP status code, HTTP response headers (array of strings) - * @throws InvalidArgumentException|GuzzleException - * @throws ApiException on non-2xx response - */ - public function createFirewallRulesWithHttpInfo( - string $serverId, - FirewallRulesRequest $firewallRules - ): array { - $url = $this->buildPath('server/{serverId}/firewall_rule', compact('serverId')); - $request = new Request('PUT', $url, [], $firewallRules); - - $response = $this->client->send($request); - - return $response->toArray(); - } - - /** - * Operation createFirewallRulesAsync - * - * Create multiple firewall rules - * - * @param string $serverId Server id (required) - * @param FirewallRulesRequest $firewallRules (required) - * @return PromiseInterface - * @throws InvalidArgumentException - */ - public function createFirewallRulesAsync( - string $serverId, - FirewallRulesRequest $firewallRules - ): PromiseInterface { - return $this->createFirewallRulesAsyncWithHttpInfo($serverId, $firewallRules)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation createFirewallRulesAsyncWithHttpInfo - * - * Create multiple firewall rules - * - * @param string $serverId Server id (required) - * @param FirewallRulesRequest $firewallRules (required) - * @return PromiseInterface - * @throws InvalidArgumentException - */ - public function createFirewallRulesAsyncWithHttpInfo( - string $serverId, - FirewallRulesRequest $firewallRules - ): PromiseInterface { - - $url = $this->buildPath('server/{serverId}/firewall_rule', compact('serverId')); - $request = new Request('PUT', $url, [], $firewallRules); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(); - }); - } - - /** - * Operation deleteFirewallRule - * - * Remove firewall rule - * - * @param string $serverId Server id (required) - * @param float $firewallRuleNumber Denotes the index of the firewall rule - * in the server's firewall rule list (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return void - */ - public function deleteFirewallRule(string $serverId, float $firewallRuleNumber): void - { - $this->deleteFirewallRuleWithHttpInfo($serverId, $firewallRuleNumber); - } - - /** - * Operation deleteFirewallRuleWithHttpInfo - * - * Remove firewall rule - * - * @param string $serverId Server id (required) - * @param float $firewallRuleNumber Denotes the index of the firewall rule - * in the server's firewall rule list (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteFirewallRuleWithHttpInfo(string $serverId, float $firewallRuleNumber): array - { - $url = $this->buildPath( - 'server/{serverId}/firewall_rule/{firewallRuleNumber}', - compact('serverId', 'firewallRuleNumber') - ); - - $request = new Request('DELETE', $url); - - $response = $this->client->send($request); - - return $response->toArray(); - } - - /** - * Operation deleteFirewallRuleAsync - * - * Remove firewall rule - * - * @param string $serverId Server id (required) - * @param float $firewallRuleNumber Denotes the index of the firewall rule - * in the server's firewall rule list (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteFirewallRuleAsync(string $serverId, float $firewallRuleNumber): PromiseInterface - { - return $this->deleteFirewallRuleAsyncWithHttpInfo($serverId, $firewallRuleNumber)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation deleteFirewallRuleAsyncWithHttpInfo - * - * Remove firewall rule - * - * @param string $serverId Server id (required) - * @param float $firewallRuleNumber Denotes the index of the firewall rule - * in the server's firewall rule list (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteFirewallRuleAsyncWithHttpInfo(string $serverId, float $firewallRuleNumber): PromiseInterface - { - $url = $this->buildPath( - 'server/{serverId}/firewall_rule/{firewallRuleNumber}', - compact('serverId', 'firewallRuleNumber') - ); - - $request = new Request('DELETE', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(); - }); - } - - /** - * Operation getFirewallRule - * - * Get firewall rule details - * - * @param string $serverId Server id (required) - * @param float $firewallRuleNumber Denotes the index of the firewall rule - * in the server's firewall rule list (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return FirewallRuleCreateResponse - */ - public function getFirewallRule(string $serverId, float $firewallRuleNumber): FirewallRuleCreateResponse - { - list($response) = $this->getFirewallRuleWithHttpInfo($serverId, $firewallRuleNumber); - return $response; - } - - /** - * Operation getFirewallRuleWithHttpInfo - * - * Get firewall rule details - * - * @param string $serverId Server id (required) - * @param float $firewallRuleNumber Denotes the index of the firewall rule - * in the server's firewall rule list (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of FirewallRuleCreateResponse, - * HTTP status code, - * HTTP response headers (array of strings) - */ - public function getFirewallRuleWithHttpInfo(string $serverId, float $firewallRuleNumber): array - { - $url = $this->buildPath( - 'server/{serverId}/firewall_rule/{firewallRuleNumber}', - compact('serverId', 'firewallRuleNumber') - ); - - $request = new Request('GET', $url); - - $response = $this->client->send($request); - - return $response->toArray(FirewallRuleCreateResponse::class); - } - - /** - * Operation getFirewallRuleAsync - * - * Get firewall rule details - * - * @param string $serverId Server id (required) - * @param float $firewallRuleNumber Denotes the index of the firewall rule - * in the server's firewall rule list (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getFirewallRuleAsync(string $serverId, float $firewallRuleNumber): PromiseInterface - { - return $this->getFirewallRuleAsyncWithHttpInfo($serverId, $firewallRuleNumber)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation getFirewallRuleAsyncWithHttpInfo - * - * Get firewall rule details - * - * @param string $serverId Server id (required) - * @param float $firewallRuleNumber Denotes the index of the firewall rule - * in the server's firewall rule list (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getFirewallRuleAsyncWithHttpInfo(string $serverId, float $firewallRuleNumber): PromiseInterface - { - - $url = $this->buildPath( - 'server/{serverId}/firewall_rule/{firewallRuleNumber}', - compact('serverId', 'firewallRuleNumber') - ); - $request = new Request('GET', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(FirewallRuleCreateResponse::class); - }); - } - - /** - * Operation serverServerIdFirewallRuleGet - * - * List firewall rules - * - * @param string $serverId Server id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return FirewallRuleListResponse - */ - public function serverServerIdFirewallRuleGet(string $serverId): FirewallRuleListResponse - { - list($response) = $this->serverServerIdFirewallRuleGetWithHttpInfo($serverId); - return $response; - } - - /** - * Operation serverServerIdFirewallRuleGetWithHttpInfo - * - * List firewall rules - * - * @param string $serverId Server id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of FirewallRuleListResponse, - * HTTP status code, - * HTTP response headers (array of strings) - */ - public function serverServerIdFirewallRuleGetWithHttpInfo(string $serverId): array - { - - $url = $this->buildPath('server/{serverId}/firewall_rule', compact('serverId')); - $request = new Request('GET', $url); - - $response = $this->client->send($request); - - return $response->toArray(FirewallRuleListResponse::class); - } - - /** - * Operation serverServerIdFirewallRuleGetAsync - * - * List firewall rules - * - * @param string $serverId Server id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function serverServerIdFirewallRuleGetAsync(string $serverId): PromiseInterface - { - return $this->serverServerIdFirewallRuleGetAsyncWithHttpInfo($serverId)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation serverServerIdFirewallRuleGetAsyncWithHttpInfo - * - * List firewall rules - * - * @param string $serverId Server id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function serverServerIdFirewallRuleGetAsyncWithHttpInfo(string $serverId): PromiseInterface - { - $url = $this->buildPath('server/{serverId}/firewall_rule', compact('serverId')); - $request = new Request('GET', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - - return $response->toArray(FirewallRuleListResponse::class); - }); - } -} diff --git a/lib/Upcloud/HostsApi.php b/lib/Upcloud/HostsApi.php deleted file mode 100644 index de061075..00000000 --- a/lib/Upcloud/HostsApi.php +++ /dev/null @@ -1,239 +0,0 @@ -getListHostsWithHttpInfo(); - return $response; - } - - /** - * Operation getListHostsWithHttpInfo - * - * List of available hosts - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException | GuzzleException - * @return array of HostListResponse, - * HTTP status code, - * HTTP response headers (array of strings) - */ - public function getListHostsWithHttpInfo(): array - { - $request = new Request('GET', 'host'); - $response = $this->client->send($request); - - return $response->toArray(HostListResponse::class); - } - - - /** - * Operation getListHostsAsync - * - * List of available hosts - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getListHostsAsync(): PromiseInterface - { - return $this->getListHostsAsyncWithHttpInfo()->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation getListHostsAsyncWithHttpInfo - * - * List of available hosts - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getListHostsAsyncWithHttpInfo(): PromiseInterface - { - $request = new Request('GET', 'host'); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(HostListResponse::class); - }); - } - - /** - * Operation getHostDetails - * - * Get detailed information about a specific host - * - * @param int|string $id Host Id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return HostResponse - */ - public function getHostDetails($id): HostResponse - { - list($response) = $this->getHostDetailsWithHttpInfo($id); - return $response; - } - - /** - * Operation getHostDetailsWithHttpInfo - * - * Get detailed information about a specific host - * - * @param int|string $id Host Id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of HostResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function getHostDetailsWithHttpInfo($id): array - { - - $url = $this->buildPath('host/{id}', compact('id')); - $request = new Request('GET', $url); - - $response = $this->client->send($request); - - return $response->toArray(HostResponse::class); - } - - /** - * Operation getHostDetailsAsync - * - * Get detailed information about a specific host - * - * @param int|string $id Host Id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getHostDetailsAsync($id): PromiseInterface - { - return $this->getHostDetailsAsyncWithHttpInfo($id)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation getHostDetailsAsyncWithHttpInfo - * - * Get detailed information about a specific host - * - * @param int|string $id Host Id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getHostDetailsAsyncWithHttpInfo($id): PromiseInterface - { - $url = $this->buildPath('host/{id}', compact('id')); - $request = new Request('GET', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(HostResponse::class); - }); - } - - /** - * Operation modifyHost - * - * Modify specific host - * - * @param int|string $id Host Id (required) - * @param ModifyHostRequest $host (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return HostResponse - */ - public function modifyHost($id, ModifyHostRequest $host): HostResponse - { - list($response) = $this->modifyHostWithHttpInfo($id, $host); - return $response; - } - - /** - * Operation modifyHostWithHttpInfo - * - * Modify specific host - * - * @param int|string $id Host Id (required) - * @param ModifyHostRequest $host (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of HostResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function modifyHostWithHttpInfo($id, ModifyHostRequest $host): array - { - $url = $this->buildPath('host/{id}', compact('id')); - - $request = new Request('PATCH', $url, [], $host); - - $response = $this->client->send($request); - return $response->toArray(HostResponse::class); - } - - /** - * Operation modifyHostAsync - * - * Modify specific host - * - * @param int|string $id Host Id (required) - * @param ModifyHostRequest $host (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyHostAsync($id, ModifyHostRequest $host): PromiseInterface - { - return $this->modifyHostAsyncWithHttpInfo($id, $host)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation modifyHostAsyncWithHttpInfo - * - * Modify specific host - * - * @param int|string $id Host Id (required) - * @param ModifyHostRequest $host (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyHostAsyncWithHttpInfo($id, ModifyHostRequest $host): PromiseInterface - { - $url = $this->buildPath('host/{id}', compact('id')); - - $request = new Request('PATCH', $url, [], $host); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(HostResponse::class); - }); - } -} diff --git a/lib/Upcloud/IPAddressApi.php b/lib/Upcloud/IPAddressApi.php deleted file mode 100644 index 952ea1f2..00000000 --- a/lib/Upcloud/IPAddressApi.php +++ /dev/null @@ -1,377 +0,0 @@ -addIpWithHttpInfo($ipAddress); - return $response; - } - - /** - * Operation addIpWithHttpInfo - * - * Assign IP address - * - * @param AddIpRequest|null $ipAddress (optional) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of AssignIpResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function addIpWithHttpInfo(?AddIpRequest $ipAddress = null): array - { - $request = new Request('POST', 'ip_address', [], $ipAddress); - - $response = $this->client->send($request); - - return $response->toArray(AssignIpResponse::class); - } - - /** - * Operation addIpAsync - * - * Assign IP address - * - * @param AddIpRequest|null $ipAddress (optional) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function addIpAsync(?AddIpRequest $ipAddress = null): PromiseInterface - { - return $this->addIpAsyncWithHttpInfo($ipAddress)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation addIpAsyncWithHttpInfo - * - * Assign IP address - * - * @param AddIpRequest|null $ipAddress (optional) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function addIpAsyncWithHttpInfo(?AddIpRequest $ipAddress = null): PromiseInterface - { - $request = new Request('POST', 'ip_address', [], $ipAddress); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(AssignIpResponse::class); - }); - } - - /** - * Operation deleteIp - * - * Release IP address - * - * @param string $ip Ip address (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return void - */ - public function deleteIp(string $ip): void - { - $this->deleteIpWithHttpInfo($ip); - } - - /** - * Operation deleteIpWithHttpInfo - * - * Release IP address - * - * @param string $ip Ip address (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteIpWithHttpInfo(string $ip): array - { - $url = $this->buildPath('ip_address/{ip}', compact('ip')); - $request = new Request('DELETE', $url); - - $response = $this->client->send($request); - - return $response->toArray(); - } - - /** - * Operation deleteIpAsync - * - * Release IP address - * - * @param string $ip Ip address (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteIpAsync(string $ip): PromiseInterface - { - return $this->deleteIpAsyncWithHttpInfo($ip)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation deleteIpAsyncWithHttpInfo - * - * Release IP address - * - * @param string $ip Ip address (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteIpAsyncWithHttpInfo(string $ip): PromiseInterface - { - $url = $this->buildPath('ip_address/{ip}', compact('ip')); - $request = new Request('DELETE', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(); - }); - } - - /** - * Operation getDetails - * - * Get IP address details - * - * @param string $ip Ip address (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return AssignIpResponse - */ - public function getDetails(string $ip): AssignIpResponse - { - list($response) = $this->getDetailsWithHttpInfo($ip); - return $response; - } - - /** - * Operation getDetailsWithHttpInfo - * - * Get IP address details - * - * @param string $ip Ip address (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of AssignIpResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function getDetailsWithHttpInfo(string $ip): array - { - - $url = $this->buildPath('ip_address/{ip}', compact('ip')); - $request = new Request('GET', $url); - - $response = $this->client->send($request); - - return $response->toArray(AssignIpResponse::class); - } - - /** - * Operation getDetailsAsync - * - * Get IP address details - * - * @param string $ip Ip address (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getDetailsAsync(string $ip): PromiseInterface - { - return $this->getDetailsAsyncWithHttpInfo($ip)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation getDetailsAsyncWithHttpInfo - * - * Get IP address details - * - * @param string $ip Ip address (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getDetailsAsyncWithHttpInfo(string $ip): PromiseInterface - { - $url = $this->buildPath('ip_address/{ip}', compact('ip')); - $request = new Request('GET', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(AssignIpResponse::class); - }); - } - - /** - * Operation listIps - * - * List IP addresses - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return IpAddressListResponse - */ - public function listIps(): IpAddressListResponse - { - list($response) = $this->listIpsWithHttpInfo(); - return $response; - } - - /** - * Operation listIpsWithHttpInfo - * - * List IP addresses - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of IpAddressListResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function listIpsWithHttpInfo(): array - { - $request = new Request('GET', 'ip_address'); - $response = $this->client->send($request); - - return $response->toArray(IpAddressListResponse::class); - } - - /** - * Operation listIpsAsync - * - * List IP addresses - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listIpsAsync(): PromiseInterface - { - return $this->listIpsAsyncWithHttpInfo()->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation listIpsAsyncWithHttpInfo - * - * List IP addresses - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listIpsAsyncWithHttpInfo(): PromiseInterface - { - $request = new Request('GET', 'ip_address'); - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(IpAddressListResponse::class); - }); - } - - - /** - * Operation modifyIp - * - * Modify IP address - * - * @param string $ip Ip address (required) - * @param ModifyIpRequest|null $ipAddress (optional) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return AssignIpResponse - */ - public function modifyIp(string $ip, ?ModifyIpRequest $ipAddress = null): AssignIpResponse - { - list($response) = $this->modifyIpWithHttpInfo($ip, $ipAddress); - return $response; - } - - /** - * Operation modifyIpWithHttpInfo - * - * Modify IP address - * - * @param string $ip Ip address (required) - * @param ModifyIpRequest|null $ipAddress (optional) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of AssignIpResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function modifyIpWithHttpInfo(string $ip, ?ModifyIpRequest $ipAddress = null): array - { - $url = $this->buildPath('ip_address/{ip}', compact('ip')); - - $request = new Request('PATCH', $url, [], $ipAddress); - - $response = $this->client->send($request); - return $response->toArray(AssignIpResponse::class); - } - - /** - * Operation modifyIpAsync - * - * Modify IP address - * - * @param string $ip Ip address (required) - * @param ModifyIpRequest|null $ipAddress (optional) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyIpAsync(string $ip, ?ModifyIpRequest $ipAddress = null): PromiseInterface - { - return $this->modifyIpAsyncWithHttpInfo($ip, $ipAddress)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation modifyIpAsyncWithHttpInfo - * - * Modify IP address - * - * @param string $ip Ip address (required) - * @param ModifyIpRequest|null $ipAddress (optional) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyIpAsyncWithHttpInfo(string $ip, ?ModifyIpRequest $ipAddress = null): PromiseInterface - { - $url = $this->buildPath('ip_address/{ip}', compact('ip')); - - $request = new Request('PATCH', $url, [], $ipAddress); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(AssignIpResponse::class); - }); - } -} diff --git a/lib/Upcloud/NetworkApi.php b/lib/Upcloud/NetworkApi.php deleted file mode 100644 index 0f64b5bd..00000000 --- a/lib/Upcloud/NetworkApi.php +++ /dev/null @@ -1,1086 +0,0 @@ -getListNetworksWithHttpInfo($zone); - return $response; - } - - /** - * Operation getListNetworksWithHttpInfo - * - * List of networks - * - * @param string|null $zone - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of NetworksListResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function getListNetworksWithHttpInfo(?string $zone = null): array - { - $url ='network'; - - if ($zone) { - $url = $this->buildPath($url . '/?zone={zone}', compact('zone')); - } - - $request = new Request('GET', $url); - - $response = $this->client->send($request); - - return $response->toArray(NetworksListResponse::class); - } - - /** - * Operation getListNetworksAsync - * - * List of networks - * - * @param string|null $zone - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getListNetworksAsync(?string $zone = null): PromiseInterface - { - return $this->getListNetworksAsyncWithHttpInfo($zone)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation getListNetworksAsyncWithHttpInfo - * - * List of networks - * - * @param string|null $zone - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getListNetworksAsyncWithHttpInfo(?string $zone = null): PromiseInterface - { - $url ='network'; - - if ($zone) { - $url = $this->buildPath($url . '/?zone={zone}', compact('zone')); - } - - $request = new Request('GET', $url); - - return $this->client->sendAsync($request)->then(function ($response) { - return $response->toArray(NetworksListResponse::class); - }); - } - - /** - * Operation getNetworkDetails - * - * Get detailed information about a specific network - * - * @param string $uuid Network Uuid (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return NetworkResponse - */ - public function getNetworkDetails(string $uuid): NetworkResponse - { - list($response) = $this->getNetworkDetailsWithHttpInfo($uuid); - return $response; - } - - /** - * Operation getNetworkDetailsWithHttpInfo - * - * Get detailed information about a specific network - * - * @param string $uuid Network Uuid (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of NetworkResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function getNetworkDetailsWithHttpInfo(string $uuid): array - { - - $url = $this->buildPath('network/{uuid}', compact('uuid')); - $request = new Request('GET', $url); - - $response = $this->client->send($request); - - return $response->toArray(NetworkResponse::class); - } - - /** - * Operation getNetworkDetailsAsync - * - * Get detailed information about a specific network - * - * @param string $uuid Network Uuid (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getNetworkDetailsAsync(string $uuid): PromiseInterface - { - return $this->getNetworkDetailsAsyncWithHttpInfo($uuid)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation getNetworkDetailsAsyncWithHttpInfo - * - * Get detailed information about a specific network - * - * @param string $uuid Network Uuid (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getNetworkDetailsAsyncWithHttpInfo(string $uuid): PromiseInterface - { - $url = $this->buildPath('network/{uuid}', compact('uuid')); - $request = new Request('GET', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(NetworkResponse::class); - }); - } - - /** - * Operation createNetwork - * - * Create a new SDN private network - * - * @param CreateNetworkRequest $network (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return NetworkResponse - */ - public function createNetwork(CreateNetworkRequest $network): NetworkResponse - { - list($response) = $this->createNetworkWithHttpInfo($network); - return $response; - } - - /** - * Operation createNetworkWithHttpInfo - * - * Create a new SDN private network - * - * @param CreateNetworkRequest $network (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of NetworkResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function createNetworkWithHttpInfo(CreateNetworkRequest $network): array - { - $request = new Request('POST', 'network', [], $network); - $response = $this->client->send($request); - - return $response->toArray(NetworkResponse::class); - } - - /** - * Operation createNetworkAsync - * - * Create a new SDN private network - * - * @param CreateNetworkRequest $network (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createNetworkAsync(CreateNetworkRequest $network): PromiseInterface - { - return $this->createNetworkAsyncWithHttpInfo($network)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation createNetworkAsyncWithHttpInfo - * - * Create a new SDN private network - * - * @param CreateNetworkRequest $network (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createNetworkAsyncWithHttpInfo(CreateNetworkRequest $network): PromiseInterface - { - $request = new Request('POST', 'network', [], $network); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(NetworkResponse::class); - }); - } - - /** - * Operation modifyNetwork - * - * Modifies the details of a specific SDN private network - * - * @param string $uuid Network uuid (required) - * @param ModifyNetworkRequest $network (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return NetworkResponse - */ - public function modifyNetwork(string $uuid, ModifyNetworkRequest $network): NetworkResponse - { - list($response) = $this->modifyNetworkWithHttpInfo($uuid, $network); - return $response; - } - - /** - * Operation modifyNetworkWithHttpInfo - * - * Modifies the details of a specific SDN private network - * - * @param string $uuid Network uuid (required) - * @param ModifyNetworkRequest $network (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of NetworkResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function modifyNetworkWithHttpInfo(string $uuid, ModifyNetworkRequest $network): array - { - $url = $this->buildPath('network/{uuid}', compact('uuid')); - - $request = new Request('PUT', $url, [], $network); - - $response = $this->client->send($request); - return $response->toArray(NetworkResponse::class); - } - - /** - * Operation modifyNetworkAsync - * - * Modifies the details of a specific SDN private network - * - * @param string $uuid Network uuid (required) - * @param ModifyNetworkRequest $network (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyNetworkAsync(string $uuid, ModifyNetworkRequest $network): PromiseInterface - { - return $this->modifyNetworkAsyncWithHttpInfo($uuid, $network)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation modifyNetworkAsyncWithHttpInfo - * - * Modifies the details of a specific SDN private network - * - * @param string $uuid Network uuid (required) - * @param ModifyNetworkRequest $network (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyNetworkAsyncWithHttpInfo( - string $uuid, - ModifyNetworkRequest $network - ): PromiseInterface { - $url = $this->buildPath('network/{uuid}', compact('uuid')); - - $request = new Request('PUT', $url, [], $network); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(NetworkResponse::class); - }); - } - - /** - * Operation deleteNetwork - * - * Deletes an SDN private network - * - * @param string $uuid Network uuid (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return void - */ - public function deleteNetwork(string $uuid): void - { - $this->deleteNetworkWithHttpInfo($uuid); - } - - /** - * Operation deleteNetworkWithHttpInfo - * - * Deletes an SDN private network - * - * @param string $uuid Network uuid (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteNetworkWithHttpInfo(string $uuid): array - { - $url = $this->buildPath('network/{uuid}', compact('uuid')); - $request = new Request('DELETE', $url); - - $response = $this->client->send($request); - - return $response->toArray(); - } - - /** - * Operation deleteNetworkAsync - * - * Deletes an SDN private network - * - * @param string $uuid Network uuid (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteNetworkAsync(string $uuid): PromiseInterface - { - return $this->deleteNetworkAsyncWithHttpInfo($uuid)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation deleteNetworkAsyncWithHttpInfo - * - * Deletes an SDN private network - * - * @param string $uuid Network uuid (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteNetworkAsyncWithHttpInfo(string $uuid): PromiseInterface - { - $url = $this->buildPath('network/{uuid}', compact('uuid')); - $request = new Request('DELETE', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(); - }); - } - - /** - * Operation getListServerNetworks - * - * List networks the specific cloud server - * - * @param string $server - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return ServerNetworksListResponse - */ - public function getListServerNetworks(string $server): ServerNetworksListResponse - { - list($response) = $this->getListServerNetworksWithHttpInfo($server); - return $response; - } - - /** - * Operation getListServerNetworksWithHttpInfo - * - * List networks the specific cloud server - * - * @param string $server - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of ServerNetworksListResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function getListServerNetworksWithHttpInfo(string $server): array - { - $url = $this->buildPath('server/{server}/networking', compact('server')); - - $request = new Request('GET', $url); - - $response = $this->client->send($request); - - return $response->toArray(ServerNetworksListResponse::class); - } - - /** - * Operation getListServerNetworksAsync - * - * List networks the specific cloud server - * - * @param string $server - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getListServerNetworksAsync(string $server): PromiseInterface - { - return $this->getListServerNetworksAsyncWithHttpInfo($server)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation getListServerNetworksAsyncWithHttpInfo - * - * List networks the specific cloud server - * - * @param string $server - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getListServerNetworksAsyncWithHttpInfo(string $server): PromiseInterface - { - $url = $this->buildPath('server/{server}/networking', compact('server')); - - $request = new Request('GET', $url); - - return $this->client->sendAsync($request)->then(function ($response) { - return $response->toArray(ServerNetworksListResponse::class); - }); - } - - /** - * Operation createNetworkInterface - * - * Create a new network interface on the specific cloud server - * - * @param string $server - * @param CreateNetworkInterfaceRequest $network (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return NetworkInterfaceResponse - */ - public function createNetworkInterface( - string $server, - CreateNetworkInterfaceRequest $network - ): NetworkInterfaceResponse { - list($response) = $this->createNetworkInterfaceWithHttpInfo($server, $network); - return $response; - } - - /** - * Operation createNetworkInterfaceWithHttpInfo - * - * Create a new network interface on the specific cloud server - * - * @param string $server - * @param CreateNetworkInterfaceRequest $network (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of NetworkInterfaceResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function createNetworkInterfaceWithHttpInfo(string $server, CreateNetworkInterfaceRequest $network): array - { - $url = $this->buildPath('server/{server}/networking/interface', compact('server')); - - $request = new Request('POST', $url, [], $network); - - $response = $this->client->send($request); - - return $response->toArray(NetworkInterfaceResponse::class); - } - - /** - * Operation createNetworkInterfaceAsync - * - * Create a new network interface on the specific cloud server - * - * @param string $server - * @param CreateNetworkInterfaceRequest $network (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createNetworkInterfaceAsync( - string $server, - CreateNetworkInterfaceRequest $network - ): PromiseInterface { - return $this->createNetworkInterfaceAsyncWithHttpInfo($server, $network)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation createNetworkInterfaceAsyncWithHttpInfo - * - * Create a new network interface on the specific cloud server - * - * @param string $server - * @param CreateNetworkInterfaceRequest $network (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createNetworkInterfaceAsyncWithHttpInfo( - string $server, - CreateNetworkInterfaceRequest $network - ): PromiseInterface { - $url = $this->buildPath('server/{server}/networking/interface', compact('server')); - $request = new Request('POST', $url, [], $network); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(NetworkInterfaceResponse::class); - }); - } - - /** - * Operation modifyNetworkInterface - * - * Modifies network interface at the selected index on the specific cloud server - * - * @param string $server Server uuid (required) - * @param int $index Index of the interface to modify (required) - * @param ModifyNetworkInterfaceRequest $network (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return NetworkInterfaceResponse - */ - public function modifyNetworkInterface( - string $server, - int $index, - ModifyNetworkInterfaceRequest $network - ): NetworkInterfaceResponse { - list($response) = $this->modifyNetworkInterfaceWithHttpInfo($server, $index, $network); - return $response; - } - - /** - * Operation modifyNetworkInterfaceWithHttpInfo - * - * Modifies network interface at the selected index on the specific cloud server - * - * @param string $server Server uuid (required) - * @param int $index Index of the interface to modify (required) - * @param ModifyNetworkInterfaceRequest $network (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of NetworkInterfaceResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function modifyNetworkInterfaceWithHttpInfo( - string $server, - int $index, - ModifyNetworkInterfaceRequest $network - ): array { - $url = $this->buildPath( - 'server/{server}/networking/interface/{index}', - compact('server', 'index') - ); - - $request = new Request('PUT', $url, [], $network); - - $response = $this->client->send($request); - return $response->toArray(NetworkInterfaceResponse::class); - } - - /** - * Operation modifyNetworkInterfaceAsync - * - * Modifies network interface at the selected index on the specific cloud server - * - * @param string $server Server uuid (required) - * @param int $index Index of the interface to modify (required) - * @param ModifyNetworkInterfaceRequest $network (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyNetworkInterfaceAsync( - string $server, - int $index, - ModifyNetworkInterfaceRequest $network - ): PromiseInterface { - return $this->modifyNetworkInterfaceAsyncWithHttpInfo($server, $index, $network)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation modifyNetworkInterfaceAsyncWithHttpInfo - * - * Modifies network interface at the selected index on the specific cloud server - * - * @param string $server Server uuid (required) - * @param int $index Index of the interface to modify (required) - * @param ModifyNetworkInterfaceRequest $network (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyNetworkInterfaceAsyncWithHttpInfo( - string $server, - int $index, - ModifyNetworkInterfaceRequest $network - ): PromiseInterface { - $url = $this->buildPath( - 'server/{server}/networking/interface/{index}', - compact('server', 'index') - ); - - $request = new Request('PUT', $url, [], $network); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(NetworkInterfaceResponse::class); - }); - } - - /** - * Operation deleteNetworkInterface - * - * Detaches an SDN private network from a cloud server by deleting the network interface at the selected index - * - * @param string $server Server uuid (required) - * @param int $index Index of the interface to delete (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return void - */ - public function deleteNetworkInterface(string $server, int $index): void - { - $this->deleteNetworkInterfaceWithHttpInfo($server, $index); - } - - /** - * Operation deleteNetworkInterfaceWithHttpInfo - * - * Detaches an SDN private network from a cloud server by deleting the network interface at the selected index - * - * @param string $server Server uuid (required) - * @param int $index Index of the interface to delete (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteNetworkInterfaceWithHttpInfo(string $server, int $index): array - { - $url = $this->buildPath( - 'server/{server}/networking/interface/{index}', - compact('server', 'index') - ); - - $request = new Request('DELETE', $url); - - $response = $this->client->send($request); - - return $response->toArray(); - } - - /** - * Operation deleteNetworkInterfaceAsync - * - * Detaches an SDN private network from a cloud server by deleting the network interface at the selected index - * - * @param string $server Server uuid (required) - * @param int $index Index of the interface to delete (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteNetworkInterfaceAsync(string $server, int $index): PromiseInterface - { - return $this->deleteNetworkInterfaceAsyncWithHttpInfo($server, $index)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation deleteNetworkInterfaceAsyncWithHttpInfo - * - * Detaches an SDN private network from a cloud server by deleting the network interface at the selected index - * - * @param string $server Server uuid (required) - * @param int $index Index of the interface to delete (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteNetworkInterfaceAsyncWithHttpInfo(string $server, int $index): PromiseInterface - { - $url = $this->buildPath( - 'server/{server}/networking/interface/{index}', - compact('server', 'index') - ); - - $request = new Request('DELETE', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(); - }); - } - - /** - * Operation getListRouters - * - * List of all available routers - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return RoutersListResponse - */ - public function getListRouters(): RoutersListResponse - { - list($response) = $this->getListRoutersWithHttpInfo(); - return $response; - } - - /** - * Operation getListRoutersWithHttpInfo - * - * List of all available routers - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of RoutersListResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function getListRoutersWithHttpInfo(): array - { - $request = new Request('GET', 'router'); - - $response = $this->client->send($request); - - return $response->toArray(RoutersListResponse::class); - } - - /** - * Operation getListRoutersAsync - * - * List of all available routers - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getListRoutersAsync(): PromiseInterface - { - return $this->getListRoutersAsyncWithHttpInfo()->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation getListRoutersAsyncWithHttpInfo - * - * List of all available routers - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getListRoutersAsyncWithHttpInfo(): PromiseInterface - { - - $request = new Request('GET', 'router'); - - return $this->client->sendAsync($request)->then(function ($response) { - return $response->toArray(RoutersListResponse::class); - }); - } - - /** - * Operation getRouterDetails - * - * Get detailed information about a specific Router - * - * @param string $uuid Router Uuid (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return RouterResponse - */ - public function getRouterDetails(string $uuid): RouterResponse - { - list($response) = $this->getRouterDetailsWithHttpInfo($uuid); - return $response; - } - - /** - * Operation getRouterDetailsWithHttpInfo - * - * Get detailed information about a specific Router - * - * @param string $uuid Router Uuid (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of RouterResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function getRouterDetailsWithHttpInfo(string $uuid): array - { - - $url = $this->buildPath('router/{uuid}', compact('uuid')); - $request = new Request('GET', $url); - - $response = $this->client->send($request); - - return $response->toArray(RouterResponse::class); - } - - /** - * Operation getRouterDetailsAsync - * - * Get detailed information about a specific Router - * - * @param string $uuid Router Uuid (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getRouterDetailsAsync(string $uuid): PromiseInterface - { - return $this->getRouterDetailsAsyncWithHttpInfo($uuid)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation getRouterDetailsAsyncWithHttpInfo - * - * Get detailed information about a specific Router - * - * @param string $uuid Router Uuid (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getRouterDetailsAsyncWithHttpInfo(string $uuid): PromiseInterface - { - $url = $this->buildPath('router/{uuid}', compact('uuid')); - $request = new Request('GET', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(RouterResponse::class); - }); - } - - /** - * Operation createRouter - * - * Create a new router - * - * @param RouterRequest $router (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return RouterResponse - */ - public function createRouter(RouterRequest $router): RouterResponse - { - list($response) = $this->createRouterWithHttpInfo($router); - return $response; - } - - /** - * Operation createRouterWithHttpInfo - * - * Create a new router - * - * @param RouterRequest $router (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of RouterResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function createRouterWithHttpInfo(RouterRequest $router): array - { - $request = new Request('POST', 'router', [], $router); - - $response = $this->client->send($request); - - return $response->toArray(RouterResponse::class); - } - - /** - * Operation createRouterAsync - * - * Create a new router - * - * @param RouterRequest $router (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createRouterAsync(RouterRequest $router): PromiseInterface - { - return $this->createRouterAsyncWithHttpInfo($router)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation createRouterAsyncWithHttpInfo - * - * Create a new router - * - * @param RouterRequest $router (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createRouterAsyncWithHttpInfo(RouterRequest $router): PromiseInterface - { - $request = new Request('POST', 'router', [], $router); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(RouterResponse::class); - }); - } - - /** - * Operation modifyRouter - * - * Modify an existing router - * - * @param string $uuid Router uuid (required) - * @param RouterRequest $router (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return RouterResponse - */ - public function modifyRouter(string $uuid, RouterRequest $router): RouterResponse - { - list($response) = $this->modifyRouterWithHttpInfo($uuid, $router); - return $response; - } - - /** - * Operation modifyRouterWithHttpInfo - * - * Modify an existing router - * - * @param string $uuid Router uuid (required) - * @param RouterRequest $router (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of RouterResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function modifyRouterWithHttpInfo(string $uuid, RouterRequest $router): array - { - $url = $this->buildPath('router/{uuid}', compact('uuid')); - - $request = new Request('PATCH', $url, [], $router); - - $response = $this->client->send($request); - return $response->toArray(RouterResponse::class); - } - - /** - * Operation modifyRouterAsync - * - * Modify an existing router - * - * @param string $uuid Router uuid (required) - * @param RouterRequest $router (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyRouterAsync(string $uuid, RouterRequest $router): PromiseInterface - { - return $this->modifyRouterAsyncWithHttpInfo($uuid, $router)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation modifyRouterAsyncWithHttpInfo - * - * Modify an existing router - * - * @param string $uuid Router uuid (required) - * @param RouterRequest $router (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyRouterAsyncWithHttpInfo( - string $uuid, - RouterRequest $router - ): PromiseInterface { - $url = $this->buildPath('router/{uuid}', compact('uuid')); - - $request = new Request('PATCH', $url, [], $router); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(RouterResponse::class); - }); - } - - /** - * Operation deleteRouter - * - * Delete an existing router - * - * @param string $uuid Router uuid (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return void - */ - public function deleteRouter(string $uuid): void - { - $this->deleteRouterWithHttpInfo($uuid); - } - - /** - * Operation deleteRouterWithHttpInfo - * - * Delete an existing router - * - * @param string $uuid Router uuid (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteRouterWithHttpInfo(string $uuid): array - { - $url = $this->buildPath('router/{uuid}', compact('uuid')); - $request = new Request('DELETE', $url); - - $response = $this->client->send($request); - - return $response->toArray(); - } - - /** - * Operation deleteRouterAsync - * - * Delete an existing router - * - * @param string $uuid Router uuid (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteRouterAsync(string $uuid): PromiseInterface - { - return $this->deleteRouterAsyncWithHttpInfo($uuid)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation deleteRouterAsyncWithHttpInfo - * - * Delete an existing router - * - * @param string $uuid Router uuid (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteRouterAsyncWithHttpInfo(string $uuid): PromiseInterface - { - $url = $this->buildPath('router/{uuid}', compact('uuid')); - $request = new Request('DELETE', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(); - }); - } - -} diff --git a/lib/Upcloud/ObjectStorageApi.php b/lib/Upcloud/ObjectStorageApi.php deleted file mode 100644 index d12d520e..00000000 --- a/lib/Upcloud/ObjectStorageApi.php +++ /dev/null @@ -1,381 +0,0 @@ -getListObjectStorageWithHttpInfo(); - return $response; - } - - /** - * Operation getListObjectStorageWithHttpInfo - * - * List all Object Storage - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException | GuzzleException - * @return array of ObjectStorageListResponse, - * HTTP status code, - * HTTP response headers (array of strings) - */ - public function getListObjectStorageWithHttpInfo(): array - { - $request = new Request('GET', 'object-storage'); - $response = $this->client->send($request); - - return $response->toArray(ObjectStorageListResponse::class); - } - - - /** - * Operation getListObjectStorageAsync - * - * List all Object Storage - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getListObjectStorageAsync(): PromiseInterface - { - return $this->getListObjectStorageAsyncWithHttpInfo()->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation getListObjectStorageAsyncWithHttpInfo - * - * List all Object Storage - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getListObjectStorageAsyncWithHttpInfo(): PromiseInterface - { - $request = new Request('GET', 'object-storage'); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(ObjectStorageListResponse::class); - }); - } - - /** - * Operation getObjectStorageDetails - * - * Get details about a specific Object Storage - * - * @param string $uuid ObjectStorage uuid (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return ObjectStorageResponse - */ - public function getObjectStorageDetails(string $uuid): ObjectStorageResponse - { - list($response) = $this->getObjectStorageDetailsWithHttpInfo($uuid); - return $response; - } - - /** - * Operation getObjectStorageDetailsWithHttpInfo - * - * Get details about a specific Object Storage - * - * @param string $uuid ObjectStorage uuid (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of ObjectStorageResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function getObjectStorageDetailsWithHttpInfo(string $uuid): array - { - - $url = $this->buildPath('object-storage/{uuid}', compact('uuid')); - $request = new Request('GET', $url); - - $response = $this->client->send($request); - - return $response->toArray(ObjectStorageResponse::class); - } - - /** - * Operation getObjectStorageDetailsAsync - * - * Get details about a specific Object Storage - * - * @param string $uuid ObjectStorage uuid (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getObjectStorageDetailsAsync(string $uuid): PromiseInterface - { - return $this->getObjectStorageDetailsAsyncWithHttpInfo($uuid)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation getObjectStorageDetailsAsyncWithHttpInfo - * - * Get details about a specific Object Storage - * - * @param string $uuid ObjectStorage uuid (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getObjectStorageDetailsAsyncWithHttpInfo(string $uuid): PromiseInterface - { - $url = $this->buildPath('object-storage/{uuid}', compact('uuid')); - $request = new Request('GET', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(ObjectStorageResponse::class); - }); - } - - /** - * Operation createObjectStorage - * - * Create a new object storage - * - * @param CreateObjectStorageRequest $storage (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return ObjectStorageResponse - */ - public function createObjectStorage(CreateObjectStorageRequest $storage): ObjectStorageResponse - { - list($response) = $this->createObjectStorageWithHttpInfo($storage); - return $response; - } - - /** - * Operation createObjectStorageWithHttpInfo - * - * Create a new object storage - * - * @param CreateObjectStorageRequest $storage (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of ObjectStorageResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function createObjectStorageWithHttpInfo(CreateObjectStorageRequest $storage): array - { - $request = new Request('POST', 'object-storage', [], $storage); - $response = $this->client->send($request); - - return $response->toArray(ObjectStorageResponse::class); - } - - /** - * Operation createObjectStorageAsync - * - * Create a new object storage - * - * @param CreateObjectStorageRequest $storage (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createObjectStorageAsync(CreateObjectStorageRequest $storage): PromiseInterface - { - return $this->createObjectStorageAsyncWithHttpInfo($storage)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation createObjectStorageAsyncWithHttpInfo - * - * Create a new object storage - * - * @param CreateObjectStorageRequest $storage (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createObjectStorageAsyncWithHttpInfo(CreateObjectStorageRequest $storage): PromiseInterface - { - $request = new Request('POST', 'object-storage', [], $storage); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(ObjectStorageResponse::class); - }); - } - - - /** - * Operation modifyObjectStorage - * - * Modify specific object storage - * - * @param string $uuid ObjectStorage uuid (required) - * @param ModifyObjectStorageRequest $storage (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return ObjectStorageResponse - */ - public function modifyObjectStorage(string $uuid, ModifyObjectStorageRequest $storage): ObjectStorageResponse - { - list($response) = $this->modifyObjectStorageWithHttpInfo($uuid, $storage); - return $response; - } - - /** - * Operation modifyObjectStorageWithHttpInfo - * - * Modify specific object storage - * - * @param string $uuid ObjectStorage uuid (required) - * @param ModifyObjectStorageRequest $storage (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of ObjectStorageResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function modifyObjectStorageWithHttpInfo(string $uuid, ModifyObjectStorageRequest $storage): array - { - $url = $this->buildPath('object-storage/{uuid}', compact('uuid')); - - $request = new Request('PATCH', $url, [], $storage); - - $response = $this->client->send($request); - return $response->toArray(ObjectStorageResponse::class); - } - - /** - * Operation modifyObjectStorageAsync - * - * Modify specific object storage - * - * @param string $uuid ObjectStorage uuid (required) - * @param ModifyObjectStorageRequest $storage (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyObjectStorageAsync(string $uuid, ModifyObjectStorageRequest $storage): PromiseInterface - { - return $this->modifyObjectStorageAsyncWithHttpInfo($uuid, $storage)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation modifyObjectStorageAsyncWithHttpInfo - * - * Modify specific object storage - * - * @param string $uuid ObjectStorage uuid (required) - * @param ModifyObjectStorageRequest $storage (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyObjectStorageAsyncWithHttpInfo( - string $uuid, - ModifyObjectStorageRequest $storage - ): PromiseInterface { - $url = $this->buildPath('object-storage/{uuid}', compact('uuid')); - - $request = new Request('PATCH', $url, [], $storage); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(ObjectStorageResponse::class); - }); - } - - /** - * Operation deleteObjectStorage - * - * Release object storage - * - * @param string $uuid ObjectStorage uuid (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return void - */ - public function deleteObjectStorage(string $uuid): void - { - $this->deleteObjectStorageWithHttpInfo($uuid); - } - - /** - * Operation deleteObjectStorageWithHttpInfo - * - * Release object storage - * - * @param string $uuid ObjectStorage uuid (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteObjectStorageWithHttpInfo(string $uuid): array - { - $url = $this->buildPath('object-storage/{uuid}', compact('uuid')); - $request = new Request('DELETE', $url); - - $response = $this->client->send($request); - - return $response->toArray(); - } - - /** - * Operation deleteObjectStorageAsync - * - * Release object storage - * - * @param string $uuid ObjectStorage uuid (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteObjectStorageAsync(string $uuid): PromiseInterface - { - return $this->deleteObjectStorageAsyncWithHttpInfo($uuid)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation deleteObjectStorageAsyncWithHttpInfo - * - * Release object storage - * - * @param string $uuid ObjectStorage uuid (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteObjectStorageAsyncWithHttpInfo(string $uuid): PromiseInterface - { - $url = $this->buildPath('object-storage/{uuid}', compact('uuid')); - $request = new Request('DELETE', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(); - }); - } -} diff --git a/lib/Upcloud/PlanApi.php b/lib/Upcloud/PlanApi.php deleted file mode 100644 index 0174d869..00000000 --- a/lib/Upcloud/PlanApi.php +++ /dev/null @@ -1,86 +0,0 @@ -listPlansWithHttpInfo(); - return $response; - } - - /** - * Operation listPlansWithHttpInfo - * - * List available plans - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of AvailablePlanListResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function listPlansWithHttpInfo(): array - { - $request = new Request('GET', 'plan'); - $response = $this->client->send($request); - return $response->toArray(AvailablePlanListResponse::class); - } - - /** - * Operation listPlansAsync - * - * List available plans - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listPlansAsync(): PromiseInterface - { - return $this->listPlansAsyncWithHttpInfo()->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation listPlansAsyncWithHttpInfo - * - * List available plans - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listPlansAsyncWithHttpInfo(): PromiseInterface - { - $request = new Request('GET', 'plan'); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(AvailablePlanListResponse::class); - }); - } -} diff --git a/lib/Upcloud/PricesApi.php b/lib/Upcloud/PricesApi.php deleted file mode 100644 index 734326ca..00000000 --- a/lib/Upcloud/PricesApi.php +++ /dev/null @@ -1,88 +0,0 @@ -listPricesWithHttpInfo(); - return $response; - } - - /** - * Operation listPricesWithHttpInfo - * - * List prices - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of PriceListResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function listPricesWithHttpInfo(): array - { - $request = new Request('GET', 'price'); - - $response = $this->client->send($request); - - return $response->toArray(PriceListResponse::class); - } - - /** - * Operation listPricesAsync - * - * List prices - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listPricesAsync(): PromiseInterface - { - return $this->listPricesAsyncWithHttpInfo()->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation listPricesAsyncWithHttpInfo - * - * List prices - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listPricesAsyncWithHttpInfo(): PromiseInterface - { - $request = new Request('GET', 'price'); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(PriceListResponse::class); - }); - } -} diff --git a/lib/Upcloud/ServerApi.php b/lib/Upcloud/ServerApi.php deleted file mode 100644 index d92cc8aa..00000000 --- a/lib/Upcloud/ServerApi.php +++ /dev/null @@ -1,1435 +0,0 @@ -assignTagWithHttpInfo($serverId, $tagList); - return $response; - } - - /** - * Operation assignTagWithHttpInfo - * - * Assign tag to a server - * - * @param string $serverId Server id (required) - * @param string $tagList List of tags (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function assignTagWithHttpInfo(string $serverId, string $tagList): array - { - $url = $this->buildPath('server/{serverId}/tag/{tagList}', compact('serverId', 'tagList')); - $request = new Request('POST', $url); - - $response = $this->client->send($request); - - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation assignTagAsync - * - * Assign tag to a server - * - * @param string $serverId Server id (required) - * @param string $tagList List of tags (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function assignTagAsync(string $serverId, string $tagList): PromiseInterface - { - return $this->assignTagAsyncWithHttpInfo($serverId, $tagList)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation assignTagAsyncWithHttpInfo - * - * Assign tag to a server - * - * @param string $serverId Server id (required) - * @param string $tagList List of tags (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function assignTagAsyncWithHttpInfo(string $serverId, string $tagList): PromiseInterface - { - $url = $this->buildPath('server/{serverId}/tag/{tagList}', compact('serverId', 'tagList')); - $request = new Request('POST', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateServerResponse::class); - }); - } - - /** - * Operation attachStorage - * - * Attach storage - * - * @param string $serverId Server id (required) - * @param AttachStorageDeviceRequest $storageDevice (required) - * @return CreateServerResponse - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - */ - public function attachStorage(string $serverId, AttachStorageDeviceRequest $storageDevice): CreateServerResponse - { - list($response) = $this->attachStorageWithHttpInfo($serverId, $storageDevice); - return $response; - } - - /** - * Operation attachStorageWithHttpInfo - * - * Attach storage - * - * @param string $serverId Server id (required) - * @param AttachStorageDeviceRequest $storageDevice (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function attachStorageWithHttpInfo(string $serverId, AttachStorageDeviceRequest $storageDevice): array - { - $url = $this->buildPath('server/{serverId}/storage/attach', compact('serverId')); - $request = new Request('POST', $url, [], $storageDevice); - - $response = $this->client->send($request); - - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation attachStorageAsync - * - * Attach storage - * - * @param string $serverId Server id (required) - * @param AttachStorageDeviceRequest $storageDevice (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function attachStorageAsync(string $serverId, AttachStorageDeviceRequest $storageDevice): PromiseInterface - { - return $this->attachStorageAsyncWithHttpInfo($serverId, $storageDevice)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation attachStorageAsyncWithHttpInfo - * - * Attach storage - * - * @param string $serverId Server id (required) - * @param AttachStorageDeviceRequest $storageDevice (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function attachStorageAsyncWithHttpInfo( - string $serverId, - AttachStorageDeviceRequest $storageDevice - ): PromiseInterface { - $url = $this->buildPath('server/{serverId}/storage/attach', compact('serverId')); - $request = new Request('POST', $url, [], $storageDevice); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateServerResponse::class); - }); - } - - /** - * Operation createFirewallRule - * - * Create firewall rule - * - * @param string $serverId Server id (required) - * @param FirewallRuleRequest $firewallRule (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return FirewallRuleCreateResponse - */ - public function createFirewallRule(string $serverId, FirewallRuleRequest $firewallRule): FirewallRuleCreateResponse - { - list($response) = $this->createFirewallRuleWithHttpInfo($serverId, $firewallRule); - return $response; - } - - /** - * Operation createFirewallRuleWithHttpInfo - * - * Create firewall rule - * - * @param string $serverId Server id (required) - * @param FirewallRuleRequest $firewallRule (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of FirewallRuleCreateResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function createFirewallRuleWithHttpInfo(string $serverId, FirewallRuleRequest $firewallRule): array - { - $url = $this->buildPath('server/{serverId}/firewall_rule', compact('serverId')); - $request = new Request('POST', $url, [], $firewallRule); - - $response = $this->client->send($request); - return $response->toArray(FirewallRuleCreateResponse::class); - } - - /** - * Operation createFirewallRuleAsync - * - * Create firewall rule - * - * @param string $serverId Server id (required) - * @param FirewallRuleRequest $firewallRule (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createFirewallRuleAsync(string $serverId, FirewallRuleRequest $firewallRule): PromiseInterface - { - return $this->createFirewallRuleAsyncWithHttpInfo($serverId, $firewallRule)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation createFirewallRuleAsyncWithHttpInfo - * - * Create firewall rule - * - * @param string $serverId Server id (required) - * @param FirewallRuleRequest $firewallRule (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createFirewallRuleAsyncWithHttpInfo( - string $serverId, - FirewallRuleRequest $firewallRule - ): PromiseInterface { - $url = $this->buildPath('server/{serverId}/firewall_rule', compact('serverId')); - $request = new Request('POST', $url, [], $firewallRule); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(FirewallRuleCreateResponse::class); - }); - } - - /** - * Operation createServer - * - * Create server - * - * @param CreateServerRequest|null $server (optional) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateServerResponse - */ - public function createServer(?CreateServerRequest $server = null): CreateServerResponse - { - list($response) = $this->createServerWithHttpInfo($server); - return $response; - } - - /** - * Operation createServerWithHttpInfo - * - * Create server - * - * @param CreateServerRequest|null $server (optional) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function createServerWithHttpInfo(?CreateServerRequest $server = null): array - { - $request = new Request('POST', 'server', [], $server); - $response = $this->client->send($request); - - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation createServerAsync - * - * Create server - * - * @param CreateServerRequest|null $server (optional) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createServerAsync(?CreateServerRequest $server = null): PromiseInterface - { - return $this->createServerAsyncWithHttpInfo($server)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation createServerAsyncWithHttpInfo - * - * Create server - * - * @param CreateServerRequest|null $server (optional) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createServerAsyncWithHttpInfo(?CreateServerRequest $server = null): PromiseInterface - { - $request = new Request('POST', 'server', [], $server); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateServerResponse::class); - }); - } - - /** - * Operation deleteFirewallRule - * - * Remove firewall rule - * - * @param string $serverId Server id (required) - * @param float $firewallRuleNumber Denotes the index of the firewall rule - * in the server's firewall rule list (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return void - */ - public function deleteFirewallRule(string $serverId, float $firewallRuleNumber): void - { - $this->deleteFirewallRuleWithHttpInfo($serverId, $firewallRuleNumber); - } - - /** - * Operation deleteFirewallRuleWithHttpInfo - * - * Remove firewall rule - * - * @param string $serverId Server id (required) - * @param float $firewallRuleNumber Denotes the index of the firewall rule - * in the server's firewall rule list (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteFirewallRuleWithHttpInfo(string $serverId, float $firewallRuleNumber): array - { - $url = $this->buildPath( - 'server/{serverId}/firewall_rule/{firewallRuleNumber}', - compact('serverId', 'firewallRuleNumber') - ); - - $request = new Request('DELETE', $url); - - $response = $this->client->send($request); - - return $response->toArray(); - } - - /** - * Operation deleteFirewallRuleAsync - * - * Remove firewall rule - * - * @param string $serverId Server id (required) - * @param float $firewallRuleNumber Denotes the index of the firewall rule - * in the server's firewall rule list (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteFirewallRuleAsync(string $serverId, float $firewallRuleNumber): PromiseInterface - { - return $this->deleteFirewallRuleAsyncWithHttpInfo($serverId, $firewallRuleNumber)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation deleteFirewallRuleAsyncWithHttpInfo - * - * Remove firewall rule - * - * @param string $serverId Server id (required) - * @param float $firewallRuleNumber Denotes the index of the firewall rule - * in the server's firewall rule list (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteFirewallRuleAsyncWithHttpInfo(string $serverId, float $firewallRuleNumber): PromiseInterface - { - $url = $this->buildPath( - 'server/{serverId}/firewall_rule/{firewallRuleNumber}', - compact('serverId', 'firewallRuleNumber') - ); - - $request = new Request('DELETE', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(); - }); - } - - /** - * Operation deleteServer - * - * Delete server - * - * @param string $serverId Id of server to delete (required) - * @param bool $deleteAttachedStorageDevices Delete attached storage devices - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return void - */ - public function deleteServer(string $serverId, bool $deleteAttachedStorageDevices = false): void - { - $this->deleteServerWithHttpInfo($serverId, $deleteAttachedStorageDevices); - } - - /** - * Operation deleteServerWithHttpInfo - * - * Delete server - * - * @param string $serverId Id of server to delete (required) - * @param bool $deleteAttachedStorageDevices Delete attached storage devices - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteServerWithHttpInfo(string $serverId, bool $deleteAttachedStorageDevices = false): array - { - $url = $this->buildPath('server/{serverId}', compact('serverId')); - $request = new Request('DELETE', $url); - - $options = $deleteAttachedStorageDevices ? ['query' => ['storages' => '1']] : []; - $response = $this->client->send($request, $options); - - return $response->toArray(); - } - - /** - * Operation deleteServerAsync - * - * Delete server - * - * @param string $serverId Id of server to delete (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteServerAsync(string $serverId): PromiseInterface - { - return $this->deleteServerAsyncWithHttpInfo($serverId)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation deleteServerAsyncWithHttpInfo - * - * Delete server - * - * @param string $serverId Id of server to delete (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteServerAsyncWithHttpInfo(string $serverId): PromiseInterface - { - $url = $this->buildPath('server/{serverId}', compact('serverId')); - $request = new Request('DELETE', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(); - }); - } - - /** - * Operation detachStorage - * - * Detach storage - * - * @param string $serverId Server id (required) - * @param StorageDeviceDetachRequest $storageDevice (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateServerResponse - */ - public function detachStorage(string $serverId, StorageDeviceDetachRequest $storageDevice): CreateServerResponse - { - list($response) = $this->detachStorageWithHttpInfo($serverId, $storageDevice); - return $response; - } - - /** - * Operation detachStorageWithHttpInfo - * - * Detach storage - * - * @param string $serverId Server id (required) - * @param StorageDeviceDetachRequest $storageDevice (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function detachStorageWithHttpInfo(string $serverId, StorageDeviceDetachRequest $storageDevice): array - { - $url = $this->buildPath('server/{serverId}/storage/detach', compact('serverId')); - $request = new Request('POST', $url, [], $storageDevice); - - $response = $this->client->send($request); - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation detachStorageAsync - * - * Detach storage - * - * @param string $serverId Server id (required) - * @param StorageDeviceDetachRequest $storageDevice (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function detachStorageAsync(string $serverId, StorageDeviceDetachRequest $storageDevice): PromiseInterface - { - return $this->detachStorageAsyncWithHttpInfo($serverId, $storageDevice)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation detachStorageAsyncWithHttpInfo - * - * Detach storage - * - * @param string $serverId Server id (required) - * @param StorageDeviceDetachRequest $storageDevice (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function detachStorageAsyncWithHttpInfo( - string $serverId, - StorageDeviceDetachRequest $storageDevice - ): PromiseInterface { - - $url = $this->buildPath('server/{serverId}/storage/detach', compact('serverId')); - $request = new Request('POST', $url, [], $storageDevice); - - return $this->client->sendAsync($request)->then(function ($response) { - return $response->toArray(CreateServerResponse::class); - }); - } - - /** - * Operation ejectCdrom - * - * Eject CD-ROM - * - * @param string $serverId Server id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateServerResponse - */ - public function ejectCdrom(string $serverId): CreateServerResponse - { - list($response) = $this->ejectCdromWithHttpInfo($serverId); - return $response; - } - - /** - * Operation ejectCdromWithHttpInfo - * - * Eject CD-ROM - * - * @param string $serverId Server id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function ejectCdromWithHttpInfo(string $serverId): array - { - $url = $this->buildPath('server/{serverId}/cdrom/eject', compact('serverId')); - $request = new Request('POST', $url); - - $response = $this->client->send($request); - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation ejectCdromAsync - * - * Eject CD-ROM - * - * @param string $serverId Server id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function ejectCdromAsync(string $serverId): PromiseInterface - { - return $this->ejectCdromAsyncWithHttpInfo($serverId)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation ejectCdromAsyncWithHttpInfo - * - * Eject CD-ROM - * - * @param string $serverId Server id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function ejectCdromAsyncWithHttpInfo(string $serverId): PromiseInterface - { - $url = $this->buildPath('server/{serverId}/cdrom/eject', compact('serverId')); - $request = new Request('POST', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateServerResponse::class); - }); - } - - /** - * Operation getFirewallRule - * - * Get firewall rule details - * - * @param string $serverId Server id (required) - * @param float $firewallRuleNumber Denotes the index of the firewall rule - * in the server's firewall rule list (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return FirewallRuleCreateResponse - */ - public function getFirewallRule(string $serverId, float $firewallRuleNumber): FirewallRuleCreateResponse - { - list($response) = $this->getFirewallRuleWithHttpInfo($serverId, $firewallRuleNumber); - return $response; - } - - /** - * Operation getFirewallRuleWithHttpInfo - * - * Get firewall rule details - * - * @param string $serverId Server id (required) - * @param float $firewallRuleNumber Denotes the index of the firewall rule - * in the server's firewall rule list (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of FirewallRuleCreateResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function getFirewallRuleWithHttpInfo(string $serverId, float $firewallRuleNumber): array - { - $url = $this->buildPath( - 'server/{serverId}/firewall_rule/{firewallRuleNumber}', - compact('serverId', 'firewallRuleNumber') - ); - $request = new Request('GET', $url); - - $response = $this->client->send($request); - - return $response->toArray(FirewallRuleCreateResponse::class); - } - - /** - * Operation getFirewallRuleAsync - * - * Get firewall rule details - * - * @param string $serverId Server id (required) - * @param float $firewallRuleNumber Denotes the index of the firewall rule - * in the server's firewall rule list (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getFirewallRuleAsync(string $serverId, float $firewallRuleNumber): PromiseInterface - { - return $this->getFirewallRuleAsyncWithHttpInfo($serverId, $firewallRuleNumber)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation getFirewallRuleAsyncWithHttpInfo - * - * Get firewall rule details - * - * @param string $serverId Server id (required) - * @param float $firewallRuleNumber Denotes the index of the firewall rule - * in the server's firewall rule list (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getFirewallRuleAsyncWithHttpInfo(string $serverId, float $firewallRuleNumber): PromiseInterface - { - $url = $this->buildPath( - 'server/{serverId}/firewall_rule/{firewallRuleNumber}', - compact('serverId', 'firewallRuleNumber') - ); - $request = new Request('GET', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(FirewallRuleCreateResponse::class); - }); - } - - /** - * Operation listServerConfigurations - * - * List server configurations - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return ConfigurationListResponse - */ - public function listServerConfigurations(): ConfigurationListResponse - { - list($response) = $this->listServerConfigurationsWithHttpInfo(); - return $response; - } - - /** - * Operation listServerConfigurationsWithHttpInfo - * - * List server configurations - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of ConfigurationListResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function listServerConfigurationsWithHttpInfo(): array - { - $request = new Request('GET', 'server_size'); - - $response = $this->client->send($request); - return $response->toArray(ConfigurationListResponse::class); - } - - /** - * Operation listServerConfigurationsAsync - * - * List server configurations - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listServerConfigurationsAsync(): PromiseInterface - { - return $this->listServerConfigurationsAsyncWithHttpInfo()->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation listServerConfigurationsAsyncWithHttpInfo - * - * List server configurations - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listServerConfigurationsAsyncWithHttpInfo(): PromiseInterface - { - $request = new Request('GET', 'server_size'); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(ConfigurationListResponse::class); - }); - } - - /** - * Operation listServers - * - * List of servers - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return ServerListResponse - */ - public function listServers(): ServerListResponse - { - list($response) = $this->listServersWithHttpInfo(); - return $response; - } - - /** - * Operation listServersWithHttpInfo - * - * List of servers - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of ServerListResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function listServersWithHttpInfo(): array - { - $request = new Request('GET', 'server'); - - $response = $this->client->send($request); - return $response->toArray(ServerListResponse::class); - } - - /** - * Operation listServersAsync - * - * List of servers - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listServersAsync(): PromiseInterface - { - return $this->listServersAsyncWithHttpInfo()->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation listServersAsyncWithHttpInfo - * - * List of servers - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listServersAsyncWithHttpInfo(): PromiseInterface - { - $request = new Request('GET', 'server'); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(ServerListResponse::class); - }); - } - - /** - * Operation loadCdrom - * - * Load CD-ROM - * - * @param string $serverId Server id (required) - * @param StorageDeviceLoadRequest|null $storageDevice (optional) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateServerResponse - */ - public function loadCdrom(string $serverId, ?StorageDeviceLoadRequest $storageDevice = null): CreateServerResponse - { - list($response) = $this->loadCdromWithHttpInfo($serverId, $storageDevice); - return $response; - } - - /** - * Operation loadCdromWithHttpInfo - * - * Load CD-ROM - * - * @param string $serverId Server id (required) - * @param StorageDeviceLoadRequest|null $storageDevice (optional) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function loadCdromWithHttpInfo(string $serverId, ?StorageDeviceLoadRequest $storageDevice = null): array - { - - $url = $this->buildPath('server/{serverId}/cdrom/load', compact('serverId')); - $request = new Request('POST', $url, [], $storageDevice); - - $response = $this->client->send($request); - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation loadCdromAsync - * - * Load CD-ROM - * - * @param string $serverId Server id (required) - * @param StorageDeviceLoadRequest|null $storageDevice (optional) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function loadCdromAsync(string $serverId, ?StorageDeviceLoadRequest $storageDevice = null): PromiseInterface - { - return $this->loadCdromAsyncWithHttpInfo($serverId, $storageDevice)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation loadCdromAsyncWithHttpInfo - * - * Load CD-ROM - * - * @param string $serverId Server id (required) - * @param StorageDeviceLoadRequest|null $storageDevice (optional) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function loadCdromAsyncWithHttpInfo( - string $serverId, - ?StorageDeviceLoadRequest $storageDevice = null - ): PromiseInterface { - $url = $this->buildPath('server/{serverId}/cdrom/load', compact('serverId')); - $request = new Request('POST', $url, [], $storageDevice); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateServerResponse::class); - }); - } - - /** - * Operation modifyServer - * - * Modify server - * - * @param string $serverId Id of server to modify (required) - * @param ModifyServerRequest|null $server (optional) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateServerResponse - */ - public function modifyServer(string $serverId, ?ModifyServerRequest $server = null): CreateServerResponse - { - list($response) = $this->modifyServerWithHttpInfo($serverId, $server); - return $response; - } - - /** - * Operation modifyServerWithHttpInfo - * - * Modify server - * - * @param string $serverId Id of server to modify (required) - * @param ModifyServerRequest|null $server (optional) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function modifyServerWithHttpInfo(string $serverId, ?ModifyServerRequest $server = null): array - { - $url = $this->buildPath('server/{serverId}', compact('serverId')); - $request = new Request('PUT', $url, [], $server); - - $response = $this->client->send($request); - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation modifyServerAsync - * - * Modify server - * - * @param string $serverId Id of server to modify (required) - * @param ModifyServerRequest|null $server (optional) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyServerAsync(string $serverId, ?ModifyServerRequest $server = null): PromiseInterface - { - return $this->modifyServerAsyncWithHttpInfo($serverId, $server)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation modifyServerAsyncWithHttpInfo - * - * Modify server - * - * @param string $serverId Id of server to modify (required) - * @param ModifyServerRequest|null $server (optional) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyServerAsyncWithHttpInfo( - string $serverId, - ?ModifyServerRequest $server = null - ): PromiseInterface { - $url = $this->buildPath('server/{serverId}', compact('serverId')); - $request = new Request('PUT', $url, [], $server); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateServerResponse::class); - }); - } - - /** - * Operation restartServer - * - * Restart server - * - * @param string $serverId Id of server to restart (required) - * @param RestartServer $restartServer (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateServerResponse - */ - public function restartServer(string $serverId, RestartServer $restartServer): CreateServerResponse - { - list($response) = $this->restartServerWithHttpInfo($serverId, $restartServer); - return $response; - } - - /** - * Operation restartServerWithHttpInfo - * - * Restart server - * - * @param string $serverId Id of server to restart (required) - * @param RestartServer $restartServer (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function restartServerWithHttpInfo(string $serverId, RestartServer $restartServer): array - { - $url = $this->buildPath('server/{serverId}/restart', compact('serverId')); - $request = new Request('POST', $url, [], $restartServer); - - $response = $this->client->send($request); - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation restartServerAsync - * - * Restart server - * - * @param string $serverId Id of server to restart (required) - * @param RestartServer $restartServer (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function restartServerAsync(string $serverId, RestartServer $restartServer): PromiseInterface - { - return $this->restartServerAsyncWithHttpInfo($serverId, $restartServer)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation restartServerAsyncWithHttpInfo - * - * Restart server - * - * @param string $serverId Id of server to restart (required) - * @param RestartServer $restartServer (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function restartServerAsyncWithHttpInfo(string $serverId, RestartServer $restartServer): PromiseInterface - { - $url = $this->buildPath('server/{serverId}/restart', compact('serverId')); - $request = new Request('POST', $url, [], $restartServer); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateServerResponse::class); - }); - } - - /** - * Operation serverDetails - * - * Get server details - * - * @param string $serverId Id of server to return (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateServerResponse - */ - public function serverDetails(string $serverId): CreateServerResponse - { - list($response) = $this->serverDetailsWithHttpInfo($serverId); - return $response; - } - - /** - * Operation serverDetailsWithHttpInfo - * - * Get server details - * - * @param string $serverId Id of server to return (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function serverDetailsWithHttpInfo(string $serverId): array - { - $url = $this->buildPath('server/{serverId}', compact('serverId')); - $request = new Request('GET', $url); - - $response = $this->client->send($request); - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation serverDetailsAsync - * - * Get server details - * - * @param string $serverId Id of server to return (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function serverDetailsAsync(string $serverId): PromiseInterface - { - return $this->serverDetailsAsyncWithHttpInfo($serverId)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation serverDetailsAsyncWithHttpInfo - * - * Get server details - * - * @param string $serverId Id of server to return (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function serverDetailsAsyncWithHttpInfo(string $serverId): PromiseInterface - { - $url = $this->buildPath('server/{serverId}', compact('serverId')); - $request = new Request('GET', $url); - - return $this->client->sendAsync($request)->then(function ($response) { - return $response->toArray(CreateServerResponse::class); - }); - } - - /** - * Operation serverServerIdFirewallRuleGet - * - * List firewall rules - * - * @param string $serverId Server id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return FirewallRuleListResponse - */ - public function serverServerIdFirewallRuleGet(string $serverId): FirewallRuleListResponse - { - list($response) = $this->serverServerIdFirewallRuleGetWithHttpInfo($serverId); - return $response; - } - - /** - * Operation serverServerIdFirewallRuleGetWithHttpInfo - * - * List firewall rules - * - * @param string $serverId Server id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of FirewallRuleListResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function serverServerIdFirewallRuleGetWithHttpInfo(string $serverId): array - { - $url = $this->buildPath('server/{serverId}/firewall_rule', compact('serverId')); - $request = new Request('GET', $url); - - $response = $this->client->send($request); - return $response->toArray(FirewallRuleListResponse::class); - } - - /** - * Operation serverServerIdFirewallRuleGetAsync - * - * List firewall rules - * - * @param string $serverId Server id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function serverServerIdFirewallRuleGetAsync(string $serverId): PromiseInterface - { - return $this->serverServerIdFirewallRuleGetAsyncWithHttpInfo($serverId)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation serverServerIdFirewallRuleGetAsyncWithHttpInfo - * - * List firewall rules - * - * @param string $serverId Server id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function serverServerIdFirewallRuleGetAsyncWithHttpInfo(string $serverId): PromiseInterface - { - $url = $this->buildPath('server/{serverId}/firewall_rule', compact('serverId')); - $request = new Request('GET', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(FirewallRuleListResponse::class); - }); - } - - /** - * Operation startServer - * - * Start server - * - * @param string $serverId Id of server to start (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateServerResponse - */ - public function startServer(string $serverId): CreateServerResponse - { - list($response) = $this->startServerWithHttpInfo($serverId); - return $response; - } - - /** - * Operation startServerWithHttpInfo - * - * Start server - * - * @param string $serverId Id of server to start (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function startServerWithHttpInfo(string $serverId): array - { - $url = $this->buildPath('server/{serverId}/start', compact('serverId')); - $request = new Request('POST', $url); - - $response = $this->client->send($request); - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation startServerAsync - * - * Start server - * - * @param string $serverId Id of server to start (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function startServerAsync(string $serverId): PromiseInterface - { - return $this->startServerAsyncWithHttpInfo($serverId)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation startServerAsyncWithHttpInfo - * - * Start server - * - * @param string $serverId Id of server to start (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function startServerAsyncWithHttpInfo(string $serverId): PromiseInterface - { - $url = $this->buildPath('server/{serverId}/start', compact('serverId')); - $request = new Request('POST', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateServerResponse::class); - }); - } - - /** - * Operation stopServer - * - * Stop server - * - * @param string $serverId Id of server to stop (required) - * @param StopServer $stopServerRequest (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateServerResponse - */ - public function stopServer(string $serverId, StopServer $stopServerRequest): CreateServerResponse - { - list($response) = $this->stopServerWithHttpInfo($serverId, $stopServerRequest); - return $response; - } - - /** - * Operation stopServerWithHttpInfo - * - * Stop server - * - * @param string $serverId Id of server to stop (required) - * @param StopServer $stopServerRequest (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function stopServerWithHttpInfo(string $serverId, StopServer $stopServerRequest): array - { - $url = $this->buildPath('server/{serverId}/stop', compact('serverId')); - $request = new Request('POST', $url, [], $stopServerRequest); - - $response = $this->client->send($request); - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation stopServerAsync - * - * Stop server - * - * @param string $serverId Id of server to stop (required) - * @param StopServer $stopServerRequest (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function stopServerAsync(string $serverId, StopServer $stopServerRequest): PromiseInterface - { - return $this->stopServerAsyncWithHttpInfo($serverId, $stopServerRequest)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation stopServerAsyncWithHttpInfo - * - * Stop server - * - * @param string $serverId Id of server to stop (required) - * @param StopServer $stopServerRequest (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function stopServerAsyncWithHttpInfo(string $serverId, StopServer $stopServerRequest): PromiseInterface - { - $url = $this->buildPath('server/{serverId}/stop', compact('serverId')); - $request = new Request('POST', $url, [], $stopServerRequest); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateServerResponse::class); - }); - } - - /** - * Operation untag - * - * Remove tag from server - * - * @param string $serverId Server id (required) - * @param string $tagName Tag name (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateServerResponse - */ - public function untag(string $serverId, string $tagName): CreateServerResponse - { - list($response) = $this->untagWithHttpInfo($serverId, $tagName); - return $response; - } - - /** - * Operation untagWithHttpInfo - * - * Remove tag from server - * - * @param string $serverId Server id (required) - * @param string $tagName Tag name (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function untagWithHttpInfo(string $serverId, string $tagName): array - { - $url = $this->buildPath('server/{serverId}/untag/{tagName}', compact('serverId', 'tagName')); - $request = new Request('POST', $url); - - $response = $this->client->send($request); - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation untagAsync - * - * Remove tag from server - * - * @param string $serverId Server id (required) - * @param string $tagName Tag name (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function untagAsync(string $serverId, string $tagName): PromiseInterface - { - return $this->untagAsyncWithHttpInfo($serverId, $tagName)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation untagAsyncWithHttpInfo - * - * Remove tag from server - * - * @param string $serverId Server id (required) - * @param string $tagName Tag name (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function untagAsyncWithHttpInfo(string $serverId, string $tagName): PromiseInterface - { - $url = $this->buildPath('server/{serverId}/untag/{tagName}', compact('serverId', 'tagName')); - $request = new Request('POST', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateServerResponse::class); - }); - } -} diff --git a/lib/Upcloud/StorageApi.php b/lib/Upcloud/StorageApi.php deleted file mode 100644 index 4423e39e..00000000 --- a/lib/Upcloud/StorageApi.php +++ /dev/null @@ -1,1323 +0,0 @@ -attachStorageWithHttpInfo($serverId, $storageDevice); - return $response; - } - - /** - * Operation attachStorageWithHttpInfo - * - * Attach storage - * - * @param string $serverId Server id (required) - * @param AttachStorageDeviceRequest $storageDevice (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function attachStorageWithHttpInfo(string $serverId, AttachStorageDeviceRequest $storageDevice): array - { - $url = $this->buildPath('server/{serverId}/storage/attach', compact('serverId')); - $request = new Request('POST', $url, [], $storageDevice); - - $response = $this->client->send($request); - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation attachStorageAsync - * - * Attach storage - * - * @param string $serverId Server id (required) - * @param AttachStorageDeviceRequest $storageDevice (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function attachStorageAsync(string $serverId, AttachStorageDeviceRequest $storageDevice): PromiseInterface - { - return $this->attachStorageAsyncWithHttpInfo($serverId, $storageDevice)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation attachStorageAsyncWithHttpInfo - * - * Attach storage - * - * @param string $serverId Server id (required) - * @param AttachStorageDeviceRequest $storageDevice (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function attachStorageAsyncWithHttpInfo( - string $serverId, - AttachStorageDeviceRequest $storageDevice - ): PromiseInterface { - - $url = $this->buildPath('server/{serverId}/storage/attach', compact('serverId')); - $request = new Request('POST', $url, [], $storageDevice); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateServerResponse::class); - }); - } - - /** - * Operation backupStorage - * - * Create backup - * - * @param string $storageId Storage id (required) - * @param CreateBackupStorageRequest $storage (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateStorageResponse - */ - public function backupStorage(string $storageId, CreateBackupStorageRequest $storage): CreateStorageResponse - { - list($response) = $this->backupStorageWithHttpInfo($storageId, $storage); - return $response; - } - - /** - * Operation backupStorageWithHttpInfo - * - * Create backup - * - * @param string $storageId Storage id (required) - * @param CreateBackupStorageRequest $storage (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateStorageResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function backupStorageWithHttpInfo(string $storageId, CreateBackupStorageRequest $storage): array - { - - $url = $this->buildPath('storage/{storageId}/backup', compact('storageId')); - $request = new Request('POST', $url, [], $storage); - - $response = $this->client->send($request); - - return $response->toArray(CreateStorageResponse::class); - } - - /** - * Operation backupStorageAsync - * - * Create backup - * - * @param string $storageId Storage id (required) - * @param CreateBackupStorageRequest $storage (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function backupStorageAsync(string $storageId, CreateBackupStorageRequest $storage): PromiseInterface - { - return $this->backupStorageAsyncWithHttpInfo($storageId, $storage)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation backupStorageAsyncWithHttpInfo - * - * Create backup - * - * @param string $storageId Storage id (required) - * @param CreateBackupStorageRequest $storage (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function backupStorageAsyncWithHttpInfo( - string $storageId, - CreateBackupStorageRequest $storage - ): PromiseInterface { - - $url = $this->buildPath('storage/{storageId}/backup', compact('storageId')); - $request = new Request('POST', $url, [], $storage); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateStorageResponse::class); - }); - } - - /** - * Operation cancelOperation - * - * Cancel storage operation - * - * @param string $storageId Storage id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return void - */ - public function cancelOperation(string $storageId): void - { - $this->cancelOperationWithHttpInfo($storageId); - } - - /** - * Operation cancelOperationWithHttpInfo - * - * Cancel storage operation - * - * @param string $storageId Storage id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function cancelOperationWithHttpInfo(string $storageId): array - { - $url = $this->buildPath('storage/{storageId}/cancel', compact('storageId')); - $request = new Request('POST', $url); - - $response = $this->client->send($request); - - return $response->toArray(); - } - - /** - * Operation cancelOperationAsync - * - * Cancel storage operation - * - * @param string $storageId Storage id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function cancelOperationAsync(string $storageId): PromiseInterface - { - return $this->cancelOperationAsyncWithHttpInfo($storageId)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation cancelOperationAsyncWithHttpInfo - * - * Cancel storage operation - * - * @param string $storageId Storage id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function cancelOperationAsyncWithHttpInfo(string $storageId): PromiseInterface - { - $url = $this->buildPath('storage/{storageId}/cancel', compact('storageId')); - $request = new Request('POST', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(); - }); - } - - /** - * Operation cloneStorage - * - * Clone storage - * - * @param string $storageId Storage id (required) - * @param CloneStorageRequest $storage (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateStorageResponse - */ - public function cloneStorage(string $storageId, CloneStorageRequest $storage): CreateStorageResponse - { - list($response) = $this->cloneStorageWithHttpInfo($storageId, $storage); - return $response; - } - - /** - * Operation cloneStorageWithHttpInfo - * - * Clone storage - * - * @param string $storageId Storage id (required) - * @param CloneStorageRequest $storage (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateStorageResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function cloneStorageWithHttpInfo(string $storageId, CloneStorageRequest $storage): array - { - $url = $this->buildPath('storage/{storageId}/clone', compact('storageId')); - $request = new Request('POST', $url, [], $storage); - - $response = $this->client->send($request); - - return $response->toArray(CreateStorageResponse::class); - } - - /** - * Operation cloneStorageAsync - * - * Clone storage - * - * @param string $storageId Storage id (required) - * @param CloneStorageRequest $storage (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function cloneStorageAsync(string $storageId, CloneStorageRequest $storage): PromiseInterface - { - return $this->cloneStorageAsyncWithHttpInfo($storageId, $storage)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation cloneStorageAsyncWithHttpInfo - * - * Clone storage - * - * @param string $storageId Storage id (required) - * @param CloneStorageRequest $storage (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function cloneStorageAsyncWithHttpInfo(string $storageId, CloneStorageRequest $storage): PromiseInterface - { - $url = $this->buildPath('storage/{storageId}/clone', compact('storageId')); - $request = new Request('POST', $url, [], $storage); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - - return $response->toArray(CreateStorageResponse::class); - }); - } - - /** - * Operation createStorage - * - * Create storage - * - * @param CreateStorageRequest $storage (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateStorageResponse - */ - public function createStorage(CreateStorageRequest $storage): CreateStorageResponse - { - list($response) = $this->createStorageWithHttpInfo($storage); - return $response; - } - - /** - * Operation createStorageWithHttpInfo - * - * Create storage - * - * @param CreateStorageRequest $storage (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateStorageResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function createStorageWithHttpInfo(CreateStorageRequest $storage): array - { - $request = new Request('POST', 'storage', [], $storage); - $response = $this->client->send($request); - - return $response->toArray(CreateStorageResponse::class); - } - - /** - * Operation createStorageAsync - * - * Create storage - * - * @param CreateStorageRequest $storage (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createStorageAsync(CreateStorageRequest $storage): PromiseInterface - { - return $this->createStorageAsyncWithHttpInfo($storage)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation createStorageAsyncWithHttpInfo - * - * Create storage - * - * @param CreateStorageRequest $storage (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createStorageAsyncWithHttpInfo(CreateStorageRequest $storage): PromiseInterface - { - $request = new Request('POST', 'storage', [], $storage); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateStorageResponse::class); - }); - } - - /** - * Operation deleteStorage - * - * Delete storage - * - * @param string $storageId (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return void - */ - public function deleteStorage(string $storageId): void - { - $this->deleteStorageWithHttpInfo($storageId); - } - - /** - * Operation deleteStorageWithHttpInfo - * - * Delete storage - * - * @param string $storageId (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteStorageWithHttpInfo(string $storageId): array - { - $url = $this->buildPath('storage/{storageId}', compact('storageId')); - $request = new Request('DELETE', $url); - - $response = $this->client->send($request); - return $response->toArray(); - } - - /** - * Operation deleteStorageAsync - * - * Delete storage - * - * @param string $storageId (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteStorageAsync(string $storageId): PromiseInterface - { - return $this->deleteStorageAsyncWithHttpInfo($storageId)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation deleteStorageAsyncWithHttpInfo - * - * Delete storage - * - * @param string $storageId (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteStorageAsyncWithHttpInfo(string $storageId): PromiseInterface - { - $url = $this->buildPath('storage/{storageId}', compact('storageId')); - $request = new Request('DELETE', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(); - }); - } - - /** - * Operation detachStorage - * - * Detach storage - * - * @param string $serverId Server id (required) - * @param StorageDeviceDetachRequest $storageDevice (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateServerResponse - */ - public function detachStorage(string $serverId, StorageDeviceDetachRequest $storageDevice): CreateServerResponse - { - list($response) = $this->detachStorageWithHttpInfo($serverId, $storageDevice); - return $response; - } - - /** - * Operation detachStorageWithHttpInfo - * - * Detach storage - * - * @param string $serverId Server id (required) - * @param StorageDeviceDetachRequest $storageDevice (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function detachStorageWithHttpInfo(string $serverId, StorageDeviceDetachRequest $storageDevice): array - { - $url = $this->buildPath('server/{serverId}/storage/detach', compact('serverId')); - $request = new Request('POST', $url, [], $storageDevice); - - $response = $this->client->send($request); - - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation detachStorageAsync - * - * Detach storage - * - * @param string $serverId Server id (required) - * @param StorageDeviceDetachRequest $storageDevice (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function detachStorageAsync(string $serverId, StorageDeviceDetachRequest $storageDevice): PromiseInterface - { - return $this->detachStorageAsyncWithHttpInfo($serverId, $storageDevice)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation detachStorageAsyncWithHttpInfo - * - * Detach storage - * - * @param string $serverId Server id (required) - * @param StorageDeviceDetachRequest $storageDevice (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function detachStorageAsyncWithHttpInfo( - string $serverId, - StorageDeviceDetachRequest $storageDevice - ): PromiseInterface { - - $url = $this->buildPath('server/{serverId}/storage/detach', compact('serverId')); - $request = new Request('POST', $url, [], $storageDevice); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateServerResponse::class); - }); - } - - /** - * Operation ejectCdrom - * - * Eject CD-ROM - * - * @param string $serverId Server id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateServerResponse - */ - public function ejectCdrom(string $serverId): CreateServerResponse - { - list($response) = $this->ejectCdromWithHttpInfo($serverId); - return $response; - } - - /** - * Operation ejectCdromWithHttpInfo - * - * Eject CD-ROM - * - * @param string $serverId Server id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function ejectCdromWithHttpInfo(string $serverId): array - { - $url = $this->buildPath('server/{serverId}/cdrom/eject', compact('serverId')); - $request = new Request('POST', $url); - - $response = $this->client->send($request); - - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation ejectCdromAsync - * - * Eject CD-ROM - * - * @param string $serverId Server id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function ejectCdromAsync(string $serverId): PromiseInterface - { - return $this->ejectCdromAsyncWithHttpInfo($serverId)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation ejectCdromAsyncWithHttpInfo - * - * Eject CD-ROM - * - * @param string $serverId Server id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function ejectCdromAsyncWithHttpInfo(string $serverId): PromiseInterface - { - $url = $this->buildPath('server/{serverId}/cdrom/eject', compact('serverId')); - $request = new Request('POST', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateServerResponse::class); - }); - } - - /** - * Operation favoriteStorage - * - * Add storage to favorites - * - * @param string $storageId Storage id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return void - */ - public function favoriteStorage(string $storageId): void - { - $this->favoriteStorageWithHttpInfo($storageId); - } - - /** - * Operation favoriteStorageWithHttpInfo - * - * Add storage to favorites - * - * @param string $storageId Storage id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function favoriteStorageWithHttpInfo(string $storageId): array - { - $url = $this->buildPath('storage/{storageId}/favorite', compact('storageId')); - $request = new Request('POST', $url); - - $response = $this->client->send($request); - - return $response->toArray(); - } - - /** - * Operation favoriteStorageAsync - * - * Add storage to favorites - * - * @param string $storageId Storage id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function favoriteStorageAsync(string $storageId): PromiseInterface - { - return $this->favoriteStorageAsyncWithHttpInfo($storageId)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation favoriteStorageAsyncWithHttpInfo - * - * Add storage to favorites - * - * @param string $storageId Storage id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function favoriteStorageAsyncWithHttpInfo(string $storageId): PromiseInterface - { - $url = $this->buildPath('storage/{storageId}/favorite', compact('storageId')); - $request = new Request('POST', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(); - }); - } - - /** - * Operation getStorageDetails - * - * Get storage details - * - * @param string $storageId (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateStorageResponse - */ - public function getStorageDetails(string $storageId): CreateStorageResponse - { - list($response) = $this->getStorageDetailsWithHttpInfo($storageId); - return $response; - } - - /** - * Operation getStorageDetailsWithHttpInfo - * - * Get storage details - * - * @param string $storageId (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateStorageResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function getStorageDetailsWithHttpInfo(string $storageId): array - { - $url = $this->buildPath('storage/{storageId}', compact('storageId')); - $request = new Request('GET', $url); - - $response = $this->client->send($request); - - return $response->toArray(CreateStorageResponse::class); - } - - /** - * Operation getStorageDetailsAsync - * - * Get storage details - * - * @param string $storageId (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getStorageDetailsAsync(string $storageId): PromiseInterface - { - return $this->getStorageDetailsAsyncWithHttpInfo($storageId)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation getStorageDetailsAsyncWithHttpInfo - * - * Get storage details - * - * @param string $storageId (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function getStorageDetailsAsyncWithHttpInfo(string $storageId): PromiseInterface - { - $url = $this->buildPath('storage/{storageId}', compact('storageId')); - $request = new Request('GET', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateStorageResponse::class); - }); - } - - /** - * Operation listStorageTypes - * - * List of storages by type - * - * @param string $type Storage's access type - * (`public` or `private`) - * or storage type - * (`normal`, `backup`, `cdrom` or `template`) - * or `favorite` status (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return SuccessStoragesResponse - * @deprecated listStorageTypes will be removed. Use listStorages($type) instead. - */ - public function listStorageTypes(string $type): SuccessStoragesResponse - { - return $this->listStorages($type); - } - - /** - * Operation listStorageTypesWithHttpInfo - * - * List of storages by type - * - * @param string $type Storage's access type - * (`public` or `private`) - * or storage type - * (`normal`, `backup`, `cdrom` or `template`) - * or `favorite` status (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of SuccessStoragesResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated listStorageTypesWithHttpInfo will be removed. Use listStoragesWithHttpInfo($type) instead. - */ - public function listStorageTypesWithHttpInfo(string $type): array - { - return $this->listStoragesWithHttpInfo($type); - } - - /** - * Operation listStorageTypesAsync - * - * List of storages by type - * - * @param string $type Storage's access type - * (`public` or `private`) - * or storage type - * (`normal`, `backup`, `cdrom` or `template`) - * or `favorite` status (required) - * @throws InvalidArgumentException - * @return PromiseInterface - * @deprecated listStorageTypesAsync will be removed. Use listStoragesAsync($type) instead. - */ - public function listStorageTypesAsync(string $type): PromiseInterface - { - return $this->listStoragesAsync($type); - } - - /** - * Operation listStorageTypesAsyncWithHttpInfo - * - * List of storages by type - * - * @param string $type Storage's access type - * (`public` or `private`) - * or storage type - * (`normal`, `backup`, `cdrom` or `template`) - * or `favorite` status (required) - * @throws InvalidArgumentException - * @return PromiseInterface - * @deprecated listStorageTypesAsyncWithHttpInfo will be removed. - * Use listStoragesAsyncWithHttpInfo($type) instead. - */ - public function listStorageTypesAsyncWithHttpInfo(string $type): PromiseInterface - { - return $this->listStoragesAsyncWithHttpInfo($type); - } - - /** - * Operation listStorages - * - * List of storages - * - * @param string|null $type - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return SuccessStoragesResponse - */ - public function listStorages(?string $type = null): SuccessStoragesResponse - { - list($response) = $this->listStoragesWithHttpInfo($type); - return $response; - } - - /** - * Operation listStoragesWithHttpInfo - * - * List of storages - * - * @param string|null $type - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of SuccessStoragesResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function listStoragesWithHttpInfo(?string $type = null): array - { - if ($type) { - Assert::oneOf($type, self::getAllowableStorageType()); - $url = $this->buildPath('storage/{type}', compact('type')); - } else { - $url ='storage'; - } - - $request = new Request('GET', $url); - - $response = $this->client->send($request); - - return $response->toArray(SuccessStoragesResponse::class); - } - - /** - * Operation listStoragesAsync - * - * List of storages - * - * @param string|null $type - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listStoragesAsync(?string $type = null): PromiseInterface - { - return $this->listStoragesAsyncWithHttpInfo($type)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation listStoragesAsyncWithHttpInfo - * - * List of storages - * - * @param string|null $type - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listStoragesAsyncWithHttpInfo(?string $type = null): PromiseInterface - { - if ($type) { - Assert::oneOf($type, self::getAllowableStorageType()); - $url = $this->buildPath('storage/{type}', compact('type')); - } else { - $url ='storage'; - } - - $request = new Request('GET', $url); - - return $this->client->sendAsync($request)->then(function ($response) { - return $response->toArray(SuccessStoragesResponse::class); - }); - } - - /** - * Operation loadCdrom - * - * Load CD-ROM - * - * @param string $serverId Server id (required) - * @param StorageDeviceLoadRequest|null $storageDevice (optional) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateServerResponse - */ - public function loadCdrom(string $serverId, ?StorageDeviceLoadRequest $storageDevice = null): CreateServerResponse - { - list($response) = $this->loadCdromWithHttpInfo($serverId, $storageDevice); - return $response; - } - - /** - * Operation loadCdromWithHttpInfo - * - * Load CD-ROM - * - * @param string $serverId Server id (required) - * @param StorageDeviceLoadRequest|null $storageDevice (optional) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function loadCdromWithHttpInfo(string $serverId, ?StorageDeviceLoadRequest $storageDevice = null): array - { - $url = $this->buildPath('server/{serverId}/cdrom/load', compact('serverId')); - $request = new Request('POST', $url, [], $storageDevice); - - $response = $this->client->send($request); - - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation loadCdromAsync - * - * Load CD-ROM - * - * @param string $serverId Server id (required) - * @param StorageDeviceLoadRequest|null $storageDevice (optional) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function loadCdromAsync(string $serverId, ?StorageDeviceLoadRequest $storageDevice = null): PromiseInterface - { - return $this->loadCdromAsyncWithHttpInfo($serverId, $storageDevice)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation loadCdromAsyncWithHttpInfo - * - * Load CD-ROM - * - * @param string $serverId Server id (required) - * @param StorageDeviceLoadRequest|null $storageDevice (optional) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function loadCdromAsyncWithHttpInfo( - string $serverId, - ?StorageDeviceLoadRequest $storageDevice = null - ): PromiseInterface { - - $url = $this->buildPath('server/{serverId}/cdrom/load', compact('serverId')); - $request = new Request('POST', $url, [], $storageDevice); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateServerResponse::class); - }); - } - - /** - * Operation modifyStorage - * - * Modify storage - * - * @param string $storageId (required) - * @param ModifyStorageRequest $storage (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateStorageResponse - */ - public function modifyStorage(string $storageId, ModifyStorageRequest $storage): CreateStorageResponse - { - list($response) = $this->modifyStorageWithHttpInfo($storageId, $storage); - return $response; - } - - /** - * Operation modifyStorageWithHttpInfo - * - * Modify storage - * - * @param string $storageId (required) - * @param ModifyStorageRequest $storage (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateStorageResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function modifyStorageWithHttpInfo(string $storageId, ModifyStorageRequest $storage): array - { - $url = $this->buildPath('storage/{storageId}', compact('storageId')); - $request = new Request('PUT', $url, [], $storage); - - $response = $this->client->send($request); - - return $response->toArray(CreateStorageResponse::class); - } - - /** - * Operation modifyStorageAsync - * - * Modify storage - * - * @param string $storageId (required) - * @param ModifyStorageRequest $storage (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyStorageAsync(string $storageId, ModifyStorageRequest $storage): PromiseInterface - { - return $this->modifyStorageAsyncWithHttpInfo($storageId, $storage)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation modifyStorageAsyncWithHttpInfo - * - * Modify storage - * - * @param string $storageId (required) - * @param ModifyStorageRequest $storage (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyStorageAsyncWithHttpInfo(string $storageId, ModifyStorageRequest $storage): PromiseInterface - { - $url = $this->buildPath('storage/{storageId}', compact('storageId')); - $request = new Request('PUT', $url, [], $storage); - - return $this->client->sendAsync($request)->then(function ($response) { - return $response->toArray(CreateStorageResponse::class); - }); - } - - /** - * Operation restoreStorage - * - * Restore backup - * - * @param string $storageId Storage id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return void - */ - public function restoreStorage(string $storageId): void - { - $this->restoreStorageWithHttpInfo($storageId); - } - - /** - * Operation restoreStorageWithHttpInfo - * - * Restore backup - * - * @param string $storageId Storage id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function restoreStorageWithHttpInfo(string $storageId): array - { - $url = $this->buildPath('storage/{storageId}/restore', compact('storageId')); - $request = new Request('POST', $url); - $response = $this->client->send($request); - - return $response->toArray(); - } - - /** - * Operation restoreStorageAsync - * - * Restore backup - * - * @param string $storageId Storage id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function restoreStorageAsync(string $storageId): PromiseInterface - { - return $this->restoreStorageAsyncWithHttpInfo($storageId)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation restoreStorageAsyncWithHttpInfo - * - * Restore backup - * - * @param string $storageId Storage id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function restoreStorageAsyncWithHttpInfo(string $storageId): PromiseInterface - { - $url = $this->buildPath('storage/{storageId}/restore', compact('storageId')); - $request = new Request('POST', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(); - }); - } - - - /** - * Operation templatizeStorage - * - * Templatize storage - * - * @param string $storageId Storage id (required) - * @param TemplitizeStorageRequest|null $storage (optional) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateStorageResponse - */ - public function templatizeStorage( - string $storageId, - ?TemplitizeStorageRequest $storage = null - ): CreateStorageResponse { - list($response) = $this->templatizeStorageWithHttpInfo($storageId, $storage); - return $response; - } - - /** - * Operation templatizeStorageWithHttpInfo - * - * Templatize storage - * - * @param string $storageId Storage id (required) - * @param TemplitizeStorageRequest|null $storage (optional) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateStorageResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function templatizeStorageWithHttpInfo(string $storageId, ?TemplitizeStorageRequest $storage = null): array - { - $url = $this->buildPath('storage/{storageId}/templatize', compact('storageId')); - $request = new Request('POST', $url, [], $storage); - - $response = $this->client->send($request); - - return $response->toArray(CreateStorageResponse::class); - } - - /** - * Operation templatizeStorageAsync - * - * Templatize storage - * - * @param string $storageId Storage id (required) - * @param TemplitizeStorageRequest|null $storage (optional) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function templatizeStorageAsync( - string $storageId, - ?TemplitizeStorageRequest $storage = null - ): PromiseInterface { - return $this->templatizeStorageAsyncWithHttpInfo($storageId, $storage)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation templatizeStorageAsyncWithHttpInfo - * - * Templatize storage - * - * @param string $storageId Storage id (required) - * @param TemplitizeStorageRequest|null $storage (optional) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function templatizeStorageAsyncWithHttpInfo( - string $storageId, - ?TemplitizeStorageRequest $storage = null - ): PromiseInterface { - $url = $this->buildPath('storage/{storageId}/templatize', compact('storageId')); - $request = new Request('POST', $url, [], $storage); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateStorageResponse::class); - }); - } - - /** - * Operation unfavoriteStorage - * - * Remove storage from favorites - * - * @param string $storageId Storage id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return void - */ - public function unfavoriteStorage(string $storageId): void - { - $this->unfavoriteStorageWithHttpInfo($storageId); - } - - /** - * Operation unfavoriteStorageWithHttpInfo - * - * Remove storage from favorites - * - * @param string $storageId Storage id (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function unfavoriteStorageWithHttpInfo(string $storageId): array - { - $url = $this->buildPath('storage/{storageId}/favorite', compact('storageId')); - $request = new Request('DELETE', $url); - - $response = $this->client->send($request); - - return $response->toArray(); - } - - /** - * Operation unfavoriteStorageAsync - * - * Remove storage from favorites - * - * @param string $storageId Storage id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function unfavoriteStorageAsync(string $storageId): PromiseInterface - { - return $this->unfavoriteStorageAsyncWithHttpInfo($storageId)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation unfavoriteStorageAsyncWithHttpInfo - * - * Remove storage from favorites - * - * @param string $storageId Storage id (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function unfavoriteStorageAsyncWithHttpInfo(string $storageId): PromiseInterface - { - $url = $this->buildPath('storage/{storageId}/favorite', compact('storageId')); - $request = new Request('DELETE', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(); - }); - } -} diff --git a/lib/Upcloud/TagApi.php b/lib/Upcloud/TagApi.php deleted file mode 100644 index d0792149..00000000 --- a/lib/Upcloud/TagApi.php +++ /dev/null @@ -1,455 +0,0 @@ -assignTagWithHttpInfo($serverId, $tagList); - return $response; - } - - /** - * Operation assignTagWithHttpInfo - * - * Assign tag to a server - * - * @param string $serverId Server id (required) - * @param string $tagList List of tags (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function assignTagWithHttpInfo(string $serverId, string $tagList): array - { - $url = $this->buildPath('server/{serverId}/tag/{tagList}', compact('serverId', 'tagList')); - $request = new Request('POST', $url); - - $response = $this->client->send($request); - - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation assignTagAsync - * - * Assign tag to a server - * - * @param string $serverId Server id (required) - * @param string $tagList List of tags (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function assignTagAsync(string $serverId, string $tagList): PromiseInterface - { - return $this->assignTagAsyncWithHttpInfo($serverId, $tagList)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation assignTagAsyncWithHttpInfo - * - * Assign tag to a server - * - * @param string $serverId Server id (required) - * @param string $tagList List of tags (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function assignTagAsyncWithHttpInfo(string $serverId, string $tagList): PromiseInterface - { - $url = $this->buildPath('server/{serverId}/tag/{tagList}', compact('serverId', 'tagList')); - - $request = new Request('POST', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - - return $response->toArray(CreateServerResponse::class); - }); - } - - /** - * Operation createTag - * - * Create a new tag - * - * @param TagCreateRequest $tag (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateNewTagResponse - */ - public function createTag(TagCreateRequest $tag): CreateNewTagResponse - { - list($response) = $this->createTagWithHttpInfo($tag); - return $response; - } - - /** - * Operation createTagWithHttpInfo - * - * Create a new tag - * - * @param TagCreateRequest $tag (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateNewTagResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function createTagWithHttpInfo(TagCreateRequest $tag): array - { - $request = new Request('POST', 'tag', [], $tag); - $response = $this->client->send($request); - - return $response->toArray(CreateNewTagResponse::class); - } - - /** - * Operation createTagAsync - * - * Create a new tag - * - * @param TagCreateRequest $tag (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createTagAsync(TagCreateRequest $tag): PromiseInterface - { - return $this->createTagAsyncWithHttpInfo($tag)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation createTagAsyncWithHttpInfo - * - * Create a new tag - * - * @param TagCreateRequest $tag (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function createTagAsyncWithHttpInfo(TagCreateRequest $tag): PromiseInterface - { - $request = new Request('POST', 'tag', [], $tag); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateNewTagResponse::class); - }); - } - - /** - * Operation deleteTag - * - * Delete tag - * - * @param string $tagName Tag name (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return void - */ - public function deleteTag(string $tagName): void - { - $this->deleteTagWithHttpInfo($tagName); - } - - /** - * Operation deleteTagWithHttpInfo - * - * Delete tag - * - * @param string $tagName Tag name (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteTagWithHttpInfo(string $tagName): array - { - $url = $this->buildPath('tag/{tagName}', compact('tagName')); - $request = new Request('DELETE', $url); - - $response = $this->client->send($request); - return $response->toArray(); - } - - /** - * Operation deleteTagAsync - * - * Delete tag - * - * @param string $tagName Tag name (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteTagAsync(string $tagName): PromiseInterface - { - return $this->deleteTagAsyncWithHttpInfo($tagName)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation deleteTagAsyncWithHttpInfo - * - * Delete tag - * - * @param string $tagName Tag name (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function deleteTagAsyncWithHttpInfo(string $tagName): PromiseInterface - { - $url = $this->buildPath('tag/{tagName}', compact('tagName')); - $request = new Request('DELETE', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(); - }); - } - - /** - * Operation listTags - * - * List existing tags - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return TagListResponse - */ - public function listTags(): TagListResponse - { - list($response) = $this->listTagsWithHttpInfo(); - return $response; - } - - /** - * Operation listTagsWithHttpInfo - * - * List existing tags - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of TagListResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function listTagsWithHttpInfo(): array - { - $request = new Request('GET', 'tag'); - - $response = $this->client->send($request); - return $response->toArray(TagListResponse::class); - } - - /** - * Operation listTagsAsync - * - * List existing tags - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listTagsAsync(): PromiseInterface - { - return $this->listTagsAsyncWithHttpInfo()->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation listTagsAsyncWithHttpInfo - * - * List existing tags - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listTagsAsyncWithHttpInfo(): PromiseInterface - { - $request = new Request('GET', 'tag'); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(TagListResponse::class); - }); - } - - /** - * Operation modifyTag - * - * Modify existing tag - * - * @param string $tagName Tag name (required) - * @param ModifyTagRequest $tag (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateNewTagResponse - */ - public function modifyTag(string $tagName, ModifyTagRequest $tag): CreateNewTagResponse - { - list($response) = $this->modifyTagWithHttpInfo($tagName, $tag); - return $response; - } - - /** - * Operation modifyTagWithHttpInfo - * - * Modify existing tag - * - * @param string $tagName Tag name (required) - * @param ModifyTagRequest $tag (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateNewTagResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function modifyTagWithHttpInfo(string $tagName, ModifyTagRequest $tag): array - { - $url = $this->buildPath('tag/{tagName}', compact('tagName')); - $request = new Request('PUT', $url, [], $tag); - - $response = $this->client->send($request); - - return $response->toArray(CreateNewTagResponse::class); - } - - /** - * Operation modifyTagAsync - * - * Modify existing tag - * - * @param string $tagName Tag name (required) - * @param ModifyTagRequest $tag (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyTagAsync(string $tagName, ModifyTagRequest $tag): PromiseInterface - { - return $this->modifyTagAsyncWithHttpInfo($tagName, $tag)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation modifyTagAsyncWithHttpInfo - * - * Modify existing tag - * - * @param string $tagName Tag name (required) - * @param ModifyTagRequest $tag (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function modifyTagAsyncWithHttpInfo(string $tagName, ModifyTagRequest $tag): PromiseInterface - { - $url = $this->buildPath('tag/{tagName}', compact('tagName')); - $request = new Request('PUT', $url, [], $tag); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateNewTagResponse::class); - }); - } - - /** - * Operation untag - * - * Remove tag from server - * - * @param string $serverId Server id (required) - * @param string $tagName Tag name (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return CreateServerResponse - */ - public function untag(string $serverId, string $tagName): CreateServerResponse - { - list($response) = $this->untagWithHttpInfo($serverId, $tagName); - return $response; - } - - /** - * Operation untagWithHttpInfo - * - * Remove tag from server - * - * @param string $serverId Server id (required) - * @param string $tagName Tag name (required) - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of CreateServerResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function untagWithHttpInfo(string $serverId, string $tagName): array - { - $url = $this->buildPath('server/{serverId}/untag/{tagName}', compact('serverId', 'tagName')); - - $request = new Request('POST', $url); - $response = $this->client->send($request); - - return $response->toArray(CreateServerResponse::class); - } - - /** - * Operation untagAsync - * - * Remove tag from server - * - * @param string $serverId Server id (required) - * @param string $tagName Tag name (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function untagAsync(string $serverId, string $tagName): PromiseInterface - { - return $this->untagAsyncWithHttpInfo($serverId, $tagName)->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation untagAsyncWithHttpInfo - * - * Remove tag from server - * - * @param string $serverId Server id (required) - * @param string $tagName Tag name (required) - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function untagAsyncWithHttpInfo(string $serverId, string $tagName): PromiseInterface - { - $url = $this->buildPath('server/{serverId}/untag/{tagName}', compact('serverId', 'tagName')); - $request = new Request('POST', $url); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(CreateServerResponse::class); - }); - } -} diff --git a/lib/Upcloud/TimezoneApi.php b/lib/Upcloud/TimezoneApi.php deleted file mode 100644 index 2ab05bd9..00000000 --- a/lib/Upcloud/TimezoneApi.php +++ /dev/null @@ -1,87 +0,0 @@ -listTimezonesWithHttpInfo(); - return $response; - } - - /** - * Operation listTimezonesWithHttpInfo - * - * List timezones - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array ofTimezoneListResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function listTimezonesWithHttpInfo(): array - { - $request = new Request('GET', 'timezone'); - $response = $this->client->send($request); - - return $response->toArray(TimezoneListResponse::class); - } - - /** - * Operation listTimezonesAsync - * - * List timezones - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listTimezonesAsync(): PromiseInterface - { - return $this->listTimezonesAsyncWithHttpInfo()->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation listTimezonesAsyncWithHttpInfo - * - * List timezones - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listTimezonesAsyncWithHttpInfo() - { - $request = new Request('GET', 'timezone'); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(TimezoneListResponse::class); - }); - } -} diff --git a/lib/Upcloud/ZoneApi.php b/lib/Upcloud/ZoneApi.php deleted file mode 100644 index 5f61d16f..00000000 --- a/lib/Upcloud/ZoneApi.php +++ /dev/null @@ -1,86 +0,0 @@ -listZonesWithHttpInfo(); - return $response; - } - - /** - * Operation listZonesWithHttpInfo - * - * List available zones - * - * @throws ApiException on non-2xx response - * @throws InvalidArgumentException|GuzzleException - * @return array of ZoneListResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function listZonesWithHttpInfo(): array - { - $request = new Request('GET', 'zone'); - $response = $this->client->send($request); - - return $response->toArray(ZoneListResponse::class); - } - - /** - * Operation listZonesAsync - * - * List available zones - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listZonesAsync() - { - return $this->listZonesAsyncWithHttpInfo()->then(function ($response) { - return $response[0]; - }); - } - - /** - * Operation listZonesAsyncWithHttpInfo - * - * List available zones - * - * @throws InvalidArgumentException - * @return PromiseInterface - */ - public function listZonesAsyncWithHttpInfo() - { - $request = new Request('GET', 'zone'); - - return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { - return $response->toArray(ZoneListResponse::class); - }); - } -} diff --git a/phpconfig.ini b/phpconfig.ini deleted file mode 100644 index 66209f4c..00000000 --- a/phpconfig.ini +++ /dev/null @@ -1 +0,0 @@ -xdebug.max_nesting_level=512 \ No newline at end of file diff --git a/phpunit.xml.dist b/phpunit.xml.dist deleted file mode 100644 index da562fda..00000000 --- a/phpunit.xml.dist +++ /dev/null @@ -1,27 +0,0 @@ - - - - - ./test/Api - - - - - - ./lib/Upcloud - ./lib/Model - - - - - - - - - - diff --git a/releasing.md b/releasing.md new file mode 100644 index 00000000..bd3a80c6 --- /dev/null +++ b/releasing.md @@ -0,0 +1,65 @@ +# Releasing the PHP SDK + +Releases start when you push a version tag. GitHub builds the release, then asks Packagist to update the existing `upcloudltd/upcloud-php-api` package. + +Protect `main` before releasing: require reviewed pull requests and block force-pushes and deletion. Check these settings in the destination repository; they do not transfer from the old SDK repository. Both release and publishing jobs independently verify the tag and commit against default-branch history. + +Add these under **Settings β†’ Secrets and variables β†’ Actions** for this repository: + +- Repository variable `PACKAGIST_PUBLISH_ENABLED` with value `true`, enabled only when ready to publish. +- Repository secrets `PACKAGIST_USERNAME` and `PACKAGIST_TOKEN` with your Packagist username and safe API token. + +The publisher uses only the repository-level variable and secrets above; it does not need a GitHub Environment. It verifies the release tag and commit are on protected `main` before using the Packagist credentials. + +Keep the existing Packagist package pointed at `https://github.com/UpCloudLtd/upcloud-php-api`. Do not change the package name or move existing v1-v3 tags. The new SDK replaces the implementation in this repository while historical versions remain at their original commits. + +The release workflow uploads the tag and exact commit in a release-identity artifact. The publisher runs from the default branch and validates that artifact against the successful run's commit, repository and run ID. It does not infer tags from a branch name. The publisher uses Bearer authentication to request a refresh, then verifies registry source and archive URLs and commit references before saving a receipt. Documentation uses the released tag; its job is allowed to fail without blocking publication, so check its result separately. + +## Create a Release + +1. Make sure the release changes are merged and the default branch is up to date. +2. Create and push an annotated version tag. For the first stable release, use: + + ```sh + git checkout main + git pull --ff-only + git tag -a v4.0.0 -m "Release v4.0.0" + git push origin v4.0.0 + ``` + + For later stable releases, choose the next appropriate version: `v4.0.1` for a patch, `v4.1.0` for a backward-compatible feature, or `v5.0.0` for a breaking change. + +3. In **Actions**, watch **Build PHP SDK Release**, then **Publish PHP SDK**. Check the release workflow's `docs` job separately. The GitHub Release is created before registry verification; its existence alone is not proof that publishing succeeded. +4. Check the publish job's receipt: both source and archive must match the tag's commit. Prereleases are marked as such and are not set as GitHub's latest release. +5. Verify both `v3.0.0` and the new release still install from Packagist using fresh Composer projects. + +### Alpha, beta, and release candidates + +Prereleases use the upcoming stable version followed by `-alpha`, `-beta`, or `-rc`. You may add a dot and number to distinguish iterations. For example, publish `v4.0.0-alpha.1`, then `v4.0.0-alpha.2`, `v4.0.0-beta.1`, and `v4.0.0-rc.1` before the stable `v4.0.0` release. Each tag creates a GitHub prerelease and is indexed on Packagist. + +Create a prerelease tag in the same way as a stable tag: + +Use lowercase `alpha`, `beta`, or `rc`, optionally followed by one numeric iteration +such as `.1`. Numeric components must not have leading zeros. Textual iterations +such as `-rc.foo` and extra components such as `-alpha.1.extra` are rejected because +they are not supported Composer release versions. + +```sh +VERSION=v4.0.0-alpha.1 +git tag -a "$VERSION" -m "Release $VERSION" +git push origin "$VERSION" +``` + +To install a prerelease for testing, request its version and stability explicitly: + +```sh +composer require upcloudltd/upcloud-php-api:4.0.0-alpha.1@alpha +``` + +Stable releases remain the default for consumers who do not opt into prerelease stability. See the package at . + +## Legacy Maintenance + +Branch from `v3.0.0` when maintaining the old client; never move that tag. The v4 release workflow rejects commits that exist only on a maintenance branch. Publishing v3 fixes needs a separately reviewed maintenance process and is not covered here. + +If the Packagist job fails, read its error and fix the package settings or credentials before retrying. Do not push the same version tag again; rerun the failed workflow from the **Actions** tab after correcting the issue. diff --git a/sdk-repo-creation-guide.md b/sdk-repo-creation-guide.md new file mode 100644 index 00000000..4e641e1b --- /dev/null +++ b/sdk-repo-creation-guide.md @@ -0,0 +1,311 @@ +# πŸ“˜ Creating a New UpCloud SDK Repository + +This guide explains how to create, configure, and operate a new UpCloud SDK repository using the **UpCloud OpenAPI SDK Template**.\ +It reflects the **current, production-ready pipeline** and clearly documents **inputs, outputs, and responsibilities** for each workflow and script. + +--- + +## 1. Purpose of the Template + +The SDK template standardizes: + +- Regeneration of SDKs from OpenAPI specs +- Pull-request–based updates (no direct pushes to `main`) +- Versioned GitHub releases +- Versioned reference documentation +- Publishing to external registries (Packagist, npm, etc.) + +The template is **language-agnostic**.\ +Each SDK repository only needs to implement generator scripts β€” **not workflows**. + +--- + +## 2. Prerequisites + +Before creating a new SDK repository: + +- You have write access to the **UpCloud GitHub organization** +- You have access to the **SDK template repository** +- You know which generator you will use: + - Fern + - OpenAPI Generator + - Custom generator + +You do **not** need to configure GitLab.\ +GitLab already dispatches spec releases to SDK repositories. + +--- + +## 3. Creating a New SDK Repository + +1. Go to **GitHub β†’ UpCloud organization** +2. Click **New Repository** +3. Select **Use a template** +4. Choose the **UpCloud OpenAPI SDK Template** +5. Name the repository: + + ``` + upcloud--sdk + ``` + +6. Create the repository + +--- + +## 4. Repository Structure (From Template) + +``` +.github/workflows/ + regenerate.yml # regenerate SDK from OpenAPI spec + release.yml # build GitHub release from merged code + publish.yml # publish SDK to registry (optional) + update-docs.yml # version & publish reference docs + +generator/ + openapi/ # standardized spec input location + scripts/ + generate.sh # REQUIRED: SDK generation entrypoint + prepare-release.sh# REQUIRED: release packaging + publish.sh # OPTIONAL: registry publishing + +docs/ # versioned documentation (generated) +README.md +LICENSE +.gitignore +``` + +> **Important:**\ +> Workflow files are shared and should not be modified in normal SDK repos. + +--- + +## 5. End-to-End Execution Flow + +``` +GitLab OpenAPI release + ↓ +repository_dispatch (spec_released) + ↓ +regenerate.yml + ↓ +PR with regenerated SDK + ↓ (manual review & merge) +git tag vX.Y.Z + ↓ +release.yml + ↓ +GitHub Release + artifacts + ↓ +update-docs.yml (docs PR, needs manual review and merge) + ↓ +publish.yml +``` + +--- + +## 6. Workflow Contracts (Critical) + +This section defines **hard contracts** between workflows and scripts. You will have to implement these scripts for each sdk we are generating. + +--- + +### regenerate.yml β€” SDK Regeneration + +**Trigger** +``` +repository_dispatch (spec_released in GitLab) +``` + +**Inputs** + +| Source | Description | +|------|------------| +| `github.event.client_payload.version` | Spec version (`vX.Y.Z`) | +| `github.event.client_payload.asset_url` | URL to spec tarball | +| `SPECS_ACCESS_PAT` (secret) | Token to download spec from GitHub. Must have repo access to download the specs | + +**Guaranteed Input Location** + +``` +generator/openapi/spec.json +``` + +This path is **mandatory** for all SDKs. + +**Script Called** + +``` +generator/scripts/generate.sh +``` + +**Responsibilities of generate.sh** + +- Read `generator/openapi/spec.json` +- Run language-specific generator +- Write SDK source code into the repository +- ❌ Do NOT commit +- ❌ Do NOT tag +- ❌ Do NOT create releases + +**Output** + +- Pull request: + ``` + regen/vX.Y.Z + ``` + +--- + +### release.yml β€” Build GitHub Release + +**Trigger** +``` +git push tag vX.Y.Z +``` + +**Inputs** +- Repository state after regeneration PR has been merged + +**Script Called** +``` +generator/scripts/prepare-release.sh vX.Y.Z +``` + +**Responsibilities of prepare-release.sh** + +- Validate generated SDK +- Install dependencies if needed +- Create release artifacts +- Write artifacts to: + +``` +generator/release-artifacts/ +``` + +**Output** +- GitHub Release `vX.Y.Z` +- Uploaded artifacts +- Dispatches `docs-update` event + +--- + +### update-docs.yml β€” Versioned Documentation + +**Trigger** +``` +repository_dispatch (docs-update) +``` + +**Inputs** + +| Variable | Description | +|--------|------------| +| `VERSION` | SDK version (`vX.Y.Z`) | +| `REFERENCE_FILE` | Path to generated reference file | + +Example (Fern): +``` +REFERENCE_FILE=fern/sdk/reference.md +``` + +**Responsibilities** + +- Validate reference file exists +- Copy reference into: + ``` + docs/latest/reference.md + docs/vX.Y.Z/reference.md + ``` +- Regenerate `docs/index.md` +- Create documentation PR + +**Output** +- PR updating `/docs` +- Content ready for GitHub Pages + +--- + +### publish.yml β€” Registry Publishing (Optional) + +**Trigger** +``` +workflow_run (release.yml succeeded; publisher verifies its release-identity artifact) +``` + +**Inputs** +- Git tag `vX.Y.Z` +- Exact release commit SHA +- Registry credentials (language-specific) + +**Script Called** +``` +generator/scripts/publish.sh vX.Y.Z +``` + +--- + +## 7. Required Secrets + +### GitHub Secrets (per SDK repo) + +| Name | Purpose | +|----|--------| +| `SPECS_ACCESS_PAT` | GitHub token used to download OpenAPI spec artifacts from a draft GitHub release in the SDK repository + +--- + +## 8. GitHub Pages Setup (One-Time) + +Once documentation exists: + +1. Go to **Repository β†’ Settings β†’ Pages** +2. Source: **Deploy from a branch** +3. Branch: `main` +4. Folder: `/docs` + +Docs will be available at: + +``` +https://upcloudltd.github.io// +``` + +--- + +## 9. SDK Author Checklist (One Page) + +### Repository +- [ ] Created from SDK template +- [ ] Public repo +- [ ] GitHub Pages enabled + +### Secrets +- [ ] `SPECS_ACCESS_PAT` configured +- [ ] Registry secrets added (if applicable) + +### Generation +- [ ] `generate.sh` implemented +- [ ] Reads from `generator/openapi/spec.json` +- [ ] Writes SDK code to repo +- [ ] No commits or tags + +### Release +- [ ] `prepare-release.sh` implemented +- [ ] Outputs artifacts to `generator/release-artifacts/` + +### Documentation +- [ ] Reference file generated +- [ ] `REFERENCE_FILE` path correct +- [ ] Docs PR workflow verified + +### Publishing +- [ ] `publish.yml` present +- [ ] Triggered only after successful release +- [ ] Registry credentials configured + +### End-to-End +- [ ] Spec release creates regen PR +- [ ] PR merged manually +- [ ] Tag `vX.Y.Z` pushed +- [ ] GitHub release created +- [ ] Docs PR created +- [ ] Package published \ No newline at end of file diff --git a/test/Api/AccountApi/AccountApiTest.php b/test/Api/AccountApi/AccountApiTest.php deleted file mode 100644 index 6e29789a..00000000 --- a/test/Api/AccountApi/AccountApiTest.php +++ /dev/null @@ -1,162 +0,0 @@ -isNoCredentials) { - $this->mock = Mockery::mock(Client::class); - $this->api = new AccountApi($this->mock); - } else { - $this->api = new AccountApi(); - $this->api->getConfig()->setUsername($this->getUsername()); - $this->api->getConfig()->setPassword($this->getPassword()); - } - } - - /** - * @throws ApiException - * @throws GuzzleException - */ - public function testGetAccount() - { - - if ($this->isNoCredentials) { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fakeRawBody); - - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($response); - } - - $response = $this->api->getAccount(); - - $this->assertInstanceOf(AccountResponse::class, $response); - $this->assertInstanceOf(Account::class, $account = $response->getAccount()); - $this->assertEquals($this->getUsername(), $account->getUsername()); - - $this->assertInstanceOf(AccountResourceLimits::class, $resourceLimits = $account->getResourceLimits()); - $this->assertNotNull($resourceLimits->getCores()); - $this->assertNotNull($resourceLimits->getMemory()); - $this->assertNotNull($resourceLimits->getNetworks()); - $this->assertNotNull($resourceLimits->getPublicIpv4()); - $this->assertNotNull($resourceLimits->getPublicIpv6()); - $this->assertNotNull($resourceLimits->getStorageHdd()); - $this->assertNotNull($resourceLimits->getStorageSsd()); - } - - - /** - * @throws ApiException - * @throws GuzzleException - */ - public function testThrowsExceptionOnGetAccount(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(401); - - $this->api->getConfig()->setUsername($this->generateRandomString()); - $this->api->getConfig()->setPassword($this->generateRandomString()); - - if ($this->isNoCredentials) { - $request = new Request('GET', $this->url . 'account', $this->fakeHeadersAsArray); - $response = new Response(401, $this->fakeResponseHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - } - - $this->api->getAccount(); - } - - - public function testGetAccountAsync() - { - if ($this->isNoCredentials) { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fakeRawBody); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - } - - $promise = $this->api->getAccountAsync(); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(AccountResponse::class, $result = $promise->wait()); - $this->assertInstanceOf(Account::class, $account = $result->getAccount()); - $this->assertEquals($this->getUsername(), $account->getUsername()); - - $this->assertInstanceOf(AccountResourceLimits::class, $resourceLimits = $account->getResourceLimits()); - $this->assertNotNull($resourceLimits->getCores()); - $this->assertNotNull($resourceLimits->getMemory()); - $this->assertNotNull($resourceLimits->getNetworks()); - $this->assertNotNull($resourceLimits->getPublicIpv4()); - $this->assertNotNull($resourceLimits->getPublicIpv6()); - $this->assertNotNull($resourceLimits->getStorageHdd()); - $this->assertNotNull($resourceLimits->getStorageSsd()); - } - - - public function testThrowsExceptionOnGetAccountAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(401); - - $this->api->getConfig()->setUsername($this->generateRandomString()); - $this->api->getConfig()->setPassword($this->generateRandomString()); - - if ($this->isNoCredentials) { - $request = new Request('GET', $this->url . 'account', $this->fakeHeadersAsArray); - $response = new Response(401, $this->fakeResponseHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - } - $this->api->getAccountAsync()->wait(); - } -} diff --git a/test/Api/BaseApiTest.php b/test/Api/BaseApiTest.php deleted file mode 100644 index a72fae71..00000000 --- a/test/Api/BaseApiTest.php +++ /dev/null @@ -1,94 +0,0 @@ - '"9d86b21aa74d74e574bbb35ba13524a52deb96e3"', - 'Content-Type' => 'application/json; charset=UTF-8', - 'Pragma' => 'no-cache', - 'Expires' => 'Sat, 01 Jan 2020 00:00:00 GMT', - 'Connection' => 'close', - 'Date' => 'Mon, 19 Oct 2020 18:37:17 GMT', - 'Content-Length' => '127', - 'Cache-Control' => 'private, no-cache, no-store, must-revalidate', - 'Access-Control-Allow-Origin' => '*', - ]; - - protected $fakeResponseHeadersAsArray = [ - 'Date' => 'Mon, 19 Oct 2020 18:37:17 GMT', - 'Server' => 'Apache', - 'Content-Length' => '127', - 'Content-Type' => 'application/json; charset=UTF-8', - 'Strict-Transport-Security' => ['max-age=63072000'] - ]; - - protected $isNoCredentials = false; - - public function __construct(?string $name = null, array $data = [], $dataName = '') - { - parent::__construct($name, $data, $dataName); - - $this->isNoCredentials = \getenv('UPCLOUD_API_TEST_NO_CREDENTIALS'); - } - - protected function getUsername() - { - return \getenv('UPCLOUD_API_TEST_USER') && !$this->isNoCredentials - ? \getenv('UPCLOUD_API_TEST_USER') - : 'test'; - } - - protected function getPassword() - { - return \getenv('UPCLOUD_API_TEST_PASSWORD') && !$this->isNoCredentials - ? \getenv('UPCLOUD_API_TEST_PASSWORD') - : ''; - } - - protected function generateRandomString($length = 10) - { - $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; - $charactersLength = strlen($characters); - $randomString = ''; - for ($i = 0; $i < $length; $i++) { - $randomString .= $characters[rand(0, $charactersLength - 1)]; - } - return $randomString; - } -} diff --git a/test/Api/FirewallApi/FirewallApiAsyncTest.php b/test/Api/FirewallApi/FirewallApiAsyncTest.php deleted file mode 100644 index cdf79824..00000000 --- a/test/Api/FirewallApi/FirewallApiAsyncTest.php +++ /dev/null @@ -1,166 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new FirewallApi($this->mock); - $this->fixture = new FirewallApiFixture; - } - - public function testListFirewallRulesAsync() - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getRulesResponseBody()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->serverServerIdFirewallRuleGetAsync($this->serverId); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(FirewallRuleListResponse::class, $result = $promise->wait()); - - - - $rulesList = $result->getFirewallRules()->getFirewallRule(); - $this->assertCount(4, $rulesList); - - $fixtureRolesList = $this->fixture->getRulesResponse()->getFirewallRules()->getFirewallRule(); - - foreach ($rulesList as $key => $rule) { - $this->assertInstanceOf(FirewallRule::class, $rule); - $this->assertEquals($rule, $fixtureRolesList[$key]); - } - } - - public function testGetFirewallRuleAsync() - { - $response = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getRulesResponseBodyByIndex() - ); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->getFirewallRuleAsync($this->serverId, 1); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(FirewallRuleCreateResponse::class, $result = $promise->wait()); - - $fixtureRole = $this->fixture->getRulesResponseByIndex(); - - $this->assertEquals($result, $fixtureRole); - } - - - public function testCreateFirewallRuleAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getRulesResponseBodyByIndex()); - $fakeRequest = $this->fixture->getRuleRequestSuccess(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->createFirewallRuleAsync($this->serverId, $fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(FirewallRuleCreateResponse::class, $result = $promise->wait()); - - $this->assertEquals($result->getFirewallRule(), $fakeRequest->getFirewallRule()); - } - - public function testThrowsExceptionOnCreateFirewallRuleAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId.'/firewall_rule', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getRuleRequestFailed(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->createFirewallRuleAsync($this->serverId, $fakeRequest)->wait(); - } - - public function testThrowsExceptionOnDeleteFirewallRuleAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'DELETE', - $this->url . 'server/'.$this->serverId.'/firewall_rule/'. 1, - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->deleteFirewallRuleAsync($this->serverId, 1)->wait(); - } -} diff --git a/test/Api/FirewallApi/FirewallApiTest.php b/test/Api/FirewallApi/FirewallApiTest.php deleted file mode 100644 index 7f03df05..00000000 --- a/test/Api/FirewallApi/FirewallApiTest.php +++ /dev/null @@ -1,189 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new FirewallApi($this->mock); - $this->fixture = new FirewallApiFixture; - } - - public function testListFirewallRules() - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getRulesResponseBody()); - - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->serverServerIdFirewallRuleGet($this->serverId); - - $rulesList = $response->getFirewallRules()->getFirewallRule(); - $this->assertCount(4, $rulesList); - - $fixtureRolesList = $this->fixture->getRulesResponse()->getFirewallRules()->getFirewallRule(); - - foreach ($rulesList as $key => $rule) { - $this->assertInstanceOf(FirewallRule::class, $rule); - $this->assertEquals($rule, $fixtureRolesList[$key]); - } - } - - public function testGetFirewallRule() - { - $fakeResponse = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getRulesResponseBodyByIndex() - ); - - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->getFirewallRule($this->serverId, 1); - - $this->assertInstanceOf(FirewallRuleCreateResponse::class, $response); - - $fixtureRole = $this->fixture->getRulesResponseByIndex(); - - $this->assertEquals($response, $fixtureRole); - } - - - public function testCreateFirewallRule(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getRulesResponseBodyByIndex()); - $fakeRequest = $this->fixture->getRuleRequestSuccess(); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->createFirewallRule($this->serverId, $fakeRequest); - - $this->assertEquals($response->getFirewallRule(), $fakeRequest->getFirewallRule()); - } - - public function testThrowsExceptionOnCreateFirewallRule(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId.'/firewall_rule', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getRuleRequestFailed(); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->createFirewallRule($this->serverId, $fakeRequest); - } - - public function testCreateFirewallRules(): void - { - $fakeResponse = new Response(204, $this->fakeHeadersAsArray); - $fakeRequest = $this->fixture->getRulesRequestSuccess(); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->createFirewallRulesWithHttpInfo($this->serverId, $fakeRequest); - - $this->assertEquals(204, $response[1]); - } - - public function testThrowsExceptionOnCreateFirewallRules(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId.'/firewall_rule', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getRulesRequestFailed(); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->createFirewallRules($this->serverId, $fakeRequest); - } - - public function testThrowsExceptionOnDeleteFirewallRule(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'DELETE', - $this->url . 'server/'.$this->serverId.'/firewall_rule/'. 1, - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->deleteFirewallRule($this->serverId, 1); - } -} diff --git a/test/Api/Fixtures/BaseFixture.php b/test/Api/Fixtures/BaseFixture.php deleted file mode 100644 index bc4ddff1..00000000 --- a/test/Api/Fixtures/BaseFixture.php +++ /dev/null @@ -1,20 +0,0 @@ -serializer = new Serializer; - } -} diff --git a/test/Api/Fixtures/FirewallApiFixture.php b/test/Api/Fixtures/FirewallApiFixture.php deleted file mode 100644 index 0e03ff9b..00000000 --- a/test/Api/Fixtures/FirewallApiFixture.php +++ /dev/null @@ -1,203 +0,0 @@ - $this->getRoleByIndex($fromListIndex) - ], - JSON_PRETTY_PRINT - ); - } - - /** - * @return string - */ - public function getRulesResponseBody(): string - { - return json_encode($this->getRulesList(), JSON_PRETTY_PRINT); - } - - /** - * @param int $fromListIndex - * @return mixed - */ - public function getRulesResponseByIndex(int $fromListIndex = 0) - { - return $this->serializer->deserialize( - $this->getRulesResponseBodyByIndex($fromListIndex), - FirewallRuleCreateResponse::class - ); - } - - /** - * @return mixed - */ - public function getRulesResponse() - { - return $this->serializer->deserialize( - $this->getRulesResponseBody(), - FirewallRuleListResponse::class - ); - } - - /** - * @param int $fromListIndex - * @return FirewallRuleRequest - */ - public function getRuleRequestFailed(int $fromListIndex = 0): FirewallRuleRequest - { - - $rule = $this->getRoleByIndex($fromListIndex); - - $rule['icmp_type'] = '255'; - - return new FirewallRuleRequest([ - 'firewall_rule' => new FirewallRule($rule), - ]); - } - - /** - * @param int $fromListIndex - * @return FirewallRuleRequest - */ - public function getRuleRequestSuccess($fromListIndex = 0): FirewallRuleRequest - { - return new FirewallRuleRequest([ - 'firewall_rule' => new FirewallRule($this->getRoleByIndex($fromListIndex)), - ]); - } - - /** - * @param int $fromListIndex - * @return FirewallRulesRequest - */ - public function getRulesRequestSuccess(int $fromListIndex = 0): FirewallRulesRequest - { - return new FirewallRulesRequest([ - 'firewall_rules' => [ - new FirewallRule($this->getRoleByIndex($fromListIndex)), - new FirewallRule($this->getRoleByIndex($fromListIndex+1)), - ], - ]); - } - - /** - * @param int $fromListIndex - * @return FirewallRulesRequest - */ - public function getRulesRequestFailed(int $fromListIndex = 0): FirewallRulesRequest - { - $firstRule = $this->getRoleByIndex($fromListIndex); - $firstRule['icmp_type'] = '255'; - - $secondRule = $this->getRoleByIndex($fromListIndex+1); - $secondRule['icmp_type'] = '255'; - - return new FirewallRulesRequest([ - 'firewall_rules' => [ - new FirewallRule($firstRule), - new FirewallRule($secondRule), - ], - ]); - } - - /** - * @param int $index - * @return string[]|null - */ - public function getRoleByIndex(int $index) - { - return $this->getRulesList()['firewall_rules']['firewall_rule'][$index] ?? null; - } - - /** - * @return string[] - */ - public function getRulesList(): array - { - return [ - "firewall_rules" => [ - "firewall_rule" => [ - [ - "action" => "accept", - "comment" => "Allow HTTP from anywhere", - "destination_address_end" => "", - "destination_address_start" => "", - "destination_port_end" => "80", - "destination_port_start" => "80", - "direction" => "in", - "family" => "IPv4", - "icmp_type" => "", - "position" => "1", - "protocol" => "tcp", - "source_port_end" => "80", - "source_port_start" => "80", - ], - [ - "action" => "accept", - "comment" => "Allow SSH from a specific network only", - "destination_address_end" => "", - "destination_address_start" => "", - "destination_port_end" => "22", - "destination_port_start" => "22", - "direction" => "in", - "family" => "IPv4", - "icmp_type" => "", - "position" => "2", - "protocol" => "tcp", - "source_address_end" => "192.168.1.255", - "source_address_start" => "192.168.1.1", - "source_port_end" => "22", - "source_port_start" => "22", - ], - [ - "action" => "accept", - "comment" => "Allow SSH over IPv6 from this range", - "destination_address_end" => "", - "destination_address_start" => "", - "destination_port_end" => "22", - "destination_port_start" => "22", - "direction" => "in", - "family" => "IPv6", - "icmp_type" => "", - "position" => "3", - "protocol" => "tcp", - "source_address_end" => "2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d", - "source_address_start" => "2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d", - "source_port_end" => "22", - "source_port_start" => "22", - ], - [ - "action" => "accept", - "comment" => "Allow ICMP echo request (ping)", - "destination_address_end" => "", - "destination_address_start" => "", - "direction" => "in", - "family" => "IPv4", - "icmp_type" => "8", - "position" => "4", - "protocol" => null, - ] - ] - ] - ]; - } -} diff --git a/test/Api/Fixtures/HostsApiFixture.php b/test/Api/Fixtures/HostsApiFixture.php deleted file mode 100644 index 8fc37f0b..00000000 --- a/test/Api/Fixtures/HostsApiFixture.php +++ /dev/null @@ -1,129 +0,0 @@ -getList(), JSON_PRETTY_PRINT); - } - - /** - * @param int $index - * @return string - */ - public function getResponseBodyByIndex(int $index = 0): string - { - return json_encode( - [ - 'host' => $this->getByIndex($index) - ], - JSON_PRETTY_PRINT - ); - } - - /** - * @return HostListResponse - */ - public function getResponse() - { - return $this->serializer->deserialize( - $this->getResponseBody(), - HostListResponse::class - ); - } - - /** - * @param int $index - * @return HostResponse - */ - public function getResponseByIndex(int $index = 0) - { - return $this->serializer->deserialize( - $this->getResponseBodyByIndex($index), - HostResponse::class - ); - } - - /** - * @param int $index - * @return ModifyHostRequest - */ - public function getModifyRequest($index = 0): ModifyHostRequest - { - return new ModifyHostRequest([ - 'host' => $this->getByIndex($index), - ]); - } - - /** - * @param int $index - * @return string[]|null - */ - public function getByIndex(int $index) - { - return $this->getList()['hosts']['host'][$index] ?? null; - } - - - public function getList() - { - return [ - 'hosts' => [ - 'host' => [ - [ - 'id' => 7653311107, - 'description' => 'My Host #1', - 'zone' => 'private-zone-id', - 'windows_enabled' => 'no', - 'stats' => [ - 'stat' => [ - [ - 'name' => 'cpu_idle', - 'timestamp' => '2019-08-09T12=>46=>57Z', - 'value' => 95.2 - ], - [ - 'name' => 'memory_free', - 'timestamp' => '2019-08-09T12=>46=>57Z', - 'value' => 102 - ] - ] - ] - ], - [ - 'id' => 8055964291, - 'description' => 'My Host #2', - 'zone' => 'private-zone-id', - 'windows_enabled' => 'no', - 'stats' => [ - 'stat' => [ - [ - 'name' => 'cpu_idle', - 'timestamp' => '2019-08-09T12=>46=>57Z', - 'value' => 80.1 - ], - [ - 'name' => 'memory_free', - 'timestamp' => '2019-08-09T12=>46=>57Z', - 'value' => 61 - ] - ] - ] - ] - ] - ] - ]; - } -} diff --git a/test/Api/Fixtures/IPAddressApiFixture.php b/test/Api/Fixtures/IPAddressApiFixture.php deleted file mode 100644 index a2b4e165..00000000 --- a/test/Api/Fixtures/IPAddressApiFixture.php +++ /dev/null @@ -1,177 +0,0 @@ -getList(), JSON_PRETTY_PRINT); - } - - /** - * @param int $fromListIndex - * @return string - */ - public function getResponseBodyByIndex(int $fromListIndex = 0): string - { - return json_encode( - [ - 'ip_address' => $this->getByIndex($fromListIndex) - ], - JSON_PRETTY_PRINT - ); - } - - /** - * @return IpAddressListResponse|mixed - */ - public function getResponse() - { - return $this->serializer->deserialize( - $this->getResponseBody(), - IpAddressListResponse::class - ); - } - - /** - * @param int $fromListIndex - * @return AddIpRequest - */ - public function getRequestSuccess($fromListIndex = 0): AddIpRequest - { - return new AddIpRequest([ - 'ip_address' => $this->getItem($fromListIndex), - ]); - } - - /** - * @param int $fromListIndex - * @return ModifyIpRequest - */ - public function getModifyRequestSuccess($fromListIndex = 0): ModifyIpRequest - { - return new ModifyIpRequest([ - 'ip_address' => $this->getItem($fromListIndex), - ]); - } - - /** - * @param int $fromListIndex - * @return AddIpRequest - */ - public function getRequestFailed(int $fromListIndex = 0): AddIpRequest - { - return new AddIpRequest([ - 'ip_address' => $this->getItem($fromListIndex), - ]); - } - - /** - * @param int $fromListIndex - * @return ModifyIpRequest - */ - public function getModifyRequestFailed($fromListIndex = 0): ModifyIpRequest - { - return new ModifyIpRequest([ - 'ip_address' => $this->getItem($fromListIndex), - ]); - } - - /** - * @param int $fromListIndex - * @return mixed - */ - public function getResponseByIndex(int $fromListIndex = 0) - { - return $this->serializer->deserialize( - $this->getResponseBodyByIndex($fromListIndex), - AssignIpResponse::class - ); - } - - /** - * @param int $index - * @return string[]|null - */ - public function getByIndex(int $index) - { - return $this->getList()['ip_addresses']['ip_address'][$index] ?? null; - } - - public function getItem($fromListIndex = 5) - { - return new IpAddress($this->getByIndex($fromListIndex)); - } - - public function getList() - { - return [ - 'ip_addresses' => [ - 'ip_address' => [ - [ - 'access' => 'utility', - 'address' => '10.0.0.0', - 'family' => 'IPv4', - 'ptr_record' => '', - 'server' => '0053cd80-5945-4105-9081-11192806a8f7', - 'mac' => 'mm:mm:mm:mm:mm:m1', - 'floating' => 'no', - 'zone' => 'fi-hel2', - ], - [ - 'access' => 'utility', - 'address' => '10.0.0.1', - 'family' => 'IPv4', - 'ptr_record' => '', - 'server' => '006b6701-55d2-4374-ac40-56cc1501037f', - 'mac' => 'mm:mm:mm:mm:mm:m2', - 'floating' => 'no', - 'zone' => 'de-fra1', - ], - [ - 'access' => 'public', - 'address' => 'x.x.x.x', - 'family' => 'IPv4', - 'part_of_plan' => 'yes', - 'ptr_record' => 'x-x-x-x.zone.upcloud.host', - 'server' => '0053cd80-5945-4105-9081-11192806a8f7', - 'mac' => 'mm:mm:mm:mm:mm:m1', - 'floating' => 'yes', - 'zone' => 'de-fra1', - ], - [ - 'access' => 'public', - 'address' => 'xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx', - 'family' => 'IPv6', - 'ptr_record' => 'xxxx-xxxx-xxxx-xxxx.v6.zone.upcloud.host', - 'server' => '006b6701-55d2-4374-ac40-56cc1501037f', - 'mac' => 'mm:mm:mm:mm:mm:m3', - 'floating' => 'no', - 'zone' => 'fi-hel1', - ], - [ - 'access' => 'utility', - 'family' => 'IPv4', - 'mac' => 'mm:mm:mm:mm:mm:m1', - 'floating' => 'yes', - ] - ] - ] - ]; - } -} diff --git a/test/Api/Fixtures/NetworkApiFixture.php b/test/Api/Fixtures/NetworkApiFixture.php deleted file mode 100644 index 336f5145..00000000 --- a/test/Api/Fixtures/NetworkApiFixture.php +++ /dev/null @@ -1,379 +0,0 @@ -getList(), JSON_PRETTY_PRINT); - } - - /** - * @param int $index - * @return string - */ - public function getResponseBodyByIndex(int $index = 0): string - { - return json_encode( - [ - 'network' => $this->getByIndex($index) - ], - JSON_PRETTY_PRINT - ); - } - - /** - * @param int $index - * @return string - */ - public function getNetworkInterfaceResponseBodyByIndex(int $index = 0): string - { - return json_encode( - [ - 'interface' => $this->getInterfaceByIndex($index) - ], - JSON_PRETTY_PRINT - ); - } - - /** - * @param int $index - * @return string - */ - public function getRouterResponseBodyByIndex(int $index = 0): string - { - return json_encode( - [ - 'router' => $this->getRouterByIndex($index) - ], - JSON_PRETTY_PRINT - ); - } - - /** - * @return string - */ - public function getServerResponseBody(): string - { - return json_encode($this->getServerList(), JSON_PRETTY_PRINT); - } - - /** - * @return string - */ - public function getRouterResponseBody(): string - { - return json_encode($this->getRouterList(), JSON_PRETTY_PRINT); - } - - - /** - * @return NetworksListResponse - */ - public function getResponse() - { - return $this->serializer->deserialize( - $this->getResponseBody(), - NetworksListResponse::class - ); - } - - /** - * @return ServerNetworksListResponse - */ - public function getServerResponse() - { - return $this->serializer->deserialize( - $this->getServerResponseBody(), - ServerNetworksListResponse::class - ); - } - - /** - * @return RoutersListResponse - */ - public function getRouterResponse() - { - return $this->serializer->deserialize( - $this->getRouterResponseBody(), - RoutersListResponse::class - ); - } - - /** - * @param int $index - * @return NetworkResponse - */ - public function getResponseByIndex(int $index = 0) - { - return $this->serializer->deserialize( - $this->getResponseBodyByIndex($index), - NetworkResponse::class - ); - } - - /** - * @param int $index - * @return NetworkInterfaceResponse - */ - public function getNetworkInterfaceResponseByIndex(int $index = 0) - { - return $this->serializer->deserialize( - $this->getNetworkInterfaceResponseBodyByIndex($index), - NetworkInterfaceResponse::class - ); - } - - /** - * @param int $index - * @return RouterResponse - */ - public function getRouterResponseByIndex(int $index = 0) - { - return $this->serializer->deserialize( - $this->getRouterResponseBodyByIndex($index), - RouterResponse::class - ); - } - - /** - * @param int $index - * @return CreateNetworkRequest - */ - public function getCreateRequest($index = 0): CreateNetworkRequest - { - return new CreateNetworkRequest([ - 'network' => $this->getByIndex($index), - ]); - } - - /** - * @param int $index - * @return ModifyNetworkRequest - */ - public function getModifyRequest($index = 0): ModifyNetworkRequest - { - return new ModifyNetworkRequest([ - 'network' => $this->getByIndex($index), - ]); - } - - /** - * @param int $index - * @return CreateNetworkInterfaceRequest - */ - public function getCreateNetworkInterfaceRequest($index = 0): CreateNetworkInterfaceRequest - { - return new CreateNetworkInterfaceRequest([ - 'interface' => $this->getInterfaceByIndex($index), - ]); - } - - /** - * @param int $index - * @return ModifyNetworkInterfaceRequest - */ - public function getModifyNetworkInterfaceRequest($index = 0): ModifyNetworkInterfaceRequest - { - return new ModifyNetworkInterfaceRequest([ - 'interface' => $this->getInterfaceByIndex($index), - ]); - } - - /** - * @param int $index - * @return RouterRequest - */ - public function getRouterRequest($index = 0): RouterRequest - { - return new RouterRequest([ - 'router' => $this->getRouterByIndex($index), - ]); - } - - /** - * @param int $index - * @return string[]|null - */ - public function getByIndex(int $index) - { - return $this->getList()['networks']['network'][$index] ?? null; - } - - /** - * @param int $index - * @return string[]|null - */ - public function getInterfaceByIndex(int $index) - { - return $this->getServerList()['networking']['interfaces']['interface'][$index] ?? null; - } - - /** - * @param int $index - * @return string[]|null - */ - public function getRouterByIndex(int $index) - { - return $this->getRouterList()['routers']['router'][$index] ?? null; - } - - public function getList() - { - return [ - 'networks' => [ - 'network' => [ - [ - 'ip_networks' => [ - 'ip_network' => [ - [ - 'address' => '80.69.172.0/22', - 'dhcp' => 'yes', - 'dhcp_default_route' => 'yes', - 'dhcp_dns' => [ - '94.237.127.9', - '94.237.40.9' - ], - 'family' => 'IPv4', - 'gateway' => '80.69.172.1' - ] - ] - ], - 'name' => 'Public 80.69.172.0/22', - 'type' => 'public', - 'uuid' => '03000000-0000-4000-8001-000000000000', - 'zone' => 'fi-hel1', - 'servers' => [ - 'server' => [ - ['uuid' => '007e3200-268f-4848-8b45-bd88c44555d2', 'title' => 'Helsinki server #1'], - ['uuid' => '00c8f13a-945a-48b8-bf5c-db2d7a3a37fe', 'title' => 'Helsinki server #2'], - ] - ] - ], - [ - 'name' => 'Test private net', - 'type' => 'private', - 'uuid' => '034c12bc-cf15-4b19-97b2-0ab4e51bb98d', - 'zone' => 'uk-lon1', - 'router' => '04c0df35-2658-4b0c-8ac7-962090f4e92a', - 'ip_networks' => [ - 'ip_network' => [ - [ - 'address' => '172.16.0.0/22', - 'dhcp' => 'yes', - 'dhcp_default_route' => 'no', - 'dhcp_dns' => [ - '172.16.0.10', - '172.16.1.10' - ], - 'family' => 'IPv4', - 'gateway' => '172.16.0.1' - ] - ] - ] - ] - ] - ] - ]; - } - - public function getServerList() - { - return [ - 'networking' => [ - 'interfaces' => [ - 'interface' => [ - [ - 'index' => 2, - 'ip_addresses' => [ - 'ip_address' => [ - [ - 'address' => '94.237.0.207', - 'family' => 'IPv4' - ] - ] - ], - 'mac' => 'de:ff:ff:ff:66:89', - 'network' => '037fcf2a-6745-45dd-867e-f9479ea8c044', - 'source_ip_filtering' => 'yes', - 'type' => 'public', - 'bootable' => 'no' - ], - [ - 'index' => 3, - 'ip_addresses' => [ - 'ip_address' => [ - [ - 'address' => '10.199.3.15', - 'family' => 'IPv4' - ] - ] - ], - 'mac' => 'de:ff:ff:ff:ed:85', - 'network' => '03c93fd8-cc60-4849-91b8-6e404b228e2a', - 'source_ip_filtering' => 'yes', - 'type' => 'utility', - 'bootable' => 'no' - ], - [ - 'index' => 4, - 'ip_addresses' => [ - 'ip_address' => [ - [ - 'address' => '10.0.0.20', - 'family' => 'IPv4' - ] - ] - ], - 'mac' => 'de:ff:ff:ff:cc:20', - 'network' => '0374ce47-4303-4490-987d-32dc96cfd79b', - 'source_ip_filtering' => 'yes', - 'type' => 'private', - 'bootable' => 'no' - ] - ] - ] - ] - ]; - } - - public function getRouterList() - { - return [ - 'routers' => [ - 'router' => [ - [ - 'attached_networks' => [ - 'network' => [ - '03000000-0000-4000-8001-000000000000', - '034c12bc-cf15-4b19-97b2-0ab4e51bb98d' - ] - ], - 'name' => 'Example router', - 'type' => 'normal', - 'uuid' => '04c0df35-2658-4b0c-8ac7-962090f4e92a' - ] - ] - ] - ]; - } -} diff --git a/test/Api/Fixtures/ObjectStorageApiFixture.php b/test/Api/Fixtures/ObjectStorageApiFixture.php deleted file mode 100644 index dca81f1c..00000000 --- a/test/Api/Fixtures/ObjectStorageApiFixture.php +++ /dev/null @@ -1,126 +0,0 @@ -getList(), JSON_PRETTY_PRINT); - } - - /** - * @param int $index - * @return string - */ - public function getResponseBodyByIndex(int $index = 0): string - { - return json_encode( - [ - 'object_storage' => $this->getByIndex($index) - ], - JSON_PRETTY_PRINT - ); - } - - /** - * @return ObjectStorageListResponse - */ - public function getResponse() - { - return $this->serializer->deserialize( - $this->getResponseBody(), - ObjectStorageListResponse::class - ); - } - - /** - * @param int $index - * @return ObjectStorageResponse - */ - public function getResponseByIndex(int $index = 0) - { - return $this->serializer->deserialize( - $this->getResponseBodyByIndex($index), - ObjectStorageResponse::class - ); - } - - /** - * @param int $index - * @return CreateObjectStorageRequest - */ - public function getCreateRequest($index = 0): CreateObjectStorageRequest - { - return new CreateObjectStorageRequest([ - 'object_storage' => $this->getByIndex($index), - ]); - } - /** - * @param int $index - * @return ModifyObjectStorageRequest - */ - public function getModifyRequest($index = 0): ModifyObjectStorageRequest - { - return new ModifyObjectStorageRequest([ - 'object_storage' => $this->getByIndex($index), - ]); - } - - /** - * @param int $index - * @return string[]|null - */ - public function getByIndex(int $index) - { - return $this->getList()['object_storages']['object_storage'][$index] ?? null; - } - - - public function getList() - { - return [ - 'object_storages' => [ - 'object_storage' => [ - [ - 'created' => '2020-07-23T05=>06=>35Z', - 'description' => 'Example object storage', - 'name' => 'example-object-storage', - 'size' => 250, - 'used_space' => 0, - 'state' => 'started', - 'url' => 'https=>//example-object-storage.nl-ams1.upcloudobjects.com/', - 'uuid' => '06832a75-be7b-4d23-be05-130dc3dfd9e7', - 'access_key'=> 'UCOBTMRABUTKMC2WF6BD', - 'secret_key'=> 'NCAtWEblflr7HhimErIgRVNo48+x546VLm0azVcO', - 'zone' => 'uk-lon1' - ], - [ - 'created' => '2020-07-23T05=>06=>35Z', - 'description' => 'App object storage', - 'name' => 'app-object-storage', - 'size' => 500, - 'used_space' => 0, - 'state' => 'started', - 'url' => 'https=>//app-data-storage.nl-ams1.upcloudobjects.com/', - 'uuid' => '06636a75-ae9b-4d23-be06-260dc3ded8e0', - 'access_key'=> 'UCOBTMRABUTKMC2WF6BD', - 'secret_key'=> 'NCAtWEblflr7HhimErIgRVNo48+x546VLm0azVcO', - 'zone' => 'nl-ams1' - ] - ] - ] - ]; - } -} diff --git a/test/Api/Fixtures/PlanApiFixture.php b/test/Api/Fixtures/PlanApiFixture.php deleted file mode 100644 index 50cf1b25..00000000 --- a/test/Api/Fixtures/PlanApiFixture.php +++ /dev/null @@ -1,55 +0,0 @@ -getList(), JSON_PRETTY_PRINT); - } - - /** - * @return AvailablePlanListResponse|mixed - */ - public function getResponse() - { - return $this->serializer->deserialize( - $this->getResponseBody(), - AvailablePlanListResponse::class - ); - } - - public function getList() - { - return [ - 'plans' => [ - 'plan' => [ - [ - 'core_number' => 1, - 'memory_amount' => 2048, - 'name' => '1xCPU-2GB', - 'public_traffic_out' => 2048, - 'storage_size' => 50, - 'storage_tier' => 'maxiops', - ], - [ - 'core_number' => 2, - 'memory_amount' => 4096, - 'name' => '2xCPU-4GB', - 'public_traffic_out' => 4096, - 'storage_size' => 80, - 'storage_tier' => 'maxiops', - ] - ] - ] - ]; - } -} diff --git a/test/Api/Fixtures/PricesApiFixture.php b/test/Api/Fixtures/PricesApiFixture.php deleted file mode 100644 index b73ee0b7..00000000 --- a/test/Api/Fixtures/PricesApiFixture.php +++ /dev/null @@ -1,110 +0,0 @@ -getList(), JSON_PRETTY_PRINT); - } - - /** - * @return PriceListResponse|mixed - */ - public function getResponse() - { - return $this->serializer->deserialize( - $this->getResponseBody(), - PriceListResponse::class - ); - } - - public function getList() - { - return [ - 'prices' => [ - 'zone' => [ - [ - 'name' => 'fi-hel1', - 'firewall' => [ - 'amount' => 1, - 'price' => 0.5, - ], - 'io_request_backup' => [ - 'amount' => 1000000, - 'price' => 10, - ], - 'io_request_hdd' => [ - 'amount' => 1000000, - 'price' => 0, - ], - 'io_request_maxiops' => [ - 'amount' => 1000000, - 'price' => 0, - ], - 'ipv4_address' => [ - 'amount' => 1, - 'price' => 0.3, - ], - 'ipv6_address' => [ - 'amount' => 1, - 'price' => 0, - ], - 'public_ipv4_bandwidth_in' => [ - 'amount' => 1, - 'price' => 0, - ], - 'public_ipv4_bandwidth_out' => [ - 'amount' => 1, - 'price' => 5, - ], - 'public_ipv6_bandwidth_in' => [ - 'amount' => 1, - 'price' => 0, - ], - 'public_ipv6_bandwidth_out' => [ - 'amount' => 1, - 'price' => 5, - ], - 'server_core' => [ - 'amount' => 1, - 'price' => 1.3, - ], - 'server_memory' => [ - 'amount' => 256, - 'price' => 0.45, - ], - 'storage_backup' => [ - 'amount' => 1, - 'price' => 0.007, - ], - 'storage_hdd' => [ - 'amount' => 1, - 'price' => 0.013, - ], - 'storage_maxiops' => [ - 'amount' => 1, - 'price' => 0.028, - ], - 'server_plan_1xCPU-2GB' => [ - 'amount' => 1, - 'price' => 2.2321, - ], - 'server_plan_2xCPU-4GB' => [ - 'amount' => 1, - 'price' => 4.4642, - ] - ] - ] - ] - ]; - } -} diff --git a/test/Api/Fixtures/ServerApiFixture.php b/test/Api/Fixtures/ServerApiFixture.php deleted file mode 100644 index 2fa782a7..00000000 --- a/test/Api/Fixtures/ServerApiFixture.php +++ /dev/null @@ -1,347 +0,0 @@ -getList(), JSON_PRETTY_PRINT); - } - - /** - * @return string - */ - public function getResponseConfigBody(): string - { - return json_encode($this->getConfigurationsList(), JSON_PRETTY_PRINT); - } - - /** - * @param int $index - * @return string - */ - public function getResponseBodyByIndex(int $index = 0): string - { - return json_encode( - [ - 'server' => $this->getByIndex($index) - ], - JSON_PRETTY_PRINT - ); - } - - /** - * @return ServerListResponse - */ - public function getResponse(): ServerListResponse - { - /** - * @var ServerListResponse $request - */ - $request = $this->serializer->deserialize( - $this->getResponseBody(), - ServerListResponse::class - ); - return $request; - } - - /** - * @return ConfigurationListResponse - */ - public function getResponseConfig(): ConfigurationListResponse - { - /** - * @var ConfigurationListResponse $request - */ - $request = $this->serializer->deserialize( - $this->getResponseConfigBody(), - ConfigurationListResponse::class - ); - return $request; - } - - /** - * @param int $index - * @return CreateServerRequest - - */ - public function getCreateRequest($index = 0): CreateServerRequest - { - /** - * @var CreateServerRequest $request - */ - $request = $this->serializer->deserialize( - $this->getResponseBodyByIndex($index), - CreateServerRequest::class - ); - return $request; - } - - /** - * @param int $index - * @return ModifyServerRequest - - */ - public function getModifyRequest($index = 2): ModifyServerRequest - { - /** - * @var ModifyServerRequest $request - */ - $request = $this->serializer->deserialize( - $this->getResponseBodyByIndex($index), - ModifyServerRequest::class - ); - return $request; - } - - /** - * @return StopServer - */ - public function getStopRequest(): StopServer - { - /** - * @var StopServer $request - */ - $request = $this->serializer->deserialize( - '{"stop_server": {"stop_type": "soft","timeout": "600"}}', - StopServer::class - ); - return $request; - } - /** - * @return RestartServer - */ - public function getRestartRequest(): RestartServer - { - /** - * @var RestartServer $request - */ - $request = $this->serializer->deserialize( - '{"restart_server": {"stop_type": "soft","timeout": "60", "timeout_action": "destroy"}}', - RestartServer::class - ); - return $request; - } - - /** - * @param int $index - * @return string[]|null - */ - public function getByIndex(int $index): ?array - { - return $this->getList()['servers']['server'][$index] ?? null; - } - - public function getList(): array - { - return [ - 'servers' => [ - 'server' => [ - [ - 'boot_order' => 'disk', - 'core_number' => 0, - 'firewall' => 'on', - 'host' => 7653311107, - 'hostname' => 'server1.example.com', - 'ip_addresses' => [ - 'ip_address' => [ - [ - 'access' => 'utility', - 'address' => '10.0.0.00', - 'family' => 'IPv4' - ], - [ - 'access' => 'public', - 'address' => '0.0.0.0', - 'family' => 'IPv4' - ], - [ - 'access' => 'public', - 'address' => 'xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx', - 'family' => 'IPv6' - ] - ] - ], - 'license' => 0, - 'memory_amount' => '2048', - 'nic_model' => 'virtio', - 'plan' => '1xCPU-2GB', - 'plan_ivp4_bytes' => '34253332', - 'plan_ipv6_bytes' => '0', - 'state' => 'started', - 'storage_devices' => [ - 'storage_device' => [ - [ - 'address' => 'virtio:0', - 'part_of_plan' => 'yes', - 'storage' => '01eff7ad-168e-413e-83b0-054f6a28fa23', - 'storage_size' => 20, - 'storage_title' => 'Storage for server1.example.com', - 'type' => 'disk', - 'boot_disk' => '0' - ] - ] - ], - 'tags' => [ - 'tag' => [ - 'PROD', - 'CentOS', - 'TEST' - ] - ], - 'firewall_rules' => [ - 'firewall_rule' => [ - [ - 'action' => 'accept', - 'comment' => 'Allow HTTP from anywhere', - 'destination_address_end' => '', - 'destination_address_start' => '', - 'destination_port_end' => '80', - 'destination_port_start' => '80', - 'direction' => 'in', - 'family' => 'IPv4', - 'icmp_type' => '', - 'position' => '1', - 'protocol' => 'tcp', - 'source_port_end' => '80', - 'source_port_start' => '80', - ] - ]], - 'timezone' => 'UTC', - 'title' => 'Test Helsinki server', - 'uuid' => '00f25527-c3d9-470b-a2a1-d3670e0c3cdf', - 'video_model' => 'cirrus', - 'remote_access_enabled' => 'yes', - 'remote_access_type' => 'vnc', - 'remote_access_host' => 'fi-hel1.vnc.upcloud.com', - 'remote_access_password' => 'aabbccdd', - 'remote_access_port' => '3000', - 'zone' => 'fi-hel1', - - ], - [ - 'core_number' => '1', - 'hostname' => 'uk.example.com', - 'license' => 0, - 'memory_amount' => '512', - 'plan' => 'custom', - 'state' => 'stopped', - 'storage_devices' => [ - 'storage_device' => [ - [ - 'action' => 'create', - 'size' => '20', - 'tier' => 'maxiops', - 'title' => 'Debian from scratch' - ], - [ - 'action' => 'attach', - 'storage' => '01000000-0000-4000-8000-000020010301', - 'type' => 'cdrom' - ] - ] - ], - 'tags' => [ - 'tag' => [ - 'DEV', - 'Ubuntu' - ] - ], - 'title' => 'Test London server', - 'uuid' => '009d64ef-31d1-4684-a26b-c86c955cbf46', - 'zone' => 'uk-lon1', - "login_user" => [ - "username" => "upclouduser", - "ssh_keys" => [ - "ssh_key" => [ - "ssh-rsa AAAAB3NzaC1yc2EAA[...]ptshi44x user@some.host", - "ssh-dss AAAAB3NzaC1kc3MAA[...]VHRzAA== someuser@some.other.host" - ] - ] - ], - 'ip_addresses' => [ - 'ip_address' => [ - [ - 'access' => 'utility', - 'address' => '10.0.0.00', - 'family' => 'IPv4' - ], - [ - 'access' => 'public', - 'address' => '0.0.0.0', - 'family' => 'IPv4' - ], - [ - 'access' => 'public', - 'address' => 'xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx', - 'family' => 'IPv6' - ] - ] - ], - "networking" => [ - "interfaces" => [ - "interface" => [ - [ - "ip_addresses" => ["ip_address" => [["family" => "IPv4"]]], - "type" => "public" - ], - [ - "ip_addresses" => ["ip_address" => [["family" => "IPv4"]]], - "type" => "utility" - ], - [ - "ip_addresses" => ["ip_address" => [["family" => "IPv6"]]], - "type" => "public" - ] - ] - ] - ] - ], - [ - 'title' => 'Test Modify server', - ] - ] - ] - ]; - } - - public function getConfigurationsList() - { - return [ - 'server_sizes' => [ - 'server_size' => [ - [ - 'core_number' => '1', - 'memory_amount' => '512', - ], - [ - 'core_number' => '1', - 'memory_amount' => '768', - ], - [ - 'core_number' => '10', - 'memory_amount' => '65024', - ], - [ - 'core_number' => '10', - 'memory_amount' => '65536', - ] - ] - ] - ]; - } - -} diff --git a/test/Api/Fixtures/StorageApiFixture.php b/test/Api/Fixtures/StorageApiFixture.php deleted file mode 100644 index 5ea803cd..00000000 --- a/test/Api/Fixtures/StorageApiFixture.php +++ /dev/null @@ -1,318 +0,0 @@ -getList(), JSON_PRETTY_PRINT); - } - - /** - * @return string - */ - public function getServerResponseBody(): string - { - return json_encode($this->getServerData(), JSON_PRETTY_PRINT); - } - - /** - * @param int $fromListIndex - * @return string - */ - public function getResponseBodyByIndex(int $fromListIndex = 0): string - { - return json_encode( - [ - 'storage' => $this->getByIndex($fromListIndex) - ], - JSON_PRETTY_PRINT - ); - } - - /** - * @return SuccessStoragesResponse - */ - public function getResponse(): SuccessStoragesResponse - { - /** - * @var SuccessStoragesResponse $request - */ - $request = $this->serializer->deserialize( - $this->getResponseBody(), - SuccessStoragesResponse::class - ); - return $request; - } - - /** - * @param int $fromListIndex - * @return CreateStorageRequest - */ - public function getCreateRequest($fromListIndex = 0): CreateStorageRequest - { - /** - * @var CreateStorageRequest $request - */ - $request = $this->serializer->deserialize( - $this->getResponseBodyByIndex($fromListIndex), - CreateStorageRequest::class - ); - return $request; - } - - /** - * @param int $fromListIndex - * @return ModifyStorageRequest|mixed - */ - public function getModifyRequest($fromListIndex = 0): ModifyStorageRequest - { - /** - * @var ModifyStorageRequest $request - */ - $request = $this->serializer->deserialize( - $this->getResponseBodyByIndex($fromListIndex), - ModifyStorageRequest::class - ); - return $request; - } - - /** - * @param int $fromListIndex - * @return CloneStorageRequest - */ - public function getCloneRequest(int $fromListIndex = 0): CloneStorageRequest - { - /** - * @var CloneStorageRequest $request - */ - $request = $this->serializer->deserialize( - $this->getResponseBodyByIndex($fromListIndex), - CloneStorageRequest::class - ); - return $request; - } - - /** - * @param int $fromListIndex - * @return TemplitizeStorageRequest - */ - public function getTemplitizeStorageRequest(int $fromListIndex = 0): TemplitizeStorageRequest - { - /** - * @var TemplitizeStorageRequest $request - */ - $request = $this->serializer->deserialize( - $this->getResponseBodyByIndex($fromListIndex), - TemplitizeStorageRequest::class - ); - - return $request; - } - - /** - * @param int $fromListIndex - * @return CreateBackupStorageRequest - */ - public function getBackupStorageRequest(int $fromListIndex = 0): CreateBackupStorageRequest - { - /** - * @var CreateBackupStorageRequest $request - */ - $request = $this->serializer->deserialize( - $this->getResponseBodyByIndex($fromListIndex), - CreateBackupStorageRequest::class - ); - - return $request; - } - - /** - * @return AttachStorageDeviceRequest - */ - public function getAttachRequest(): AttachStorageDeviceRequest - { - $storageDevice = $this->getServerData()['server']['storage_devices']['storage_device'][0]; - return new AttachStorageDeviceRequest([ - 'storage_device' => new StorageDevice($storageDevice) - ]); - } - - /** - * @return StorageDeviceDetachRequest - */ - public function getDetachRequest(): StorageDeviceDetachRequest - { - $storageDevices = $this->getServerData()['server']['storage_devices']; - $storageDevices['storage_device'][0]['address'] = 'scsi:0:1'; - - return new StorageDeviceDetachRequest([ - 'storage_device' => new StorageDevice($storageDevices['storage_device'][0]) - ]); - } - - /** - * @return StorageDeviceLoadRequest - */ - public function getLoadCdromRequest(): StorageDeviceLoadRequest - { - return new StorageDeviceLoadRequest([ - 'storage_device' => new StorageDevice([ - 'storage' => '01eff7ad-168e-413e-83b0-054f6a28fa23', - ]) - ]); - } - - /** - * @param int $index - * @return string[]|null - */ - public function getByIndex(int $index): ?array - { - return $this->getList()['storages']['storage'][$index] ?? null; - } - - public function getList(): array - { - return [ - 'storages' => [ - 'storage' => [ - [ - 'access' => 'private', - 'backup_rule' => [ - 'interval' => 'daily', - 'hour' => '0430', - 'retention' => '365' - ], - 'backups' => [ - 'backup' => ['01d194c6-3061-40d0-a9dd-d400fc90b79a', '01000ded-b947-4a0d-a5b9-c55b7f18106c'] - ], - 'license' => 0.0, - 'servers' => [ - 'server' => ['00f25527-c3d9-470b-a2a1-d3670e0c3cdf'] - ], - 'size' => 10, - 'state' => 'online', - 'tier' => 'hdd', - 'title' => 'Operating system disk', - 'type' => 'normal', - 'uuid' => '01eff7ad-168e-413e-83b0-054f6a28fa23', - 'zone' => 'fi-hel1', - 'origin' => null, - 'created' => '2020-10-28T13:11:02+00:00', - ], - [ - 'access' => 'private', - 'backup_rule' => null, - 'backups' => null, - 'license' => 0, - 'servers' => null, - 'size' => 10, - 'state' => 'online', - 'tier' => null, - 'title' => 'On demand backup', - 'type' => 'backup', - 'uuid' => '01287ad1-496c-4b5f-bb67-0fc2e3494740', - 'zone' => 'fi-hel1', - 'origin' => '01eff7ad-168e-413e-83b0-054f6a28fa23', - 'created' => '2020-10-28T13:11:02+00:00', - ], - [ - 'access' => 'private', - 'backup_rule' => null, - 'backups' => null, - 'license' => 0, - 'servers' => null, - 'part_of_plan' => 'yes', - 'size' => 50, - 'state' => 'online', - 'tier' => 'maxiops', - 'title' => 'Databases', - 'type' => 'normal', - 'uuid' => '01f3286c-a5ea-4670-8121-d0b9767d625b', - 'zone' => 'fi-hel1', - 'origin' => null, - 'created' => null, - ], - [ - 'access' => 'private', - 'backup_rule' => null, - 'backups' => null, - 'license' => 0, - 'servers' => null, - 'part_of_plan' => 'yes', - 'size' => 50, - 'state' => 'online', - 'tier' => 'maxiops', - 'title' => 'My server template', - 'type' => 'template', - 'uuid' => '01f3286c-a5ea-4670-8121-d0b9767d625b', - 'zone' => 'fi-hel1', - 'origin' => null, - 'created' => null, - ] - ] - ] - ]; - } - - public function getServerData(): array - { - return [ - 'server' => [ - 'boot_order' => 'disk', - 'core_number' => '2', - 'firewall' => 'on', - 'hostname' => 'debian.example.com', - 'ip_addresses' => [ - 'ip_address' => [] - ], - 'license' => 0, - 'memory_amount' => '4096', - 'nic_model' => 'virtio', - 'plan' => '2xCPU-4GB', - 'plan_ipv4_bytes' => '345346754423', - 'plan_ipv6_bytes' => '676300234', - 'state' => 'started', - 'storage_devices' => [ - 'storage_device' => [ - [ - 'address' => 'scsi:0:0', - 'storage' => '01eff7ad-168e-413e-83b0-054f6a28fa23', - 'storage_size' => 10, - 'storage_title' => 'Operating system disk', - 'type' => 'disk', - 'boot_disk' => '0' - ] - ] - ], - 'tags' => [], - 'timezone' => 'UTC', - 'title' => 'My Debian server', - 'uuid' => '00c78863-db86-44ea-af70-d6edc4d162bf', - 'video_model' => 'cirrus', - 'vnc' => 'off', - 'vnc_password' => 'aabbccdd', - 'zone' => 'fi-hel1', - ] - ]; - } -} diff --git a/test/Api/Fixtures/TagApiFixture.php b/test/Api/Fixtures/TagApiFixture.php deleted file mode 100644 index 49cb4c99..00000000 --- a/test/Api/Fixtures/TagApiFixture.php +++ /dev/null @@ -1,173 +0,0 @@ -getList(), JSON_PRETTY_PRINT); - } - - - /** - * @return string - */ - public function getServerResponseBody(): string - { - return json_encode($this->getServerData(), JSON_PRETTY_PRINT); - } - - /** - * @param int $fromListIndex - * @return string - */ - public function getResponseBodyByIndex(int $fromListIndex = 0): string - { - return json_encode( - [ - 'tag' => $this->getByIndex($fromListIndex) - ], - JSON_PRETTY_PRINT - ); - } - - - public function getCreateResponse(int $fromListIndex = 0) - { - return $this->serializer->deserialize( - $this->getResponseBodyByIndex($fromListIndex), - CreateNewTagResponse::class - ); - } - - /** - * @return TagListResponse|mixed - */ - public function getResponse() - { - return $this->serializer->deserialize( - $this->getResponseBody(), - TagListResponse::class - ); - } - - /** - * @param int $fromListIndex - * @return TagCreateRequest - */ - public function getCreateRequest($fromListIndex = 0): TagCreateRequest - { - return new TagCreateRequest([ - 'tag' => $this->getItem($fromListIndex), - ]); - } - - /** - * @param int $fromListIndex - * @return ModifyTagRequest - */ - public function getModifyRequest($fromListIndex = 0): ModifyTagRequest - { - return new ModifyTagRequest([ - 'tag' => $this->getItem($fromListIndex), - ]); - } - - public function getItem($fromListIndex = 5): Tag - { - return new Tag($this->getByIndex($fromListIndex)); - } - - /** - * @param int $index - * @return string[]|null - */ - public function getByIndex(int $index): ?array - { - return $this->getList()['tags']['tag'][$index] ?? null; - } - - public function getList(): array - { - return [ - "tags" => [ - "tag" => [ - [ - "description" => "Development servers", - "name" => "TEST", - "servers" => [ - "server" => [ - 0 => "0077fa3d-32db-4b09-9f5f-30d9e9afb565" - ] - ] - ], - [ - "description" => "My own servers", - "name" => "DEV", - "servers" => [ - "server" => [] - ] - ], - [ - "description" => "Production servers", - "name" => "PROD", - "servers" => [ - "server" => [] - ] - ] - ] - ] - ]; - } - - - public function getServerData(): array - { - return [ - 'server' => [ - 'boot_order' => 'disk', - 'core_number' => '2', - 'firewall' => 'on', - 'hostname' => 'debian.example.com', - 'ip_addresses' => [ - 'ip_address' => [] - ], - 'license' => 0, - 'memory_amount' => '4096', - 'nic_model' => 'virtio', - 'plan' => '2xCPU-4GB', - 'plan_ipv4_bytes' => '345346754423', - 'plan_ipv6_bytes' => '676300234', - 'state' => 'started', - 'storage_devices' => [ - 'storage_device' => [] - ], - 'tags' => [ - 'tag' => [ - 'TEST' - ] - ], - 'timezone' => 'UTC', - 'title' => 'My Debian server', - 'uuid' => '00c78863-db86-44ea-af70-d6edc4d162bf', - 'video_model' => 'cirrus', - 'vnc' => 'off', - 'vnc_password' => 'aabbccdd', - 'zone' => 'fi-hel1', - ] - ]; - } -} diff --git a/test/Api/Fixtures/TimezoneApiFixture.php b/test/Api/Fixtures/TimezoneApiFixture.php deleted file mode 100644 index 7461d0c1..00000000 --- a/test/Api/Fixtures/TimezoneApiFixture.php +++ /dev/null @@ -1,46 +0,0 @@ -getList(), JSON_PRETTY_PRINT); - } - - /** - * @return TimezoneListResponse|mixed - */ - public function getResponse() - { - return $this->serializer->deserialize( - $this->getResponseBody(), - TimezoneListResponse::class - ); - } - - public function getList() - { - return [ - "timezones" => [ - "timezone" => [ - "Africa/Abidjan", - "Africa/Accra", - "Africa/Addis_Ababa", - "Pacific/Truk", - "Pacific/Wake", - "Pacific/Wallis", - "UTC", - ] - ] - ]; - } -} diff --git a/test/Api/Fixtures/ZoneApiFixture.php b/test/Api/Fixtures/ZoneApiFixture.php deleted file mode 100644 index 9cf65cdf..00000000 --- a/test/Api/Fixtures/ZoneApiFixture.php +++ /dev/null @@ -1,79 +0,0 @@ -getList(), JSON_PRETTY_PRINT); - } - - /** - * @return ZoneListResponse|mixed - */ - public function getResponse() - { - return $this->serializer->deserialize( - $this->getResponseBody(), - ZoneListResponse::class - ); - } - - public function getList() - { - return [ - 'zones' => [ - 'zone' => [ - [ - 'description' => 'Frankfurt #1', - 'id' => 'de-fra1', - 'public' => 'yes', - ], - [ - 'description' => 'Helsinki #1', - 'id' => 'fi-hel1', - 'public' => 'yes', - ], - [ - 'description' => 'Helsinki #2', - 'id' => 'fi-hel2', - 'public' => 'yes', - ], - [ - 'description' => 'Amsterdam #1', - 'id' => 'nl-ams1', - 'public' => 'yes', - ], - [ - 'description' => 'Singapore #1', - 'id' => 'sg-sin1', - 'public' => 'yes', - ], - [ - 'description' => 'London #1', - 'id' => 'uk-lon1', - 'public' => 'yes', - ], - [ - 'description' => 'Chicago #1', - 'id' => 'us-chi1', - 'public' => 'yes', - ], - [ - 'description' => 'San Jose #1', - 'id' => 'us-sjo1', - 'public' => 'yes', - ] - ] - ] - ]; - } -} diff --git a/test/Api/Hosts/HostsApiTest.php b/test/Api/Hosts/HostsApiTest.php deleted file mode 100644 index 59ca1c85..00000000 --- a/test/Api/Hosts/HostsApiTest.php +++ /dev/null @@ -1,241 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new HostsApi($this->mock); - $this->fixture = new HostsApiFixture; - } - - public function testGetListHosts() - { - - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('host', (string) $request->getUri()); - return true; - }) - ->andReturn($response); - - $response = $this->api->getListHosts(); - - $list = $response->getHosts()->getHost(); - $this->assertCount(2, $list); - - $fixtureList = $this->fixture->getResponse()->getHosts()->getHost(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(Host::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testGetListHostsAsync() - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('host', (string) $request->getUri()); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->getListHostsAsync(); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(HostListResponse::class, $result = $promise->wait()); - $list = $result->getHosts()->getHost(); - $this->assertCount(2, $list); - $fixtureList = $this->fixture->getResponse()->getHosts()->getHost(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(Host::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testGetHostDetails(): void - { - $fakeResponse = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getResponseBodyByIndex() - ); - - $fixtureItem = $this->fixture->getResponseByIndex(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) use ($fixtureItem) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('host/' . $fixtureItem->getHost()->getId(), (string) $request->getUri()); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->getHostDetails($fixtureItem->getHost()->getId()); - - $this->assertInstanceOf(HostResponse::class, $response); - - $this->assertEquals($response, $fixtureItem); - } - - public function testGetHostDetailsAsync(): void - { - $response = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getResponseBodyByIndex() - ); - - $fixtureItem = $this->fixture->getResponseByIndex(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) use ($fixtureItem) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('host/' . $fixtureItem->getHost()->getId(), (string) $request->getUri()); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->getHostDetailsAsync($fixtureItem->getHost()->getId()); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(HostResponse::class, $result = $promise->wait()); - - $this->assertEquals($result, $fixtureItem); - } - - public function testModifyHost(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getModifyRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('PATCH', $request->getMethod()); - $this->assertEquals('host/' . $fakeRequest->getHost()->getId(), (string) $request->getUri()); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->modifyHost($fakeRequest->getHost()->getId(), $fakeRequest); - - $this->assertEquals($response->getHost(), $fakeRequest->getHost()); - } - - public function testThrowsExceptionOnModifyHost(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getModifyRequest(); - $request = new Request( - 'PATCH', - $this->url . 'host/'. $fakeRequest->getHost()->getId(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->modifyHost($fakeRequest->getHost()->getId(), $fakeRequest); - } - - public function testModifyHostAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getModifyRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('PATCH', $request->getMethod()); - $this->assertEquals('host/' . $fakeRequest->getHost()->getId(), (string) $request->getUri()); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->modifyHostAsync($fakeRequest->getHost()->getId(), $fakeRequest); - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(HostResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getHost(), $fakeRequest->getHost()); - } - - public function testThrowsExceptionOnModifyHostAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getModifyRequest(); - $request = new Request( - 'PATCH', - $this->url . 'host/'. $fakeRequest->getHost()->getId(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->modifyHostAsync($fakeRequest->getHost()->getId(), $fakeRequest)->wait(); - } -} diff --git a/test/Api/HttpClient/HttpClientTest.php b/test/Api/HttpClient/HttpClientTest.php deleted file mode 100644 index d99e5244..00000000 --- a/test/Api/HttpClient/HttpClientTest.php +++ /dev/null @@ -1,142 +0,0 @@ -isNoCredentials) { - $this->mock = Mockery::mock(Client::class); - $this->client = new UpcloudHttpClient($this->mock); - } else { - $this->client = new UpcloudHttpClient(); - $this->client->getConfig()->setUsername($this->getUsername()); - $this->client->getConfig()->setPassword($this->getPassword()); - } - } - - public function testCanSendNormalRequest(): void - { - $request = new Request('GET', $this->url . '/account'); - - if ($this->isNoCredentials) { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fakeRawBody); - - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($response); - } - - - $response = $this->client->send($request); - $this->assertInstanceOf(UpcloudApiResponse::class, $response); - $this->assertEquals(200, $response->getStatusCode()); - - - $this->assertIsArray( - $responseArray = $response->setSerializer(new Serializer())->toArray(AccountResponse::class) - ); - $this->assertInstanceOf(AccountResponse::class, $accountResponse = $responseArray[0]); - $this->assertInstanceOf(Account::class, $account = $accountResponse->getAccount()); - $this->assertEquals($this->getUsername(), $account->getUsername()); - } - - public function testThrowsExceptionOnClientError(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(401); - - $request = new Request('GET', $this->url . '/account'); - - $this->client->getConfig()->setUsername($this->generateRandomString()); - $this->client->getConfig()->setPassword($this->generateRandomString()); - - if ($this->isNoCredentials) { - $response = new Response(401, $this->fakeResponseHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - } - - $this->client->send($request); - } - - public function testCanSendAsyncRequest(): void - { - $request = new Request('GET', $this->url . '/account'); - $response = new Response(200, $this->fakeHeadersAsArray, $this->fakeRawBody); - - if ($this->isNoCredentials) { - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - } - - $promise = $this->client->sendAsync($request); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(UpcloudApiResponse::class, $result = $promise->wait()); - $this->assertIsArray( - $responseArray = $result->setSerializer(new Serializer())->toArray(AccountResponse::class) - ); - $this->assertInstanceOf(AccountResponse::class, $accountResponse = $responseArray[0]); - $this->assertInstanceOf(Account::class, $account = $accountResponse->getAccount()); - $this->assertEquals($this->getUsername(), $account->getUsername()); - } - - public function testThrowsExceptionOnSendAsyncRequest(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(401); - - $this->client->getConfig()->setUsername($this->generateRandomString()); - $this->client->getConfig()->setPassword($this->generateRandomString()); - - $request = new Request('GET', $this->url . '/account'); - - - if ($this->isNoCredentials) { - $response = new Response(401, $this->fakeHeadersAsArray, $this->fakeRawBody); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - } - - $this->client->sendAsync($request)->wait(); - } -} diff --git a/test/Api/IPAddressApi/IPAddressApiAsyncTest.php b/test/Api/IPAddressApi/IPAddressApiAsyncTest.php deleted file mode 100644 index 03130591..00000000 --- a/test/Api/IPAddressApi/IPAddressApiAsyncTest.php +++ /dev/null @@ -1,200 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new IPAddressApi($this->mock); - $this->fixture = new IPAddressApiFixture; - } - - public function testListIpsAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->listIpsAsync(); - - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(IpAddressListResponse::class, $result = $promise->wait()); - - $list = $result->getIpAddresses()->getIpAddress(); - $this->assertCount(5, $list); - - $fixtureList = $this->fixture->getResponse()->getIpAddresses()->getIpAddress(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(IpAddress::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testGetIpDetailsAsync() - { - $response = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getResponseBodyByIndex() - ); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->getDetailsAsync($this->fixture->ip); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(AssignIpResponse::class, $result = $promise->wait()); - - $fixtureItem = $this->fixture->getResponseByIndex(); - - $this->assertEquals($result, $fixtureItem); - } - - public function testAssignIpAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getRequestSuccess(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->addIpAsync($fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(AssignIpResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getIpAddress(), $fakeRequest->getIpAddress()); - } - - - public function testThrowsExceptionOnAssignIpAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'ip_address', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getRequestFailed(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->addIpAsync($fakeRequest)->wait(); - } - - public function testModifyIpAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getModifyRequestSuccess(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->modifyIpAsync($this->fixture->ip, $fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(AssignIpResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getIpAddress(), $fakeRequest->getIpAddress()); - } - - public function testThrowsExceptionOnModifyIpAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'PATCH', - $this->url . 'ip_address', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getModifyRequestFailed(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->modifyIpAsync($this->fixture->ip, $fakeRequest)->wait(); - } - - public function testThrowsExceptionOnDeleteIpAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'DELETE', - $this->url . 'ip_address/'. $this->fixture->ip, - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->deleteIpAsync($this->fixture->ip)->wait(); - } -} diff --git a/test/Api/IPAddressApi/IPAddressApiTest.php b/test/Api/IPAddressApi/IPAddressApiTest.php deleted file mode 100644 index eed6ab4e..00000000 --- a/test/Api/IPAddressApi/IPAddressApiTest.php +++ /dev/null @@ -1,187 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new IPAddressApi($this->mock); - $this->fixture = new IPAddressApiFixture; - } - - public function testListIps(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->listIps(); - - $list = $response->getIpAddresses()->getIpAddress(); - $this->assertCount(5, $list); - - $fixtureList = $this->fixture->getResponse()->getIpAddresses()->getIpAddress(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(IpAddress::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testGetIpDetails(): void - { - $fakeResponse = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getResponseBodyByIndex() - ); - - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->getDetails($this->fixture->ip); - - $this->assertInstanceOf(AssignIpResponse::class, $response); - - $fixtureItem = $this->fixture->getResponseByIndex(); - - $this->assertEquals($response, $fixtureItem); - } - - public function testAssignIp(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getRequestSuccess(); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->addIp($fakeRequest); - - $this->assertEquals($response->getIpAddress(), $fakeRequest->getIpAddress()); - } - - - public function testThrowsExceptionOnAssignIp(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'ip_address', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getRequestFailed(); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->addIp($fakeRequest); - } - - public function testModifyIp(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getModifyRequestSuccess(); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->modifyIp($this->fixture->ip, $fakeRequest); - - $this->assertEquals($response->getIpAddress(), $fakeRequest->getIpAddress()); - } - - public function testThrowsExceptionOnModifyIp(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'PATCH', - $this->url . 'ip_address', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getModifyRequestFailed(); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->modifyIp($this->fixture->ip, $fakeRequest); - } - - public function testThrowsExceptionOnDeleteIp(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'DELETE', - $this->url . 'ip_address/'. $this->fixture->ip, - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->deleteIp($this->fixture->ip); - } -} diff --git a/test/Api/NetworkApi/NetworkApiAsyncTest.php b/test/Api/NetworkApi/NetworkApiAsyncTest.php deleted file mode 100644 index 08993626..00000000 --- a/test/Api/NetworkApi/NetworkApiAsyncTest.php +++ /dev/null @@ -1,620 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new NetworkApi($this->mock); - $this->fixture = new NetworkApiFixture; - } - - public function testGetListNetworksAsync() - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('network', (string)$request->getUri()); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->getListNetworksAsync(); - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(NetworksListResponse::class, $result = $promise->wait()); - - $list = $result->getNetworks()->getNetwork(); - - $fixtureList = $this->fixture->getResponse()->getNetworks()->getNetwork(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(Network::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testGetListNetworksWithZone() - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('network/?zone=fi-hel1', (string)$request->getUri()); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->getListNetworksAsync('fi-hel1'); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(NetworksListResponse::class, $result = $promise->wait()); - - $list = $result->getNetworks()->getNetwork(); - - $fixtureList = $this->fixture->getResponse()->getNetworks()->getNetwork(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(Network::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testGetNetworkDetails(): void - { - $response = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getResponseBodyByIndex() - ); - - $fixtureItem = $this->fixture->getResponseByIndex(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) use ($fixtureItem) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('network/' . $fixtureItem->getNetwork()->getUuid(), (string) $request->getUri()); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->getNetworkDetailsAsync($fixtureItem->getNetwork()->getUuid()); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(NetworkResponse::class, $result = $promise->wait()); - - $this->assertEquals($result, $fixtureItem); - } - - public function testCreateNetworkAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getCreateRequest(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals('network', (string) $request->getUri()); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->createNetworkAsync($fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(NetworkResponse::class, $result = $promise->wait()); - $this->assertEquals($result, $this->fixture->getResponseByIndex()); - } - - public function testThrowsExceptionOnCreateNetworkAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'network', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals('network', (string) $request->getUri()); - return true; - }) - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->createNetworkAsync($fakeRequest)->wait(); - } - - public function testModifyNetworkAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getModifyRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - - $this->assertEquals('PUT', $request->getMethod()); - $this->assertEquals( - 'network/' . $fakeRequest->getNetwork()->getUuid(), - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->modifyNetworkAsync($fakeRequest->getNetwork()->getUuid(), $fakeRequest); - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(NetworkResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getNetwork(), $fakeRequest->getNetwork()); - } - - public function testThrowsExceptionOnModifyNetworkAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getModifyRequest(); - $request = new Request( - 'PUT', - $this->url . 'network/'. $fakeRequest->getNetwork()->getUuid(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->modifyNetworkAsync($fakeRequest->getNetwork()->getUuid(), $fakeRequest)->wait(); - } - - public function testThrowsExceptionOnDeleteNetworkAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getModifyRequest(); - $request = new Request( - 'DELETE', - $this->url . 'network/'. $fakeRequest->getNetwork()->getUuid(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('DELETE', $request->getMethod()); - $this->assertEquals( - 'network/' . $fakeRequest->getNetwork()->getUuid(), - (string) $request->getUri() - ); - return true; - }) - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->deleteNetworkAsync($fakeRequest->getNetwork()->getUuid())->wait(); - } - - public function testGetListServerNetworksAsync() - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getServerResponseBody()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/networking', - (string)$request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->getListServerNetworksAsync($this->serverId); - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(ServerNetworksListResponse::class, $result = $promise->wait()); - - $list = $result->getNetworking()->getInterfaces()->getInterface(); - - $fixtureList = $this->fixture->getServerResponse()->getNetworking()->getInterfaces()->getInterface(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(NetworkInterface::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testCreateNetworkInterfaceAsync(): void - { - $response = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getNetworkInterfaceResponseBodyByIndex() - ); - - $fakeRequest = $this->fixture->getCreateNetworkInterfaceRequest(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/networking/interface', - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->createNetworkInterfaceAsync($this->serverId, $fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(NetworkInterfaceResponse::class, $result = $promise->wait()); - $this->assertEquals($result, $this->fixture->getNetworkInterfaceResponseByIndex()); - } - - public function testThrowsExceptionOnCreateNetworkInterfaceAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId.'/networking/interface', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getCreateNetworkInterfaceRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/networking/interface', - (string) $request->getUri() - ); - return true; - }) - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->createNetworkInterfaceAsync($this->serverId, $fakeRequest)->wait(); - } - - public function testModifyNetworkInterfaceAsync(): void - { - $response = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getNetworkInterfaceResponseBodyByIndex() - ); - - $fakeRequest = $this->fixture->getModifyNetworkInterfaceRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - - $this->assertEquals('PUT', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/networking/interface/' . $fakeRequest->getInterface()->getIndex(), - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->modifyNetworkInterfaceAsync( - $this->serverId, - $fakeRequest->getInterface()->getIndex(), - $fakeRequest - ); - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(NetworkInterfaceResponse::class, $result = $promise->wait()); - $this->assertEquals($result, $this->fixture->getNetworkInterfaceResponseByIndex()); - } - - public function testThrowsExceptionOnModifyNetworkInterfaceAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getModifyNetworkInterfaceRequest(); - $request = new Request( - 'PUT', - 'server/'.$this->serverId.'/networking/interface/' . $fakeRequest->getInterface()->getIndex(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->modifyNetworkInterfaceAsync( - $this->serverId, - $fakeRequest->getInterface()->getIndex(), - $fakeRequest - )->wait(); - } - - public function testThrowsExceptionOnDeleteNetworkInterfaceAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getModifyNetworkInterfaceRequest(); - - $index = $fakeRequest->getInterface()->getIndex(); - $request = new Request( - 'DELETE', - 'server/'.$this->serverId.'/networking/interface/'. $index, - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) use ($index) { - $this->assertEquals('DELETE', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/networking/interface/'. $index, - (string) $request->getUri() - ); - return true; - }) - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->deleteNetworkInterfaceAsync($this->serverId, $index)->wait(); - } - - public function testGetListRoutersAsync() - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getRouterResponseBody()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('router', (string)$request->getUri()); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->getListRoutersAsync(); - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(RoutersListResponse::class, $result = $promise->wait()); - - $list = $result->getRouters()->getRouter(); - - $fixtureList = $this->fixture->getRouterResponse()->getRouters()->getRouter(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(Router::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testGetRouterDetails(): void - { - $response = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getRouterResponseBodyByIndex() - ); - - $fixtureItem = $this->fixture->getRouterResponseByIndex(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) use ($fixtureItem) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('router/' . $fixtureItem->getRouter()->getUuid(), (string) $request->getUri()); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->getRouterDetailsAsync($fixtureItem->getRouter()->getUuid()); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(RouterResponse::class, $result = $promise->wait()); - - $this->assertEquals($result, $fixtureItem); - } - - public function testCreateRouterAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getRouterResponseBodyByIndex()); - $fakeRequest = $this->fixture->getRouterRequest(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals('router', (string) $request->getUri()); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->createRouterAsync($fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(RouterResponse::class, $result = $promise->wait()); - $this->assertEquals($result, $this->fixture->getRouterResponseByIndex()); - } - - public function testThrowsExceptionOnCreateRouterAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'router', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray, $this->fixture->getRouterResponseBodyByIndex()); - - $fakeRequest = $this->fixture->getRouterRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals('router', (string) $request->getUri()); - return true; - }) - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->createRouterAsync($fakeRequest)->wait(); - } - - public function testModifyRouterAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getRouterResponseBodyByIndex()); - $fakeRequest = $this->fixture->getRouterRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - - $this->assertEquals('PATCH', $request->getMethod()); - $this->assertEquals( - 'router/' . $fakeRequest->getRouter()->getUuid(), - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->modifyRouterAsync($fakeRequest->getRouter()->getUuid(), $fakeRequest); - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(RouterResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getRouter(), $fakeRequest->getRouter()); - } - - public function testThrowsExceptionOnModifyRouterAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getRouterRequest(); - $request = new Request( - 'PATCH', - $this->url . 'router/'. $fakeRequest->getRouter()->getUuid(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->modifyRouterAsync($fakeRequest->getRouter()->getUuid(), $fakeRequest)->wait(); - } - - public function testThrowsExceptionOnDeleteRouterAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getRouterRequest(); - $request = new Request( - 'DELETE', - $this->url . 'router/'. $fakeRequest->getRouter()->getUuid(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('DELETE', $request->getMethod()); - $this->assertEquals( - 'router/' . $fakeRequest->getRouter()->getUuid(), - (string) $request->getUri() - ); - return true; - }) - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->deleteRouterAsync($fakeRequest->getRouter()->getUuid())->wait(); - } -} diff --git a/test/Api/NetworkApi/NetworkApiTest.php b/test/Api/NetworkApi/NetworkApiTest.php deleted file mode 100644 index c5f73c31..00000000 --- a/test/Api/NetworkApi/NetworkApiTest.php +++ /dev/null @@ -1,594 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new NetworkApi($this->mock); - $this->fixture = new NetworkApiFixture; - } - - public function testGetListNetworks() - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('network', (string)$request->getUri()); - return true; - }) - ->andReturn($response); - - $response = $this->api->getListNetworks(); - - $list = $response->getNetworks()->getNetwork(); - - $fixtureList = $this->fixture->getResponse()->getNetworks()->getNetwork(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(Network::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testGetListNetworksWithZone() - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('network/?zone=fi-hel1', (string)$request->getUri()); - return true; - }) - ->andReturn($response); - - $response = $this->api->getListNetworks('fi-hel1'); - - $list = $response->getNetworks()->getNetwork(); - - $fixtureList = $this->fixture->getResponse()->getNetworks()->getNetwork(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(Network::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testGetNetworkDetails(): void - { - $fakeResponse = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getResponseBodyByIndex() - ); - - $fixtureItem = $this->fixture->getResponseByIndex(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) use ($fixtureItem) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('network/' . $fixtureItem->getNetwork()->getUuid(), (string) $request->getUri()); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->getNetworkDetails($fixtureItem->getNetwork()->getUuid()); - - $this->assertInstanceOf(NetworkResponse::class, $response); - - $this->assertEquals($response, $fixtureItem); - } - - public function testCreateNetwork(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getCreateRequest(); - $fixtureItem = $this->fixture->getResponseByIndex(); - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals('network', (string) $request->getUri()); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->createNetwork($fakeRequest); - - $this->assertEquals($response, $fixtureItem); - } - - public function testThrowsExceptionOnCreateNetwork(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'network', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals('network', (string) $request->getUri()); - return true; - }) - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->createNetwork($fakeRequest); - } - - public function testModifyNetwork(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getModifyRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('PUT', $request->getMethod()); - $this->assertEquals( - 'network/' . $fakeRequest->getNetwork()->getUuid(), - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->modifyNetwork($fakeRequest->getNetwork()->getUuid(), $fakeRequest); - - $this->assertEquals($response->getNetwork(), $fakeRequest->getNetwork()); - } - - public function testThrowsExceptionOnModifyNetwork(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getModifyRequest(); - $request = new Request( - 'PUT', - $this->url . 'network/' . $fakeRequest->getNetwork()->getUuid(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->modifyNetwork($fakeRequest->getNetwork()->getUuid(), $fakeRequest); - } - - public function testThrowsExceptionOnDeleteNetwork(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getModifyRequest(); - $request = new Request( - 'DELETE', - $this->url . 'network/'. $fakeRequest->getNetwork()->getUuid(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('DELETE', $request->getMethod()); - $this->assertEquals( - 'network/' . $fakeRequest->getNetwork()->getUuid(), - (string) $request->getUri() - ); - return true; - }) - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->deleteNetwork($fakeRequest->getNetwork()->getUuid()); - } - - public function testGetListServerNetworks() - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getServerResponseBody()); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/networking', - (string)$request->getUri() - ); - return true; - }) - ->andReturn($response); - - $response = $this->api->getListServerNetworks($this->serverId); - - $list = $response->getNetworking()->getInterfaces()->getInterface(); - - $fixtureList = $this->fixture->getServerResponse()->getNetworking()->getInterfaces()->getInterface(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(NetworkInterface::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testCreateNetworkInterface(): void - { - $fakeResponse = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getNetworkInterfaceResponseBodyByIndex() - ); - - $fakeRequest = $this->fixture->getCreateNetworkInterfaceRequest(); - $fixtureItem = $this->fixture->getNetworkInterfaceResponseByIndex(); - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/networking/interface', - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->createNetworkInterface($this->serverId, $fakeRequest); - - $this->assertEquals($response, $fixtureItem); - } - - public function testThrowsExceptionOnCreateNetworkInterface(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId.'/networking/interface', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getCreateNetworkInterfaceRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/networking/interface', - (string) $request->getUri() - ); - return true; - }) - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->createNetworkInterface($this->serverId, $fakeRequest); - } - - public function testModifyNetworkInterface(): void - { - $fakeResponse = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getNetworkInterfaceResponseBodyByIndex() - ); - - $fakeRequest = $this->fixture->getModifyNetworkInterfaceRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('PUT', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/networking/interface/' . $fakeRequest->getInterface()->getIndex(), - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->modifyNetworkInterface( - $this->serverId, - $fakeRequest->getInterface()->getIndex(), - $fakeRequest - ); - - $this->assertEquals($response, $this->fixture->getNetworkInterfaceResponseByIndex()); - } - - public function testThrowsExceptionOnModifyNetworkInterface(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getModifyNetworkInterfaceRequest(); - $request = new Request( - 'PUT', - $this->url . 'server/'.$this->serverId.'/networking/interface/' . $fakeRequest->getInterface()->getIndex(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->modifyNetworkInterface( - $this->serverId, - $fakeRequest->getInterface()->getIndex(), - $fakeRequest - ); - } - - public function testThrowsExceptionOnDeleteNetworkInterface(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getModifyNetworkInterfaceRequest(); - - $index = $fakeRequest->getInterface()->getIndex(); - $request = new Request( - 'DELETE', - 'server/'.$this->serverId.'/networking/interface/'. $index, - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) use ($index) { - $this->assertEquals('DELETE', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/networking/interface/'. $index, - (string) $request->getUri() - ); - return true; - }) - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->deleteNetworkInterface($this->serverId, $index); - } - - public function testGetListRouters() - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getRouterResponseBody()); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('router', (string)$request->getUri()); - return true; - }) - ->andReturn($response); - - $response = $this->api->getListRouters(); - - - $list = $response->getRouters()->getRouter(); - - $fixtureList = $this->fixture->getRouterResponse()->getRouters()->getRouter(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(Router::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testGetRouterDetails(): void - { - $fakeResponse = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getRouterResponseBodyByIndex() - ); - - $fixtureItem = $this->fixture->getRouterResponseByIndex(); - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) use ($fixtureItem) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('router/' . $fixtureItem->getRouter()->getUuid(), (string) $request->getUri()); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->getRouterDetails($fixtureItem->getRouter()->getUuid()); - - $this->assertInstanceOf(RouterResponse::class, $response); - - $this->assertEquals($response, $fixtureItem); - } - - public function testCreateRouter(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getRouterResponseBodyByIndex()); - $fakeRequest = $this->fixture->getRouterRequest(); - $fixtureItem = $this->fixture->getRouterResponseByIndex(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals('router', (string) $request->getUri()); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->createRouter($fakeRequest); - - $this->assertEquals($response, $fixtureItem); - } - - public function testThrowsExceptionOnCreateRouter(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'router', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getRouterRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals('router', (string) $request->getUri()); - return true; - }) - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->createRouter($fakeRequest); - } - - public function testModifyRouter(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getRouterResponseBodyByIndex()); - $fakeRequest = $this->fixture->getRouterRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('PATCH', $request->getMethod()); - $this->assertEquals( - 'router/' . $fakeRequest->getRouter()->getUuid(), - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->modifyRouter($fakeRequest->getRouter()->getUuid(), $fakeRequest); - - $this->assertEquals($response->getRouter(), $fakeRequest->getRouter()); - } - - public function testThrowsExceptionOnModifyRouter(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getRouterRequest(); - $request = new Request( - 'PATCH', - $this->url . 'router/' . $fakeRequest->getRouter()->getUuid(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->modifyRouter($fakeRequest->getRouter()->getUuid(), $fakeRequest); - } - - public function testThrowsExceptionOnDeleteRouter(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getRouterRequest(); - $request = new Request( - 'DELETE', - $this->url . 'router/'. $fakeRequest->getRouter()->getUuid(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('DELETE', $request->getMethod()); - $this->assertEquals( - 'router/' . $fakeRequest->getRouter()->getUuid(), - (string) $request->getUri() - ); - return true; - }) - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->deleteRouter($fakeRequest->getRouter()->getUuid()); - } -} diff --git a/test/Api/ObjectStorage/ObjectStorageAsyncTest.php b/test/Api/ObjectStorage/ObjectStorageAsyncTest.php deleted file mode 100644 index 9da7a0c5..00000000 --- a/test/Api/ObjectStorage/ObjectStorageAsyncTest.php +++ /dev/null @@ -1,225 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new ObjectStorageApi($this->mock); - $this->fixture = new ObjectStorageApiFixture; - } - - public function testGetListObjectStorageAsync() - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('object-storage', (string)$request->getUri()); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->getListObjectStorageAsync(); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(ObjectStorageListResponse::class, $result = $promise->wait()); - $list = $result->getObjectStorages()->getObjectStorage(); - - - $fixtureList = $this->fixture->getResponse()->getObjectStorages()->getObjectStorage(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(ObjectStorage::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testGetObjectStorageDetailsAsync(): void - { - $response = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getResponseBodyByIndex() - ); - - $fixtureItem = $this->fixture->getResponseByIndex(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) use ($fixtureItem) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals( - 'object-storage/' . $fixtureItem->getObjectStorage()->getUuid(), - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->getObjectStorageDetailsAsync($fixtureItem->getObjectStorage()->getUuid()); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(ObjectStorageResponse::class, $result = $promise->wait()); - - $this->assertEquals($result, $fixtureItem); - } - - public function testCreateObjectStorageAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getCreateRequest(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals('object-storage', (string) $request->getUri()); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->createObjectStorageAsync($fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(ObjectStorageResponse::class, $result = $promise->wait()); - $this->assertEquals($result, $this->fixture->getResponseByIndex()); - } - - public function testThrowsExceptionOnCreateObjectStorageAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'object-storage', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->createObjectStorageAsync($fakeRequest)->wait(); - } - - - public function testModifyObjectStorageAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getModifyRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('PATCH', $request->getMethod()); - $this->assertEquals( - 'object-storage/' . $fakeRequest->getObjectStorage()->getUuid(), - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->modifyObjectStorageAsync($fakeRequest->getObjectStorage()->getUuid(), $fakeRequest); - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(ObjectStorageResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getObjectStorage(), $fakeRequest->getObjectStorage()); - } - - public function testThrowsExceptionOnModifyObjectStorageAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getModifyRequest(); - $request = new Request( - 'PATCH', - $this->url . 'object-storage/'. $fakeRequest->getObjectStorage()->getUuid(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->modifyObjectStorageAsync($fakeRequest->getObjectStorage()->getUuid(), $fakeRequest)->wait(); - } - - public function testThrowsExceptionOnDeleteObjectStorageAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getModifyRequest(); - $request = new Request( - 'DELETE', - $this->url . 'object-storage/'. $fakeRequest->getObjectStorage()->getUuid(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('DELETE', $request->getMethod()); - $this->assertEquals( - 'object-storage/' . $fakeRequest->getObjectStorage()->getUuid(), - (string) $request->getUri() - ); - return true; - }) - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->deleteObjectStorageAsync($fakeRequest->getObjectStorage()->getUuid())->wait(); - } -} diff --git a/test/Api/ObjectStorage/ObjectStorageTest.php b/test/Api/ObjectStorage/ObjectStorageTest.php deleted file mode 100644 index 8f50e0d0..00000000 --- a/test/Api/ObjectStorage/ObjectStorageTest.php +++ /dev/null @@ -1,214 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new ObjectStorageApi($this->mock); - $this->fixture = new ObjectStorageApiFixture; - } - - public function testGetListObjectStorage() - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('object-storage', (string)$request->getUri()); - return true; - }) - ->andReturn($response); - - $response = $this->api->getListObjectStorage(); - - $list = $response->getObjectStorages()->getObjectStorage(); - - $fixtureList = $this->fixture->getResponse()->getObjectStorages()->getObjectStorage(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(ObjectStorage::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testGetObjectStorageDetails(): void - { - $fakeResponse = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getResponseBodyByIndex() - ); - - $fixtureItem = $this->fixture->getResponseByIndex(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) use ($fixtureItem) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals( - 'object-storage/' . $fixtureItem->getObjectStorage()->getUuid(), - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->getObjectStorageDetails($fixtureItem->getObjectStorage()->getUuid()); - - $this->assertInstanceOf(ObjectStorageResponse::class, $response); - - $this->assertEquals($response, $fixtureItem); - } - - public function testCreateObjectStorage(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getCreateRequest(); - $fixtureItem = $this->fixture->getResponseByIndex(); - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals('object-storage', (string) $request->getUri()); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->createObjectStorage($fakeRequest); - - $this->assertEquals($response, $fixtureItem); - } - - public function testThrowsExceptionOnCreateObjectStorage(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'object-storage', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->createObjectStorage($fakeRequest); - } - - public function testModifyObjectStorage(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getModifyRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('PATCH', $request->getMethod()); - $this->assertEquals( - 'object-storage/' . $fakeRequest->getObjectStorage()->getUuid(), - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->modifyObjectStorage($fakeRequest->getObjectStorage()->getUuid(), $fakeRequest); - - $this->assertEquals($response->getObjectStorage(), $fakeRequest->getObjectStorage()); - } - - public function testThrowsExceptionOnModifyObjectStorage(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getModifyRequest(); - $request = new Request( - 'PATCH', - $this->url . 'object-storage/' . $fakeRequest->getObjectStorage()->getUuid(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->modifyObjectStorage($fakeRequest->getObjectStorage()->getUuid(), $fakeRequest); - } - - public function testThrowsExceptionOnDeleteObjectStorage(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getModifyRequest(); - $request = new Request( - 'DELETE', - $this->url . 'object-storage/'. $fakeRequest->getObjectStorage()->getUuid(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('DELETE', $request->getMethod()); - $this->assertEquals( - 'object-storage/' . $fakeRequest->getObjectStorage()->getUuid(), - (string) $request->getUri() - ); - return true; - }) - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->deleteObjectStorage($fakeRequest->getObjectStorage()->getUuid()); - } -} diff --git a/test/Api/PlanApi/PlanApiTest.php b/test/Api/PlanApi/PlanApiTest.php deleted file mode 100644 index 08409dbd..00000000 --- a/test/Api/PlanApi/PlanApiTest.php +++ /dev/null @@ -1,81 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new PlanApi($this->mock); - $this->fixture = new PlanApiFixture; - } - - public function testListPlans(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->listPlans(); - - $this->assertInstanceOf(AvailablePlanListResponse::class, $response); - $this->assertEquals($response, $this->fixture->getResponse()); - } - - public function testListPlansAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->listPlansAsync(); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(AvailablePlanListResponse::class, $result = $promise->wait()); - $this->assertEquals($result, $this->fixture->getResponse()); - } -} diff --git a/test/Api/PricesApi/PricesApiTest.php b/test/Api/PricesApi/PricesApiTest.php deleted file mode 100644 index 6490a643..00000000 --- a/test/Api/PricesApi/PricesApiTest.php +++ /dev/null @@ -1,80 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new PricesApi($this->mock); - $this->fixture = new PricesApiFixture; - } - - public function testListPrices(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->listPrices(); - - $this->assertInstanceOf(PriceListResponse::class, $response); - $this->assertEquals($response, $this->fixture->getResponse()); - } - - public function testListPricesAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->listPricesAsync(); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(PriceListResponse::class, $result = $promise->wait()); - $this->assertEquals($result, $this->fixture->getResponse()); - } -} diff --git a/test/Api/ServerApi/ServerApiAsyncTest.php b/test/Api/ServerApi/ServerApiAsyncTest.php deleted file mode 100644 index b11b5cac..00000000 --- a/test/Api/ServerApi/ServerApiAsyncTest.php +++ /dev/null @@ -1,810 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new ServerApi($this->mock); - $this->fixture = new ServerApiFixture; - $this->storageFixture = new StorageApiFixture; - $this->firewallFixture = new FirewallApiFixture; - } - - public function testServerConfigurationsListAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseConfigBody()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('server_size', (string) $request->getUri()); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->listServerConfigurationsAsync(); - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(ConfigurationListResponse::class, $result = $promise->wait()); - - $this->assertEquals($result, $this->fixture->getResponseConfig()); - } - - public function testListServersAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('server', (string) $request->getUri()); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->listServersAsync(); - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(ServerListResponse::class, $result = $promise->wait()); - - $list = $result->getServers()->getServer(); - $this->assertCount(3, $list); - - $fixtureList = $this->fixture->getResponse()->getServers()->getServer(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(Server::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testGetServerDetailsAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getCreateRequest(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals( - 'server/'. $fakeRequest->getServer()->getUuid(), - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->serverDetailsAsync($fakeRequest->getServer()->getUuid()); - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateServerResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getServer(), $fakeRequest->getServer()); - } - - public function testCreateServerAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex(1)); - $fakeRequest = $this->fixture->getCreateRequest(1); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals('server', (string) $request->getUri()); - $this->assertEquals($request->getBody()->getContents(), (string) $fakeRequest); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->createServerAsync($fakeRequest); - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateServerResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getServer(), $fakeRequest->getServer()); - } - - public function testThrowsExceptionOnCreateServerAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - - $request = new Request('POST', $this->url . '/server', $this->fakeHeadersAsArray); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->createServerAsync($fakeRequest)->wait(); - } - - public function testStartServerAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$fakeRequest->getServer()->getUuid().'/start', - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->startServerAsync($fakeRequest->getServer()->getUuid()); - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateServerResponse::class, $result = $promise->wait()); - - $this->assertEquals($result->getServer(), $fakeRequest->getServer()); - } - - public function testThrowsExceptionOnStartServerAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - - $fakeRequest = $this->fixture->getCreateRequest(); - $request = new Request( - 'POST', - $this->url . '/server/'.$fakeRequest->getServer()->getUuid().'/start', - $this->fakeHeadersAsArray - ); - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->startServerAsync($fakeRequest->getServer()->getUuid())->wait(); - } - - public function testStopServerAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $stopRequest = $this->fixture->getStopRequest(); - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/stop', - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->stopServerAsync($this->serverId, $stopRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateServerResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getServer(), $fakeRequest->getServer()); - } - - public function testThrowsExceptionOnStopServerAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - - $request = new Request( - 'POST', - $this->url . '/server/'.$this->serverId.'/stop', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getStopRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->stopServerAsync($this->serverId, $fakeRequest)->wait(); - } - - public function testRestartServerAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $restartRequest = $this->fixture->getRestartRequest(); - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/restart', - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->restartServerAsync($this->serverId, $restartRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateServerResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getServer(), $fakeRequest->getServer()); - } - - public function testThrowsExceptionOnRestartServerAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - - $request = new Request( - 'POST', - $this->url . '/server/'.$this->serverId.'/restart', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getRestartRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->restartServerAsync($this->serverId, $fakeRequest)->wait(); - } - - public function testModifyServerAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex(2)); - $fakeRequest = $this->fixture->getModifyRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('PUT', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId, - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->modifyServerAsync($this->serverId, $fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateServerResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getServer(), $fakeRequest->getServer()); - } - - public function testThrowsExceptionOnModifyServerAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - - $request = new Request( - 'PUT', - $this->url . '/server/'.$this->serverId, - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getModifyRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('PUT', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId, - (string) $request->getUri() - ); - return true; - }) - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->modifyServerAsync($this->serverId, $fakeRequest)->wait(); - } - - public function testThrowsExceptionOnDeleteServerAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - - $request = new Request( - 'DELETE', - $this->url . '/server/'.$this->serverId, - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('DELETE', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId, - (string) $request->getUri() - ); - return true; - }) - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->deleteServerAsync($this->serverId)->wait(); - } - - public function testAssignTagAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId. '/tag/TEST', - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->assignTagAsync($this->serverId, 'TEST'); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateServerResponse::class, $result = $promise->wait()); - $this->assertInstanceOf(Server::class, $result->getServer()); - $this->assertContains('TEST', $result->getServer()->getTags()->getTag()); - } - - public function testThrowsExceptionOnAssignTagAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/tag/TEST', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId. '/tag/TEST', - (string) $request->getUri() - ); - return true; - }) - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->assignTagAsync($this->serverId, 'TEST')->wait(); - } - - public function testAttachStorageAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - - $fakeRequest = $this->storageFixture->getAttachRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId. '/storage/attach', - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->attachStorageAsync($this->serverId, $fakeRequest); - - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateServerResponse::class, $result = $promise->wait()); - - $this->assertInstanceOf(Server::class, $server = $result->getServer()); - - $storageDevice = $server->getStorageDevices()->getStorageDevice(); - $this->assertEquals($storageDevice[0]->getStorage(), $fakeRequest->getStorageDevice()->getStorage()); - } - - public function testThrowsExceptionOnAttachStorageAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/storage/attach', - $this->fakeHeadersAsArray - ); - - $fakeRequest = $this->storageFixture->getAttachRequest(); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->attachStorageAsync($this->serverId, $fakeRequest)->wait(); - } - - public function testDetachStorageAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - - $fakeRequest = $this->storageFixture->getDetachRequest(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId. '/storage/detach', - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->detachStorageAsync($this->serverId, $fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateServerResponse::class, $result = $promise->wait()); - $this->assertInstanceOf(Server::class, $server = $result->getServer()); - $storageDevice = $server->getStorageDevices()->getStorageDevice(); - $this->assertNotEquals($storageDevice[0]->getAddress(), $fakeRequest->getStorageDevice()->getStorage()); - } - - public function testThrowsExceptionOnDetachStorageAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/storage/detach', - $this->fakeHeadersAsArray - ); - - $fakeRequest = $this->storageFixture->getDetachRequest(); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->detachStorageAsync($this->serverId, $fakeRequest)->wait(); - } - - public function testLoadCdromAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - - $fakeRequest = $this->storageFixture->getLoadCdromRequest(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId. '/cdrom/load', - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->loadCdromAsync($this->serverId, $fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateServerResponse::class, $result = $promise->wait()); - $this->assertInstanceOf(Server::class, $server = $result->getServer()); - $storageDevice = $server->getStorageDevices()->getStorageDevice(); - $this->assertEquals($storageDevice[0]->getStorage(), $fakeRequest->getStorageDevice()->getStorage()); - } - - public function testThrowsExceptionOnLoadCdromAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/cdrom/load', - $this->fakeHeadersAsArray - ); - - $fakeRequest = $this->storageFixture->getLoadCdromRequest(); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->loadCdromAsync($this->serverId, $fakeRequest)->wait(); - } - - public function testThrowsExceptionOnEjectCdromAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/cdrom/eject', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->ejectCdromAsync($this->serverId)->wait(); - } - - public function testCreateFirewallRuleAsync(): void - { - $response = new Response( - 200, - $this->fakeHeadersAsArray, - $this->firewallFixture->getRulesResponseBodyByIndex() - ); - - $fakeRequest = $this->firewallFixture->getRuleRequestSuccess(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId. '/firewall_rule', - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->createFirewallRuleAsync($this->serverId, $fakeRequest); - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(FirewallRuleCreateResponse::class, $result = $promise->wait()); - - $this->assertEquals($result->getFirewallRule(), $fakeRequest->getFirewallRule()); - } - - public function testThrowsExceptionOnCreateFirewallRuleAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId.'/firewall_rule', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->firewallFixture->getRuleRequestSuccess(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->createFirewallRuleAsync($this->serverId, $fakeRequest)->wait(); - } - - public function testThrowsExceptionOnDeleteFirewallRuleAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'DELETE', - $this->url . 'server/'.$this->serverId.'/firewall_rule/'. 1, - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('DELETE', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/firewall_rule/'. 1, - (string) $request->getUri() - ); - return true; - }) - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->deleteFirewallRuleAsync($this->serverId, 1)->wait(); - } - - public function testGetFirewallRuleAsync() - { - $response = new Response( - 200, - $this->fakeHeadersAsArray, - $this->firewallFixture->getRulesResponseBodyByIndex() - ); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/firewall_rule/'. 1, - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->getFirewallRuleAsync($this->serverId, 1); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(FirewallRuleCreateResponse::class, $result = $promise->wait()); - - $fixtureRole = $this->firewallFixture->getRulesResponseByIndex(); - - $this->assertEquals($result, $fixtureRole); - } - - public function testServerServerIdFirewallRuleGetAsync() - { - $response = new Response( - 200, - $this->fakeHeadersAsArray, - $this->firewallFixture->getRulesResponseBody() - ); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/firewall_rule', - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->serverServerIdFirewallRuleGetAsync($this->serverId); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(FirewallRuleListResponse::class, $result = $promise->wait()); - $rulesList = $result->getFirewallRules()->getFirewallRule(); - $this->assertCount(4, $rulesList); - - $fixtureRolesList = $this->firewallFixture->getRulesResponse()->getFirewallRules()->getFirewallRule(); - - foreach ($rulesList as $key => $rule) { - $this->assertInstanceOf(FirewallRule::class, $rule); - $this->assertEquals($rule, $fixtureRolesList[$key]); - } - } - - public function testUntagAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/untag/DEV', - (string) $request->getUri() - ); - return true; - }) - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->untagAsync($this->serverId, 'DEV'); - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateServerResponse::class, $result = $promise->wait()); - $this->assertInstanceOf(Server::class, $result->getServer()); - $this->assertNotContains('DEV', $result->getServer()->getTags()->getTag()); - } -} diff --git a/test/Api/ServerApi/ServerApiTest.php b/test/Api/ServerApi/ServerApiTest.php deleted file mode 100644 index cdb97a90..00000000 --- a/test/Api/ServerApi/ServerApiTest.php +++ /dev/null @@ -1,800 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new ServerApi($this->mock); - $this->fixture = new ServerApiFixture; - $this->storageFixture = new StorageApiFixture; - $this->firewallFixture = new FirewallApiFixture; - } - - public function testServerConfigurationsList(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseConfigBody()); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('server_size', (string) $request->getUri()); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->listServerConfigurations(); - - $this->assertEquals($response, $this->fixture->getResponseConfig()); - } - - public function testListServers(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('server', (string) $request->getUri()); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->listServers(); - - $list = $response->getServers()->getServer(); - $this->assertCount(3, $list); - - $fixtureList = $this->fixture->getResponse()->getServers()->getServer(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(Server::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testGetServerDetails(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals( - 'server/'. $fakeRequest->getServer()->getUuid(), - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->serverDetails($fakeRequest->getServer()->getUuid()); - $this->assertInstanceOf(CreateServerResponse::class, $response); - $this->assertEquals($response->getServer(), $fakeRequest->getServer()); - } - - public function testCreateServer(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex(1)); - $fakeRequest = $this->fixture->getCreateRequest(1); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals('server', (string) $request->getUri()); - $this->assertEquals($request->getBody()->getContents(), (string) $fakeRequest); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->createServer($fakeRequest); - $this->assertEquals($response->getServer(), $fakeRequest->getServer()); - } - - public function testThrowsExceptionOnCreateServer(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - - $request = new Request('POST', $this->url . '/server', $this->fakeHeadersAsArray); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->createServer($fakeRequest); - } - - public function testStartServer(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) use ($fakeRequest) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$fakeRequest->getServer()->getUuid().'/start', - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->startServer($fakeRequest->getServer()->getUuid()); - - $this->assertEquals($response->getServer(), $fakeRequest->getServer()); - } - - public function testThrowsExceptionOnStartServer(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - - $fakeRequest = $this->fixture->getCreateRequest(); - $request = new Request( - 'POST', - $this->url . '/server/'.$fakeRequest->getServer()->getUuid().'/start', - $this->fakeHeadersAsArray - ); - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->startServer($fakeRequest->getServer()->getUuid()); - } - - public function testStopServer(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $stopRequest = $this->fixture->getStopRequest(); - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/stop', - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->stopServer($this->serverId, $stopRequest); - - $this->assertEquals($response->getServer(), $fakeRequest->getServer()); - } - - public function testThrowsExceptionOnStopServer(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - - $request = new Request( - 'POST', - $this->url . '/server/'.$this->serverId.'/stop', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getStopRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->stopServer($this->serverId, $fakeRequest); - } - - public function testRestartServer(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $restartRequest = $this->fixture->getRestartRequest(); - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/restart', - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->restartServer($this->serverId, $restartRequest); - - $this->assertEquals($response->getServer(), $fakeRequest->getServer()); - } - - public function testThrowsExceptionOnRestartServer(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - - $request = new Request( - 'POST', - $this->url . '/server/'.$this->serverId.'/restart', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getRestartRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->restartServer($this->serverId, $fakeRequest); - } - - public function testModifyServer(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex(2)); - $fakeRequest = $this->fixture->getModifyRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('PUT', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId, - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->modifyServer($this->serverId, $fakeRequest); - - - $this->assertEquals($response->getServer(), $fakeRequest->getServer()); - } - - public function testThrowsExceptionOnModifyServer(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - - $request = new Request( - 'PUT', - $this->url . '/server/'.$this->serverId, - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getModifyRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('PUT', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId, - (string) $request->getUri() - ); - return true; - }) - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->modifyServer($this->serverId, $fakeRequest); - } - - public function testThrowsExceptionOnDeleteServer(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - - $request = new Request( - 'DELETE', - $this->url . '/server/'.$this->serverId, - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('DELETE', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId, - (string) $request->getUri() - ); - return true; - }) - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->deleteServer($this->serverId); - } - - public function testAssignTag(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId. '/tag/TEST', - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->assignTag($this->serverId, 'TEST'); - - $this->assertInstanceOf(CreateServerResponse::class, $response); - $this->assertInstanceOf(Server::class, $response->getServer()); - $this->assertContains('TEST', $response->getServer()->getTags()->getTag()); - } - - public function testThrowsExceptionOnAssignTag(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/tag/TEST', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId. '/tag/TEST', - (string) $request->getUri() - ); - return true; - }) - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->assignTag($this->serverId, 'TEST'); - } - - public function testAttachStorage(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - - $fakeRequest = $this->storageFixture->getAttachRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId. '/storage/attach', - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->attachStorage($this->serverId, $fakeRequest); - - - $this->assertInstanceOf(CreateServerResponse::class, $response); - $this->assertInstanceOf(Server::class, $server = $response->getServer()); - - $storageDevice = $server->getStorageDevices()->getStorageDevice(); - $this->assertEquals($storageDevice[0]->getStorage(), $fakeRequest->getStorageDevice()->getStorage()); - } - - public function testThrowsExceptionOnAttachStorage(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/storage/attach', - $this->fakeHeadersAsArray - ); - - $fakeRequest = $this->storageFixture->getAttachRequest(); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->attachStorage($this->serverId, $fakeRequest); - } - - public function testDetachStorage(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - - $fakeRequest = $this->storageFixture->getDetachRequest(); - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId. '/storage/detach', - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->detachStorage($this->serverId, $fakeRequest); - $this->assertInstanceOf(CreateServerResponse::class, $response); - $this->assertInstanceOf(Server::class, $server = $response->getServer()); - $storageDevice = $server->getStorageDevices()->getStorageDevice(); - $this->assertNotEquals($storageDevice[0]->getAddress(), $fakeRequest->getStorageDevice()->getStorage()); - } - - public function testThrowsExceptionOnDetachStorage(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/storage/detach', - $this->fakeHeadersAsArray - ); - - $fakeRequest = $this->storageFixture->getDetachRequest(); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->detachStorage($this->serverId, $fakeRequest); - } - - public function testLoadCdrom(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - - $fakeRequest = $this->storageFixture->getLoadCdromRequest(); - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId. '/cdrom/load', - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->loadCdrom($this->serverId, $fakeRequest); - - $this->assertInstanceOf(CreateServerResponse::class, $response); - $this->assertInstanceOf(Server::class, $server = $response->getServer()); - $storageDevice = $server->getStorageDevices()->getStorageDevice(); - $this->assertEquals($storageDevice[0]->getStorage(), $fakeRequest->getStorageDevice()->getStorage()); - } - - public function testThrowsExceptionOnLoadCdrom(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/cdrom/load', - $this->fakeHeadersAsArray - ); - - $fakeRequest = $this->storageFixture->getLoadCdromRequest(); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->loadCdrom($this->serverId, $fakeRequest); - } - - public function testThrowsExceptionOnEjectCdrom(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/cdrom/eject', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->ejectCdrom($this->serverId); - } - - public function testCreateFirewallRule(): void - { - $fakeResponse = new Response( - 200, - $this->fakeHeadersAsArray, - $this->firewallFixture->getRulesResponseBodyByIndex() - ); - - $fakeRequest = $this->firewallFixture->getRuleRequestSuccess(); - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId. '/firewall_rule', - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->createFirewallRule($this->serverId, $fakeRequest); - - $this->assertEquals($response->getFirewallRule(), $fakeRequest->getFirewallRule()); - } - - public function testThrowsExceptionOnCreateFirewallRule(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId.'/firewall_rule', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->firewallFixture->getRuleRequestSuccess(); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->createFirewallRule($this->serverId, $fakeRequest); - } - - public function testThrowsExceptionOnDeleteFirewallRule(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'DELETE', - $this->url . 'server/'.$this->serverId.'/firewall_rule/'. 1, - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('DELETE', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/firewall_rule/'. 1, - (string) $request->getUri() - ); - return true; - }) - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->deleteFirewallRule($this->serverId, 1); - } - - public function testGetFirewallRule() - { - $fakeResponse = new Response( - 200, - $this->fakeHeadersAsArray, - $this->firewallFixture->getRulesResponseBodyByIndex() - ); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/firewall_rule/'. 1, - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->getFirewallRule($this->serverId, 1); - - $this->assertInstanceOf(FirewallRuleCreateResponse::class, $response); - - $fixtureRole = $this->firewallFixture->getRulesResponseByIndex(); - - $this->assertEquals($response, $fixtureRole); - } - - public function testServerServerIdFirewallRuleGet() - { - $fakeResponse = new Response( - 200, - $this->fakeHeadersAsArray, - $this->firewallFixture->getRulesResponseBody() - ); - - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/firewall_rule', - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->serverServerIdFirewallRuleGet($this->serverId); - - $rulesList = $response->getFirewallRules()->getFirewallRule(); - $this->assertCount(4, $rulesList); - - $fixtureRolesList = $this->firewallFixture->getRulesResponse()->getFirewallRules()->getFirewallRule(); - - foreach ($rulesList as $key => $rule) { - $this->assertInstanceOf(FirewallRule::class, $rule); - $this->assertEquals($rule, $fixtureRolesList[$key]); - } - } - - public function testUntag(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $this->mock - ->shouldReceive('send') - ->once() - ->withArgs(function (Request $request) { - $this->assertEquals('POST', $request->getMethod()); - $this->assertEquals( - 'server/'.$this->serverId.'/untag/DEV', - (string) $request->getUri() - ); - return true; - }) - ->andReturn($fakeResponse); - - $response = $this->api->untag($this->serverId, 'DEV'); - - $this->assertInstanceOf(CreateServerResponse::class, $response); - $this->assertInstanceOf(Server::class, $response->getServer()); - $this->assertNotContains('DEV', $response->getServer()->getTags()->getTag()); - } - - public function testThrowsExceptionOnUntag(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/untag/TEST', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->assignTag($this->serverId, 'TEST'); - } -} diff --git a/test/Api/StorageApi/StorageApiAsyncTest.php b/test/Api/StorageApi/StorageApiAsyncTest.php deleted file mode 100644 index 03f824e3..00000000 --- a/test/Api/StorageApi/StorageApiAsyncTest.php +++ /dev/null @@ -1,601 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new StorageApi($this->mock); - $this->fixture = new StorageApiFixture; - } - - public function testListStoragesAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->listStoragesAsync(); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(SuccessStoragesResponse::class, $result = $promise->wait()); - - $list = $result->getStorages()->getStorage(); - $this->assertCount(4, $list); - - $fixtureList = $this->fixture->getResponse()->getStorages()->getStorage(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(Storage::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testListStoragesWithTypeAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->listStoragesAsync('normal'); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(SuccessStoragesResponse::class, $result = $promise->wait()); - - $list = $result->getStorages()->getStorage(); - $this->assertCount(4, $list); - - $fixtureList = $this->fixture->getResponse()->getStorages()->getStorage(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(Storage::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testThrowsExceptionOnListStoragesWithTypeAsync(): void - { - - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $request = new Request( - 'GET', - $this->url . 'storage/type', - $this->fakeHeadersAsArray - ); - $this->expectException(InvalidArgumentException::class); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - - $this->api->listStoragesAsync('normals')->wait(); - } - - public function testGetStorageDetailsAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $fakeRequest = $this->fixture->getCreateRequest(); - - $promise = $this->api->getStorageDetailsAsync($fakeRequest->getStorage()->getUuid()); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateStorageResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getStorage(), $fakeRequest->getStorage()); - } - - public function testCreateStorageAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getCreateRequest(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->createStorageAsync($fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateStorageResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getStorage(), $fakeRequest->getStorage()); - } - - public function testThrowsExceptionOnCreateStorageAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'storage', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->createStorageAsync($fakeRequest)->wait(); - } - - public function testModifyStorageAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getModifyRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->modifyStorageAsync($fakeRequest->getStorage()->getUuid(), $fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateStorageResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getStorage(), $fakeRequest->getStorage()); - } - - public function testThrowsExceptionOnModifyStorageAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'PUT', - $this->url . 'tag', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getModifyRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->modifyStorageAsync($fakeRequest->getStorage()->getUuid(), $fakeRequest)->wait(); - } - - public function testAttachStorageAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getServerResponseBody()); - - $fakeRequest = $this->fixture->getAttachRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->attachStorageAsync($this->serverId, $fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateServerResponse::class, $result = $promise->wait()); - $this->assertInstanceOf(Server::class, $server = $result->getServer()); - $storageDevice = $server->getStorageDevices()->getStorageDevice(); - $this->assertEquals($storageDevice[0]->getStorage(), $fakeRequest->getStorageDevice()->getStorage()); - } - - public function testThrowsExceptionOnAttachStorageAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/storage/attach', - $this->fakeHeadersAsArray - ); - - $fakeRequest = $this->fixture->getAttachRequest(); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->attachStorageAsync($this->serverId, $fakeRequest)->wait(); - } - - public function testDetachStorageAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getServerResponseBody()); - - $fakeRequest = $this->fixture->getDetachRequest(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->detachStorageAsync($this->serverId, $fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateServerResponse::class, $result = $promise->wait()); - $this->assertInstanceOf(Server::class, $server = $result->getServer()); - $storageDevice = $server->getStorageDevices()->getStorageDevice(); - $this->assertNotEquals($storageDevice[0]->getAddress(), $fakeRequest->getStorageDevice()->getStorage()); - } - - public function testThrowsExceptionOnDetachStorageAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/storage/detach', - $this->fakeHeadersAsArray - ); - - $fakeRequest = $this->fixture->getDetachRequest(); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->detachStorageAsync($this->serverId, $fakeRequest)->wait(); - } - - public function testLoadCdromAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getServerResponseBody()); - - $fakeRequest = $this->fixture->getLoadCdromRequest(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->loadCdromAsync($this->serverId, $fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateServerResponse::class, $result = $promise->wait()); - $this->assertInstanceOf(Server::class, $server = $result->getServer()); - $storageDevice = $server->getStorageDevices()->getStorageDevice(); - $this->assertEquals($storageDevice[0]->getStorage(), $fakeRequest->getStorageDevice()->getStorage()); - } - - public function testThrowsExceptionOnLoadCdromAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/cdrom/load', - $this->fakeHeadersAsArray - ); - - $fakeRequest = $this->fixture->getLoadCdromRequest(); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->loadCdromAsync($this->serverId, $fakeRequest)->wait(); - } - - public function testThrowsExceptionOnEjectCdromAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/cdrom/eject', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->ejectCdromAsync($this->serverId)->wait(); - } - - public function testCloneStorageAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - - $fakeRequest = $this->fixture->getCloneRequest(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->cloneStorageAsync($fakeRequest->getStorage()->getUuid(), $fakeRequest); - - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateStorageResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getStorage(), $fakeRequest->getStorage()); - } - - public function testThrowsExceptionOnCloneStorageAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getCloneRequest(); - $request = new Request( - 'POST', - $this->url . 'storage/'.$fakeRequest->getStorage()->getUuid().'/clone', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->cloneStorageAsync($fakeRequest->getStorage()->getUuid(), $fakeRequest)->wait(); - } - - public function testThrowsExceptionOnCancelOperationAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getCreateRequest(); - $request = new Request( - 'POST', - $this->url . 'storage/'.$fakeRequest->getStorage()->getUuid().'/cancel', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->cancelOperationAsync($fakeRequest->getStorage()->getUuid())->wait(); - } - - public function testTemplatizeStorageAsync(): void - { - $response = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getResponseBodyByIndex(3) - ); - - $fakeRequest = $this->fixture->getTemplitizeStorageRequest(3); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->templatizeStorageAsync($fakeRequest->getStorage()->getUuid(), $fakeRequest); - - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateStorageResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getStorage(), $fakeRequest->getStorage()); - } - - public function testThrowsExceptionOnTemplatizeStorageAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getTemplitizeStorageRequest(3); - $request = new Request( - 'POST', - $this->url . 'storage/'.$fakeRequest->getStorage()->getUuid().'/templatize', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->cancelOperationAsync($fakeRequest->getStorage()->getUuid())->wait(); - } - - public function testBackupStorageAsync(): void - { - $response = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getResponseBodyByIndex(1) - ); - - $fakeRequest = $this->fixture->getBackupStorageRequest(1); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->backupStorageAsync($fakeRequest->getStorage()->getUuid(), $fakeRequest); - - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateStorageResponse::class, $result = $promise->wait()); - $this->assertEquals($result->getStorage(), $fakeRequest->getStorage()); - } - - public function testThrowsExceptionOnBackupStorageAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getBackupStorageRequest(1); - $request = new Request( - 'POST', - $this->url . 'storage/'.$fakeRequest->getStorage()->getUuid().'/backup', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->backupStorageAsync($fakeRequest->getStorage()->getUuid(), $fakeRequest)->wait(); - } - - public function testThrowsExceptionOnRestoreStorageAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getBackupStorageRequest(1); - $request = new Request( - 'POST', - $this->url . 'storage/'.$fakeRequest->getStorage()->getUuid().'/restore', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->restoreStorageAsync($fakeRequest->getStorage()->getUuid())->wait(); - } - - public function testThrowsExceptionOnFavoriteStorageAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getCreateRequest(); - $request = new Request( - 'POST', - $this->url . 'storage/'.$fakeRequest->getStorage()->getUuid().'/favorite', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->favoriteStorageAsync($fakeRequest->getStorage()->getUuid())->wait(); - } - - public function testThrowsExceptionOnUnfavoriteStorageAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getCreateRequest(); - $request = new Request( - 'DELETE', - $this->url . 'storage/'.$fakeRequest->getStorage()->getUuid().'/restore', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->unfavoriteStorageAsync($fakeRequest->getStorage()->getUuid())->wait(); - } - - public function testThrowsExceptionOnDeleteStorageAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getCreateRequest(); - $request = new Request( - 'DELETE', - $this->url . 'storage/'.$fakeRequest->getStorage()->getUuid(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->deleteStorageAsync($fakeRequest->getStorage()->getUuid())->wait(); - } -} diff --git a/test/Api/StorageApi/StorageApiTest.php b/test/Api/StorageApi/StorageApiTest.php deleted file mode 100644 index a034dbd1..00000000 --- a/test/Api/StorageApi/StorageApiTest.php +++ /dev/null @@ -1,573 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new StorageApi($this->mock); - $this->fixture = new StorageApiFixture; - } - - public function testListStorages(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->listStorages(); - - $list = $response->getStorages()->getStorage(); - $this->assertCount(4, $list); - - $fixtureList = $this->fixture->getResponse()->getStorages()->getStorage(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(Storage::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testListStoragesWithType(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->listStorages('normal'); - - $list = $response->getStorages()->getStorage(); - $this->assertCount(4, $list); - - $fixtureList = $this->fixture->getResponse()->getStorages()->getStorage(); - - foreach ($list as $key => $item) { - $this->assertInstanceOf(Storage::class, $item); - $this->assertEquals($item, $fixtureList[$key]); - } - } - - public function testThrowsExceptionOnListStoragesWithType(): void - { - - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->expectException(InvalidArgumentException::class); - - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - - $this->api->listStorages('normals'); - } - - public function testGetStorageDetails(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $fakeRequest = $this->fixture->getCreateRequest(); - - $response = $this->api->getStorageDetails($fakeRequest->getStorage()->getUuid()); - $this->assertInstanceOf(CreateStorageResponse::class, $response); - $this->assertEquals($response->getStorage(), $fakeRequest->getStorage()); - } - - public function testCreateStorage(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getCreateRequest(); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->createStorage($fakeRequest); - - $this->assertEquals($response->getStorage(), $fakeRequest->getStorage()); - } - - public function testThrowsExceptionOnCreateStorage(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'storage', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->createStorage($fakeRequest); - } - - public function testModifyStorage(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getModifyRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->modifyStorage($fakeRequest->getStorage()->getUuid(), $fakeRequest); - - $this->assertEquals($response->getStorage(), $fakeRequest->getStorage()); - } - - public function testThrowsExceptionOnModifyStorage(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'PUT', - $this->url . 'tag', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getModifyRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->modifyStorage($fakeRequest->getStorage()->getUuid(), $fakeRequest); - } - - public function testAttachStorage(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getServerResponseBody()); - - $fakeRequest = $this->fixture->getAttachRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->attachStorage($this->serverId, $fakeRequest); - - $this->assertInstanceOf(CreateServerResponse::class, $response); - $this->assertInstanceOf(Server::class, $server = $response->getServer()); - $storageDevice = $server->getStorageDevices()->getStorageDevice(); - $this->assertEquals($storageDevice[0]->getStorage(), $fakeRequest->getStorageDevice()->getStorage()); - } - - public function testThrowsExceptionOnAttachStorage(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/storage/attach', - $this->fakeHeadersAsArray - ); - - $fakeRequest = $this->fixture->getAttachRequest(); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->attachStorage($this->serverId, $fakeRequest); - } - - public function testDetachStorage(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getServerResponseBody()); - - $fakeRequest = $this->fixture->getDetachRequest(); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->detachStorage($this->serverId, $fakeRequest); - $this->assertInstanceOf(CreateServerResponse::class, $response); - $this->assertInstanceOf(Server::class, $server = $response->getServer()); - $storageDevice = $server->getStorageDevices()->getStorageDevice(); - $this->assertNotEquals($storageDevice[0]->getAddress(), $fakeRequest->getStorageDevice()->getStorage()); - } - - public function testThrowsExceptionOnDetachStorage(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/storage/detach', - $this->fakeHeadersAsArray - ); - - $fakeRequest = $this->fixture->getDetachRequest(); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->detachStorage($this->serverId, $fakeRequest); - } - - public function testLoadCdrom(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getServerResponseBody()); - - $fakeRequest = $this->fixture->getLoadCdromRequest(); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->loadCdrom($this->serverId, $fakeRequest); - - $this->assertInstanceOf(CreateServerResponse::class, $response); - $this->assertInstanceOf(Server::class, $server = $response->getServer()); - $storageDevice = $server->getStorageDevices()->getStorageDevice(); - $this->assertEquals($storageDevice[0]->getStorage(), $fakeRequest->getStorageDevice()->getStorage()); - } - - public function testThrowsExceptionOnLoadCdrom(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/cdrom/load', - $this->fakeHeadersAsArray - ); - - $fakeRequest = $this->fixture->getLoadCdromRequest(); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->loadCdrom($this->serverId, $fakeRequest); - } - - public function testThrowsExceptionOnEjectCdrom(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/cdrom/eject', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->ejectCdrom($this->serverId); - } - - public function testCloneStorage(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - - $fakeRequest = $this->fixture->getCloneRequest(); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->cloneStorage($fakeRequest->getStorage()->getUuid(), $fakeRequest); - - - $this->assertInstanceOf(CreateStorageResponse::class, $response); - $this->assertEquals($response->getStorage(), $fakeRequest->getStorage()); - } - - public function testThrowsExceptionOnCloneStorage(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getCloneRequest(); - $request = new Request( - 'POST', - $this->url . 'storage/'.$fakeRequest->getStorage()->getUuid().'/clone', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->cloneStorage($fakeRequest->getStorage()->getUuid(), $fakeRequest); - } - - public function testThrowsExceptionOnCancelOperation(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getCreateRequest(); - $request = new Request( - 'POST', - $this->url . 'storage/'.$fakeRequest->getStorage()->getUuid().'/cancel', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->cancelOperation($fakeRequest->getStorage()->getUuid()); - } - - public function testTemplatizeStorage(): void - { - $fakeResponse = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getResponseBodyByIndex(3) - ); - - $fakeRequest = $this->fixture->getTemplitizeStorageRequest(3); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->templatizeStorage($fakeRequest->getStorage()->getUuid(), $fakeRequest); - - - $this->assertInstanceOf(CreateStorageResponse::class, $response); - $this->assertEquals($response->getStorage(), $fakeRequest->getStorage()); - } - - public function testThrowsExceptionOnTemplatizeStorage(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getTemplitizeStorageRequest(3); - $request = new Request( - 'POST', - $this->url . 'storage/'.$fakeRequest->getStorage()->getUuid().'/templatize', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->cancelOperation($fakeRequest->getStorage()->getUuid()); - } - - public function testBackupStorage(): void - { - $fakeResponse = new Response( - 200, - $this->fakeHeadersAsArray, - $this->fixture->getResponseBodyByIndex(1) - ); - - $fakeRequest = $this->fixture->getBackupStorageRequest(1); - - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->backupStorage($fakeRequest->getStorage()->getUuid(), $fakeRequest); - - - $this->assertInstanceOf(CreateStorageResponse::class, $response); - $this->assertEquals($response->getStorage(), $fakeRequest->getStorage()); - } - - public function testThrowsExceptionOnBackupStorage(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getBackupStorageRequest(1); - $request = new Request( - 'POST', - $this->url . 'storage/'.$fakeRequest->getStorage()->getUuid().'/backup', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->backupStorage($fakeRequest->getStorage()->getUuid(), $fakeRequest); - } - - public function testThrowsExceptionOnRestoreStorage(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getBackupStorageRequest(1); - $request = new Request( - 'POST', - $this->url . 'storage/'.$fakeRequest->getStorage()->getUuid().'/restore', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->restoreStorage($fakeRequest->getStorage()->getUuid()); - } - - public function testThrowsExceptionOnFavoriteStorage(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getCreateRequest(); - $request = new Request( - 'POST', - $this->url . 'storage/'.$fakeRequest->getStorage()->getUuid().'/favorite', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->favoriteStorage($fakeRequest->getStorage()->getUuid()); - } - - public function testThrowsExceptionOnUnfavoriteStorage(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getCreateRequest(); - $request = new Request( - 'DELETE', - $this->url . 'storage/'.$fakeRequest->getStorage()->getUuid().'/restore', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->unfavoriteStorage($fakeRequest->getStorage()->getUuid()); - } - - public function testThrowsExceptionOnDeleteStorage(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $fakeRequest = $this->fixture->getCreateRequest(); - $request = new Request( - 'DELETE', - $this->url . 'storage/'.$fakeRequest->getStorage()->getUuid(), - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->deleteStorage($fakeRequest->getStorage()->getUuid()); - } -} diff --git a/test/Api/TagApi/TagApiAsyncTest.php b/test/Api/TagApi/TagApiAsyncTest.php deleted file mode 100644 index f41e00c6..00000000 --- a/test/Api/TagApi/TagApiAsyncTest.php +++ /dev/null @@ -1,241 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new TagApi($this->mock); - $this->fixture = new TagApiFixture; - } - - public function testListTagsAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->listTagsAsync(); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(TagListResponse::class, $result = $promise->wait()); - $this->assertEquals($result, $this->fixture->getResponse()); - } - - public function testCreateTagAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getCreateRequest(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->createTagAsync($fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateNewTagResponse::class, $result = $promise->wait()); - $this->assertEquals($result, $this->fixture->getCreateResponse()); - } - - public function testThrowsExceptionOnCreateTagAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'tag', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->createTagAsync($fakeRequest)->wait(); - } - - public function testModifyTagAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getModifyRequest(); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->modifyTagAsync('TEST', $fakeRequest); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateNewTagResponse::class, $result = $promise->wait()); - $this->assertEquals($result, $this->fixture->getCreateResponse()); - } - - public function testThrowsExceptionOnModifyTagAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'PUT', - $this->url . 'tag', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getModifyRequest(); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->modifyTagAsync('TEST', $fakeRequest)->wait(); - } - - public function testThrowsExceptionOnDeleteTagAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'DELETE', - $this->url . 'tag', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->deleteTagAsync('TEST')->wait(); - } - - public function testAssignTagAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getServerResponseBody()); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->assignTagAsync($this->serverId, 'TEST'); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateServerResponse::class, $result = $promise->wait()); - $this->assertInstanceOf(Server::class, $result->getServer()); - $this->assertContains('TEST', $result->getServer()->getTags()->getTag()); - } - - public function testThrowsExceptionOnAssignTagAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/tag/TEST', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->assignTagAsync($this->serverId, 'TEST')->wait(); - } - - public function testUntagAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getServerResponseBody()); - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->untagAsync($this->serverId, 'DEV'); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(CreateServerResponse::class, $result = $promise->wait()); - $this->assertInstanceOf(Server::class, $result->getServer()); - $this->assertNotContains('DEV', $result->getServer()->getTags()->getTag()); - } - - public function testThrowsExceptionOnUntagAsync(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/untag/TEST', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(Promise\Create::rejectionFor(new RequestException('Bad Request', $request, $response))); - - $this->api->assignTagAsync($this->serverId, 'TEST')->wait(); - } -} diff --git a/test/Api/TagApi/TagApiTest.php b/test/Api/TagApi/TagApiTest.php deleted file mode 100644 index e4d14e45..00000000 --- a/test/Api/TagApi/TagApiTest.php +++ /dev/null @@ -1,230 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new TagApi($this->mock); - $this->fixture = new TagApiFixture; - } - - public function testListTags(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->listTags(); - - $this->assertInstanceOf(TagListResponse::class, $response); - $this->assertEquals($response, $this->fixture->getResponse()); - } - - public function testCreateTag(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getCreateRequest(); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->createTag($fakeRequest); - - $this->assertEquals($response, $this->fixture->getCreateResponse()); - } - - public function testThrowsExceptionOnCreateTag(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'tag', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getCreateRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->createTag($fakeRequest); - } - - public function testModifyTag(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBodyByIndex()); - $fakeRequest = $this->fixture->getModifyRequest(); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->modifyTag('TEST', $fakeRequest); - - $this->assertEquals($response, $this->fixture->getCreateResponse()); - } - - public function testThrowsExceptionOnModifyTag(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'PUT', - $this->url . 'tag', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $fakeRequest = $this->fixture->getModifyRequest(); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->modifyTag('TEST', $fakeRequest); - } - - public function testThrowsExceptionOnDeleteTag(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'DELETE', - $this->url . 'tag', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->deleteTag('TEST'); - } - - public function testAssignTag(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getServerResponseBody()); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->assignTag($this->serverId, 'TEST'); - - $this->assertInstanceOf(CreateServerResponse::class, $response); - $this->assertInstanceOf(Server::class, $response->getServer()); - $this->assertContains('TEST', $response->getServer()->getTags()->getTag()); - } - - public function testThrowsExceptionOnAssignTag(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/tag/TEST', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->assignTag($this->serverId, 'TEST'); - } - - public function testUntag(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getServerResponseBody()); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->untag($this->serverId, 'DEV'); - - $this->assertInstanceOf(CreateServerResponse::class, $response); - $this->assertInstanceOf(Server::class, $response->getServer()); - $this->assertNotContains('DEV', $response->getServer()->getTags()->getTag()); - } - - public function testThrowsExceptionOnUntag(): void - { - $this->expectException(ApiException::class); - $this->expectExceptionCode(400); - $request = new Request( - 'POST', - $this->url . 'server/'.$this->serverId. '/untag/TEST', - $this->fakeHeadersAsArray - ); - - $response = new Response(400, $this->fakeHeadersAsArray); - - $this->mock - ->shouldReceive('send') - ->once() - ->andThrow(new RequestException('Bad Request', $request, $response)); - - $this->api->assignTag($this->serverId, 'TEST'); - } -} diff --git a/test/Api/TimezoneApi/TimezoneApiTest.php b/test/Api/TimezoneApi/TimezoneApiTest.php deleted file mode 100644 index c4c9b7d9..00000000 --- a/test/Api/TimezoneApi/TimezoneApiTest.php +++ /dev/null @@ -1,80 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new TimezoneApi($this->mock); - $this->fixture = new TimezoneApiFixture; - } - - public function testListTimezones(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->listTimezones(); - - $this->assertInstanceOf(TimezoneListResponse::class, $response); - $this->assertEquals($response, $this->fixture->getResponse()); - } - - public function testListTimezonesAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->listTimezonesAsync(); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(TimezoneListResponse::class, $result = $promise->wait()); - $this->assertEquals($result, $this->fixture->getResponse()); - } -} diff --git a/test/Api/ZoneApi/ZoneApiTest.php b/test/Api/ZoneApi/ZoneApiTest.php deleted file mode 100644 index 92c72e49..00000000 --- a/test/Api/ZoneApi/ZoneApiTest.php +++ /dev/null @@ -1,80 +0,0 @@ -mock = Mockery::mock(Client::class); - $this->api = new ZoneApi($this->mock); - $this->fixture = new ZoneApiFixture; - } - - public function testListZones(): void - { - $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - $this->mock - ->shouldReceive('send') - ->once() - ->andReturn($fakeResponse); - - $response = $this->api->listZones(); - - $this->assertInstanceOf(ZoneListResponse::class, $response); - $this->assertEquals($response, $this->fixture->getResponse()); - } - - public function testListZonesAsync(): void - { - $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); - - $this->mock - ->shouldReceive('sendAsync') - ->once() - ->andReturn(new FulfilledPromise($response)); - - $promise = $this->api->listZonesAsync(); - - $this->assertInstanceOf(PromiseInterface::class, $promise); - $this->assertInstanceOf(ZoneListResponse::class, $result = $promise->wait()); - $this->assertEquals($result, $this->fixture->getResponse()); - } -} diff --git a/test/test-install-with-laravel.sh b/test/test-install-with-laravel.sh deleted file mode 100755 index 11c7ae43..00000000 --- a/test/test-install-with-laravel.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -xe - -laravel_version=${1:-9} -dir="test-$laravel_version" - -mkdir -p tmp -cd tmp -rm -rf $dir - -composer create-project laravel/laravel $dir "^$laravel_version" -cd $dir -composer config repositories.dev path ../../ -composer require upcloudltd/upcloud-php-api @dev From c6896f189c3132c3f91210d965d2dc98a1263889 Mon Sep 17 00:00:00 2001 From: Francisco Serrano Date: Fri, 30 Oct 2026 10:29:28 +0200 Subject: [PATCH 2/4] fix: PR comments --- .github/workflows/php-sdk-validation.yml | 3 +- .github/workflows/publish.yml | 5 - .github/workflows/update-docs.yml | 23 +- generator/scripts/patch_openapi.py | 51 ---- generator/tests/generated_sdk_smoke.php | 8 +- generator/tests/test_patch_openapi.py | 64 ----- sdk-repo-creation-guide.md | 311 ----------------------- 7 files changed, 12 insertions(+), 453 deletions(-) delete mode 100644 sdk-repo-creation-guide.md diff --git a/.github/workflows/php-sdk-validation.yml b/.github/workflows/php-sdk-validation.yml index 8c46997a..84b1e88b 100644 --- a/.github/workflows/php-sdk-validation.yml +++ b/.github/workflows/php-sdk-validation.yml @@ -7,9 +7,8 @@ on: paths: - ".gitattributes" - "composer.json" - - "fern/sdk/**" + - "fern/**" - "generator/**" - - "fern/generators.yaml" - "README.md" - "docs/**" - ".github/workflows/**" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0058acc5..52fdf5dd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -83,11 +83,6 @@ jobs: GH_TOKEN: ${{ github.token }} run: | set -euo pipefail - if [[ ! "$RELEASE_TAG" =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-(alpha|beta|rc)(\.(0|[1-9][0-9]*))?)?$ ]]; then - echo "::error::Expected vX.Y.Z or an alpha, beta, or rc tag, received '$RELEASE_TAG'." - exit 1 - fi - AUTH_HEADER="$(printf 'x-access-token:%s' "$GH_TOKEN" | base64 | tr -d '\n')" git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${AUTH_HEADER}" \ fetch --no-tags origin "+refs/heads/${DEFAULT_BRANCH}:refs/release-verification/main" \ diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 66273570..61a092bd 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -5,6 +5,7 @@ on: types: [docs-update] permissions: + actions: write contents: write pull-requests: write @@ -36,24 +37,13 @@ jobs: - name: Prepare versioned GitHub Pages documentation run: python3 generator/scripts/prepare_docs.py --version "$VERSION" --source "$REFERENCE_FILE" - - name: Commit docs changes - run: | - set -euo pipefail - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - - git add docs - if git diff --cached --quiet; then - echo "No new docs to commit" - exit 0 - fi - - name: Create PR for docs update + id: create-pr uses: peter-evans/create-pull-request@v7 with: token: ${{ secrets.GITHUB_TOKEN }} base: ${{ github.event.repository.default_branch }} - commit-message: "docs: update docs for ${VERSION}" + commit-message: "docs: update docs for ${{ env.VERSION }}" branch: "docs/update-${{ env.VERSION }}" title: "docs: update docs for ${{ env.VERSION }}" body: | @@ -66,3 +56,10 @@ jobs: labels: | docs automated + + - name: Validate generated docs PR + if: steps.create-pr.outputs.pull-request-number != '' + env: + GH_TOKEN: ${{ github.token }} + PR_BRANCH: ${{ steps.create-pr.outputs.pull-request-branch }} + run: gh workflow run docs-validation.yml --ref "$PR_BRANCH" diff --git a/generator/scripts/patch_openapi.py b/generator/scripts/patch_openapi.py index 7ad1a9f2..d43339c1 100644 --- a/generator/scripts/patch_openapi.py +++ b/generator/scripts/patch_openapi.py @@ -15,22 +15,6 @@ "loadBalancerMetricsSortParameter", } -HTTP_METHODS = {"get", "put", "post", "delete", "options", "head", "patch", "trace"} - - -def patch_firewall_rule_position(spec: dict[str, Any]) -> bool: - """Make numeric firewall-rule path positions usable by PHP wire-test generation.""" - schemas = spec.get("components", {}).get("schemas", {}) - schema = schemas.get("firewallRulesetServerFirewallRulePosition") - if not isinstance(schema, dict) or schema.get("type") != "string": - return False - - schema["type"] = "integer" - schema.pop("pattern", None) - schema["examples"] = [int(value) for value in schema.get("examples", [])] - return True - - def patch_sort_enums(spec: dict[str, Any]) -> int: schemas = spec.get("components", {}).get("schemas", {}) removed = 0 @@ -51,36 +35,6 @@ def patch_sort_enums(spec: dict[str, Any]) -> int: return removed -def patch_no_content_responses(spec: dict[str, Any]) -> int: - """Remove response bodies from HTTP 204 responses, which cannot contain content.""" - component_responses = spec.get("components", {}).get("responses", {}) - patched = 0 - - for path_item in spec.get("paths", {}).values(): - if not isinstance(path_item, dict): - continue - for method, operation in path_item.items(): - if method not in HTTP_METHODS or not isinstance(operation, dict): - continue - response = operation.get("responses", {}).get("204") - if not isinstance(response, dict): - continue - - target = response - reference = response.get("$ref") - if isinstance(reference, str) and reference.startswith("#/components/responses/"): - response_name = reference.rsplit("/", 1)[-1] - referenced_response = component_responses.get(response_name) - if isinstance(referenced_response, dict): - target = referenced_response - - if "content" in target: - target.pop("content") - patched += 1 - - return patched - - def main() -> int: if len(sys.argv) != 3: print("Usage: patch_openapi.py ", file=sys.stderr) @@ -104,17 +58,12 @@ def main() -> int: return 2 removed = patch_sort_enums(spec) - firewall_position_patched = patch_firewall_rule_position(spec) - no_content_responses_patched = patch_no_content_responses(spec) output_path.parent.mkdir(parents=True, exist_ok=True) with output_path.open("w", encoding="utf-8") as destination: json.dump(spec, destination, indent=2) destination.write("\n") print(f"Removed {removed} descending sort enum values") - if firewall_position_patched: - print("Patched firewall rule position schema for PHP wire-test generation") - print(f"Removed content from {no_content_responses_patched} HTTP 204 responses") return 0 diff --git a/generator/tests/generated_sdk_smoke.php b/generator/tests/generated_sdk_smoke.php index 88a6ebf8..a40960fe 100644 --- a/generator/tests/generated_sdk_smoke.php +++ b/generator/tests/generated_sdk_smoke.php @@ -29,14 +29,8 @@ throw new RuntimeException('No generated PHP files found'); } -// Check syntax and load every generated source file with Composer available. +// Load every generated source file to validate syntax and declarations. foreach ($phpFiles as $file) { - exec('php -l ' . escapeshellarg($file), $output, $status); - if ($status !== 0) { - throw new RuntimeException( - "PHP syntax check failed: {$file}\n" . implode("\n", $output) - ); - } require_once $file; } diff --git a/generator/tests/test_patch_openapi.py b/generator/tests/test_patch_openapi.py index 08fc7101..c3f8889e 100644 --- a/generator/tests/test_patch_openapi.py +++ b/generator/tests/test_patch_openapi.py @@ -71,70 +71,6 @@ def test_tolerates_missing_target_schemas(self): self.assertEqual(self.patch_openapi.patch_sort_enums(spec), 0) self.assertEqual(spec, {"components": {"schemas": {}}}) - def test_patches_numeric_firewall_rule_position(self): - spec = { - "components": { - "schemas": { - "firewallRulesetServerFirewallRulePosition": { - "type": "string", - "examples": ["1", "678"], - "pattern": "^[1-9]$", - } - } - } - } - - self.assertTrue(self.patch_openapi.patch_firewall_rule_position(spec)) - self.assertEqual( - spec["components"]["schemas"]["firewallRulesetServerFirewallRulePosition"], - {"type": "integer", "examples": [1, 678]}, - ) - - def test_removes_content_from_inline_and_referenced_204_responses(self): - spec = { - "paths": { - "/inline": { - "delete": { - "responses": { - "204": { - "description": "No content", - "content": {"application/json": {"schema": {"type": "object"}}}, - } - } - } - }, - "/referenced": { - "delete": { - "responses": { - "204": {"$ref": "#/components/responses/delete204"} - } - } - }, - }, - "components": { - "responses": { - "delete204": { - "description": "No content", - "content": {"application/json": {"schema": {"type": "object"}}}, - } - } - }, - } - - self.assertEqual(self.patch_openapi.patch_no_content_responses(spec), 2) - self.assertNotIn("content", spec["paths"]["/inline"]["delete"]["responses"]["204"]) - self.assertNotIn("content", spec["components"]["responses"]["delete204"]) - - def test_preserves_content_for_non_204_responses(self): - response = { - "description": "OK", - "content": {"application/json": {"schema": {"type": "object"}}}, - } - spec = {"paths": {"/resource": {"get": {"responses": {"200": response}}}}} - - self.assertEqual(self.patch_openapi.patch_no_content_responses(spec), 0) - self.assertIn("content", response) - def test_cli_writes_patched_copy_without_changing_input(self): source_spec = { "info": {"version": "test"}, diff --git a/sdk-repo-creation-guide.md b/sdk-repo-creation-guide.md deleted file mode 100644 index 4e641e1b..00000000 --- a/sdk-repo-creation-guide.md +++ /dev/null @@ -1,311 +0,0 @@ -# πŸ“˜ Creating a New UpCloud SDK Repository - -This guide explains how to create, configure, and operate a new UpCloud SDK repository using the **UpCloud OpenAPI SDK Template**.\ -It reflects the **current, production-ready pipeline** and clearly documents **inputs, outputs, and responsibilities** for each workflow and script. - ---- - -## 1. Purpose of the Template - -The SDK template standardizes: - -- Regeneration of SDKs from OpenAPI specs -- Pull-request–based updates (no direct pushes to `main`) -- Versioned GitHub releases -- Versioned reference documentation -- Publishing to external registries (Packagist, npm, etc.) - -The template is **language-agnostic**.\ -Each SDK repository only needs to implement generator scripts β€” **not workflows**. - ---- - -## 2. Prerequisites - -Before creating a new SDK repository: - -- You have write access to the **UpCloud GitHub organization** -- You have access to the **SDK template repository** -- You know which generator you will use: - - Fern - - OpenAPI Generator - - Custom generator - -You do **not** need to configure GitLab.\ -GitLab already dispatches spec releases to SDK repositories. - ---- - -## 3. Creating a New SDK Repository - -1. Go to **GitHub β†’ UpCloud organization** -2. Click **New Repository** -3. Select **Use a template** -4. Choose the **UpCloud OpenAPI SDK Template** -5. Name the repository: - - ``` - upcloud--sdk - ``` - -6. Create the repository - ---- - -## 4. Repository Structure (From Template) - -``` -.github/workflows/ - regenerate.yml # regenerate SDK from OpenAPI spec - release.yml # build GitHub release from merged code - publish.yml # publish SDK to registry (optional) - update-docs.yml # version & publish reference docs - -generator/ - openapi/ # standardized spec input location - scripts/ - generate.sh # REQUIRED: SDK generation entrypoint - prepare-release.sh# REQUIRED: release packaging - publish.sh # OPTIONAL: registry publishing - -docs/ # versioned documentation (generated) -README.md -LICENSE -.gitignore -``` - -> **Important:**\ -> Workflow files are shared and should not be modified in normal SDK repos. - ---- - -## 5. End-to-End Execution Flow - -``` -GitLab OpenAPI release - ↓ -repository_dispatch (spec_released) - ↓ -regenerate.yml - ↓ -PR with regenerated SDK - ↓ (manual review & merge) -git tag vX.Y.Z - ↓ -release.yml - ↓ -GitHub Release + artifacts - ↓ -update-docs.yml (docs PR, needs manual review and merge) - ↓ -publish.yml -``` - ---- - -## 6. Workflow Contracts (Critical) - -This section defines **hard contracts** between workflows and scripts. You will have to implement these scripts for each sdk we are generating. - ---- - -### regenerate.yml β€” SDK Regeneration - -**Trigger** -``` -repository_dispatch (spec_released in GitLab) -``` - -**Inputs** - -| Source | Description | -|------|------------| -| `github.event.client_payload.version` | Spec version (`vX.Y.Z`) | -| `github.event.client_payload.asset_url` | URL to spec tarball | -| `SPECS_ACCESS_PAT` (secret) | Token to download spec from GitHub. Must have repo access to download the specs | - -**Guaranteed Input Location** - -``` -generator/openapi/spec.json -``` - -This path is **mandatory** for all SDKs. - -**Script Called** - -``` -generator/scripts/generate.sh -``` - -**Responsibilities of generate.sh** - -- Read `generator/openapi/spec.json` -- Run language-specific generator -- Write SDK source code into the repository -- ❌ Do NOT commit -- ❌ Do NOT tag -- ❌ Do NOT create releases - -**Output** - -- Pull request: - ``` - regen/vX.Y.Z - ``` - ---- - -### release.yml β€” Build GitHub Release - -**Trigger** -``` -git push tag vX.Y.Z -``` - -**Inputs** -- Repository state after regeneration PR has been merged - -**Script Called** -``` -generator/scripts/prepare-release.sh vX.Y.Z -``` - -**Responsibilities of prepare-release.sh** - -- Validate generated SDK -- Install dependencies if needed -- Create release artifacts -- Write artifacts to: - -``` -generator/release-artifacts/ -``` - -**Output** -- GitHub Release `vX.Y.Z` -- Uploaded artifacts -- Dispatches `docs-update` event - ---- - -### update-docs.yml β€” Versioned Documentation - -**Trigger** -``` -repository_dispatch (docs-update) -``` - -**Inputs** - -| Variable | Description | -|--------|------------| -| `VERSION` | SDK version (`vX.Y.Z`) | -| `REFERENCE_FILE` | Path to generated reference file | - -Example (Fern): -``` -REFERENCE_FILE=fern/sdk/reference.md -``` - -**Responsibilities** - -- Validate reference file exists -- Copy reference into: - ``` - docs/latest/reference.md - docs/vX.Y.Z/reference.md - ``` -- Regenerate `docs/index.md` -- Create documentation PR - -**Output** -- PR updating `/docs` -- Content ready for GitHub Pages - ---- - -### publish.yml β€” Registry Publishing (Optional) - -**Trigger** -``` -workflow_run (release.yml succeeded; publisher verifies its release-identity artifact) -``` - -**Inputs** -- Git tag `vX.Y.Z` -- Exact release commit SHA -- Registry credentials (language-specific) - -**Script Called** -``` -generator/scripts/publish.sh vX.Y.Z -``` - ---- - -## 7. Required Secrets - -### GitHub Secrets (per SDK repo) - -| Name | Purpose | -|----|--------| -| `SPECS_ACCESS_PAT` | GitHub token used to download OpenAPI spec artifacts from a draft GitHub release in the SDK repository - ---- - -## 8. GitHub Pages Setup (One-Time) - -Once documentation exists: - -1. Go to **Repository β†’ Settings β†’ Pages** -2. Source: **Deploy from a branch** -3. Branch: `main` -4. Folder: `/docs` - -Docs will be available at: - -``` -https://upcloudltd.github.io// -``` - ---- - -## 9. SDK Author Checklist (One Page) - -### Repository -- [ ] Created from SDK template -- [ ] Public repo -- [ ] GitHub Pages enabled - -### Secrets -- [ ] `SPECS_ACCESS_PAT` configured -- [ ] Registry secrets added (if applicable) - -### Generation -- [ ] `generate.sh` implemented -- [ ] Reads from `generator/openapi/spec.json` -- [ ] Writes SDK code to repo -- [ ] No commits or tags - -### Release -- [ ] `prepare-release.sh` implemented -- [ ] Outputs artifacts to `generator/release-artifacts/` - -### Documentation -- [ ] Reference file generated -- [ ] `REFERENCE_FILE` path correct -- [ ] Docs PR workflow verified - -### Publishing -- [ ] `publish.yml` present -- [ ] Triggered only after successful release -- [ ] Registry credentials configured - -### End-to-End -- [ ] Spec release creates regen PR -- [ ] PR merged manually -- [ ] Tag `vX.Y.Z` pushed -- [ ] GitHub release created -- [ ] Docs PR created -- [ ] Package published \ No newline at end of file From c7298c956ca0c7aeea1ceb86b28683e2c6f26c84 Mon Sep 17 00:00:00 2001 From: Francisco Serrano Date: Fri, 30 Oct 2026 11:30:09 +0200 Subject: [PATCH 3/4] fix: test --- generator/tests/release.test.mjs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/generator/tests/release.test.mjs b/generator/tests/release.test.mjs index d9857959..02c6263e 100644 --- a/generator/tests/release.test.mjs +++ b/generator/tests/release.test.mjs @@ -75,8 +75,11 @@ test('workflow validators match the publisher numeric prerelease contract', () = const pattern = publisherText.match(/=~ (\^v\S+) \]\]/)[1]; const release = readFileSync(resolve(root, '.github/workflows/release.yml'), 'utf8'); const publish = readFileSync(resolve(root, '.github/workflows/publish.yml'), 'utf8'); - const patterns = [...`${release}\n${publish}`.matchAll(/=~ (\^v\S+) \]\]/g)]; - assert.equal(patterns.length, 3); + const releasePatterns = [...release.matchAll(/=~ (\^v\S+) \]\]/g)]; + const publishPatterns = [...publish.matchAll(/=~ (\^v\S+) \]\]/g)]; + assert.equal(releasePatterns.length, 1); + assert.equal(publishPatterns.length, 1); + const patterns = [...releasePatterns, ...publishPatterns]; for (const match of patterns) assert.equal(match[1], pattern); }); From 62b35397fd485f0be00a8b9744d012dfda8f9e6f Mon Sep 17 00:00:00 2001 From: Francisco Serrano Date: Fri, 30 Oct 2026 12:02:46 +0200 Subject: [PATCH 4/4] chore: update releasing.md --- releasing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/releasing.md b/releasing.md index bd3a80c6..1c9d6780 100644 --- a/releasing.md +++ b/releasing.md @@ -6,10 +6,10 @@ Protect `main` before releasing: require reviewed pull requests and block force- Add these under **Settings β†’ Secrets and variables β†’ Actions** for this repository: -- Repository variable `PACKAGIST_PUBLISH_ENABLED` with value `true`, enabled only when ready to publish. +- Repository variable `PACKAGIST_PUBLISH_ENABLED` with value `true`, enabled only when ready to publish. If it is `false`, the build can still create a GitHub Release, but the separate Packagist job stops before using credentials. Set it to `true` before pushing the tag you intend to publish. - Repository secrets `PACKAGIST_USERNAME` and `PACKAGIST_TOKEN` with your Packagist username and safe API token. -The publisher uses only the repository-level variable and secrets above; it does not need a GitHub Environment. It verifies the release tag and commit are on protected `main` before using the Packagist credentials. +The publisher needs the repository-level variable and Packagist secrets above; it does not need a GitHub Environment. GitHub supplies the built-in `GITHUB_TOKEN` automatically for artifact access and release verification. `SPECS_ACCESS_PAT` is used by the separate SDK regeneration workflow, not by a manual release-tag publish. The publisher verifies the release tag and commit are on protected `main` before using the Packagist credentials. Keep the existing Packagist package pointed at `https://github.com/UpCloudLtd/upcloud-php-api`. Do not change the package name or move existing v1-v3 tags. The new SDK replaces the implementation in this repository while historical versions remain at their original commits. @@ -35,7 +35,7 @@ The release workflow uploads the tag and exact commit in a release-identity arti ### Alpha, beta, and release candidates -Prereleases use the upcoming stable version followed by `-alpha`, `-beta`, or `-rc`. You may add a dot and number to distinguish iterations. For example, publish `v4.0.0-alpha.1`, then `v4.0.0-alpha.2`, `v4.0.0-beta.1`, and `v4.0.0-rc.1` before the stable `v4.0.0` release. Each tag creates a GitHub prerelease and is indexed on Packagist. +Prereleases use the upcoming stable version followed by `-alpha`, `-beta`, or `-rc`. You may add a dot and number to distinguish iterations. For example, publish `v4.0.0-alpha.1`, then `v4.0.0-alpha.2`, `v4.0.0-beta.1`, and `v4.0.0-rc.1` before the stable `v4.0.0` release. Each tag creates a GitHub prerelease. Packagist indexing is confirmed only when the enabled publisher workflow succeeds and uploads its receipt; Packagist may also discover tags independently, so tag visibility alone is not proof that this workflow completed. Create a prerelease tag in the same way as a stable tag: