From c3f20ff25e4c93079fe49dac4907e7cbf99cc886 Mon Sep 17 00:00:00 2001 From: sanjusss Date: Tue, 11 Sep 2018 17:39:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0.net=20core=202.0?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +- UCloudSDK.NetCore2/Helpers/FileHelper.cs | 121 +++ UCloudSDK.NetCore2/Helpers/MimeHelper.cs | 608 ++++++++++++++ UCloudSDK.NetCore2/Helpers/RestSharpHelper.cs | 153 ++++ UCloudSDK.NetCore2/Helpers/StringHelper.cs | 134 +++ UCloudSDK.NetCore2/Helpers/TypeHelper.cs | 34 + UCloudSDK.NetCore2/Models/Enums.cs | 672 +++++++++++++++ UCloudSDK.NetCore2/Models/SMS/SMSRequest.cs | 57 ++ UCloudSDK.NetCore2/Models/SMS/SMSResponse.cs | 9 + .../Models/SecurityGroupRule.cs | 63 ++ .../Models/UCDN/BuyUcdnTrafficRequest.cs | 55 ++ .../Models/UCDN/BuyUcdnTrafficResponse.cs | 20 + .../Models/UCDN/CreateUcdnDomainRequest.cs | 110 +++ .../Models/UCDN/CreateUcdnDomainResponse.cs | 28 + .../UCDN/DescribePrefetchCacheTask.TaskSet.cs | 56 ++ .../UCDN/DescribePrefetchCacheTaskRequest.cs | 85 ++ .../UCDN/DescribePrefetchCacheTaskResponse.cs | 35 + .../UCDN/DescribeRefreshCacheTask.TaskSet.cs | 56 ++ .../UCDN/DescribeRefreshCacheTaskRequest.cs | 85 ++ .../UCDN/DescribeRefreshCacheTaskResponse.cs | 35 + .../UCDN/DescribeUcdnDomain.DomainSet.cs | 159 ++++ .../Models/UCDN/DescribeUcdnDomainRequest.cs | 53 ++ .../Models/UCDN/DescribeUcdnDomainResponse.cs | 35 + .../UCDN/GetUcdnDomainBandwidthRequest.cs | 69 ++ .../UCDN/GetUcdnDomainBandwidthSet.Set.cs | 28 + .../UCDN/GetUcdnDomainBandwidthsResponse.cs | 38 + .../Models/UCDN/GetUcdnDomainLog.LogSet.cs | 28 + .../Models/UCDN/GetUcdnDomainLogRequest.cs | 53 ++ .../Models/UCDN/GetUcdnDomainLogResponse.cs | 30 + .../GetUcdnDomainPrefetchEnableRequest.cs | 47 ++ .../GetUcdnDomainPrefetchEnableResponse.cs | 28 + .../UCDN/GetUcdnDomainTraffic.TrafficSet.cs | 28 + .../UCDN/GetUcdnDomainTrafficRequest.cs | 61 ++ .../UCDN/GetUcdnDomainTrafficResponse.cs | 30 + .../Models/UCDN/GetUcdnTraffic.TrafficSet.cs | 44 + .../Models/UCDN/GetUcdnTrafficRequest.cs | 34 + .../Models/UCDN/GetUcdnTrafficResponse.cs | 30 + .../Models/UCDN/PrefetchDomainCacheRequest.cs | 60 ++ .../UCDN/PrefetchDomainCacheResponse.cs | 20 + .../UCDN/RefreshUcdnDomainCacheRequest.cs | 65 ++ .../UCDN/RefreshUcdnDomainCacheResponse.cs | 20 + .../Models/UCDN/UpdateUcdnDomainRequest.cs | 102 +++ .../Models/UCDN/UpdateUcdnDomainResponse.cs | 20 + .../UCDN/UpdateUcdnDomainStatusRequest.cs | 56 ++ .../UCDN/UpdateUcdnDomainStatusResponse.cs | 20 + .../Models/UDB/BackupUDBInstanceRequest.cs | 72 ++ .../Models/UDB/BackupUDBInstanceResponse.cs | 17 + .../Models/UDB/ClearUDBLogRequest.cs | 75 ++ .../Models/UDB/ClearUDBLogResponse.cs | 17 + .../Models/UDB/CreateUDBInstanceRequest.cs | 183 +++++ .../Models/UDB/CreateUDBInstanceResponse.cs | 22 + .../Models/UDB/CreateUDBParamGroupRequest.cs | 81 ++ .../Models/UDB/CreateUDBParamGroupResponse.cs | 22 + .../CreateUDBReplicationInstanceRequest.cs | 88 ++ .../CreateUDBReplicationInstanceResponse.cs | 22 + .../Models/UDB/CreateUDBSlaveRequest.cs | 96 +++ .../Models/UDB/CreateUDBSlaveResponse.cs | 22 + .../Models/UDB/DeleteUDBBackupRequest.cs | 60 ++ .../Models/UDB/DeleteUDBBackupResponse.cs | 17 + .../Models/UDB/DeleteUDBInstanceRequest.cs | 57 ++ .../Models/UDB/DeleteUDBInstanceResponse.cs | 17 + .../Models/UDB/DeleteUDBParamGroupRequest.cs | 57 ++ .../Models/UDB/DeleteUDBParamGroupResponse.cs | 17 + .../Models/UDB/DescribeUDBBackup.DataSet.cs | 55 ++ .../UDB/DescribeUDBBackupBlacklistRequest.cs | 57 ++ .../UDB/DescribeUDBBackupBlacklistResponse.cs | 22 + .../Models/UDB/DescribeUDBBackupRequest.cs | 102 +++ .../Models/UDB/DescribeUDBBackupResponse.cs | 32 + .../Models/UDB/DescribeUDBInstance.DataSet.cs | 212 +++++ .../UDB/DescribeUDBInstancePrice.DataSet.cs | 28 + .../UDB/DescribeUDBInstancePriceRequest.cs | 96 +++ .../UDB/DescribeUDBInstancePriceResponse.cs | 24 + .../Models/UDB/DescribeUDBInstanceRequest.cs | 82 ++ .../Models/UDB/DescribeUDBInstanceResponse.cs | 32 + .../UDB/DescribeUDBInstanceStateRequest.cs | 57 ++ .../UDB/DescribeUDBInstanceStateResponse.cs | 22 + .../UDB/DescribeUDBParamGroup.DataSet.cs | 50 ++ .../UDB/DescribeUDBParamGroup.ParamMember.cs | 62 ++ .../UDB/DescribeUDBParamGroupRequest.cs | 74 ++ .../UDB/DescribeUDBParamGroupResponse.cs | 32 + .../Models/UDB/DescribeUDBType.DataSet.cs | 20 + .../Models/UDB/DescribeUDBTypeRequest.cs | 45 + .../Models/UDB/DescribeUDBTypeResponse.cs | 24 + .../UDB/EditUDBBackupBlacklistRequest.cs | 67 ++ .../UDB/EditUDBBackupBlacklistResponse.cs | 17 + .../UDB/ModifyUDBInstanceNameRequest.cs | 64 ++ .../UDB/ModifyUDBInstanceNameResponse.cs | 17 + .../Models/UDB/PromoteUDBSlaveRequest.cs | 65 ++ .../Models/UDB/PromoteUDBSlaveResponse.cs | 17 + .../Models/UDB/RestartUDBInstanceRequest.cs | 57 ++ .../Models/UDB/RestartUDBInstanceResponse.cs | 17 + .../Models/UDB/StartUDBInstanceRequest.cs | 57 ++ .../Models/UDB/StartUDBInstanceResponse.cs | 17 + .../Models/UDB/StopUDBInstanceRequest.cs | 57 ++ .../Models/UDB/StopUDBInstanceResponse.cs | 17 + .../Models/UDB/UpdateUDBParamGroupRequest.cs | 74 ++ .../Models/UDB/UpdateUDBParamGroupResponse.cs | 17 + .../Models/UDB/UploadUDBParamGroupRequest.cs | 92 +++ .../Models/UDB/UploadUDBParamGroupResponse.cs | 22 + .../Models/UDisk/AttachUdiskRequest.cs | 64 ++ .../Models/UDisk/AttachUdiskResponse.cs | 30 + .../Models/UDisk/CloneUDiskRequest.cs | 98 +++ .../Models/UDisk/CloneUDiskResponse.cs | 22 + .../Models/UDisk/CloneUDiskSnapshotRequest.cs | 93 +++ .../UDisk/CloneUDiskSnapshotResponse.cs | 22 + .../Models/UDisk/CreateUDiskRequest.cs | 88 ++ .../Models/UDisk/CreateUDiskResponse.cs | 22 + .../UDisk/CreateUDiskSnapshotRequest.cs | 87 ++ .../UDisk/CreateUDiskSnapshotResponse.cs | 22 + .../Models/UDisk/DeleteUDiskRequest.cs | 57 ++ .../Models/UDisk/DeleteUDiskResponse.cs | 17 + .../UDisk/DeleteUDiskSnapshotRequest.cs | 57 ++ .../UDisk/DeleteUDiskSnapshotResponse.cs | 17 + .../Models/UDisk/DescribeUDisk.DataSet.cs | 73 ++ .../UDisk/DescribeUDiskPrice.DataSet.cs | 25 + .../Models/UDisk/DescribeUDiskPriceRequest.cs | 76 ++ .../UDisk/DescribeUDiskPriceResponse.cs | 24 + .../Models/UDisk/DescribeUDiskRequest.cs | 71 ++ .../Models/UDisk/DescribeUDiskResponse.cs | 32 + .../UDisk/DescribeUDiskSnapshot.Response.cs | 60 ++ .../UDisk/DescribeUDiskSnapshotRequest.cs | 71 ++ .../UDisk/DescribeUDiskSnapshotResponse.cs | 32 + .../UDisk/DescribeUDiskUpgradePriceRequest.cs | 67 ++ .../DescribeUDiskUpgradePriceResponse.cs | 22 + .../Models/UDisk/DetachUDiskRequest.cs | 64 ++ .../Models/UDisk/DetachUDiskResponse.cs | 30 + .../Models/UDisk/RenameUDiskRequest.cs | 64 ++ .../Models/UDisk/RenameUDiskResponse.cs | 17 + .../Models/UDisk/ResizeUDiskRequest.cs | 72 ++ .../Models/UDisk/ResizeUDiskResponse.cs | 17 + .../Models/UFile/CreateBucketRequest.cs | 58 ++ .../Models/UFile/CreateBucketResponse.cs | 27 + .../Models/UFile/DeleteBucketRequest.cs | 42 + .../Models/UFile/DeleteBucketResponse.cs | 17 + .../Models/UFile/DeleteFileResponse.cs | 12 + .../Models/UFile/DescribeBucket.DataSet.cs | 49 ++ .../Models/UFile/DescribeBucket.Domain.cs | 34 + .../Models/UFile/DescribeBucketRequest.cs | 53 ++ .../Models/UFile/DescribeBucketResponse.cs | 24 + .../Models/UFile/FileResponse.cs | 27 + .../UFile/FinishMultipartUploadResponse.cs | 27 + .../Models/UFile/GetFileList.DataSet.cs | 50 ++ .../Models/UFile/GetFileListRequest.cs | 58 ++ .../Models/UFile/GetFileListResponse.cs | 24 + .../Models/UFile/GetFileResponse.cs | 12 + .../UFile/InitiateMultipartUploadResponse.cs | 32 + UCloudSDK.NetCore2/Models/UFile/PartFile.cs | 68 ++ .../Models/UFile/PostFileRequest.cs | 54 ++ .../Models/UFile/PostFileResponse.cs | 12 + .../Models/UFile/PutFileResponse.cs | 12 + .../Models/UFile/ResponseHeader.cs | 33 + .../Models/UFile/UpdateBucketRequest.cs | 47 ++ .../Models/UFile/UpdateBucketResponse.cs | 16 + .../Models/UFile/UploadHitRequest.cs | 42 + .../Models/UFile/UploadHitResponse.cs | 12 + .../Models/UFile/UploadPartResponse.cs | 17 + .../Models/UHost/AttachUdiskRequest.cs | 13 + .../Models/UHost/AttachUdiskResponse.cs | 12 + .../Models/UHost/CreateCustomImageRequest.cs | 64 ++ .../Models/UHost/CreateCustomImageResponse.cs | 25 + .../UHost/CreateUHostInstanceRequest.cs | 154 ++++ .../UHost/CreateUHostInstanceResponse.cs | 27 + .../CreateUHostInstanceSnapshotRequest.cs | 52 ++ .../CreateUHostInstanceSnapshotResponse.cs | 30 + .../Models/UHost/DescribeImage.ImageSet.cs | 61 ++ .../Models/UHost/DescribeImageRequest.cs | 82 ++ .../Models/UHost/DescribeImageResponse.cs | 32 + .../UHost/DescribeUHostInstance.DiskSet.cs | 33 + .../UHost/DescribeUHostInstance.IPSet.cs | 38 + .../UHost/DescribeUHostInstance.UHostSet.cs | 109 +++ .../UHost/DescribeUHostInstanceRequest.cs | 69 ++ .../UHost/DescribeUHostInstanceResponse.cs | 35 + ...scribeUHostInstanceSnapshot.SnapshotSet.cs | 22 + .../DescribeUHostInstanceSnapshotRequest.cs | 52 ++ .../DescribeUHostInstanceSnapshotResponse.cs | 35 + .../Models/UHost/DetachUdiskRequest.cs | 12 + .../Models/UHost/DetachUdiskResponse.cs | 12 + .../UHost/GetUHostInstancePrice.PriceSet.cs | 28 + .../UHost/GetUHostInstancePriceRequest.cs | 101 +++ .../UHost/GetUHostInstancePriceResponse.cs | 27 + .../UHost/GetUHostInstanceVncInfoRequest.cs | 52 ++ .../UHost/GetUHostInstanceVncInfoResponse.cs | 40 + .../UHost/ModifyUHostInstanceNameRequest.cs | 59 ++ .../UHost/ModifyUHostInstanceNameResponse.cs | 25 + .../UHost/ModifyUHostInstanceRemarkRequest.cs | 59 ++ .../ModifyUHostInstanceRemarkResponse.cs | 25 + .../UHost/ModifyUHostInstanceTagRequest.cs | 59 ++ .../UHost/ModifyUHostInstanceTagResponse.cs | 25 + .../UHost/RebootUHostInstanceRequest.cs | 52 ++ .../UHost/RebootUHostInstanceResponse.cs | 25 + .../UHost/ReinstallUHostInstanceRequest.cs | 85 ++ .../UHost/ReinstallUHostInstanceResponse.cs | 25 + .../ResetUHostInstancePasswordRequest.cs | 66 ++ .../ResetUHostInstancePasswordResponse.cs | 25 + .../UHost/ResizeUHostInstanceRequest.cs | 76 ++ .../UHost/ResizeUHostInstanceResponse.cs | 25 + .../Models/UHost/StartUHostInstanceRequest.cs | 52 ++ .../UHost/StartUHostInstanceResponse.cs | 25 + .../Models/UHost/StopUHostInstanceRequest.cs | 52 ++ .../Models/UHost/StopUHostInstanceResponse.cs | 25 + .../UHost/TerminateCustomImageRequest.cs | 52 ++ .../UHost/TerminateCustomImageResponse.cs | 25 + .../UHost/TerminateUHostInstanceRequest.cs | 52 ++ .../UHost/TerminateUHostInstanceResponse.cs | 27 + .../Models/ULB/AllocateBackendRequest.cs | 92 +++ .../Models/ULB/AllocateBackendResponse.cs | 28 + .../Models/ULB/BindSSLRequest.cs | 66 ++ .../Models/ULB/BindSSLResponse.cs | 25 + .../Models/ULB/CreatePolicyGroupRequest.cs | 53 ++ .../Models/ULB/CreatePolicyGroupResponse.cs | 25 + .../Models/ULB/CreatePolicyRequest.cs | 88 ++ .../Models/ULB/CreatePolicyResponse.cs | 25 + .../Models/ULB/CreateSSLRequest.cs | 70 ++ .../Models/ULB/CreateSSLResponse.cs | 25 + .../Models/ULB/CreateULBRequest.cs | 53 ++ .../Models/ULB/CreateULBResponse.cs | 25 + .../Models/ULB/CreateVServerRequest.cs | 108 +++ .../Models/ULB/CreateVServerResponse.cs | 25 + .../Models/ULB/DeletePolicyGroupRequest.cs | 52 ++ .../Models/ULB/DeletePolicyGroupResponse.cs | 20 + .../Models/ULB/DeletePolicyRequest.cs | 59 ++ .../Models/ULB/DeletePolicyResponse.cs | 20 + .../Models/ULB/DeleteSSLRequest.cs | 52 ++ .../Models/ULB/DeleteSSLResponse.cs | 20 + .../Models/ULB/DeleteULBRequest.cs | 52 ++ .../Models/ULB/DeleteULBResponse.cs | 20 + .../Models/ULB/DeleteVServerRequest.cs | 59 ++ .../Models/ULB/DeleteVServerResponse.cs | 20 + .../ULB/DescribePolicyGroup.BackendSet.cs | 27 + .../Models/ULB/DescribePolicyGroup.DataSet.cs | 32 + .../ULB/DescribePolicyGroup.PolicySet.cs | 45 + .../Models/ULB/DescribePolicyGroupRequest.cs | 66 ++ .../Models/ULB/DescribePolicyGroupResponse.cs | 30 + .../Models/ULB/DescribeSSL.DataSet.cs | 53 ++ .../Models/ULB/DescribeSSLRequest.cs | 66 ++ .../Models/ULB/DescribeSSLResponse.cs | 35 + .../Models/ULB/DescribeULB.BackendSet.cs | 61 ++ .../Models/ULB/DescribeULB.DataSet.cs | 56 ++ .../Models/ULB/DescribeULB.IPSet.cs | 30 + .../Models/ULB/DescribeULB.SSLSet.cs | 22 + .../Models/ULB/DescribeULB.VserverSet.cs | 93 +++ .../Models/ULB/DescribeULBRequest.cs | 69 ++ .../Models/ULB/DescribeULBResponse.cs | 35 + .../Models/ULB/ReleaseBackendRequest.cs | 62 ++ .../Models/ULB/ReleaseBackendResponse.cs | 20 + .../ULB/UpdateBackendAttributeRequest.cs | 78 ++ .../ULB/UpdateBackendAttributeResponse.cs | 20 + .../ULB/UpdatePolicyGroupAttributeRequest.cs | 57 ++ .../ULB/UpdatePolicyGroupAttributeResponse.cs | 20 + .../Models/ULB/UpdateULBAttributeRequest.cs | 77 ++ .../Models/ULB/UpdateULBAttributeResponse.cs | 20 + .../ULB/UpdateVServerAttributeRequest.cs | 132 +++ .../ULB/UpdateVServerAttributeResponse.cs | 20 + .../Models/UMon/GetMetric.DataSet.cs | 22 + .../Models/UMon/GetMetricRequest.cs | 94 +++ .../Models/UMon/GetMetricResponse.cs | 24 + .../Models/UNet/AllocateEIP.EIPAddr.cs | 22 + .../Models/UNet/AllocateEIP.EIPSet.cs | 27 + .../Models/UNet/AllocateEIPRequest.cs | 81 ++ .../Models/UNet/AllocateEIPResponse.cs | 27 + .../Models/UNet/AllocateVIPRequest.cs | 53 ++ .../Models/UNet/AllocateVIPResponse.cs | 27 + .../Models/UNet/BindEIPRequest.cs | 69 ++ .../Models/UNet/BindEIPResponse.cs | 20 + .../Models/UNet/CreateSecurityGroup.Rule.n.cs | 12 + .../Models/UNet/CreateSecurityGroupRequest.cs | 69 ++ .../UNet/CreateSecurityGroupResponse.cs | 20 + .../Models/UNet/DeleteSecurityGroupRequest.cs | 52 ++ .../UNet/DeleteSecurityGroupResponse.cs | 20 + .../Models/UNet/DescribeEIP.EIPAddr.cs | 25 + .../Models/UNet/DescribeEIP.EIPSet.cs | 91 +++ .../Models/UNet/DescribeEIP.Resource.cs | 27 + .../Models/UNet/DescribeEIPRequest.cs | 69 ++ .../Models/UNet/DescribeEIPResponse.cs | 35 + .../UNet/DescribeSecurityGroup.DataSet.cs | 48 ++ .../Models/UNet/DescribeSecurityGroup.Rule.cs | 37 + .../UNet/DescribeSecurityGroupRequest.cs | 63 ++ .../DescribeSecurityGroupResourceRequest.cs | 52 ++ .../DescribeSecurityGroupResourceResponse.cs | 30 + .../UNet/DescribeSecurityGroupResponse.cs | 27 + .../Models/UNet/DescribeVIPRequest.cs | 45 + .../Models/UNet/DescribeVIPResponse.cs | 27 + .../Models/UNet/GetEIPPrice.PriceSet.cs | 30 + .../Models/UNet/GetEIPPriceRequest.cs | 73 ++ .../Models/UNet/GetEIPPriceResponse.cs | 27 + .../Models/UNet/GrantSecurityGroupRequest.cs | 69 ++ .../Models/UNet/GrantSecurityGroupResponse.cs | 20 + .../Models/UNet/ModifyEIPBandwidthRequest.cs | 62 ++ .../Models/UNet/ModifyEIPBandwidthResponse.cs | 20 + .../Models/UNet/ModifyEIPWeightRequest.cs | 62 ++ .../Models/UNet/ModifyEIPWeightResponse.cs | 20 + .../Models/UNet/ReleaseEIPRequest.cs | 52 ++ .../Models/UNet/ReleaseEIPResponse.cs | 20 + .../Models/UNet/ReleaseVIPRequest.cs | 52 ++ .../Models/UNet/ReleaseVIPResponse.cs | 20 + .../Models/UNet/UnBindEIPRequest.cs | 69 ++ .../Models/UNet/UnBindEIPResponse.cs | 20 + .../Models/UNet/UpdateEIPAttributeRequest.cs | 77 ++ .../Models/UNet/UpdateEIPAttributeResponse.cs | 20 + .../Models/UNet/UpdateSecurityGroup.Rule.n.cs | 13 + .../Models/UNet/UpdateSecurityGroupRequest.cs | 62 ++ .../UNet/UpdateSecurityGroupResponse.cs | 20 + UCloudSDK.NetCore2/Models/UResponse.cs | 21 + UCloudSDK.NetCore2/SMS.cs | 20 + UCloudSDK.NetCore2/UCDN.cs | 208 +++++ UCloudSDK.NetCore2/UCloud.cs | 222 +++++ UCloudSDK.NetCore2/UCloudSDK.NetCore2.csproj | 13 + UCloudSDK.NetCore2/UDB.cs | 328 ++++++++ UCloudSDK.NetCore2/UDisk.cs | 208 +++++ UCloudSDK.NetCore2/UFile.cs | 767 ++++++++++++++++++ UCloudSDK.NetCore2/UHost.cs | 295 +++++++ UCloudSDK.NetCore2/ULB.cs | 280 +++++++ UCloudSDK.NetCore2/UMon.cs | 52 ++ UCloudSDK.NetCore2/UNet.cs | 256 ++++++ ucloud-csharp-sdk.sln | 13 +- 315 files changed, 17862 insertions(+), 3 deletions(-) create mode 100644 UCloudSDK.NetCore2/Helpers/FileHelper.cs create mode 100644 UCloudSDK.NetCore2/Helpers/MimeHelper.cs create mode 100644 UCloudSDK.NetCore2/Helpers/RestSharpHelper.cs create mode 100644 UCloudSDK.NetCore2/Helpers/StringHelper.cs create mode 100644 UCloudSDK.NetCore2/Helpers/TypeHelper.cs create mode 100644 UCloudSDK.NetCore2/Models/Enums.cs create mode 100644 UCloudSDK.NetCore2/Models/SMS/SMSRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/SMS/SMSResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/SecurityGroupRule.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/BuyUcdnTrafficRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/BuyUcdnTrafficResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/CreateUcdnDomainRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/CreateUcdnDomainResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/DescribePrefetchCacheTask.TaskSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/DescribePrefetchCacheTaskRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/DescribePrefetchCacheTaskResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/DescribeRefreshCacheTask.TaskSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/DescribeRefreshCacheTaskRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/DescribeRefreshCacheTaskResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/DescribeUcdnDomain.DomainSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/DescribeUcdnDomainRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/DescribeUcdnDomainResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainBandwidthRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainBandwidthSet.Set.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainBandwidthsResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainLog.LogSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainLogRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainLogResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainPrefetchEnableRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainPrefetchEnableResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainTraffic.TrafficSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainTrafficRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainTrafficResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/GetUcdnTraffic.TrafficSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/GetUcdnTrafficRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/GetUcdnTrafficResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/PrefetchDomainCacheRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/PrefetchDomainCacheResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/RefreshUcdnDomainCacheRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/RefreshUcdnDomainCacheResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/UpdateUcdnDomainRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/UpdateUcdnDomainResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/UpdateUcdnDomainStatusRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UCDN/UpdateUcdnDomainStatusResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/BackupUDBInstanceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/BackupUDBInstanceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/ClearUDBLogRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/ClearUDBLogResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/CreateUDBInstanceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/CreateUDBInstanceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/CreateUDBParamGroupRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/CreateUDBParamGroupResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/CreateUDBReplicationInstanceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/CreateUDBReplicationInstanceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/CreateUDBSlaveRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/CreateUDBSlaveResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DeleteUDBBackupRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DeleteUDBBackupResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DeleteUDBInstanceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DeleteUDBInstanceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DeleteUDBParamGroupRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DeleteUDBParamGroupResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackup.DataSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackupBlacklistRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackupBlacklistResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackupRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackupResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstance.DataSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstancePrice.DataSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstancePriceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstancePriceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstanceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstanceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstanceStateRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstanceStateResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBParamGroup.DataSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBParamGroup.ParamMember.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBParamGroupRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBParamGroupResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBType.DataSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBTypeRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/DescribeUDBTypeResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/EditUDBBackupBlacklistRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/EditUDBBackupBlacklistResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/ModifyUDBInstanceNameRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/ModifyUDBInstanceNameResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/PromoteUDBSlaveRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/PromoteUDBSlaveResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/RestartUDBInstanceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/RestartUDBInstanceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/StartUDBInstanceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/StartUDBInstanceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/StopUDBInstanceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/StopUDBInstanceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/UpdateUDBParamGroupRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/UpdateUDBParamGroupResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/UploadUDBParamGroupRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDB/UploadUDBParamGroupResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/AttachUdiskRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/AttachUdiskResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/CloneUDiskRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/CloneUDiskResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/CloneUDiskSnapshotRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/CloneUDiskSnapshotResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/CreateUDiskRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/CreateUDiskResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/CreateUDiskSnapshotRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/CreateUDiskSnapshotResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DeleteUDiskRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DeleteUDiskResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DeleteUDiskSnapshotRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DeleteUDiskSnapshotResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DescribeUDisk.DataSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskPrice.DataSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskPriceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskPriceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskSnapshot.Response.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskSnapshotRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskSnapshotResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskUpgradePriceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskUpgradePriceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DetachUDiskRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/DetachUDiskResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/RenameUDiskRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/RenameUDiskResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/ResizeUDiskRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UDisk/ResizeUDiskResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/CreateBucketRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/CreateBucketResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/DeleteBucketRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/DeleteBucketResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/DeleteFileResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/DescribeBucket.DataSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/DescribeBucket.Domain.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/DescribeBucketRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/DescribeBucketResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/FileResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/FinishMultipartUploadResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/GetFileList.DataSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/GetFileListRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/GetFileListResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/GetFileResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/InitiateMultipartUploadResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/PartFile.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/PostFileRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/PostFileResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/PutFileResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/ResponseHeader.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/UpdateBucketRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/UpdateBucketResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/UploadHitRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/UploadHitResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UFile/UploadPartResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/AttachUdiskRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/AttachUdiskResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/CreateCustomImageRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/CreateCustomImageResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/CreateUHostInstanceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/CreateUHostInstanceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/CreateUHostInstanceSnapshotRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/CreateUHostInstanceSnapshotResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/DescribeImage.ImageSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/DescribeImageRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/DescribeImageResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstance.DiskSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstance.IPSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstance.UHostSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceSnapshot.SnapshotSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceSnapshotRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceSnapshotResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/DetachUdiskRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/DetachUdiskResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/GetUHostInstancePrice.PriceSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/GetUHostInstancePriceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/GetUHostInstancePriceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/GetUHostInstanceVncInfoRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/GetUHostInstanceVncInfoResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceNameRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceNameResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceRemarkRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceRemarkResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceTagRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceTagResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/RebootUHostInstanceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/RebootUHostInstanceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/ReinstallUHostInstanceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/ReinstallUHostInstanceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/ResetUHostInstancePasswordRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/ResetUHostInstancePasswordResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/ResizeUHostInstanceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/ResizeUHostInstanceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/StartUHostInstanceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/StartUHostInstanceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/StopUHostInstanceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/StopUHostInstanceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/TerminateCustomImageRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/TerminateCustomImageResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/TerminateUHostInstanceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UHost/TerminateUHostInstanceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/AllocateBackendRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/AllocateBackendResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/BindSSLRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/BindSSLResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/CreatePolicyGroupRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/CreatePolicyGroupResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/CreatePolicyRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/CreatePolicyResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/CreateSSLRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/CreateSSLResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/CreateULBRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/CreateULBResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/CreateVServerRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/CreateVServerResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DeletePolicyGroupRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DeletePolicyGroupResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DeletePolicyRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DeletePolicyResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DeleteSSLRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DeleteSSLResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DeleteULBRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DeleteULBResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DeleteVServerRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DeleteVServerResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroup.BackendSet.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroup.DataSet.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroup.PolicySet.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroupRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroupResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DescribeSSL.DataSet.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DescribeSSLRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DescribeSSLResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DescribeULB.BackendSet.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DescribeULB.DataSet.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DescribeULB.IPSet.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DescribeULB.SSLSet.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DescribeULB.VserverSet.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DescribeULBRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/DescribeULBResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/ReleaseBackendRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/ReleaseBackendResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/UpdateBackendAttributeRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/UpdateBackendAttributeResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/UpdatePolicyGroupAttributeRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/UpdatePolicyGroupAttributeResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/UpdateULBAttributeRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/UpdateULBAttributeResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/UpdateVServerAttributeRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/ULB/UpdateVServerAttributeResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UMon/GetMetric.DataSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UMon/GetMetricRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UMon/GetMetricResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/AllocateEIP.EIPAddr.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/AllocateEIP.EIPSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/AllocateEIPRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/AllocateEIPResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/AllocateVIPRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/AllocateVIPResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/BindEIPRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/BindEIPResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/CreateSecurityGroup.Rule.n.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/CreateSecurityGroupRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/CreateSecurityGroupResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/DeleteSecurityGroupRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/DeleteSecurityGroupResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/DescribeEIP.EIPAddr.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/DescribeEIP.EIPSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/DescribeEIP.Resource.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/DescribeEIPRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/DescribeEIPResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroup.DataSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroup.Rule.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroupRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroupResourceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroupResourceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroupResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/DescribeVIPRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/DescribeVIPResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/GetEIPPrice.PriceSet.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/GetEIPPriceRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/GetEIPPriceResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/GrantSecurityGroupRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/GrantSecurityGroupResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/ModifyEIPBandwidthRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/ModifyEIPBandwidthResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/ModifyEIPWeightRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/ModifyEIPWeightResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/ReleaseEIPRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/ReleaseEIPResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/ReleaseVIPRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/ReleaseVIPResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/UnBindEIPRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/UnBindEIPResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/UpdateEIPAttributeRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/UpdateEIPAttributeResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/UpdateSecurityGroup.Rule.n.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/UpdateSecurityGroupRequest.cs create mode 100644 UCloudSDK.NetCore2/Models/UNet/UpdateSecurityGroupResponse.cs create mode 100644 UCloudSDK.NetCore2/Models/UResponse.cs create mode 100644 UCloudSDK.NetCore2/SMS.cs create mode 100644 UCloudSDK.NetCore2/UCDN.cs create mode 100644 UCloudSDK.NetCore2/UCloud.cs create mode 100644 UCloudSDK.NetCore2/UCloudSDK.NetCore2.csproj create mode 100644 UCloudSDK.NetCore2/UDB.cs create mode 100644 UCloudSDK.NetCore2/UDisk.cs create mode 100644 UCloudSDK.NetCore2/UFile.cs create mode 100644 UCloudSDK.NetCore2/UHost.cs create mode 100644 UCloudSDK.NetCore2/ULB.cs create mode 100644 UCloudSDK.NetCore2/UMon.cs create mode 100644 UCloudSDK.NetCore2/UNet.cs diff --git a/.gitignore b/.gitignore index 56f96ff..c0a0a3f 100644 --- a/.gitignore +++ b/.gitignore @@ -192,4 +192,5 @@ FakesAssemblies/ # LightSwitch generated files GeneratedArtifacts/ _Pvt_Extensions/ -ModelManifest.xml \ No newline at end of file +ModelManifest.xml +.vs/ \ No newline at end of file diff --git a/UCloudSDK.NetCore2/Helpers/FileHelper.cs b/UCloudSDK.NetCore2/Helpers/FileHelper.cs new file mode 100644 index 0000000..1901630 --- /dev/null +++ b/UCloudSDK.NetCore2/Helpers/FileHelper.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; + +namespace UCloudSDK +{ + /// + /// 文件帮助类 + /// + public static class FileHelper + { + /// + /// 分块长度 4*1024*1024 + /// + public const int BlockSize = 4194304; + + /// + /// 获取文件Etag. + /// + /// 文件路径. + /// ETag + public static string GetEtag(this string filePath) + { + if (!File.Exists(filePath)) + { + throw new Exception(string.Format("文件{0}不存在", filePath)); + } + + var length = GetFileLength(filePath); + + int blkcnt = (int)Math.Ceiling((double)length / (double)BlockSize); + + var buffer = BitConverter.GetBytes(blkcnt); + + if (length < BlockSize) + { + var fileBytes = File.ReadAllBytes(filePath); + var data = buffer.Concat(fileBytes.GetSha1()); + + return data.ToUrlSafeBase64(); + } + else + { + byte[] sha1 = new byte[0]; + using (var fs = File.OpenRead(filePath)) + { + for (int i = 0; i < blkcnt; i++) + { + var len = BlockSize; + if (length - BlockSize * i < len) + { + len = (int)(length - BlockSize * i); + } + var temp = new byte[len]; + int n = fs.Read(temp, 0, len); + if (n == 0) break; + sha1 = sha1.Concat(temp.GetSha1()); + } + } + var data = buffer.Concat(sha1.GetSha1()); + return data.ToUrlSafeBase64(); + } + } + + + /// + /// 获取sha1 byte[]. + /// + /// The bytes. + /// SHA1 byte[] + public static byte[] GetSha1(this byte[] bytes) + { + using (SHA1Managed sha1 = new SHA1Managed()) + { + return sha1.ComputeHash(bytes); + } + } + + /// + /// 获取Url Safe的BASE64编码. + /// + /// The bytes. + /// BASE64编码 + public static string ToUrlSafeBase64(this byte[] bytes) + { + return Convert.ToBase64String(bytes).TrimEnd('=').Replace('+', '-').Replace('/', '_'); + } + + /// + /// 把两个byte[]合并为一个. + /// + /// byte[]. + /// byte[]. + /// byte[] + public static byte[] Concat(this byte[] bytes, byte[] add) + { + if (bytes.Length == 0) + { + return add; + } + var buffer = new byte[bytes.Length + add.Length]; + Array.Copy(bytes, 0, buffer, 0, bytes.Length); + Array.Copy(add, 0, buffer, bytes.Length, add.Length); + return buffer; + } + + /// + /// 获取文件大小. + /// + /// 文件路径. + /// 文件大小 + public static long GetFileLength(this string filePath) + { + FileInfo fileInfo = new FileInfo(filePath); + return fileInfo.Length; + } + } +} diff --git a/UCloudSDK.NetCore2/Helpers/MimeHelper.cs b/UCloudSDK.NetCore2/Helpers/MimeHelper.cs new file mode 100644 index 0000000..8004ba3 --- /dev/null +++ b/UCloudSDK.NetCore2/Helpers/MimeHelper.cs @@ -0,0 +1,608 @@ +using System; +using System.Collections.Generic; + +namespace UCloudSDK +{ + /// + /// MIME帮助类 + /// + public static class MimeHelper + { + /// + /// MIME字典 + /// + public static readonly IDictionary MimeTypeMap = + new Dictionary(StringComparer.InvariantCultureIgnoreCase) + { + #region Big freaking list of mime types + + // combination of values from Windows 7 Registry and + // from C:\Windows\System32\inetsrv\config\applicationHost.config + // some added, including .7z and .dat + {".323", "text/h323"}, + {".3g2", "video/3gpp2"}, + {".3gp", "video/3gpp"}, + {".3gp2", "video/3gpp2"}, + {".3gpp", "video/3gpp"}, + {".7z", "application/x-7z-compressed"}, + {".aa", "audio/audible"}, + {".AAC", "audio/aac"}, + {".aaf", "application/octet-stream"}, + {".aax", "audio/vnd.audible.aax"}, + {".ac3", "audio/ac3"}, + {".aca", "application/octet-stream"}, + {".accda", "application/msaccess.addin"}, + {".accdb", "application/msaccess"}, + {".accdc", "application/msaccess.cab"}, + {".accde", "application/msaccess"}, + {".accdr", "application/msaccess.runtime"}, + {".accdt", "application/msaccess"}, + {".accdw", "application/msaccess.webapplication"}, + {".accft", "application/msaccess.ftemplate"}, + {".acx", "application/internet-property-stream"}, + {".AddIn", "text/xml"}, + {".ade", "application/msaccess"}, + {".adobebridge", "application/x-bridge-url"}, + {".adp", "application/msaccess"}, + {".ADT", "audio/vnd.dlna.adts"}, + {".ADTS", "audio/aac"}, + {".afm", "application/octet-stream"}, + {".ai", "application/postscript"}, + {".aif", "audio/x-aiff"}, + {".aifc", "audio/aiff"}, + {".aiff", "audio/aiff"}, + {".air", "application/vnd.adobe.air-application-installer-package+zip"}, + {".amc", "application/x-mpeg"}, + {".application", "application/x-ms-application"}, + {".art", "image/x-jg"}, + {".asa", "application/xml"}, + {".asax", "application/xml"}, + {".ascx", "application/xml"}, + {".asd", "application/octet-stream"}, + {".asf", "video/x-ms-asf"}, + {".ashx", "application/xml"}, + {".asi", "application/octet-stream"}, + {".asm", "text/plain"}, + {".asmx", "application/xml"}, + {".aspx", "application/xml"}, + {".asr", "video/x-ms-asf"}, + {".asx", "video/x-ms-asf"}, + {".atom", "application/atom+xml"}, + {".au", "audio/basic"}, + {".avi", "video/x-msvideo"}, + {".axs", "application/olescript"}, + {".bas", "text/plain"}, + {".bcpio", "application/x-bcpio"}, + {".bin", "application/octet-stream"}, + {".bmp", "image/bmp"}, + {".c", "text/plain"}, + {".cab", "application/octet-stream"}, + {".caf", "audio/x-caf"}, + {".calx", "application/vnd.ms-office.calx"}, + {".cat", "application/vnd.ms-pki.seccat"}, + {".cc", "text/plain"}, + {".cd", "text/plain"}, + {".cdda", "audio/aiff"}, + {".cdf", "application/x-cdf"}, + {".cer", "application/x-x509-ca-cert"}, + {".chm", "application/octet-stream"}, + {".class", "application/x-java-applet"}, + {".clp", "application/x-msclip"}, + {".cmx", "image/x-cmx"}, + {".cnf", "text/plain"}, + {".cod", "image/cis-cod"}, + {".config", "application/xml"}, + {".contact", "text/x-ms-contact"}, + {".coverage", "application/xml"}, + {".cpio", "application/x-cpio"}, + {".cpp", "text/plain"}, + {".crd", "application/x-mscardfile"}, + {".crl", "application/pkix-crl"}, + {".crt", "application/x-x509-ca-cert"}, + {".cs", "text/plain"}, + {".csdproj", "text/plain"}, + {".csh", "application/x-csh"}, + {".csproj", "text/plain"}, + {".css", "text/css"}, + {".csv", "text/csv"}, + {".cur", "application/octet-stream"}, + {".cxx", "text/plain"}, + {".dat", "application/octet-stream"}, + {".datasource", "application/xml"}, + {".dbproj", "text/plain"}, + {".dcr", "application/x-director"}, + {".def", "text/plain"}, + {".deploy", "application/octet-stream"}, + {".der", "application/x-x509-ca-cert"}, + {".dgml", "application/xml"}, + {".dib", "image/bmp"}, + {".dif", "video/x-dv"}, + {".dir", "application/x-director"}, + {".disco", "text/xml"}, + {".dll", "application/x-msdownload"}, + {".dll.config", "text/xml"}, + {".dlm", "text/dlm"}, + {".doc", "application/msword"}, + {".docm", "application/vnd.ms-word.document.macroEnabled.12"}, + {".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"}, + {".dot", "application/msword"}, + {".dotm", "application/vnd.ms-word.template.macroEnabled.12"}, + {".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"}, + {".dsp", "application/octet-stream"}, + {".dsw", "text/plain"}, + {".dtd", "text/xml"}, + {".dtsConfig", "text/xml"}, + {".dv", "video/x-dv"}, + {".dvi", "application/x-dvi"}, + {".dwf", "drawing/x-dwf"}, + {".dwp", "application/octet-stream"}, + {".dxr", "application/x-director"}, + {".eml", "message/rfc822"}, + {".emz", "application/octet-stream"}, + {".eot", "application/octet-stream"}, + {".eps", "application/postscript"}, + {".etl", "application/etl"}, + {".etx", "text/x-setext"}, + {".evy", "application/envoy"}, + {".exe", "application/octet-stream"}, + {".exe.config", "text/xml"}, + {".fdf", "application/vnd.fdf"}, + {".fif", "application/fractals"}, + {".filters", "Application/xml"}, + {".fla", "application/octet-stream"}, + {".flr", "x-world/x-vrml"}, + {".flv", "video/x-flv"}, + {".fsscript", "application/fsharp-script"}, + {".fsx", "application/fsharp-script"}, + {".generictest", "application/xml"}, + {".gif", "image/gif"}, + {".group", "text/x-ms-group"}, + {".gsm", "audio/x-gsm"}, + {".gtar", "application/x-gtar"}, + {".gz", "application/x-gzip"}, + {".h", "text/plain"}, + {".hdf", "application/x-hdf"}, + {".hdml", "text/x-hdml"}, + {".hhc", "application/x-oleobject"}, + {".hhk", "application/octet-stream"}, + {".hhp", "application/octet-stream"}, + {".hlp", "application/winhlp"}, + {".hpp", "text/plain"}, + {".hqx", "application/mac-binhex40"}, + {".hta", "application/hta"}, + {".htc", "text/x-component"}, + {".htm", "text/html"}, + {".html", "text/html"}, + {".htt", "text/webviewhtml"}, + {".hxa", "application/xml"}, + {".hxc", "application/xml"}, + {".hxd", "application/octet-stream"}, + {".hxe", "application/xml"}, + {".hxf", "application/xml"}, + {".hxh", "application/octet-stream"}, + {".hxi", "application/octet-stream"}, + {".hxk", "application/xml"}, + {".hxq", "application/octet-stream"}, + {".hxr", "application/octet-stream"}, + {".hxs", "application/octet-stream"}, + {".hxt", "text/html"}, + {".hxv", "application/xml"}, + {".hxw", "application/octet-stream"}, + {".hxx", "text/plain"}, + {".i", "text/plain"}, + {".ico", "image/x-icon"}, + {".ics", "application/octet-stream"}, + {".idl", "text/plain"}, + {".ief", "image/ief"}, + {".iii", "application/x-iphone"}, + {".inc", "text/plain"}, + {".inf", "application/octet-stream"}, + {".inl", "text/plain"}, + {".ins", "application/x-internet-signup"}, + {".ipa", "application/x-itunes-ipa"}, + {".ipg", "application/x-itunes-ipg"}, + {".ipproj", "text/plain"}, + {".ipsw", "application/x-itunes-ipsw"}, + {".iqy", "text/x-ms-iqy"}, + {".isp", "application/x-internet-signup"}, + {".ite", "application/x-itunes-ite"}, + {".itlp", "application/x-itunes-itlp"}, + {".itms", "application/x-itunes-itms"}, + {".itpc", "application/x-itunes-itpc"}, + {".IVF", "video/x-ivf"}, + {".jar", "application/java-archive"}, + {".java", "application/octet-stream"}, + {".jck", "application/liquidmotion"}, + {".jcz", "application/liquidmotion"}, + {".jfif", "image/pjpeg"}, + {".jnlp", "application/x-java-jnlp-file"}, + {".jpb", "application/octet-stream"}, + {".jpe", "image/jpeg"}, + {".jpeg", "image/jpeg"}, + {".jpg", "image/jpeg"}, + {".js", "application/x-javascript"}, + {".json", "application/json"}, + {".jsx", "text/jscript"}, + {".jsxbin", "text/plain"}, + {".latex", "application/x-latex"}, + {".library-ms", "application/windows-library+xml"}, + {".lit", "application/x-ms-reader"}, + {".loadtest", "application/xml"}, + {".lpk", "application/octet-stream"}, + {".lsf", "video/x-la-asf"}, + {".lst", "text/plain"}, + {".lsx", "video/x-la-asf"}, + {".lzh", "application/octet-stream"}, + {".m13", "application/x-msmediaview"}, + {".m14", "application/x-msmediaview"}, + {".m1v", "video/mpeg"}, + {".m2t", "video/vnd.dlna.mpeg-tts"}, + {".m2ts", "video/vnd.dlna.mpeg-tts"}, + {".m2v", "video/mpeg"}, + {".m3u", "audio/x-mpegurl"}, + {".m3u8", "audio/x-mpegurl"}, + {".m4a", "audio/m4a"}, + {".m4b", "audio/m4b"}, + {".m4p", "audio/m4p"}, + {".m4r", "audio/x-m4r"}, + {".m4v", "video/x-m4v"}, + {".mac", "image/x-macpaint"}, + {".mak", "text/plain"}, + {".man", "application/x-troff-man"}, + {".manifest", "application/x-ms-manifest"}, + {".map", "text/plain"}, + {".master", "application/xml"}, + {".mda", "application/msaccess"}, + {".mdb", "application/x-msaccess"}, + {".mde", "application/msaccess"}, + {".mdp", "application/octet-stream"}, + {".me", "application/x-troff-me"}, + {".mfp", "application/x-shockwave-flash"}, + {".mht", "message/rfc822"}, + {".mhtml", "message/rfc822"}, + {".mid", "audio/mid"}, + {".midi", "audio/mid"}, + {".mix", "application/octet-stream"}, + {".mk", "text/plain"}, + {".mmf", "application/x-smaf"}, + {".mno", "text/xml"}, + {".mny", "application/x-msmoney"}, + {".mod", "video/mpeg"}, + {".mov", "video/quicktime"}, + {".movie", "video/x-sgi-movie"}, + {".mp2", "video/mpeg"}, + {".mp2v", "video/mpeg"}, + {".mp3", "audio/mpeg"}, + {".mp4", "video/mp4"}, + {".mp4v", "video/mp4"}, + {".mpa", "video/mpeg"}, + {".mpe", "video/mpeg"}, + {".mpeg", "video/mpeg"}, + {".mpf", "application/vnd.ms-mediapackage"}, + {".mpg", "video/mpeg"}, + {".mpp", "application/vnd.ms-project"}, + {".mpv2", "video/mpeg"}, + {".mqv", "video/quicktime"}, + {".ms", "application/x-troff-ms"}, + {".msi", "application/octet-stream"}, + {".mso", "application/octet-stream"}, + {".mts", "video/vnd.dlna.mpeg-tts"}, + {".mtx", "application/xml"}, + {".mvb", "application/x-msmediaview"}, + {".mvc", "application/x-miva-compiled"}, + {".mxp", "application/x-mmxp"}, + {".nc", "application/x-netcdf"}, + {".nsc", "video/x-ms-asf"}, + {".nws", "message/rfc822"}, + {".ocx", "application/octet-stream"}, + {".oda", "application/oda"}, + {".odc", "text/x-ms-odc"}, + {".odh", "text/plain"}, + {".odl", "text/plain"}, + {".odp", "application/vnd.oasis.opendocument.presentation"}, + {".ods", "application/oleobject"}, + {".odt", "application/vnd.oasis.opendocument.text"}, + {".one", "application/onenote"}, + {".onea", "application/onenote"}, + {".onepkg", "application/onenote"}, + {".onetmp", "application/onenote"}, + {".onetoc", "application/onenote"}, + {".onetoc2", "application/onenote"}, + {".orderedtest", "application/xml"}, + {".osdx", "application/opensearchdescription+xml"}, + {".p10", "application/pkcs10"}, + {".p12", "application/x-pkcs12"}, + {".p7b", "application/x-pkcs7-certificates"}, + {".p7c", "application/pkcs7-mime"}, + {".p7m", "application/pkcs7-mime"}, + {".p7r", "application/x-pkcs7-certreqresp"}, + {".p7s", "application/pkcs7-signature"}, + {".pbm", "image/x-portable-bitmap"}, + {".pcast", "application/x-podcast"}, + {".pct", "image/pict"}, + {".pcx", "application/octet-stream"}, + {".pcz", "application/octet-stream"}, + {".pdf", "application/pdf"}, + {".pfb", "application/octet-stream"}, + {".pfm", "application/octet-stream"}, + {".pfx", "application/x-pkcs12"}, + {".pgm", "image/x-portable-graymap"}, + {".pic", "image/pict"}, + {".pict", "image/pict"}, + {".pkgdef", "text/plain"}, + {".pkgundef", "text/plain"}, + {".pko", "application/vnd.ms-pki.pko"}, + {".pls", "audio/scpls"}, + {".pma", "application/x-perfmon"}, + {".pmc", "application/x-perfmon"}, + {".pml", "application/x-perfmon"}, + {".pmr", "application/x-perfmon"}, + {".pmw", "application/x-perfmon"}, + {".png", "image/png"}, + {".pnm", "image/x-portable-anymap"}, + {".pnt", "image/x-macpaint"}, + {".pntg", "image/x-macpaint"}, + {".pnz", "image/png"}, + {".pot", "application/vnd.ms-powerpoint"}, + {".potm", "application/vnd.ms-powerpoint.template.macroEnabled.12"}, + {".potx", "application/vnd.openxmlformats-officedocument.presentationml.template"}, + {".ppa", "application/vnd.ms-powerpoint"}, + {".ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12"}, + {".ppm", "image/x-portable-pixmap"}, + {".pps", "application/vnd.ms-powerpoint"}, + {".ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12"}, + {".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow"}, + {".ppt", "application/vnd.ms-powerpoint"}, + {".pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12"}, + {".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"}, + {".prf", "application/pics-rules"}, + {".prm", "application/octet-stream"}, + {".prx", "application/octet-stream"}, + {".ps", "application/postscript"}, + {".psc1", "application/PowerShell"}, + {".psd", "application/octet-stream"}, + {".psess", "application/xml"}, + {".psm", "application/octet-stream"}, + {".psp", "application/octet-stream"}, + {".pub", "application/x-mspublisher"}, + {".pwz", "application/vnd.ms-powerpoint"}, + {".qht", "text/x-html-insertion"}, + {".qhtm", "text/x-html-insertion"}, + {".qt", "video/quicktime"}, + {".qti", "image/x-quicktime"}, + {".qtif", "image/x-quicktime"}, + {".qtl", "application/x-quicktimeplayer"}, + {".qxd", "application/octet-stream"}, + {".ra", "audio/x-pn-realaudio"}, + {".ram", "audio/x-pn-realaudio"}, + {".rar", "application/octet-stream"}, + {".ras", "image/x-cmu-raster"}, + {".rat", "application/rat-file"}, + {".rc", "text/plain"}, + {".rc2", "text/plain"}, + {".rct", "text/plain"}, + {".rdlc", "application/xml"}, + {".resx", "application/xml"}, + {".rf", "image/vnd.rn-realflash"}, + {".rgb", "image/x-rgb"}, + {".rgs", "text/plain"}, + {".rm", "application/vnd.rn-realmedia"}, + {".rmi", "audio/mid"}, + {".rmp", "application/vnd.rn-rn_music_package"}, + {".roff", "application/x-troff"}, + {".rpm", "audio/x-pn-realaudio-plugin"}, + {".rqy", "text/x-ms-rqy"}, + {".rtf", "application/rtf"}, + {".rtx", "text/richtext"}, + {".ruleset", "application/xml"}, + {".s", "text/plain"}, + {".safariextz", "application/x-safari-safariextz"}, + {".scd", "application/x-msschedule"}, + {".sct", "text/scriptlet"}, + {".sd2", "audio/x-sd2"}, + {".sdp", "application/sdp"}, + {".sea", "application/octet-stream"}, + {".searchConnector-ms", "application/windows-search-connector+xml"}, + {".setpay", "application/set-payment-initiation"}, + {".setreg", "application/set-registration-initiation"}, + {".settings", "application/xml"}, + {".sgimb", "application/x-sgimb"}, + {".sgml", "text/sgml"}, + {".sh", "application/x-sh"}, + {".shar", "application/x-shar"}, + {".shtml", "text/html"}, + {".sit", "application/x-stuffit"}, + {".sitemap", "application/xml"}, + {".skin", "application/xml"}, + {".sldm", "application/vnd.ms-powerpoint.slide.macroEnabled.12"}, + {".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide"}, + {".slk", "application/vnd.ms-excel"}, + {".sln", "text/plain"}, + {".slupkg-ms", "application/x-ms-license"}, + {".smd", "audio/x-smd"}, + {".smi", "application/octet-stream"}, + {".smx", "audio/x-smd"}, + {".smz", "audio/x-smd"}, + {".snd", "audio/basic"}, + {".snippet", "application/xml"}, + {".snp", "application/octet-stream"}, + {".sol", "text/plain"}, + {".sor", "text/plain"}, + {".spc", "application/x-pkcs7-certificates"}, + {".spl", "application/futuresplash"}, + {".src", "application/x-wais-source"}, + {".srf", "text/plain"}, + {".SSISDeploymentManifest", "text/xml"}, + {".ssm", "application/streamingmedia"}, + {".sst", "application/vnd.ms-pki.certstore"}, + {".stl", "application/vnd.ms-pki.stl"}, + {".sv4cpio", "application/x-sv4cpio"}, + {".sv4crc", "application/x-sv4crc"}, + {".svc", "application/xml"}, + {".swf", "application/x-shockwave-flash"}, + {".t", "application/x-troff"}, + {".tar", "application/x-tar"}, + {".tcl", "application/x-tcl"}, + {".testrunconfig", "application/xml"}, + {".testsettings", "application/xml"}, + {".tex", "application/x-tex"}, + {".texi", "application/x-texinfo"}, + {".texinfo", "application/x-texinfo"}, + {".tgz", "application/x-compressed"}, + {".thmx", "application/vnd.ms-officetheme"}, + {".thn", "application/octet-stream"}, + {".tif", "image/tiff"}, + {".tiff", "image/tiff"}, + {".tlh", "text/plain"}, + {".tli", "text/plain"}, + {".toc", "application/octet-stream"}, + {".tr", "application/x-troff"}, + {".trm", "application/x-msterminal"}, + {".trx", "application/xml"}, + {".ts", "video/vnd.dlna.mpeg-tts"}, + {".tsv", "text/tab-separated-values"}, + {".ttf", "application/octet-stream"}, + {".tts", "video/vnd.dlna.mpeg-tts"}, + {".txt", "text/plain"}, + {".u32", "application/octet-stream"}, + {".uls", "text/iuls"}, + {".user", "text/plain"}, + {".ustar", "application/x-ustar"}, + {".vb", "text/plain"}, + {".vbdproj", "text/plain"}, + {".vbk", "video/mpeg"}, + {".vbproj", "text/plain"}, + {".vbs", "text/vbscript"}, + {".vcf", "text/x-vcard"}, + {".vcproj", "Application/xml"}, + {".vcs", "text/plain"}, + {".vcxproj", "Application/xml"}, + {".vddproj", "text/plain"}, + {".vdp", "text/plain"}, + {".vdproj", "text/plain"}, + {".vdx", "application/vnd.ms-visio.viewer"}, + {".vml", "text/xml"}, + {".vscontent", "application/xml"}, + {".vsct", "text/xml"}, + {".vsd", "application/vnd.visio"}, + {".vsi", "application/ms-vsi"}, + {".vsix", "application/vsix"}, + {".vsixlangpack", "text/xml"}, + {".vsixmanifest", "text/xml"}, + {".vsmdi", "application/xml"}, + {".vspscc", "text/plain"}, + {".vss", "application/vnd.visio"}, + {".vsscc", "text/plain"}, + {".vssettings", "text/xml"}, + {".vssscc", "text/plain"}, + {".vst", "application/vnd.visio"}, + {".vstemplate", "text/xml"}, + {".vsto", "application/x-ms-vsto"}, + {".vsw", "application/vnd.visio"}, + {".vsx", "application/vnd.visio"}, + {".vtx", "application/vnd.visio"}, + {".wav", "audio/wav"}, + {".wave", "audio/wav"}, + {".wax", "audio/x-ms-wax"}, + {".wbk", "application/msword"}, + {".wbmp", "image/vnd.wap.wbmp"}, + {".wcm", "application/vnd.ms-works"}, + {".wdb", "application/vnd.ms-works"}, + {".wdp", "image/vnd.ms-photo"}, + {".webarchive", "application/x-safari-webarchive"}, + {".webtest", "application/xml"}, + {".wiq", "application/xml"}, + {".wiz", "application/msword"}, + {".wks", "application/vnd.ms-works"}, + {".WLMP", "application/wlmoviemaker"}, + {".wlpginstall", "application/x-wlpg-detect"}, + {".wlpginstall3", "application/x-wlpg3-detect"}, + {".wm", "video/x-ms-wm"}, + {".wma", "audio/x-ms-wma"}, + {".wmd", "application/x-ms-wmd"}, + {".wmf", "application/x-msmetafile"}, + {".wml", "text/vnd.wap.wml"}, + {".wmlc", "application/vnd.wap.wmlc"}, + {".wmls", "text/vnd.wap.wmlscript"}, + {".wmlsc", "application/vnd.wap.wmlscriptc"}, + {".wmp", "video/x-ms-wmp"}, + {".wmv", "video/x-ms-wmv"}, + {".wmx", "video/x-ms-wmx"}, + {".wmz", "application/x-ms-wmz"}, + {".wpl", "application/vnd.ms-wpl"}, + {".wps", "application/vnd.ms-works"}, + {".wri", "application/x-mswrite"}, + {".wrl", "x-world/x-vrml"}, + {".wrz", "x-world/x-vrml"}, + {".wsc", "text/scriptlet"}, + {".wsdl", "text/xml"}, + {".wvx", "video/x-ms-wvx"}, + {".x", "application/directx"}, + {".xaf", "x-world/x-vrml"}, + {".xaml", "application/xaml+xml"}, + {".xap", "application/x-silverlight-app"}, + {".xbap", "application/x-ms-xbap"}, + {".xbm", "image/x-xbitmap"}, + {".xdr", "text/plain"}, + {".xht", "application/xhtml+xml"}, + {".xhtml", "application/xhtml+xml"}, + {".xla", "application/vnd.ms-excel"}, + {".xlam", "application/vnd.ms-excel.addin.macroEnabled.12"}, + {".xlc", "application/vnd.ms-excel"}, + {".xld", "application/vnd.ms-excel"}, + {".xlk", "application/vnd.ms-excel"}, + {".xll", "application/vnd.ms-excel"}, + {".xlm", "application/vnd.ms-excel"}, + {".xls", "application/vnd.ms-excel"}, + {".xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12"}, + {".xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"}, + {".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}, + {".xlt", "application/vnd.ms-excel"}, + {".xltm", "application/vnd.ms-excel.template.macroEnabled.12"}, + {".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"}, + {".xlw", "application/vnd.ms-excel"}, + {".xml", "text/xml"}, + {".xmta", "application/xml"}, + {".xof", "x-world/x-vrml"}, + {".XOML", "text/plain"}, + {".xpm", "image/x-xpixmap"}, + {".xps", "application/vnd.ms-xpsdocument"}, + {".xrm-ms", "text/xml"}, + {".xsc", "application/xml"}, + {".xsd", "text/xml"}, + {".xsf", "text/xml"}, + {".xsl", "text/xml"}, + {".xslt", "text/xml"}, + {".xsn", "application/octet-stream"}, + {".xss", "application/xml"}, + {".xtp", "application/octet-stream"}, + {".xwd", "image/x-xwindowdump"}, + {".z", "application/x-compress"}, + {".zip", "application/x-zip-compressed"} + #endregion + }; + + /// + /// 获取文件MIME类型. + /// + /// 文件扩展名. + /// 文件MIME类型 + /// extension + public static string GetType(string extension) + { + if (extension == null) + { + throw new ArgumentNullException("extension"); + } + + if (!extension.StartsWith(".")) + { + extension = "." + extension; + } + + string mime; + + return MimeTypeMap.TryGetValue(extension, out mime) ? mime : "application/octet-stream"; + } + } +} \ No newline at end of file diff --git a/UCloudSDK.NetCore2/Helpers/RestSharpHelper.cs b/UCloudSDK.NetCore2/Helpers/RestSharpHelper.cs new file mode 100644 index 0000000..8cda441 --- /dev/null +++ b/UCloudSDK.NetCore2/Helpers/RestSharpHelper.cs @@ -0,0 +1,153 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using RestSharp; + +namespace UCloudSDK +{ + /// + /// RRestSharp扩展方法 + /// + public static class RestSharpHelper + { + /// + /// 获取Header值. + /// + /// 参数. + /// Header名称. + /// Header值 + public static string GetHeader(this IList parameters, string key) + { + var param = parameters.FirstOrDefault(p => p.Type == ParameterType.HttpHeader && p.Name == key); + return param != null ? param.Value.ToString() : string.Empty; + } + + /// + /// 生成标准化UCloud Header. + /// + /// 参数. + /// CanonicalizedUCloudHeaders + public static string CanonicalizedUCloudHeaders(this List parameters) + { + var header = parameters.Where(p => p.Type == ParameterType.HttpHeader); + + string canoncializedUCloudHeaders = string.Empty; + + var headerMap = new SortedDictionary(); + + foreach (var param in header.Where(p => p.Name.ToLower().StartsWith("x-ucloud-"))) + { + string headerKey = param.Name; + + headerKey = headerKey.ToLower(); + if (headerMap.ContainsKey(headerKey)) + { + headerMap[headerKey] += @","; + headerMap[headerKey] += param.Value; + } + else + { + headerMap.Add(headerKey, param.Value.ToString()); + } + } + + foreach (var item in headerMap) + { + canoncializedUCloudHeaders += (item.Key + @":" + item.Value + @"\n"); + } + return canoncializedUCloudHeaders; + } + + /// + /// 添加Ucloud对象. + /// + /// The request. + /// The object. + /// IRestRequest对象 + public static IRestRequest AddUObject(this IRestRequest request, object obj) + { + request.AddUObject(obj, new string[] { }); + return request; + } + + /// + /// 添加Ucloud对象. + /// + /// The request. + /// The object. + /// The included properties. + /// IRestRequest对象 + public static IRestRequest AddUObject(this IRestRequest request, object obj, params string[] includedProperties) + { + // automatically create parameters from object props + var type = obj.GetType(); + var props = type.GetProperties(); + + foreach (var prop in props) + { + bool isAllowed = includedProperties.Length == 0 || + (includedProperties.Length > 0 && includedProperties.Contains(prop.Name)); + + if (!isAllowed) + continue; + + var propType = prop.PropertyType; + var val = prop.GetValue(obj, null); + + if (val == null) + continue; + + if (propType.IsArray) + { + var elementType = propType.GetElementType(); + + if (((Array)val).Length > 0 && + elementType != null && + (elementType.IsPrimitive || elementType.IsValueType || elementType == typeof(string))) + { + // convert the array to an array of strings + var values = (from object item in ((Array)val) + select item.ToString()) + .ToArray(); + + val = string.Join(",", values); + } + else + { + // try to cast it + val = string.Join(",", (string[])val); + } + } + + if (propType.IsNlist()) + { + if (((NList)val).Count > 0) + { + // convert the array to an array of strings + var values = (from object item in ((NList)val) + select item.ToString()) + .ToList(); + + for (int i = 0; i < values.Count; i++) + { + request.AddParameter(prop.Name + '.' + i, values[i]); + } + } + continue; + } + + var propName = prop.Name; + + if (propName.Contains("__")) + { + propName = propName.Replace("__", "-"); + } + + request.AddParameter(propName, val); + } + + return request; + } + } +} diff --git a/UCloudSDK.NetCore2/Helpers/StringHelper.cs b/UCloudSDK.NetCore2/Helpers/StringHelper.cs new file mode 100644 index 0000000..1e0c220 --- /dev/null +++ b/UCloudSDK.NetCore2/Helpers/StringHelper.cs @@ -0,0 +1,134 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Security.Cryptography; +using System.Text; + +namespace UCloudSDK +{ + /// + /// string扩展方法 + /// + public static class StringHelper + { + /// + /// 获取文件的MD5值. + /// + /// 文件路径. + /// 文件MD5 + public static string GetMd5(this string file) + { + using (var md5 = MD5.Create()) + { + using (var stream = File.Open(file, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) + { + return BitConverter.ToString(md5.ComputeHash(stream)).Replace("-", String.Empty); + } + } + } + + /// + /// CanonicalizedResource. + /// + /// Bucket. + /// Key. + /// CanonicalizedResource + public static string CanonicalizedResource(string bucket, string key) + { + return "/" + bucket + "/" + key; + } + + /// + /// 获取base64编码. + /// + /// 字符串. + /// base64值 + public static string ToBase64(this string text) + { + var plainTextBytes = Encoding.UTF8.GetBytes(text); + return Convert.ToBase64String(plainTextBytes); + } + + /// + /// 获取Url Safe的BASE64编码. + /// + /// 字符串. + /// + /// BASE64编码 + /// + public static string ToUrlSafeBase64(this string text) + { + var base64 = text.ToBase64(); + return base64.TrimEnd('=').Replace('+', '-').Replace('/', '_'); + } + + /// + /// base64解码. + /// + /// BASE64编码字符串. + /// 字符串 + public static string DecodeBase64(this string text) + { + var plainTextBytes = Convert.FromBase64String(text); + return Encoding.UTF8.GetString(plainTextBytes); + } + + /// + /// 将_替换为-. + /// + /// 字符串. + /// 字符串 + public static string ToHyphen(this string str) + { + return str.Replace("_", "-"); + } + + /// + /// 计算SHA1. + /// + /// 字符串. + /// 签名值 + public static string ToSHA1(this string str) + { + using (SHA1Managed sha1 = new SHA1Managed()) + { + var hash = sha1.ComputeHash(Encoding.UTF8.GetBytes(str)); + var sb = new StringBuilder(hash.Length * 2); + + foreach (byte b in hash) + { + sb.Append(b.ToString("x2")); + } + + return sb.ToString(); + } + } + + + /// + /// 指示指定的字符串是 null、空还是仅由空白字符组成. + /// + /// 字符串. + /// Bool + public static bool IsNullOrWhiteSpace(this string str) + { +#if NET4 + return string.IsNullOrWhiteSpace(str); +#else + return String.IsNullOrEmpty(str) || str.Trim().Length == 0; +#endif + + } + + + /// + /// 获取文件MIME类型. + /// + /// 文件路径. + /// 文件MIME + public static string GetMimeType(this string file) + { + return MimeHelper.GetType(Path.GetExtension(file)); + } + } +} diff --git a/UCloudSDK.NetCore2/Helpers/TypeHelper.cs b/UCloudSDK.NetCore2/Helpers/TypeHelper.cs new file mode 100644 index 0000000..20b2cad --- /dev/null +++ b/UCloudSDK.NetCore2/Helpers/TypeHelper.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; + +namespace UCloudSDK +{ + /// + /// Type扩展方法 + /// + public static class TypeHelper + { + /// + /// 判断是否为NList类型. + /// + /// Params.n + /// + /// + /// The type. + /// Bool + public static bool IsNlist(this Type type) + { + return type == typeof(NList); + } + } + + /// + /// 自定义类型NList + /// + /// 用于Param.n样式的Array + /// + /// + public class NList : List + { + } +} diff --git a/UCloudSDK.NetCore2/Models/Enums.cs b/UCloudSDK.NetCore2/Models/Enums.cs new file mode 100644 index 0000000..6035aae --- /dev/null +++ b/UCloudSDK.NetCore2/Models/Enums.cs @@ -0,0 +1,672 @@ +using System; + +namespace UCloudSDK.Models +{ + /// + /// 认证方式 + /// + public enum LoginMode + { + /// + /// 密码 + /// + /// 使用密码时,密码必需进行base64编码 + /// string.ToBase64() + /// + /// + Password, + /// + /// key + /// + [Obsolete("暂不支持,请使用Password",true)] + KeyPair + } + + /// + /// 计费模式,默认为月付 + /// + public enum UHostChargeType + { + /// + /// 按年付费 + /// + Year, + + /// + /// 按月付费 + /// + Month, + + /// + /// 按需付费(需开启权限) + /// + Dynamic, + + /// + /// 试用(需开启权限) + /// + Trial + } + + /// + /// 数据中心列表 + /// + /// 使用方法:Region.cn_north_01.ToString().ToHyphen() + /// + /// + public enum Region + { + /// + /// 北京BGP-A + /// + /// Bgp: BGP线路 + /// + /// + cn_north_01, + + /// + /// 北京BGP-B + /// + /// Bgp: BGP线路 + /// + /// + cn_north_02, + + /// + /// 北京BGP-C + /// + /// Bgp: BGP线路 + /// + /// + cn_north_03, + + /// + /// 华东双线 + /// + /// Duplet: 双线, Unicom: 网通, Telecom: 电信 + /// + /// + cn_east_01, + + /// + /// 华南双线 + /// + /// Duplet: 双线, Unicom: 网通, Telecom: 电信 + /// + /// + cn_south_01, + + /// + /// 亚太 + /// + /// International: 国际线路 + /// + /// + hk_01, + + /// + /// 北美 + /// + /// International: 国际线路 + /// + /// + us_west_01 + } + + /// + /// 镜像类型 + /// + public enum ImageType + { + /// + /// 标准镜像 + /// + Base, + + /// + /// 行业镜像 + /// + Business, + + /// + /// 自定义镜像 + /// + Custom + } + + /// + /// 操作系统类型 + /// + public enum OsType + { + /// + /// The linux + /// + Linux, + /// + /// The windows + /// + Windows + } + + /// + /// 弹性IP的线路 + /// + public enum OperatorName + { + /// + /// 电信 + /// + Telecom, + + /// + /// 联通 + /// + Unicom, + + /// + /// 国际: + /// + International, + + /// + /// BGP + /// + Bgp, + + /// + /// 双线 + /// + Duplet + } + + /// + /// 弹性IP请求绑定的资源类型 + /// + public enum ResourceType + { + /// + /// 云主机 + /// + uhost, + + /// + /// 虚拟路由器 + /// + vrouter, + + /// + /// 负载均衡器 + /// + ulb + } + + /// + /// 刷新类型 + /// + public enum CDNRefreshType + { + /// + /// 文件刷新 + /// + file, + /// + /// 路径刷新 + /// + dir + } + + /// + /// 网络协议 + /// + public enum Proto + { + /// + /// The TCP + /// + TCP, + /// + /// The UDP + /// + UDP, + /// + /// The icmp + /// + ICMP, + /// + /// The gre + /// + GRE + } + + /// + /// 规则优先级 + /// + /// 使用方法:((int)Priority.High).ToString() + /// + /// + public enum Priority + { + /// + /// 高 + /// + High = 50, + /// + /// 中 + /// + Medium = 100, + /// + /// 低 + /// + Low = 150 + } + + /// + /// VServer实例的协议 + /// + public enum Protocol + { + /// + /// The HTTP + /// + HTTP, + /// + /// The TCP + /// + TCP, + /// + /// The UDP + /// + UDP + } + + /// + /// VServer负载均衡模式 + /// + public enum VServerMethod + { + /// + /// 轮询 + /// + /// 默认 + /// + /// + Roundrobin, + + /// + /// 源地址 + /// + Source + } + + /// + /// VServer会话保持方式 + /// + public enum PersistenceType + { + /// + /// 关闭会话保持 + /// + /// 默认 + /// + /// + None, + + /// + /// 自动生成; + /// + ServerInsert, + + /// + /// 用户自定义 + /// + UserDefined + } + + /// + /// 后端实例状态开关 + /// + public enum BackendEnabled + { + /// + /// 禁用 + /// + False = 0, + /// + /// 启用 + /// + /// 默认 + /// + /// + True = 1 + } + + /// + /// 购买流量的区域 + /// + public enum Areacode + { + /// + /// 国内 + /// + cn, + + /// + /// The abroad海外 + /// + abroad + } + + /// + /// UCDN计费方式 + /// 目前仅支持按流量包计费 + /// + public enum UcdnChargeType + { + /// + /// 按流量包计费 + /// + traffic, + /// + /// 按带宽计费 + /// + bandwidth, + /// + /// 流量后付费 + /// + trafficused + } + + /// + /// 加速域名的业务类型 + /// + public enum CdnType + { + /// + /// 网站 + /// + web, + /// + /// 视频 + /// + stream, + /// + /// 下载 + /// + download, + /// + /// 直播 + /// + Live + } + + /// + /// 直播类型 + /// + public enum LiveSrcType + { + /// + /// The rtmppush + /// + rtmppush, + /// + /// The rtmppull + /// + rtmppull, + /// + /// The HLS + /// + hls + } + + /// + /// 需要获取的内容刷新的状态 + /// + public enum CacheTaskStatus + { + /// + /// 成功 + /// + success, + + /// + /// 等待处理 + /// + wait, + + /// + /// 正在处理 + /// + process, + /// + /// 失败 + /// + failure, + + /// + /// 未知 + /// + unkonw + } + + /// + /// 域名状态 + /// + public enum UcdnDomainStatus + { + /// + /// 加速中 + /// + enable, + /// + /// 停止加速 + /// + disable, + /// + /// 删除加速 + /// 目前仅支持删除审核失败的域名 + /// + delete + } + + /// + /// 云主机监控指标名称 + /// + public enum UHostMetric + { + /// + /// The network in + /// + NetworkIn, + /// + /// The network out + /// + NetworkOut, + /// + /// The cpu utilization + /// + CPUUtilization, + /// + /// The io read + /// + IORead, + /// + /// The io write + /// + IOWrite, + /// + /// The disk read ops + /// + DiskReadOps, + /// + /// The nic in + /// + NICIn, + /// + /// The nic out + /// + NICOut, + /// + /// The memory usage + /// + MemUsage, + /// + /// The data space usage + /// + DataSpaceUsage, + /// + /// The root space usage + /// + RootSpaceUsage, + /// + /// The readonly disk count + /// + ReadonlyDiskCount, + /// + /// The runnable process count + /// + RunnableProcessCount, + /// + /// The block process count + /// + BlockProcessCount + } + + /// + /// 云数据库监控指标名称 + /// + public enum UdbMetric + { + /// + /// The cpu utilization + /// + CPUUtilization, + /// + /// The memory usage + /// + MemUsage, + /// + /// The QPS + /// + QPS, + /// + /// The expensive query + /// + ExpensiveQuery + } + + /// + /// 负载均衡监控指标名称 + /// + public enum UlbMetric + { + /// + /// The network out + /// + NetworkOut, + /// + /// The total network out + /// + TotalNetworkOut, + /// + /// The current connections + /// + CurrentConnections + } + + /// + /// 云内存存储监控指标名称 + /// + public enum UmemMetric + { + /// + /// The usage + /// + Usage, + /// + /// The QPS + /// + QPS, + /// + /// The instance count + /// + InstanceCount + } + + /// + /// 监控数据的资源类型 + /// + public enum MetricResourceType + { + /// + /// 云主机 + /// + uhost, + + /// + /// 云数据库 + /// + udb, + + /// + /// 负载均衡器 + /// + ulb, + + /// + /// 云内存存储 + /// + umem + } + + /// + /// 防火墙动作 + /// + public enum RuleAction + { + /// + /// 允许通过防火墙 + /// + ACCEPT, + /// + /// 禁止通过防火墙并不给任何返回信息 + /// + DROP + } + + /// + /// 日志类型 + /// + public enum UDBLogType + { + /// + /// The error + /// + [Obsolete("暂不支持,请使用binlog", true)] + error=10, + /// + /// The slow + /// + [Obsolete("暂不支持,请使用binlog", true)] + slow=20, + /// + /// The binlog + /// + binlog=30 + } + + /// + /// DB种类 + /// + public enum UDBClassType + { + /// + /// The SQL + /// + SQL, + /// + /// The nosql + /// + NOSQL + } +} \ No newline at end of file diff --git a/UCloudSDK.NetCore2/Models/SMS/SMSRequest.cs b/UCloudSDK.NetCore2/Models/SMS/SMSRequest.cs new file mode 100644 index 0000000..d6e7056 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/SMS/SMSRequest.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UCloudSDK.Models +{ + /// + /// 短信发送请求对象 + /// + public partial class SMSRequest + { + /// + /// 默认Action名称 + /// + private string _action = "SendSms"; + + /// + /// API名称 + /// + /// SendSms + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 号码列表 + /// + /// Phone.n + /// + /// + public NList Phone { get; set; } + + /// + /// 购买流量的区域 + /// + /// 枚举值为:cn: 国内; abroad: 海外 + /// + /// + public string Content { get; set; } + + /// + /// 实例化 类. + /// + /// 号码列表. + /// 短信内容. + public SMSRequest(NList phone, string content) + { + Phone = phone; + Content = content; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/SMS/SMSResponse.cs b/UCloudSDK.NetCore2/Models/SMS/SMSResponse.cs new file mode 100644 index 0000000..28f0a92 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/SMS/SMSResponse.cs @@ -0,0 +1,9 @@ +namespace UCloudSDK.Models +{ + /// + /// 短信发送结果 + /// + public partial class SMSResponse : UResponse + { + } +} \ No newline at end of file diff --git a/UCloudSDK.NetCore2/Models/SecurityGroupRule.cs b/UCloudSDK.NetCore2/Models/SecurityGroupRule.cs new file mode 100644 index 0000000..89d533d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/SecurityGroupRule.cs @@ -0,0 +1,63 @@ +namespace UCloudSDK.Models +{ + /// + /// UNet防火墙规则 + /// + public partial class SecurityGroupRule + { + /// + /// 网络协议 + /// + /// 枚举值为:TCP,UDP,ICMP,GRE + /// + /// + public string Proto { get; set; } + + /// + /// 目标端口 + /// + /// 范围:[1-65535],可指定单个端口(如80),或指定端口段(1-1024) + /// + /// + public string Dst_port { get; set; } + + /// + /// 源地址 + /// + /// 格式为’x.x.x.x/x 或 x.x.x.x’的有效IP地址。 + /// + /// + public string Src_ip { get; set; } + + /// + /// 防火墙动作 + /// + /// 枚举值为:ACCEPT:允许通过防火墙;DROP:禁止通过防火墙并不给任何返回信息 + /// + /// + public string Action { get; set; } + + /// + /// 规则优先级 + /// + /// 枚举值为:0(高),50(中),100(低) + /// + /// + public int Priority { get; set; } + + /// + /// 返回Rule格式化字符串. + /// + /// 格式:Proto|Dst_port|Src_ip|Action|Priority + /// + /// + /// + /// Proto|Dst_port|Src_ip|Action|Priority. + /// + public override string ToString() + { + return string.Format("{0}|{1}|{2}|{3}|{4}", Proto, Dst_port, Src_ip, Action, Priority); + } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/BuyUcdnTrafficRequest.cs b/UCloudSDK.NetCore2/Models/UCDN/BuyUcdnTrafficRequest.cs new file mode 100644 index 0000000..2f8c21e --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/BuyUcdnTrafficRequest.cs @@ -0,0 +1,55 @@ +namespace UCloudSDK.Models +{ + /// + /// 购买流量 + /// + /// http://docs.ucloud.cn/api/ucdn/buy_ucdn_traffic.html + /// + /// + public partial class BuyUcdnTrafficRequest + { + /// + /// 默认Action名称 + /// + private string _action = "BuyUcdnTraffic"; + + /// + /// API名称 + /// + /// BuyUcdnTraffic + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 所购买的流量 + /// + /// 单位GB + /// + /// + public int Traffic { get; set; } + + /// + /// 购买流量的区域 + /// + /// 枚举值为:cn: 国内; abroad: 海外 + /// + /// + public string Areacode { get; set; } + + /// + /// 实例化 类. + /// + /// 所购买的流量 + /// 购买流量的区域. + public BuyUcdnTrafficRequest(int traffic, string areacode) + { + Traffic = traffic; + Areacode = areacode; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/BuyUcdnTrafficResponse.cs b/UCloudSDK.NetCore2/Models/UCDN/BuyUcdnTrafficResponse.cs new file mode 100644 index 0000000..1bce08d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/BuyUcdnTrafficResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 购买流量 + /// + /// http://docs.ucloud.cn/api/ucdn/buy_ucdn_traffic.html + /// + /// + public partial class BuyUcdnTrafficResponse : UResponse + { + /// + /// 响应动作 + /// + /// BuyUcdnTrafficResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/CreateUcdnDomainRequest.cs b/UCloudSDK.NetCore2/Models/UCDN/CreateUcdnDomainRequest.cs new file mode 100644 index 0000000..3e4ce6e --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/CreateUcdnDomainRequest.cs @@ -0,0 +1,110 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建加速域名 + /// + /// http://docs.ucloud.cn/api/ucdn/create_ucdn_domain.html + /// + /// + public partial class CreateUcdnDomainRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreateUcdnDomain"; + + /// + /// API名称 + /// + /// CreateUcdnDomain + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 用于加速的域名 + /// + public string Domain { get; set; } + + /// + /// 源站IP + /// + /// 即cdn服务器回源访问的IP地址。支持多个源站IP。多个源站IP可以表述为:SourceIps.0=1.1.1.1,SourceIps.1=2.2.2.2(如果CdnType为live,则该字段非必须,否则该字段为必须字段) + /// + /// + public NList SourceIp { get; set; } + + /// + /// 测试url + /// + /// 用于域名创建加速时的测试。(如果CdnType为live,则该字段非必须,否则该字段为必须字段) + /// + /// + public string TestUrl { get; set; } + + /// + /// CDN加速区域 + /// + /// 目前区域代表有:cn:国内;abroad:国外。可选择多个区域,表述为:Areacodes.0=cn, Areacodes.1=aboard。表示同时使用国内和海外节点 + /// + /// + public NList Areacode { get; set; } + + /// + /// 加速域名的业务类型 + /// + /// web代表网站,stream代表视频,download代表下载,Live代表直播 + /// + /// + public string CdnType { get; set; } + + /// + /// 计费方式 + /// + /// 默认使用流量包计费。枚举值为:traffic:按流量包计费;bandwidth:按带宽计费;trafficused:代表流量后付费。(目前仅支持按流量包计费) + /// + /// + public string ChargeType { get; set; } + + /// + /// 直播流数 + /// + /// CdnType为live时,该字段为必须字段) + /// + /// + public int? LiveStreamCount { get; set; } + + /// + /// 直播类型 + /// + /// 枚举值为:rtmppush;rtmppull;hls(CdnType为live时,该字段为必须字段) + /// + /// + public string LiveSrcType { get; set; } + + /// + /// 用于获取流的源URL + /// + /// (LiveSrcType为rtmppull/hls时,该字段为必须字段) + /// + /// + public string LifeSrcUrl { get; set; } + + /// + /// 实例化 对象. + /// + /// 用于加速的域名. + /// CDN加速区域. + /// 加速域名的业务类型. + public CreateUcdnDomainRequest(string domain, NList areacodes, string cdnType) + { + Domain = domain; + Areacode = areacodes; + CdnType = cdnType; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/CreateUcdnDomainResponse.cs b/UCloudSDK.NetCore2/Models/UCDN/CreateUcdnDomainResponse.cs new file mode 100644 index 0000000..13f754f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/CreateUcdnDomainResponse.cs @@ -0,0 +1,28 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建加速域名 + /// + /// http://docs.ucloud.cn/api/ucdn/create_ucdn_domain.html + /// + /// + public partial class CreateUcdnDomainResponse : UResponse + { + /// + /// 响应动作 + /// + /// CreateUcdnDomainResponse + /// + /// + public string Action { get; set; } + + /// + /// 创建域名对应的域名ID + /// + /// 后续获取域名相关数据的操作均需要使用该ID + /// + /// + public string DomainId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/DescribePrefetchCacheTask.TaskSet.cs b/UCloudSDK.NetCore2/Models/UCDN/DescribePrefetchCacheTask.TaskSet.cs new file mode 100644 index 0000000..faa41e3 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/DescribePrefetchCacheTask.TaskSet.cs @@ -0,0 +1,56 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取域名预取任务状态 + /// + /// http://docs.ucloud.cn/api/ucdn/describe_prefetch_cache_task.html + /// + /// + public partial class DescribePrefetchCacheTaskSet + { + /// + /// 预取域名 + /// + public string Domain { get; set; } + + /// + /// 预取任务创建的时间 + /// + /// 格式为Unix Timestamp + /// + /// + public int CreateTime { get; set; } + + /// + /// 任务状态查询时间 + /// + /// 成功后不再查询。格式为Unix Timestamp + /// + /// + public string CheckTime { get; set; } + + /// + /// 预取提交的多条URL + /// + public List UrlLists { get; set; } + + /// + /// 预取任务的当前状态 + /// + /// 枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败;unkonw:未知 + /// + /// + public string Status { get; set; } + + /// + /// 预取任务执行的百分比 + /// + /// 1代表1%,100代表100%。(大文件下载、点播不支持展示精确进度,只有成功或失败) + /// + /// + public int Percent { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/DescribePrefetchCacheTaskRequest.cs b/UCloudSDK.NetCore2/Models/UCDN/DescribePrefetchCacheTaskRequest.cs new file mode 100644 index 0000000..5ca8599 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/DescribePrefetchCacheTaskRequest.cs @@ -0,0 +1,85 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取域名预取任务状态 + /// + /// http://docs.ucloud.cn/api/ucdn/describe_prefetch_cache_task.html + /// + /// + public partial class DescribePrefetchCacheTaskRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribePrefetchCacheTask"; + + /// + /// API名称 + /// + /// DescribePrefetchCacheTask + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 域名ID + /// + /// 创建加速域名时生成。 + /// + /// + public string DomainId { get; set; } + + /// + /// 查询的起始时间 + /// + /// 格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。 + /// + /// + public int? BeginTime { get; set; } + + /// + /// 查询的结束时间 + /// + /// 格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + /// + /// + public int? EndTime { get; set; } + + /// + /// 需要获取的内容刷新的状态 + /// + /// 枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败;unkonw:未知,默认选择所有状态 + /// + /// + public string Status { get; set; } + + /// + /// 数据偏移量 + /// + /// 默认为0 + /// + /// + public int? Offset { get; set; } + + /// + /// 返回数据的长度 + /// + /// 默认20。 + /// + /// + public int? Limit { get; set; } + + /// + /// 实例化 类. + /// + /// 域名ID. + public DescribePrefetchCacheTaskRequest(string domainId) + { + DomainId = domainId; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/DescribePrefetchCacheTaskResponse.cs b/UCloudSDK.NetCore2/Models/UCDN/DescribePrefetchCacheTaskResponse.cs new file mode 100644 index 0000000..b2f058a --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/DescribePrefetchCacheTaskResponse.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取域名预取任务状态 + /// + /// http://docs.ucloud.cn/api/ucdn/describe_prefetch_cache_task.html + /// + /// + public partial class DescribePrefetchCacheTaskResponse : UResponse + { + /// + /// 响应动作 + /// + /// DescribePrefetchCacheTaskResponse + /// + /// + public string Action { get; set; } + + /// + /// 返回总条目数 + /// + public string TotalCount { get; set; } + + /// + /// 预取任务信息 + /// + /// 具体结构见 TaskSet + /// + /// + public List TaskSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/DescribeRefreshCacheTask.TaskSet.cs b/UCloudSDK.NetCore2/Models/UCDN/DescribeRefreshCacheTask.TaskSet.cs new file mode 100644 index 0000000..8f2e44b --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/DescribeRefreshCacheTask.TaskSet.cs @@ -0,0 +1,56 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取域名刷新任务状态 + /// + /// http://docs.ucloud.cn/api/ucdn/describe_refresh_cache_task.html + /// + /// + public partial class DescribeRefreshCacheTaskSet + { + /// + /// 刷新域名 + /// + public string Domain { get; set; } + + /// + /// 刷新任务创建的时间 + /// + /// 格式为Unix Timestamp + /// + /// + public int CreateTime { get; set; } + + /// + /// 任务状态查询时间 + /// + /// 成功后不再查询。格式为Unix Timestamp + /// + /// + public string CheckTime { get; set; } + + /// + /// 刷新提交的多条URL + /// + public List UrlLists { get; set; } + + /// + /// 刷新任务的当前状态 + /// + /// 枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败;unkonw:未知 + /// + /// + public string Status { get; set; } + + /// + /// 刷新任务执行的百分比 + /// + /// 1代表1%,100代表100% + /// + /// + public int Percent { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/DescribeRefreshCacheTaskRequest.cs b/UCloudSDK.NetCore2/Models/UCDN/DescribeRefreshCacheTaskRequest.cs new file mode 100644 index 0000000..07021dc --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/DescribeRefreshCacheTaskRequest.cs @@ -0,0 +1,85 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取域名刷新任务状态 + /// + /// http://docs.ucloud.cn/api/ucdn/describe_refresh_cache_task.html + /// + /// + public partial class DescribeRefreshCacheTaskRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeRefreshCacheTask"; + + /// + /// API名称 + /// + /// DescribeRefreshCacheTask + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 域名ID + /// + /// 创建加速域名时生成。 + /// + /// + public string DomainId { get; set; } + + /// + /// 查询的起始时间 + /// + /// 格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。 + /// + /// + public int? BeginTime { get; set; } + + /// + /// 查询的结束时间 + /// + /// 格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + /// + /// + public int? EndTime { get; set; } + + /// + /// 需要获取的内容刷新的状态 + /// + /// 枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败;unkonw:未知,默认选择所有状态 + /// + /// + public string Status { get; set; } + + /// + /// 数据偏移量 + /// + /// 默认为0 + /// + /// + public int? Offset { get; set; } + + /// + /// 返回数据的长度 + /// + /// 默认20。 + /// + /// + public int? Limit { get; set; } + + /// + /// 实例化 类. + /// + /// 域名ID. + public DescribeRefreshCacheTaskRequest(string domainId) + { + DomainId = domainId; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/DescribeRefreshCacheTaskResponse.cs b/UCloudSDK.NetCore2/Models/UCDN/DescribeRefreshCacheTaskResponse.cs new file mode 100644 index 0000000..2dcf44c --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/DescribeRefreshCacheTaskResponse.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取域名刷新任务状态 + /// + /// http://docs.ucloud.cn/api/ucdn/describe_refresh_cache_task.html + /// + /// + public partial class DescribeRefreshCacheTaskResponse : UResponse + { + /// + /// 响应动作 + /// + /// DescribeRefreshCacheTaskResponse + /// + /// + public string Action { get; set; } + + /// + /// 返回总条目数 + /// + public string TotalCount { get; set; } + + /// + /// 刷新任务信息 + /// + /// 具体结构见 TaskSet + /// + /// + public List TaskSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/DescribeUcdnDomain.DomainSet.cs b/UCloudSDK.NetCore2/Models/UCDN/DescribeUcdnDomain.DomainSet.cs new file mode 100644 index 0000000..a2a2bbc --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/DescribeUcdnDomain.DomainSet.cs @@ -0,0 +1,159 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取加速域名详细信息 + /// + /// http://docs.ucloud.cn/api/ucdn/describe_ucdn_domain.html + /// + /// + public partial class DescribeUcdnDomainSet + { + /// + /// 加速域名 + /// + public string Domain { get; set; } + + /// + /// 加速域名ID + /// + /// 创建加速域名时生成 + /// + /// + public string DomainId { get; set; } + + /// + /// 源站IP + /// + /// 即cdn服务器回源访问的IP地址。多个IP地址可以表述为:[“1.1.1.1”, “2.2.2.2”] + /// + /// + public List SourceIp { get; set; } + + /// + /// 加速域名的业务类型 + /// + /// 枚举值:web:网站;Stream:视频;download:下载;live:直播 + /// + /// + public string CdnType { get; set; } + + /// + /// 计费方式 + /// + /// 枚举值为:traffic:按流量包计费;bandwidth:按带宽付费;trafficused:流量后付费(目前仅支持流量包计费) + /// + /// + public string ChargeType { get; set; } + + /// + /// 加速域名的当前状态 + /// + /// check:审核中;checkSuccess:审核通过;checkFaile:审核失败;enable(ing):(正在)加速中;disable(ing):(正在)停止加速;delete(ing):(正在)删除加速 + /// + /// + public string Status { get; set; } + + /// + /// cdn域名 + /// + /// 创建加速域名时生成的cdn域名,用于设置CNAME记录 + /// + /// + public string Cname { get; set; } + + /// + /// 域名创建的时间 + /// + /// 格式为Unix Timestamp + /// + /// + public string CreateTime { get; set; } + + /// + /// 开始分配Cname时间 + /// + /// 格式为Unix Timestamp + /// + /// + public string VaildTime { get; set; } + + /// + /// 测试URL + /// + /// 用于测试加速域名 + /// + /// + public string TestUrl { get; set; } + + /// + /// CDN加速区域 + /// + /// cn:国内;abroad:国外。[ “cn”, “abroad” ]表示两者皆启用 + /// + /// + public List Areaode { get; set; } + + /// + /// 缓存文件类型 + /// + /// 多个文件表述为: [“zip”, “txt”] + /// + /// + public List CacheFileType { get; set; } + + /// + /// 需要缓存的文件或者路径 + /// + /// 多个文件表述为:[ “http://Domain/*.jpg”, “http://Domain/*.png” ] + /// + /// + public List CacheUrl { get; set; } + + /// + /// 缓存文件生命周期 + /// + /// 单位秒 + /// + /// + public int CacheTtl { get; set; } + + /// + /// 不需要缓存的文件 + /// + /// 格式同CacheUrl + /// + /// + public List NoCacheUrl { get; set; } + + /// + /// 直播流数 + /// + public int LiveStreamCount { get; set; } + + /// + /// 直播接入类型 + /// + /// rtmppush/rtmppull/hls + /// + /// + public string LiveSrcType { get; set; } + + /// + /// 拉去流url + /// + public string LiveSrcUrl { get; set; } + + /// + /// 直播流ID + /// + public string LiveStreamIds { get; set; } + + /// + /// 流程申请失败原因 + /// + public string ApplyMessage { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/DescribeUcdnDomainRequest.cs b/UCloudSDK.NetCore2/Models/UCDN/DescribeUcdnDomainRequest.cs new file mode 100644 index 0000000..2326d41 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/DescribeUcdnDomainRequest.cs @@ -0,0 +1,53 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取加速域名详细信息 + /// + /// http://docs.ucloud.cn/api/ucdn/describe_ucdn_domain.html + /// + /// + public partial class DescribeUcdnDomainRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeUcdnDomain"; + + /// + /// API名称 + /// + /// DescribeUcdnDomain + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 域名ID + /// + /// 创建加速域名时生成。默认获取账户下所有域名。 + /// + /// + public NList DomainIds { get; set; } + + /// + /// 返回数据的偏移量 + /// + /// 默认0。 + /// + /// + public int? OffSet { get; set; } + + /// + /// 返回数据的长度 + /// + /// 默认20。 + /// + /// + public string Limit { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/DescribeUcdnDomainResponse.cs b/UCloudSDK.NetCore2/Models/UCDN/DescribeUcdnDomainResponse.cs new file mode 100644 index 0000000..cf99ccf --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/DescribeUcdnDomainResponse.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取加速域名详细信息 + /// + /// http://docs.ucloud.cn/api/ucdn/describe_ucdn_domain.html + /// + /// + public partial class DescribeUcdnDomainResponse : UResponse + { + /// + /// 响应动作 + /// + /// DescribeUcdnDomainResponse + /// + /// + public string Action { get; set; } + + /// + /// 满足条件的条目数 + /// + public int TotalCount { get; set; } + + /// + /// 获取的域名信息 + /// + /// 具体结构见 DomainSet + /// + /// + public List DomainSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainBandwidthRequest.cs b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainBandwidthRequest.cs new file mode 100644 index 0000000..64d4240 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainBandwidthRequest.cs @@ -0,0 +1,69 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取加速域名带宽使用信息 + /// + /// http://docs.ucloud.cn/api/ucdn/get_ucdn_domain_bandwidth.html + /// + /// + public partial class GetUcdnDomainBandwidthRequest + { + /// + /// 默认Action名称 + /// + private string _action = "GetUcdnDomainBandwidth"; + + /// + /// API名称 + /// + /// GetUcdnDomainBandwidth + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 域名ID + /// + /// 创建加速域名时生成。 + /// + /// + public NList DomainId { get; set; } + + /// + /// CDN加速区域 + /// + /// 目前区域代表有:cn:国内;abroad:国外。可选择多个区域,表述为:”Areacodes.0=cn, Areacodes.1=aboard”,表示同时使用国内和海外节点 + /// + /// + public NList Areacode { get; set; } + + /// + /// 查询的起始时间 + /// + /// 格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。 + /// + /// + public int? BeginTime { get; set; } + + /// + /// 查询的结束时间 + /// + /// 格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + /// + /// + public int? EndTime { get; set; } + + /// + /// 是否按天展示带宽峰值 + /// + /// 枚举值:0:否;1:是;默认为0 + /// + /// + public int? Daily { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainBandwidthSet.Set.cs b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainBandwidthSet.Set.cs new file mode 100644 index 0000000..7f9b96f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainBandwidthSet.Set.cs @@ -0,0 +1,28 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取加速域名带宽使用信息 + /// + /// http://docs.ucloud.cn/api/ucdn/get_ucdn_domain_bandwidth.html + /// + /// + public partial class GetUcdnDomainBandwidthSet + { + /// + /// 带宽获取的时间点 + /// + /// 格式为Unix Timestamp + /// + /// + public int Time { get; set; } + + /// + /// 具体带宽值 + /// + /// 单位为Mbps。其中查询区间为1天,value的值表示5分钟内的最大带宽值;查询区间为2-4天,value的值表示15分钟内的最大带宽值;查询区间为5-14天,value的值表示3-分钟内的最大带宽值;查询区间为15-30天,value的值为1小时内的带宽最大值。(如果请求参数中Daily为1,则value的值表示1天内的带宽最大值) + /// + /// + public float Value { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainBandwidthsResponse.cs b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainBandwidthsResponse.cs new file mode 100644 index 0000000..3ac27f9 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainBandwidthsResponse.cs @@ -0,0 +1,38 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取加速域名带宽使用信息 + /// + /// http://docs.ucloud.cn/api/ucdn/get_ucdn_domain_bandwidth.html + /// + /// + public partial class GetUcdnDomainBandwidthResponse : UResponse + { + /// + /// 响应动作 + /// + /// GetUcdnDomainBandwidthResponse + /// + /// + public string Action { get; set; } + + /// + /// 从起始时间到结束时间内所使用的带宽总量 + /// + /// 单位GB + /// + /// + public float Traffic { get; set; } + + /// + /// 带宽流量实例表 + /// + /// 具体结构见 BandwidthSet + /// + /// + public List BandWidthSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainLog.LogSet.cs b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainLog.LogSet.cs new file mode 100644 index 0000000..873ef58 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainLog.LogSet.cs @@ -0,0 +1,28 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取加速域名原始日志 + /// + /// http://docs.ucloud.cn/api/ucdn/get_ucdn_domain_log.html + /// + /// + public partial class GetUcdnDomainLogSet + { + /// + /// 流量获取的时间点 + /// + /// 格式为Unix Timestamp + /// + /// + public int Time { get; set; } + + /// + /// 具体获取日志连的URL + /// + /// 其中获取最近7天内的下载日志。下载日志URL中的域名后带有cn表示中国大陆,hk表示香港,ov表示国外。创建加速域名时,aboard包含hk和ov。 + /// + /// + public string Value { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainLogRequest.cs b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainLogRequest.cs new file mode 100644 index 0000000..cf9247f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainLogRequest.cs @@ -0,0 +1,53 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取加速域名原始日志 + /// + /// http://docs.ucloud.cn/api/ucdn/get_ucdn_domain_log.html + /// + /// + public partial class GetUcdnDomainLogRequest + { + /// + /// 默认Action名称 + /// + private string _action = "GetUcdnDomainLog"; + + /// + /// API名称 + /// + /// GetUcdnDomainLog + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 域名ID + /// + /// 创建加速域名时生成。 + /// + /// + public NList DomainId { get; set; } + + /// + /// 查询的起始时间 + /// + /// 格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。 + /// + /// + public int? BeginTime { get; set; } + + /// + /// 查询的结束时间 + /// + /// 格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + /// + /// + public int? EndTime { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainLogResponse.cs b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainLogResponse.cs new file mode 100644 index 0000000..99e5731 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainLogResponse.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取加速域名原始日志 + /// + /// http://docs.ucloud.cn/api/ucdn/get_ucdn_domain_log.html + /// + /// + public partial class GetUcdnDomainLogResponse : UResponse + { + /// + /// 响应动作 + /// + /// GetUcdnDomainLogResponse + /// + /// + public string Action { get; set; } + + /// + /// 流量实例表 + /// + /// 具体结构见 LogSet + /// + /// + public List LogSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainPrefetchEnableRequest.cs b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainPrefetchEnableRequest.cs new file mode 100644 index 0000000..1af99ed --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainPrefetchEnableRequest.cs @@ -0,0 +1,47 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取域名预取开启状态 + /// + /// http://docs.ucloud.cn/api/ucdn/get_ucdn_domain_prefetch_enable.html + /// + /// + public partial class GetUcdnDomainPrefetchEnableRequest + { + /// + /// 默认Action名称 + /// + private string _action = "GetUcdnDomainPrefetchEnable"; + + /// + /// API名称 + /// + /// GetUcdnDomainPrefetchEnable + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 域名ID + /// + /// 创建加速域名时生成。 + /// + /// + public string DomainId { get; set; } + + + /// + /// 实例化 类. + /// + /// 域名ID. + public GetUcdnDomainPrefetchEnableRequest(string domainId) + { + DomainId = domainId; + } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainPrefetchEnableResponse.cs b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainPrefetchEnableResponse.cs new file mode 100644 index 0000000..58383b8 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainPrefetchEnableResponse.cs @@ -0,0 +1,28 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取域名预取开启状态 + /// + /// http://docs.ucloud.cn/api/ucdn/get_ucdn_domain_prefetch_enable.html + /// + /// + public partial class GetUcdnDomainPrefetchEnableResponse : UResponse + { + /// + /// 响应动作 + /// + /// GetUcdnDomainPrefetchEnableResponse + /// + /// + public string Action { get; set; } + + /// + /// 0表示该域名未开启预取 + /// + /// 1表示该域名已开启预取 + /// + /// + public int Enable { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainTraffic.TrafficSet.cs b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainTraffic.TrafficSet.cs new file mode 100644 index 0000000..dd3c164 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainTraffic.TrafficSet.cs @@ -0,0 +1,28 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取加速域名流量使用信息 + /// + /// http://docs.ucloud.cn/api/ucdn/get_ucdn_domain_traffic.html + /// + /// + public partial class GetUcdnDomainTrafficSet + { + /// + /// 流量获取的时间点 + /// + /// 格式为Unix Timestamp + /// + /// + public int Time { get; set; } + + /// + /// 查询每日流量总值 + /// + /// 单位:GB + /// + /// + public float Value { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainTrafficRequest.cs b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainTrafficRequest.cs new file mode 100644 index 0000000..dc0c818 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainTrafficRequest.cs @@ -0,0 +1,61 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取加速域名流量使用信息 + /// + /// http://docs.ucloud.cn/api/ucdn/get_ucdn_domain_traffic.html + /// + /// + public partial class GetUcdnDomainTrafficRequest + { + /// + /// 默认Action名称 + /// + private string _action = "GetUcdnDomainTraffic"; + + /// + /// API名称 + /// + /// GetUcdnDomainTraffic + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 域名ID + /// + /// 创建加速域名时生成。 + /// + /// + public NList DomainId { get; set; } + + /// + /// CDN加速区域 + /// + /// 目前区域代表有:cn:国内;abroad:国外。可选择多个区域,表述为:”Areacodes.0=cn, Areacodes.1=aboard”,表示同时使用国内和海外节点 + /// + /// + public NList Areacode { get; set; } + + /// + /// 查询的起始时间 + /// + /// 格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。 + /// + /// + public int? BeginTime { get; set; } + + /// + /// 查询的结束时间 + /// + /// 格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + /// + /// + public int? EndTime { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainTrafficResponse.cs b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainTrafficResponse.cs new file mode 100644 index 0000000..6aba7a9 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnDomainTrafficResponse.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取加速域名流量使用信息 + /// + /// http://docs.ucloud.cn/api/ucdn/get_ucdn_domain_traffic.html + /// + /// + public partial class GetUcdnDomainTrafficResponse : UResponse + { + /// + /// 响应动作 + /// + /// GetUcdnDomainTrafficResponse + /// + /// + public string Action { get; set; } + + /// + /// 流量实例表 + /// + /// 具体结构见 TrafficSet + /// + /// + public List TrafficSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/GetUcdnTraffic.TrafficSet.cs b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnTraffic.TrafficSet.cs new file mode 100644 index 0000000..ff3d5e6 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnTraffic.TrafficSet.cs @@ -0,0 +1,44 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取流量信息 + /// + /// http://docs.ucloud.cn/api/ucdn/get_ucdn_traffic.html + /// + /// + public partial class GetUcdnTrafficSet + { + /// + /// 购买流量的区域 + /// + /// cn: 国内; aboard: 国外 + /// + /// + public string Areacode { get; set; } + + /// + /// Areacode区域内总购买流量 + /// + /// 单位GB + /// + /// + public float TrafficTotal { get; set; } + + /// + /// Areacode区域内总剩余流量 + /// + /// 单位GB + /// + /// + public float TrafficLeft { get; set; } + + /// + /// Areacode区域内总使用流量 + /// + /// 单位GB + /// + /// + public float TrafficUsed { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/GetUcdnTrafficRequest.cs b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnTrafficRequest.cs new file mode 100644 index 0000000..66277bd --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnTrafficRequest.cs @@ -0,0 +1,34 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取流量信息 + /// + /// http://docs.ucloud.cn/api/ucdn/get_ucdn_traffic.html + /// + /// + public partial class GetUcdnTrafficRequest + { + /// + /// 默认Action名称 + /// + private string _action = "GetUcdnTraffic"; + + /// + /// API名称 + /// + /// GetUcdnTraffic + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// None + /// + public string 不需要提供参数 { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/GetUcdnTrafficResponse.cs b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnTrafficResponse.cs new file mode 100644 index 0000000..b56d619 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/GetUcdnTrafficResponse.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取流量信息 + /// + /// http://docs.ucloud.cn/api/ucdn/get_ucdn_traffic.html + /// + /// + public partial class GetUcdnTrafficResponse : UResponse + { + /// + /// 响应动作 + /// + /// GetUcdnTrafficResponse + /// + /// + public string Action { get; set; } + + /// + /// 用户不同区域的流量信息 + /// + /// 具体结构参见TrafficSet部分 + /// + /// + public List TrafficSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/PrefetchDomainCacheRequest.cs b/UCloudSDK.NetCore2/Models/UCDN/PrefetchDomainCacheRequest.cs new file mode 100644 index 0000000..ed00f4d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/PrefetchDomainCacheRequest.cs @@ -0,0 +1,60 @@ +namespace UCloudSDK.Models +{ + /// + /// 预取文件 + /// + /// http://docs.ucloud.cn/api/ucdn/prefetch_domain_cache.html + /// + /// + public partial class PrefetchDomainCacheRequest + { + /// + /// 默认Action名称 + /// + private string _action = "PrefetchDomainCache"; + + /// + /// API名称 + /// + /// PrefetchDomainCache + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 域名ID + /// + /// 创建加速域名时生成。 + /// + /// + public string DomainId { get; set; } + + /// + /// URL列表 + /// + /// 一次最多提交10个,必须以”http://域名/”开始。目录要以”/”结尾,如刷新目录a下所有文件,格式为:http://abc.ucloud.cn/a/;如刷新文件目录a下面所有img.png文件,格式为http://abc.ucloud.cn/a/img.png。请正确提交需要刷新的域名(点播,下载只支持每次预取一个) + /// + /// + public NList UrlList { get; set; } + + /// + /// 大文件下载、点播支持文件的md5校验 + /// + public string Md5 { get; set; } + + /// + /// 实例化 类. + /// + /// 域名ID. + /// URL列表. + public PrefetchDomainCacheRequest(string domainId, NList urlList) + { + DomainId = domainId; + UrlList = urlList; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/PrefetchDomainCacheResponse.cs b/UCloudSDK.NetCore2/Models/UCDN/PrefetchDomainCacheResponse.cs new file mode 100644 index 0000000..60b6f47 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/PrefetchDomainCacheResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 预取文件 + /// + /// http://docs.ucloud.cn/api/ucdn/prefetch_domain_cache.html + /// + /// + public partial class PrefetchDomainCacheResponse : UResponse + { + /// + /// 响应动作 + /// + /// PrefetchDomainCacheResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/RefreshUcdnDomainCacheRequest.cs b/UCloudSDK.NetCore2/Models/UCDN/RefreshUcdnDomainCacheRequest.cs new file mode 100644 index 0000000..f1a8dc2 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/RefreshUcdnDomainCacheRequest.cs @@ -0,0 +1,65 @@ +namespace UCloudSDK.Models +{ + /// + /// 刷新加速缓存 + /// + /// http://docs.ucloud.cn/api/ucdn/refresh_ucdn_domain_cache.html + /// + /// + public partial class RefreshUcdnDomainCacheRequest + { + /// + /// 默认Action名称 + /// + private string _action = "RefreshUcdnDomainCache"; + + /// + /// API名称 + /// + /// RefreshUcdnDomainCache + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 域名ID + /// + /// 创建加速域名时生成。 + /// + /// + public string DomainId { get; set; } + + /// + /// 刷新类型 + /// + /// file代表文件刷新,dir代表路径刷新 + /// + /// + public string Type { get; set; } + + /// + /// URL列表 + /// + /// 一次最多提交30个。必须以”http://域名/”开始。目录要以”/”结尾,如刷新目录a下所有文件,格式为:http://abc.ucloud.cn/a/;如刷新文件目录a下面所有img.png文件,格式为http://abc.ucloud.cn/a/img.png。请正确提交需要刷新的域名 + /// + /// + public NList UrlList { get; set; } + + /// + /// 实例化 类. + /// + /// 域名ID. + /// 刷新类型. + /// URL列表. + public RefreshUcdnDomainCacheRequest(string domainId, string type, NList urlList) + { + DomainId = domainId; + Type = type; + UrlList = urlList; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/RefreshUcdnDomainCacheResponse.cs b/UCloudSDK.NetCore2/Models/UCDN/RefreshUcdnDomainCacheResponse.cs new file mode 100644 index 0000000..0f60d87 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/RefreshUcdnDomainCacheResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 刷新加速缓存 + /// + /// http://docs.ucloud.cn/api/ucdn/refresh_ucdn_domain_cache.html + /// + /// + public partial class RefreshUcdnDomainCacheResponse : UResponse + { + /// + /// 响应动作 + /// + /// RefreshUcdnDomainCacheResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/UpdateUcdnDomainRequest.cs b/UCloudSDK.NetCore2/Models/UCDN/UpdateUcdnDomainRequest.cs new file mode 100644 index 0000000..8e5b133 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/UpdateUcdnDomainRequest.cs @@ -0,0 +1,102 @@ +namespace UCloudSDK.Models +{ + /// + /// 更新加速域名配置 + /// + /// http://docs.ucloud.cn/api/ucdn/update_ucdn_domain.html + /// + /// + public partial class UpdateUcdnDomainRequest + { + /// + /// 默认Action名称 + /// + private string _action = "UpdateUcdnDomain"; + + /// + /// API名称 + /// + /// UpdateUcdnDomain + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 域名ID + /// + /// 创建加速域名时生成。 + /// + /// + public string DomainId { get; set; } + + /// + /// 源站IP + /// + /// 即cdn服务器回源访问的IP地址。支持多个源站IP。多个源站IP可以表述为:SourceIps.0=1.1.1.1,SourceIps.1=2.2.2.2 + /// + /// + public NList SourceIp { get; set; } + + /// + /// 测试url + /// + /// 用于域名创建加速时的测试。 + /// + /// + public string TestUrl { get; set; } + + /// + /// CDN加速区域 + /// + /// 目前区域代表有:cn:国内;abroad:国外。可选择多个区域,表述为:”Areacodes.0=cn, Areacodes.1=aboard”,表示同时使用国内和海外节点 + /// + /// + public NList Areacode { get; set; } + + /// + /// 加速成功后需要缓存在节点服务器的静态文件类型 + /// + /// 动态文件不支持缓存。多个文件类型,请使用:”CacheFileTypes.0=zip, CacheFileTypes.1=txt”,依赖于CacheTel参数 + /// + /// + public NList CacheFileType { get; set; } + + /// + /// 需要缓存的文件或路径的URL + /// + /// URL支持模糊匹配,不支持正则表达式。 + /// + /// + public NList CacheUrl { get; set; } + + /// + /// 缓存文件或路径需要缓存的时间 + /// + /// 单位:秒 + /// + /// + public int? CacheTtl { get; set; } + + /// + /// 不需要缓存的文件或路径 + /// + /// 格式同CacheUrls + /// + /// + public NList NoCacheUrl { get; set; } + + /// + /// 实例化 对象. + /// + /// 用于加速的域名. + public UpdateUcdnDomainRequest(string domainId) + { + DomainId = domainId; + } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/UpdateUcdnDomainResponse.cs b/UCloudSDK.NetCore2/Models/UCDN/UpdateUcdnDomainResponse.cs new file mode 100644 index 0000000..5b07b1e --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/UpdateUcdnDomainResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 更新加速域名配置 + /// + /// http://docs.ucloud.cn/api/ucdn/update_ucdn_domain.html + /// + /// + public partial class UpdateUcdnDomainResponse : UResponse + { + /// + /// 响应动作 + /// + /// UpdateUcdnDomainResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/UpdateUcdnDomainStatusRequest.cs b/UCloudSDK.NetCore2/Models/UCDN/UpdateUcdnDomainStatusRequest.cs new file mode 100644 index 0000000..41d2e81 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/UpdateUcdnDomainStatusRequest.cs @@ -0,0 +1,56 @@ +namespace UCloudSDK.Models +{ + /// + /// 更新加速域名状态 + /// + /// http://docs.ucloud.cn/api/ucdn/update_ucdn_domain_status.html + /// + /// + public partial class UpdateUcdnDomainStatusRequest + { + /// + /// 默认Action名称 + /// + private string _action = "UpdateUcdnDomainStatus"; + + /// + /// API名称 + /// + /// UpdateUcdnDomainStatus + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 域名ID + /// + /// 创建加速域名时生成。 + /// + /// + public string DomainId { get; set; } + + /// + /// 域名状态 + /// + /// enable代表加速中,disable代表停止加速,delete代表删除加速。(目前仅支持删除审核失败的域名) + /// + /// + public string Status { get; set; } + + /// + /// 实例化 类. + /// + /// 域名ID. + /// 域名状态. + public UpdateUcdnDomainStatusRequest(string domainId, string status) + { + DomainId = domainId; + Status = status; + } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UCDN/UpdateUcdnDomainStatusResponse.cs b/UCloudSDK.NetCore2/Models/UCDN/UpdateUcdnDomainStatusResponse.cs new file mode 100644 index 0000000..10b9846 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UCDN/UpdateUcdnDomainStatusResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 更新加速域名状态 + /// + /// http://docs.ucloud.cn/api/ucdn/update_ucdn_domain_status.html + /// + /// + public partial class UpdateUcdnDomainStatusResponse : UResponse + { + /// + /// 响应动作 + /// + /// UpdateUcdnDomainStatusResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/BackupUDBInstanceRequest.cs b/UCloudSDK.NetCore2/Models/UDB/BackupUDBInstanceRequest.cs new file mode 100644 index 0000000..2ab2f97 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/BackupUDBInstanceRequest.cs @@ -0,0 +1,72 @@ +namespace UCloudSDK.Models +{ + /// + /// 备份udb实例 + /// + /// http://docs.ucloud.cn/api/udb/backup_udb_instance.html + /// + /// + public partial class BackupUDBInstanceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "BackupUDBInstance"; + + /// + /// API名称 + /// + /// BackupUDBInstance + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// DB实例Id + /// + public string DBId { get; set; } + + /// + /// 备份名称 + /// + public string BackupName { get; set; } + + /// + /// 是否使用黑名单备份 + /// + /// 默认false + /// + /// + public bool? UseBlacklist { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// DB实例Id + /// 备份名称 + public BackupUDBInstanceRequest(string region, string dbid, string backupname) + { + Region = region; + DBId = dbid; + BackupName = backupname; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/BackupUDBInstanceResponse.cs b/UCloudSDK.NetCore2/Models/UDB/BackupUDBInstanceResponse.cs new file mode 100644 index 0000000..9215bdb --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/BackupUDBInstanceResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 备份udb实例 + /// + /// http://docs.ucloud.cn/api/udb/backup_udb_instance.html + /// + /// + public partial class BackupUDBInstanceResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/ClearUDBLogRequest.cs b/UCloudSDK.NetCore2/Models/UDB/ClearUDBLogRequest.cs new file mode 100644 index 0000000..ed056ba --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/ClearUDBLogRequest.cs @@ -0,0 +1,75 @@ +namespace UCloudSDK.Models +{ + /// + /// 清除udb实例的log + /// + /// http://docs.ucloud.cn/api/udb/clear_udb_log.html + /// + /// + public partial class ClearUDBLogRequest + { + /// + /// 默认Action名称 + /// + private string _action = "ClearUDBLog"; + + /// + /// API名称 + /// + /// ClearUDBLog + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// DB实例的id + /// + public string DBId { get; set; } + + /// + /// 日志类型 + /// + /// 10-error(暂不支持)、20-slow(暂不支持)、30-binlog + /// + /// + public int LogType { get; set; } + + /// + /// 删除时间点(至少前一天)之前log + /// + /// 采用时间戳(秒),默认当前时间点前一天 + /// + /// + public int? BeforeTime { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// DB实例的id + /// 日志类型 + public ClearUDBLogRequest(string region, string dbid, int logtype) + { + Region = region; + DBId = dbid; + LogType = logtype; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/ClearUDBLogResponse.cs b/UCloudSDK.NetCore2/Models/UDB/ClearUDBLogResponse.cs new file mode 100644 index 0000000..b9f740d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/ClearUDBLogResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 清除udb实例的log + /// + /// http://docs.ucloud.cn/api/udb/clear_udb_log.html + /// + /// + public partial class ClearUDBLogResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/CreateUDBInstanceRequest.cs b/UCloudSDK.NetCore2/Models/UDB/CreateUDBInstanceRequest.cs new file mode 100644 index 0000000..846eef2 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/CreateUDBInstanceRequest.cs @@ -0,0 +1,183 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建udb实例(包括mysql、mongodb实例和从备份恢复实例) + /// + /// http://docs.ucloud.cn/api/udb/create_udb_instance.html + /// + /// + public partial class CreateUDBInstanceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreateUDBInstance"; + + /// + /// API名称 + /// + /// CreateUDBInstance + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// DB类型id + /// + /// mysql/mongodb按版本细分各有一个id1:mysql-5.5,2:mysql-5.1,3:percona-5.54:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6,7:percona-5.6 + /// + /// + public string DBTypeId { get; set; } + + /// + /// Year + /// + /// Month, Dynamic,Trial,默认: Dynamic + /// + /// + public string ChargeType { get; set; } + + /// + /// 使用的代金券id + /// + public string CouponId { get; set; } + + /// + /// 购买时长 + /// + /// 默认值1 + /// + /// + public int? Quantity { get; set; } + + /// + /// 实例名称 + /// + /// 至少6位 + /// + /// + public string Name { get; set; } + + /// + /// 管理员帐户名 + /// + /// 默认root + /// + /// + public string AdminUser { get; set; } + + /// + /// 管理员密码 + /// + public string AdminPassword { get; set; } + + /// + /// 端口号 + /// + /// mysql默认3306,mongodb默认27017 + /// + /// + public int Port { get; set; } + + /// + /// DB实例使用的配置参数组id + /// + public int ParamGroupId { get; set; } + + /// + /// 内存限制(MB) + /// + /// 目前支持以下几档600M/1500M/3000M/6000M/15000M/30000M + /// + /// + public int MemoryLimit { get; set; } + + /// + /// 磁盘空间(GB) + /// + /// 暂时支持20G - 500G + /// + /// + public int DiskSpace { get; set; } + + /// + /// 备份策略 + /// + /// 每周备份数量,默认7次 + /// + /// + public int? BackupCount { get; set; } + + /// + /// 备份策略 + /// + /// 备份开始时间,单位小时计,默认3点 + /// + /// + public int? BackupTime { get; set; } + + /// + /// 备份策略 + /// + /// 备份时间间隔,单位小时计,默认24小时 + /// + /// + public int? BackupDuration { get; set; } + + /// + /// 备份id + /// + /// 如果指定,则表明从备份恢复实例 + /// + /// + public int? BackupId { get; set; } + + /// + /// 是否使用SSD + /// + /// 默认为false + /// + /// + public bool? UseSSD { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// DB类型id + /// 实例名称 + /// 管理员密码 + /// 端口号 + /// DB实例使用的配置参数组id + /// 内存限制(MB) + /// 磁盘空间(GB) + public CreateUDBInstanceRequest(string region, string dbtypeid, string name, string adminpassword, int port, int paramgroupid, int memorylimit, int diskspace) + { + Region = region; + DBTypeId = dbtypeid; + Name = name; + AdminPassword = adminpassword; + Port = port; + ParamGroupId = paramgroupid; + MemoryLimit = memorylimit; + DiskSpace = diskspace; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/CreateUDBInstanceResponse.cs b/UCloudSDK.NetCore2/Models/UDB/CreateUDBInstanceResponse.cs new file mode 100644 index 0000000..d2c9d29 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/CreateUDBInstanceResponse.cs @@ -0,0 +1,22 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建udb实例(包括mysql、mongodb实例和从备份恢复实例) + /// + /// http://docs.ucloud.cn/api/udb/create_udb_instance.html + /// + /// + public partial class CreateUDBInstanceResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// db实例id + /// + public string DBId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/CreateUDBParamGroupRequest.cs b/UCloudSDK.NetCore2/Models/UDB/CreateUDBParamGroupRequest.cs new file mode 100644 index 0000000..df1bd51 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/CreateUDBParamGroupRequest.cs @@ -0,0 +1,81 @@ +namespace UCloudSDK.Models +{ + /// + /// 从已有配置文件创建新配置文件 + /// + /// http://docs.ucloud.cn/api/udb/create_udb_param_group.html + /// + /// + public partial class CreateUDBParamGroupRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreateUDBParamGroup"; + + /// + /// API名称 + /// + /// CreateUDBParamGroup + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// 新配置参数组名称 + /// + public string GroupName { get; set; } + + /// + /// 参数组描述 + /// + public string Description { get; set; } + + /// + /// 源参数组id + /// + public int SrcGroupId { get; set; } + + /// + /// DB类型id + /// + /// mysql/mongodb按版本细分各有一个id1:mysql-5.5,2:mysql-5.1,3:percona-5.54:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6,7:percona-5.6 + /// + /// + public string DBTypeId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 新配置参数组名称 + /// 参数组描述 + /// 源参数组id + /// DB类型id + public CreateUDBParamGroupRequest(string region, string groupname, string description, int srcgroupid, string dbtypeid) + { + Region = region; + GroupName = groupname; + Description = description; + SrcGroupId = srcgroupid; + DBTypeId = dbtypeid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/CreateUDBParamGroupResponse.cs b/UCloudSDK.NetCore2/Models/UDB/CreateUDBParamGroupResponse.cs new file mode 100644 index 0000000..403c0f4 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/CreateUDBParamGroupResponse.cs @@ -0,0 +1,22 @@ +namespace UCloudSDK.Models +{ + /// + /// 从已有配置文件创建新配置文件 + /// + /// http://docs.ucloud.cn/api/udb/create_udb_param_group.html + /// + /// + public partial class CreateUDBParamGroupResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// 新配置参数组id + /// + public int GroupId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/CreateUDBReplicationInstanceRequest.cs b/UCloudSDK.NetCore2/Models/UDB/CreateUDBReplicationInstanceRequest.cs new file mode 100644 index 0000000..79141c6 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/CreateUDBReplicationInstanceRequest.cs @@ -0,0 +1,88 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建mongodb的副本节点(包括仲裁) + /// + /// http://docs.ucloud.cn/api/udb/create_udb_replication_instance.html + /// + /// + public partial class CreateUDBReplicationInstanceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreateUDBReplicationInstance"; + + /// + /// API名称 + /// + /// CreateUDBReplicationInstance + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// primary节点的DBId + /// + public string SrcId { get; set; } + + /// + /// 实例名称 + /// + /// 至少6位 + /// + /// + public string Name { get; set; } + + /// + /// 端口号 + /// + /// 默认27017 + /// + /// + public int? Port { get; set; } + + /// + /// 是否是仲裁节点 + /// + /// 默认false,仲裁节点按最小机型创建 + /// + /// + public bool? IsArbiter { get; set; } + + /// + /// 使用的代金券id + /// + public string CouponId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// primary节点的DBId + /// 实例名称 + public CreateUDBReplicationInstanceRequest(string region, string srcid, string name) + { + Region = region; + SrcId = srcid; + Name = name; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/CreateUDBReplicationInstanceResponse.cs b/UCloudSDK.NetCore2/Models/UDB/CreateUDBReplicationInstanceResponse.cs new file mode 100644 index 0000000..fc5ab59 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/CreateUDBReplicationInstanceResponse.cs @@ -0,0 +1,22 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建mongodb的副本节点(包括仲裁) + /// + /// http://docs.ucloud.cn/api/udb/create_udb_replication_instance.html + /// + /// + public partial class CreateUDBReplicationInstanceResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// 创建从节点的DBId + /// + public string DBId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/CreateUDBSlaveRequest.cs b/UCloudSDK.NetCore2/Models/UDB/CreateUDBSlaveRequest.cs new file mode 100644 index 0000000..d8db2e3 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/CreateUDBSlaveRequest.cs @@ -0,0 +1,96 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建udb实例的slave + /// + /// http://docs.ucloud.cn/api/udb/create_udb_slave.html + /// + /// + public partial class CreateUDBSlaveRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreateUDBSlave"; + + /// + /// API名称 + /// + /// CreateUDBSlave + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// master实例的DBId + /// + public string SrcId { get; set; } + + /// + /// 实例名称 + /// + /// 至少6位 + /// + /// + public string Name { get; set; } + + /// + /// 端口号 + /// + /// mysql默认3306 + /// + /// + public int? Port { get; set; } + + /// + /// 是否使用SSD + /// + /// 默认为false + /// + /// + public bool? UseSSD { get; set; } + + /// + /// 使用的代金券id + /// + public string CouponId { get; set; } + + /// + /// 是否锁主库 + /// + /// 默认为true + /// + /// + public bool? IsLock { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// master实例的DBId + /// 实例名称 + public CreateUDBSlaveRequest(string region, string srcid, string name) + { + Region = region; + SrcId = srcid; + Name = name; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/CreateUDBSlaveResponse.cs b/UCloudSDK.NetCore2/Models/UDB/CreateUDBSlaveResponse.cs new file mode 100644 index 0000000..47f65b5 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/CreateUDBSlaveResponse.cs @@ -0,0 +1,22 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建udb实例的slave + /// + /// http://docs.ucloud.cn/api/udb/create_udb_slave.html + /// + /// + public partial class CreateUDBSlaveResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// 创建slave的DBId + /// + public string DBId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DeleteUDBBackupRequest.cs b/UCloudSDK.NetCore2/Models/UDB/DeleteUDBBackupRequest.cs new file mode 100644 index 0000000..f367589 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DeleteUDBBackupRequest.cs @@ -0,0 +1,60 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除udb实例备份 + /// + /// http://docs.ucloud.cn/api/udb/delete_udb_backup.html + /// + /// + public partial class DeleteUDBBackupRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DeleteUDBBackup"; + + /// + /// API名称 + /// + /// DeleteUDBBackup + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// 备份id + /// + /// 可通过DescribeUDBBackup获得 + /// + /// + public int BackupId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 备份id + public DeleteUDBBackupRequest(string region, int backupid) + { + Region = region; + BackupId = backupid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DeleteUDBBackupResponse.cs b/UCloudSDK.NetCore2/Models/UDB/DeleteUDBBackupResponse.cs new file mode 100644 index 0000000..da3218c --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DeleteUDBBackupResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除udb实例备份 + /// + /// http://docs.ucloud.cn/api/udb/delete_udb_backup.html + /// + /// + public partial class DeleteUDBBackupResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DeleteUDBInstanceRequest.cs b/UCloudSDK.NetCore2/Models/UDB/DeleteUDBInstanceRequest.cs new file mode 100644 index 0000000..b6fac6b --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DeleteUDBInstanceRequest.cs @@ -0,0 +1,57 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除udb实例 + /// + /// http://docs.ucloud.cn/api/udb/delete_udb_instance.html + /// + /// + public partial class DeleteUDBInstanceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DeleteUDBInstance"; + + /// + /// API名称 + /// + /// DeleteUDBInstance + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// DB实例的id + /// + public string DBId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// DB实例的id + public DeleteUDBInstanceRequest(string region, string dbid) + { + Region = region; + DBId = dbid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DeleteUDBInstanceResponse.cs b/UCloudSDK.NetCore2/Models/UDB/DeleteUDBInstanceResponse.cs new file mode 100644 index 0000000..4fac9e6 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DeleteUDBInstanceResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除udb实例 + /// + /// http://docs.ucloud.cn/api/udb/delete_udb_instance.html + /// + /// + public partial class DeleteUDBInstanceResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DeleteUDBParamGroupRequest.cs b/UCloudSDK.NetCore2/Models/UDB/DeleteUDBParamGroupRequest.cs new file mode 100644 index 0000000..59ea143 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DeleteUDBParamGroupRequest.cs @@ -0,0 +1,57 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除配置参数组 + /// + /// http://docs.ucloud.cn/api/udb/delete_udb_param_group.html + /// + /// + public partial class DeleteUDBParamGroupRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DeleteUDBParamGroup"; + + /// + /// API名称 + /// + /// DeleteUDBParamGroup + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// 参数组id + /// + public int GroupId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 参数组id + public DeleteUDBParamGroupRequest(string region, int groupid) + { + Region = region; + GroupId = groupid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DeleteUDBParamGroupResponse.cs b/UCloudSDK.NetCore2/Models/UDB/DeleteUDBParamGroupResponse.cs new file mode 100644 index 0000000..6236e93 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DeleteUDBParamGroupResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除配置参数组 + /// + /// http://docs.ucloud.cn/api/udb/delete_udb_param_group.html + /// + /// + public partial class DeleteUDBParamGroupResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackup.DataSet.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackup.DataSet.cs new file mode 100644 index 0000000..f742b0a --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackup.DataSet.cs @@ -0,0 +1,55 @@ +namespace UCloudSDK.Models +{ + /// + /// 列表udb实例备份信息 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_backup.html + /// + /// + public partial class DescribeUDBBackupDataSet + { + /// + /// 备份id + /// + public int BackupId { get; set; } + + /// + /// 备份名称 + /// + public string BackupName { get; set; } + + /// + /// 备份时间 + /// + public int BackupTime { get; set; } + + /// + /// 备份文件大小 + /// + public int BackupSize { get; set; } + + /// + /// 备份类型 + /// + /// 包括0-自动,1-手动 + /// + /// + public int BackupType { get; set; } + + /// + /// 备份状态Backuping // 备份中Success // 备份成功Failed // 备份失败Expired // 备份过期 + /// + public string State { get; set; } + + /// + /// dbid + /// + public string DBId { get; set; } + + /// + /// 对应的db名称 + /// + public string DBName { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackupBlacklistRequest.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackupBlacklistRequest.cs new file mode 100644 index 0000000..ad73452 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackupBlacklistRequest.cs @@ -0,0 +1,57 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取udb实例的备份黑名单 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_backup_blacklist.html + /// + /// + public partial class DescribeUDBBackupBlacklistRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeUDBBackupBlacklist"; + + /// + /// API名称 + /// + /// DescribeUDBBackupBlacklist + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// DB实例Id + /// + public string DBId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// DB实例Id + public DescribeUDBBackupBlacklistRequest(string region, string dbid) + { + Region = region; + DBId = dbid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackupBlacklistResponse.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackupBlacklistResponse.cs new file mode 100644 index 0000000..2a364c9 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackupBlacklistResponse.cs @@ -0,0 +1,22 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取udb实例的备份黑名单 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_backup_blacklist.html + /// + /// + public partial class DescribeUDBBackupBlacklistResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// 黑名单 + /// + public string Blacklist { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackupRequest.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackupRequest.cs new file mode 100644 index 0000000..8e4df52 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackupRequest.cs @@ -0,0 +1,102 @@ +namespace UCloudSDK.Models +{ + /// + /// 列表udb实例备份信息 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_backup.html + /// + /// + public partial class DescribeUDBBackupRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeUDBBackup"; + + /// + /// API名称 + /// + /// DescribeUDBBackup + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// 分页显示的起始偏移 + /// + /// 列表操作则指定 + /// + /// + public int Offset { get; set; } + + /// + /// 分页显示的条目数 + /// + /// 列表操作则指定 + /// + /// + public int Limit { get; set; } + + /// + /// DB实例Id + /// + /// 如果指定,则只获取该db的备份信息 + /// + /// + public string DBId { get; set; } + + /// + /// 备份类型 + /// + /// 包括0-自动,1-手动 + /// + /// + public int? BackupType { get; set; } + + /// + /// 过滤条件 + /// + /// 起始时间(时间戳) + /// + /// + public int? BeginTime { get; set; } + + /// + /// 过滤条件 + /// + /// 结束时间(时间戳) + /// + /// + public int? EndTime { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 分页显示的起始偏移 + /// 分页显示的条目数 + public DescribeUDBBackupRequest(string region, int offset, int limit) + { + Region = region; + Offset = offset; + Limit = limit; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackupResponse.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackupResponse.cs new file mode 100644 index 0000000..b59a5c2 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBBackupResponse.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 列表udb实例备份信息 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_backup.html + /// + /// + public partial class DescribeUDBBackupResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// 备份信息 + /// + public List DataSet { get; set; } + + /// + /// 备份总数 + /// + /// 如果指定dbid,则是该db备份总数 + /// + /// + public int TotalCount { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstance.DataSet.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstance.DataSet.cs new file mode 100644 index 0000000..1577e9a --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstance.DataSet.cs @@ -0,0 +1,212 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取udb实例信息 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_instance.html + /// + /// + public partial class DescribeUDBInstanceDataSet + { + /// + /// DB实例id + /// + public string DBId { get; set; } + + /// + /// 实例名称 + /// + /// 至少6位 + /// + /// + public string Name { get; set; } + + /// + /// DB类型id + /// + /// mysql/mongodb按版本细分各有一个id1:mysql-5.5,2:mysql-5.1,3:percona-5.54:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6,7:percona-5.6 + /// + /// + public string DBTypeId { get; set; } + + /// + /// DB实例使用的配置参数组id + /// + public int ParamGroupId { get; set; } + + /// + /// 管理员帐户名 + /// + /// 默认root + /// + /// + public string AdminUser { get; set; } + + /// + /// DB实例虚ip + /// + public string VirtualIP { get; set; } + + /// + /// DB实例虚ip的mac地址 + /// + public string VirtualIPMac { get; set; } + + /// + /// 端口号 + /// + /// mysql默认3306,mongodb默认27017 + /// + /// + public int Port { get; set; } + + /// + /// 对mysql的slave而言是master的DBId + /// + /// 对master则为空,对mongodb则是副本集id + /// + /// + public string SrcDBId { get; set; } + + /// + /// 备份策略 + /// + /// 每周备份数量,默认7次 + /// + /// + public int BackupCount { get; set; } + + /// + /// 备份策略 + /// + /// 备份开始时间,单位小时计,默认3点 + /// + /// + public int BackupBeginTime { get; set; } + + /// + /// 备份策略 + /// + /// 备份时间间隔,单位小时计,默认24小时 + /// + /// + public int BackupDuration { get; set; } + + /// + /// 备份策略 + /// + /// 备份黑名单,mongodb则不适用 + /// + /// + public string BackupBlacklist { get; set; } + + /// + /// DB状态标记Init // 初始化中Fail // 安装失败Starting // 启动中Running // 运行Shutdown // 关闭中Shutoff // 已关闭Delete // 已删除Upgrading // 升级中Promoting // 提升为独库进行中Recovering // 恢复中Recover fail // 恢复失败 + /// + public string State { get; set; } + + /// + /// DB实例创建时间 + /// + /// 采用UTC计时时间戳 + /// + /// + public int CreateTime { get; set; } + + /// + /// DB实例修改时间 + /// + /// 采用UTC计时时间戳 + /// + /// + public int ModifyTime { get; set; } + + /// + /// DB实例过期时间 + /// + /// 采用UTC计时时间戳 + /// + /// + public int ExpiredTime { get; set; } + + /// + /// Year + /// + /// Month, Dynamic,Trial,默认: Dynamic + /// + /// + public string ChargeType { get; set; } + + /// + /// 内存限制(MB) + /// + /// 默认根据配置机型 + /// + /// + public int MemoryLimit { get; set; } + + /// + /// 磁盘空间(GB) + /// + /// 默认根据配置机型 + /// + /// + public int DiskSpace { get; set; } + + /// + /// 是否使用SSD + /// + public bool UseSSD { get; set; } + + /// + /// DB实例角色 + /// + /// mysql区分master/slave,mongodb多种角色 + /// + /// + public string Role { get; set; } + + /// + /// DB实例磁盘已使用空间 + /// + /// 单位GB + /// + /// + public int DiskUsedSize { get; set; } + + /// + /// DB实例数据文件大小 + /// + /// 单位GB + /// + /// + public int DataFileSize { get; set; } + + /// + /// DB实例系统文件大小 + /// + /// 单位GB + /// + /// + public int SystemFileSize { get; set; } + + /// + /// DB实例日志文件大小 + /// + /// 单位GB + /// + /// + public int LogFileSize { get; set; } + + /// + /// 如果列表操作 + /// + /// 则有从DB实例信息列表 + /// + /// + public List DataSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstancePrice.DataSet.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstancePrice.DataSet.cs new file mode 100644 index 0000000..cd1f461 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstancePrice.DataSet.cs @@ -0,0 +1,28 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取udb实例价格信息 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_instance_price.html + /// + /// + public partial class DescribeUDBInstancePriceDataSet + { + /// + /// Year + /// + /// Month, Dynamic,Trial + /// + /// + public string ChargeType { get; set; } + + /// + /// 价格 + /// + /// 单位分 + /// + /// + public float Price { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstancePriceRequest.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstancePriceRequest.cs new file mode 100644 index 0000000..d00113d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstancePriceRequest.cs @@ -0,0 +1,96 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取udb实例价格信息 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_instance_price.html + /// + /// + public partial class DescribeUDBInstancePriceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeUDBInstancePrice"; + + /// + /// API名称 + /// + /// DescribeUDBInstancePrice + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 购买DB实例数量 + /// + public int Count { get; set; } + + /// + /// Year + /// + /// Month, Dynamic,Trial,默认: Dynamic如果不指定,则一次性获取三种计费 + /// + /// + public string ChargeType { get; set; } + + /// + /// 购买DB的时长 + /// + /// 默认值为1 + /// + /// + public int? Quantity { get; set; } + + /// + /// 内存限制(MB) + /// + /// 目前支持以下几档600M/1500M/3000M/6000M/15000M/30000M + /// + /// + public int MemoryLimit { get; set; } + + /// + /// 磁盘空间(GB) + /// + /// 暂时支持20G - 500G + /// + /// + public int DiskSpace { get; set; } + + /// + /// 是否使用SSD + /// + /// 默认为false + /// + /// + public bool? UseSSD { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 购买DB实例数量 + /// 内存限制(MB) + /// 磁盘空间(GB) + public DescribeUDBInstancePriceRequest(string region, int count, int memorylimit, int diskspace) + { + Region = region; + Count = count; + MemoryLimit = memorylimit; + DiskSpace = diskspace; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstancePriceResponse.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstancePriceResponse.cs new file mode 100644 index 0000000..8490518 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstancePriceResponse.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取udb实例价格信息 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_instance_price.html + /// + /// + public partial class DescribeUDBInstancePriceResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// 价格 + /// + public List DataSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstanceRequest.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstanceRequest.cs new file mode 100644 index 0000000..39963c7 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstanceRequest.cs @@ -0,0 +1,82 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取udb实例信息 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_instance.html + /// + /// + public partial class DescribeUDBInstanceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeUDBInstance"; + + /// + /// API名称 + /// + /// DescribeUDBInstance + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// DB实例id + /// + /// 如果指定则获取描述,否则为列表操作,指定Offset/Limit + /// + /// + public string DBId { get; set; } + + /// + /// DB种类 + /// + /// 分为SQL和NOSQL,如果是别表操作,则需要制定 + /// + /// + public string ClassType { get; set; } + + /// + /// 分页显示起始偏移位置 + /// + /// 列表操作则指定 + /// + /// + public int? Offset { get; set; } + + /// + /// 分页显示数量 + /// + /// 列表操作则指定 + /// + /// + public int? Limit { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + public DescribeUDBInstanceRequest(string region) + { + Region = region; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstanceResponse.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstanceResponse.cs new file mode 100644 index 0000000..9b994d4 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstanceResponse.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取udb实例信息 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_instance.html + /// + /// + public partial class DescribeUDBInstanceResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// DB实例信息列表 + /// + public List DataSet { get; set; } + + /// + /// 用户db组的数量 + /// + /// 对于mysql: 主从结对数量,没有slave,则只有mastermongodb: 副本集数量 + /// + /// + public int TotalCount { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstanceStateRequest.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstanceStateRequest.cs new file mode 100644 index 0000000..b3f54e0 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstanceStateRequest.cs @@ -0,0 +1,57 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取udb实例状态 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_instance_state.html + /// + /// + public partial class DescribeUDBInstanceStateRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeUDBInstanceState"; + + /// + /// API名称 + /// + /// DescribeUDBInstanceState + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// 实例的Id + /// + public string DBId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 实例的Id + public DescribeUDBInstanceStateRequest(string region, string dbid) + { + Region = region; + DBId = dbid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstanceStateResponse.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstanceStateResponse.cs new file mode 100644 index 0000000..9ca3267 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBInstanceStateResponse.cs @@ -0,0 +1,22 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取udb实例状态 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_instance_state.html + /// + /// + public partial class DescribeUDBInstanceStateResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// DB状态标记Init // 初始化中Fail // 安装失败Starting // 启动中Running // 运行Shutdown // 关闭中Shutoff // 已关闭Delete // 已删除Upgrading // 升级中Promoting // 提升为独库进行中Recovering // 恢复中Recover fail // 恢复失败 + /// + public string State { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBParamGroup.DataSet.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBParamGroup.DataSet.cs new file mode 100644 index 0000000..7790710 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBParamGroup.DataSet.cs @@ -0,0 +1,50 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取参数组详细参数信息 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_param_group.html + /// + /// + public partial class DescribeUDBParamGroupDataSet + { + /// + /// 参数组id + /// + public int GroupId { get; set; } + + /// + /// 参数组名称 + /// + public string GroupName { get; set; } + + /// + /// DB类型id + /// + /// mysql/mongodb按版本细分各有一个id1:mysql-5.5,2:mysql-5.1,3:percona-5.54:mongodb-2.4,5:mongodb-2.6,6:mysql-5.67:percona-5.6 + /// + /// + public string DBTypeId { get; set; } + + /// + /// 参数组描述 + /// + public string Description { get; set; } + + /// + /// 参数组是否可修改 + /// + /// 默认值为true + /// + /// + public bool Modifiable { get; set; } + + /// + /// 参数的键值对 + /// + public List ParamMember { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBParamGroup.ParamMember.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBParamGroup.ParamMember.cs new file mode 100644 index 0000000..518341a --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBParamGroup.ParamMember.cs @@ -0,0 +1,62 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取参数组详细参数信息 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_param_group.html + /// + /// + public partial class DescribeUDBParamGroupParamMember + { + /// + /// 参数名称 + /// + public string Key { get; set; } + + /// + /// 参数值 + /// + public string Value { get; set; } + + /// + /// 参数值应用类型 + /// + /// 包括0-unknown、10-int、20-string、30-bool + /// + /// + public int ValueType { get; set; } + + /// + /// 允许的值(根据参数类型 + /// + /// 用分隔符表示) + /// + /// + public string AllowedVal { get; set; } + + /// + /// 参数值应用类型 + /// + /// 包括0-unknown、10-static、20-dynamic + /// + /// + public int ApplyType { get; set; } + + /// + /// 是否可更改 + /// + /// 默认为false + /// + /// + public bool Modifiable { get; set; } + + /// + /// 允许值得格式类型 + /// + /// 包括PVFT_UNKOWN=0,PVFT_RANGE=10, PVFT_ENUM=20 + /// + /// + public int FormatType { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBParamGroupRequest.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBParamGroupRequest.cs new file mode 100644 index 0000000..934b1c3 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBParamGroupRequest.cs @@ -0,0 +1,74 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取参数组详细参数信息 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_param_group.html + /// + /// + public partial class DescribeUDBParamGroupRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeUDBParamGroup"; + + /// + /// API名称 + /// + /// DescribeUDBParamGroup + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// 参数组id + /// + /// 如果指定则获取描述,否则是列表操作,需要指定Offset/Limit + /// + /// + public int? GroupId { get; set; } + + /// + /// 分页显示的起始偏移 + /// + /// 列表操作则指定 + /// + /// + public int? Offset { get; set; } + + /// + /// 分页显示的条目数 + /// + /// 列表操作则指定 + /// + /// + public int? Limit { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + public DescribeUDBParamGroupRequest(string region) + { + Region = region; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBParamGroupResponse.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBParamGroupResponse.cs new file mode 100644 index 0000000..739dcb2 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBParamGroupResponse.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取参数组详细参数信息 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_param_group.html + /// + /// + public partial class DescribeUDBParamGroupResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// 参数组 + /// + public List DataSet { get; set; } + + /// + /// 参数组总数 + /// + /// 列表操作时才会有该参数 + /// + /// + public int TotalCount { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBType.DataSet.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBType.DataSet.cs new file mode 100644 index 0000000..fa3629c --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBType.DataSet.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取udb支持的类型信息 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_type.html + /// + /// + public partial class DescribeUDBTypeDataSet + { + /// + /// DB类型id + /// + /// mysql/mongodb按版本细分各有一个id1:mysql-5.5,2:mysql-5.1,3:percona-5.54:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6,7:percona-5.6 + /// + /// + public string DBTypeId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBTypeRequest.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBTypeRequest.cs new file mode 100644 index 0000000..f42193c --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBTypeRequest.cs @@ -0,0 +1,45 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取udb支持的类型信息 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_type.html + /// + /// + public partial class DescribeUDBTypeRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeUDBType"; + + /// + /// API名称 + /// + /// DescribeUDBType + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + public DescribeUDBTypeRequest(string region) + { + Region = region; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/DescribeUDBTypeResponse.cs b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBTypeResponse.cs new file mode 100644 index 0000000..961e556 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/DescribeUDBTypeResponse.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取udb支持的类型信息 + /// + /// http://docs.ucloud.cn/api/udb/describe_udb_type.html + /// + /// + public partial class DescribeUDBTypeResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// DB类型列表 + /// + public List DataSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/EditUDBBackupBlacklistRequest.cs b/UCloudSDK.NetCore2/Models/UDB/EditUDBBackupBlacklistRequest.cs new file mode 100644 index 0000000..8cd22d7 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/EditUDBBackupBlacklistRequest.cs @@ -0,0 +1,67 @@ +namespace UCloudSDK.Models +{ + /// + /// 编辑udb实例的备份黑名单 + /// + /// http://docs.ucloud.cn/api/udb/edit_udb_backup_blacklist.html + /// + /// + public partial class EditUDBBackupBlacklistRequest + { + /// + /// 默认Action名称 + /// + private string _action = "EditUDBBackupBlacklist"; + + /// + /// API名称 + /// + /// EditUDBBackupBlacklist + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// DB实例Id + /// + public string DBId { get; set; } + + /// + /// 黑名单 + /// + /// 规范示例abc.%;user.%;city.address; + /// + /// + public string Blacklist { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// DB实例Id + /// 黑名单 + public EditUDBBackupBlacklistRequest(string region, string dbid, string blacklist) + { + Region = region; + DBId = dbid; + Blacklist = blacklist; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/EditUDBBackupBlacklistResponse.cs b/UCloudSDK.NetCore2/Models/UDB/EditUDBBackupBlacklistResponse.cs new file mode 100644 index 0000000..3e36b51 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/EditUDBBackupBlacklistResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 编辑udb实例的备份黑名单 + /// + /// http://docs.ucloud.cn/api/udb/edit_udb_backup_blacklist.html + /// + /// + public partial class EditUDBBackupBlacklistResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/ModifyUDBInstanceNameRequest.cs b/UCloudSDK.NetCore2/Models/UDB/ModifyUDBInstanceNameRequest.cs new file mode 100644 index 0000000..7d0db14 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/ModifyUDBInstanceNameRequest.cs @@ -0,0 +1,64 @@ +namespace UCloudSDK.Models +{ + /// + /// 重命名udb实例 + /// + /// http://docs.ucloud.cn/api/udb/modify_udb_instance_name.html + /// + /// + public partial class ModifyUDBInstanceNameRequest + { + /// + /// 默认Action名称 + /// + private string _action = "ModifyUDBInstanceName"; + + /// + /// API名称 + /// + /// ModifyUDBInstanceName + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// 实例的Id + /// + public string DBId { get; set; } + + /// + /// 实例的新名字 + /// + public string Name { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 实例的Id + /// 实例的新名字 + public ModifyUDBInstanceNameRequest(string region, string dbid, string name) + { + Region = region; + DBId = dbid; + Name = name; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/ModifyUDBInstanceNameResponse.cs b/UCloudSDK.NetCore2/Models/UDB/ModifyUDBInstanceNameResponse.cs new file mode 100644 index 0000000..c2e360d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/ModifyUDBInstanceNameResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 重命名udb实例 + /// + /// http://docs.ucloud.cn/api/udb/modify_udb_instance_name.html + /// + /// + public partial class ModifyUDBInstanceNameResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/PromoteUDBSlaveRequest.cs b/UCloudSDK.NetCore2/Models/UDB/PromoteUDBSlaveRequest.cs new file mode 100644 index 0000000..9c151f6 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/PromoteUDBSlaveRequest.cs @@ -0,0 +1,65 @@ +namespace UCloudSDK.Models +{ + /// + /// 从库提升为独立库 + /// + /// http://docs.ucloud.cn/api/udb/promote_udb_slave.html + /// + /// + public partial class PromoteUDBSlaveRequest + { + /// + /// 默认Action名称 + /// + private string _action = "PromoteUDBSlave"; + + /// + /// API名称 + /// + /// PromoteUDBSlave + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// 实例的Id + /// + public string DBId { get; set; } + + /// + /// 是否强制(如果从库落后可能会禁止提升) + /// + /// 默认false如果落后情况下,强制提升丢失数据 + /// + /// + public bool? IsForce { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 实例的Id + public PromoteUDBSlaveRequest(string region, string dbid) + { + Region = region; + DBId = dbid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/PromoteUDBSlaveResponse.cs b/UCloudSDK.NetCore2/Models/UDB/PromoteUDBSlaveResponse.cs new file mode 100644 index 0000000..6bab529 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/PromoteUDBSlaveResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 从库提升为独立库 + /// + /// http://docs.ucloud.cn/api/udb/promote_udb_slave.html + /// + /// + public partial class PromoteUDBSlaveResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/RestartUDBInstanceRequest.cs b/UCloudSDK.NetCore2/Models/UDB/RestartUDBInstanceRequest.cs new file mode 100644 index 0000000..5d01b1d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/RestartUDBInstanceRequest.cs @@ -0,0 +1,57 @@ +namespace UCloudSDK.Models +{ + /// + /// 重启udb实例 + /// + /// http://docs.ucloud.cn/api/udb/restart_udb_instance.html + /// + /// + public partial class RestartUDBInstanceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "RestartUDBInstance"; + + /// + /// API名称 + /// + /// RestartUDBInstance + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// 实例的Id + /// + public string DBId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 实例的Id + public RestartUDBInstanceRequest(string region, string dbid) + { + Region = region; + DBId = dbid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/RestartUDBInstanceResponse.cs b/UCloudSDK.NetCore2/Models/UDB/RestartUDBInstanceResponse.cs new file mode 100644 index 0000000..9ea28bd --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/RestartUDBInstanceResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 重启udb实例 + /// + /// http://docs.ucloud.cn/api/udb/restart_udb_instance.html + /// + /// + public partial class RestartUDBInstanceResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/StartUDBInstanceRequest.cs b/UCloudSDK.NetCore2/Models/UDB/StartUDBInstanceRequest.cs new file mode 100644 index 0000000..9bcd9c3 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/StartUDBInstanceRequest.cs @@ -0,0 +1,57 @@ +namespace UCloudSDK.Models +{ + /// + /// 启动udb实例 + /// + /// http://docs.ucloud.cn/api/udb/start_udb_instance.html + /// + /// + public partial class StartUDBInstanceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "StartUDBInstance"; + + /// + /// API名称 + /// + /// StartUDBInstance + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// 实例的Id + /// + public string DBId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 实例的Id + public StartUDBInstanceRequest(string region, string dbid) + { + Region = region; + DBId = dbid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/StartUDBInstanceResponse.cs b/UCloudSDK.NetCore2/Models/UDB/StartUDBInstanceResponse.cs new file mode 100644 index 0000000..bb13812 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/StartUDBInstanceResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 启动udb实例 + /// + /// http://docs.ucloud.cn/api/udb/start_udb_instance.html + /// + /// + public partial class StartUDBInstanceResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/StopUDBInstanceRequest.cs b/UCloudSDK.NetCore2/Models/UDB/StopUDBInstanceRequest.cs new file mode 100644 index 0000000..f5eba08 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/StopUDBInstanceRequest.cs @@ -0,0 +1,57 @@ +namespace UCloudSDK.Models +{ + /// + /// 关闭udb实例 + /// + /// http://docs.ucloud.cn/api/udb/stop_udb_instance.html + /// + /// + public partial class StopUDBInstanceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "StopUDBInstance"; + + /// + /// API名称 + /// + /// StopUDBInstance + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// 实例的Id + /// + public string DBId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 实例的Id + public StopUDBInstanceRequest(string region, string dbid) + { + Region = region; + DBId = dbid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/StopUDBInstanceResponse.cs b/UCloudSDK.NetCore2/Models/UDB/StopUDBInstanceResponse.cs new file mode 100644 index 0000000..ebd9ef2 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/StopUDBInstanceResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 关闭udb实例 + /// + /// http://docs.ucloud.cn/api/udb/stop_udb_instance.html + /// + /// + public partial class StopUDBInstanceResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/UpdateUDBParamGroupRequest.cs b/UCloudSDK.NetCore2/Models/UDB/UpdateUDBParamGroupRequest.cs new file mode 100644 index 0000000..68e9cdd --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/UpdateUDBParamGroupRequest.cs @@ -0,0 +1,74 @@ +namespace UCloudSDK.Models +{ + /// + /// 更新udb配置参数项 + /// + /// http://docs.ucloud.cn/api/udb/update_udb_param_group.html + /// + /// + public partial class UpdateUDBParamGroupRequest + { + /// + /// 默认Action名称 + /// + private string _action = "UpdateUDBParamGroup"; + + /// + /// API名称 + /// + /// UpdateUDBParamGroup + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// 配置参数组id + /// + /// 使用DescribeUDBParamGroup获得 + /// + /// + public int GroupId { get; set; } + + /// + /// 参数名称 + /// + public string Key { get; set; } + + /// + /// 参数值 + /// + public string Value { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 配置参数组id + /// 参数名称 + /// 参数值 + public UpdateUDBParamGroupRequest(string region, int groupid, string key, string value) + { + Region = region; + GroupId = groupid; + Key = key; + Value = value; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/UpdateUDBParamGroupResponse.cs b/UCloudSDK.NetCore2/Models/UDB/UpdateUDBParamGroupResponse.cs new file mode 100644 index 0000000..ae313df --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/UpdateUDBParamGroupResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 更新udb配置参数项 + /// + /// http://docs.ucloud.cn/api/udb/update_udb_param_group.html + /// + /// + public partial class UpdateUDBParamGroupResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/UploadUDBParamGroupRequest.cs b/UCloudSDK.NetCore2/Models/UDB/UploadUDBParamGroupRequest.cs new file mode 100644 index 0000000..f20dc49 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/UploadUDBParamGroupRequest.cs @@ -0,0 +1,92 @@ +namespace UCloudSDK.Models +{ + /// + /// 导入udb配置 + /// + /// http://docs.ucloud.cn/api/udb/upload_udb_param_group.html + /// + /// + public partial class UploadUDBParamGroupRequest + { + /// + /// 默认Action名称 + /// + private string _action = "UploadUDBParamGroup"; + + /// + /// API名称 + /// + /// UploadUDBParamGroup + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 请参见数据中心RegionList + /// + /// + public string Region { get; set; } + + /// + /// 项目编号 + /// + public int? ProjectId { get; set; } + + /// + /// DB类型id + /// + /// mysql/mongodb按版本细分各有一个id1:mysql-5.5,2:mysql-5.1,3:percona-5.54:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6,7:percona-5.6 + /// + /// + public string DBTypeId { get; set; } + + /// + /// 配置参数组名称 + /// + public string GroupName { get; set; } + + /// + /// 参数组描述 + /// + public string Description { get; set; } + + /// + /// 配置内容 + /// + private string _content; + /// + /// 配置内容 + /// + /// 导入的配置内容采用base64编码。mysql只支持[mysqld]段,如:[mysqld]back_log=102character_set_server=utf8......mongodb则不需要带段,如:auth=truemaxConns=2000...... + /// + /// + public string Content + { + get { return _content; } + set { _content = value.ToBase64(); } + } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// DB类型id + /// 配置参数组名称 + /// 参数组描述 + /// 配置内容 + public UploadUDBParamGroupRequest(string region, string dbtypeid, string groupname, string description, string content) + { + Region = region; + DBTypeId = dbtypeid; + GroupName = groupname; + Description = description; + Content = content; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDB/UploadUDBParamGroupResponse.cs b/UCloudSDK.NetCore2/Models/UDB/UploadUDBParamGroupResponse.cs new file mode 100644 index 0000000..6d04265 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDB/UploadUDBParamGroupResponse.cs @@ -0,0 +1,22 @@ +namespace UCloudSDK.Models +{ + /// + /// 导入udb配置 + /// + /// http://docs.ucloud.cn/api/udb/upload_udb_param_group.html + /// + /// + public partial class UploadUDBParamGroupResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// 配置参数组id + /// + public int GroupId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/AttachUdiskRequest.cs b/UCloudSDK.NetCore2/Models/UDisk/AttachUdiskRequest.cs new file mode 100644 index 0000000..08c68d5 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/AttachUdiskRequest.cs @@ -0,0 +1,64 @@ +namespace UCloudSDK.Models +{ + /// + /// 将一个可用的UDisk挂载到某台主机上,当UDisk挂载成功后,还需要在主机内部进行文件系统操作 + /// + /// http://docs.ucloud.cn/api/udisk/attach_udisk.html + /// + /// + public partial class AttachUDiskRequest + { + /// + /// 默认Action名称 + /// + private string _action = "AttachUDisk"; + + /// + /// API名称 + /// + /// AttachUDisk + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// 需要挂载的UDisk实例ID + /// + public string UDiskId { get; set; } + + /// + /// 项目编号 + /// + public string ProjectId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UHost实例ID + /// 需要挂载的UDisk实例ID + public AttachUDiskRequest(string region, string uhostid, string udiskid) + { + Region = region; + UHostId = uhostid; + UDiskId = udiskid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/AttachUdiskResponse.cs b/UCloudSDK.NetCore2/Models/UDisk/AttachUdiskResponse.cs new file mode 100644 index 0000000..e87e2cb --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/AttachUdiskResponse.cs @@ -0,0 +1,30 @@ +namespace UCloudSDK.Models +{ + /// + /// 将一个可用的UDisk挂载到某台主机上,当UDisk挂载成功后,还需要在主机内部进行文件系统操作 + /// + /// http://docs.ucloud.cn/api/udisk/attach_udisk.html + /// + /// + public partial class AttachUDiskResponse : UResponse + { + /// + /// 响应动作 + /// + /// AttachUdiskResposne + /// + /// + public string Action { get; set; } + + /// + /// 挂载的UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// 挂载的UDisk实例ID + /// + public string UDiskId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/CloneUDiskRequest.cs b/UCloudSDK.NetCore2/Models/UDisk/CloneUDiskRequest.cs new file mode 100644 index 0000000..aa8c843 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/CloneUDiskRequest.cs @@ -0,0 +1,98 @@ +namespace UCloudSDK.Models +{ + /// + /// 从UDisk创建UDisk克隆 + /// + /// http://docs.ucloud.cn/api/udisk/clone_udisk.html + /// + /// + public partial class CloneUDiskRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CloneUDisk"; + + /// + /// API名称 + /// + /// CloneUDisk + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 实例名称 + /// + public string Name { get; set; } + + /// + /// 克隆父Disk的Id + /// + public string SourceId { get; set; } + + /// + /// 磁盘大小 + /// + /// 单位:GB, 范围[1~1000] + /// + /// + public int Size { get; set; } + + /// + /// 使用的代金券id + /// + public string CouponId { get; set; } + + /// + /// Disk注释 + /// + public string Comment { get; set; } + + /// + /// Year + /// + /// Month, Dynamic 默认: Dynamic + /// + /// + public string ChargeType { get; set; } + + /// + /// 购买时长 默认 + /// + /// 1 + /// + /// + public int? Quantity { get; set; } + + /// + /// 项目编号 + /// + public string ProjectId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 克隆父Disk的Id + /// 磁盘大小 + public CloneUDiskRequest(string region, string sourceid, int size) + { + Region = region; + SourceId = sourceid; + Size = size; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/CloneUDiskResponse.cs b/UCloudSDK.NetCore2/Models/UDisk/CloneUDiskResponse.cs new file mode 100644 index 0000000..c5328f3 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/CloneUDiskResponse.cs @@ -0,0 +1,22 @@ +namespace UCloudSDK.Models +{ + /// + /// 从UDisk创建UDisk克隆 + /// + /// http://docs.ucloud.cn/api/udisk/clone_udisk.html + /// + /// + public partial class CloneUDiskResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// 创建UDisk Id + /// + public string UDiskId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/CloneUDiskSnapshotRequest.cs b/UCloudSDK.NetCore2/Models/UDisk/CloneUDiskSnapshotRequest.cs new file mode 100644 index 0000000..0934a66 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/CloneUDiskSnapshotRequest.cs @@ -0,0 +1,93 @@ +namespace UCloudSDK.Models +{ + /// + /// 从快照创建UDisk克隆 + /// + /// http://docs.ucloud.cn/api/udisk/clone_udisk_snapshot.html + /// + /// + public partial class CloneUDiskSnapshotRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CloneUDiskSnapshot"; + + /// + /// API名称 + /// + /// CloneUDiskSnapshot + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 实例名称 + /// + public string Name { get; set; } + + /// + /// 克隆父Snapshot的Id + /// + public string SourceId { get; set; } + + /// + /// 磁盘大小 + /// + /// 单位:GB, 范围[1~1000] + /// + /// + public int Size { get; set; } + + /// + /// 使用的代金券id + /// + public string CouponId { get; set; } + + /// + /// Disk注释 + /// + public string Comment { get; set; } + + /// + /// Year + /// + /// Month, Dynamic 默认: Dynamic + /// + /// + public string ChargeType { get; set; } + + /// + /// 购买时长 默认 + /// + /// 1 + /// + /// + public int? Quantity { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 克隆父Snapshot的Id + /// 磁盘大小 + public CloneUDiskSnapshotRequest(string region, string sourceid, int size) + { + Region = region; + SourceId = sourceid; + Size = size; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/CloneUDiskSnapshotResponse.cs b/UCloudSDK.NetCore2/Models/UDisk/CloneUDiskSnapshotResponse.cs new file mode 100644 index 0000000..f1c36c9 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/CloneUDiskSnapshotResponse.cs @@ -0,0 +1,22 @@ +namespace UCloudSDK.Models +{ + /// + /// 从快照创建UDisk克隆 + /// + /// http://docs.ucloud.cn/api/udisk/clone_udisk_snapshot.html + /// + /// + public partial class CloneUDiskSnapshotResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// 创建UDisk Id + /// + public string UDiskId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/CreateUDiskRequest.cs b/UCloudSDK.NetCore2/Models/UDisk/CreateUDiskRequest.cs new file mode 100644 index 0000000..414d50b --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/CreateUDiskRequest.cs @@ -0,0 +1,88 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建UDisk磁盘 + /// + /// http://docs.ucloud.cn/api/udisk/create_udisk.html + /// + /// + public partial class CreateUDiskRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreateUDisk"; + + /// + /// API名称 + /// + /// CreateUDisk + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 磁盘大小 + /// + /// 单位:GB, 范围[1~1000] + /// + /// + public int Size { get; set; } + + /// + /// 实例名称 + /// + public string Name { get; set; } + + /// + /// 使用的代金券id + /// + public string CouponId { get; set; } + + /// + /// Year + /// + /// Month, Dynamic, Trial 默认: Dynamic + /// + /// + public string ChargeType { get; set; } + + /// + /// 购买时长 默认 + /// + /// 1 + /// + /// + public int? Quantity { get; set; } + + /// + /// 项目编号 + /// + public string ProjectId { get; set; } + + /// + /// 实例化 类. + /// + /// 数数据中心 + /// 硬盘名称. + /// 磁盘大小 + public CreateUDiskRequest(string region,string name, int size) + { + Region = region; + Name = name; + Size = size; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/CreateUDiskResponse.cs b/UCloudSDK.NetCore2/Models/UDisk/CreateUDiskResponse.cs new file mode 100644 index 0000000..ac6714f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/CreateUDiskResponse.cs @@ -0,0 +1,22 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建UDisk磁盘 + /// + /// http://docs.ucloud.cn/api/udisk/create_udisk.html + /// + /// + public partial class CreateUDiskResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// UDisk实例Id + /// + public string UDiskId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/CreateUDiskSnapshotRequest.cs b/UCloudSDK.NetCore2/Models/UDisk/CreateUDiskSnapshotRequest.cs new file mode 100644 index 0000000..7a7ea38 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/CreateUDiskSnapshotRequest.cs @@ -0,0 +1,87 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建snapshot快照 + /// + /// http://docs.ucloud.cn/api/udisk/create_udisk_snapshot.html + /// + /// + public partial class CreateUDiskSnapshotRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreateUDiskSnapshot"; + + /// + /// API名称 + /// + /// CreateUDiskSnapshot + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 快照的UDisk的Id + /// + public string UDiskId { get; set; } + + /// + /// 快照名称 + /// + public string Name { get; set; } + + /// + /// 付费方式 + /// + /// Year,Month, Dynamic 默认: Dynamic + /// + /// + public string ChargeType { get; set; } + + /// + /// 购买时长 默认 + /// + /// 1 + /// + /// + public int? Quantity { get; set; } + + /// + /// 项目编号 + /// + public string ProjectId { get; set; } + + /// + /// 快照描述 + /// + public string Comment { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 快照的UDisk的Id + /// 快照名称. + /// 快照描述. + public CreateUDiskSnapshotRequest(string region, string udiskid,string name,string comment) + { + Region = region; + UDiskId = udiskid; + Name = name; + Comment = comment; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/CreateUDiskSnapshotResponse.cs b/UCloudSDK.NetCore2/Models/UDisk/CreateUDiskSnapshotResponse.cs new file mode 100644 index 0000000..30738f2 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/CreateUDiskSnapshotResponse.cs @@ -0,0 +1,22 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建snapshot快照 + /// + /// http://docs.ucloud.cn/api/udisk/create_udisk_snapshot.html + /// + /// + public partial class CreateUDiskSnapshotResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// 快照Id + /// + public string SnapshotId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DeleteUDiskRequest.cs b/UCloudSDK.NetCore2/Models/UDisk/DeleteUDiskRequest.cs new file mode 100644 index 0000000..d52952a --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DeleteUDiskRequest.cs @@ -0,0 +1,57 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除UDisk + /// + /// http://docs.ucloud.cn/api/udisk/delete_udisk.html + /// + /// + public partial class DeleteUDiskRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DeleteUDisk"; + + /// + /// API名称 + /// + /// DeleteUDisk + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 要删除的UDisk的Id + /// + public string UDiskId { get; set; } + + /// + /// 项目编号 + /// + public string ProjectId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 要删除的UDisk的Id + public DeleteUDiskRequest(string region, string udiskid) + { + Region = region; + UDiskId = udiskid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DeleteUDiskResponse.cs b/UCloudSDK.NetCore2/Models/UDisk/DeleteUDiskResponse.cs new file mode 100644 index 0000000..b020195 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DeleteUDiskResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除UDisk + /// + /// http://docs.ucloud.cn/api/udisk/delete_udisk.html + /// + /// + public partial class DeleteUDiskResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DeleteUDiskSnapshotRequest.cs b/UCloudSDK.NetCore2/Models/UDisk/DeleteUDiskSnapshotRequest.cs new file mode 100644 index 0000000..7d2385f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DeleteUDiskSnapshotRequest.cs @@ -0,0 +1,57 @@ +namespace UCloudSDK.Models +{ + /// + /// 销毁Snapshot + /// + /// http://docs.ucloud.cn/api/udisk/delete_udisk_snapshot.html + /// + /// + public partial class DeleteUDiskSnapshotRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DeleteUDiskSnapshot"; + + /// + /// API名称 + /// + /// DeleteUDiskSnapshot + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 快照Id + /// + public string SnapshotId { get; set; } + + /// + /// 项目编号 + /// + public string ProjectId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 快照Id + public DeleteUDiskSnapshotRequest(string region, string snapshotid) + { + Region = region; + SnapshotId = snapshotid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DeleteUDiskSnapshotResponse.cs b/UCloudSDK.NetCore2/Models/UDisk/DeleteUDiskSnapshotResponse.cs new file mode 100644 index 0000000..505738a --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DeleteUDiskSnapshotResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 销毁Snapshot + /// + /// http://docs.ucloud.cn/api/udisk/delete_udisk_snapshot.html + /// + /// + public partial class DeleteUDiskSnapshotResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DescribeUDisk.DataSet.cs b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDisk.DataSet.cs new file mode 100644 index 0000000..58ed78d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDisk.DataSet.cs @@ -0,0 +1,73 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取UDisk实例 + /// + /// http://docs.ucloud.cn/api/udisk/describe_udisk.html + /// + /// + public partial class DescribeUDiskDataSet + { + /// + /// UDisk实例Id + /// + public string UDiskId { get; set; } + + /// + /// 实例名称 + /// + public string Name { get; set; } + + /// + /// 容量单位GB + /// + public string Size { get; set; } + + /// + /// 状态 + /// + /// Available(可用),Attaching(挂载中),InUse(已挂载),Detaching(卸载中), + /// + /// + public string Status { get; set; } + + /// + /// 创建时间 + /// + public int CreateTime { get; set; } + + /// + /// 过期时间 + /// + public int ExpiredTime { get; set; } + + /// + /// 挂载的UHost的Id + /// + public string UHostId { get; set; } + + /// + /// 挂载的UHost的Name + /// + public string UHostName { get; set; } + + /// + /// 挂载的UHost的IP + /// + public string UHostIP { get; set; } + + /// + /// 挂载的设备名称 + /// + public string DeviceName { get; set; } + + /// + /// Year + /// + /// Month,Dynamic,Trial + /// + /// + public string ChargeType { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskPrice.DataSet.cs b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskPrice.DataSet.cs new file mode 100644 index 0000000..8c93b8c --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskPrice.DataSet.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取udisk实例价格信息 + /// + /// http://docs.ucloud.cn/api/udisk/describe_udisk_price.html + /// + /// + public partial class DescribeUDiskPriceDataSet + { + /// + /// Year + /// + /// Month, Dynamic,Trial + /// + /// + public string ChargeType { get; set; } + + /// + /// 价格 + /// + public float Price { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskPriceRequest.cs b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskPriceRequest.cs new file mode 100644 index 0000000..f49f789 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskPriceRequest.cs @@ -0,0 +1,76 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取udisk实例价格信息 + /// + /// http://docs.ucloud.cn/api/udisk/describe_udisk_price.html + /// + /// + public partial class DescribeUDiskPriceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeUDiskPrice"; + + /// + /// API名称 + /// + /// DescribeUDiskPrice + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 购买UDisk大小 + /// + /// 单位:GB,范围[1~1000] + /// + /// + public int Size { get; set; } + + /// + /// Year + /// + /// Month, Dynamic,Trial,默认: Dynamic如果不指定,则一次性获取三种计费 + /// + /// + public string ChargeType { get; set; } + + /// + /// 购买UDisk的时长 + /// + /// 默认值为1 + /// + /// + public int? Quantity { get; set; } + + /// + /// 项目编号 + /// + public string ProjectId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 购买UDisk大小 + public DescribeUDiskPriceRequest(string region, int size) + { + Region = region; + Size = size; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskPriceResponse.cs b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskPriceResponse.cs new file mode 100644 index 0000000..baacce8 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskPriceResponse.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取udisk实例价格信息 + /// + /// http://docs.ucloud.cn/api/udisk/describe_udisk_price.html + /// + /// + public partial class DescribeUDiskPriceResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// 价格 + /// + public List DataSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskRequest.cs b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskRequest.cs new file mode 100644 index 0000000..cf359bf --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskRequest.cs @@ -0,0 +1,71 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取UDisk实例 + /// + /// http://docs.ucloud.cn/api/udisk/describe_udisk.html + /// + /// + public partial class DescribeUDiskRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeUDisk"; + + /// + /// API名称 + /// + /// DescribeUDisk + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UDisk Id(留空返回全部) + /// + public string UDiskId { get; set; } + + /// + /// 数据偏移量 + /// + /// 默认为0 + /// + /// + public int? Offset { get; set; } + + /// + /// 返回数据长度 + /// + /// 默认为20 + /// + /// + public int? Limit { get; set; } + + /// + /// 项目编号 + /// + public string ProjectId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + public DescribeUDiskRequest(string region) + { + Region = region; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskResponse.cs b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskResponse.cs new file mode 100644 index 0000000..e417e16 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskResponse.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取UDisk实例 + /// + /// http://docs.ucloud.cn/api/udisk/describe_udisk.html + /// + /// + public partial class DescribeUDiskResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// JSON 格式的UDisk数据列表 + /// + /// 每项参数可见下面 ResponseItem + /// + /// + public List DataSet { get; set; } + + /// + /// 根据过滤条件得到的总数 + /// + public int TotalCount { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskSnapshot.Response.cs b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskSnapshot.Response.cs new file mode 100644 index 0000000..ac67193 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskSnapshot.Response.cs @@ -0,0 +1,60 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取UDisk快照 + /// + /// http://docs.ucloud.cn/api/udisk/describe_udisk_snapshot.html + /// + /// + public partial class DescribeUDiskSnapshotResponse + { + /// + /// 快照Id + /// + public string SnapshotId { get; set; } + + /// + /// 快照名称 + /// + public string Name { get; set; } + + /// + /// 快照的源UDisk的Id + /// + public string UDiskId { get; set; } + + /// + /// 快照的源UDisk的Name + /// + public string UDiskName { get; set; } + + /// + /// 创建时间 + /// + public int CreateTime { get; set; } + + /// + /// 过期时间 + /// + public int ExpiredTime { get; set; } + + /// + /// Year + /// + /// Month,Dynamic,Trial + /// + /// + public string ChargeType { get; set; } + + /// + /// 容量单位GB + /// + public int Size { get; set; } + + /// + /// 快照描述 + /// + public string Comment { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskSnapshotRequest.cs b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskSnapshotRequest.cs new file mode 100644 index 0000000..cb6e6e2 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskSnapshotRequest.cs @@ -0,0 +1,71 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取UDisk快照 + /// + /// http://docs.ucloud.cn/api/udisk/describe_udisk_snapshot.html + /// + /// + public partial class DescribeUDiskSnapshotRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeUDiskSnapshot"; + + /// + /// API名称 + /// + /// DescribeUDiskSnapshot + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UDisk快照Id(留空返回全部) + /// + public string SnapshotId { get; set; } + + /// + /// 数据偏移量 + /// + /// 默认为0 + /// + /// + public int? Offset { get; set; } + + /// + /// 返回数据长度 + /// + /// 默认为20 + /// + /// + public int? Limit { get; set; } + + /// + /// 项目编号 + /// + public string ProjectId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + public DescribeUDiskSnapshotRequest(string region) + { + Region = region; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskSnapshotResponse.cs b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskSnapshotResponse.cs new file mode 100644 index 0000000..28e46ff --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskSnapshotResponse.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取UDisk快照 + /// + /// http://docs.ucloud.cn/api/udisk/describe_udisk_snapshot.html + /// + /// + public partial class DescribeUDiskSnapshotResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// JSON 格式的Snapshot列表 + /// + /// 详细参见ResponseItem + /// + /// + public List DataSet { get; set; } + + /// + /// 根据过滤条件得到的总数 + /// + public int TotalCount { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskUpgradePriceRequest.cs b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskUpgradePriceRequest.cs new file mode 100644 index 0000000..a7a4490 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskUpgradePriceRequest.cs @@ -0,0 +1,67 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取udisk升级价格信息 + /// + /// http://docs.ucloud.cn/api/udisk/describe_udisk_upgrade_price.html + /// + /// + public partial class DescribeUDiskUpgradePriceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeUDiskUpgradePrice"; + + /// + /// API名称 + /// + /// DescribeUDiskUpgradePrice + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 购买UDisk大小 + /// + /// 单位:GB,范围[1~1000] + /// + /// + public int Size { get; set; } + + /// + /// 升级目标UDisk ID + /// + public string SourceId { get; set; } + + /// + /// 项目编号 + /// + public string ProjectId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 升级目标UDisk ID + /// 购买UDisk大小 + public DescribeUDiskUpgradePriceRequest(string region, string sourceid, int size) + { + Region = region; + Size = size; + SourceId = sourceid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskUpgradePriceResponse.cs b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskUpgradePriceResponse.cs new file mode 100644 index 0000000..dd4c3e1 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DescribeUDiskUpgradePriceResponse.cs @@ -0,0 +1,22 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取udisk升级价格信息 + /// + /// http://docs.ucloud.cn/api/udisk/describe_udisk_upgrade_price.html + /// + /// + public partial class DescribeUDiskUpgradePriceResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// 价格 + /// + public float Price { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DetachUDiskRequest.cs b/UCloudSDK.NetCore2/Models/UDisk/DetachUDiskRequest.cs new file mode 100644 index 0000000..45730b0 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DetachUDiskRequest.cs @@ -0,0 +1,64 @@ +namespace UCloudSDK.Models +{ + /// + /// 卸载某个已经挂载在指定UHost实例上的UDisk + /// + /// http://docs.ucloud.cn/api/udisk/detach_udisk.html + /// + /// + public partial class DetachUDiskRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DetachUDisk"; + + /// + /// API名称 + /// + /// DetachUDisk + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// 需要卸载的UDisk实例ID + /// + public string UDiskId { get; set; } + + /// + /// 项目编号 + /// + public string ProjectId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UHost实例ID + /// 需要卸载的UDisk实例ID + public DetachUDiskRequest(string region, string uhostid, string udiskid) + { + Region = region; + UHostId = uhostid; + UDiskId = udiskid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/DetachUDiskResponse.cs b/UCloudSDK.NetCore2/Models/UDisk/DetachUDiskResponse.cs new file mode 100644 index 0000000..948e854 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/DetachUDiskResponse.cs @@ -0,0 +1,30 @@ +namespace UCloudSDK.Models +{ + /// + /// 卸载某个已经挂载在指定UHost实例上的UDisk + /// + /// http://docs.ucloud.cn/api/udisk/detach_udisk.html + /// + /// + public partial class DetachUDiskResponse : UResponse + { + /// + /// 响应动作 + /// + /// DetachUdiskResposne + /// + /// + public string Action { get; set; } + + /// + /// 卸载的UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// 卸载的UDisk实例ID + /// + public string UDiskId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/RenameUDiskRequest.cs b/UCloudSDK.NetCore2/Models/UDisk/RenameUDiskRequest.cs new file mode 100644 index 0000000..546450d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/RenameUDiskRequest.cs @@ -0,0 +1,64 @@ +namespace UCloudSDK.Models +{ + /// + /// 重命名UDisk + /// + /// http://docs.ucloud.cn/api/udisk/rename_udisk.html + /// + /// + public partial class RenameUDiskRequest + { + /// + /// 默认Action名称 + /// + private string _action = "RenameUDisk"; + + /// + /// API名称 + /// + /// RenameUDisk + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 重命名的UDisk的Id + /// + public string UDiskId { get; set; } + + /// + /// 重命名UDisk的name + /// + public string UDiskName { get; set; } + + /// + /// 项目编号 + /// + public string ProjectId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 重命名的UDisk的Id + /// 重命名UDisk的name + public RenameUDiskRequest(string region, string udiskid, string udiskname) + { + Region = region; + UDiskId = udiskid; + UDiskName = udiskname; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/RenameUDiskResponse.cs b/UCloudSDK.NetCore2/Models/UDisk/RenameUDiskResponse.cs new file mode 100644 index 0000000..89340b5 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/RenameUDiskResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 重命名UDisk + /// + /// http://docs.ucloud.cn/api/udisk/rename_udisk.html + /// + /// + public partial class RenameUDiskResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/ResizeUDiskRequest.cs b/UCloudSDK.NetCore2/Models/UDisk/ResizeUDiskRequest.cs new file mode 100644 index 0000000..f7ff850 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/ResizeUDiskRequest.cs @@ -0,0 +1,72 @@ +namespace UCloudSDK.Models +{ + /// + /// 调整UDisk容量 + /// + /// http://docs.ucloud.cn/api/udisk/resize_udisk.html + /// + /// + public partial class ResizeUDiskRequest + { + /// + /// 默认Action名称 + /// + private string _action = "ResizeUDisk"; + + /// + /// API名称 + /// + /// ResizeUDisk + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UDisk Id + /// + public string UDiskId { get; set; } + + /// + /// 调整后大小 + /// + /// 单位:GB, 范围[1~1000],只能增大 + /// + /// + public int Size { get; set; } + + /// + /// 使用的代金券id + /// + public string CouponId { get; set; } + + /// + /// 项目编号 + /// + public string ProjectId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UDisk Id + /// 调整后大小 + public ResizeUDiskRequest(string region, string udiskid, int size) + { + Region = region; + UDiskId = udiskid; + Size = size; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UDisk/ResizeUDiskResponse.cs b/UCloudSDK.NetCore2/Models/UDisk/ResizeUDiskResponse.cs new file mode 100644 index 0000000..c0bb611 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UDisk/ResizeUDiskResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 调整UDisk容量 + /// + /// http://docs.ucloud.cn/api/udisk/resize_udisk.html + /// + /// + public partial class ResizeUDiskResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/CreateBucketRequest.cs b/UCloudSDK.NetCore2/Models/UFile/CreateBucketRequest.cs new file mode 100644 index 0000000..d5a847d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/CreateBucketRequest.cs @@ -0,0 +1,58 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建Bucket + /// + /// http://docs.ucloud.cn/api/ufile/create_bucket.html + /// + /// + public partial class CreateBucketRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreateBucket"; + + /// + /// API名称 + /// + /// CreateBucket + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 待创建Bucket的名称 + /// + /// BucketName参数将构成域名的一部分(与Bucket默认关联的域名为<BucketName>.ufile.ucloud.cn),必须具有全局唯一性。 BucketName参数必须符合Bucket名称规范,规范如下: (1) 长度在3~63字节之间; (2) 可以由多个标签组成,各个标签用 . 间隔,每个标签只能包含小字母、数字、连接符(短横线),并且标签的开头和结尾的字符只能是小写字母或数字; (3) 不可以是IP地址。 + /// + /// + public string BucketName { get; set; } + + /// + /// Bucket访问类型 + /// + /// public或private; 默认为private + /// + /// + public string Type { get; set; } + + /// + /// Bucket的自定义域名 + /// + public NList Domain { get; set; } + + /// + /// 实例化 类. + /// + /// 待创建Bucket的名称 + public CreateBucketRequest(string bucketname) + { + BucketName = bucketname; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/CreateBucketResponse.cs b/UCloudSDK.NetCore2/Models/UFile/CreateBucketResponse.cs new file mode 100644 index 0000000..2b3655e --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/CreateBucketResponse.cs @@ -0,0 +1,27 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建Bucket + /// + /// http://docs.ucloud.cn/api/ufile/create_bucket.html + /// + /// + public partial class CreateBucketResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// 已创建Bucket的名称 + /// + public string BucketName { get; set; } + + /// + /// 已创建Bucket的Id + /// + public string BucketId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/DeleteBucketRequest.cs b/UCloudSDK.NetCore2/Models/UFile/DeleteBucketRequest.cs new file mode 100644 index 0000000..d96ab57 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/DeleteBucketRequest.cs @@ -0,0 +1,42 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除Bucket + /// + /// http://docs.ucloud.cn/api/ufile/delete_bucket.html + /// + /// + public partial class DeleteBucketRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DeleteBucket"; + + /// + /// API名称 + /// + /// DeleteBucket + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 待删除Bucket的名称 + /// + public string BucketName { get; set; } + + /// + /// 实例化 类. + /// + /// 待删除Bucket的名称 + public DeleteBucketRequest(string bucketname) + { + BucketName = bucketname; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/DeleteBucketResponse.cs b/UCloudSDK.NetCore2/Models/UFile/DeleteBucketResponse.cs new file mode 100644 index 0000000..8010d4d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/DeleteBucketResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除Bucket + /// + /// http://docs.ucloud.cn/api/ufile/delete_bucket.html + /// + /// + public partial class DeleteBucketResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/DeleteFileResponse.cs b/UCloudSDK.NetCore2/Models/UFile/DeleteFileResponse.cs new file mode 100644 index 0000000..147a871 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/DeleteFileResponse.cs @@ -0,0 +1,12 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除文件 + /// + /// http://docs.ucloud.cn/api/ufile/delete_file.html + /// + /// + public partial class DeleteFileResponse : FileResponse + { + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/DescribeBucket.DataSet.cs b/UCloudSDK.NetCore2/Models/UFile/DescribeBucket.DataSet.cs new file mode 100644 index 0000000..63b85a6 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/DescribeBucket.DataSet.cs @@ -0,0 +1,49 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取Bucket的描述信息 + /// + /// http://docs.ucloud.cn/api/ufile/describe_bucket.html + /// + /// + public partial class DescribeBucketDataSet + { + /// + /// Bucket名称 + /// + public string BucketName { get; set; } + + /// + /// Bucket的Id + /// + public string BucketId { get; set; } + + /// + /// Bucket的域名集合 + /// + public List Domain { get; set; } + + /// + /// 与Bucket关联的CND加速域名的ID列表 + /// + public List CdnDomainId { get; set; } + + /// + /// Bucket访问类型 + /// + public string Type { get; set; } + + /// + /// Bucket的创建时间 + /// + public int CreateTime { get; set; } + + /// + /// Bucket的修改时间 + /// + public int ModifyTime { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/DescribeBucket.Domain.cs b/UCloudSDK.NetCore2/Models/UFile/DescribeBucket.Domain.cs new file mode 100644 index 0000000..fba473a --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/DescribeBucket.Domain.cs @@ -0,0 +1,34 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取Bucket的描述信息 + /// + /// http://docs.ucloud.cn/api/ufile/describe_bucket.html + /// + /// + public partial class DescribeBucketDomain + { + /// + /// 源站域名 + /// + public List Src { get; set; } + + /// + /// UCDN加速域名 + /// + public List Cdn { get; set; } + + /// + /// 用户自定义源站域名 + /// + public List CustomSrc { get; set; } + + /// + /// 用户自定义CDN加速域名 + /// + public List CustomCdn { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/DescribeBucketRequest.cs b/UCloudSDK.NetCore2/Models/UFile/DescribeBucketRequest.cs new file mode 100644 index 0000000..a597227 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/DescribeBucketRequest.cs @@ -0,0 +1,53 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取Bucket的描述信息 + /// + /// http://docs.ucloud.cn/api/ufile/describe_bucket.html + /// + /// + public partial class DescribeBucketRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeBucket"; + + /// + /// API名称 + /// + /// DescribeBucket + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 待获取Bucket的名称 + /// + /// 若不提供,则获取所有Bucket + /// + /// + public string BucketName { get; set; } + + /// + /// 获取所有Bucket列表的偏移数目 + /// + /// 默认为0 + /// + /// + public int? Offset { get; set; } + + /// + /// 获取所有Bucket列表的限制数目 + /// + /// 默认为20 + /// + /// + public int? Limit { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/DescribeBucketResponse.cs b/UCloudSDK.NetCore2/Models/UFile/DescribeBucketResponse.cs new file mode 100644 index 0000000..a3dbf6e --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/DescribeBucketResponse.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取Bucket的描述信息 + /// + /// http://docs.ucloud.cn/api/ufile/describe_bucket.html + /// + /// + public partial class DescribeBucketResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// Bucket的描述信息 + /// + public List DataSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/FileResponse.cs b/UCloudSDK.NetCore2/Models/UFile/FileResponse.cs new file mode 100644 index 0000000..40c065d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/FileResponse.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using RestSharp; + +namespace UCloudSDK.Models +{ + /// + /// 对象存储UFile操作的返回对象 + /// + public partial class FileResponse : ResponseHeader + { + /// + /// 执行结果代码 + /// + /// 执行成功与否,0 表示成功,其他值则为错误代码. + /// + /// + public int RetCode { get; set; } + + /// + /// 消息. + /// + public string ErrMsg { get; set; } + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/FinishMultipartUploadResponse.cs b/UCloudSDK.NetCore2/Models/UFile/FinishMultipartUploadResponse.cs new file mode 100644 index 0000000..6adc617 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/FinishMultipartUploadResponse.cs @@ -0,0 +1,27 @@ +namespace UCloudSDK.Models +{ + /// + /// 完成分片上传 + /// + /// http://docs.ucloud.cn/api/ufile/finish_multipart_upload.html + /// + /// + public partial class FinishMultipartUploadResponse : FileResponse + { + /// + /// 已上传文件所属Bucket的名称 + /// + public string Bucket { get; set; } + + /// + /// 已上传文件在Bucket中的Key名称 + /// + public string Key { get; set; } + + /// + /// 已上传文件的大小 + /// + public int FileSize { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/GetFileList.DataSet.cs b/UCloudSDK.NetCore2/Models/UFile/GetFileList.DataSet.cs new file mode 100644 index 0000000..e64f931 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/GetFileList.DataSet.cs @@ -0,0 +1,50 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取Bucket的文件列表 + /// + /// http://docs.ucloud.cn/api/ufile/get_file_list.html + /// + /// + public partial class GetFileListDataSet + { + /// + /// 文件所属Bucket的名称 + /// + public string BucketName { get; set; } + + /// + /// Bucket中文件的名称 + /// + public string FileName { get; set; } + + /// + /// 文件的哈希值 + /// + /// 默认为md5 + /// + /// + public string Hash { get; set; } + + /// + /// 文件的MIME类型 + /// + public string MimeType { get; set; } + + /// + /// 文件大小 + /// + public int Size { get; set; } + + /// + /// 文件创建时间 + /// + public int CreateTime { get; set; } + + /// + /// 文件修改时间 + /// + public int ModifyTime { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/GetFileListRequest.cs b/UCloudSDK.NetCore2/Models/UFile/GetFileListRequest.cs new file mode 100644 index 0000000..a78c4d0 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/GetFileListRequest.cs @@ -0,0 +1,58 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取Bucket的文件列表 + /// + /// http://docs.ucloud.cn/api/ufile/get_file_list.html + /// + /// + public partial class GetFileListRequest + { + /// + /// 默认Action名称 + /// + private string _action = "GetFileList"; + + /// + /// API名称 + /// + /// GetFileList + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// Bucket名称 + /// + public string BucketName { get; set; } + + /// + /// 获取Bucket中文件列表的偏移数目 + /// + /// 默认为0 + /// + /// + public string Offset { get; set; } + + /// + /// 获取Bucket中文件列表的限制数目 + /// + /// 默认为20 + /// + /// + public string Limit { get; set; } + + /// + /// 实例化 类. + /// + /// Bucket名称 + public GetFileListRequest(string bucketname) + { + BucketName = bucketname; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/GetFileListResponse.cs b/UCloudSDK.NetCore2/Models/UFile/GetFileListResponse.cs new file mode 100644 index 0000000..45ed83d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/GetFileListResponse.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取Bucket的文件列表 + /// + /// http://docs.ucloud.cn/api/ufile/get_file_list.html + /// + /// + public partial class GetFileListResponse : UResponse + { + /// + /// 动作响应 + /// + public string Action { get; set; } + + /// + /// Bucket下的文件列表 + /// + public List DataSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/GetFileResponse.cs b/UCloudSDK.NetCore2/Models/UFile/GetFileResponse.cs new file mode 100644 index 0000000..50ebe76 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/GetFileResponse.cs @@ -0,0 +1,12 @@ +namespace UCloudSDK.Models +{ + /// + /// 下载文件 + /// + /// http://docs.ucloud.cn/api/ufile/get_file.html + /// + /// + public partial class GetFileResponse : FileResponse + { + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/InitiateMultipartUploadResponse.cs b/UCloudSDK.NetCore2/Models/UFile/InitiateMultipartUploadResponse.cs new file mode 100644 index 0000000..b8204da --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/InitiateMultipartUploadResponse.cs @@ -0,0 +1,32 @@ +namespace UCloudSDK.Models +{ + /// + /// 初始化分片上传 + /// + /// http://docs.ucloud.cn/api/ufile/initiate_multipart_upload.html + /// + /// + public partial class InitiateMultipartUploadResponse : UResponse + { + /// + /// 本次分片上传的上传Id + /// + public string UploadId { get; set; } + + /// + /// 分片的块大小 + /// + public int BlkSize { get; set; } + + /// + /// 上传文件所属Bucket的名称 + /// + public string Bucket { get; set; } + + /// + /// 上传文件在Bucket中的Key名称 + /// + public string Key { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/PartFile.cs b/UCloudSDK.NetCore2/Models/UFile/PartFile.cs new file mode 100644 index 0000000..ea7bae1 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/PartFile.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UCloudSDK.Models +{ + /// + /// 分片文件 + /// + public partial class PartFile + { + /// + /// 文件路径. + /// + public string FilePath { get; set; } + + /// + /// 签名. + /// + public string Auth { get; set; } + + /// + /// 分片的块大小. + /// + public int BlkSize { get; set; } + + /// + /// 上传文件在Bucket中的Key名称. + /// + public string Key { get; set; } + + /// + /// 上传文件所属Bucket的名称. + /// + public string Bucket { get; set; } + + /// + /// 是否为最后一块分片. + /// + public bool IsLast { get; set; } + + /// + /// 文件MD5. + /// + public string Md5 { get; set; } + + /// + /// 本次分片上传的上传Id. + /// + public string UploadId { get; set; } + + /// + /// 分片的Etag列表. + /// + public SortedDictionary Etags { get; set; } + + /// + /// 分片编号. + /// + public int PartNumber { get; set; } + + /// + /// 文件的MIME. + /// + public string Mime { get; set; } + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/PostFileRequest.cs b/UCloudSDK.NetCore2/Models/UFile/PostFileRequest.cs new file mode 100644 index 0000000..7f28683 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/PostFileRequest.cs @@ -0,0 +1,54 @@ +namespace UCloudSDK.Models +{ + /// + /// 表单上传文件 + /// + /// http://docs.ucloud.cn/api/ufile/post_file.html + /// + /// + public partial class PostFileRequest + { + /// + /// 默认Action名称 + /// + private string _action = "PostFile"; + + /// + /// API名称 + /// + /// PostFile + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// Bucket中文件的名称 + /// + public string FileName { get; set; } + + /// + /// 上传请求的授权签名 + /// + public string Authorization { get; set; } + + /// + /// 上传文件本身的MimeType + /// + public string Content__Type { get; set; } + + /// + /// 实例化 类. + /// + /// Bucket中文件的名称 + /// 上传请求的授权签名 + public PostFileRequest(string filename, string authorization) + { + FileName = filename; + Authorization = authorization; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/PostFileResponse.cs b/UCloudSDK.NetCore2/Models/UFile/PostFileResponse.cs new file mode 100644 index 0000000..e56263f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/PostFileResponse.cs @@ -0,0 +1,12 @@ +namespace UCloudSDK.Models +{ + /// + /// 表单上传文件 + /// + /// http://docs.ucloud.cn/api/ufile/post_file.html + /// + /// + public partial class PostFileResponse : FileResponse + { + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/PutFileResponse.cs b/UCloudSDK.NetCore2/Models/UFile/PutFileResponse.cs new file mode 100644 index 0000000..17ff72e --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/PutFileResponse.cs @@ -0,0 +1,12 @@ +namespace UCloudSDK.Models +{ + /// + /// 普通上传文件 + /// + /// http://docs.ucloud.cn/api/ufile/put_file.html + /// + /// + public partial class PutFileResponse : FileResponse + { + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/ResponseHeader.cs b/UCloudSDK.NetCore2/Models/UFile/ResponseHeader.cs new file mode 100644 index 0000000..32e86e3 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/ResponseHeader.cs @@ -0,0 +1,33 @@ +namespace UCloudSDK.Models +{ + /// + /// 对象存储UFile操作后返回的HTTP Header + /// + public partial class ResponseHeader + { + /// + /// 文件哈希值. + /// + public string ETag { get; set; } + + /// + /// 会话Id. + /// + public string XSessionId { get; set; } + + /// + /// 文件长度. + /// + public int ContentLength { get; set; } + + /// + /// 文件类型. + /// + public string ContentType { get; set; } + + /// + /// 文件的范围. + /// + public string ContentRange { get; set; } + } +} \ No newline at end of file diff --git a/UCloudSDK.NetCore2/Models/UFile/UpdateBucketRequest.cs b/UCloudSDK.NetCore2/Models/UFile/UpdateBucketRequest.cs new file mode 100644 index 0000000..41c22d8 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/UpdateBucketRequest.cs @@ -0,0 +1,47 @@ +namespace UCloudSDK.Models +{ + /// + /// 设置Bucket的属性 + /// + /// http://docs.ucloud.cn/api/ufile/update_bucket.html + /// + /// + public partial class UpdateBucketRequest + { + /// + /// 默认Action名称 + /// + private string _action = "UpdateBucket"; + + /// + /// API名称 + /// + /// UpdateBucket + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 待修改Bucket的名称 + /// + public string BucketName { get; set; } + + /// + /// Bucket访问类型 + /// + public string Type { get; set; } + + /// + /// 实例化 类. + /// + /// 待修改Bucket的名称 + public UpdateBucketRequest(string bucketname) + { + BucketName = bucketname; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/UpdateBucketResponse.cs b/UCloudSDK.NetCore2/Models/UFile/UpdateBucketResponse.cs new file mode 100644 index 0000000..bbf4037 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/UpdateBucketResponse.cs @@ -0,0 +1,16 @@ +namespace UCloudSDK.Models +{ + /// + /// 设置Bucket的属性 + /// + /// http://docs.ucloud.cn/api/ufile/update_bucket.html + /// + /// + public partial class UpdateBucketResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/UploadHitRequest.cs b/UCloudSDK.NetCore2/Models/UFile/UploadHitRequest.cs new file mode 100644 index 0000000..37946d2 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/UploadHitRequest.cs @@ -0,0 +1,42 @@ +namespace UCloudSDK.Models +{ + /// + /// 秒传 + /// + /// http://docs.ucloud.cn/api/ufile/upload_hit.html + /// + /// + public partial class UploadHitRequest + { + /// + /// 待上传文件的ETag + /// + /// 详见ETag生成文档 + /// + /// + public string Hash { get; set; } + + /// + /// Bucket中文件的名称 + /// + public string FileName { get; set; } + + /// + /// 待上传文件的大小 + /// + public string FileSize { get; set; } + + /// + /// 实例化 类. + /// + /// 待上传文件的ETag + /// Bucket中文件的名称 + /// 待上传文件的大小 + public UploadHitRequest(string hash, string filename, string filesize) + { + Hash = hash; + FileName = filename; + FileSize = filesize; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/UploadHitResponse.cs b/UCloudSDK.NetCore2/Models/UFile/UploadHitResponse.cs new file mode 100644 index 0000000..11a5748 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/UploadHitResponse.cs @@ -0,0 +1,12 @@ +namespace UCloudSDK.Models +{ + /// + /// 秒传 + /// + /// http://docs.ucloud.cn/api/ufile/upload_hit.html + /// + /// + public partial class UploadHitResponse : FileResponse + { + } +} diff --git a/UCloudSDK.NetCore2/Models/UFile/UploadPartResponse.cs b/UCloudSDK.NetCore2/Models/UFile/UploadPartResponse.cs new file mode 100644 index 0000000..4b7282f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UFile/UploadPartResponse.cs @@ -0,0 +1,17 @@ +namespace UCloudSDK.Models +{ + /// + /// 上传文件分片 + /// + /// http://docs.ucloud.cn/api/ufile/upload_part.html + /// + /// + public partial class UploadPartResponse : FileResponse + { + /// + /// 本次分片上传的分片号码 + /// + public int PartNumber { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/AttachUdiskRequest.cs b/UCloudSDK.NetCore2/Models/UHost/AttachUdiskRequest.cs new file mode 100644 index 0000000..3b84603 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/AttachUdiskRequest.cs @@ -0,0 +1,13 @@ +namespace UCloudSDK.Models +{ + /// + /// 将一个可用的UDisk挂载到某台主机上,当UDisk挂载成功后,还需要在主机内部进行文件系统操作。 + /// + /// http://docs.ucloud.cn/api/uhost/attach_udisk.html + /// + /// + public partial class AttachUDiskRequest + { + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/AttachUdiskResponse.cs b/UCloudSDK.NetCore2/Models/UHost/AttachUdiskResponse.cs new file mode 100644 index 0000000..f939419 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/AttachUdiskResponse.cs @@ -0,0 +1,12 @@ +namespace UCloudSDK.Models +{ + /// + /// 将一个可用的UDisk挂载到某台主机上,当UDisk挂载成功后,还需要在主机内部进行文件系统操作。 + /// + /// http://docs.ucloud.cn/api/uhost/attach_udisk.html + /// + /// + public partial class AttachUDiskResponse : UResponse + { + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/CreateCustomImageRequest.cs b/UCloudSDK.NetCore2/Models/UHost/CreateCustomImageRequest.cs new file mode 100644 index 0000000..bb28be1 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/CreateCustomImageRequest.cs @@ -0,0 +1,64 @@ +namespace UCloudSDK.Models +{ + /// + /// 从指定UHost实例,生成自定义镜像。 + /// + /// http://docs.ucloud.cn/api/uhost/create_custom_image.html + /// + /// + public partial class CreateCustomImageRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreateCustomImage"; + + /// + /// API名称 + /// + /// CreateCustomImage + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// 镜像名称 + /// + public string ImageName { get; set; } + + /// + /// 镜像描述 + /// + public string ImageDescription { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UHost实例ID + /// 镜像名称 + public CreateCustomImageRequest(string region, string uhostid, string imagename) + { + Region = region; + UHostId = uhostid; + ImageName = imagename; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/CreateCustomImageResponse.cs b/UCloudSDK.NetCore2/Models/UHost/CreateCustomImageResponse.cs new file mode 100644 index 0000000..5b29471 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/CreateCustomImageResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 从指定UHost实例,生成自定义镜像。 + /// + /// http://docs.ucloud.cn/api/uhost/create_custom_image.html + /// + /// + public partial class CreateCustomImageResponse : UResponse + { + /// + /// 响应动作 + /// + /// CreateCustomImageResposne + /// + /// + public string Action { get; set; } + + /// + /// 镜像Id + /// + public string ImageId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/CreateUHostInstanceRequest.cs b/UCloudSDK.NetCore2/Models/UHost/CreateUHostInstanceRequest.cs new file mode 100644 index 0000000..d02858f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/CreateUHostInstanceRequest.cs @@ -0,0 +1,154 @@ +namespace UCloudSDK.Models +{ + /// + /// 指定数据中心,根据资源使用量创建指定数量的UHost实例。 + /// + /// http://docs.ucloud.cn/api/uhost/create_uhost_instance.html + /// + /// + public partial class CreateUHostInstanceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreateUHostInstance"; + + /// + /// API名称 + /// + /// CreateUHostInstance + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 镜像Id + /// + /// 参见 DescribeImage + /// + /// + public string ImageId { get; set; } + + /// + /// 认证方式 + /// + /// 密码: Password,key: KeyPair(暂不支持) + /// + /// + public string LoginMode { get; set; } + + /// + /// UHost密码 + /// + private string _password; + + /// + /// UHost密码 + /// + /// LoginMode为Password时此项必须 + /// + /// + public string Password + { + get { return _password; } + set { _password = value.ToBase64(); } + } + + /// + /// Keyname + /// + /// LoginMode为KeyPair时此项必须(暂不支持) + /// + /// + public string KeyPair { get; set; } + + /// + /// 虚拟CPU核数 + /// + /// 单位:个,范围:[1,16],最小值为1,其他值是2的倍数, 默认值: 4 + /// + /// + public int? CPU { get; set; } + + /// + /// 内存大小 + /// + /// 单位:MB范围[2048,65536], 步长:2048, 默认值:8192 + /// + /// + public int? Memory { get; set; } + + /// + /// 数据盘大小 + /// + /// 单位:GB, 范围[0,1000],步长:10, 默认值:60 + /// + /// + public int? DiskSpace { get; set; } + + /// + /// UHost实例名称 + /// + /// 默认:UHost + /// + /// + public string Name { get; set; } + + /// + /// 网络Id + /// + /// 默认:基础网络 + /// + /// + public string NetworkId { get; set; } + + /// + /// 防火墙Id + /// + /// 默认:Web防火墙 + /// + /// + public string SecurityGroupId { get; set; } + + /// + /// 计费模式 + /// + /// 枚举值为:Year,按年付费;Month,按月付费;Dynamic,按需付费(需开启权限);Trial,试用(需开启权限)默认为月付 + /// + /// + public string ChargeType { get; set; } + + /// + /// 购买时长 + /// + /// 默认: 1 + /// + /// + public int? Quantity { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 镜像Id + /// 认证方式 + public CreateUHostInstanceRequest(string region, string imageid, string loginmode) + { + Region = region; + ImageId = imageid; + LoginMode = loginmode; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/CreateUHostInstanceResponse.cs b/UCloudSDK.NetCore2/Models/UHost/CreateUHostInstanceResponse.cs new file mode 100644 index 0000000..94d3233 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/CreateUHostInstanceResponse.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 指定数据中心,根据资源使用量创建指定数量的UHost实例。 + /// + /// http://docs.ucloud.cn/api/uhost/create_uhost_instance.html + /// + /// + public partial class CreateUHostInstanceResponse : UResponse + { + /// + /// 响应动作 + /// + /// CreateUHostInstanceResposne + /// + /// + public string Action { get; set; } + + /// + /// UHost 实例 Id + /// + public List UHostIds { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/CreateUHostInstanceSnapshotRequest.cs b/UCloudSDK.NetCore2/Models/UHost/CreateUHostInstanceSnapshotRequest.cs new file mode 100644 index 0000000..0364634 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/CreateUHostInstanceSnapshotRequest.cs @@ -0,0 +1,52 @@ +namespace UCloudSDK.Models +{ + /// + /// 对指定UHost实例制作数据快照。 + /// + /// http://docs.ucloud.cn/api/uhost/create_uhost_instance_snapshot.html + /// + /// + public partial class CreateUHostInstanceSnapshotRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreateUHostInstanceSnapshot"; + + /// + /// API名称 + /// + /// CreateUHostInstanceSnapshot + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UHost实例ID + public CreateUHostInstanceSnapshotRequest(string region, string uhostid) + { + Region = region; + UHostId = uhostid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/CreateUHostInstanceSnapshotResponse.cs b/UCloudSDK.NetCore2/Models/UHost/CreateUHostInstanceSnapshotResponse.cs new file mode 100644 index 0000000..46ae534 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/CreateUHostInstanceSnapshotResponse.cs @@ -0,0 +1,30 @@ +namespace UCloudSDK.Models +{ + /// + /// 对指定UHost实例制作数据快照。 + /// + /// http://docs.ucloud.cn/api/uhost/create_uhost_instance_snapshot.html + /// + /// + public partial class CreateUHostInstanceSnapshotResponse : UResponse + { + /// + /// 响应动作 + /// + /// CreateUHostInstanceSnapshotResposne + /// + /// + public string Action { get; set; } + + /// + /// UHost实例ID + /// + public string UhostId { get; set; } + + /// + /// 快照名称 + /// + public string SnapshotName { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/DescribeImage.ImageSet.cs b/UCloudSDK.NetCore2/Models/UHost/DescribeImage.ImageSet.cs new file mode 100644 index 0000000..fd44bef --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/DescribeImage.ImageSet.cs @@ -0,0 +1,61 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。 + /// + /// http://docs.ucloud.cn/api/uhost/describe_image.html + /// + /// + public partial class DescribeImageSet + { + /// + /// 镜像ID + /// + public string ImageId { get; set; } + + /// + /// 镜像名称 + /// + public string ImageName { get; set; } + + /// + /// 操作系统类型 + /// + /// Liunx,Windows + /// + /// + public string OsType { get; set; } + + /// + /// 操作系统名称 + /// + public string OsName { get; set; } + + /// + /// 标准镜像 + /// + /// Base,行业镜像:Business,自定义镜像:Custom + /// + /// + public string ImageType { get; set; } + + /// + /// 镜像状态 + /// + /// 可用:Available,制作中:Making,不可用:Unavailable + /// + /// + public string State { get; set; } + + /// + /// 镜像描述 + /// + public string ImageDescription { get; set; } + + /// + /// 创建时间 + /// + public int CreateTime { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/DescribeImageRequest.cs b/UCloudSDK.NetCore2/Models/UHost/DescribeImageRequest.cs new file mode 100644 index 0000000..6fcae7b --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/DescribeImageRequest.cs @@ -0,0 +1,82 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。 + /// + /// http://docs.ucloud.cn/api/uhost/describe_image.html + /// + /// + public partial class DescribeImageRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeImage"; + + /// + /// API名称 + /// + /// DescribeImage + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 标准镜像 + /// + /// Base,行业镜像:Business,自定义镜像:Custom,默认返回所有类型 + /// + /// + public string ImageType { get; set; } + + /// + /// 操作系统类型 + /// + /// Linux, Windows默认返回所有类型 + /// + /// + public string OsType { get; set; } + + /// + /// 镜像Id + /// + public string ImageId { get; set; } + + /// + /// 数据偏移量 + /// + /// 默认为0 + /// + /// + public int? Offset { get; set; } + + /// + /// 返回数据长度 + /// + /// 默认为20 + /// + /// + public int? Limit { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + public DescribeImageRequest(string region) + { + Region = region; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/DescribeImageResponse.cs b/UCloudSDK.NetCore2/Models/UHost/DescribeImageResponse.cs new file mode 100644 index 0000000..454ca01 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/DescribeImageResponse.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。 + /// + /// http://docs.ucloud.cn/api/uhost/describe_image.html + /// + /// + public partial class DescribeImageResponse : UResponse + { + /// + /// 响应动作 + /// + /// DescribeImageResponse + /// + /// + public string Action { get; set; } + + /// + /// 满足条件的镜像总数 + /// + public int TotalCount { get; set; } + + /// + /// JSON格式的镜像列表 + /// + public List ImageSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstance.DiskSet.cs b/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstance.DiskSet.cs new file mode 100644 index 0000000..8ce9331 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstance.DiskSet.cs @@ -0,0 +1,33 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取主机或主机列表信息,并可根据数据中心,主机ID等参数进行过滤。 + /// + /// http://docs.ucloud.cn/api/uhost/describe_uhost_instance.html + /// + /// + public partial class DescribeUHostInstanceDiskSet + { + /// + /// 系统盘 + /// + /// Boot,数据盘: Data,网络盘: Udisk + /// + /// + public string Type { get; set; } + + /// + /// 磁盘ID + /// + public string DiskId { get; set; } + + /// + /// 磁盘大小 + /// + /// 单位: GB + /// + /// + public int Size { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstance.IPSet.cs b/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstance.IPSet.cs new file mode 100644 index 0000000..3377f5c --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstance.IPSet.cs @@ -0,0 +1,38 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取主机或主机列表信息,并可根据数据中心,主机ID等参数进行过滤。 + /// + /// http://docs.ucloud.cn/api/uhost/describe_uhost_instance.html + /// + /// + public partial class DescribeUHostInstanceIPSet + { + /// + /// 电信 + /// + /// China-telecom,联通: China-unicom,国际: Internation,BGP: Bgp,内网: Private双线: Duplet + /// + /// + public string Type { get; set; } + + /// + /// IP资源ID (内网IP无对应的资源ID) + /// + public string IPId { get; set; } + + /// + /// IP地址 + /// + public string IP { get; set; } + + /// + /// IP对应的带宽 + /// + /// 单位: Mb (内网IP不显示带宽信息) + /// + /// + public int bandwidth { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstance.UHostSet.cs b/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstance.UHostSet.cs new file mode 100644 index 0000000..89eb221 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstance.UHostSet.cs @@ -0,0 +1,109 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取主机或主机列表信息,并可根据数据中心,主机ID等参数进行过滤。 + /// + /// http://docs.ucloud.cn/api/uhost/describe_uhost_instance.html + /// + /// + public partial class DescribeUHostInstanceUHostSet + { + /// + /// UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// UHost类型 + /// + /// 枚举为:Normal:普通机型;SSD:SSD高性能机型;BD:大数据机型 + /// + /// + public string UHostType { get; set; } + + /// + /// 镜像ID + /// + public string ImageId { get; set; } + + /// + /// 基础镜像ID + /// + public string BasicImageId { get; set; } + + /// + /// 基础镜像名称 + /// + public string BasicImageName { get; set; } + + /// + /// 业务组名称 + /// + public string Tag { get; set; } + + /// + /// 备注 + /// + public string Remark { get; set; } + + /// + /// UHost实例名称 + /// + public string Name { get; set; } + + /// + /// 实例状态 + /// + /// 初始化: Initializing; 启动中: Starting;运行中: Running; 关机中: Stopping; 关机: Stopped安装失败: Install Fail; 重启中: Rebooting + /// + /// + public string State { get; set; } + + /// + /// 创建时间 + /// + public int CreateTime { get; set; } + + /// + /// 计费模式 + /// + /// 枚举值为:Year,按年付费;Month,按月付费;Dynamic,按需付费(需开启权限);Trial,试用(需开启权限)默认为月付 + /// + /// + public string ChargeType { get; set; } + + /// + /// 到期时间 + /// + public int ExpireTime { get; set; } + + /// + /// 虚拟CPU核数 + /// + /// 单位: 个 + /// + /// + public int CPU { get; set; } + + /// + /// 内存大小 + /// + /// 单位: MB + /// + /// + public int Memory { get; set; } + + /// + /// 磁盘信息 + /// + public List DiskSet { get; set; } + + /// + /// IP信息 + /// + public List IPSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceRequest.cs b/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceRequest.cs new file mode 100644 index 0000000..5190cce --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceRequest.cs @@ -0,0 +1,69 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取主机或主机列表信息,并可根据数据中心,主机ID等参数进行过滤。 + /// + /// http://docs.ucloud.cn/api/uhost/describe_uhost_instance.html + /// + /// + public partial class DescribeUHostInstanceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeUHostInstance"; + + /// + /// API名称 + /// + /// DescribeUHostInstance + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost主机的资源ID + /// + /// 如果为空,则返回当前Region 所有符合条件的UHost实例 + /// + /// + public NList UHostIds { get; set; } + + /// + /// 数据偏移量 + /// + /// 默认为0 + /// + /// + public int? Offset { get; set; } + + /// + /// 返回数据长度 + /// + /// 默认为20 + /// + /// + public int? Limit { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + public DescribeUHostInstanceRequest(string region) + { + Region = region; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceResponse.cs b/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceResponse.cs new file mode 100644 index 0000000..c0c88b3 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceResponse.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取主机或主机列表信息,并可根据数据中心,主机ID等参数进行过滤。 + /// + /// http://docs.ucloud.cn/api/uhost/describe_uhost_instance.html + /// + /// + public partial class DescribeUHostInstanceResponse : UResponse + { + /// + /// 响应动作 + /// + /// DescribeUHostInstanceResponse + /// + /// + public string Action { get; set; } + + /// + /// 满足条件的UHostInstance总数 + /// + public int TotalCount { get; set; } + + /// + /// JSON格式的UHost实例列表 + /// + /// 每项参数可见下面ResponseItem + /// + /// + public List UHostSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceSnapshot.SnapshotSet.cs b/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceSnapshot.SnapshotSet.cs new file mode 100644 index 0000000..036fc92 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceSnapshot.SnapshotSet.cs @@ -0,0 +1,22 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取已经存在的UHost实例的存储快照列表。 + /// + /// http://docs.ucloud.cn/api/uhost/describe_uhost_instance_snapshot.html + /// + /// + public partial class DescribeUHostInstanceSnapshotSet + { + /// + /// 快照名称 + /// + public string SnapshotName { get; set; } + + /// + /// 快照制作时间 + /// + public string SnapshotTime { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceSnapshotRequest.cs b/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceSnapshotRequest.cs new file mode 100644 index 0000000..ba06bd7 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceSnapshotRequest.cs @@ -0,0 +1,52 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取已经存在的UHost实例的存储快照列表。 + /// + /// http://docs.ucloud.cn/api/uhost/describe_uhost_instance_snapshot.html + /// + /// + public partial class DescribeUHostInstanceSnapshotRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeUHostInstanceSnapshot"; + + /// + /// API名称 + /// + /// DescribeUHostInstanceSnapshot + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UHost实例ID + public DescribeUHostInstanceSnapshotRequest(string region, string uhostid) + { + Region = region; + UHostId = uhostid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceSnapshotResponse.cs b/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceSnapshotResponse.cs new file mode 100644 index 0000000..5f8a50e --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/DescribeUHostInstanceSnapshotResponse.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取已经存在的UHost实例的存储快照列表。 + /// + /// http://docs.ucloud.cn/api/uhost/describe_uhost_instance_snapshot.html + /// + /// + public partial class DescribeUHostInstanceSnapshotResponse : UResponse + { + /// + /// 响应动作 + /// + /// TerminateUHostInstanceResposne + /// + /// + public string Action { get; set; } + + /// + /// UHost实例ID + /// + public string UhostId { get; set; } + + /// + /// UHost快照列表 + /// + /// 详细参数可见下面SnapshotSet + /// + /// + public List SnapshotSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/DetachUdiskRequest.cs b/UCloudSDK.NetCore2/Models/UHost/DetachUdiskRequest.cs new file mode 100644 index 0000000..b380b6b --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/DetachUdiskRequest.cs @@ -0,0 +1,12 @@ +namespace UCloudSDK.Models +{ + /// + /// 卸载某个已经挂载在指定UHost实例上的UDisk + /// + /// http://docs.ucloud.cn/api/uhost/detach_udisk.html + /// + /// + public partial class DetachUDiskRequest + { + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/DetachUdiskResponse.cs b/UCloudSDK.NetCore2/Models/UHost/DetachUdiskResponse.cs new file mode 100644 index 0000000..1009ea0 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/DetachUdiskResponse.cs @@ -0,0 +1,12 @@ +namespace UCloudSDK.Models +{ + /// + /// 卸载某个已经挂载在指定UHost实例上的UDisk + /// + /// http://docs.ucloud.cn/api/uhost/detach_udisk.html + /// + /// + public partial class DetachUDiskResponse : UResponse + { + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/GetUHostInstancePrice.PriceSet.cs b/UCloudSDK.NetCore2/Models/UHost/GetUHostInstancePrice.PriceSet.cs new file mode 100644 index 0000000..eebcd63 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/GetUHostInstancePrice.PriceSet.cs @@ -0,0 +1,28 @@ +namespace UCloudSDK.Models +{ + /// + /// 根据UHost实例配置,获取UHost实例的价格。 + /// + /// http://docs.ucloud.cn/api/uhost/get_uhost_instance_price.html + /// + /// + public partial class GetUHostInstancePriceSet + { + /// + /// Year + /// + /// Month,Dynamic + /// + /// + public string ChargeType { get; set; } + + /// + /// 价格 + /// + /// 单位: 元,保留小数点后两位有效数字 + /// + /// + public float Price { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/GetUHostInstancePriceRequest.cs b/UCloudSDK.NetCore2/Models/UHost/GetUHostInstancePriceRequest.cs new file mode 100644 index 0000000..c9880c4 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/GetUHostInstancePriceRequest.cs @@ -0,0 +1,101 @@ +namespace UCloudSDK.Models +{ + /// + /// 根据UHost实例配置,获取UHost实例的价格。 + /// + /// http://docs.ucloud.cn/api/uhost/get_uhost_instance_price.html + /// + /// + public partial class GetUHostInstancePriceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "GetUHostInstancePrice"; + + /// + /// API名称 + /// + /// GetUHostInstancePrice + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 镜像Id + /// + /// 参见 镜像列表 + /// + /// + public string ImageId { get; set; } + + /// + /// 虚拟CPU核心数 + /// + /// 单位: 个,范围: [1,16],最小值为1,其他值是2的整数倍 + /// + /// + public int CPU { get; set; } + + /// + /// 内存容量大小 + /// + /// 单位: MB,范围: [2048,65536],步长: 2048 + /// + /// + public int Memory { get; set; } + + /// + /// 购买台数 + /// + /// 范围[1,5] + /// + /// + public int Count { get; set; } + + /// + /// Year + /// + /// Month,Dynamic,默认返回全部计费方式对应的价格 + /// + /// + public string ChargeType { get; set; } + + /// + /// 数据盘大小 + /// + /// 单位: GB,范围[0,1000],步长: 10,默认值: 0 + /// + /// + public int? DiskSpace { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 镜像Id + /// 虚拟CPU核心数 + /// 内存容量大小 + /// 购买台数 + public GetUHostInstancePriceRequest(string region, string imageid, int cpu, int memory, int count) + { + Region = region; + ImageId = imageid; + CPU = cpu; + Memory = memory; + Count = count; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/GetUHostInstancePriceResponse.cs b/UCloudSDK.NetCore2/Models/UHost/GetUHostInstancePriceResponse.cs new file mode 100644 index 0000000..795e0dd --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/GetUHostInstancePriceResponse.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 根据UHost实例配置,获取UHost实例的价格。 + /// + /// http://docs.ucloud.cn/api/uhost/get_uhost_instance_price.html + /// + /// + public partial class GetUHostInstancePriceResponse : UResponse + { + /// + /// 响应动作 + /// + /// GetUHostInstancePriceResposne + /// + /// + public string Action { get; set; } + + /// + /// 价格列表 + /// + public List PriceSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/GetUHostInstanceVncInfoRequest.cs b/UCloudSDK.NetCore2/Models/UHost/GetUHostInstanceVncInfoRequest.cs new file mode 100644 index 0000000..42a7387 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/GetUHostInstanceVncInfoRequest.cs @@ -0,0 +1,52 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取指定UHost实例的管理VNC配置详细信息。 + /// + /// http://docs.ucloud.cn/api/uhost/get_uhost_instance_vnc_info.html + /// + /// + public partial class GetUHostInstanceVncInfoRequest + { + /// + /// 默认Action名称 + /// + private string _action = "GetUHostInstanceVncInfo"; + + /// + /// API名称 + /// + /// GetUHostInstanceVncInfo + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UHost实例ID + public GetUHostInstanceVncInfoRequest(string region, string uhostid) + { + Region = region; + UHostId = uhostid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/GetUHostInstanceVncInfoResponse.cs b/UCloudSDK.NetCore2/Models/UHost/GetUHostInstanceVncInfoResponse.cs new file mode 100644 index 0000000..3049c8d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/GetUHostInstanceVncInfoResponse.cs @@ -0,0 +1,40 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取指定UHost实例的管理VNC配置详细信息。 + /// + /// http://docs.ucloud.cn/api/uhost/get_uhost_instance_vnc_info.html + /// + /// + public partial class GetUHostInstanceVncInfoResponse : UResponse + { + /// + /// 响应动作 + /// + /// GetUHostInstanceVncInfoResposne + /// + /// + public string Action { get; set; } + + /// + /// UHost实例ID + /// + public string UhostId { get; set; } + + /// + /// Vnc登录IP + /// + public string VncIP { get; set; } + + /// + /// Vnc登录端口 + /// + public int VncPort { get; set; } + + /// + /// Vnc 登录密码 + /// + public string VncPassword { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceNameRequest.cs b/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceNameRequest.cs new file mode 100644 index 0000000..c318d80 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceNameRequest.cs @@ -0,0 +1,59 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改指定UHost实例名称,需要给出数据中心,UHostId,及新的实例名称。 + /// + /// http://docs.ucloud.cn/api/uhost/modify_uhost_instance_name.html + /// + /// + public partial class ModifyUHostInstanceNameRequest + { + /// + /// 默认Action名称 + /// + private string _action = "ModifyUHostInstanceName"; + + /// + /// API名称 + /// + /// ModifyUHostInstanceName + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// UHost实例名称 + /// + public string Name { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UHost实例ID + /// UHost实例名称 + public ModifyUHostInstanceNameRequest(string region, string uhostid, string name) + { + Region = region; + UHostId = uhostid; + Name = name; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceNameResponse.cs b/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceNameResponse.cs new file mode 100644 index 0000000..44a9b31 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceNameResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改指定UHost实例名称,需要给出数据中心,UHostId,及新的实例名称。 + /// + /// http://docs.ucloud.cn/api/uhost/modify_uhost_instance_name.html + /// + /// + public partial class ModifyUHostInstanceNameResponse : UResponse + { + /// + /// 响应动作 + /// + /// ModifyUHostInstanceNameResposne + /// + /// + public string Action { get; set; } + + /// + /// UHost实例ID + /// + public string UhostId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceRemarkRequest.cs b/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceRemarkRequest.cs new file mode 100644 index 0000000..8015ab2 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceRemarkRequest.cs @@ -0,0 +1,59 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改指定UHost实例备注信息。 + /// + /// http://docs.ucloud.cn/api/uhost/modify_uhost_instance_remark.html + /// + /// + public partial class ModifyUHostInstanceRemarkRequest + { + /// + /// 默认Action名称 + /// + private string _action = "ModifyUHostInstanceRemark"; + + /// + /// API名称 + /// + /// ModifyUHostInstanceRemark + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// 备注 + /// + public string Remark { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UHost实例ID + /// 备注. + public ModifyUHostInstanceRemarkRequest(string region, string uhostid, string remark) + { + Region = region; + UHostId = uhostid; + Remark = remark; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceRemarkResponse.cs b/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceRemarkResponse.cs new file mode 100644 index 0000000..659d7dc --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceRemarkResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改指定UHost实例备注信息。 + /// + /// http://docs.ucloud.cn/api/uhost/modify_uhost_instance_remark.html + /// + /// + public partial class ModifyUHostInstanceRemarkResponse : UResponse + { + /// + /// 响应动作 + /// + /// ModifyUHostInstanceRemarkResposne + /// + /// + public string Action { get; set; } + + /// + /// UHost实例ID + /// + public string UhostId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceTagRequest.cs b/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceTagRequest.cs new file mode 100644 index 0000000..5ec9008 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceTagRequest.cs @@ -0,0 +1,59 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改指定UHost实例业务组标识。 + /// + /// http://docs.ucloud.cn/api/uhost/modify_uhost_instance_tag.html + /// + /// + public partial class ModifyUHostInstanceTagRequest + { + /// + /// 默认Action名称 + /// + private string _action = "ModifyUHostInstanceTag"; + + /// + /// API名称 + /// + /// ModifyUHostInstanceTag + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// 业务组名称 + /// + public string Tag { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UHost实例ID + /// 业务组名称. + public ModifyUHostInstanceTagRequest(string region, string uhostid, string tag) + { + Region = region; + UHostId = uhostid; + Tag = tag; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceTagResponse.cs b/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceTagResponse.cs new file mode 100644 index 0000000..f460291 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/ModifyUHostInstanceTagResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改指定UHost实例业务组标识。 + /// + /// http://docs.ucloud.cn/api/uhost/modify_uhost_instance_tag.html + /// + /// + public partial class ModifyUHostInstanceTagResponse : UResponse + { + /// + /// 响应动作 + /// + /// ModifyUHostInstanceTagResposne + /// + /// + public string Action { get; set; } + + /// + /// UHost实例ID + /// + public string UhostId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/RebootUHostInstanceRequest.cs b/UCloudSDK.NetCore2/Models/UHost/RebootUHostInstanceRequest.cs new file mode 100644 index 0000000..2e60865 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/RebootUHostInstanceRequest.cs @@ -0,0 +1,52 @@ +namespace UCloudSDK.Models +{ + /// + /// 重新启动UHost实例,需要指定数据中心及UHostID两个参数的值。 + /// + /// http://docs.ucloud.cn/api/uhost/reboot_uhost_instance.html + /// + /// + public partial class RebootUHostInstanceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "RebootUHostInstance"; + + /// + /// API名称 + /// + /// RebootUHostInstance + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UHost实例ID + public RebootUHostInstanceRequest(string region, string uhostid) + { + Region = region; + UHostId = uhostid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/RebootUHostInstanceResponse.cs b/UCloudSDK.NetCore2/Models/UHost/RebootUHostInstanceResponse.cs new file mode 100644 index 0000000..6e7ec94 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/RebootUHostInstanceResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 重新启动UHost实例,需要指定数据中心及UHostID两个参数的值。 + /// + /// http://docs.ucloud.cn/api/uhost/reboot_uhost_instance.html + /// + /// + public partial class RebootUHostInstanceResponse : UResponse + { + /// + /// 响应动作 + /// + /// RebootUHostInstanceResposne + /// + /// + public string Action { get; set; } + + /// + /// UHost实例ID + /// + public string UhostId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/ReinstallUHostInstanceRequest.cs b/UCloudSDK.NetCore2/Models/UHost/ReinstallUHostInstanceRequest.cs new file mode 100644 index 0000000..c092e00 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/ReinstallUHostInstanceRequest.cs @@ -0,0 +1,85 @@ +namespace UCloudSDK.Models +{ + /// + /// 重新安装指定UHost实例的操作系统 + /// + /// http://docs.ucloud.cn/api/uhost/reinstall_uhost_instance.html + /// + /// + public partial class ReinstallUHostInstanceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "ReinstallUHostInstance"; + + /// + /// API名称 + /// + /// ReinstallUHostInstance + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost实例资源ID + /// + public string UHostId { get; set; } + + /// + /// 如果创建UHost实例时LoginMode为Password + /// + private string _password; + + /// + /// 如果创建UHost实例时LoginMode为Password + /// + /// 则必须填写,如果LoginMode为KeyPair,不需要填写(密码格式使用BASE64编码) + /// + /// + public string Password + { + get { return _password; } + set { _password = value.ToBase64(); } + } + + /// + /// 镜像Id + /// + /// 参考镜像列表,默认使用原镜像 + /// + /// + public string ImageId { get; set; } + + /// + /// 是否保留数据盘 + /// + /// 保留:Yes,不报留:No, 默认:Yes + /// + /// + public string ReserveDisk { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UHost实例资源ID + public ReinstallUHostInstanceRequest(string region, string uhostid) + { + Region = region; + UHostId = uhostid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/ReinstallUHostInstanceResponse.cs b/UCloudSDK.NetCore2/Models/UHost/ReinstallUHostInstanceResponse.cs new file mode 100644 index 0000000..b7159c3 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/ReinstallUHostInstanceResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 重新安装指定UHost实例的操作系统 + /// + /// http://docs.ucloud.cn/api/uhost/reinstall_uhost_instance.html + /// + /// + public partial class ReinstallUHostInstanceResponse : UResponse + { + /// + /// 响应动作 + /// + /// ReinstallUHostInstanceResposne + /// + /// + public string Action { get; set; } + + /// + /// UHost实例资源ID + /// + public string UhostId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/ResetUHostInstancePasswordRequest.cs b/UCloudSDK.NetCore2/Models/UHost/ResetUHostInstancePasswordRequest.cs new file mode 100644 index 0000000..e6d77dc --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/ResetUHostInstancePasswordRequest.cs @@ -0,0 +1,66 @@ +namespace UCloudSDK.Models +{ + /// + /// 重置UHost实例的管理员密码。 + /// + /// http://docs.ucloud.cn/api/uhost/reset_uhost_instance_password.html + /// + /// + public partial class ResetUHostInstancePasswordRequest + { + /// + /// 默认Action名称 + /// + private string _action = "ResetUHostInstancePassword"; + + /// + /// API名称 + /// + /// ResetUHostInstancePassword + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// UHost新密码 + /// + private string _password; + + /// + /// UHost新密码 + /// + public string Password + { + get { return _password; } + set { _password = value.ToBase64(); } + } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UHost实例ID + public ResetUHostInstancePasswordRequest(string region, string uhostid) + { + Region = region; + UHostId = uhostid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/ResetUHostInstancePasswordResponse.cs b/UCloudSDK.NetCore2/Models/UHost/ResetUHostInstancePasswordResponse.cs new file mode 100644 index 0000000..642e844 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/ResetUHostInstancePasswordResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 重置UHost实例的管理员密码。 + /// + /// http://docs.ucloud.cn/api/uhost/reset_uhost_instance_password.html + /// + /// + public partial class ResetUHostInstancePasswordResponse : UResponse + { + /// + /// 响应动作 + /// + /// ResetUHostInstancePasswordResposne + /// + /// + public string Action { get; set; } + + /// + /// UHost实例ID + /// + public string UhostId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/ResizeUHostInstanceRequest.cs b/UCloudSDK.NetCore2/Models/UHost/ResizeUHostInstanceRequest.cs new file mode 100644 index 0000000..1230b7c --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/ResizeUHostInstanceRequest.cs @@ -0,0 +1,76 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改指定UHost实例的资源配置,如CPU核心数,内存容量大小,磁盘空间大小等。 + /// + /// http://docs.ucloud.cn/api/uhost/resize_uhost_instance.html + /// + /// + public partial class ResizeUHostInstanceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "ResizeUHostInstance"; + + /// + /// API名称 + /// + /// ResizeUHostInstance + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// 虚拟CPU核数 + /// + /// 单位:个,范围:[1,16],最小值为1,其他值是2的倍数,默认值为当前实例的CPU核数 + /// + /// + public int? CPU { get; set; } + + /// + /// 内存大小 + /// + /// 单位:MB,范围[2048,65536],步长:2048,默认值为当前实例的内存大小 + /// + /// + public int? Memory { get; set; } + + /// + /// 数据盘大小 + /// + /// 单位:GB,范围[10,1000],步长:10,默认值为当前实例的数据盘大小,数据盘不支持缩容,因此不允许输入比当前实例数据盘大小的值 + /// + /// + public int? DiskSpace { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UHost实例ID + public ResizeUHostInstanceRequest(string region, string uhostid) + { + Region = region; + UHostId = uhostid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/ResizeUHostInstanceResponse.cs b/UCloudSDK.NetCore2/Models/UHost/ResizeUHostInstanceResponse.cs new file mode 100644 index 0000000..aaa7653 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/ResizeUHostInstanceResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改指定UHost实例的资源配置,如CPU核心数,内存容量大小,磁盘空间大小等。 + /// + /// http://docs.ucloud.cn/api/uhost/resize_uhost_instance.html + /// + /// + public partial class ResizeUHostInstanceResponse : UResponse + { + /// + /// 响应动作 + /// + /// ResizeUHostInstanceResposne + /// + /// + public string Action { get; set; } + + /// + /// UHost实例ID + /// + public string UhostId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/StartUHostInstanceRequest.cs b/UCloudSDK.NetCore2/Models/UHost/StartUHostInstanceRequest.cs new file mode 100644 index 0000000..2035ef5 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/StartUHostInstanceRequest.cs @@ -0,0 +1,52 @@ +namespace UCloudSDK.Models +{ + /// + /// 启动处于关闭状态的UHost实例,需要指定数据中心及UHostID两个参数的值。 + /// + /// http://docs.ucloud.cn/api/uhost/start_uhost_instance.html + /// + /// + public partial class StartUHostInstanceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "StartUHostInstance"; + + /// + /// API名称 + /// + /// StartUHostInstance + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UHost实例ID + public StartUHostInstanceRequest(string region, string uhostid) + { + Region = region; + UHostId = uhostid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/StartUHostInstanceResponse.cs b/UCloudSDK.NetCore2/Models/UHost/StartUHostInstanceResponse.cs new file mode 100644 index 0000000..e30f76d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/StartUHostInstanceResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 启动处于关闭状态的UHost实例,需要指定数据中心及UHostID两个参数的值。 + /// + /// http://docs.ucloud.cn/api/uhost/start_uhost_instance.html + /// + /// + public partial class StartUHostInstanceResponse : UResponse + { + /// + /// 响应动作 + /// + /// StartUHostInstanceResposne + /// + /// + public string Action { get; set; } + + /// + /// UHost实例ID + /// + public string UhostId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/StopUHostInstanceRequest.cs b/UCloudSDK.NetCore2/Models/UHost/StopUHostInstanceRequest.cs new file mode 100644 index 0000000..8b1a212 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/StopUHostInstanceRequest.cs @@ -0,0 +1,52 @@ +namespace UCloudSDK.Models +{ + /// + /// 指停止处于运行状态的UHost实例,需指定数据中心及UhostID。 + /// + /// http://docs.ucloud.cn/api/uhost/stop_uhost_instance.html + /// + /// + public partial class StopUHostInstanceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "StopUHostInstance"; + + /// + /// API名称 + /// + /// StopUHostInstance + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost实例ID + /// + public string UHostId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UHost实例ID + public StopUHostInstanceRequest(string region, string uhostid) + { + Region = region; + UHostId = uhostid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/StopUHostInstanceResponse.cs b/UCloudSDK.NetCore2/Models/UHost/StopUHostInstanceResponse.cs new file mode 100644 index 0000000..5dcfbd9 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/StopUHostInstanceResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 指停止处于运行状态的UHost实例,需指定数据中心及UhostID。 + /// + /// http://docs.ucloud.cn/api/uhost/stop_uhost_instance.html + /// + /// + public partial class StopUHostInstanceResponse : UResponse + { + /// + /// 响应动作 + /// + /// StopUHostInstanceResposne + /// + /// + public string Action { get; set; } + + /// + /// UHost实例ID + /// + public string UhostId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/TerminateCustomImageRequest.cs b/UCloudSDK.NetCore2/Models/UHost/TerminateCustomImageRequest.cs new file mode 100644 index 0000000..69ee157 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/TerminateCustomImageRequest.cs @@ -0,0 +1,52 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除用户自定义镜像 + /// + /// http://docs.ucloud.cn/api/uhost/terminate_custom_image.html + /// + /// + public partial class TerminateCustomImageRequest + { + /// + /// 默认Action名称 + /// + private string _action = "TerminateCustomImage"; + + /// + /// API名称 + /// + /// TerminateCustomImage + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 自制镜像ID + /// + public string ImageId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 自制镜像ID + public TerminateCustomImageRequest(string region, string imageid) + { + Region = region; + ImageId = imageid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/TerminateCustomImageResponse.cs b/UCloudSDK.NetCore2/Models/UHost/TerminateCustomImageResponse.cs new file mode 100644 index 0000000..698b144 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/TerminateCustomImageResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除用户自定义镜像 + /// + /// http://docs.ucloud.cn/api/uhost/terminate_custom_image.html + /// + /// + public partial class TerminateCustomImageResponse : UResponse + { + /// + /// 响应动作 + /// + /// TerminateCustomImageResposne + /// + /// + public string Action { get; set; } + + /// + /// 自制镜像Id + /// + public string ImageId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/TerminateUHostInstanceRequest.cs b/UCloudSDK.NetCore2/Models/UHost/TerminateUHostInstanceRequest.cs new file mode 100644 index 0000000..6bcf84d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/TerminateUHostInstanceRequest.cs @@ -0,0 +1,52 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除指定数据中心的UHost实例。 + /// + /// http://docs.ucloud.cn/api/uhost/terminate_uhost_instance.html + /// + /// + public partial class TerminateUHostInstanceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "TerminateUHostInstance"; + + /// + /// API名称 + /// + /// TerminateUHostInstance + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// UHost资源Id + /// + public string UHostId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// UHost资源Id + public TerminateUHostInstanceRequest(string region, string uhostid) + { + Region = region; + UHostId = uhostid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UHost/TerminateUHostInstanceResponse.cs b/UCloudSDK.NetCore2/Models/UHost/TerminateUHostInstanceResponse.cs new file mode 100644 index 0000000..2914333 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UHost/TerminateUHostInstanceResponse.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 删除指定数据中心的UHost实例。 + /// + /// http://docs.ucloud.cn/api/uhost/terminate_uhost_instance.html + /// + /// + public partial class TerminateUHostInstanceResponse : UResponse + { + /// + /// 响应动作 + /// + /// TerminateUHostInstanceResposne + /// + /// + public string Action { get; set; } + + /// + /// UHost 实例 Id + /// + public List UHostIds { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/AllocateBackendRequest.cs b/UCloudSDK.NetCore2/Models/ULB/AllocateBackendRequest.cs new file mode 100644 index 0000000..9fa075f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/AllocateBackendRequest.cs @@ -0,0 +1,92 @@ +namespace UCloudSDK.Models +{ + /// + /// 添加ULB后端资源实例 + /// + /// http://docs.ucloud.cn/api/ulb/allocate_backend.html + /// + /// + public partial class AllocateBackendRequest + { + /// + /// 默认Action名称 + /// + private string _action = "AllocateBackend"; + + /// + /// API名称 + /// + /// AllocateBackend + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 负载均衡实例的ID + /// + public string ULBId { get; set; } + + /// + /// VServer实例的ID + /// + public string VServerId { get; set; } + + /// + /// 所添加的后端资源的类型 + /// + /// 如UHost + /// + /// + public string ResourceType { get; set; } + + /// + /// 所添加的后端资源的资源ID + /// + public string ResourceId { get; set; } + + /// + /// 所添加的后端资源服务端口 + /// + /// 取值范围[1-65535],默认80 + /// + /// + public int? Port { get; set; } + + /// + /// 后端实例状态开关 + /// + /// 枚举值:1:启动;0:禁用默认为启用 + /// + /// + public int? Enabled { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 负载均衡实例的ID + /// VServer实例的ID + /// 所添加的后端资源的类型 + /// 所添加的后端资源的资源ID + public AllocateBackendRequest(string region, string ulbid, string vserverid, string resourcetype, string resourceid) + { + Region = region; + ULBId = ulbid; + VServerId = vserverid; + ResourceType = resourcetype; + ResourceId = resourceid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/AllocateBackendResponse.cs b/UCloudSDK.NetCore2/Models/ULB/AllocateBackendResponse.cs new file mode 100644 index 0000000..83b514a --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/AllocateBackendResponse.cs @@ -0,0 +1,28 @@ +namespace UCloudSDK.Models +{ + /// + /// 添加ULB后端资源实例 + /// + /// http://docs.ucloud.cn/api/ulb/allocate_backend.html + /// + /// + public partial class AllocateBackendResponse : UResponse + { + /// + /// 响应动作 + /// + /// AllocateBackendResponse + /// + /// + public string Action { get; set; } + + /// + /// 所添加的后端资源ID + /// + /// (为ULB系统中使用,与资源自身ID无关) + /// + /// + public string BackendId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/BindSSLRequest.cs b/UCloudSDK.NetCore2/Models/ULB/BindSSLRequest.cs new file mode 100644 index 0000000..f8a08f4 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/BindSSLRequest.cs @@ -0,0 +1,66 @@ +namespace UCloudSDK.Models +{ + /// + /// 将SSL证书绑定到VServer + /// + /// http://docs.ucloud.cn/api/ulb/bind_ssl.html + /// + /// + public partial class BindSSLRequest + { + /// + /// 默认Action名称 + /// + private string _action = "BindSSL"; + + /// + /// API名称 + /// + /// BindSSL + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// SSL证书的Id + /// + public string SSLId { get; set; } + + /// + /// 所绑定ULB实例ID + /// + public string ULBId { get; set; } + + /// + /// 所绑定VServer实例ID + /// + public string VServerId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// SSL证书的Id + /// 所绑定ULB实例ID + /// 所绑定VServer实例ID + public BindSSLRequest(string region, string sslid, string ulbid, string vserverid) + { + Region = region; + SSLId = sslid; + ULBId = ulbid; + VServerId = vserverid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/BindSSLResponse.cs b/UCloudSDK.NetCore2/Models/ULB/BindSSLResponse.cs new file mode 100644 index 0000000..112ba90 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/BindSSLResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 将SSL证书绑定到VServer + /// + /// http://docs.ucloud.cn/api/ulb/bind_ssl.html + /// + /// + public partial class BindSSLResponse : UResponse + { + /// + /// 响应动作 + /// + /// BindSSLResponse + /// + /// + public string Action { get; set; } + + /// + /// SSL证书的Id + /// + public string ULBId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/CreatePolicyGroupRequest.cs b/UCloudSDK.NetCore2/Models/ULB/CreatePolicyGroupRequest.cs new file mode 100644 index 0000000..fd92480 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/CreatePolicyGroupRequest.cs @@ -0,0 +1,53 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建内容转发策略组 + /// + /// http://docs.ucloud.cn/api/ulb/create_policy_group.html + /// + /// + public partial class CreatePolicyGroupRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreatePolicyGroup"; + + /// + /// API名称 + /// + /// CreatePolicyGroup + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 内容转发策略组名称 + /// + /// 默认为空 + /// + /// + public string GroupName { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + public CreatePolicyGroupRequest(string region) + { + Region = region; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/CreatePolicyGroupResponse.cs b/UCloudSDK.NetCore2/Models/ULB/CreatePolicyGroupResponse.cs new file mode 100644 index 0000000..9e6b64d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/CreatePolicyGroupResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建内容转发策略组 + /// + /// http://docs.ucloud.cn/api/ulb/create_policy_group.html + /// + /// + public partial class CreatePolicyGroupResponse : UResponse + { + /// + /// 响应动作 + /// + /// CreatePolicyGroupResponse + /// + /// + public string Action { get; set; } + + /// + /// 内容转发策略组的Id + /// + public string GroupId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/CreatePolicyRequest.cs b/UCloudSDK.NetCore2/Models/ULB/CreatePolicyRequest.cs new file mode 100644 index 0000000..9bd73ad --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/CreatePolicyRequest.cs @@ -0,0 +1,88 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建内容转发策略 + /// + /// http://docs.ucloud.cn/api/ulb/create_policy.html + /// + /// + public partial class CreatePolicyRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreatePolicy"; + + /// + /// API名称 + /// + /// CreatePolicy + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 内容转发策略组ID + /// + public string GroupId { get; set; } + + /// + /// 内容转发匹配字段 + /// + public string Match { get; set; } + + /// + /// 需要添加内容转发策略的负载均衡实例ID + /// + public string ULBId { get; set; } + + /// + /// 需要添加内容转发策略的VServer实例ID + /// + public string VServerId { get; set; } + + /// + /// 内容转发策略应用的后端资源实例的ID + /// + public NList BackendId { get; set; } + + /// + /// 内容转发匹配字段的类型 + /// + /// 当前仅支持按域名转发。枚举值:Domain + /// + /// + public string Type { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 内容转发策略组ID + /// 内容转发匹配字段 + /// 需要添加内容转发策略的负载均衡实例ID + /// 需要添加内容转发策略的VServer实例ID + /// 内容转发策略应用的后端资源实例的ID + public CreatePolicyRequest(string region, string groupid, string match, string ulbid, string vserverid, NList backendid) + { + Region = region; + GroupId = groupid; + Match = match; + ULBId = ulbid; + VServerId = vserverid; + BackendId = backendid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/CreatePolicyResponse.cs b/UCloudSDK.NetCore2/Models/ULB/CreatePolicyResponse.cs new file mode 100644 index 0000000..a01204f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/CreatePolicyResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建内容转发策略 + /// + /// http://docs.ucloud.cn/api/ulb/create_policy.html + /// + /// + public partial class CreatePolicyResponse : UResponse + { + /// + /// 响应动作 + /// + /// CreatePolicyResponse + /// + /// + public string Action { get; set; } + + /// + /// 内容转发策略ID + /// + public string PolicyId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/CreateSSLRequest.cs b/UCloudSDK.NetCore2/Models/ULB/CreateSSLRequest.cs new file mode 100644 index 0000000..0f3eb21 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/CreateSSLRequest.cs @@ -0,0 +1,70 @@ +namespace UCloudSDK.Models +{ + /// + /// 添加SSL证书 + /// + /// http://docs.ucloud.cn/api/ulb/create_ssl.html + /// + /// + public partial class CreateSSLRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreateSSL"; + + /// + /// API名称 + /// + /// CreateSSL + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// SSL证书的内容 + /// + public string SSLContent { get; set; } + + /// + /// SSL证书的名字 + /// + /// 默认值为空 + /// + /// + public string SSLName { get; set; } + + /// + /// 所添加的SSL证书类型 + /// + /// 目前只支持0:Pem格式 + /// + /// + public int? SSLType { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// SSL证书的名字. + /// SSL证书的内容 + public CreateSSLRequest(string region,string sslName, string sslcontent) + { + Region = region; + SSLName = sslName; + SSLContent = sslcontent; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/CreateSSLResponse.cs b/UCloudSDK.NetCore2/Models/ULB/CreateSSLResponse.cs new file mode 100644 index 0000000..1bc5cc5 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/CreateSSLResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 添加SSL证书 + /// + /// http://docs.ucloud.cn/api/ulb/create_ssl.html + /// + /// + public partial class CreateSSLResponse : UResponse + { + /// + /// 响应动作 + /// + /// CreateSSLResponse + /// + /// + public string Action { get; set; } + + /// + /// SSL证书的Id + /// + public string ULBId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/CreateULBRequest.cs b/UCloudSDK.NetCore2/Models/ULB/CreateULBRequest.cs new file mode 100644 index 0000000..84f37dc --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/CreateULBRequest.cs @@ -0,0 +1,53 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建负载均衡实例 + /// + /// http://docs.ucloud.cn/api/ulb/create_ulb.html + /// + /// + public partial class CreateULBRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreateULB"; + + /// + /// API名称 + /// + /// CreateULB + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 负载均衡的名字 + /// + /// 默认值为空 + /// + /// + public string ULBName { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + public CreateULBRequest(string region) + { + Region = region; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/CreateULBResponse.cs b/UCloudSDK.NetCore2/Models/ULB/CreateULBResponse.cs new file mode 100644 index 0000000..c225b6c --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/CreateULBResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建负载均衡实例 + /// + /// http://docs.ucloud.cn/api/ulb/create_ulb.html + /// + /// + public partial class CreateULBResponse : UResponse + { + /// + /// 响应动作 + /// + /// CreateULBResponse + /// + /// + public string Action { get; set; } + + /// + /// 负载均衡实例的Id + /// + public string ULBId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/CreateVServerRequest.cs b/UCloudSDK.NetCore2/Models/ULB/CreateVServerRequest.cs new file mode 100644 index 0000000..5942a85 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/CreateVServerRequest.cs @@ -0,0 +1,108 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建VServer实例 + /// + /// http://docs.ucloud.cn/api/ulb/create_vserver.html + /// + /// + public partial class CreateVServerRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreateVServer"; + + /// + /// API名称 + /// + /// CreateVServer + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 负载均衡实例ID + /// + public string ULBId { get; set; } + + /// + /// VServer实例名称 + /// + /// 默认为空 + /// + /// + public string VServerName { get; set; } + + /// + /// VServer实例的协议 + /// + /// 枚举值为:HTTP,TCP,UDP;默认为HTTP协议 + /// + /// + public string Protocol { get; set; } + + /// + /// VServer后端端口 + /// + /// 取值范围[1-65535];默认值为80 + /// + /// + public int? FrontendPort { get; set; } + + /// + /// VServer负载均衡模式 + /// + /// 枚举值为:Roundrobin,轮询;Source,源地址;默认为轮询模式 + /// + /// + public string Method { get; set; } + + /// + /// VServer会话保持方式 + /// + /// 枚举值为:None,关闭会话保持;ServerInsert,自动生成;UserDefined,用户自定义;默认关闭会话保持。 + /// + /// + public string PersistenceType { get; set; } + + /// + /// 根据PersistenceType确认;None和ServerInsert + /// + /// 此字段无意义;UserDefined:此字段传入自定义会话保持String + /// + /// + public string PersistenceInfo { get; set; } + + /// + /// 空闲连接的回收时间 + /// + /// 单位:秒;取值范围:(0,86400],默认值为60 + /// + /// + public int? ClientTimeout { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 负载均衡实例ID + public CreateVServerRequest(string region, string ulbid) + { + Region = region; + ULBId = ulbid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/CreateVServerResponse.cs b/UCloudSDK.NetCore2/Models/ULB/CreateVServerResponse.cs new file mode 100644 index 0000000..745ee7b --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/CreateVServerResponse.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建VServer实例 + /// + /// http://docs.ucloud.cn/api/ulb/create_vserver.html + /// + /// + public partial class CreateVServerResponse : UResponse + { + /// + /// 响应动作 + /// + /// CreateULBResponse + /// + /// + public string Action { get; set; } + + /// + /// VServer实例的Id + /// + public string VServerId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DeletePolicyGroupRequest.cs b/UCloudSDK.NetCore2/Models/ULB/DeletePolicyGroupRequest.cs new file mode 100644 index 0000000..f7ecdd7 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DeletePolicyGroupRequest.cs @@ -0,0 +1,52 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除内容转发策略组 + /// + /// http://docs.ucloud.cn/api/ulb/delete_policy_group.html + /// + /// + public partial class DeletePolicyGroupRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DeletePolicyGroup"; + + /// + /// API名称 + /// + /// DeletePolicyGroup + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 内容转发策略组ID + /// + public string GroupId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 内容转发策略组ID + public DeletePolicyGroupRequest(string region, string groupid) + { + Region = region; + GroupId = groupid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DeletePolicyGroupResponse.cs b/UCloudSDK.NetCore2/Models/ULB/DeletePolicyGroupResponse.cs new file mode 100644 index 0000000..94df14d --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DeletePolicyGroupResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除内容转发策略组 + /// + /// http://docs.ucloud.cn/api/ulb/delete_policy_group.html + /// + /// + public partial class DeletePolicyGroupResponse : UResponse + { + /// + /// 响应动作 + /// + /// DeletePolicyGroupResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DeletePolicyRequest.cs b/UCloudSDK.NetCore2/Models/ULB/DeletePolicyRequest.cs new file mode 100644 index 0000000..4840a1e --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DeletePolicyRequest.cs @@ -0,0 +1,59 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除内容转发策略 + /// + /// http://docs.ucloud.cn/api/ulb/delete_policy.html + /// + /// + public partial class DeletePolicyRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DeletePolicy"; + + /// + /// API名称 + /// + /// DeletePolicy + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 内容转发策略组ID + /// + public string GroupId { get; set; } + + /// + /// 内容转发策略ID + /// + public string PolicyId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 内容转发策略组ID + /// 内容转发策略ID. + public DeletePolicyRequest(string region, string groupid, string policyid) + { + Region = region; + GroupId = groupid; + PolicyId = policyid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DeletePolicyResponse.cs b/UCloudSDK.NetCore2/Models/ULB/DeletePolicyResponse.cs new file mode 100644 index 0000000..4c2cccd --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DeletePolicyResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除内容转发策略 + /// + /// http://docs.ucloud.cn/api/ulb/delete_policy.html + /// + /// + public partial class DeletePolicyResponse : UResponse + { + /// + /// 响应动作 + /// + /// CreatePolicyResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DeleteSSLRequest.cs b/UCloudSDK.NetCore2/Models/ULB/DeleteSSLRequest.cs new file mode 100644 index 0000000..8bfc2ec --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DeleteSSLRequest.cs @@ -0,0 +1,52 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除SSL证书 + /// + /// http://docs.ucloud.cn/api/ulb/delete_ssl.html + /// + /// + public partial class DeleteSSLRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DeleteSSL"; + + /// + /// API名称 + /// + /// DeleteSSL + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// SSL证书的ID + /// + public string SSLId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// SSL证书的ID + public DeleteSSLRequest(string region, string sslid) + { + Region = region; + SSLId = sslid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DeleteSSLResponse.cs b/UCloudSDK.NetCore2/Models/ULB/DeleteSSLResponse.cs new file mode 100644 index 0000000..d43ddd2 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DeleteSSLResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除SSL证书 + /// + /// http://docs.ucloud.cn/api/ulb/delete_ssl.html + /// + /// + public partial class DeleteSSLResponse : UResponse + { + /// + /// 响应动作 + /// + /// DeleteSSLResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DeleteULBRequest.cs b/UCloudSDK.NetCore2/Models/ULB/DeleteULBRequest.cs new file mode 100644 index 0000000..b19ef00 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DeleteULBRequest.cs @@ -0,0 +1,52 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除负载均衡实例 + /// + /// http://docs.ucloud.cn/api/ulb/delete_ulb.html + /// + /// + public partial class DeleteULBRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DeleteULB"; + + /// + /// API名称 + /// + /// DeleteULB + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 负载均衡实例的ID + /// + public string ULBId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 负载均衡实例的ID + public DeleteULBRequest(string region, string ulbid) + { + Region = region; + ULBId = ulbid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DeleteULBResponse.cs b/UCloudSDK.NetCore2/Models/ULB/DeleteULBResponse.cs new file mode 100644 index 0000000..e2ea549 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DeleteULBResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除负载均衡实例 + /// + /// http://docs.ucloud.cn/api/ulb/delete_ulb.html + /// + /// + public partial class DeleteULBResponse : UResponse + { + /// + /// 响应动作 + /// + /// DeleteULBResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DeleteVServerRequest.cs b/UCloudSDK.NetCore2/Models/ULB/DeleteVServerRequest.cs new file mode 100644 index 0000000..2c31729 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DeleteVServerRequest.cs @@ -0,0 +1,59 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除VServer实例 + /// + /// http://docs.ucloud.cn/api/ulb/delete_vserver.html + /// + /// + public partial class DeleteVServerRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DeleteVServer"; + + /// + /// API名称 + /// + /// DeleteVServer + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 负载均衡实例的ID + /// + public string ULBId { get; set; } + + /// + /// VServer实例的ID + /// + public string VServerId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 负载均衡实例的ID + /// VServer实例的ID + public DeleteVServerRequest(string region, string ulbid, string vserverid) + { + Region = region; + ULBId = ulbid; + VServerId = vserverid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DeleteVServerResponse.cs b/UCloudSDK.NetCore2/Models/ULB/DeleteVServerResponse.cs new file mode 100644 index 0000000..f658d9e --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DeleteVServerResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除VServer实例 + /// + /// http://docs.ucloud.cn/api/ulb/delete_vserver.html + /// + /// + public partial class DeleteVServerResponse : UResponse + { + /// + /// 响应动作 + /// + /// DeleteVServerResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroup.BackendSet.cs b/UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroup.BackendSet.cs new file mode 100644 index 0000000..e122689 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroup.BackendSet.cs @@ -0,0 +1,27 @@ +namespace UCloudSDK.Models +{ + /// + /// 显示内容转发策略组详情 + /// + /// http://docs.ucloud.cn/api/ulb/describe_policy_group.html + /// + /// + public partial class DescribePolicyGroupBackendSet + { + /// + /// 后端资源实例的ID + /// + public string BackendId { get; set; } + + /// + /// 后端资源实例的内网IP + /// + public string PrivateIP { get; set; } + + /// + /// 后端资源实例的服务端口 + /// + public int Port { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroup.DataSet.cs b/UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroup.DataSet.cs new file mode 100644 index 0000000..8a7f8bb --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroup.DataSet.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 显示内容转发策略组详情 + /// + /// http://docs.ucloud.cn/api/ulb/describe_policy_group.html + /// + /// + public partial class DescribePolicyGroupDataSet + { + /// + /// 内容转发策略组ID + /// + public string GroupId { get; set; } + + /// + /// 内容转发策略组名称 + /// + public string GroupName { get; set; } + + /// + /// 内容转发策略组详细信息 + /// + /// 具体结构见PolicySet + /// + /// + public List PolicySet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroup.PolicySet.cs b/UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroup.PolicySet.cs new file mode 100644 index 0000000..a01fc09 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroup.PolicySet.cs @@ -0,0 +1,45 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 显示内容转发策略组详情 + /// + /// http://docs.ucloud.cn/api/ulb/describe_policy_group.html + /// + /// + public partial class DescribePolicyGroupPolicySet + { + /// + /// 内容转发策略组ID + /// + public string PolicyId { get; set; } + + /// + /// 内容转发匹配字段的类型 + /// + /// 当前只支持按域名转发。枚举值为:Domain,按域名转发 + /// + /// + public string Type { get; set; } + + /// + /// 内容转发匹配字段 + /// + public string Match { get; set; } + + /// + /// 内容转发策略组ID应用的VServer实例的ID + /// + public string VServerId { get; set; } + + /// + /// 内容转发策略组ID所应用的后端资源列表 + /// + /// 具体结构见”BackendSet” + /// + /// + public List BackendSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroupRequest.cs b/UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroupRequest.cs new file mode 100644 index 0000000..fe8c630 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroupRequest.cs @@ -0,0 +1,66 @@ +namespace UCloudSDK.Models +{ + /// + /// 显示内容转发策略组详情 + /// + /// http://docs.ucloud.cn/api/ulb/describe_policy_group.html + /// + /// + public partial class DescribePolicyGroupRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribePolicyGroup"; + + /// + /// API名称 + /// + /// DescribePolicyGroup + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 内容转发策略组ID + /// + public string GroupId { get; set; } + + /// + /// 数据偏移量 + /// + /// 默认值为0 + /// + /// + public int? Offset { get; set; } + + /// + /// 数据分页值 + /// + /// 默认为20 + /// + /// + public int? Limit { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + public DescribePolicyGroupRequest(string region) + { + Region = region; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroupResponse.cs b/UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroupResponse.cs new file mode 100644 index 0000000..7f97afd --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DescribePolicyGroupResponse.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 显示内容转发策略组详情 + /// + /// http://docs.ucloud.cn/api/ulb/describe_policy_group.html + /// + /// + public partial class DescribePolicyGroupResponse : UResponse + { + /// + /// 响应动作 + /// + /// DescribePolicyGroupResponse + /// + /// + public string Action { get; set; } + + /// + /// 内容转发策略组列表 + /// + /// 具体结构见DataSet + /// + /// + public List DataSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DescribeSSL.DataSet.cs b/UCloudSDK.NetCore2/Models/ULB/DescribeSSL.DataSet.cs new file mode 100644 index 0000000..764e7fb --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DescribeSSL.DataSet.cs @@ -0,0 +1,53 @@ +namespace UCloudSDK.Models +{ + /// + /// 显示SSL证书信息 + /// + /// http://docs.ucloud.cn/api/ulb/describe_ssl.html + /// + /// + public partial class DescribeSSLDataSet + { + /// + /// 证书的ID + /// + public string SSLId { get; set; } + + /// + /// 证书的名字 + /// + public string SSLName { get; set; } + + /// + /// 证书的类型 + /// + /// 枚举值为:0:Pem格式 + /// + /// + public string SSLType { get; set; } + + /// + /// 证书的内容 + /// + public string SSLContent { get; set; } + + /// + /// 证书的HASH值 + /// + public string HashValue { get; set; } + + /// + /// 创建时间 + /// + /// 格式为Unix Timestamp + /// + /// + public int CreateTime { get; set; } + + /// + /// 所绑定VServer的资源ID + /// + public string VServerId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DescribeSSLRequest.cs b/UCloudSDK.NetCore2/Models/ULB/DescribeSSLRequest.cs new file mode 100644 index 0000000..b6cb5b7 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DescribeSSLRequest.cs @@ -0,0 +1,66 @@ +namespace UCloudSDK.Models +{ + /// + /// 显示SSL证书信息 + /// + /// http://docs.ucloud.cn/api/ulb/describe_ssl.html + /// + /// + public partial class DescribeSSLRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeSSL"; + + /// + /// API名称 + /// + /// DescribeSSL + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// SSL证书的Id + /// + public string SSLId { get; set; } + + /// + /// 数据分页值 + /// + /// 默认为20 + /// + /// + public int? Limit { get; set; } + + /// + /// 数据偏移量 + /// + /// 默认值为0 + /// + /// + public int? Offset { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + public DescribeSSLRequest(string region) + { + Region = region; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DescribeSSLResponse.cs b/UCloudSDK.NetCore2/Models/ULB/DescribeSSLResponse.cs new file mode 100644 index 0000000..c8a6bae --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DescribeSSLResponse.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 显示SSL证书信息 + /// + /// http://docs.ucloud.cn/api/ulb/describe_ssl.html + /// + /// + public partial class DescribeSSLResponse : UResponse + { + /// + /// 响应动作 + /// + /// BindSSLResponse + /// + /// + public string Action { get; set; } + + /// + /// 满足条件的SSL证书总数 + /// + public string TotalCOunt { get; set; } + + /// + /// SSL证书详细信息 + /// + /// 具体结构见DataSet + /// + /// + public List DataSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DescribeULB.BackendSet.cs b/UCloudSDK.NetCore2/Models/ULB/DescribeULB.BackendSet.cs new file mode 100644 index 0000000..b5a53b9 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DescribeULB.BackendSet.cs @@ -0,0 +1,61 @@ +namespace UCloudSDK.Models +{ + /// + /// 显示负载均衡实例信息 + /// + /// http://docs.ucloud.cn/api/ulb/describe_ulb.html + /// + /// + public partial class DescribeULBBackendSet + { + /// + /// VServer后端的负载均衡实例ID + /// + public string BackendId { get; set; } + + /// + /// VServer后端的资源类型 + /// + /// 如uhost + /// + /// + public string ResourceType { get; set; } + + /// + /// VServer后端的资源ID + /// + public string ResourceId { get; set; } + + /// + /// VServer后端的资源名称 + /// + public string ResourceName { get; set; } + + /// + /// VServer后端的资源内网IP + /// + public string PrivateIP { get; set; } + + /// + /// VServer后端的服务端口 + /// + public int Port { get; set; } + + /// + /// 后端资源的启用状态 + /// + /// 枚举值为:0:禁用;1:启用 + /// + /// + public int Enabled { get; set; } + + /// + /// 后端资源的运行状态 + /// + /// 枚举值为:0:运行正常;1:运行异常 + /// + /// + public int Status { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DescribeULB.DataSet.cs b/UCloudSDK.NetCore2/Models/ULB/DescribeULB.DataSet.cs new file mode 100644 index 0000000..647be68 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DescribeULB.DataSet.cs @@ -0,0 +1,56 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 显示负载均衡实例信息 + /// + /// http://docs.ucloud.cn/api/ulb/describe_ulb.html + /// + /// + public partial class DescribeULBDataSet + { + /// + /// 负载均衡实例的Id + /// + public string ULBId { get; set; } + + /// + /// 负载均衡实例的名字 + /// + public string ULBName { get; set; } + + /// + /// 带宽模式 + /// + /// 枚举值为:0,该负载均衡实例非共享带宽;1,该负载均衡实例使用共享带宽 + /// + /// + public int BandwidthType { get; set; } + + /// + /// 负载均衡的创建时间 + /// + /// 格式为Unix Timestamp + /// + /// + public int CreateTime { get; set; } + + /// + /// 负载均衡实例的外网IP信息 + /// + /// 具体结构见下方IPSet + /// + /// + public List IPSet { get; set; } + + /// + /// 负载均衡实例中存在的VServer实例列表 + /// + /// 具体结构件下方VserverSet + /// + /// + public List VserverSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DescribeULB.IPSet.cs b/UCloudSDK.NetCore2/Models/ULB/DescribeULB.IPSet.cs new file mode 100644 index 0000000..aa9e62a --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DescribeULB.IPSet.cs @@ -0,0 +1,30 @@ +namespace UCloudSDK.Models +{ + /// + /// 显示负载均衡实例信息 + /// + /// http://docs.ucloud.cn/api/ulb/describe_ulb.html + /// + /// + public partial class DescribeULBIPSet + { + /// + /// 弹性IP的运营商信息 + /// + /// 枚举值为:Telecom:电信IP;Unicom:联通IP;Bgp:BGP IP;International:国际IP + /// + /// + public string OperatorName { get; set; } + + /// + /// 弹性IP的资源ID + /// + public string EIPId { get; set; } + + /// + /// 弹性IP的地址 + /// + public string EIP { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DescribeULB.SSLSet.cs b/UCloudSDK.NetCore2/Models/ULB/DescribeULB.SSLSet.cs new file mode 100644 index 0000000..801d266 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DescribeULB.SSLSet.cs @@ -0,0 +1,22 @@ +namespace UCloudSDK.Models +{ + /// + /// 显示负载均衡实例信息 + /// + /// http://docs.ucloud.cn/api/ulb/describe_ulb.html + /// + /// + public partial class DescribeULBSSLSet + { + /// + /// SSL证书的ID + /// + public string SSLId { get; set; } + + /// + /// SSL证书的名称 + /// + public string SSLName { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DescribeULB.VserverSet.cs b/UCloudSDK.NetCore2/Models/ULB/DescribeULB.VserverSet.cs new file mode 100644 index 0000000..be32b52 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DescribeULB.VserverSet.cs @@ -0,0 +1,93 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 显示负载均衡实例信息 + /// + /// http://docs.ucloud.cn/api/ulb/describe_ulb.html + /// + /// + public partial class DescribeULBVserverSet + { + /// + /// VServer实例的ID + /// + public string VServerId { get; set; } + + /// + /// VServer实例的名字 + /// + public string VServerName { get; set; } + + /// + /// VServer实例的网络协议 + /// + /// 枚举值为:HTTP, TCP, UDP, HTTPS + /// + /// + public string Protocol { get; set; } + + /// + /// VServer服务前端端口 + /// + public int FrontendPort { get; set; } + + /// + /// VServer的负载均衡模式 + /// + /// 枚举值为:Roundrobin,轮询模式;Source,源地址模式 + /// + /// + public string Method { get; set; } + + /// + /// VServer会话保持模式 + /// + /// 枚举值为:None,关闭会话保持;ServerInsert,自动生成;UserDefined,用户自定义 + /// + /// + public string PersistenceType { get; set; } + + /// + /// 由PersistenceType确定 + /// + /// None或ServerInsert时,此字段为空;UserDefined时,此字段展示用户自定义会话保持String。 + /// + /// + public string PersistenceInfo { get; set; } + + /// + /// 空闲连接的回收时间 + /// + /// 单位:秒 + /// + /// + public int ClientTimeout { get; set; } + + /// + /// VServer的运行状态 + /// + /// 枚举值为:0:运行正常;1:运行异常 + /// + /// + public int Status { get; set; } + + /// + /// VServer绑定的SSL证书信息 + /// + /// 具体结构见下方SSLSet + /// + /// + public List SSLSet { get; set; } + + /// + /// VServer后端资源信息列表 + /// + /// 具体结构见下方BackendSet + /// + /// + public List BackendSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DescribeULBRequest.cs b/UCloudSDK.NetCore2/Models/ULB/DescribeULBRequest.cs new file mode 100644 index 0000000..ac5c014 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DescribeULBRequest.cs @@ -0,0 +1,69 @@ +namespace UCloudSDK.Models +{ + /// + /// 显示负载均衡实例信息 + /// + /// http://docs.ucloud.cn/api/ulb/describe_ulb.html + /// + /// + public partial class DescribeULBRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeULB"; + + /// + /// API名称 + /// + /// DescribeULB + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 负载均衡实例的ID + /// + /// 若指定则返回指定的负载均衡实例信息;若不指定则返回用户当前数据中心中所有负载均衡实例的信息 + /// + /// + public string ULBId { get; set; } + + /// + /// 数据偏移量 + /// + /// 默认为0 + /// + /// + public int? Offset { get; set; } + + /// + /// 数据分页值 + /// + /// 默认为20 + /// + /// + public int? Limit { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + public DescribeULBRequest(string region) + { + Region = region; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/DescribeULBResponse.cs b/UCloudSDK.NetCore2/Models/ULB/DescribeULBResponse.cs new file mode 100644 index 0000000..0d847c3 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/DescribeULBResponse.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 显示负载均衡实例信息 + /// + /// http://docs.ucloud.cn/api/ulb/describe_ulb.html + /// + /// + public partial class DescribeULBResponse : UResponse + { + /// + /// 响应动作 + /// + /// DescribeULBResponse + /// + /// + public string Action { get; set; } + + /// + /// 满足条件的负载均衡实例的总数 + /// + public int TotalCount { get; set; } + + /// + /// 负载均衡实例列表 + /// + /// 具体结构见下方DataSet + /// + /// + public List DataSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/ReleaseBackendRequest.cs b/UCloudSDK.NetCore2/Models/ULB/ReleaseBackendRequest.cs new file mode 100644 index 0000000..1bec2bd --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/ReleaseBackendRequest.cs @@ -0,0 +1,62 @@ +namespace UCloudSDK.Models +{ + /// + /// 释放ULB后端资源实例 + /// + /// http://docs.ucloud.cn/api/ulb/release_backend.html + /// + /// + public partial class ReleaseBackendRequest + { + /// + /// 默认Action名称 + /// + private string _action = "ReleaseBackend"; + + /// + /// API名称 + /// + /// ReleaseBackend + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 负载均衡实例的ID + /// + public string ULBId { get; set; } + + /// + /// 后端资源实例的ID(ULB后端ID + /// + /// 非资源自身ID) + /// + /// + public string BackendId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 负载均衡实例的ID + /// 后端资源实例的ID(ULB后端ID + public ReleaseBackendRequest(string region, string ulbid, string backendid) + { + Region = region; + ULBId = ulbid; + BackendId = backendid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/ReleaseBackendResponse.cs b/UCloudSDK.NetCore2/Models/ULB/ReleaseBackendResponse.cs new file mode 100644 index 0000000..b6c63b1 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/ReleaseBackendResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 释放ULB后端资源实例 + /// + /// http://docs.ucloud.cn/api/ulb/release_backend.html + /// + /// + public partial class ReleaseBackendResponse : UResponse + { + /// + /// 响应动作 + /// + /// ReleaseBackendResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/UpdateBackendAttributeRequest.cs b/UCloudSDK.NetCore2/Models/ULB/UpdateBackendAttributeRequest.cs new file mode 100644 index 0000000..d377583 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/UpdateBackendAttributeRequest.cs @@ -0,0 +1,78 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改ULB后端资源实例(主机池)属性 + /// + /// http://docs.ucloud.cn/api/ulb/update_backend_attribute.html + /// + /// + public partial class UpdateBackendAttributeRequest + { + /// + /// 默认Action名称 + /// + private string _action = "UpdateBackendAttribute"; + + /// + /// API名称 + /// + /// UpdateBackendAttribute + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 负载均衡资源ID + /// + public string ULBId { get; set; } + + /// + /// 后端资源实例的ID(ULB后端ID + /// + /// 非资源自身ID) + /// + /// + public string BackendId { get; set; } + + /// + /// 后端资源服务端口 + /// + /// 取值范围[1-65535] + /// + /// + public int? Port { get; set; } + + /// + /// 后端实例状态开关 + /// + /// 枚举值:1:启动;0:禁用若无此字段,则不做修改 + /// + /// + public int? Enabled { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 负载均衡资源ID + /// 后端资源实例的ID(ULB后端ID + public UpdateBackendAttributeRequest(string region, string ulbid, string backendid) + { + Region = region; + ULBId = ulbid; + BackendId = backendid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/UpdateBackendAttributeResponse.cs b/UCloudSDK.NetCore2/Models/ULB/UpdateBackendAttributeResponse.cs new file mode 100644 index 0000000..e070cc8 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/UpdateBackendAttributeResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改ULB后端资源实例(主机池)属性 + /// + /// http://docs.ucloud.cn/api/ulb/update_backend_attribute.html + /// + /// + public partial class UpdateBackendAttributeResponse : UResponse + { + /// + /// 响应动作 + /// + /// UpdateBackendAttributeResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/UpdatePolicyGroupAttributeRequest.cs b/UCloudSDK.NetCore2/Models/ULB/UpdatePolicyGroupAttributeRequest.cs new file mode 100644 index 0000000..080ccc9 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/UpdatePolicyGroupAttributeRequest.cs @@ -0,0 +1,57 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改内容转发策略组配置信息 + /// + /// http://docs.ucloud.cn/api/ulb/update_policy_group_attribute.html + /// + /// + public partial class UpdatePolicyGroupAttributeRequest + { + /// + /// 默认Action名称 + /// + private string _action = "UpdatePolicyGroupAttribute"; + + /// + /// API名称 + /// + /// UpdatePolicyGroupAttribute + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 内容转发策略组ID + /// + public string GroupId { get; set; } + + /// + /// 修改策略转发组名称 + /// + public string GroupName { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 内容转发策略组ID + public UpdatePolicyGroupAttributeRequest(string region, string groupid) + { + Region = region; + GroupId = groupid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/UpdatePolicyGroupAttributeResponse.cs b/UCloudSDK.NetCore2/Models/ULB/UpdatePolicyGroupAttributeResponse.cs new file mode 100644 index 0000000..042bc6b --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/UpdatePolicyGroupAttributeResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改内容转发策略组配置信息 + /// + /// http://docs.ucloud.cn/api/ulb/update_policy_group_attribute.html + /// + /// + public partial class UpdatePolicyGroupAttributeResponse : UResponse + { + /// + /// 响应动作 + /// + /// UpdatePolicyGroupAttributeResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/UpdateULBAttributeRequest.cs b/UCloudSDK.NetCore2/Models/ULB/UpdateULBAttributeRequest.cs new file mode 100644 index 0000000..5b77c9a --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/UpdateULBAttributeRequest.cs @@ -0,0 +1,77 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改负载均衡实例属性 + /// + /// http://docs.ucloud.cn/api/ulb/update_ulb_attribute.html + /// + /// + public partial class UpdateULBAttributeRequest + { + /// + /// 默认Action名称 + /// + private string _action = "UpdateULBAttribute"; + + /// + /// API名称 + /// + /// UpdateULBAttribute + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 负载均衡实例ID + /// + public string ULBId { get; set; } + + /// + /// 名字 + /// + /// Name Tag Remark都为空则报错 + /// + /// + public string Name { get; set; } + + /// + /// 业务 + /// + /// Name Tag Remark都为空则报错 + /// + /// + public string Tag { get; set; } + + /// + /// 备注 + /// + /// Name Tag Remark都为空则报错 + /// + /// + public string Remark { get; set; } + + /// + /// 实例化 类. + /// 实例化后需要指定Name Tag Remark中的一个 + /// + /// 数据中心 + /// 负载均衡实例ID + public UpdateULBAttributeRequest(string region, string ulbid) + { + Region = region; + ULBId = ulbid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/UpdateULBAttributeResponse.cs b/UCloudSDK.NetCore2/Models/ULB/UpdateULBAttributeResponse.cs new file mode 100644 index 0000000..6bfa923 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/UpdateULBAttributeResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改负载均衡实例属性 + /// + /// http://docs.ucloud.cn/api/ulb/update_ulb_attribute.html + /// + /// + public partial class UpdateULBAttributeResponse : UResponse + { + /// + /// 响应动作 + /// + /// CreateULBResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/UpdateVServerAttributeRequest.cs b/UCloudSDK.NetCore2/Models/ULB/UpdateVServerAttributeRequest.cs new file mode 100644 index 0000000..d6b000f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/UpdateVServerAttributeRequest.cs @@ -0,0 +1,132 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改VServer实例属性 + /// + /// http://docs.ucloud.cn/api/ulb/update_vserver_attribute.html + /// + /// + public partial class UpdateVServerAttributeRequest + { + /// + /// 默认Action名称 + /// + private string _action = "UpdateVServerAttribute"; + + /// + /// API名称 + /// + /// UpdateVServerAttribute + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 负载均衡实例ID + /// + public string ULBId { get; set; } + + /// + /// VServer实例ID + /// + public string VServerId { get; set; } + + /// + /// VServer实例名称 + /// + /// 若无此字段则不做修改 + /// + /// + public string VServerName { get; set; } + + /// + /// VServer协议 + /// + /// 枚举值为: HTTP, TCP, UDP. 若无此字段则不做修改 + /// + /// + public string Protocol { get; set; } + + /// + /// VServer负载均衡算法 + /// + /// 枚举值为: Roundrobin, 轮询模式; Source,源IP模式. 若无此字段则不做修改 + /// + /// + public string Method { get; set; } + + /// + /// VServer会话保持模式 + /// + /// 枚举值为:None, 关闭会话保持;ServerInsert, 自动生成;UserDefined, 用户自定义.若无此字段则不做修改 + /// + /// + public string PersistenceType { get; set; } + + /// + /// 根据PersistenceType确定 + /// + /// None或ServerInsert, 此字段无意义;UserDefined, 则此字段传入用户自定义会话保持String.若无此字段则不做修改 + /// + /// + public string PersistenceInfo { get; set; } + + /// + /// 空闲连接的回收时间 + /// + /// 单位: 秒.取值范围: (0, 86400], 默认值: 60秒.若无此字段,则不做修改 + /// + /// + public string ClientTimeout { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 负载均衡实例ID + /// VServer实例ID + public UpdateVServerAttributeRequest(string region, string ulbid, string vserverid) + { + Region = region; + ULBId = ulbid; + VServerId = vserverid; + } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 负载均衡实例ID + /// VServer实例ID + /// VServer实例名称 + /// VServer协议 + /// VServer负载均衡算法 + /// VServer会话保持模式 + /// 根据PersistenceType确定 + /// 空闲连接的回收时间 + public UpdateVServerAttributeRequest(string region, string ulbid, string vserverid, string vservername, string protocol, string method, string persistencetype, string persistenceinfo, string clienttimeout) + { + Region = region; + ULBId = ulbid; + VServerId = vserverid; + VServerName = vservername; + Protocol = protocol; + Method = method; + PersistenceType = persistencetype; + PersistenceInfo = persistenceinfo; + ClientTimeout = clienttimeout; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/ULB/UpdateVServerAttributeResponse.cs b/UCloudSDK.NetCore2/Models/ULB/UpdateVServerAttributeResponse.cs new file mode 100644 index 0000000..ed6bdcd --- /dev/null +++ b/UCloudSDK.NetCore2/Models/ULB/UpdateVServerAttributeResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改VServer实例属性 + /// + /// http://docs.ucloud.cn/api/ulb/update_vserver_attribute.html + /// + /// + public partial class UpdateVServerAttributeResponse : UResponse + { + /// + /// 响应动作 + /// + /// UpdateVServerAttributeResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UMon/GetMetric.DataSet.cs b/UCloudSDK.NetCore2/Models/UMon/GetMetric.DataSet.cs new file mode 100644 index 0000000..e017f40 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UMon/GetMetric.DataSet.cs @@ -0,0 +1,22 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取监控数据 + /// + /// http://docs.ucloud.cn/api/umon/get_metric.html + /// + /// + public partial class GetMetricDataSet + { + /// + /// 时间戳 + /// + public int Timestamp { get; set; } + + /// + /// 监控数据 + /// + public float Value { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UMon/GetMetricRequest.cs b/UCloudSDK.NetCore2/Models/UMon/GetMetricRequest.cs new file mode 100644 index 0000000..6a37d18 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UMon/GetMetricRequest.cs @@ -0,0 +1,94 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取监控数据 + /// + /// http://docs.ucloud.cn/api/umon/get_metric.html + /// + /// + public partial class GetMetricRequest + { + /// + /// 默认Action名称 + /// + private string _action = "GetMetric"; + + /// + /// API名称 + /// + /// GetMetric + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 监控指标名称 + /// + /// 监控指标名称 + /// + /// + public NList MetricName { get; set; } + + /// + /// 与监控指标相关的资源ID + /// + /// 如主机,或其他产品,长度[1, 255] + /// + /// + public string ResourceId { get; set; } + + /// + /// 资源类型 + /// + /// 资源类型,长度[1, 255] + /// + /// + public string ResourceType { get; set; } + + /// + /// 单位秒 + /// + /// 默认一个小时 + /// + /// + public int? TimeRange { get; set; } + + /// + /// unix timestamp + /// + public int? BeginTime { get; set; } + + /// + /// unix timestamp + /// + public int? EndTime { get; set; } + + /// + /// 实例化 对象. + /// + /// 数据中心. + /// 监控指标名称. + /// 与监控指标相关的资源ID. + /// 资源类型. + public GetMetricRequest(string region, NList metricName, string resourceId, string resourceType) + { + Region = region; + MetricName = metricName; + ResourceId = resourceId; + ResourceType = resourceType; + } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UMon/GetMetricResponse.cs b/UCloudSDK.NetCore2/Models/UMon/GetMetricResponse.cs new file mode 100644 index 0000000..283ebbf --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UMon/GetMetricResponse.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取监控数据 + /// + /// http://docs.ucloud.cn/api/umon/get_metric.html + /// + /// + public partial class GetMetricResponse : UResponse + { + /// + /// 响应动作 + /// + public string Action { get; set; } + + /// + /// JSON格式监控数据列表ResponseItem + /// + public List DataSets { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/AllocateEIP.EIPAddr.cs b/UCloudSDK.NetCore2/Models/UNet/AllocateEIP.EIPAddr.cs new file mode 100644 index 0000000..0cd3615 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/AllocateEIP.EIPAddr.cs @@ -0,0 +1,22 @@ +namespace UCloudSDK.Models +{ + /// + /// 根据提供信息,分配弹性IP + /// + /// http://docs.ucloud.cn/api/unet/allocate_eip.html + /// + /// + public partial class AllocateEIPAddr + { + /// + /// 运营商信息 + /// + public string OperatorName { get; set; } + + /// + /// IP地址 + /// + public string IP { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/AllocateEIP.EIPSet.cs b/UCloudSDK.NetCore2/Models/UNet/AllocateEIP.EIPSet.cs new file mode 100644 index 0000000..49a3fbb --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/AllocateEIP.EIPSet.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 根据提供信息,分配弹性IP + /// + /// http://docs.ucloud.cn/api/unet/allocate_eip.html + /// + /// + public partial class AllocateEIPSet + { + /// + /// 申请到的EIP资源ID + /// + public string EIPId { get; set; } + + /// + /// 申请到的IPv4地址 + /// + /// 双线拥有两个IP地址) + /// + /// + public List EIPAddr { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/AllocateEIPRequest.cs b/UCloudSDK.NetCore2/Models/UNet/AllocateEIPRequest.cs new file mode 100644 index 0000000..e7c202e --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/AllocateEIPRequest.cs @@ -0,0 +1,81 @@ +namespace UCloudSDK.Models +{ + /// + /// 根据提供信息,分配弹性IP + /// + /// http://docs.ucloud.cn/api/unet/allocate_eip.html + /// + /// + public partial class AllocateEIPRequest + { + /// + /// 默认Action名称 + /// + private string _action = "AllocateEIP"; + + /// + /// API名称 + /// + /// AllocateEIP + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 弹性IP的线路如下 + /// + /// 电信: Telecom联通: Unicom国际: InternationalBGP: Bgp双线: Duplet各数据中心允许的线路参数如下:cn-east-01: Telecom, Unicom, Dupletcn-south-01: Telecom, Unicom, Dupletcn-north-01: Bgpcn-north-02: Bgpcn-north-03: Bgphk-01: Internationalus-west-01: International + /// + /// + public string OperatorName { get; set; } + + /// + /// 弹性IP的外网带宽 + /// + /// 单位为Mbps,范围 [0-800];共享带宽模式必须指定0M带宽,非共享带宽模式必须指定非0M带宽 + /// + /// + public int Bandwidth { get; set; } + + /// + /// 计费模式 + /// + /// 枚举值为:Year,按年付费;Month,按月付费;Dynamic,按需付费(需开启权限);Trial,试用(需开启权限)默认为按月付费 + /// + /// + public string ChargeType { get; set; } + + /// + /// 购买时长 + /// + /// 默认: 1 + /// + /// + public int? Quantity { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 弹性IP的线路如下 + /// 弹性IP的外网带宽 + public AllocateEIPRequest(string region, string operatorname, int bandwidth) + { + Region = region; + OperatorName = operatorname; + Bandwidth = bandwidth; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/AllocateEIPResponse.cs b/UCloudSDK.NetCore2/Models/UNet/AllocateEIPResponse.cs new file mode 100644 index 0000000..8e82cca --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/AllocateEIPResponse.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 根据提供信息,分配弹性IP + /// + /// http://docs.ucloud.cn/api/unet/allocate_eip.html + /// + /// + public partial class AllocateEIPResponse : UResponse + { + /// + /// 响应动作 + /// + /// AllocateEIPResponse + /// + /// + public string Action { get; set; } + + /// + /// 申请到的EIP资源详情 + /// + public List EIPSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/AllocateVIPRequest.cs b/UCloudSDK.NetCore2/Models/UNet/AllocateVIPRequest.cs new file mode 100644 index 0000000..e9177cd --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/AllocateVIPRequest.cs @@ -0,0 +1,53 @@ +namespace UCloudSDK.Models +{ + /// + /// 根据提供信息,分配内网VIP(Virtual IP,多用于高可用程序作为漂移IP。) + /// + /// http://docs.ucloud.cn/api/unet/allocate_vip.html + /// + /// + public partial class AllocateVIPRequest + { + /// + /// 默认Action名称 + /// + private string _action = "AllocateVIP"; + + /// + /// API名称 + /// + /// AllocateVIP + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 申请数量 + /// + /// 默认: 1 + /// + /// + public int? Count { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + public AllocateVIPRequest(string region) + { + Region = region; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/AllocateVIPResponse.cs b/UCloudSDK.NetCore2/Models/UNet/AllocateVIPResponse.cs new file mode 100644 index 0000000..71b2e8a --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/AllocateVIPResponse.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 根据提供信息,分配内网VIP(Virtual IP,多用于高可用程序作为漂移IP。) + /// + /// http://docs.ucloud.cn/api/unet/allocate_vip.html + /// + /// + public partial class AllocateVIPResponse : UResponse + { + /// + /// 响应动作 + /// + /// AllocateVIPResponse + /// + /// + public string Action { get; set; } + + /// + /// 申请到的VIP资源地址 + /// + public List DataSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/BindEIPRequest.cs b/UCloudSDK.NetCore2/Models/UNet/BindEIPRequest.cs new file mode 100644 index 0000000..883ad19 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/BindEIPRequest.cs @@ -0,0 +1,69 @@ +namespace UCloudSDK.Models +{ + /// + /// 将弹性IP绑定到资源上 + /// + /// http://docs.ucloud.cn/api/unet/bind_eip.html + /// + /// + public partial class BindEIPRequest + { + /// + /// 默认Action名称 + /// + private string _action = "BindEIP"; + + /// + /// API名称 + /// + /// BindEIP + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 弹性IP的资源Id + /// + public string EIPId { get; set; } + + /// + /// 弹性IP请求绑定的资源类型 + /// + /// 枚举值为:uhost:云主机;vrouter:虚拟路由器;ulb,负载均衡器 + /// + /// + public string ResourceType { get; set; } + + /// + /// 弹性IP请求绑定的资源ID + /// + public string ResourceId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 弹性IP的资源Id + /// 弹性IP请求绑定的资源类型 + /// 弹性IP请求绑定的资源ID + public BindEIPRequest(string region, string eipid, string resourcetype, string resourceid) + { + Region = region; + EIPId = eipid; + ResourceType = resourcetype; + ResourceId = resourceid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/BindEIPResponse.cs b/UCloudSDK.NetCore2/Models/UNet/BindEIPResponse.cs new file mode 100644 index 0000000..d236de1 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/BindEIPResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 将弹性IP绑定到资源上 + /// + /// http://docs.ucloud.cn/api/unet/bind_eip.html + /// + /// + public partial class BindEIPResponse : UResponse + { + /// + /// 响应动作 + /// + /// BindEIPResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/CreateSecurityGroup.Rule.n.cs b/UCloudSDK.NetCore2/Models/UNet/CreateSecurityGroup.Rule.n.cs new file mode 100644 index 0000000..298ebbc --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/CreateSecurityGroup.Rule.n.cs @@ -0,0 +1,12 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建防火墙组 + /// + /// http://docs.ucloud.cn/api/unet/create_security_group.html + /// + /// + public partial class CreateSecurityGroupRul:SecurityGroupRule + { + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/CreateSecurityGroupRequest.cs b/UCloudSDK.NetCore2/Models/UNet/CreateSecurityGroupRequest.cs new file mode 100644 index 0000000..36dc609 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/CreateSecurityGroupRequest.cs @@ -0,0 +1,69 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建防火墙组 + /// + /// http://docs.ucloud.cn/api/unet/create_security_group.html + /// + /// + public partial class CreateSecurityGroupRequest + { + /// + /// 默认Action名称 + /// + private string _action = "CreateSecurityGroup"; + + /// + /// API名称 + /// + /// CreateSecurityGroup + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 防火墙组名称 + /// + public string GroupName { get; set; } + + /// + /// 防火墙组描述 + /// + public string Description { get; set; } + + /// + /// 防火墙规则 + /// + /// 格式如下: + /// + /// + public NList Rule { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 防火墙组名称 + /// 防火墙组描述. + /// 防火墙规则 + public CreateSecurityGroupRequest(string region, string groupname, string description, NList rule) + { + Region = region; + GroupName = groupname; + Description = description; + Rule = rule; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/CreateSecurityGroupResponse.cs b/UCloudSDK.NetCore2/Models/UNet/CreateSecurityGroupResponse.cs new file mode 100644 index 0000000..1806f61 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/CreateSecurityGroupResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 创建防火墙组 + /// + /// http://docs.ucloud.cn/api/unet/create_security_group.html + /// + /// + public partial class CreateSecurityGroupResponse : UResponse + { + /// + /// 响应动作 + /// + /// CreateSecurityGroupResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/DeleteSecurityGroupRequest.cs b/UCloudSDK.NetCore2/Models/UNet/DeleteSecurityGroupRequest.cs new file mode 100644 index 0000000..ae4d56b --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/DeleteSecurityGroupRequest.cs @@ -0,0 +1,52 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除防火墙 + /// + /// http://docs.ucloud.cn/api/unet/delete_security_group.html + /// + /// + public partial class DeleteSecurityGroupRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DeleteSecurityGroup"; + + /// + /// API名称 + /// + /// DeleteSecurityGroup + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 防火墙资源ID + /// + public string GroupId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 防火墙资源ID + public DeleteSecurityGroupRequest(string region, string groupid) + { + Region = region; + GroupId = groupid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/DeleteSecurityGroupResponse.cs b/UCloudSDK.NetCore2/Models/UNet/DeleteSecurityGroupResponse.cs new file mode 100644 index 0000000..a494453 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/DeleteSecurityGroupResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 删除防火墙 + /// + /// http://docs.ucloud.cn/api/unet/delete_security_group.html + /// + /// + public partial class DeleteSecurityGroupResponse : UResponse + { + /// + /// 响应动作 + /// + /// CreateSecurityGroupResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/DescribeEIP.EIPAddr.cs b/UCloudSDK.NetCore2/Models/UNet/DescribeEIP.EIPAddr.cs new file mode 100644 index 0000000..20da8c6 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/DescribeEIP.EIPAddr.cs @@ -0,0 +1,25 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取弹性IP详细信息 + /// + /// http://docs.ucloud.cn/api/unet/describe_eip.html + /// + /// + public partial class DescribeEIPAddr + { + /// + /// 弹性IP的运营商信息 + /// + /// 枚举值为:Telecom:电信IPUnicom:联通IPDuplet:双线IP(电信+联通)Bgp:BGP IPInternational:国际IP + /// + /// + public string OperatorName { get; set; } + + /// + /// 弹性IP地址 + /// + public string IP { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/DescribeEIP.EIPSet.cs b/UCloudSDK.NetCore2/Models/UNet/DescribeEIP.EIPSet.cs new file mode 100644 index 0000000..9768918 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/DescribeEIP.EIPSet.cs @@ -0,0 +1,91 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取弹性IP详细信息 + /// + /// http://docs.ucloud.cn/api/unet/describe_eip.html + /// + /// + public partial class DescribeEIPSet + { + /// + /// 弹性IP的资源ID + /// + public string EIPId { get; set; } + + /// + /// 外网出口权重 + /// + /// 默认为50,范围[0-100] + /// + /// + public int Weight { get; set; } + + /// + /// 带宽模式 + /// + /// 枚举值为:0:非共享带宽模式,1:共享带宽模式 + /// + /// + public int BandwidthType { get; set; } + + /// + /// 弹性IP的带宽 + /// + /// 单位为Mbps,当BandwidthType=1时,该处显示为共享带宽值。 + /// + /// + public int Bandwidth { get; set; } + + /// + /// 弹性IP的资源绑定状态 + /// + /// 枚举值为:used:已绑定,free:未绑定 + /// + /// + public string Status { get; set; } + + /// + /// 计费模式 + /// + /// 枚举值为:Year,按年付费;Month,按月付费;Dynamic,按小时付费;Trial,试用 + /// + /// + public string ChargeType { get; set; } + + /// + /// 弹性IP的创建时间 + /// + /// 格式为Unix Timestamp + /// + /// + public int CreateTime { get; set; } + + /// + /// 弹性IP的到期时间 + /// + /// 格式为Unix Timestamp + /// + /// + public int ExpireTime { get; set; } + + /// + /// 弹性IP的详细信息列表 + /// + /// 具体结构见下方Resource + /// + /// + public List Resource { get; set; } + + /// + /// 弹性IP的详细信息列表 + /// + /// 具体结构见下方EIPAddr + /// + /// + public List EIPAddr { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/DescribeEIP.Resource.cs b/UCloudSDK.NetCore2/Models/UNet/DescribeEIP.Resource.cs new file mode 100644 index 0000000..c9fcd3f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/DescribeEIP.Resource.cs @@ -0,0 +1,27 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取弹性IP详细信息 + /// + /// http://docs.ucloud.cn/api/unet/describe_eip.html + /// + /// + public partial class DescribeEIPResource + { + /// + /// 已绑定的资源类型 + /// + public string ResourceType { get; set; } + + /// + /// 已绑定的资源名称 + /// + public string ResourceName { get; set; } + + /// + /// 已绑定资源的资源ID + /// + public string ResourceId { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/DescribeEIPRequest.cs b/UCloudSDK.NetCore2/Models/UNet/DescribeEIPRequest.cs new file mode 100644 index 0000000..49a60e8 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/DescribeEIPRequest.cs @@ -0,0 +1,69 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取弹性IP详细信息 + /// + /// http://docs.ucloud.cn/api/unet/describe_eip.html + /// + /// + public partial class DescribeEIPRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeEIP"; + + /// + /// API名称 + /// + /// DescribeEIP + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 弹性IP的资源ID如果为空 + /// + /// 则返回当前Region中符合条件的的所有EIP + /// + /// + public NList EIPIds { get; set; } + + /// + /// 数据偏移量 + /// + /// 默认为0 + /// + /// + public int? Offset { get; set; } + + /// + /// 数据分页值 + /// + /// 默认为20 + /// + /// + public int? Limit { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + public DescribeEIPRequest(string region) + { + Region = region; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/DescribeEIPResponse.cs b/UCloudSDK.NetCore2/Models/UNet/DescribeEIPResponse.cs new file mode 100644 index 0000000..f040007 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/DescribeEIPResponse.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取弹性IP详细信息 + /// + /// http://docs.ucloud.cn/api/unet/describe_eip.html + /// + /// + public partial class DescribeEIPResponse : UResponse + { + /// + /// 响应动作 + /// + /// DescribeEIPResponse + /// + /// + public string Action { get; set; } + + /// + /// 满足条件的弹性IP总数 + /// + public int TotalCount { get; set; } + + /// + /// 弹性IP列表 + /// + /// 每项参数详见DataSet + /// + /// + public List EIPSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroup.DataSet.cs b/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroup.DataSet.cs new file mode 100644 index 0000000..515e4a7 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroup.DataSet.cs @@ -0,0 +1,48 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取防火墙组信息 + /// + /// http://docs.ucloud.cn/api/unet/describe_security_group.html + /// + /// + public partial class DescribeSecurityGroupDataSet + { + /// + /// 防火墙组的资源ID + /// + public string GroupId { get; set; } + + /// + /// 防火墙组的名称 + /// + public string GroupName { get; set; } + + /// + /// 防火墙组创建时间 + /// + /// 格式为Unix Timestamp + /// + /// + public string CreateTime { get; set; } + + /// + /// 防火墙组类型 + /// + /// 枚举值为:0:用户自定义防火墙;1:默认Web防火墙;2:默认非Web防火墙 + /// + /// + public string Type { get; set; } + + /// + /// 防火墙组中的规则列表 + /// + /// 结构如下: + /// + /// + public List Rule { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroup.Rule.cs b/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroup.Rule.cs new file mode 100644 index 0000000..d06c855 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroup.Rule.cs @@ -0,0 +1,37 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取防火墙组信息 + /// + /// http://docs.ucloud.cn/api/unet/describe_security_group.html + /// + /// + public partial class DescribeSecurityGroupRule + { + /// + /// 源地址 + /// + public string SrcIP { get; set; } + + /// + /// 优先级 + /// + public int Priority { get; set; } + + /// + /// 协议类型 + /// + public string ProtocolType { get; set; } + + /// + /// 目标端口 + /// + public string DstPort { get; set; } + + /// + /// 防火墙动作 + /// + public string RuleAction { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroupRequest.cs b/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroupRequest.cs new file mode 100644 index 0000000..6495c68 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroupRequest.cs @@ -0,0 +1,63 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取防火墙组信息 + /// + /// http://docs.ucloud.cn/api/unet/describe_security_group.html + /// + /// + public partial class DescribeSecurityGroupRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeSecurityGroup"; + + /// + /// API名称 + /// + /// DescribeSecurityGroup + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 绑定防火墙组的资源类型 + /// + /// 如uhost + /// + /// + public string ResourceType { get; set; } + + /// + /// 绑定防火墙组的资源ID + /// + public int? ResourceId { get; set; } + + /// + /// 防火墙ID + /// + public int? GroupId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + public DescribeSecurityGroupRequest(string region) + { + Region = region; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroupResourceRequest.cs b/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroupResourceRequest.cs new file mode 100644 index 0000000..0762e36 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroupResourceRequest.cs @@ -0,0 +1,52 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取防火墙组所绑定资源的外网IP + /// + /// http://docs.ucloud.cn/api/unet/describe_security_group_resource.html + /// + /// + public partial class DescribeSecurityGroupResourceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeSecurityGroupResource"; + + /// + /// API名称 + /// + /// DescribeSecurityGroupResource + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 防火墙ID + /// + public string GroupId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 防火墙ID. + public DescribeSecurityGroupResourceRequest(string region, string groupid) + { + Region = region; + GroupId = groupid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroupResourceResponse.cs b/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroupResourceResponse.cs new file mode 100644 index 0000000..97a876a --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroupResourceResponse.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取防火墙组所绑定资源的外网IP + /// + /// http://docs.ucloud.cn/api/unet/describe_security_group_resource.html + /// + /// + public partial class DescribeSecurityGroupResourceResponse : UResponse + { + /// + /// 响应动作 + /// + /// DescribeSecurityGroupResourceResponse + /// + /// + public string Action { get; set; } + + /// + /// IP列表数组 如 [“10 + /// + /// 10.10.10”, “10.10.10.11”] + /// + /// + public List DataSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroupResponse.cs b/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroupResponse.cs new file mode 100644 index 0000000..e84ea4f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/DescribeSecurityGroupResponse.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取防火墙组信息 + /// + /// http://docs.ucloud.cn/api/unet/describe_security_group.html + /// + /// + public partial class DescribeSecurityGroupResponse : UResponse + { + /// + /// 响应动作 + /// + /// DescribeSecurityGroupResponse + /// + /// + public string Action { get; set; } + + /// + /// 获取的防火墙组详细信息 + /// + public List DataSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/DescribeVIPRequest.cs b/UCloudSDK.NetCore2/Models/UNet/DescribeVIPRequest.cs new file mode 100644 index 0000000..fcd97cb --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/DescribeVIPRequest.cs @@ -0,0 +1,45 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取内网VIP详细信息 + /// + /// http://docs.ucloud.cn/api/unet/describe_vip.html + /// + /// + public partial class DescribeVIPRequest + { + /// + /// 默认Action名称 + /// + private string _action = "DescribeVIP"; + + /// + /// API名称 + /// + /// DescribeVIP + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + public DescribeVIPRequest(string region) + { + Region = region; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/DescribeVIPResponse.cs b/UCloudSDK.NetCore2/Models/UNet/DescribeVIPResponse.cs new file mode 100644 index 0000000..aaa4f1e --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/DescribeVIPResponse.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取内网VIP详细信息 + /// + /// http://docs.ucloud.cn/api/unet/describe_vip.html + /// + /// + public partial class DescribeVIPResponse : UResponse + { + /// + /// 响应动作 + /// + /// DescribeEIPResponse + /// + /// + public string Action { get; set; } + + /// + /// 内网VIP地址列表 + /// + public List DataSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/GetEIPPrice.PriceSet.cs b/UCloudSDK.NetCore2/Models/UNet/GetEIPPrice.PriceSet.cs new file mode 100644 index 0000000..29497d2 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/GetEIPPrice.PriceSet.cs @@ -0,0 +1,30 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取弹性IP价格 + /// + /// http://docs.ucloud.cn/api/unet/get_eip_price.html + /// + /// + public partial class GetEIPPriceSet + { + /// + /// 弹性IP计费类型 + /// + public string ChargeType { get; set; } + + /// + /// 弹性IP价格 + /// + public string Price { get; set; } + + /// + /// 资源有效期 + /// + /// 以Unix Timestamp表示 + /// + /// + public int PurchaseValue { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/GetEIPPriceRequest.cs b/UCloudSDK.NetCore2/Models/UNet/GetEIPPriceRequest.cs new file mode 100644 index 0000000..8161827 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/GetEIPPriceRequest.cs @@ -0,0 +1,73 @@ +namespace UCloudSDK.Models +{ + /// + /// 获取弹性IP价格 + /// + /// http://docs.ucloud.cn/api/unet/get_eip_price.html + /// + /// + public partial class GetEIPPriceRequest + { + /// + /// 默认Action名称 + /// + private string _action = "GetEIPPrice"; + + /// + /// API名称 + /// + /// GetEIPPrice + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 弹性IP的线路如下 + /// + /// 电信: Telecom联通: Unicom国际: InternationalBGP: Bgp双线: Duplet各数据中心允许的线路参数如下:cn-east-01: Telecom, Unicom, Dupletcn-south-01: Telecom, Unicom, Dupletcn-north-01: Bgpcn-north-02: Bgpcn-north-03: Bgphk-01: Internationalus-west-01: International + /// + /// + public string OperatorName { get; set; } + + /// + /// 弹性IP的外网带宽 + /// + /// 单位为Mbps,范围 [0-800]; + /// + /// + public int Bandwidth { get; set; } + + /// + /// 计费模式 + /// + /// 枚举值为:Year,按年付费;Month,按月付费;Dynamic,按需付费(需开启权限);默认为获取三种价格 + /// + /// + public string ChargeType { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 弹性IP的线路如下 + /// 弹性IP的外网带宽 + public GetEIPPriceRequest(string region, string operatorname, int bandwidth) + { + Region = region; + OperatorName = operatorname; + Bandwidth = bandwidth; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/GetEIPPriceResponse.cs b/UCloudSDK.NetCore2/Models/UNet/GetEIPPriceResponse.cs new file mode 100644 index 0000000..22bf3b8 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/GetEIPPriceResponse.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; + +namespace UCloudSDK.Models +{ + /// + /// 获取弹性IP价格 + /// + /// http://docs.ucloud.cn/api/unet/get_eip_price.html + /// + /// + public partial class GetEIPPriceResponse : UResponse + { + /// + /// 响应动作 + /// + /// GetEIPPriceResponse + /// + /// + public string Action { get; set; } + + /// + /// 弹性IP价格详情 + /// + public List PriceSet { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/GrantSecurityGroupRequest.cs b/UCloudSDK.NetCore2/Models/UNet/GrantSecurityGroupRequest.cs new file mode 100644 index 0000000..4b8691f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/GrantSecurityGroupRequest.cs @@ -0,0 +1,69 @@ +namespace UCloudSDK.Models +{ + /// + /// 将防火墙应用到资源上 + /// + /// http://docs.ucloud.cn/api/unet/grant_security_group.html + /// + /// + public partial class GrantSecurityGroupRequest + { + /// + /// 默认Action名称 + /// + private string _action = "GrantSecurityGroup"; + + /// + /// API名称 + /// + /// GrantSecurityGroup + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 防火墙资源ID + /// + public string GroupId { get; set; } + + /// + /// 所应用资源类型 + /// + /// 如UHost + /// + /// + public string ResourceType { get; set; } + + /// + /// 所应用资源ID + /// + public string ResourceId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 防火墙资源ID + /// 所应用资源类型 + /// 所应用资源ID + public GrantSecurityGroupRequest(string region, string groupid, string resourcetype, string resourceid) + { + Region = region; + GroupId = groupid; + ResourceType = resourcetype; + ResourceId = resourceid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/GrantSecurityGroupResponse.cs b/UCloudSDK.NetCore2/Models/UNet/GrantSecurityGroupResponse.cs new file mode 100644 index 0000000..3a33643 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/GrantSecurityGroupResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 将防火墙应用到资源上 + /// + /// http://docs.ucloud.cn/api/unet/grant_security_group.html + /// + /// + public partial class GrantSecurityGroupResponse : UResponse + { + /// + /// 响应动作 + /// + /// GrantSecurityGroupResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/ModifyEIPBandwidthRequest.cs b/UCloudSDK.NetCore2/Models/UNet/ModifyEIPBandwidthRequest.cs new file mode 100644 index 0000000..677923f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/ModifyEIPBandwidthRequest.cs @@ -0,0 +1,62 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改弹性IP的外网带宽 + /// + /// http://docs.ucloud.cn/api/unet/modify_eip_bandwidth.html + /// + /// + public partial class ModifyEIPBandwidthRequest + { + /// + /// 默认Action名称 + /// + private string _action = "ModifyEIPBandwidth"; + + /// + /// API名称 + /// + /// ModifyEIPBandwidth + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 弹性IP的资源ID + /// + public string EIPId { get; set; } + + /// + /// 弹性IP的外网带宽 + /// + /// 单位为Mbps,范围 [0-800] + /// + /// + public int Bandwidth { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 弹性IP的资源ID + /// 弹性IP的外网带宽 + public ModifyEIPBandwidthRequest(string region, string eipid, int bandwidth) + { + Region = region; + EIPId = eipid; + Bandwidth = bandwidth; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/ModifyEIPBandwidthResponse.cs b/UCloudSDK.NetCore2/Models/UNet/ModifyEIPBandwidthResponse.cs new file mode 100644 index 0000000..d2ee804 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/ModifyEIPBandwidthResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改弹性IP的外网带宽 + /// + /// http://docs.ucloud.cn/api/unet/modify_eip_bandwidth.html + /// + /// + public partial class ModifyEIPBandwidthResponse : UResponse + { + /// + /// 响应动作 + /// + /// ModifyEIPBandwidthResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/ModifyEIPWeightRequest.cs b/UCloudSDK.NetCore2/Models/UNet/ModifyEIPWeightRequest.cs new file mode 100644 index 0000000..27c6e9c --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/ModifyEIPWeightRequest.cs @@ -0,0 +1,62 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改弹性IP的外网出口权重 + /// + /// http://docs.ucloud.cn/api/unet/modify_eip_weight.html + /// + /// + public partial class ModifyEIPWeightRequest + { + /// + /// 默认Action名称 + /// + private string _action = "ModifyEIPWeight"; + + /// + /// API名称 + /// + /// ModifyEIPWeight + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 弹性IP的资源ID + /// + public string EIPId { get; set; } + + /// + /// 外网出口权重 + /// + /// 范围[0-100] + /// + /// + public int Weight { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 弹性IP的资源ID + /// 外网出口权重 + public ModifyEIPWeightRequest(string region, string eipid, int weight) + { + Region = region; + EIPId = eipid; + Weight = weight; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/ModifyEIPWeightResponse.cs b/UCloudSDK.NetCore2/Models/UNet/ModifyEIPWeightResponse.cs new file mode 100644 index 0000000..babe2dd --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/ModifyEIPWeightResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改弹性IP的外网出口权重 + /// + /// http://docs.ucloud.cn/api/unet/modify_eip_weight.html + /// + /// + public partial class ModifyEIPWeightResponse : UResponse + { + /// + /// 响应动作 + /// + /// ModifyEIPWeightResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/ReleaseEIPRequest.cs b/UCloudSDK.NetCore2/Models/UNet/ReleaseEIPRequest.cs new file mode 100644 index 0000000..74d418f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/ReleaseEIPRequest.cs @@ -0,0 +1,52 @@ +namespace UCloudSDK.Models +{ + /// + /// 释放EIP资源 + /// + /// http://docs.ucloud.cn/api/unet/release_eip.html + /// + /// + public partial class ReleaseEIPRequest + { + /// + /// 默认Action名称 + /// + private string _action = "ReleaseEIP"; + + /// + /// API名称 + /// + /// ReleaseEIP + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 弹性IP的资源ID + /// + public string EIPId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 弹性IP的资源ID + public ReleaseEIPRequest(string region, string eipid) + { + Region = region; + EIPId = eipid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/ReleaseEIPResponse.cs b/UCloudSDK.NetCore2/Models/UNet/ReleaseEIPResponse.cs new file mode 100644 index 0000000..0f342f6 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/ReleaseEIPResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 释放EIP资源 + /// + /// http://docs.ucloud.cn/api/unet/release_eip.html + /// + /// + public partial class ReleaseEIPResponse : UResponse + { + /// + /// 响应动作 + /// + /// ReleaseEIPResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/ReleaseVIPRequest.cs b/UCloudSDK.NetCore2/Models/UNet/ReleaseVIPRequest.cs new file mode 100644 index 0000000..b9c3e57 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/ReleaseVIPRequest.cs @@ -0,0 +1,52 @@ +namespace UCloudSDK.Models +{ + /// + /// 释放VIP资源 + /// + /// http://docs.ucloud.cn/api/unet/release_vip.html + /// + /// + public partial class ReleaseVIPRequest + { + /// + /// 默认Action名称 + /// + private string _action = "ReleaseVIP"; + + /// + /// API名称 + /// + /// ReleaseVIP + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 内网VIP的IP地址 + /// + public string VIP { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 内网VIP的IP地址 + public ReleaseVIPRequest(string region, string vip) + { + Region = region; + VIP = vip; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/ReleaseVIPResponse.cs b/UCloudSDK.NetCore2/Models/UNet/ReleaseVIPResponse.cs new file mode 100644 index 0000000..85b845e --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/ReleaseVIPResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 释放VIP资源 + /// + /// http://docs.ucloud.cn/api/unet/release_vip.html + /// + /// + public partial class ReleaseVIPResponse : UResponse + { + /// + /// 响应动作 + /// + /// ReleaseVIPResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/UnBindEIPRequest.cs b/UCloudSDK.NetCore2/Models/UNet/UnBindEIPRequest.cs new file mode 100644 index 0000000..0d20003 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/UnBindEIPRequest.cs @@ -0,0 +1,69 @@ +namespace UCloudSDK.Models +{ + /// + /// 将弹性IP从资源上解绑 + /// + /// http://docs.ucloud.cn/api/unet/unbind_eip.html + /// + /// + public partial class UnBindEIPRequest + { + /// + /// 默认Action名称 + /// + private string _action = "UnBindEIP"; + + /// + /// API名称 + /// + /// UnBindEIP + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 弹性IP的资源Id + /// + public string EIPId { get; set; } + + /// + /// 弹性IP请求解绑的资源类型 + /// + /// 枚举值为:uhost:云主机;vrouter:虚拟路由器;ulb,负载均衡器 + /// + /// + public string ResourceType { get; set; } + + /// + /// 弹性IP请求解绑的资源ID + /// + public string ResourceId { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 弹性IP的资源Id + /// 弹性IP请求解绑的资源类型 + /// 弹性IP请求解绑的资源ID + public UnBindEIPRequest(string region, string eipid, string resourcetype, string resourceid) + { + Region = region; + EIPId = eipid; + ResourceType = resourcetype; + ResourceId = resourceid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/UnBindEIPResponse.cs b/UCloudSDK.NetCore2/Models/UNet/UnBindEIPResponse.cs new file mode 100644 index 0000000..63c7cbc --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/UnBindEIPResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 将弹性IP从资源上解绑 + /// + /// http://docs.ucloud.cn/api/unet/unbind_eip.html + /// + /// + public partial class UnBindEIPResponse : UResponse + { + /// + /// 响应动作 + /// + /// UnBindEIPResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/UpdateEIPAttributeRequest.cs b/UCloudSDK.NetCore2/Models/UNet/UpdateEIPAttributeRequest.cs new file mode 100644 index 0000000..08be48f --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/UpdateEIPAttributeRequest.cs @@ -0,0 +1,77 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改EIP名字业务组备注等属性字段 + /// + /// http://docs.ucloud.cn/api/unet/update_eip_attribute.html + /// + /// + public partial class UpdateEIPAttributeRequest + { + /// + /// 默认Action名称 + /// + private string _action = "UpdateEIPAttribute"; + + /// + /// API名称 + /// + /// UpdateEIPAttribute + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// EIP资源ID + /// + public string EIPId { get; set; } + + /// + /// 名字 + /// + /// Name Tag Remark都为空则报错 + /// + /// + public string Name { get; set; } + + /// + /// 弹性IP的业务组标识 + /// + /// Name Tag Remark都为空则报错 + /// + /// + public string Tag { get; set; } + + /// + /// 弹性IP的备注信息 + /// + /// Name Tag Remark都为空则报错 + /// + /// + public string Remark { get; set; } + + /// + /// 实例化 类. + /// 必需设置Name Tag Remark中的一个 + /// + /// 数据中心 + /// EIP资源ID + public UpdateEIPAttributeRequest(string region, string eipid) + { + Region = region; + EIPId = eipid; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/UpdateEIPAttributeResponse.cs b/UCloudSDK.NetCore2/Models/UNet/UpdateEIPAttributeResponse.cs new file mode 100644 index 0000000..940a9a2 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/UpdateEIPAttributeResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 修改EIP名字业务组备注等属性字段 + /// + /// http://docs.ucloud.cn/api/unet/update_eip_attribute.html + /// + /// + public partial class UpdateEIPAttributeResponse : UResponse + { + /// + /// 响应动作 + /// + /// UpdateEIPAttributeResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/UpdateSecurityGroup.Rule.n.cs b/UCloudSDK.NetCore2/Models/UNet/UpdateSecurityGroup.Rule.n.cs new file mode 100644 index 0000000..6fcbadf --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/UpdateSecurityGroup.Rule.n.cs @@ -0,0 +1,13 @@ +namespace UCloudSDK.Models +{ + /// + /// 更新防火墙规则 + /// + /// http://docs.ucloud.cn/api/unet/update_security_group.html + /// + /// + public partial class UpdateSecurityGroupRule : SecurityGroupRule + { + + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/UpdateSecurityGroupRequest.cs b/UCloudSDK.NetCore2/Models/UNet/UpdateSecurityGroupRequest.cs new file mode 100644 index 0000000..7f61372 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/UpdateSecurityGroupRequest.cs @@ -0,0 +1,62 @@ +namespace UCloudSDK.Models +{ + /// + /// 更新防火墙规则 + /// + /// http://docs.ucloud.cn/api/unet/update_security_group.html + /// + /// + public partial class UpdateSecurityGroupRequest + { + /// + /// 默认Action名称 + /// + private string _action = "UpdateSecurityGroup"; + + /// + /// API名称 + /// + /// UpdateSecurityGroup + /// + /// + public string Action + { + get { return _action; } + set { _action = value; } + } + + /// + /// 数据中心 + /// + /// 参见 数据中心列表 + /// + /// + public string Region { get; set; } + + /// + /// 防火墙资源ID + /// + public string GroupId { get; set; } + + /// + /// 防火墙规则 + /// + /// 格式如下 + /// + /// + public NList Rule { get; set; } + + /// + /// 实例化 类. + /// + /// 数据中心 + /// 防火墙资源ID + /// 防火墙规则 + public UpdateSecurityGroupRequest(string region, string groupid, NList rule) + { + Region = region; + GroupId = groupid; + Rule = rule; + } + } +} diff --git a/UCloudSDK.NetCore2/Models/UNet/UpdateSecurityGroupResponse.cs b/UCloudSDK.NetCore2/Models/UNet/UpdateSecurityGroupResponse.cs new file mode 100644 index 0000000..fa30035 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UNet/UpdateSecurityGroupResponse.cs @@ -0,0 +1,20 @@ +namespace UCloudSDK.Models +{ + /// + /// 更新防火墙规则 + /// + /// http://docs.ucloud.cn/api/unet/update_security_group.html + /// + /// + public partial class UpdateSecurityGroupResponse : UResponse + { + /// + /// 响应动作 + /// + /// UpdateSecurityGroupResponse + /// + /// + public string Action { get; set; } + + } +} diff --git a/UCloudSDK.NetCore2/Models/UResponse.cs b/UCloudSDK.NetCore2/Models/UResponse.cs new file mode 100644 index 0000000..ca97682 --- /dev/null +++ b/UCloudSDK.NetCore2/Models/UResponse.cs @@ -0,0 +1,21 @@ +namespace UCloudSDK.Models +{ + /// + /// 返回结果 + /// + public class UResponse + { + /// + /// 执行结果代码 + /// + /// 执行成功与否,0 表示成功,其他值则为错误代码. + /// + /// + public int RetCode { get; set; } + + /// + /// 错误消息. + /// + public string Message { get; set; } + } +} \ No newline at end of file diff --git a/UCloudSDK.NetCore2/SMS.cs b/UCloudSDK.NetCore2/SMS.cs new file mode 100644 index 0000000..efccc7a --- /dev/null +++ b/UCloudSDK.NetCore2/SMS.cs @@ -0,0 +1,20 @@ +using RestSharp; +using UCloudSDK.Models; + +namespace UCloudSDK +{ + public partial class UCloud + { + /// + /// 发送短信. + /// + /// 短信发送对象. + /// 返回对象 + public SMSResponse SendSms(SMSRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + } +} \ No newline at end of file diff --git a/UCloudSDK.NetCore2/UCDN.cs b/UCloudSDK.NetCore2/UCDN.cs new file mode 100644 index 0000000..62b2162 --- /dev/null +++ b/UCloudSDK.NetCore2/UCDN.cs @@ -0,0 +1,208 @@ +using RestSharp; +using UCloudSDK.Models; + +namespace UCloudSDK +{ + /// + /// 云分发 + /// + public partial class UCDN : UCloud + { + /// + /// 初始化 类. + /// + public UCDN() + { + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + public UCDN(string publicKey, string privateKey) + : base(publicKey, privateKey) + { + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + /// API请求地址. + public UCDN(string publicKey, string privateKey, string baseUrl) + : base(publicKey, privateKey, baseUrl) + { + } + + /// + /// 购买流量 + /// + /// 请求参数. + /// 返回对象 + public BuyUcdnTrafficResponse BuyUcdnTraffic(BuyUcdnTrafficRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 创建加速域名 + /// + /// 请求参数. + /// 返回对象 + public CreateUcdnDomainResponse CreateUcdnDomain(CreateUcdnDomainRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取域名预取任务状态 + /// + /// 请求参数. + /// 返回对象 + public DescribePrefetchCacheTaskResponse DescribePrefetchCacheTask(DescribePrefetchCacheTaskRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取域名刷新任务状态 + /// + /// 请求参数. + /// 返回对象 + public DescribeRefreshCacheTaskResponse DescribeRefreshCacheTask(DescribeRefreshCacheTaskRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取加速域名详细信息 + /// + /// 请求参数. + /// 返回对象 + public DescribeUcdnDomainResponse DescribeUcdnDomain(DescribeUcdnDomainRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取加速域名带宽使用信息 + /// + /// 请求参数. + /// 返回对象 + public GetUcdnDomainBandwidthResponse GetUcdnDomainBandwidth(GetUcdnDomainBandwidthRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取加速域名原始日志 + /// + /// 请求参数. + /// 返回对象 + public GetUcdnDomainLogResponse GetUcdnDomainLog(GetUcdnDomainLogRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取域名预取开启状态 + /// + /// 请求参数. + /// 返回对象 + public GetUcdnDomainPrefetchEnableResponse GetUcdnDomainPrefetchEnable(GetUcdnDomainPrefetchEnableRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取加速域名流量使用信息 + /// + /// 请求参数. + /// 返回对象 + public GetUcdnDomainTrafficResponse GetUcdnDomainTraffic(GetUcdnDomainTrafficRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取流量信息 + /// + /// 请求参数. + /// 返回对象 + public GetUcdnTrafficResponse GetUcdnTraffic(GetUcdnTrafficRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 预取文件 + /// + /// 请求参数. + /// 返回对象 + public PrefetchDomainCacheResponse PrefetchDomainCache(PrefetchDomainCacheRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 刷新加速缓存 + /// + /// 请求参数. + /// 返回对象 + public RefreshUcdnDomainCacheResponse RefreshUcdnDomainCache(RefreshUcdnDomainCacheRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 更新加速域名配置 + /// + /// 请求参数. + /// 返回对象 + public UpdateUcdnDomainResponse UpdateUcdnDomain(UpdateUcdnDomainRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 更新加速域名状态 + /// + /// 请求参数. + /// 返回对象 + public UpdateUcdnDomainStatusResponse UpdateUcdnDomainStatus(UpdateUcdnDomainStatusRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + } +} diff --git a/UCloudSDK.NetCore2/UCloud.cs b/UCloudSDK.NetCore2/UCloud.cs new file mode 100644 index 0000000..f59efb7 --- /dev/null +++ b/UCloudSDK.NetCore2/UCloud.cs @@ -0,0 +1,222 @@ +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Configuration; +using System.Linq; +using System.Text; +using RestSharp; +using RestSharp.Extensions; + +namespace UCloudSDK +{ + /// + /// UCloud对象 + /// + public partial class UCloud + { + /// + /// 默认API请求地址 + /// 可被App.Setting的BaseUrl覆盖 + /// + private const string Url = "http://api.ucloud.cn"; + + /// + /// 获取或设置API请求地址. + /// + /// + /// API请求地址. + /// + public string BaseUrl { get; set; } + + /// + /// 获取或设置用户公钥. + /// + /// + /// 用户公钥. + /// + public string PublicKey { get; set; } + + /// + /// 获取或设置用户私钥. + /// + /// + /// 用户私钥. + /// + public string PrivateKey { get; set; } + + /// + /// 获取或设置RestClient对象. + /// + /// + /// RestClient对象. + /// + public RestClient Client { get; set; } + + /// + /// 初始化 类. + /// + /// 使用该构造函数,请正确配置App.Setting文件 + /// + /// + /// 请正确配置App.Setting文件,或使用带参构造函数 + public UCloud() + { + var section = ConfigurationManager.GetSection("UcloudSetting") as NameValueCollection; + if (section != null) + { + PublicKey = section["PublicKey"]; + PrivateKey = section["PrivateKey"]; + BaseUrl = section["BaseUrl"]; + BaseUrl = string.IsNullOrEmpty(BaseUrl) ? Url : BaseUrl; + Client = new RestClient(BaseUrl) {UserAgent = "UCloudSDK"}; + } + else + { + throw new Exception("请正确配置App.Setting文件,或使用带参构造函数"); + } + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + public UCloud(string publicKey, string privateKey) + { + var section = ConfigurationManager.GetSection("UcloudSetting") as NameValueCollection; + if (section != null) + { + BaseUrl = section["BaseUrl"]; + } + BaseUrl = string.IsNullOrEmpty(BaseUrl) ? Url : BaseUrl; + PublicKey = publicKey; + PrivateKey = privateKey; + Client = new RestClient(BaseUrl) {UserAgent = "UCloudSDK"}; + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + /// API请求地址. + public UCloud(string publicKey, string privateKey, string baseUrl) + { + PublicKey = publicKey; + PrivateKey = privateKey; + BaseUrl = baseUrl; + Client = new RestClient(BaseUrl) {UserAgent = "UCloudSDK"}; + } + + /// + /// 计算签名. + /// + /// 参数键值对. + /// 签名值 + private string VerfyAc(List parameters) + { + return VerfyAc(parameters, PrivateKey); + } + + /// + /// 计算签名. + /// + /// 参数键值对. + /// 私钥. + /// 签名值 + private string VerfyAc(List parameters, string privateKey) + { + var param= + parameters.Where(t => t.Type == ParameterType.GetOrPost).ToList(); + + param.Sort(delegate(Parameter x, Parameter y) + { + if (x.Name == null && y.Name == null) return 0; + if (x.Name == null) return -1; + if (y.Name == null) return 1; + return String.Compare(x.Name, y.Name, StringComparison.Ordinal); + }); + + var sb = new StringBuilder(); + foreach (var parm in param) + { + sb.Append(parm.Name); + sb.Append(parm.Value); + } + sb.Append(privateKey); + + return sb.ToString().ToSHA1(); + } + + /// + /// 执行请求. + /// + /// 返回值类型 + /// 请求对象. + /// 返回值对象 + /// 异常 + public T Execute(IRestRequest request) where T : new() + { + request.AddParameter("PublicKey", PublicKey); + + var sign = VerfyAc(request.Parameters); + + request.AddParameter("Signature", sign); + + var response = Client.Execute(request); + + if (response.ErrorException != null) + { + const string message = "响应错误,请检查."; + throw new ApplicationException(message, response.ErrorException); + } + + return response.Data; + } + + /// + /// 执行请求. + /// + /// 返回值类型 + /// 请求对象. + /// HTTP请求方法类型 + /// 返回值对象 + /// 异常 + public T Execute(Dictionary dictionary, Method method = Method.GET) where T : new() + { + var request = new RestRequest(method); + + foreach (var kv in dictionary.Where(d => !d.Value.IsNullOrWhiteSpace())) + { + request.AddParameter(kv.Key, kv.Value); + } + + return Execute(request); + } + +#if NET4 + /// + /// 执行请求. + /// + /// 请求对象. + /// HTTP请求方法类型. + /// 动态类型 + public RestResponse Execute(Dictionary dictionary, Method method = Method.GET) + { + + var request = new RestRequest(method); + + foreach (var kv in dictionary.Where(d => !string.IsNullOrWhiteSpace(d.Value))) + { + request.AddParameter(kv.Key, kv.Value); + } + + var sign = VerfyAc(request.Parameters); + + request.AddParameter("Signature", sign); + + return Client.ExecuteDynamic(request); + } +#endif + } +} \ No newline at end of file diff --git a/UCloudSDK.NetCore2/UCloudSDK.NetCore2.csproj b/UCloudSDK.NetCore2/UCloudSDK.NetCore2.csproj new file mode 100644 index 0000000..bdd0a4e --- /dev/null +++ b/UCloudSDK.NetCore2/UCloudSDK.NetCore2.csproj @@ -0,0 +1,13 @@ + + + + netcoreapp2.0 + UCloudSDK + + + + + + + + diff --git a/UCloudSDK.NetCore2/UDB.cs b/UCloudSDK.NetCore2/UDB.cs new file mode 100644 index 0000000..3ce794c --- /dev/null +++ b/UCloudSDK.NetCore2/UDB.cs @@ -0,0 +1,328 @@ +using RestSharp; +using UCloudSDK.Models; + +namespace UCloudSDK +{ + /// + /// 云数据库 + /// + public partial class UDB : UCloud + { + /// + /// 初始化 类. + /// + public UDB() + { + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + public UDB(string publicKey, string privateKey) + : base(publicKey, privateKey) + { + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + /// API请求地址. + public UDB(string publicKey, string privateKey, string baseUrl) + : base(publicKey, privateKey, baseUrl) + { + } + + /// + /// 备份udb实例 + /// + /// 请求参数. + /// 返回对象 + public BackupUDBInstanceResponse BackupUDBInstance(BackupUDBInstanceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 清除udb实例的log + /// + /// 请求参数. + /// 返回对象 + public ClearUDBLogResponse ClearUDBLog(ClearUDBLogRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 创建udb实例(包括mysql、mongodb实例和从备份恢复实例) + /// + /// 请求参数. + /// 返回对象 + public CreateUDBInstanceResponse CreateUDBInstance(CreateUDBInstanceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 从已有配置文件创建新配置文件 + /// + /// 请求参数. + /// 返回对象 + public CreateUDBParamGroupResponse CreateUDBParamGroup(CreateUDBParamGroupRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 创建mongodb的副本节点(包括仲裁) + /// + /// 请求参数. + /// 返回对象 + public CreateUDBReplicationInstanceResponse CreateUDBReplicationInstance(CreateUDBReplicationInstanceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 创建udb实例的slave + /// + /// 请求参数. + /// 返回对象 + public CreateUDBSlaveResponse CreateUDBSlave(CreateUDBSlaveRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 删除udb实例备份 + /// + /// 请求参数. + /// 返回对象 + public DeleteUDBBackupResponse DeleteUDBBackup(DeleteUDBBackupRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 删除udb实例 + /// + /// 请求参数. + /// 返回对象 + public DeleteUDBInstanceResponse DeleteUDBInstance(DeleteUDBInstanceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 删除配置参数组 + /// + /// 请求参数. + /// 返回对象 + public DeleteUDBParamGroupResponse DeleteUDBParamGroup(DeleteUDBParamGroupRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 列表udb实例备份信息 + /// + /// 请求参数. + /// 返回对象 + public DescribeUDBBackupResponse DescribeUDBBackup(DescribeUDBBackupRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取udb实例的备份黑名单 + /// + /// 请求参数. + /// 返回对象 + public DescribeUDBBackupBlacklistResponse DescribeUDBBackupBlacklist(DescribeUDBBackupBlacklistRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取udb实例信息 + /// + /// 请求参数. + /// 返回对象 + public DescribeUDBInstanceResponse DescribeUDBInstance(DescribeUDBInstanceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取udb实例价格信息 + /// + /// 请求参数. + /// 返回对象 + public DescribeUDBInstancePriceResponse DescribeUDBInstancePrice(DescribeUDBInstancePriceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取udb实例状态 + /// + /// 请求参数. + /// 返回对象 + public DescribeUDBInstanceStateResponse DescribeUDBInstanceState(DescribeUDBInstanceStateRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取参数组详细参数信息 + /// + /// 请求参数. + /// 返回对象 + public DescribeUDBParamGroupResponse DescribeUDBParamGroup(DescribeUDBParamGroupRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取udb支持的类型信息 + /// + /// 请求参数. + /// 返回对象 + public DescribeUDBTypeResponse DescribeUDBType(DescribeUDBTypeRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 编辑udb实例的备份黑名单 + /// + /// 请求参数. + /// 返回对象 + public EditUDBBackupBlacklistResponse EditUDBBackupBlacklist(EditUDBBackupBlacklistRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 重命名udb实例 + /// + /// 请求参数. + /// 返回对象 + public ModifyUDBInstanceNameResponse ModifyUDBInstanceName(ModifyUDBInstanceNameRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 从库提升为独立库 + /// + /// 请求参数. + /// 返回对象 + public PromoteUDBSlaveResponse PromoteUDBSlave(PromoteUDBSlaveRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 重启udb实例 + /// + /// 请求参数. + /// 返回对象 + public RestartUDBInstanceResponse RestartUDBInstance(RestartUDBInstanceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 启动udb实例 + /// + /// 请求参数. + /// 返回对象 + public StartUDBInstanceResponse StartUDBInstance(StartUDBInstanceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 关闭udb实例 + /// + /// 请求参数. + /// 返回对象 + public StopUDBInstanceResponse StopUDBInstance(StopUDBInstanceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 更新udb配置参数项 + /// + /// 请求参数. + /// 返回对象 + public UpdateUDBParamGroupResponse UpdateUDBParamGroup(UpdateUDBParamGroupRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 导入udb配置 + /// + /// 请求参数. + /// 返回对象 + public UploadUDBParamGroupResponse UploadUDBParamGroup(UploadUDBParamGroupRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + } +} \ No newline at end of file diff --git a/UCloudSDK.NetCore2/UDisk.cs b/UCloudSDK.NetCore2/UDisk.cs new file mode 100644 index 0000000..b144748 --- /dev/null +++ b/UCloudSDK.NetCore2/UDisk.cs @@ -0,0 +1,208 @@ +using RestSharp; +using UCloudSDK.Models; + +namespace UCloudSDK +{ + /// + /// 云硬盘 + /// + public partial class UDisk : UCloud + { + /// + /// 初始化 类. + /// + public UDisk() + { + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + public UDisk(string publicKey, string privateKey) + : base(publicKey, privateKey) + { + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + /// API请求地址. + public UDisk(string publicKey, string privateKey, string baseUrl) + : base(publicKey, privateKey, baseUrl) + { + } + + /// + /// 将一个可用的UDisk挂载到某台主机上,当UDisk挂载成功后,还需要在主机内部进行文件系统操作 + /// + /// 请求参数. + /// 返回对象 + public AttachUDiskResponse AttachUDisk(AttachUDiskRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 从UDisk创建UDisk克隆 + /// + /// 请求参数. + /// 返回对象 + public CloneUDiskResponse CloneUDisk(CloneUDiskRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 从快照创建UDisk克隆 + /// + /// 请求参数. + /// 返回对象 + public CloneUDiskSnapshotResponse CloneUDiskSnapshot(CloneUDiskSnapshotRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 创建UDisk磁盘 + /// + /// 请求参数. + /// 返回对象 + public CreateUDiskResponse CreateUDisk(CreateUDiskRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 创建snapshot快照 + /// + /// 请求参数. + /// 返回对象 + public CreateUDiskSnapshotResponse CreateUDiskSnapshot(CreateUDiskSnapshotRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 删除UDisk + /// + /// 请求参数. + /// 返回对象 + public DeleteUDiskResponse DeleteUDisk(DeleteUDiskRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 销毁Snapshot + /// + /// 请求参数. + /// 返回对象 + public DeleteUDiskSnapshotResponse DeleteUDiskSnapshot(DeleteUDiskSnapshotRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取UDisk实例 + /// + /// 请求参数. + /// 返回对象 + public DescribeUDiskResponse DescribeUDisk(DescribeUDiskRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取udisk实例价格信息 + /// + /// 请求参数. + /// 返回对象 + public DescribeUDiskPriceResponse DescribeUDiskPrice(DescribeUDiskPriceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取UDisk快照 + /// + /// 请求参数. + /// 返回对象 + public DescribeUDiskSnapshotResponse DescribeUDiskSnapshot(DescribeUDiskSnapshotRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取udisk升级价格信息 + /// + /// 请求参数. + /// 返回对象 + public DescribeUDiskUpgradePriceResponse DescribeUDiskUpgradePrice(DescribeUDiskUpgradePriceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 卸载某个已经挂载在指定UHost实例上的UDisk + /// + /// 请求参数. + /// 返回对象 + public DetachUDiskResponse DetachUDisk(DetachUDiskRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 重命名UDisk + /// + /// 请求参数. + /// 返回对象 + public RenameUDiskResponse RenameUDisk(RenameUDiskRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 调整UDisk容量 + /// + /// 请求参数. + /// 返回对象 + public ResizeUDiskResponse ResizeUDisk(ResizeUDiskRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + } +} \ No newline at end of file diff --git a/UCloudSDK.NetCore2/UFile.cs b/UCloudSDK.NetCore2/UFile.cs new file mode 100644 index 0000000..5ce409e --- /dev/null +++ b/UCloudSDK.NetCore2/UFile.cs @@ -0,0 +1,767 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Cache; +using System.Security.Cryptography; +using System.Security.Policy; +using System.Text; +using RestSharp; +using RestSharp.Extensions; +using UCloudSDK.Models; + +namespace UCloudSDK +{ + /// + /// 对象存储 + /// + public partial class UFile : UCloud + { + /// + /// 默认文件操作地址 + /// + private string _fileUrl = @"http://{0}.ufile.ucloud.cn"; + + /// + /// 文件操作地址. + /// + /// + /// http://{0}.ufile.ucloud.cn + /// + public string FileUrl + { + get { return _fileUrl; } + set { _fileUrl = value; } + } + + /// + /// Bucket. + /// + public string Bucket { get; set; } + + /// + /// 分片文件. + /// + public PartFile PartFile { get; set; } + + /// + /// 初始化 类. + /// + public UFile() + { + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + public UFile(string publicKey, string privateKey) + : base(publicKey, privateKey) + { + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + /// API请求地址. + public UFile(string publicKey, string privateKey, string baseUrl) + : base(publicKey, privateKey, baseUrl) + { + } + + /// + /// 放弃分片上传. + /// + /// 初始化分片上传的返回对象. + /// 返回对象 + public FileResponse AbortMultipartUpload(InitiateMultipartUploadResponse response) + { + return AbortMultipartUpload(response.Key, response.UploadId, response.Bucket); + } + + /// + /// 放弃分片上传. + /// + /// 返回对象 + public FileResponse AbortMultipartUpload() + { + return AbortMultipartUpload(PartFile.Key, PartFile.UploadId, PartFile.Bucket); + } + + /// + /// 放弃分片上传 + /// + /// Bucket中文件名. + /// 本次分片上传的上传Id. + /// Bucket. + /// 返回对象 + /// + public FileResponse AbortMultipartUpload(string key, string uploadId, string bucket = "") + { + PartFile = new PartFile(); + + if (bucket.IsNullOrWhiteSpace()) + { + bucket = Bucket; + } + + var url = string.Format(FileUrl, bucket); + Client.BaseUrl = new Uri(url); + var request = new RestRequest("{key}?uploadId={uploadId}", Method.DELETE); + + request.AddHeader("Authorization", SignRequest(request, bucket, key)); + request.AddUrlSegment("key", key); + request.AddUrlSegment("uploadId", uploadId); + + return FileExecute(request); + } + + /// + /// 创建Bucket + /// + /// 请求参数. + /// 返回对象 + public CreateBucketResponse CreateBucket(CreateBucketRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 删除Bucket + /// + /// 请求参数. + /// 返回对象 + public DeleteBucketResponse DeleteBucket(DeleteBucketRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 删除文件 + /// + /// 要获取的文件名. + /// Bucket. + /// 返回对象 + public DeleteFileResponse DeleteFile(string key, string bucket = "") + { + if (key.IsNullOrWhiteSpace()) + { + throw new Exception("文件名不能为空"); + } + + if (bucket.IsNullOrWhiteSpace()) + { + bucket = Bucket; + } + var url = string.Format(FileUrl, bucket) + "/" + key; + Client.BaseUrl = new Uri(url); + var request = new RestRequest(Method.DELETE); + + request.AddHeader("Authorization", SignRequest(request, bucket, key)); + + var response = Client.Execute(request); + Client.BaseUrl = new Uri(BaseUrl); + + if (response.StatusCode == HttpStatusCode.NoContent) + { + response.Data = new DeleteFileResponse(); + response.Data.RetCode = 0; + response.Data.ErrMsg = "Success"; + response.Data.ETag = response.Headers.GetHeader("ETag"); + } + else + { + if (response.ErrorException != null) + { + const string message = "响应错误,请检查."; + throw new ApplicationException(message, response.ErrorException); + } + response.Data.XSessionId = response.Headers.GetHeader("X-SessionId"); + response.Data.ContentType = response.Headers.GetHeader("Content-Type"); + response.Data.ContentRange = response.Headers.GetHeader("Content-Range"); + response.Data.ContentLength = Convert.ToInt32(response.Headers.GetHeader("Content-Length")); + } + return response.Data; + } + + /// + /// 获取Bucket的描述信息 + /// + /// 请求参数. + /// 返回对象 + public DescribeBucketResponse DescribeBucket(DescribeBucketRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 完成分片上传. + /// + /// 在Bucket中的新名称. + /// 返回对象 + public FinishMultipartUploadResponse FinishMultipartUpload(string newkey) + { + + var etags = ""; + foreach (var etag in PartFile.Etags) + { + etags += etag.Value + ","; + } + + return FinishMultipartUpload(newkey, etags, PartFile.Key, PartFile.UploadId, PartFile.Bucket); + } + + /// + /// 完成分片上传. + /// + /// 新名称. + /// 分片上传返回的ETAG列表. + /// 初始化分片上传的返回对象. + /// + public FinishMultipartUploadResponse FinishMultipartUpload(string newKey, string eTags, + InitiateMultipartUploadResponse response) + { + return FinishMultipartUpload(newKey, eTags, response.Key, response.UploadId, response.Bucket); + } + + /// + /// 完成分片上传 + /// + /// 新文件名. + /// 分片ETags使用,连接后的字符串. + /// 在Bucket中名称. + /// 本次分片上传的ID. + /// Bucket. + /// 返回对象 + /// + /// + public FinishMultipartUploadResponse FinishMultipartUpload(string newKey, string eTags, string key, string uploadId, string bucket = "") + { + PartFile = new PartFile(); + + if (bucket.IsNullOrWhiteSpace()) + { + bucket = Bucket; + } + + var url = string.Format(FileUrl, bucket); + Client.BaseUrl = new Uri(url); + var request = new RestRequest("{key}?uploadId={uploadId}&newKey={newKey}", Method.POST); + request.AddHeader("Authorization", SignRequest(request, bucket, key)); + request.AddUrlSegment("key", key); + request.AddUrlSegment("newKey", newKey); + request.AddUrlSegment("uploadId", uploadId); + + + request.AddParameter("", Encoding.Default.GetBytes(eTags), ParameterType.RequestBody); + + var response = Client.Execute(request); + Client.BaseUrl = new Uri(BaseUrl); + + if (response.StatusCode == HttpStatusCode.OK) + { + response.Data.RetCode = 0; + response.Data.ErrMsg = "Success"; + response.Data.ETag = response.Headers.GetHeader("ETag"); + } + else + { + if (response.ErrorException != null) + { + const string message = "响应错误,请检查."; + throw new ApplicationException(message, response.ErrorException); + } + response.Data.XSessionId = response.Headers.GetHeader("X-SessionId"); + response.Data.ContentType = response.Headers.GetHeader("Content-Type"); + response.Data.ContentLength = Convert.ToInt32(response.Headers.GetHeader("Content-Length")); + } + return response.Data; + } + + /// + /// 下载文件 + /// + /// 要获取的文件名. + /// 文件保存路径. + /// Bucket. + /// 返回对象 + /// 文件名不能为空 + public GetFileResponse GetFile(string key, string path = "", string bucket = "") + { + if (key.IsNullOrWhiteSpace()) + { + throw new Exception("文件名不能为空"); + } + if (path.IsNullOrWhiteSpace()) + { + path = key; + } + if (bucket.IsNullOrWhiteSpace()) + { + bucket = Bucket; + } + var url = string.Format(FileUrl, bucket) + "/" + key; + Client.BaseUrl = new Uri(url); + var request = new RestRequest(Method.GET); + + request.AddHeader("Authorization", SignRequest(request, bucket, key)); + + var response = Client.Execute(request); + Client.BaseUrl = new Uri(BaseUrl); + + if (response.StatusCode == HttpStatusCode.OK) + { + response.Data = new GetFileResponse(); + response.Data.RetCode = 0; + response.Data.ErrMsg = "Success"; + response.Data.ETag = response.Headers.GetHeader("ETag"); + try + { + response.RawBytes.SaveAs(path); + } + catch (Exception e) + { + + throw e; + } + } + else + { + if (response.ErrorException != null) + { + const string message = "响应错误,请检查."; + throw new ApplicationException(message, response.ErrorException); + } + response.Data.XSessionId = response.Headers.GetHeader("X-SessionId"); + response.Data.ContentType = response.Headers.GetHeader("Content-Type"); + response.Data.ContentRange = response.Headers.GetHeader("Content-Range"); + response.Data.ContentLength = Convert.ToInt32(response.Headers.GetHeader("Content-Length")); + } + return response.Data; + } + + /// + /// 获取Bucket的文件列表 + /// + /// 请求参数. + /// 返回对象 + public GetFileListResponse GetFileList(GetFileListRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 初始化分片上传 + /// + /// 上传至Bucket后的文件名. + /// 文件路径. + /// Bucket. + /// 返回对象 + /// + public InitiateMultipartUploadResponse InitiateMultipartUpload(string filePath, string key = "", string bucket = "") + { + if (!File.Exists(filePath)) + { + throw new Exception(string.Format("文件{0}不存在", filePath)); + } + + if (bucket.IsNullOrWhiteSpace()) + { + bucket = Bucket; + } + + if (key.IsNullOrWhiteSpace()) + { + key = Path.GetFileName(filePath); + } + + var url = string.Format(FileUrl, bucket); + Client.BaseUrl = new Uri(url); + var request = new RestRequest("{key}?uploads", Method.POST); + request.AddUrlSegment("key", key); + + request.AddHeader("Authorization", SignRequest(request, bucket, key)); + + var response = Client.Execute(request); + Client.BaseUrl = new Uri(BaseUrl); + + if (response.ErrorException != null) + { + const string message = "响应错误,请检查."; + throw new ApplicationException(message, response.ErrorException); + } + var entity = response.Data; + PartFile = new PartFile() + { + BlkSize = entity.BlkSize, + Bucket = entity.Bucket, + Key = entity.Key, + UploadId = entity.UploadId, + FilePath = filePath, + Etags = new SortedDictionary(), + IsLast = false, + PartNumber = 0 + }; + return entity; + } + + /// + /// 表单上传文件 + /// + /// 文件路径. + /// 上件后的文件名.默认为文件名称 + /// Bucket名称. + /// 文件MD5. + /// 返回对象 + /// + public FileResponse PostFile(string filePath, string key = "", string bucket = "", string md5 = "") + { + if (!File.Exists(filePath)) + { + throw new Exception(string.Format("文件{0}不存在", filePath)); + } + + if (bucket.IsNullOrWhiteSpace()) + { + bucket = Bucket; + } + + if (key.IsNullOrWhiteSpace()) + { + key = Path.GetFileName(filePath); + } + + var url = string.Format(FileUrl, bucket); + Client.BaseUrl = new Uri(url); + var request = new RestRequest(Method.POST); + + var mime = filePath.GetMimeType(); + request.AddHeader("Content-Type", mime); + + if (md5.IsNullOrWhiteSpace()) + { + md5 = filePath.GetMd5().ToLower(); + } + request.AddHeader("Content-MD5", md5); + request.AddParameter("FileName", key); + request.AddParameter("Content-Type", mime); + request.AddParameter("Authorization", SignRequest(request, bucket, key)); + + request.AddFile(key, filePath); + + return FileExecute(request); + } + + /// + /// 普通上传文件 + /// + /// 文件路径. + /// 上件后的文件名.默认为文件名称 + /// Bucket名称. + /// 文件MD5. + /// 返回对象 + /// + public FileResponse PutFile(string filePath, string key = "", string bucket = "", string md5 = "") + { + if (!File.Exists(filePath)) + { + throw new Exception(string.Format("文件{0}不存在", filePath)); + } + if (bucket.IsNullOrWhiteSpace()) + { + bucket = Bucket; + } + + if (key.IsNullOrWhiteSpace()) + { + key = Path.GetFileName(filePath); + } + + var url = string.Format(FileUrl, bucket) + (key == string.Empty ? "" : (@"/" + key)); + Client.BaseUrl = new Uri(url); + var request = new RestRequest(Method.PUT); + + + if (md5.IsNullOrWhiteSpace()) + { + md5 = filePath.GetMd5().ToLower(); + } + var mime = filePath.GetMimeType(); + request.AddHeader("Content-Type", mime); + request.AddHeader("Content-MD5", md5); + request.AddHeader("Authorization", SignRequest(request, bucket, key)); + + request.AddParameter(mime, File.ReadAllBytes(filePath), ParameterType.RequestBody); + + return FileExecute(request); + } + + /// + /// 设置Bucket的属性 + /// + /// 请求参数. + /// 返回对象 + public UpdateBucketResponse UpdateBucket(UpdateBucketRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 秒传 + /// + /// 文件位置. + /// Bucket中文件的名称. + /// Bucket. + /// 返回对象 + /// 文件名不能为空 + /// + public FileResponse UploadHit(string filePath, string key = "", string bucket = "") + { + if (!File.Exists(filePath)) + { + throw new Exception(string.Format("文件{0}不存在", filePath)); + } + + if (bucket.IsNullOrWhiteSpace()) + { + bucket = Bucket; + } + + if (key.IsNullOrWhiteSpace()) + { + key = Path.GetFileName(filePath); + } + + var url = string.Format(FileUrl, bucket); + Client.BaseUrl = new Uri(url); + var request = new RestRequest("uploadhit?Hash={Hash}&FileName={FileName}&FileSize={FileSize}", Method.POST); + + request.AddHeader("Authorization", SignRequest(request, bucket, key)); + request.AddUrlSegment("Hash", filePath.GetEtag()); + request.AddUrlSegment("FileName", key); + request.AddUrlSegment("FileSize", filePath.GetFileLength().ToString()); + + return FileExecute(request); + } + /// + /// 上传文件分片. + /// + /// 返回对象 + public UploadPartResponse UploadPart() + { + return UploadPart(PartFile.PartNumber); + } + /// + /// 上传文件分片. + /// + /// 分片号码. + /// 返回对象 + public UploadPartResponse UploadPart(int partNum) + { + return UploadPart(PartFile.FilePath, partNum, PartFile.BlkSize, PartFile.UploadId, PartFile.Key, + PartFile.Bucket); + } + + /// + /// 上传文件分片. + /// + /// 文件路径. + /// 分片编号. + /// 初始化分片上传的返回值. + /// 返回对象 + public UploadPartResponse UploadPart(string filePath, int part, InitiateMultipartUploadResponse response) + { + return UploadPart(filePath, part, response.BlkSize, response.UploadId, response.Key, response.Bucket); + } + + /// + /// 上传文件分片 + /// + /// 文件位置. + /// 分片序号. + /// 分片大小. + /// 分片上传ID. + /// 在Bucket中名称. + /// Bucket. + /// 返回对象 + /// + /// + public UploadPartResponse UploadPart(string filePath, int part, int blkSize, string uploadId, string key = "", string bucket = "") + { + if (PartFile.IsLast) + { + throw new Exception("所有分片已上传"); + } + + if (!File.Exists(filePath)) + { + throw new Exception(string.Format("文件{0}不存在", filePath)); + } + if (bucket.IsNullOrWhiteSpace()) + { + bucket = Bucket; + } + var url = string.Format(FileUrl, bucket); + Client.BaseUrl = new Uri(url); + var request = new RestRequest("{key}?uploadId={uploadId}&partNumber={partNumber}", Method.PUT); + + request.AddUrlSegment("key", key); + request.AddUrlSegment("uploadId", uploadId); + request.AddUrlSegment("partNumber", part.ToString()); + + if (PartFile.Mime.IsNullOrWhiteSpace()) + { + PartFile.Mime = filePath.GetMimeType(); + } + + request.AddHeader("Content-Type", PartFile.Mime); + + if (PartFile.Md5.IsNullOrWhiteSpace()) + { + PartFile.Md5 = filePath.GetMd5().ToLower(); + } + request.AddHeader("Content-MD5", PartFile.Md5); + + if (key.IsNullOrWhiteSpace()) + { + key = Path.GetFileName(filePath); + } + + if (PartFile.Auth.IsNullOrWhiteSpace()) + { + PartFile.Auth = SignRequest(request, bucket, key); + } + request.AddHeader("Authorization", PartFile.Auth); + + byte[] partBytes; + + using (var fs = File.OpenRead(filePath)) + { + var offset = part * blkSize; + var len = fs.Length - offset; + + if (len < blkSize) + { + PartFile.IsLast = true; + } + else + { + len = blkSize; + } + + partBytes = new byte[len]; + fs.Seek(offset, SeekOrigin.Begin); + var n = fs.Read(partBytes, 0, (int)len); + if (n == 0) + { + PartFile.IsLast = true; + } + } + + request.AddParameter(PartFile.Mime, partBytes, ParameterType.RequestBody); + + var response = Client.Execute(request); + Client.BaseUrl = new Uri(BaseUrl); + + if (response.StatusCode == HttpStatusCode.OK) + { + response.Data.RetCode = 0; + response.Data.ErrMsg = "Success"; + response.Data.ETag = response.Headers.GetHeader("ETag"); + PartFile.Etags.Add(response.Data.PartNumber, response.Data.ETag); + } + else + { + if (response.ErrorException != null) + { + const string message = "响应错误,请检查."; + throw new ApplicationException(message, response.ErrorException); + } + response.Data.XSessionId = response.Headers.GetHeader("X-SessionId"); + response.Data.ContentType = response.Headers.GetHeader("Content-Type"); + response.Data.ContentLength = Convert.ToInt32(response.Headers.GetHeader("Content-Length")); + } + return response.Data; + } + + /// + /// 执行Filer操作. + /// + /// The request. + /// 返回对象 + /// + private FileResponse FileExecute(IRestRequest request) + { + var response = Client.Execute(request); + Client.BaseUrl = new Uri(BaseUrl); + + if (response.StatusCode == HttpStatusCode.OK) + { + response.Data = new FileResponse(); + response.Data.RetCode = 0; + response.Data.ErrMsg = "Success"; + response.Data.ETag = response.Headers.GetHeader("ETag"); + } + else + { + if (response.ErrorException != null) + { + const string message = "响应错误,请检查."; + throw new ApplicationException(message, response.ErrorException); + } + response.Data.XSessionId = response.Headers.GetHeader("X-SessionId"); + response.Data.ContentType = response.Headers.GetHeader("Content-Type"); + response.Data.ContentRange = response.Headers.GetHeader("Content-Range"); + response.Data.ContentLength = Convert.ToInt32(response.Headers.GetHeader("Content-Length")); + } + return response.Data; + } + + /// + /// 对象存储UFile签名. + /// + /// The request. + /// Bucket. + /// Key. + /// 签名 + private string SignRequest(IRestRequest request, string bucket, string key) + { + string Authorization = string.Empty; + string StringToSign = string.Empty; + + + Authorization += "UCloud "; + Authorization += PublicKey; + Authorization += ":"; + StringToSign = request.Method + "\n" + request.Parameters.GetHeader("Content-MD5") + "\n"; + StringToSign += request.Parameters.GetHeader("Content-Type"); + StringToSign += "\n"; + /* + StringToSign += DateTime.Now.ToString (); + */ + StringToSign += "\n"; + StringToSign += request.Parameters.CanonicalizedUCloudHeaders(); + StringToSign += StringHelper.CanonicalizedResource(bucket, key); + + HMACSHA1 hmac = new HMACSHA1(Encoding.ASCII.GetBytes(PrivateKey)); + Byte[] hashValue = hmac.ComputeHash(Encoding.UTF8.GetBytes(StringToSign)); + string Signature = Convert.ToBase64String(hashValue); + return Authorization + Signature; + } + } +} \ No newline at end of file diff --git a/UCloudSDK.NetCore2/UHost.cs b/UCloudSDK.NetCore2/UHost.cs new file mode 100644 index 0000000..44a086a --- /dev/null +++ b/UCloudSDK.NetCore2/UHost.cs @@ -0,0 +1,295 @@ +using RestSharp; +using UCloudSDK.Models; + +namespace UCloudSDK +{ + /// + /// 云主机 + /// + public partial class UHost : UCloud + { + /// + /// 初始化 类. + /// + public UHost() + { + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + public UHost(string publicKey, string privateKey) + : base(publicKey, privateKey) + { + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + /// API请求地址. + public UHost(string publicKey, string privateKey, string baseUrl) + : base(publicKey, privateKey, baseUrl) + { + } + + /// + /// 将一个可用的UDisk挂载到某台主机上,当UDisk挂载成功后,还需要在主机内部进行文件系统操作。 + /// + /// 请求参数. + /// 返回对象 + public AttachUDiskResponse AttachUDisk(AttachUDiskRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 从指定UHost实例,生成自定义镜像。 + /// + /// 请求参数. + /// 返回对象 + public CreateCustomImageResponse CreateCustomImage(CreateCustomImageRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 指定数据中心,根据资源使用量创建指定数量的UHost实例。 + /// + /// 请求参数. + /// 返回对象 + public CreateUHostInstanceResponse CreateUHostInstance(CreateUHostInstanceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 对指定UHost实例制作数据快照。 + /// + /// 请求参数. + /// 返回对象 + public CreateUHostInstanceSnapshotResponse CreateUHostInstanceSnapshot( + CreateUHostInstanceSnapshotRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。 + /// + /// 请求参数. + /// 返回对象 + public DescribeImageResponse DescribeImage(DescribeImageRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取主机或主机列表信息,并可根据数据中心,主机ID等参数进行过滤。 + /// + /// 请求参数. + /// 返回对象 + public DescribeUHostInstanceResponse DescribeUHostInstance(DescribeUHostInstanceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取已经存在的UHost实例的存储快照列表。 + /// + /// 请求参数. + /// 返回对象 + public DescribeUHostInstanceSnapshotResponse DescribeUHostInstanceSnapshot( + DescribeUHostInstanceSnapshotRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 卸载某个已经挂载在指定UHost实例上的UDisk + /// + /// 请求参数. + /// 返回对象 + public DetachUDiskResponse DetachUDisk(DetachUDiskRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 根据UHost实例配置,获取UHost实例的价格。 + /// + /// 请求参数. + /// 返回对象 + public GetUHostInstancePriceResponse GetUHostInstancePrice(GetUHostInstancePriceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取指定UHost实例的管理VNC配置详细信息。 + /// + /// 请求参数. + /// 返回对象 + public GetUHostInstanceVncInfoResponse GetUHostInstanceVncInfo(GetUHostInstanceVncInfoRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 修改指定UHost实例名称,需要给出数据中心,UHostId,及新的实例名称。 + /// + /// 请求参数. + /// 返回对象 + public ModifyUHostInstanceNameResponse ModifyUHostInstanceName(ModifyUHostInstanceNameRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 修改指定UHost实例备注信息。 + /// + /// 请求参数. + /// 返回对象 + public ModifyUHostInstanceRemarkResponse ModifyUHostInstanceRemark( + ModifyUHostInstanceRemarkRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 修改指定UHost实例业务组标识。 + /// + /// 请求参数. + /// 返回对象 + public ModifyUHostInstanceTagResponse ModifyUHostInstanceTag(ModifyUHostInstanceTagRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 重新启动UHost实例,需要指定数据中心及UHostID两个参数的值。 + /// + /// 请求参数. + /// 返回对象 + public RebootUHostInstanceResponse RebootUHostInstance(RebootUHostInstanceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 重新安装指定UHost实例的操作系统 + /// + /// 请求参数. + /// 返回对象 + public ReinstallUHostInstanceResponse ReinstallUHostInstance(ReinstallUHostInstanceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 重置UHost实例的管理员密码。 + /// + /// 请求参数. + /// 返回对象 + public ResetUHostInstancePasswordResponse ResetUHostInstancePassword( + ResetUHostInstancePasswordRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 修改指定UHost实例的资源配置,如CPU核心数,内存容量大小,磁盘空间大小等。 + /// + /// 请求参数. + /// 返回对象 + public ResizeUHostInstanceResponse ResizeUHostInstance(ResizeUHostInstanceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 启动处于关闭状态的UHost实例,需要指定数据中心及UHostID两个参数的值。 + /// + /// 请求参数. + /// 返回对象 + public StartUHostInstanceResponse StartUHostInstance(StartUHostInstanceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 指停止处于运行状态的UHost实例,需指定数据中心及UhostID。 + /// + /// 请求参数. + /// 返回对象 + public StopUHostInstanceResponse StopUHostInstance(StopUHostInstanceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 删除用户自定义镜像 + /// + /// 请求参数. + /// 返回对象 + public TerminateCustomImageResponse TerminateCustomImage(TerminateCustomImageRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 删除指定数据中心的UHost实例。 + /// + /// 请求参数. + /// 返回对象 + public TerminateUHostInstanceResponse TerminateUHostInstance(TerminateUHostInstanceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + } +} \ No newline at end of file diff --git a/UCloudSDK.NetCore2/ULB.cs b/UCloudSDK.NetCore2/ULB.cs new file mode 100644 index 0000000..32e8259 --- /dev/null +++ b/UCloudSDK.NetCore2/ULB.cs @@ -0,0 +1,280 @@ +using RestSharp; +using UCloudSDK.Models; + +namespace UCloudSDK +{ + /// + /// 负载均衡 + /// + public partial class ULB : UCloud + { + /// + /// 初始化 类. + /// + public ULB() + { + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + public ULB(string publicKey, string privateKey) + : base(publicKey, privateKey) + { + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + /// API请求地址. + public ULB(string publicKey, string privateKey, string baseUrl) + : base(publicKey, privateKey, baseUrl) + { + } + + /// + /// 添加ULB后端资源实例 + /// + /// 请求参数. + /// 返回对象 + public AllocateBackendResponse AllocateBackend(AllocateBackendRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 将SSL证书绑定到VServer + /// + /// 请求参数. + /// 返回对象 + public BindSSLResponse BindSSL(BindSSLRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 创建内容转发策略 + /// + /// 请求参数. + /// 返回对象 + public CreatePolicyResponse CreatePolicy(CreatePolicyRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 创建内容转发策略组 + /// + /// 请求参数. + /// 返回对象 + public CreatePolicyGroupResponse CreatePolicyGroup(CreatePolicyGroupRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 添加SSL证书 + /// + /// 请求参数. + /// 返回对象 + public CreateSSLResponse CreateSSL(CreateSSLRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 创建负载均衡实例 + /// + /// 请求参数. + /// 返回对象 + public CreateULBResponse CreateULB(CreateULBRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 创建VServer实例 + /// + /// 请求参数. + /// 返回对象 + public CreateVServerResponse CreateVServer(CreateVServerRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 删除内容转发策略 + /// + /// 请求参数. + /// 返回对象 + public DeletePolicyResponse DeletePolicy(DeletePolicyRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 删除内容转发策略组 + /// + /// 请求参数. + /// 返回对象 + public DeletePolicyGroupResponse DeletePolicyGroup(DeletePolicyGroupRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 删除SSL证书 + /// + /// 请求参数. + /// 返回对象 + public DeleteSSLResponse DeleteSSL(DeleteSSLRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 删除负载均衡实例 + /// + /// 请求参数. + /// 返回对象 + public DeleteULBResponse DeleteULB(DeleteULBRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 删除VServer实例 + /// + /// 请求参数. + /// 返回对象 + public DeleteVServerResponse DeleteVServer(DeleteVServerRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 显示内容转发策略组详情 + /// + /// 请求参数. + /// 返回对象 + public DescribePolicyGroupResponse DescribePolicyGroup(DescribePolicyGroupRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 显示SSL证书信息 + /// + /// 请求参数. + /// 返回对象 + public DescribeSSLResponse DescribeSSL(DescribeSSLRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 显示负载均衡实例信息 + /// + /// 请求参数. + /// 返回对象 + public DescribeULBResponse DescribeULB(DescribeULBRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 释放ULB后端资源实例 + /// + /// 请求参数. + /// 返回对象 + public ReleaseBackendResponse ReleaseBackend(ReleaseBackendRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 修改ULB后端资源实例(主机池)属性 + /// + /// 请求参数. + /// 返回对象 + public UpdateBackendAttributeResponse UpdateBackendAttribute(UpdateBackendAttributeRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 修改内容转发策略组配置信息 + /// + /// 请求参数. + /// 返回对象 + public UpdatePolicyGroupAttributeResponse UpdatePolicyGroupAttribute(UpdatePolicyGroupAttributeRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 修改负载均衡实例属性 + /// + /// 请求参数. + /// 返回对象 + public UpdateULBAttributeResponse UpdateULBAttribute(UpdateULBAttributeRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 修改VServer实例属性 + /// + /// 请求参数. + /// 返回对象 + public UpdateVServerAttributeResponse UpdateVServerAttribute(UpdateVServerAttributeRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + } +} diff --git a/UCloudSDK.NetCore2/UMon.cs b/UCloudSDK.NetCore2/UMon.cs new file mode 100644 index 0000000..5bf3421 --- /dev/null +++ b/UCloudSDK.NetCore2/UMon.cs @@ -0,0 +1,52 @@ +using RestSharp; +using UCloudSDK.Models; + +namespace UCloudSDK +{ + /// + /// 云监控 + /// + public partial class UMon : UCloud + { + /// + /// 初始化 类. + /// + public UMon() + { + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + public UMon(string publicKey, string privateKey) + : base(publicKey, privateKey) + { + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + /// API请求地址. + public UMon(string publicKey, string privateKey, string baseUrl) + : base(publicKey, privateKey, baseUrl) + { + } + + /// + /// 获取监控数据 + /// + /// 请求参数. + /// 返回对象 + public GetMetricResponse GetMetric(GetMetricRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + } +} \ No newline at end of file diff --git a/UCloudSDK.NetCore2/UNet.cs b/UCloudSDK.NetCore2/UNet.cs new file mode 100644 index 0000000..7522cf1 --- /dev/null +++ b/UCloudSDK.NetCore2/UNet.cs @@ -0,0 +1,256 @@ +using RestSharp; +using UCloudSDK.Models; + +namespace UCloudSDK +{ + /// + /// 网络 + /// + public partial class UNet : UCloud + { + /// + /// 初始化 类. + /// + public UNet() + { + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + public UNet(string publicKey, string privateKey) + : base(publicKey, privateKey) + { + } + + /// + /// 初始化 类. + /// + /// 用户公钥. + /// 用户私钥. + /// API请求地址. + public UNet(string publicKey, string privateKey, string baseUrl) + : base(publicKey, privateKey, baseUrl) + { + } + + /// + /// 根据提供信息,分配弹性IP + /// + /// 请求参数. + /// 返回对象 + public AllocateEIPResponse AllocateEIP(AllocateEIPRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 根据提供信息,分配内网VIP(Virtual IP,多用于高可用程序作为漂移IP。) + /// + /// 请求参数. + /// 返回对象 + public AllocateVIPResponse AllocateVIP(AllocateVIPRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 将弹性IP绑定到资源上 + /// + /// 请求参数. + /// 返回对象 + public BindEIPResponse BindEIP(BindEIPRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 创建防火墙组 + /// + /// 请求参数. + /// 返回对象 + public CreateSecurityGroupResponse CreateSecurityGroup(CreateSecurityGroupRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 删除防火墙 + /// + /// 请求参数. + /// 返回对象 + public DeleteSecurityGroupResponse DeleteSecurityGroup(DeleteSecurityGroupRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取弹性IP详细信息 + /// + /// 请求参数. + /// 返回对象 + public DescribeEIPResponse DescribeEIP(DescribeEIPRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取防火墙组信息 + /// + /// 请求参数. + /// 返回对象 + public DescribeSecurityGroupResponse DescribeSecurityGroup(DescribeSecurityGroupRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取防火墙组所绑定资源的外网IP + /// + /// 请求参数. + /// 返回对象 + public DescribeSecurityGroupResourceResponse DescribeSecurityGroupResource(DescribeSecurityGroupResourceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取内网VIP详细信息 + /// + /// 请求参数. + /// 返回对象 + public DescribeVIPResponse DescribeVIP(DescribeVIPRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 获取弹性IP价格 + /// + /// 请求参数. + /// 返回对象 + public GetEIPPriceResponse GetEIPPrice(GetEIPPriceRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 将防火墙应用到资源上 + /// + /// 请求参数. + /// 返回对象 + public GrantSecurityGroupResponse GrantSecurityGroup(GrantSecurityGroupRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 修改弹性IP的外网带宽 + /// + /// 请求参数. + /// 返回对象 + public ModifyEIPBandwidthResponse ModifyEIPBandwidth(ModifyEIPBandwidthRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 修改弹性IP的外网出口权重 + /// + /// 请求参数. + /// 返回对象 + public ModifyEIPWeightResponse ModifyEIPWeight(ModifyEIPWeightRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 释放EIP资源 + /// + /// 请求参数. + /// 返回对象 + public ReleaseEIPResponse ReleaseEIP(ReleaseEIPRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 释放VIP资源 + /// + /// 请求参数. + /// 返回对象 + public ReleaseVIPResponse ReleaseVIP(ReleaseVIPRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 将弹性IP从资源上解绑 + /// + /// 请求参数. + /// 返回对象 + public UnBindEIPResponse UnBindEIP(UnBindEIPRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 修改EIP名字业务组备注等属性字段 + /// + /// 请求参数. + /// 返回对象 + public UpdateEIPAttributeResponse UpdateEIPAttribute(UpdateEIPAttributeRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + /// + /// 更新防火墙规则 + /// + /// 请求参数. + /// 返回对象 + public UpdateSecurityGroupResponse UpdateSecurityGroup(UpdateSecurityGroupRequest requestParams) + { + var request = new RestRequest(Method.GET); + request.AddUObject(requestParams); + return Execute(request); + } + + } +} \ No newline at end of file diff --git a/ucloud-csharp-sdk.sln b/ucloud-csharp-sdk.sln index ec5c088..9029367 100644 --- a/ucloud-csharp-sdk.sln +++ b/ucloud-csharp-sdk.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2019 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UCloudSDK", "UCloudSDK\UCloudSDK.csproj", "{BB3049AE-7687-4C98-A59C-70C77A525289}" EndProject @@ -15,6 +15,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UCloudSDK.Net451", "UCloudS EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UCloudSDK.Net452", "UCloudSDK.Net452\UCloudSDK.Net452.csproj", "{7520B35E-BF1D-4816-866D-0D508BD9DC86}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UCloudSDK.NetCore2", "UCloudSDK.NetCore2\UCloudSDK.NetCore2.csproj", "{5D0D5CA2-CDEA-4CAB-AA17-9881742B698D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -45,8 +47,15 @@ Global {7520B35E-BF1D-4816-866D-0D508BD9DC86}.Debug|Any CPU.Build.0 = Debug|Any CPU {7520B35E-BF1D-4816-866D-0D508BD9DC86}.Release|Any CPU.ActiveCfg = Release|Any CPU {7520B35E-BF1D-4816-866D-0D508BD9DC86}.Release|Any CPU.Build.0 = Release|Any CPU + {5D0D5CA2-CDEA-4CAB-AA17-9881742B698D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5D0D5CA2-CDEA-4CAB-AA17-9881742B698D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5D0D5CA2-CDEA-4CAB-AA17-9881742B698D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5D0D5CA2-CDEA-4CAB-AA17-9881742B698D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B20A4DFE-088C-4ABF-B42D-D85587183970} + EndGlobalSection EndGlobal From 7dda4d7be6fcb3a28b04f11d2832535acffe7891 Mon Sep 17 00:00:00 2001 From: sanjusss Date: Tue, 11 Sep 2018 19:19:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=8C=E6=88=90.net=20core=202.0?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=9A=84=E7=89=88=E6=9C=AC=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UCloudSDK.NetCore2/UCloudSDK.NetCore2.csproj | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/UCloudSDK.NetCore2/UCloudSDK.NetCore2.csproj b/UCloudSDK.NetCore2/UCloudSDK.NetCore2.csproj index bdd0a4e..afd9b64 100644 --- a/UCloudSDK.NetCore2/UCloudSDK.NetCore2.csproj +++ b/UCloudSDK.NetCore2/UCloudSDK.NetCore2.csproj @@ -3,6 +3,20 @@ netcoreapp2.0 UCloudSDK + icyflash + Copyright © UCloudSDK Project + 1.0.11.0 + UCloud API C# SDK + UCloud C# SDK是用于调用UCloud API的类库,适用于.Net Core 2.0及以上。 + +UCloud API: http://docs.ucloud.cn/api/index.html + https://raw.githubusercontent.com/icyflash/ucloud-csharp-sdk/master/License.txt + https://github.com/icyflash/ucloud-csharp-sdk + https://github.com/icyflash/ucloud-csharp-sdk + GIT + UCloud C# SDK是用于调用UCloud API的类库,适用于.Net Core 2.0及以上。 + +UCloud API: http://docs.ucloud.cn/api/index.html