

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 使用 CloudHSM CLI 激活集群
<a name="cloudhsm_cli-cluster-activate"></a>

使用 CloudHSM CLI 中的 **cluster activate** 命令在 AWS CloudHSM中[激活新集群](activate-cluster.md)。使用该集群执行加密操作之前，必须运行该命令。

## 用户类型
<a name="cluster-activate-userType"></a>

以下类型的用户均可运行此命令。
+ 未激活的管理员

## 语法
<a name="chsm-cli-cluster-activate-syntax"></a>

此命令没有输出参数。

```
aws-cloudhsm > help cluster activate
Activate a cluster

This command will set the initial Admin password. This process will cause your CloudHSM cluster to
move into the ACTIVE state.

USAGE:
    cloudhsm-cli cluster activate [OPTIONS] [--password <PASSWORD>]

Options:
      --cluster-id <CLUSTER_ID>
          Unique Id to choose which of the clusters in the config file to run the operation against. If not provided, will fall back to the value provided when interactive mode was started, or error

      --password <PASSWORD>
          Optional: Plaintext activation password If you do not include this argument you will be prompted for it

  -h, --help
          Print help (see a summary with '-h')
```

## 示例
<a name="chsm-cli-cluster-activate-examples"></a>

此命令通过为您的管理员用户设置初始密码来激活您的集群。

```
aws-cloudhsm > cluster activate
Enter password:
Confirm password:
{
  "error_code": 0,
  "data": "Cluster activation successful"
}
```

## 相关主题
<a name="chsm-cluster-activate-seealso"></a>
+ [user create](cloudhsm_cli-user-create.md)
+ [user delete](cloudhsm_cli-user-delete.md)
+ [user change-password](cloudhsm_cli-user-change-password.md)