

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Windows 用 Guard のインストール
<a name="setting-up-windows"></a>

Windows AWS CloudFormation Guard 用 は、Cargo または Chocolatey を通じてインストールできます。

## 前提条件
<a name="w2aab8c16b5"></a>

コマンドラインインターフェイスから Guard をビルドするには、Build Tools for Visual Studio 2019 をインストールする必要があります。

1. Build Tools [for Visual Studio 2019 ウェブサイトから Microsoft Visual C\$1\$1 ビルドツール](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019)をダウンロードします。

1. インストーラを実行し、デフォルトを選択します。

## Cargo から Guard をインストールする
<a name="install-guard-from-cargo"></a>

Cargo は Rust パッケージマネージャーです。Cargo を含む Rust をインストールするには、次の手順を実行します。次に、Cargo から Guard をインストールします。

1. [Rust をダウンロード](https://forge.rust-lang.org/infra/other-installation-methods.html#other-ways-to-install-rustup)し、**rustup-init.exe** を実行します。

1. コマンドプロンプトから、デフォルトのオプションである **1** を選択します。

   このコマンドは、以下の出力を返します。

   ```
   Rust is installed now. Great!
       
       To get started you may need to restart your current shell.
       This would reload its PATH environment variable to include
       Cargo's bin directory (%USERPROFILE%\.cargo\bin).
       
       Press the Enter key to continue.
   ```

1. インストールを完了するには、**Enter **キーを押します。

1. Cargo がインストールされたら、次のコマンドを実行して Guard をインストールします。

   ```
   cargo install cfn-guard
   ```

   *結果*: Guard が正常にインストールされました。

   1. (オプション) Guard のインストールを確認するには、次のコマンドを実行します。

     ```
     cfn-guard --version
     ```

     このコマンドは、以下の出力を返します。

     ```
     cfn-guard 3.1.2
     ```

## Chocolatey から Guard をインストールする
<a name="install-guard-from-chocolatey"></a>

Chocolatey は Windows のパッケージマネージャーです。Chocolatey をインストールするには、次の手順を実行します。次に、Chocolatey から Guard をインストールします。

1. このガイドに従って [Chocolatey をインストール](https://chocolatey.org/install)します。

1. Chocolatey がインストールされたら、次のコマンドを実行して Guard をインストールします。

   ```
   choco install cloudformation-guard
   ```

   *結果*: Guard が正常にインストールされました。

   1. (オプション) Guard のインストールを確認するには、次のコマンドを実行します。

     ```
     cfn-guard --version
     ```

     このコマンドは、以下の出力を返します。

     ```
     cfn-guard 3.1.2
     ```