Skip to content

Commit

Permalink
PR전 소스정리 및 주석 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
SungWoongz committed Feb 20, 2024
1 parent c695408 commit d752d07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1761,6 +1761,8 @@ func handlePriceInfo() {
// aws pricing get-attribute-values --service-code AmazonEC2 --attribute-name instanceType

//result, err := handler.GetPriceInfo("AmazonEC2", "ap-northeast-2", filterList)

// AmazonEC2는 ServiceCode고정 -> ProductFamily : Compute Instance로 두고 테스트
result, err := handler.GetPriceInfo("Compute Instance", "us-west-1", filterList)

if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (priceInfoHandler *AwsPriceInfoHandler) GetPriceInfo(productFamily string,

priceMap := make(map[string]irs.Price) // 전체 price를 id로 구분한 map

cblogger.Info("productFamily", productFamily)
cblogger.Info("productFamily : ", productFamily)
cblogger.Info("filter value : ", filterList)
requestProductsInputFilters, err := setProductsInputRequestFilter(filterList)

Expand Down Expand Up @@ -113,7 +113,7 @@ func (priceInfoHandler *AwsPriceInfoHandler) GetPriceInfo(productFamily string,

getProductsRequest := &pricing.GetProductsInput{
Filters: requestProductsInputFilters,
ServiceCode: aws.String("AmazonEC2"),
ServiceCode: aws.String("AmazonEC2"), // ServiceCode : AmazonEC2 고정
NextToken: nextToken,
}
cblogger.Info("get Products request", getProductsRequest)
Expand Down Expand Up @@ -231,6 +231,7 @@ func (priceInfoHandler *AwsPriceInfoHandler) GetPriceInfo(productFamily string,
if priceInfos.NextToken == nil {
break
}
// NextToken값이 있다면 설정
nextToken = priceInfos.NextToken
} // end of nextToken for

Expand Down

0 comments on commit d752d07

Please sign in to comment.