

버전 5(V5) AWS Tools for PowerShell 가 릴리스되었습니다.

변경 사항 해제 및 애플리케이션 마이그레이션에 대한 자세한 내용은 [마이그레이션 주제를](https://docs.aws.amazon.com/powershell/v5/userguide/migrating-v5.html) 참조하세요.

 [https://docs.aws.amazon.com/powershell/v5/userguide/migrating-v5.html](https://docs.aws.amazon.com/powershell/v5/userguide/migrating-v5.html)

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# AWS 가격표 Tools for PowerShell V5를 사용한 예제
<a name="powershell_pricing_code_examples"></a>

다음 코드 예제에서는와 함께 AWS Tools for PowerShell V5를 사용하여 작업을 수행하고 일반적인 시나리오를 구현하는 방법을 보여줍니다 AWS 가격표.

*작업*은 대규모 프로그램에서 발췌한 코드이며 컨텍스트에 맞춰 실행해야 합니다. 작업은 개별 서비스 함수를 직접적으로 호출하는 방법을 보여주며 관련 시나리오의 컨텍스트에 맞는 작업을 볼 수 있습니다.

각 예시에는 전체 소스 코드에 대한 링크가 포함되어 있으며, 여기에서 컨텍스트에 맞춰 코드를 설정하고 실행하는 방법에 대한 지침을 찾을 수 있습니다.

**Topics**
+ [작업](#actions)

## 작업
<a name="actions"></a>

### `Get-PLSAttributeValue`
<a name="pricing_GetAttributeValues_powershell_topic"></a>

다음 코드 예시는 `Get-PLSAttributeValue`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: us-east-1 리전의 Amazon EC2에 대한 'volumeType' 속성의 값을 반환합니다.**  

```
Get-PLSAttributeValue -ServiceCode AmazonEC2 -AttributeName "volumeType" -region us-east-1
```
**출력:**  

```
Value
-----
Cold HDD
General Purpose
Magnetic
Provisioned IOPS
Throughput Optimized HDD
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [GetAttributeValues](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Get-PLSProduct`
<a name="pricing_GetProducts_powershell_topic"></a>

다음 코드 예시는 `Get-PLSProduct`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: Amazon EC2의 모든 제품에 대한 세부 정보를 반환합니다.**  

```
Get-PLSProduct -ServiceCode AmazonEC2 -Region us-east-1
```
**출력:**  

```
{"product":{"productFamily":"Compute Instance","attributes":{"enhancedNetworkingSupported":"Yes","memory":"30.5 GiB","dedicatedEbsThroughput":"800 Mbps","vcpu":"4","locationType":"AWS Region","storage":"EBS only","instanceFamily":"Memory optimized","operatingSystem":"SUSE","physicalProcessor":"Intel Xeon E5-2686 v4 (Broadwell)","clockSpeed":"2.3 GHz","ecu":"Variable","networkPerformance":"Up to 10 Gigabit","servicename":"Amazon Elastic Compute Cloud","instanceType":"r4.xlarge","tenancy":"Shared","usagetype":"USW2-BoxUsage:r4.xlarge","normalizationSizeFactor":"8","processorFeatures":"Intel AVX, Intel AVX2, Intel Turbo","servicecode":"AmazonEC2","licenseModel":"No License required","currentGeneration":"Yes","preInstalledSw":"NA","location":"US West (Oregon)","processorArchitecture":"64-bit","operation":"RunInstances:000g"},...
```
**예제 2: SSD 지원 'General Purpose' 볼륨 유형으로 필터링된 us-east-1 리전의 Amazon EC2에 대한 데이터를 반환합니다.**  

```
Get-PLSProduct -ServiceCode AmazonEC2 -Filter @{Type="TERM_MATCH";Field="volumeType";Value="General Purpose"},@{Type="TERM_MATCH";Field="storageMedia";Value="SSD-backed"} -Region us-east-1
```
**출력:**  

```
{"product":{"productFamily":"Storage","attributes":{"storageMedia":"SSD-backed","maxThroughputvolume":"160 MB/sec","volumeType":"General Purpose","maxIopsvolume":"10000",...
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [GetProducts](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Get-PLSService`
<a name="pricing_DescribeServices_powershell_topic"></a>

다음 코드 예시는 `Get-PLSService`의 사용 방법을 보여줍니다.

**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](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.