Key

Get-APIKey

Synopsis

Get a key.

Syntax

Get-APIKey [-CollectionID <Int32>] [-Filter <String>] [-KeyStatus <String>] [-PageNumber <String>] [-PageSize <String>] [-SortDirection <String>] [-SortColumn <String>] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Get-APIKey [-KeyID <Int32>] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

Retrieves a specific API key by its ID, or lists all. If listing all keys, you can filter by various dimensions.

Parameters

‑AccountSwitchKey

An account credential key that lets you move between accounts when using an API client enabled for multiple accounts. To find account switch keys, use Get-AccountSwitchKey.

‑CollectionID

Your collection's ID. Run Get-APIKeyCollection to retrieve collections available to you.

‑EdgeRCFile

Your EdgeGrid resource file to authenticate your command. Defaults to ~/.edgerc.

‑Filter

Searches a phrase to filter the keys by. The phrase can be a part of the description, tags, or label.

‑KeyID

Your key's ID. Run Get-APIKey to retrieve keys available to you.

‑KeyStatus

The status of keys to return. One of :

- DEPLOYED. For keys that you can use to access resources and operations assigned to the collection.

- REVOKED. For keys that you can't use to access them.

- PENDING or PENDINGDEPLOYMENT. For keys with changes being propagated to the Akamai network.

‑PageNumber

The page number index, starting from 1.

‑PageSize

The number of keys on each page of results.

‑Section

The section name in your EdgeGrid resource file to retrieve authentication credentials from. Defaults to default.

‑SortColumn

The name of the column to sort the keys by. You can sort the keys by their unique createdAt, id, label, or description.

‑SortDirection

Sorts the order of keys, either asc for ascending or desc for descending. Sort keys only when you specify -SortColumn.

Related Links