From f54dda5041c102e36b800c457e5c1f2c4e2131c6 Mon Sep 17 00:00:00 2001 From: "lee.yongtak" Date: Tue, 10 Sep 2024 18:46:12 +0900 Subject: [PATCH 1/2] add vserver about server-image --- services/vserver/README.md | 16 +- services/vserver/api_client.go | 2 +- services/vserver/configuration.go | 2 +- services/vserver/docs/V2Api.md | 36 +- services/vserver/v2_api.go | 904 ++++++++++++++++++++++++++---- 5 files changed, 819 insertions(+), 141 deletions(-) diff --git a/services/vserver/README.md b/services/vserver/README.md index dd73b75..3a5677f 100644 --- a/services/vserver/README.md +++ b/services/vserver/README.md @@ -5,8 +5,8 @@ ## Overview This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. -- API version: 2024-08-29T15:17:28Z -- Package version: 1.0.5 +- API version: 2024-09-10T09:44:10Z +- Package version: 1.0.6 - Build package: io.swagger.codegen.languages.NcpGoForNcloudClientCodegen ## Installation @@ -130,6 +130,7 @@ Class | Method | HTTP request | Description - [AddPlacementGroupServerInstanceRequest](docs/AddPlacementGroupServerInstanceRequest.md) - [AddPlacementGroupServerInstanceResponse](docs/AddPlacementGroupServerInstanceResponse.md) - [AddServerImageSharingPermissionRequest](docs/AddServerImageSharingPermissionRequest.md) + - [AddServerImageSharingPermissionResponse](docs/AddServerImageSharingPermissionResponse.md) - [AssignSecondaryIpsRequest](docs/AssignSecondaryIpsRequest.md) - [AssignSecondaryIpsResponse](docs/AssignSecondaryIpsResponse.md) - [AssociatePublicIpWithServerInstanceRequest](docs/AssociatePublicIpWithServerInstanceRequest.md) @@ -141,6 +142,7 @@ Class | Method | HTTP request | Description - [BlockDevicePartition](docs/BlockDevicePartition.md) - [BlockStorage](docs/BlockStorage.md) - [BlockStorageInstance](docs/BlockStorageInstance.md) + - [BlockStorageMapping](docs/BlockStorageMapping.md) - [BlockStorageMappingParameter](docs/BlockStorageMappingParameter.md) - [BlockStorageSnapshotInstance](docs/BlockStorageSnapshotInstance.md) - [BlockStorageVolumeType](docs/BlockStorageVolumeType.md) @@ -170,7 +172,9 @@ Class | Method | HTTP request | Description - [CreatePublicIpInstanceRequest](docs/CreatePublicIpInstanceRequest.md) - [CreatePublicIpInstanceResponse](docs/CreatePublicIpInstanceResponse.md) - [CreateServerImageFromSnapshotRequest](docs/CreateServerImageFromSnapshotRequest.md) + - [CreateServerImageFromSnapshotResponse](docs/CreateServerImageFromSnapshotResponse.md) - [CreateServerImageRequest](docs/CreateServerImageRequest.md) + - [CreateServerImageResponse](docs/CreateServerImageResponse.md) - [CreateServerInstancesRequest](docs/CreateServerInstancesRequest.md) - [CreateServerInstancesResponse](docs/CreateServerInstancesResponse.md) - [DeleteAccessControlGroupRequest](docs/DeleteAccessControlGroupRequest.md) @@ -192,6 +196,7 @@ Class | Method | HTTP request | Description - [DeletePublicIpInstanceRequest](docs/DeletePublicIpInstanceRequest.md) - [DeletePublicIpInstanceResponse](docs/DeletePublicIpInstanceResponse.md) - [DeleteServerImageRequest](docs/DeleteServerImageRequest.md) + - [DeleteServerImageResponse](docs/DeleteServerImageResponse.md) - [DetachBlockStorageInstancesRequest](docs/DetachBlockStorageInstancesRequest.md) - [DetachBlockStorageInstancesResponse](docs/DetachBlockStorageInstancesResponse.md) - [DetachNetworkInterfaceRequest](docs/DetachNetworkInterfaceRequest.md) @@ -254,7 +259,9 @@ Class | Method | HTTP request | Description - [GetRootPasswordServerInstanceListRequest](docs/GetRootPasswordServerInstanceListRequest.md) - [GetRootPasswordServerInstanceListResponse](docs/GetRootPasswordServerInstanceListResponse.md) - [GetServerImageDetailRequest](docs/GetServerImageDetailRequest.md) + - [GetServerImageDetailResponse](docs/GetServerImageDetailResponse.md) - [GetServerImageListRequest](docs/GetServerImageListRequest.md) + - [GetServerImageListResponse](docs/GetServerImageListResponse.md) - [GetServerImageProductListRequest](docs/GetServerImageProductListRequest.md) - [GetServerImageProductListResponse](docs/GetServerImageProductListResponse.md) - [GetServerInstanceDetailRequest](docs/GetServerInstanceDetailRequest.md) @@ -264,7 +271,9 @@ Class | Method | HTTP request | Description - [GetServerProductListRequest](docs/GetServerProductListRequest.md) - [GetServerProductListResponse](docs/GetServerProductListResponse.md) - [GetServerSpecDetailRequest](docs/GetServerSpecDetailRequest.md) + - [GetServerSpecDetailResponse](docs/GetServerSpecDetailResponse.md) - [GetServerSpecListRequest](docs/GetServerSpecListRequest.md) + - [GetServerSpecListResponse](docs/GetServerSpecListResponse.md) - [GetZoneListRequest](docs/GetZoneListRequest.md) - [GetZoneListResponse](docs/GetZoneListResponse.md) - [ImportLoginKeyRequest](docs/ImportLoginKeyRequest.md) @@ -295,9 +304,12 @@ Class | Method | HTTP request | Description - [RemovePlacementGroupServerInstanceRequest](docs/RemovePlacementGroupServerInstanceRequest.md) - [RemovePlacementGroupServerInstanceResponse](docs/RemovePlacementGroupServerInstanceResponse.md) - [RemoveServerImageSharingPermissionRequest](docs/RemoveServerImageSharingPermissionRequest.md) + - [RemoveServerImageSharingPermissionResponse](docs/RemoveServerImageSharingPermissionResponse.md) - [RootPasswordServerInstance](docs/RootPasswordServerInstance.md) - [RootPasswordServerInstanceParameter](docs/RootPasswordServerInstanceParameter.md) + - [ServerImage](docs/ServerImage.md) - [ServerInstance](docs/ServerInstance.md) + - [ServerSpec](docs/ServerSpec.md) - [SetBlockStorageReturnProtectionRequest](docs/SetBlockStorageReturnProtectionRequest.md) - [SetBlockStorageReturnProtectionResponse](docs/SetBlockStorageReturnProtectionResponse.md) - [SetMemberServerImageSharingPermissionRequest](docs/SetMemberServerImageSharingPermissionRequest.md) diff --git a/services/vserver/api_client.go b/services/vserver/api_client.go index be23f7c..f80586c 100644 --- a/services/vserver/api_client.go +++ b/services/vserver/api_client.go @@ -36,7 +36,7 @@ var ( xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") ) -// APIClient manages communication with the vserver API v2024-08-29T15:17:28Z +// APIClient manages communication with the vserver API v2024-09-10T09:44:10Z // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *ncloud.Configuration diff --git a/services/vserver/configuration.go b/services/vserver/configuration.go index 848c464..5765373 100644 --- a/services/vserver/configuration.go +++ b/services/vserver/configuration.go @@ -27,7 +27,7 @@ func NewConfiguration(apiKeys ...*ncloud.APIKey) *ncloud.Configuration { cfg := &ncloud.Configuration{ BasePath: "https://ncloud.apigw.ntruss.com/vserver/v2", DefaultHeader: make(map[string]string), - UserAgent: "vserver/1.0.5/go", + UserAgent: "vserver/1.0.6/go", } if len(apiKeys) > 0 { cfg.APIKey = apiKeys[0] diff --git a/services/vserver/docs/V2Api.md b/services/vserver/docs/V2Api.md index 6c1a49e..63c269c 100644 --- a/services/vserver/docs/V2Api.md +++ b/services/vserver/docs/V2Api.md @@ -233,7 +233,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **AddServerImageSharingPermission** -> AddServerImageSharingPermission(addServerImageSharingPermissionRequest) +> AddServerImageSharingPermissionResponse AddServerImageSharingPermission(addServerImageSharingPermissionRequest) 서버이미지공유권한추가 @@ -246,7 +246,7 @@ Name | Type | Description | Notes ### Return type - (empty response body) +*[**AddServerImageSharingPermissionResponse**](AddServerImageSharingPermissionResponse.md) ### Authorization @@ -692,7 +692,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **CreateServerImage** -> CreateServerImage(createServerImageRequest) +> CreateServerImageResponse CreateServerImage(createServerImageRequest) createServerImage @@ -705,7 +705,7 @@ Name | Type | Description | Notes ### Return type - (empty response body) +*[**CreateServerImageResponse**](CreateServerImageResponse.md) ### Authorization @@ -719,7 +719,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **CreateServerImageFromSnapshot** -> CreateServerImageFromSnapshot(createServerImageFromSnapshotRequest) +> CreateServerImageFromSnapshotResponse CreateServerImageFromSnapshot(createServerImageFromSnapshotRequest) createServerImageFromSnapshot @@ -732,7 +732,7 @@ Name | Type | Description | Notes ### Return type - (empty response body) +*[**CreateServerImageFromSnapshotResponse**](CreateServerImageFromSnapshotResponse.md) ### Authorization @@ -1016,7 +1016,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **DeleteServerImage** -> DeleteServerImage(deleteServerImageRequest) +> DeleteServerImageResponse DeleteServerImage(deleteServerImageRequest) deleteServerImage @@ -1029,7 +1029,7 @@ Name | Type | Description | Notes ### Return type - (empty response body) +*[**DeleteServerImageResponse**](DeleteServerImageResponse.md) ### Authorization @@ -1880,7 +1880,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetServerImageDetail** -> GetServerImageDetail(getServerImageDetailRequest) +> GetServerImageDetailResponse GetServerImageDetail(getServerImageDetailRequest) 서버이미지상세조회 @@ -1893,7 +1893,7 @@ Name | Type | Description | Notes ### Return type - (empty response body) +*[**GetServerImageDetailResponse**](GetServerImageDetailResponse.md) ### Authorization @@ -1907,7 +1907,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetServerImageList** -> GetServerImageList(getServerImageListRequest) +> GetServerImageListResponse GetServerImageList(getServerImageListRequest) 서버이미지리스트조회 @@ -1920,7 +1920,7 @@ Name | Type | Description | Notes ### Return type - (empty response body) +*[**GetServerImageListResponse**](GetServerImageListResponse.md) ### Authorization @@ -2042,7 +2042,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetServerSpecDetail** -> GetServerSpecDetail(getServerSpecDetailRequest) +> GetServerSpecDetailResponse GetServerSpecDetail(getServerSpecDetailRequest) 서버스펙상세조회 @@ -2055,7 +2055,7 @@ Name | Type | Description | Notes ### Return type - (empty response body) +*[**GetServerSpecDetailResponse**](GetServerSpecDetailResponse.md) ### Authorization @@ -2069,7 +2069,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetServerSpecList** -> GetServerSpecList(getServerSpecListRequest) +> GetServerSpecListResponse GetServerSpecList(getServerSpecListRequest) 서버스펙리스트조회 @@ -2082,7 +2082,7 @@ Name | Type | Description | Notes ### Return type - (empty response body) +*[**GetServerSpecListResponse**](GetServerSpecListResponse.md) ### Authorization @@ -2339,7 +2339,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **RemoveServerImageSharingPermission** -> RemoveServerImageSharingPermission(removeServerImageSharingPermissionRequest) +> RemoveServerImageSharingPermissionResponse RemoveServerImageSharingPermission(removeServerImageSharingPermissionRequest) 서버이미지공유권한제거 @@ -2352,7 +2352,7 @@ Name | Type | Description | Notes ### Return type - (empty response body) +*[**RemoveServerImageSharingPermissionResponse**](RemoveServerImageSharingPermissionResponse.md) ### Authorization diff --git a/services/vserver/v2_api.go b/services/vserver/v2_api.go index 135b248..3404f21 100644 --- a/services/vserver/v2_api.go +++ b/services/vserver/v2_api.go @@ -28,7 +28,7 @@ var ( type V2ApiService service -/* V2ApiService +/* V2ApiService ACGInboundRule추가 @param addAccessControlGroupInboundRuleRequest addAccessControlGroupInboundRuleRequest @return *AddAccessControlGroupInboundRuleResponse*/ @@ -102,7 +102,7 @@ func (a *V2ApiService) AddAccessControlGroupInboundRule(addAccessControlGroupInb return &successPayload, err } -/* V2ApiService +/* V2ApiService ACGOutboundRule추가 @param addAccessControlGroupOutboundRuleRequest addAccessControlGroupOutboundRuleRequest @return *AddAccessControlGroupOutboundRuleResponse*/ @@ -176,7 +176,7 @@ func (a *V2ApiService) AddAccessControlGroupOutboundRule(addAccessControlGroupOu return &successPayload, err } -/* V2ApiService +/* V2ApiService 회원서버이미지공유권한추가 @param addMemberServerImageSharingPermissionRequest addMemberServerImageSharingPermissionRequest @return *AddMemberServerImageSharingPermissionResponse*/ @@ -250,7 +250,7 @@ func (a *V2ApiService) AddMemberServerImageSharingPermission(addMemberServerImag return &successPayload, err } -/* V2ApiService +/* V2ApiService 네트워크인터페이스의ACG추가 @param addNetworkInterfaceAccessControlGroupRequest addNetworkInterfaceAccessControlGroupRequest @return *AddNetworkInterfaceAccessControlGroupResponse*/ @@ -324,7 +324,7 @@ func (a *V2ApiService) AddNetworkInterfaceAccessControlGroup(addNetworkInterface return &successPayload, err } -/* V2ApiService +/* V2ApiService 물리배치그룹에서버인스턴스추가 @param addPlacementGroupServerInstanceRequest addPlacementGroupServerInstanceRequest @return *AddPlacementGroupServerInstanceResponse*/ @@ -398,7 +398,81 @@ func (a *V2ApiService) AddPlacementGroupServerInstance(addPlacementGroupServerIn return &successPayload, err } -/* V2ApiService +/* V2ApiService + 서버이미지공유권한추가 + @param addServerImageSharingPermissionRequest addServerImageSharingPermissionRequest + @return *AddServerImageSharingPermissionResponse*/ +func (a *V2ApiService) AddServerImageSharingPermission(addServerImageSharingPermissionRequest *AddServerImageSharingPermissionRequest) (*AddServerImageSharingPermissionResponse, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload AddServerImageSharingPermissionResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/addServerImageSharingPermission" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/x-www-form-urlencoded", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = addServerImageSharingPermissionRequest + v := reflect.ValueOf(localVarPostBody).Elem().FieldByName("UserData") + if v.IsValid() && v.CanAddr() { + ptr := v.Addr().Interface().(**string) + if *ptr != nil { + **ptr = base64.StdEncoding.EncodeToString([]byte(**ptr)) + } + } + r, err := a.client.prepareRequest(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return &successPayload, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return &successPayload, err + } + defer localVarHttpResponse.Body.Close() + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + + if localVarHttpResponse.StatusCode >= 300 || (localVarHttpResponse.StatusCode < 300 && !strings.HasPrefix(string(bodyBytes), `{`)) { + return &successPayload, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if !strings.Contains(string(bodyBytes), `{"error"`) && strings.HasPrefix(string(bodyBytes), `{`) { + if err = json.Unmarshal(bodyBytes[bytes.IndexAny(bytes.Trim(bodyBytes, "{"), "{"):len(bodyBytes)-1], &successPayload); err != nil { + return &successPayload, err + } + } + + + return &successPayload, err +} + +/* V2ApiService 보조IP할당 @param assignSecondaryIpsRequest assignSecondaryIpsRequest @return *AssignSecondaryIpsResponse*/ @@ -472,7 +546,7 @@ func (a *V2ApiService) AssignSecondaryIps(assignSecondaryIpsRequest *AssignSecon return &successPayload, err } -/* V2ApiService +/* V2ApiService 공인IP를서버인스턴스에할당 @param associatePublicIpWithServerInstanceRequest associatePublicIpWithServerInstanceRequest @return *AssociatePublicIpWithServerInstanceResponse*/ @@ -546,7 +620,7 @@ func (a *V2ApiService) AssociatePublicIpWithServerInstance(associatePublicIpWith return &successPayload, err } -/* V2ApiService +/* V2ApiService 블록스토리지인스턴스할당 @param attachBlockStorageInstanceRequest attachBlockStorageInstanceRequest @return *AttachBlockStorageInstanceResponse*/ @@ -620,7 +694,7 @@ func (a *V2ApiService) AttachBlockStorageInstance(attachBlockStorageInstanceRequ return &successPayload, err } -/* V2ApiService +/* V2ApiService 네트워크인터페이스할당 @param attachNetworkInterfaceRequest attachNetworkInterfaceRequest @return *AttachNetworkInterfaceResponse*/ @@ -694,7 +768,7 @@ func (a *V2ApiService) AttachNetworkInterface(attachNetworkInterfaceRequest *Att return &successPayload, err } -/* V2ApiService +/* V2ApiService 블록스토리지인스턴스변경 @param changeBlockStorageInstanceRequest changeBlockStorageInstanceRequest @return *ChangeBlockStorageInstanceResponse*/ @@ -768,7 +842,7 @@ func (a *V2ApiService) ChangeBlockStorageInstance(changeBlockStorageInstanceRequ return &successPayload, err } -/* V2ApiService +/* V2ApiService 블록스토리지볼륨사이즈변경 @param changeBlockStorageVolumeSizeRequest changeBlockStorageVolumeSizeRequest @return *ChangeBlockStorageVolumeSizeResponse*/ @@ -842,7 +916,7 @@ func (a *V2ApiService) ChangeBlockStorageVolumeSize(changeBlockStorageVolumeSize return &successPayload, err } -/* V2ApiService +/* V2ApiService 서버인스턴스스펙변경 @param changeServerInstanceSpecRequest changeServerInstanceSpecRequest @return *ChangeServerInstanceSpecResponse*/ @@ -916,7 +990,7 @@ func (a *V2ApiService) ChangeServerInstanceSpec(changeServerInstanceSpecRequest return &successPayload, err } -/* V2ApiService +/* V2ApiService ACG생성 @param createAccessControlGroupRequest createAccessControlGroupRequest @return *CreateAccessControlGroupResponse*/ @@ -990,7 +1064,7 @@ func (a *V2ApiService) CreateAccessControlGroup(createAccessControlGroupRequest return &successPayload, err } -/* V2ApiService +/* V2ApiService 블록스토리지인스턴스생성 @param createBlockStorageInstanceRequest createBlockStorageInstanceRequest @return *CreateBlockStorageInstanceResponse*/ @@ -1064,7 +1138,7 @@ func (a *V2ApiService) CreateBlockStorageInstance(createBlockStorageInstanceRequ return &successPayload, err } -/* V2ApiService +/* V2ApiService 블록스토리지스냅샷인스턴스생성 @param createBlockStorageSnapshotInstanceRequest createBlockStorageSnapshotInstanceRequest @return *CreateBlockStorageSnapshotInstanceResponse*/ @@ -1138,7 +1212,7 @@ func (a *V2ApiService) CreateBlockStorageSnapshotInstance(createBlockStorageSnap return &successPayload, err } -/* V2ApiService +/* V2ApiService 초기화스크립트생성 @param createInitScriptRequest createInitScriptRequest @return *CreateInitScriptResponse*/ @@ -1212,7 +1286,7 @@ func (a *V2ApiService) CreateInitScript(createInitScriptRequest *CreateInitScrip return &successPayload, err } -/* V2ApiService +/* V2ApiService 로그인키생성 @param createLoginKeyRequest createLoginKeyRequest @return *CreateLoginKeyResponse*/ @@ -1286,7 +1360,7 @@ func (a *V2ApiService) CreateLoginKey(createLoginKeyRequest *CreateLoginKeyReque return &successPayload, err } -/* V2ApiService +/* V2ApiService 회원서버이미지인스턴스생성 @param createMemberServerImageInstanceRequest createMemberServerImageInstanceRequest @return *CreateMemberServerImageInstanceResponse*/ @@ -1360,7 +1434,7 @@ func (a *V2ApiService) CreateMemberServerImageInstance(createMemberServerImageIn return &successPayload, err } -/* V2ApiService +/* V2ApiService 네트워크인터페이스생성 @param createNetworkInterfaceRequest createNetworkInterfaceRequest @return *CreateNetworkInterfaceResponse*/ @@ -1434,7 +1508,7 @@ func (a *V2ApiService) CreateNetworkInterface(createNetworkInterfaceRequest *Cre return &successPayload, err } -/* V2ApiService +/* V2ApiService 물리배치그룹생성 @param createPlacementGroupRequest createPlacementGroupRequest @return *CreatePlacementGroupResponse*/ @@ -1508,7 +1582,7 @@ func (a *V2ApiService) CreatePlacementGroup(createPlacementGroupRequest *CreateP return &successPayload, err } -/* V2ApiService +/* V2ApiService 공인IP인스턴스생성 @param createPublicIpInstanceRequest createPublicIpInstanceRequest @return *CreatePublicIpInstanceResponse*/ @@ -1582,7 +1656,155 @@ func (a *V2ApiService) CreatePublicIpInstance(createPublicIpInstanceRequest *Cre return &successPayload, err } -/* V2ApiService +/* V2ApiService + createServerImage + @param createServerImageRequest createServerImageRequest + @return *CreateServerImageResponse*/ +func (a *V2ApiService) CreateServerImage(createServerImageRequest *CreateServerImageRequest) (*CreateServerImageResponse, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload CreateServerImageResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/createServerImage" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/x-www-form-urlencoded", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = createServerImageRequest + v := reflect.ValueOf(localVarPostBody).Elem().FieldByName("UserData") + if v.IsValid() && v.CanAddr() { + ptr := v.Addr().Interface().(**string) + if *ptr != nil { + **ptr = base64.StdEncoding.EncodeToString([]byte(**ptr)) + } + } + r, err := a.client.prepareRequest(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return &successPayload, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return &successPayload, err + } + defer localVarHttpResponse.Body.Close() + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + + if localVarHttpResponse.StatusCode >= 300 || (localVarHttpResponse.StatusCode < 300 && !strings.HasPrefix(string(bodyBytes), `{`)) { + return &successPayload, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if !strings.Contains(string(bodyBytes), `{"error"`) && strings.HasPrefix(string(bodyBytes), `{`) { + if err = json.Unmarshal(bodyBytes[bytes.IndexAny(bytes.Trim(bodyBytes, "{"), "{"):len(bodyBytes)-1], &successPayload); err != nil { + return &successPayload, err + } + } + + + return &successPayload, err +} + +/* V2ApiService + createServerImageFromSnapshot + @param createServerImageFromSnapshotRequest createServerImageFromSnapshotRequest + @return *CreateServerImageFromSnapshotResponse*/ +func (a *V2ApiService) CreateServerImageFromSnapshot(createServerImageFromSnapshotRequest *CreateServerImageFromSnapshotRequest) (*CreateServerImageFromSnapshotResponse, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload CreateServerImageFromSnapshotResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/createServerImageFromSnapshot" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/x-www-form-urlencoded", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = createServerImageFromSnapshotRequest + v := reflect.ValueOf(localVarPostBody).Elem().FieldByName("UserData") + if v.IsValid() && v.CanAddr() { + ptr := v.Addr().Interface().(**string) + if *ptr != nil { + **ptr = base64.StdEncoding.EncodeToString([]byte(**ptr)) + } + } + r, err := a.client.prepareRequest(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return &successPayload, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return &successPayload, err + } + defer localVarHttpResponse.Body.Close() + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + + if localVarHttpResponse.StatusCode >= 300 || (localVarHttpResponse.StatusCode < 300 && !strings.HasPrefix(string(bodyBytes), `{`)) { + return &successPayload, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if !strings.Contains(string(bodyBytes), `{"error"`) && strings.HasPrefix(string(bodyBytes), `{`) { + if err = json.Unmarshal(bodyBytes[bytes.IndexAny(bytes.Trim(bodyBytes, "{"), "{"):len(bodyBytes)-1], &successPayload); err != nil { + return &successPayload, err + } + } + + + return &successPayload, err +} + +/* V2ApiService 서버인스턴스생성 @param createServerInstancesRequest createServerInstancesRequest @return *CreateServerInstancesResponse*/ @@ -1656,7 +1878,7 @@ func (a *V2ApiService) CreateServerInstances(createServerInstancesRequest *Creat return &successPayload, err } -/* V2ApiService +/* V2ApiService ACG삭제 @param deleteAccessControlGroupRequest deleteAccessControlGroupRequest @return *DeleteAccessControlGroupResponse*/ @@ -1730,7 +1952,7 @@ func (a *V2ApiService) DeleteAccessControlGroup(deleteAccessControlGroupRequest return &successPayload, err } -/* V2ApiService +/* V2ApiService 블록스토리지인스턴스삭제 @param deleteBlockStorageInstancesRequest deleteBlockStorageInstancesRequest @return *DeleteBlockStorageInstancesResponse*/ @@ -1804,7 +2026,7 @@ func (a *V2ApiService) DeleteBlockStorageInstances(deleteBlockStorageInstancesRe return &successPayload, err } -/* V2ApiService +/* V2ApiService 블록스토리지스냅샷인스턴스삭제 @param deleteBlockStorageSnapshotInstancesRequest deleteBlockStorageSnapshotInstancesRequest @return *DeleteBlockStorageSnapshotInstancesResponse*/ @@ -1878,7 +2100,7 @@ func (a *V2ApiService) DeleteBlockStorageSnapshotInstances(deleteBlockStorageSna return &successPayload, err } -/* V2ApiService +/* V2ApiService 초기화스크립트삭제 @param deleteInitScriptsRequest deleteInitScriptsRequest @return *DeleteInitScriptsResponse*/ @@ -1952,7 +2174,7 @@ func (a *V2ApiService) DeleteInitScripts(deleteInitScriptsRequest *DeleteInitScr return &successPayload, err } -/* V2ApiService +/* V2ApiService 로그인키삭제 @param deleteLoginKeysRequest deleteLoginKeysRequest @return *DeleteLoginKeysResponse*/ @@ -2026,7 +2248,7 @@ func (a *V2ApiService) DeleteLoginKeys(deleteLoginKeysRequest *DeleteLoginKeysRe return &successPayload, err } -/* V2ApiService +/* V2ApiService 회원서버이미지인스턴스삭제 @param deleteMemberServerImageInstancesRequest deleteMemberServerImageInstancesRequest @return *DeleteMemberServerImageInstancesResponse*/ @@ -2100,7 +2322,7 @@ func (a *V2ApiService) DeleteMemberServerImageInstances(deleteMemberServerImageI return &successPayload, err } -/* V2ApiService +/* V2ApiService 네트워크인터페이스삭제 @param deleteNetworkInterfaceRequest deleteNetworkInterfaceRequest @return *DeleteNetworkInterfaceResponse*/ @@ -2174,7 +2396,7 @@ func (a *V2ApiService) DeleteNetworkInterface(deleteNetworkInterfaceRequest *Del return &successPayload, err } -/* V2ApiService +/* V2ApiService 물리배치그룹삭제 @param deletePlacementGroupRequest deletePlacementGroupRequest @return *DeletePlacementGroupResponse*/ @@ -2248,7 +2470,7 @@ func (a *V2ApiService) DeletePlacementGroup(deletePlacementGroupRequest *DeleteP return &successPayload, err } -/* V2ApiService +/* V2ApiService 공인IP인스턴스삭제 @param deletePublicIpInstanceRequest deletePublicIpInstanceRequest @return *DeletePublicIpInstanceResponse*/ @@ -2322,21 +2544,21 @@ func (a *V2ApiService) DeletePublicIpInstance(deletePublicIpInstanceRequest *Del return &successPayload, err } -/* V2ApiService - 블록스토리지인스턴스할당해제 - @param detachBlockStorageInstancesRequest detachBlockStorageInstancesRequest - @return *DetachBlockStorageInstancesResponse*/ -func (a *V2ApiService) DetachBlockStorageInstances(detachBlockStorageInstancesRequest *DetachBlockStorageInstancesRequest) (*DetachBlockStorageInstancesResponse, error) { +/* V2ApiService + deleteServerImage + @param deleteServerImageRequest deleteServerImageRequest + @return *DeleteServerImageResponse*/ +func (a *V2ApiService) DeleteServerImage(deleteServerImageRequest *DeleteServerImageRequest) (*DeleteServerImageResponse, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - successPayload DetachBlockStorageInstancesResponse + successPayload DeleteServerImageResponse ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/detachBlockStorageInstances" + localVarPath := a.client.cfg.BasePath + "/deleteServerImage" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2362,7 +2584,7 @@ func (a *V2ApiService) DetachBlockStorageInstances(detachBlockStorageInstancesRe localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = detachBlockStorageInstancesRequest + localVarPostBody = deleteServerImageRequest v := reflect.ValueOf(localVarPostBody).Elem().FieldByName("UserData") if v.IsValid() && v.CanAddr() { ptr := v.Addr().Interface().(**string) @@ -2396,21 +2618,21 @@ func (a *V2ApiService) DetachBlockStorageInstances(detachBlockStorageInstancesRe return &successPayload, err } -/* V2ApiService - 네트워크인터페이스할당해제 - @param detachNetworkInterfaceRequest detachNetworkInterfaceRequest - @return *DetachNetworkInterfaceResponse*/ -func (a *V2ApiService) DetachNetworkInterface(detachNetworkInterfaceRequest *DetachNetworkInterfaceRequest) (*DetachNetworkInterfaceResponse, error) { +/* V2ApiService + 블록스토리지인스턴스할당해제 + @param detachBlockStorageInstancesRequest detachBlockStorageInstancesRequest + @return *DetachBlockStorageInstancesResponse*/ +func (a *V2ApiService) DetachBlockStorageInstances(detachBlockStorageInstancesRequest *DetachBlockStorageInstancesRequest) (*DetachBlockStorageInstancesResponse, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - successPayload DetachNetworkInterfaceResponse + successPayload DetachBlockStorageInstancesResponse ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/detachNetworkInterface" + localVarPath := a.client.cfg.BasePath + "/detachBlockStorageInstances" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2436,7 +2658,7 @@ func (a *V2ApiService) DetachNetworkInterface(detachNetworkInterfaceRequest *Det localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = detachNetworkInterfaceRequest + localVarPostBody = detachBlockStorageInstancesRequest v := reflect.ValueOf(localVarPostBody).Elem().FieldByName("UserData") if v.IsValid() && v.CanAddr() { ptr := v.Addr().Interface().(**string) @@ -2470,21 +2692,21 @@ func (a *V2ApiService) DetachNetworkInterface(detachNetworkInterfaceRequest *Det return &successPayload, err } -/* V2ApiService - FlowLog비활성화 - @param disableFlowLogRequest disableFlowLogRequest - @return *FlowLogConfigurationList*/ -func (a *V2ApiService) DisableFlowLog(disableFlowLogRequest *DisableFlowLogRequest) (*FlowLogConfigurationList, error) { +/* V2ApiService + 네트워크인터페이스할당해제 + @param detachNetworkInterfaceRequest detachNetworkInterfaceRequest + @return *DetachNetworkInterfaceResponse*/ +func (a *V2ApiService) DetachNetworkInterface(detachNetworkInterfaceRequest *DetachNetworkInterfaceRequest) (*DetachNetworkInterfaceResponse, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - successPayload FlowLogConfigurationList + successPayload DetachNetworkInterfaceResponse ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/disableFlowLog" + localVarPath := a.client.cfg.BasePath + "/detachNetworkInterface" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2510,7 +2732,7 @@ func (a *V2ApiService) DisableFlowLog(disableFlowLogRequest *DisableFlowLogReque localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = disableFlowLogRequest + localVarPostBody = detachNetworkInterfaceRequest v := reflect.ValueOf(localVarPostBody).Elem().FieldByName("UserData") if v.IsValid() && v.CanAddr() { ptr := v.Addr().Interface().(**string) @@ -2544,21 +2766,21 @@ func (a *V2ApiService) DisableFlowLog(disableFlowLogRequest *DisableFlowLogReque return &successPayload, err } -/* V2ApiService - 공인IP를서버인스턴스에서할당해제 - @param disassociatePublicIpFromServerInstanceRequest disassociatePublicIpFromServerInstanceRequest - @return *DisassociatePublicIpFromServerInstanceResponse*/ -func (a *V2ApiService) DisassociatePublicIpFromServerInstance(disassociatePublicIpFromServerInstanceRequest *DisassociatePublicIpFromServerInstanceRequest) (*DisassociatePublicIpFromServerInstanceResponse, error) { +/* V2ApiService + FlowLog비활성화 + @param disableFlowLogRequest disableFlowLogRequest + @return *FlowLogConfigurationList*/ +func (a *V2ApiService) DisableFlowLog(disableFlowLogRequest *DisableFlowLogRequest) (*FlowLogConfigurationList, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - successPayload DisassociatePublicIpFromServerInstanceResponse + successPayload FlowLogConfigurationList ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/disassociatePublicIpFromServerInstance" + localVarPath := a.client.cfg.BasePath + "/disableFlowLog" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2584,7 +2806,7 @@ func (a *V2ApiService) DisassociatePublicIpFromServerInstance(disassociatePublic localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = disassociatePublicIpFromServerInstanceRequest + localVarPostBody = disableFlowLogRequest v := reflect.ValueOf(localVarPostBody).Elem().FieldByName("UserData") if v.IsValid() && v.CanAddr() { ptr := v.Addr().Interface().(**string) @@ -2618,17 +2840,91 @@ func (a *V2ApiService) DisassociatePublicIpFromServerInstance(disassociatePublic return &successPayload, err } -/* V2ApiService - FlowLog활성화 - @param enableFlowLogRequest enableFlowLogRequest - @return *FlowLogConfigurationList*/ -func (a *V2ApiService) EnableFlowLog(enableFlowLogRequest *EnableFlowLogRequest) (*FlowLogConfigurationList, error) { +/* V2ApiService + 공인IP를서버인스턴스에서할당해제 + @param disassociatePublicIpFromServerInstanceRequest disassociatePublicIpFromServerInstanceRequest + @return *DisassociatePublicIpFromServerInstanceResponse*/ +func (a *V2ApiService) DisassociatePublicIpFromServerInstance(disassociatePublicIpFromServerInstanceRequest *DisassociatePublicIpFromServerInstanceRequest) (*DisassociatePublicIpFromServerInstanceResponse, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - successPayload FlowLogConfigurationList + successPayload DisassociatePublicIpFromServerInstanceResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/disassociatePublicIpFromServerInstance" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/x-www-form-urlencoded", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = disassociatePublicIpFromServerInstanceRequest + v := reflect.ValueOf(localVarPostBody).Elem().FieldByName("UserData") + if v.IsValid() && v.CanAddr() { + ptr := v.Addr().Interface().(**string) + if *ptr != nil { + **ptr = base64.StdEncoding.EncodeToString([]byte(**ptr)) + } + } + r, err := a.client.prepareRequest(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return &successPayload, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return &successPayload, err + } + defer localVarHttpResponse.Body.Close() + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + + if localVarHttpResponse.StatusCode >= 300 || (localVarHttpResponse.StatusCode < 300 && !strings.HasPrefix(string(bodyBytes), `{`)) { + return &successPayload, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if !strings.Contains(string(bodyBytes), `{"error"`) && strings.HasPrefix(string(bodyBytes), `{`) { + if err = json.Unmarshal(bodyBytes[bytes.IndexAny(bytes.Trim(bodyBytes, "{"), "{"):len(bodyBytes)-1], &successPayload); err != nil { + return &successPayload, err + } + } + + + return &successPayload, err +} + +/* V2ApiService + FlowLog활성화 + @param enableFlowLogRequest enableFlowLogRequest + @return *FlowLogConfigurationList*/ +func (a *V2ApiService) EnableFlowLog(enableFlowLogRequest *EnableFlowLogRequest) (*FlowLogConfigurationList, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload FlowLogConfigurationList ) // create path and map variables @@ -2692,7 +2988,7 @@ func (a *V2ApiService) EnableFlowLog(enableFlowLogRequest *EnableFlowLogRequest) return &successPayload, err } -/* V2ApiService +/* V2ApiService ACG상세조회 @param getAccessControlGroupDetailRequest getAccessControlGroupDetailRequest @return *GetAccessControlGroupDetailResponse*/ @@ -2766,7 +3062,7 @@ func (a *V2ApiService) GetAccessControlGroupDetail(getAccessControlGroupDetailRe return &successPayload, err } -/* V2ApiService +/* V2ApiService ACG리스트조회 @param getAccessControlGroupListRequest getAccessControlGroupListRequest @return *GetAccessControlGroupListResponse*/ @@ -2840,7 +3136,7 @@ func (a *V2ApiService) GetAccessControlGroupList(getAccessControlGroupListReques return &successPayload, err } -/* V2ApiService +/* V2ApiService ACGRule리스트조회 @param getAccessControlGroupRuleListRequest getAccessControlGroupRuleListRequest @return *GetAccessControlGroupRuleListResponse*/ @@ -2914,7 +3210,7 @@ func (a *V2ApiService) GetAccessControlGroupRuleList(getAccessControlGroupRuleLi return &successPayload, err } -/* V2ApiService +/* V2ApiService 블록스토리지인스턴스상세조회 @param getBlockStorageInstanceDetailRequest getBlockStorageInstanceDetailRequest @return *GetBlockStorageInstanceDetailResponse*/ @@ -2988,7 +3284,7 @@ func (a *V2ApiService) GetBlockStorageInstanceDetail(getBlockStorageInstanceDeta return &successPayload, err } -/* V2ApiService +/* V2ApiService 블록스토리지인스턴스리스트조회 @param getBlockStorageInstanceListRequest getBlockStorageInstanceListRequest @return *GetBlockStorageInstanceListResponse*/ @@ -3062,7 +3358,7 @@ func (a *V2ApiService) GetBlockStorageInstanceList(getBlockStorageInstanceListRe return &successPayload, err } -/* V2ApiService +/* V2ApiService 블록스토리지스냅샷인스턴스상세조회 @param getBlockStorageSnapshotInstanceDetailRequest getBlockStorageSnapshotInstanceDetailRequest @return *GetBlockStorageSnapshotInstanceDetailResponse*/ @@ -3136,7 +3432,7 @@ func (a *V2ApiService) GetBlockStorageSnapshotInstanceDetail(getBlockStorageSnap return &successPayload, err } -/* V2ApiService +/* V2ApiService 블록스토리지스냅샷인스턴스리스트조회 @param getBlockStorageSnapshotInstanceListRequest getBlockStorageSnapshotInstanceListRequest @return *GetBlockStorageSnapshotInstanceListResponse*/ @@ -3210,9 +3506,9 @@ func (a *V2ApiService) GetBlockStorageSnapshotInstanceList(getBlockStorageSnapsh return &successPayload, err } -/* V2ApiService +/* V2ApiService 블록스토리지볼륨타입리스트 조회 - @param getBlockStorageVolumeTypeListRequest + @param getBlockStorageVolumeTypeListRequest @return *GetBlockStorageVolumeTypeListResponse*/ func (a *V2ApiService) GetBlockStorageVolumeTypeList(getBlockStorageVolumeTypeListRequest *GetBlockStorageVolumeTypeListRequest) (*GetBlockStorageVolumeTypeListResponse, error) { var ( @@ -3284,7 +3580,7 @@ func (a *V2ApiService) GetBlockStorageVolumeTypeList(getBlockStorageVolumeTypeLi return &successPayload, err } -/* V2ApiService +/* V2ApiService FlogLog 설정정보 조회 @param getflowLogConfigurationListRequest getflowLogConfigurationListRequest @return *FlowLogConfigurationList*/ @@ -3358,9 +3654,9 @@ func (a *V2ApiService) GetFlowLogConfigurationList(getflowLogConfigurationListRe return &successPayload, err } -/* V2ApiService +/* V2ApiService 하이퍼바이저타입리스트조회 - @param getHypervisorTypeListRequest + @param getHypervisorTypeListRequest @return *GetHypervisorTypeListResponse*/ func (a *V2ApiService) GetHypervisorTypeList(getHypervisorTypeListRequest *GetHypervisorTypeListRequest) (*GetHypervisorTypeListResponse, error) { var ( @@ -3432,7 +3728,7 @@ func (a *V2ApiService) GetHypervisorTypeList(getHypervisorTypeListRequest *GetHy return &successPayload, err } -/* V2ApiService +/* V2ApiService 초기화스크립트상세조회 @param getInitScriptDetailRequest getInitScriptDetailRequest @return *GetInitScriptDetailResponse*/ @@ -3506,7 +3802,7 @@ func (a *V2ApiService) GetInitScriptDetail(getInitScriptDetailRequest *GetInitSc return &successPayload, err } -/* V2ApiService +/* V2ApiService 초기화스크립트리스트조회 @param getInitScriptListRequest getInitScriptListRequest @return *GetInitScriptListResponse*/ @@ -3580,7 +3876,7 @@ func (a *V2ApiService) GetInitScriptList(getInitScriptListRequest *GetInitScript return &successPayload, err } -/* V2ApiService +/* V2ApiService 로그인키리스트조회 @param getLoginKeyListRequest getLoginKeyListRequest @return *GetLoginKeyListResponse*/ @@ -3654,7 +3950,7 @@ func (a *V2ApiService) GetLoginKeyList(getLoginKeyListRequest *GetLoginKeyListRe return &successPayload, err } -/* V2ApiService +/* V2ApiService 회원서버이미지인스턴스상세조회 @param getMemberServerImageInstanceDetailRequest getMemberServerImageInstanceDetailRequest @return *GetMemberServerImageInstanceDetailResponse*/ @@ -3728,7 +4024,7 @@ func (a *V2ApiService) GetMemberServerImageInstanceDetail(getMemberServerImageIn return &successPayload, err } -/* V2ApiService +/* V2ApiService 회원서버이미지인스턴스리스트조회 @param getMemberServerImageInstanceListRequest getMemberServerImageInstanceListRequest @return *GetMemberServerImageInstanceListResponse*/ @@ -3802,7 +4098,7 @@ func (a *V2ApiService) GetMemberServerImageInstanceList(getMemberServerImageInst return &successPayload, err } -/* V2ApiService +/* V2ApiService 네트워크인터페이스상세조회 @param getNetworkInterfaceDetailRequest getNetworkInterfaceDetailRequest @return *GetNetworkInterfaceDetailResponse*/ @@ -3876,7 +4172,7 @@ func (a *V2ApiService) GetNetworkInterfaceDetail(getNetworkInterfaceDetailReques return &successPayload, err } -/* V2ApiService +/* V2ApiService 네트워크인터페이스리스트조회 @param getNetworkInterfaceListRequest getNetworkInterfaceListRequest @return *GetNetworkInterfaceListResponse*/ @@ -3950,7 +4246,7 @@ func (a *V2ApiService) GetNetworkInterfaceList(getNetworkInterfaceListRequest *G return &successPayload, err } -/* V2ApiService +/* V2ApiService 물리배치그룹상세조회 @param getPlacementGroupDetailRequest getPlacementGroupDetailRequest @return *GetPlacementGroupDetailResponse*/ @@ -4024,7 +4320,7 @@ func (a *V2ApiService) GetPlacementGroupDetail(getPlacementGroupDetailRequest *G return &successPayload, err } -/* V2ApiService +/* V2ApiService 물리배치그룹리스트조회 @param getPlacementGroupListRequest getPlacementGroupListRequest @return *GetPlacementGroupListResponse*/ @@ -4098,7 +4394,7 @@ func (a *V2ApiService) GetPlacementGroupList(getPlacementGroupListRequest *GetPl return &successPayload, err } -/* V2ApiService +/* V2ApiService 공인IP인스턴스상세조회 @param getPublicIpInstanceDetailRequest getPublicIpInstanceDetailRequest @return *GetPublicIpInstanceDetailResponse*/ @@ -4172,7 +4468,7 @@ func (a *V2ApiService) GetPublicIpInstanceDetail(getPublicIpInstanceDetailReques return &successPayload, err } -/* V2ApiService +/* V2ApiService 공인IP인스턴스리스트조회 @param getPublicIpInstanceListRequest getPublicIpInstanceListRequest @return *GetPublicIpInstanceListResponse*/ @@ -4246,7 +4542,7 @@ func (a *V2ApiService) GetPublicIpInstanceList(getPublicIpInstanceListRequest *G return &successPayload, err } -/* V2ApiService +/* V2ApiService 공인IP할당가능서버인스턴스리스트조회 @param getPublicIpTargetServerInstanceListRequest getPublicIpTargetServerInstanceListRequest @return *GetPublicIpTargetServerInstanceListResponse*/ @@ -4320,7 +4616,7 @@ func (a *V2ApiService) GetPublicIpTargetServerInstanceList(getPublicIpTargetServ return &successPayload, err } -/* V2ApiService +/* V2ApiService RAID리스트조회 @param getRaidListRequest getRaidListRequest @return *GetRaidListResponse*/ @@ -4394,7 +4690,7 @@ func (a *V2ApiService) GetRaidList(getRaidListRequest *GetRaidListRequest) (*Get return &successPayload, err } -/* V2ApiService +/* V2ApiService REGION리스트조회 @param getRegionListRequest getRegionListRequest @return *GetRegionListResponse*/ @@ -4468,7 +4764,7 @@ func (a *V2ApiService) GetRegionList(getRegionListRequest *GetRegionListRequest) return &successPayload, err } -/* V2ApiService +/* V2ApiService 서버인스턴스의루트패스워드조회 @param getRootPasswordRequest getRootPasswordRequest @return *GetRootPasswordResponse*/ @@ -4542,7 +4838,7 @@ func (a *V2ApiService) GetRootPassword(getRootPasswordRequest *GetRootPasswordRe return &successPayload, err } -/* V2ApiService +/* V2ApiService 서버인스턴스리스트의루트패스워드조회 @param getRootPasswordServerInstanceListRequest getRootPasswordServerInstanceListRequest @return *GetRootPasswordServerInstanceListResponse*/ @@ -4616,7 +4912,155 @@ func (a *V2ApiService) GetRootPasswordServerInstanceList(getRootPasswordServerIn return &successPayload, err } -/* V2ApiService +/* V2ApiService + 서버이미지상세조회 + @param getServerImageDetailRequest + @return *GetServerImageDetailResponse*/ +func (a *V2ApiService) GetServerImageDetail(getServerImageDetailRequest *GetServerImageDetailRequest) (*GetServerImageDetailResponse, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload GetServerImageDetailResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/getServerImageDetail" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/x-www-form-urlencoded", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = getServerImageDetailRequest + v := reflect.ValueOf(localVarPostBody).Elem().FieldByName("UserData") + if v.IsValid() && v.CanAddr() { + ptr := v.Addr().Interface().(**string) + if *ptr != nil { + **ptr = base64.StdEncoding.EncodeToString([]byte(**ptr)) + } + } + r, err := a.client.prepareRequest(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return &successPayload, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return &successPayload, err + } + defer localVarHttpResponse.Body.Close() + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + + if localVarHttpResponse.StatusCode >= 300 || (localVarHttpResponse.StatusCode < 300 && !strings.HasPrefix(string(bodyBytes), `{`)) { + return &successPayload, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if !strings.Contains(string(bodyBytes), `{"error"`) && strings.HasPrefix(string(bodyBytes), `{`) { + if err = json.Unmarshal(bodyBytes[bytes.IndexAny(bytes.Trim(bodyBytes, "{"), "{"):len(bodyBytes)-1], &successPayload); err != nil { + return &successPayload, err + } + } + + + return &successPayload, err +} + +/* V2ApiService + 서버이미지리스트조회 + @param getServerImageListRequest + @return *GetServerImageListResponse*/ +func (a *V2ApiService) GetServerImageList(getServerImageListRequest *GetServerImageListRequest) (*GetServerImageListResponse, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload GetServerImageListResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/getServerImageList" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/x-www-form-urlencoded", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = getServerImageListRequest + v := reflect.ValueOf(localVarPostBody).Elem().FieldByName("UserData") + if v.IsValid() && v.CanAddr() { + ptr := v.Addr().Interface().(**string) + if *ptr != nil { + **ptr = base64.StdEncoding.EncodeToString([]byte(**ptr)) + } + } + r, err := a.client.prepareRequest(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return &successPayload, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return &successPayload, err + } + defer localVarHttpResponse.Body.Close() + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + + if localVarHttpResponse.StatusCode >= 300 || (localVarHttpResponse.StatusCode < 300 && !strings.HasPrefix(string(bodyBytes), `{`)) { + return &successPayload, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if !strings.Contains(string(bodyBytes), `{"error"`) && strings.HasPrefix(string(bodyBytes), `{`) { + if err = json.Unmarshal(bodyBytes[bytes.IndexAny(bytes.Trim(bodyBytes, "{"), "{"):len(bodyBytes)-1], &successPayload); err != nil { + return &successPayload, err + } + } + + + return &successPayload, err +} + +/* V2ApiService 서버이미지상품리스트조회 @param getServerImageProductListRequest getServerImageProductListRequest @return *GetServerImageProductListResponse*/ @@ -4690,7 +5134,7 @@ func (a *V2ApiService) GetServerImageProductList(getServerImageProductListReques return &successPayload, err } -/* V2ApiService +/* V2ApiService 서버인스턴스상세조회 @param getServerInstanceDetailRequest getServerInstanceDetailRequest @return *GetServerInstanceDetailResponse*/ @@ -4764,7 +5208,7 @@ func (a *V2ApiService) GetServerInstanceDetail(getServerInstanceDetailRequest *G return &successPayload, err } -/* V2ApiService +/* V2ApiService 서버인스턴스리스트조회 @param getServerInstanceListRequest getServerInstanceListRequest @return *GetServerInstanceListResponse*/ @@ -4838,7 +5282,7 @@ func (a *V2ApiService) GetServerInstanceList(getServerInstanceListRequest *GetSe return &successPayload, err } -/* V2ApiService +/* V2ApiService 서버상품리스트조회 @param getServerProductListRequest getServerProductListRequest @return *GetServerProductListResponse*/ @@ -4912,7 +5356,155 @@ func (a *V2ApiService) GetServerProductList(getServerProductListRequest *GetServ return &successPayload, err } -/* V2ApiService +/* V2ApiService + 서버스펙상세조회 + @param getServerSpecDetailRequest + @return *GetServerSpecDetailResponse*/ +func (a *V2ApiService) GetServerSpecDetail(getServerSpecDetailRequest *GetServerSpecDetailRequest) (*GetServerSpecDetailResponse, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload GetServerSpecDetailResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/getServerSpecDetail" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/x-www-form-urlencoded", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = getServerSpecDetailRequest + v := reflect.ValueOf(localVarPostBody).Elem().FieldByName("UserData") + if v.IsValid() && v.CanAddr() { + ptr := v.Addr().Interface().(**string) + if *ptr != nil { + **ptr = base64.StdEncoding.EncodeToString([]byte(**ptr)) + } + } + r, err := a.client.prepareRequest(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return &successPayload, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return &successPayload, err + } + defer localVarHttpResponse.Body.Close() + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + + if localVarHttpResponse.StatusCode >= 300 || (localVarHttpResponse.StatusCode < 300 && !strings.HasPrefix(string(bodyBytes), `{`)) { + return &successPayload, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if !strings.Contains(string(bodyBytes), `{"error"`) && strings.HasPrefix(string(bodyBytes), `{`) { + if err = json.Unmarshal(bodyBytes[bytes.IndexAny(bytes.Trim(bodyBytes, "{"), "{"):len(bodyBytes)-1], &successPayload); err != nil { + return &successPayload, err + } + } + + + return &successPayload, err +} + +/* V2ApiService + 서버스펙리스트조회 + @param getServerSpecListRequest + @return *GetServerSpecListResponse*/ +func (a *V2ApiService) GetServerSpecList(getServerSpecListRequest *GetServerSpecListRequest) (*GetServerSpecListResponse, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload GetServerSpecListResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/getServerSpecList" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/x-www-form-urlencoded", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = getServerSpecListRequest + v := reflect.ValueOf(localVarPostBody).Elem().FieldByName("UserData") + if v.IsValid() && v.CanAddr() { + ptr := v.Addr().Interface().(**string) + if *ptr != nil { + **ptr = base64.StdEncoding.EncodeToString([]byte(**ptr)) + } + } + r, err := a.client.prepareRequest(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return &successPayload, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return &successPayload, err + } + defer localVarHttpResponse.Body.Close() + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + + if localVarHttpResponse.StatusCode >= 300 || (localVarHttpResponse.StatusCode < 300 && !strings.HasPrefix(string(bodyBytes), `{`)) { + return &successPayload, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if !strings.Contains(string(bodyBytes), `{"error"`) && strings.HasPrefix(string(bodyBytes), `{`) { + if err = json.Unmarshal(bodyBytes[bytes.IndexAny(bytes.Trim(bodyBytes, "{"), "{"):len(bodyBytes)-1], &successPayload); err != nil { + return &successPayload, err + } + } + + + return &successPayload, err +} + +/* V2ApiService ZONE리스트조회 @param getZoneListRequest getZoneListRequest @return *GetZoneListResponse*/ @@ -4986,7 +5578,7 @@ func (a *V2ApiService) GetZoneList(getZoneListRequest *GetZoneListRequest) (*Get return &successPayload, err } -/* V2ApiService +/* V2ApiService 사용자가생성한로그인키import @param importLoginKeyRequest importLoginKeyRequest @return *ImportLoginKeyResponse*/ @@ -5060,9 +5652,9 @@ func (a *V2ApiService) ImportLoginKey(importLoginKeyRequest *ImportLoginKeyReque return &successPayload, err } -/* V2ApiService - - @param interruptServerInstanceRequest +/* V2ApiService + + @param interruptServerInstanceRequest @return *InterruptServerInstanceResponse*/ func (a *V2ApiService) InterruptServerInstance(interruptServerInstanceRequest *InterruptServerInstanceRequest) (*InterruptServerInstanceResponse, error) { var ( @@ -5134,7 +5726,7 @@ func (a *V2ApiService) InterruptServerInstance(interruptServerInstanceRequest *I return &successPayload, err } -/* V2ApiService +/* V2ApiService 서버인스턴스재시작 @param rebootServerInstancesRequest rebootServerInstancesRequest @return *RebootServerInstancesResponse*/ @@ -5208,7 +5800,7 @@ func (a *V2ApiService) RebootServerInstances(rebootServerInstancesRequest *Reboo return &successPayload, err } -/* V2ApiService +/* V2ApiService ACGInboundRule삭제 @param removeAccessControlGroupInboundRuleRequest removeAccessControlGroupInboundRuleRequest @return *RemoveAccessControlGroupInboundRuleResponse*/ @@ -5282,7 +5874,7 @@ func (a *V2ApiService) RemoveAccessControlGroupInboundRule(removeAccessControlGr return &successPayload, err } -/* V2ApiService +/* V2ApiService ACGOutboundRule삭제 @param removeAccessControlGroupOutboundRuleRequest removeAccessControlGroupOutboundRuleRequest @return *RemoveAccessControlGroupOutboundRuleResponse*/ @@ -5356,7 +5948,7 @@ func (a *V2ApiService) RemoveAccessControlGroupOutboundRule(removeAccessControlG return &successPayload, err } -/* V2ApiService +/* V2ApiService 회원서버이미지공유권한제거 @param removeMemberServerImageSharingPermissionRequest removeMemberServerImageSharingPermissionRequest @return *RemoveMemberServerImageSharingPermissionResponse*/ @@ -5430,7 +6022,7 @@ func (a *V2ApiService) RemoveMemberServerImageSharingPermission(removeMemberServ return &successPayload, err } -/* V2ApiService +/* V2ApiService 네트워크인터페이스의ACG제거 @param removeNetworkInterfaceAccessControlGroupRequest removeNetworkInterfaceAccessControlGroupRequest @return *RemoveNetworkInterfaceAccessControlGroupResponse*/ @@ -5504,7 +6096,7 @@ func (a *V2ApiService) RemoveNetworkInterfaceAccessControlGroup(removeNetworkInt return &successPayload, err } -/* V2ApiService +/* V2ApiService 물리배치그룹에서서버인스턴스제거 @param removePlacementGroupServerInstanceRequest removePlacementGroupServerInstanceRequest @return *RemovePlacementGroupServerInstanceResponse*/ @@ -5578,7 +6170,81 @@ func (a *V2ApiService) RemovePlacementGroupServerInstance(removePlacementGroupSe return &successPayload, err } -/* V2ApiService +/* V2ApiService + 서버이미지공유권한제거 + @param removeServerImageSharingPermissionRequest removeServerImageSharingPermissionRequest + @return *RemoveServerImageSharingPermissionResponse*/ +func (a *V2ApiService) RemoveServerImageSharingPermission(removeServerImageSharingPermissionRequest *RemoveServerImageSharingPermissionRequest) (*RemoveServerImageSharingPermissionResponse, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload RemoveServerImageSharingPermissionResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/removeServerImageSharingPermission" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = removeServerImageSharingPermissionRequest + v := reflect.ValueOf(localVarPostBody).Elem().FieldByName("UserData") + if v.IsValid() && v.CanAddr() { + ptr := v.Addr().Interface().(**string) + if *ptr != nil { + **ptr = base64.StdEncoding.EncodeToString([]byte(**ptr)) + } + } + r, err := a.client.prepareRequest(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return &successPayload, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return &successPayload, err + } + defer localVarHttpResponse.Body.Close() + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + + if localVarHttpResponse.StatusCode >= 300 || (localVarHttpResponse.StatusCode < 300 && !strings.HasPrefix(string(bodyBytes), `{`)) { + return &successPayload, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if !strings.Contains(string(bodyBytes), `{"error"`) && strings.HasPrefix(string(bodyBytes), `{`) { + if err = json.Unmarshal(bodyBytes[bytes.IndexAny(bytes.Trim(bodyBytes, "{"), "{"):len(bodyBytes)-1], &successPayload); err != nil { + return &successPayload, err + } + } + + + return &successPayload, err +} + +/* V2ApiService 블록스토리지반납보호설정 @param setBlockStorageReturnProtectionRequest setBlockStorageReturnProtectionRequest @return *SetBlockStorageReturnProtectionResponse*/ @@ -5652,7 +6318,7 @@ func (a *V2ApiService) SetBlockStorageReturnProtection(setBlockStorageReturnProt return &successPayload, err } -/* V2ApiService +/* V2ApiService 회원서버이미지공유권한설정 @param setMemberServerImageSharingPermissionRequest setMemberServerImageSharingPermissionRequest @return *SetMemberServerImageSharingPermissionResponse*/ @@ -5726,7 +6392,7 @@ func (a *V2ApiService) SetMemberServerImageSharingPermission(setMemberServerImag return &successPayload, err } -/* V2ApiService +/* V2ApiService 서버반납보호설정 @param setProtectServerTerminationRequest setProtectServerTerminationRequest @return *SetProtectServerTerminationResponse*/ @@ -5800,7 +6466,7 @@ func (a *V2ApiService) SetProtectServerTermination(setProtectServerTerminationRe return &successPayload, err } -/* V2ApiService +/* V2ApiService 서버인스턴스시작 @param startServerInstancesRequest startServerInstancesRequest @return *StartServerInstancesResponse*/ @@ -5874,7 +6540,7 @@ func (a *V2ApiService) StartServerInstances(startServerInstancesRequest *StartSe return &successPayload, err } -/* V2ApiService +/* V2ApiService 서버인스턴스정지 @param stopServerInstancesRequest stopServerInstancesRequest @return *StopServerInstancesResponse*/ @@ -5948,7 +6614,7 @@ func (a *V2ApiService) StopServerInstances(stopServerInstancesRequest *StopServe return &successPayload, err } -/* V2ApiService +/* V2ApiService 서버인스턴스반납 @param terminateServerInstancesRequest terminateServerInstancesRequest @return *TerminateServerInstancesResponse*/ @@ -6022,7 +6688,7 @@ func (a *V2ApiService) TerminateServerInstances(terminateServerInstancesRequest return &successPayload, err } -/* V2ApiService +/* V2ApiService 보조IP할당해제 @param unassignSecondaryIpsRequest unassignSecondaryIpsRequest @return *UnassignSecondaryIpsResponse*/ From 82a66292c71c4df003640d007001dc44aed0ede9 Mon Sep 17 00:00:00 2001 From: "lee.yongtak" Date: Tue, 10 Sep 2024 18:46:20 +0900 Subject: [PATCH 2/2] add vserver about server-image --- ...erver_image_sharing_permission_response.go | 22 +++++++ services/vserver/block_storage_mapping.go | 39 ++++++++++++ ...ate_server_image_from_snapshot_response.go | 22 +++++++ .../vserver/create_server_image_response.go | 22 +++++++ .../vserver/delete_server_image_response.go | 22 +++++++ ...AddServerImageSharingPermissionResponse.md | 14 +++++ services/vserver/docs/BlockStorageMapping.md | 18 ++++++ .../CreateServerImageFromSnapshotResponse.md | 14 +++++ .../vserver/docs/CreateServerImageResponse.md | 14 +++++ .../vserver/docs/DeleteServerImageResponse.md | 14 +++++ .../docs/GetServerImageDetailResponse.md | 14 +++++ .../docs/GetServerImageListResponse.md | 14 +++++ .../docs/GetServerSpecDetailResponse.md | 14 +++++ .../vserver/docs/GetServerSpecListResponse.md | 14 +++++ ...oveServerImageSharingPermissionResponse.md | 14 +++++ services/vserver/docs/ServerImage.md | 25 ++++++++ services/vserver/docs/ServerSpec.md | 23 +++++++ .../get_server_image_detail_response.go | 22 +++++++ .../vserver/get_server_image_list_response.go | 22 +++++++ .../get_server_spec_detail_response.go | 22 +++++++ .../vserver/get_server_spec_list_response.go | 22 +++++++ ...erver_image_sharing_permission_response.go | 22 +++++++ services/vserver/server_image.go | 60 +++++++++++++++++++ services/vserver/server_spec.go | 54 +++++++++++++++++ 24 files changed, 543 insertions(+) create mode 100644 services/vserver/add_server_image_sharing_permission_response.go create mode 100644 services/vserver/block_storage_mapping.go create mode 100644 services/vserver/create_server_image_from_snapshot_response.go create mode 100644 services/vserver/create_server_image_response.go create mode 100644 services/vserver/delete_server_image_response.go create mode 100644 services/vserver/docs/AddServerImageSharingPermissionResponse.md create mode 100644 services/vserver/docs/BlockStorageMapping.md create mode 100644 services/vserver/docs/CreateServerImageFromSnapshotResponse.md create mode 100644 services/vserver/docs/CreateServerImageResponse.md create mode 100644 services/vserver/docs/DeleteServerImageResponse.md create mode 100644 services/vserver/docs/GetServerImageDetailResponse.md create mode 100644 services/vserver/docs/GetServerImageListResponse.md create mode 100644 services/vserver/docs/GetServerSpecDetailResponse.md create mode 100644 services/vserver/docs/GetServerSpecListResponse.md create mode 100644 services/vserver/docs/RemoveServerImageSharingPermissionResponse.md create mode 100644 services/vserver/docs/ServerImage.md create mode 100644 services/vserver/docs/ServerSpec.md create mode 100644 services/vserver/get_server_image_detail_response.go create mode 100644 services/vserver/get_server_image_list_response.go create mode 100644 services/vserver/get_server_spec_detail_response.go create mode 100644 services/vserver/get_server_spec_list_response.go create mode 100644 services/vserver/remove_server_image_sharing_permission_response.go create mode 100644 services/vserver/server_image.go create mode 100644 services/vserver/server_spec.go diff --git a/services/vserver/add_server_image_sharing_permission_response.go b/services/vserver/add_server_image_sharing_permission_response.go new file mode 100644 index 0000000..10c3fcf --- /dev/null +++ b/services/vserver/add_server_image_sharing_permission_response.go @@ -0,0 +1,22 @@ +/* + * vserver + * + * VPC Compute 관련 API
https://ncloud.apigw.ntruss.com/vserver/v2 + * + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type AddServerImageSharingPermissionResponse struct { + +RequestId *string `json:"requestId,omitempty"` + +ReturnCode *string `json:"returnCode,omitempty"` + +ReturnMessage *string `json:"returnMessage,omitempty"` + +TotalRows *int32 `json:"totalRows,omitempty"` + +ServerImageList []*ServerImage `json:"serverImageList,omitempty"` +} diff --git a/services/vserver/block_storage_mapping.go b/services/vserver/block_storage_mapping.go new file mode 100644 index 0000000..1122446 --- /dev/null +++ b/services/vserver/block_storage_mapping.go @@ -0,0 +1,39 @@ +/* + * vserver + * + * VPC Compute 관련 API
https://ncloud.apigw.ntruss.com/vserver/v2 + * + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type BlockStorageMapping struct { + + // 블록스토리지순서 +Order *int32 `json:"order,omitempty"` + + // 블록스토리지스냅샷인스턴스번호 +BlockStorageSnapshotInstanceNo *string `json:"blockStorageSnapshotInstanceNo,omitempty"` + + // 블록스토리지스냅샷이름 +BlockStorageSnapshotName *string `json:"blockStorageSnapshotName,omitempty"` + + // 블록스토리지사이즈 +BlockStorageSize *float32 `json:"blockStorageSize,omitempty"` + + // 블록스토리지이름 +BlockStorageName *string `json:"blockStorageName,omitempty"` + + // 블록스토리지볼륨유형 +BlockStorageVolumeType *CommonCode `json:"blockStorageVolumeType,omitempty"` + + // IOPS +Iops *float32 `json:"iops,omitempty"` + + // 부하처리성능 +Throughput *float32 `json:"throughput,omitempty"` + + // 볼륨암호화여부 +IsEncryptedVolume *bool `json:"isEncryptedVolume,omitempty"` +} diff --git a/services/vserver/create_server_image_from_snapshot_response.go b/services/vserver/create_server_image_from_snapshot_response.go new file mode 100644 index 0000000..fc92ada --- /dev/null +++ b/services/vserver/create_server_image_from_snapshot_response.go @@ -0,0 +1,22 @@ +/* + * vserver + * + * VPC Compute 관련 API
https://ncloud.apigw.ntruss.com/vserver/v2 + * + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type CreateServerImageFromSnapshotResponse struct { + +RequestId *string `json:"requestId,omitempty"` + +ReturnCode *string `json:"returnCode,omitempty"` + +ReturnMessage *string `json:"returnMessage,omitempty"` + +TotalRows *int32 `json:"totalRows,omitempty"` + +ServerImageList []*ServerImage `json:"serverImageList,omitempty"` +} diff --git a/services/vserver/create_server_image_response.go b/services/vserver/create_server_image_response.go new file mode 100644 index 0000000..f4d872b --- /dev/null +++ b/services/vserver/create_server_image_response.go @@ -0,0 +1,22 @@ +/* + * vserver + * + * VPC Compute 관련 API
https://ncloud.apigw.ntruss.com/vserver/v2 + * + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type CreateServerImageResponse struct { + +RequestId *string `json:"requestId,omitempty"` + +ReturnCode *string `json:"returnCode,omitempty"` + +ReturnMessage *string `json:"returnMessage,omitempty"` + +TotalRows *int32 `json:"totalRows,omitempty"` + +ServerImageList []*ServerImage `json:"serverImageList,omitempty"` +} diff --git a/services/vserver/delete_server_image_response.go b/services/vserver/delete_server_image_response.go new file mode 100644 index 0000000..034343a --- /dev/null +++ b/services/vserver/delete_server_image_response.go @@ -0,0 +1,22 @@ +/* + * vserver + * + * VPC Compute 관련 API
https://ncloud.apigw.ntruss.com/vserver/v2 + * + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DeleteServerImageResponse struct { + +RequestId *string `json:"requestId,omitempty"` + +ReturnCode *string `json:"returnCode,omitempty"` + +ReturnMessage *string `json:"returnMessage,omitempty"` + +TotalRows *int32 `json:"totalRows,omitempty"` + +ServerImageList []*ServerImage `json:"serverImageList,omitempty"` +} diff --git a/services/vserver/docs/AddServerImageSharingPermissionResponse.md b/services/vserver/docs/AddServerImageSharingPermissionResponse.md new file mode 100644 index 0000000..ef40095 --- /dev/null +++ b/services/vserver/docs/AddServerImageSharingPermissionResponse.md @@ -0,0 +1,14 @@ +# AddServerImageSharingPermissionResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestId** | ***string** | | [optional] [default to null] +**ReturnCode** | ***string** | | [optional] [default to null] +**ReturnMessage** | ***string** | | [optional] [default to null] +**TotalRows** | ***int32** | | [optional] [default to null] +**ServerImageList** | **[[]\*ServerImage](ServerImage.md)** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/services/vserver/docs/BlockStorageMapping.md b/services/vserver/docs/BlockStorageMapping.md new file mode 100644 index 0000000..165abec --- /dev/null +++ b/services/vserver/docs/BlockStorageMapping.md @@ -0,0 +1,18 @@ +# BlockStorageMapping + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Order** | ***int32** | 블록스토리지순서 | [optional] [default to null] +**BlockStorageSnapshotInstanceNo** | ***string** | 블록스토리지스냅샷인스턴스번호 | [optional] [default to null] +**BlockStorageSnapshotName** | ***string** | 블록스토리지스냅샷이름 | [optional] [default to null] +**BlockStorageSize** | ***float32** | 블록스토리지사이즈 | [optional] [default to null] +**BlockStorageName** | ***string** | 블록스토리지이름 | [optional] [default to null] +**BlockStorageVolumeType** | **[*CommonCode](CommonCode.md)** | 블록스토리지볼륨유형 | [optional] [default to null] +**Iops** | ***float32** | IOPS | [optional] [default to null] +**Throughput** | ***float32** | 부하처리성능 | [optional] [default to null] +**IsEncryptedVolume** | ***bool** | 볼륨암호화여부 | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/services/vserver/docs/CreateServerImageFromSnapshotResponse.md b/services/vserver/docs/CreateServerImageFromSnapshotResponse.md new file mode 100644 index 0000000..5c1c912 --- /dev/null +++ b/services/vserver/docs/CreateServerImageFromSnapshotResponse.md @@ -0,0 +1,14 @@ +# CreateServerImageFromSnapshotResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestId** | ***string** | | [optional] [default to null] +**ReturnCode** | ***string** | | [optional] [default to null] +**ReturnMessage** | ***string** | | [optional] [default to null] +**TotalRows** | ***int32** | | [optional] [default to null] +**ServerImageList** | **[[]\*ServerImage](ServerImage.md)** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/services/vserver/docs/CreateServerImageResponse.md b/services/vserver/docs/CreateServerImageResponse.md new file mode 100644 index 0000000..6972a85 --- /dev/null +++ b/services/vserver/docs/CreateServerImageResponse.md @@ -0,0 +1,14 @@ +# CreateServerImageResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestId** | ***string** | | [optional] [default to null] +**ReturnCode** | ***string** | | [optional] [default to null] +**ReturnMessage** | ***string** | | [optional] [default to null] +**TotalRows** | ***int32** | | [optional] [default to null] +**ServerImageList** | **[[]\*ServerImage](ServerImage.md)** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/services/vserver/docs/DeleteServerImageResponse.md b/services/vserver/docs/DeleteServerImageResponse.md new file mode 100644 index 0000000..6909478 --- /dev/null +++ b/services/vserver/docs/DeleteServerImageResponse.md @@ -0,0 +1,14 @@ +# DeleteServerImageResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestId** | ***string** | | [optional] [default to null] +**ReturnCode** | ***string** | | [optional] [default to null] +**ReturnMessage** | ***string** | | [optional] [default to null] +**TotalRows** | ***int32** | | [optional] [default to null] +**ServerImageList** | **[[]\*ServerImage](ServerImage.md)** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/services/vserver/docs/GetServerImageDetailResponse.md b/services/vserver/docs/GetServerImageDetailResponse.md new file mode 100644 index 0000000..c07738e --- /dev/null +++ b/services/vserver/docs/GetServerImageDetailResponse.md @@ -0,0 +1,14 @@ +# GetServerImageDetailResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestId** | ***string** | | [optional] [default to null] +**ReturnCode** | ***string** | | [optional] [default to null] +**ReturnMessage** | ***string** | | [optional] [default to null] +**TotalRows** | ***int32** | | [optional] [default to null] +**ServerImageList** | **[[]\*ServerImage](ServerImage.md)** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/services/vserver/docs/GetServerImageListResponse.md b/services/vserver/docs/GetServerImageListResponse.md new file mode 100644 index 0000000..1eaef8f --- /dev/null +++ b/services/vserver/docs/GetServerImageListResponse.md @@ -0,0 +1,14 @@ +# GetServerImageListResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestId** | ***string** | | [optional] [default to null] +**ReturnCode** | ***string** | | [optional] [default to null] +**ReturnMessage** | ***string** | | [optional] [default to null] +**TotalRows** | ***int32** | | [optional] [default to null] +**ServerImageList** | **[[]\*ServerImage](ServerImage.md)** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/services/vserver/docs/GetServerSpecDetailResponse.md b/services/vserver/docs/GetServerSpecDetailResponse.md new file mode 100644 index 0000000..c041775 --- /dev/null +++ b/services/vserver/docs/GetServerSpecDetailResponse.md @@ -0,0 +1,14 @@ +# GetServerSpecDetailResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestId** | ***string** | | [optional] [default to null] +**ReturnCode** | ***string** | | [optional] [default to null] +**ReturnMessage** | ***string** | | [optional] [default to null] +**TotalRows** | ***int32** | | [optional] [default to null] +**ServerSpecList** | **[[]\*ServerSpec](ServerSpec.md)** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/services/vserver/docs/GetServerSpecListResponse.md b/services/vserver/docs/GetServerSpecListResponse.md new file mode 100644 index 0000000..777b508 --- /dev/null +++ b/services/vserver/docs/GetServerSpecListResponse.md @@ -0,0 +1,14 @@ +# GetServerSpecListResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestId** | ***string** | | [optional] [default to null] +**ReturnCode** | ***string** | | [optional] [default to null] +**ReturnMessage** | ***string** | | [optional] [default to null] +**TotalRows** | ***int32** | | [optional] [default to null] +**ServerSpecList** | **[[]\*ServerSpec](ServerSpec.md)** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/services/vserver/docs/RemoveServerImageSharingPermissionResponse.md b/services/vserver/docs/RemoveServerImageSharingPermissionResponse.md new file mode 100644 index 0000000..7bb5f4b --- /dev/null +++ b/services/vserver/docs/RemoveServerImageSharingPermissionResponse.md @@ -0,0 +1,14 @@ +# RemoveServerImageSharingPermissionResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestId** | ***string** | | [optional] [default to null] +**ReturnCode** | ***string** | | [optional] [default to null] +**ReturnMessage** | ***string** | | [optional] [default to null] +**TotalRows** | ***int32** | | [optional] [default to null] +**ServerImageList** | **[[]\*ServerImage](ServerImage.md)** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/services/vserver/docs/ServerImage.md b/services/vserver/docs/ServerImage.md new file mode 100644 index 0000000..0083ee0 --- /dev/null +++ b/services/vserver/docs/ServerImage.md @@ -0,0 +1,25 @@ +# ServerImage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ServerImageNo** | ***string** | 서버이미지번호 | [optional] [default to null] +**ServerImageName** | ***string** | 서버이미지이름 | [optional] [default to null] +**ServerImageDescription** | ***string** | 서버이미지설명 | [optional] [default to null] +**ServerImageProductCode** | ***string** | 서버이미지상품코드 | [optional] [default to null] +**ServerImageType** | **[*CommonCode](CommonCode.md)** | 서버이미지유형 | [optional] [default to null] +**HypervisorType** | **[*CommonCode](CommonCode.md)** | 하이퍼바이저유형 | [optional] [default to null] +**CpuArchitectureType** | **[*CommonCode](CommonCode.md)** | CPU아키텍처유형 | [optional] [default to null] +**OsCategoryType** | **[*CommonCode](CommonCode.md)** | OS카테고리유형 | [optional] [default to null] +**OsType** | **[*CommonCode](CommonCode.md)** | OS유형 | [optional] [default to null] +**ServerImageStatus** | **[*CommonCode](CommonCode.md)** | 서버이미지상태 | [optional] [default to null] +**ServerImageOperation** | **[*CommonCode](CommonCode.md)** | 서버이미지OP | [optional] [default to null] +**ServerImageStatusName** | ***string** | 서버이미지상태이름 | [optional] [default to null] +**CreateDate** | ***string** | 생성일시 | [optional] [default to null] +**ShareStatus** | **[*CommonCode](CommonCode.md)** | 공유상태 | [optional] [default to null] +**SharedLoginIdList** | **[]\*string** | 공유받는로그인ID리스트 | [optional] [default to null] +**BlockStorageMappingList** | **[[]\*BlockStorageMapping](BlockStorageMapping.md)** | 블록스토리지맵핑리스트 | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/services/vserver/docs/ServerSpec.md b/services/vserver/docs/ServerSpec.md new file mode 100644 index 0000000..fb8557d --- /dev/null +++ b/services/vserver/docs/ServerSpec.md @@ -0,0 +1,23 @@ +# ServerSpec + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ServerSpecCode** | ***string** | 서버스펙코드 | [optional] [default to null] +**GenerationCode** | ***string** | 세대코드 | [optional] [default to null] +**CpuCount** | ***int32** | CPU개수 | [optional] [default to null] +**MemorySize** | ***float32** | 메모리사이즈 | [optional] [default to null] +**HypervisorType** | **[*CommonCode](CommonCode.md)** | 하이퍼바이저유형 | [optional] [default to null] +**CpuArchitectureType** | **[*CommonCode](CommonCode.md)** | CPU아키텍처유형 | [optional] [default to null] +**BlockStorageMaxCount** | ***int32** | 할당가능한스토리지최대개수 | [optional] [default to null] +**BlockStorageMaxIops** | ***int32** | 스토리지최대IOPS | [optional] [default to null] +**BlockStorageMaxThroughput** | ***int32** | 스토리지최대부하처리성능 | [optional] [default to null] +**NetworkPerformance** | ***int32** | 네트워크성능 | [optional] [default to null] +**NetworkInterfaceMaxCount** | ***int32** | 할당가능한네트워크인터페이스최대개수 | [optional] [default to null] +**ServerProductCode** | ***string** | 서버상품코드 | [optional] [default to null] +**ServerSpecDescription** | ***string** | 서버스펙설명 | [optional] [default to null] +**GpuCount** | ***int32** | GPU개수 | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/services/vserver/get_server_image_detail_response.go b/services/vserver/get_server_image_detail_response.go new file mode 100644 index 0000000..d84e722 --- /dev/null +++ b/services/vserver/get_server_image_detail_response.go @@ -0,0 +1,22 @@ +/* + * vserver + * + * VPC Compute 관련 API
https://ncloud.apigw.ntruss.com/vserver/v2 + * + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type GetServerImageDetailResponse struct { + +RequestId *string `json:"requestId,omitempty"` + +ReturnCode *string `json:"returnCode,omitempty"` + +ReturnMessage *string `json:"returnMessage,omitempty"` + +TotalRows *int32 `json:"totalRows,omitempty"` + +ServerImageList []*ServerImage `json:"serverImageList,omitempty"` +} diff --git a/services/vserver/get_server_image_list_response.go b/services/vserver/get_server_image_list_response.go new file mode 100644 index 0000000..e05f343 --- /dev/null +++ b/services/vserver/get_server_image_list_response.go @@ -0,0 +1,22 @@ +/* + * vserver + * + * VPC Compute 관련 API
https://ncloud.apigw.ntruss.com/vserver/v2 + * + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type GetServerImageListResponse struct { + +RequestId *string `json:"requestId,omitempty"` + +ReturnCode *string `json:"returnCode,omitempty"` + +ReturnMessage *string `json:"returnMessage,omitempty"` + +TotalRows *int32 `json:"totalRows,omitempty"` + +ServerImageList []*ServerImage `json:"serverImageList,omitempty"` +} diff --git a/services/vserver/get_server_spec_detail_response.go b/services/vserver/get_server_spec_detail_response.go new file mode 100644 index 0000000..cb42829 --- /dev/null +++ b/services/vserver/get_server_spec_detail_response.go @@ -0,0 +1,22 @@ +/* + * vserver + * + * VPC Compute 관련 API
https://ncloud.apigw.ntruss.com/vserver/v2 + * + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type GetServerSpecDetailResponse struct { + +RequestId *string `json:"requestId,omitempty"` + +ReturnCode *string `json:"returnCode,omitempty"` + +ReturnMessage *string `json:"returnMessage,omitempty"` + +TotalRows *int32 `json:"totalRows,omitempty"` + +ServerSpecList []*ServerSpec `json:"serverSpecList,omitempty"` +} diff --git a/services/vserver/get_server_spec_list_response.go b/services/vserver/get_server_spec_list_response.go new file mode 100644 index 0000000..14f97c9 --- /dev/null +++ b/services/vserver/get_server_spec_list_response.go @@ -0,0 +1,22 @@ +/* + * vserver + * + * VPC Compute 관련 API
https://ncloud.apigw.ntruss.com/vserver/v2 + * + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type GetServerSpecListResponse struct { + +RequestId *string `json:"requestId,omitempty"` + +ReturnCode *string `json:"returnCode,omitempty"` + +ReturnMessage *string `json:"returnMessage,omitempty"` + +TotalRows *int32 `json:"totalRows,omitempty"` + +ServerSpecList []*ServerSpec `json:"serverSpecList,omitempty"` +} diff --git a/services/vserver/remove_server_image_sharing_permission_response.go b/services/vserver/remove_server_image_sharing_permission_response.go new file mode 100644 index 0000000..b9e857b --- /dev/null +++ b/services/vserver/remove_server_image_sharing_permission_response.go @@ -0,0 +1,22 @@ +/* + * vserver + * + * VPC Compute 관련 API
https://ncloud.apigw.ntruss.com/vserver/v2 + * + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type RemoveServerImageSharingPermissionResponse struct { + +RequestId *string `json:"requestId,omitempty"` + +ReturnCode *string `json:"returnCode,omitempty"` + +ReturnMessage *string `json:"returnMessage,omitempty"` + +TotalRows *int32 `json:"totalRows,omitempty"` + +ServerImageList []*ServerImage `json:"serverImageList,omitempty"` +} diff --git a/services/vserver/server_image.go b/services/vserver/server_image.go new file mode 100644 index 0000000..16d6fc9 --- /dev/null +++ b/services/vserver/server_image.go @@ -0,0 +1,60 @@ +/* + * vserver + * + * VPC Compute 관련 API
https://ncloud.apigw.ntruss.com/vserver/v2 + * + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type ServerImage struct { + + // 서버이미지번호 +ServerImageNo *string `json:"serverImageNo,omitempty"` + + // 서버이미지이름 +ServerImageName *string `json:"serverImageName,omitempty"` + + // 서버이미지설명 +ServerImageDescription *string `json:"serverImageDescription,omitempty"` + + // 서버이미지상품코드 +ServerImageProductCode *string `json:"serverImageProductCode,omitempty"` + + // 서버이미지유형 +ServerImageType *CommonCode `json:"serverImageType,omitempty"` + + // 하이퍼바이저유형 +HypervisorType *CommonCode `json:"hypervisorType,omitempty"` + + // CPU아키텍처유형 +CpuArchitectureType *CommonCode `json:"cpuArchitectureType,omitempty"` + + // OS카테고리유형 +OsCategoryType *CommonCode `json:"osCategoryType,omitempty"` + + // OS유형 +OsType *CommonCode `json:"osType,omitempty"` + + // 서버이미지상태 +ServerImageStatus *CommonCode `json:"serverImageStatus,omitempty"` + + // 서버이미지OP +ServerImageOperation *CommonCode `json:"serverImageOperation,omitempty"` + + // 서버이미지상태이름 +ServerImageStatusName *string `json:"serverImageStatusName,omitempty"` + + // 생성일시 +CreateDate *string `json:"createDate,omitempty"` + + // 공유상태 +ShareStatus *CommonCode `json:"shareStatus,omitempty"` + + // 공유받는로그인ID리스트 +SharedLoginIdList []*string `json:"sharedLoginIdList,omitempty"` + + // 블록스토리지맵핑리스트 +BlockStorageMappingList []*BlockStorageMapping `json:"blockStorageMappingList,omitempty"` +} diff --git a/services/vserver/server_spec.go b/services/vserver/server_spec.go new file mode 100644 index 0000000..1edec73 --- /dev/null +++ b/services/vserver/server_spec.go @@ -0,0 +1,54 @@ +/* + * vserver + * + * VPC Compute 관련 API
https://ncloud.apigw.ntruss.com/vserver/v2 + * + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type ServerSpec struct { + + // 서버스펙코드 +ServerSpecCode *string `json:"serverSpecCode,omitempty"` + + // 세대코드 +GenerationCode *string `json:"generationCode,omitempty"` + + // CPU개수 +CpuCount *int32 `json:"cpuCount,omitempty"` + + // 메모리사이즈 +MemorySize *float32 `json:"memorySize,omitempty"` + + // 하이퍼바이저유형 +HypervisorType *CommonCode `json:"hypervisorType,omitempty"` + + // CPU아키텍처유형 +CpuArchitectureType *CommonCode `json:"cpuArchitectureType,omitempty"` + + // 할당가능한스토리지최대개수 +BlockStorageMaxCount *int32 `json:"blockStorageMaxCount,omitempty"` + + // 스토리지최대IOPS +BlockStorageMaxIops *int32 `json:"blockStorageMaxIops,omitempty"` + + // 스토리지최대부하처리성능 +BlockStorageMaxThroughput *int32 `json:"blockStorageMaxThroughput,omitempty"` + + // 네트워크성능 +NetworkPerformance *int32 `json:"networkPerformance,omitempty"` + + // 할당가능한네트워크인터페이스최대개수 +NetworkInterfaceMaxCount *int32 `json:"networkInterfaceMaxCount,omitempty"` + + // 서버상품코드 +ServerProductCode *string `json:"serverProductCode,omitempty"` + + // 서버스펙설명 +ServerSpecDescription *string `json:"serverSpecDescription,omitempty"` + + // GPU개수 +GpuCount *int32 `json:"gpuCount,omitempty"` +}