CLI로 DescribeServices 사용 - AWS SDK 코드 예제

AWS SDK 예제 GitHub 리포지토리에 더 많은 AWS문서 SDK 예제가 있습니다.

CLI로 DescribeServices 사용

다음 코드 예시는 DescribeServices의 사용 방법을 보여 줍니다.

CLI
AWS CLI

서비스 메타데이터 검색

이 예시에서는 Amazon EC2 서비스 코드의 메타데이터를 가져옵니다.

명령:

aws pricing describe-services --service-code AmazonEC2 --format-version aws_v1 --max-items 1

출력:

{ "Services": [ { "ServiceCode": "AmazonEC2", "AttributeNames": [ "volumeType", "maxIopsvolume", "instance", "instanceCapacity10xlarge", "locationType", "instanceFamily", "operatingSystem", "clockSpeed", "LeaseContractLength", "ecu", "networkPerformance", "instanceCapacity8xlarge", "group", "maxThroughputvolume", "gpuMemory", "ebsOptimized", "elasticGpuType", "maxVolumeSize", "gpu", "processorFeatures", "intelAvxAvailable", "instanceCapacity4xlarge", "servicecode", "groupDescription", "processorArchitecture", "physicalCores", "productFamily", "enhancedNetworkingSupported", "intelTurboAvailable", "memory", "dedicatedEbsThroughput", "vcpu", "OfferingClass", "instanceCapacityLarge", "capacitystatus", "termType", "storage", "intelAvx2Available", "storageMedia", "physicalProcessor", "provisioned", "servicename", "PurchaseOption", "instanceCapacity18xlarge", "instanceType", "tenancy", "usagetype", "normalizationSizeFactor", "instanceCapacity2xlarge", "instanceCapacity16xlarge", "maxIopsBurstPerformance", "instanceCapacity12xlarge", "instanceCapacity32xlarge", "instanceCapacityXlarge", "licenseModel", "currentGeneration", "preInstalledSw", "location", "instanceCapacity24xlarge", "instanceCapacity9xlarge", "instanceCapacityMedium", "operation" ] } ], "FormatVersion": "aws_v1" }
  • API 세부 정보는 AWS CLI 명령 참조DescribeServices를 참조하세요.

PowerShell
Tools for PowerShell V4

예제 1: us-east-1 리전에서 사용 가능한 모든 서비스 코드의 메타데이터를 반환합니다.

Get-PLSService -Region us-east-1

출력:

AttributeNames ServiceCode -------------- ----------- {productFamily, servicecode, groupDescription, termType...} AWSBudgets {productFamily, servicecode, termType, usagetype...} AWSCloudTrail {productFamily, servicecode, termType, usagetype...} AWSCodeCommit {productFamily, servicecode, termType, usagetype...} AWSCodeDeploy {productFamily, servicecode, termType, usagetype...} AWSCodePipeline {productFamily, servicecode, termType, usagetype...} AWSConfig ...

예제 2: us-east-1 리전의 Amazon EC2 서비스에 대한 메타데이터를 반환합니다.

Get-PLSService -ServiceCode AmazonEC2 -Region us-east-1

출력:

AttributeNames ServiceCode -------------- ----------- {volumeType, maxIopsvolume, instanceCapacity10xlarge, locationType...} AmazonEC2
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V4)DescribeServices를 참조하세요.

Tools for PowerShell V5

예제 1: us-east-1 리전에서 사용 가능한 모든 서비스 코드의 메타데이터를 반환합니다.

Get-PLSService -Region us-east-1

출력:

AttributeNames ServiceCode -------------- ----------- {productFamily, servicecode, groupDescription, termType...} AWSBudgets {productFamily, servicecode, termType, usagetype...} AWSCloudTrail {productFamily, servicecode, termType, usagetype...} AWSCodeCommit {productFamily, servicecode, termType, usagetype...} AWSCodeDeploy {productFamily, servicecode, termType, usagetype...} AWSCodePipeline {productFamily, servicecode, termType, usagetype...} AWSConfig ...

예제 2: us-east-1 리전의 Amazon EC2 서비스에 대한 메타데이터를 반환합니다.

Get-PLSService -ServiceCode AmazonEC2 -Region us-east-1

출력:

AttributeNames ServiceCode -------------- ----------- {volumeType, maxIopsvolume, instanceCapacity10xlarge, locationType...} AmazonEC2
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V5)DescribeServices를 참조하세요.