# REST Resource: projects.locations.privateClouds.hcxActivationKeys

- [Resource: HcxActivationKey](https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.hcxActivationKeys#HcxActivationKey)
  - [JSON representation](https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.hcxActivationKeys#HcxActivationKey.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.hcxActivationKeys#State)
- [Methods](https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.hcxActivationKeys#METHODS_SUMMARY)

## Resource: HcxActivationKey

HCX activation key. A default key is created during private cloud provisioning, but this behavior is subject to change and you should always verify active keys. Use `https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.hcxActivationKeys/list#google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys` to retrieve existing keys and `https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.hcxActivationKeys/create#google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey` to create new ones.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "state": enum (`https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.hcxActivationKeys#State`), "activationKey": string, "uid": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The resource name of this HcxActivationKey. Resource names are schemeless URIs that follow the conventions in <https://cloud.google.com/apis/design/resource_names>. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Creation time of HCX activation key. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `state` | ``enum (`https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.hcxActivationKeys#State`)`` Output only. State of HCX activation key. |
| `activationKey` | `string` Output only. HCX activation key. |
| `uid` | `string` Output only. System-generated unique identifier for the resource. |

## State

State of HCX activation key

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Unspecified state. |
| `AVAILABLE` | State of a newly generated activation key. |
| `CONSUMED` | State of key when it has been used to activate HCX appliance. |
| `CREATING` | State of key when it is being created. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.hcxActivationKeys/create` | Creates a new HCX activation key in a given private cloud. |
| ### `https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.hcxActivationKeys/get` | Retrieves a `HcxActivationKey` resource by its resource name. |
| ### `https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.hcxActivationKeys/getIamPolicy` | Gets the access control policy for a resource. |
| ### `https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.hcxActivationKeys/list` | Lists `HcxActivationKey` resources in a given private cloud. |
| ### `https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.hcxActivationKeys/setIamPolicy` | Sets the access control policy on the specified resource. |
| ### `https://docs.cloud.google.com/vmware-engine/docs/public/reference/rest/v1/projects.locations.privateClouds.hcxActivationKeys/testIamPermissions` | Returns permissions that a caller has on the specified resource. |