Twilio.Iam.V1.GetApiKeysService (twilio_elixir v0.1.1)

Copy Markdown View Source

API keys

Operations: list, create, fetch, update, delete

Summary

Functions

Create a new Signing Key for the account making the request.

Delete a specific Key.

Fetch a specific Key.

Retrieve a list of all Keys for a account.

Stream: Retrieve a list of all Keys for a account. (lazy auto-pagination).

Functions

create(client, params \\ %{}, opts \\ [])

@spec create(Twilio.Client.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Iam.V1.GetApiKeys.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Create a new Signing Key for the account making the request.

Operation: CreateNewKey | Tags: IamV1NewApiKey

Required Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| AccountSid | string | The SID of the Account that created the Payments resource. |

Optional Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| FriendlyName | string | A descriptive string that you create to describe the resource. It can be up to 64 characters long. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| KeyType | string | The KeyType form parameter is used to specify the type of key you want to create. Default Behavior: If KeyType is not specified, the API will generate a standard key. Restricted Key: If KeyType is set to restricted, the API will create a new restricted key. In this case, a policy object is required to define the permissions. Values: restricted |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| Policy | string | The Policy object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the Twilio documentation. |

delete(client, sid, opts \\ [])

@spec delete(Twilio.Client.t(), String.t(), keyword()) ::
  {:ok, map()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}

Delete a specific Key.

Operation: DeleteKey | Tags: IamV1ApiKey

fetch(client, sid, opts \\ [])

@spec fetch(Twilio.Client.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Iam.V1.GetApiKeys.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Fetch a specific Key.

Operation: FetchKey | Tags: IamV1ApiKey

list(client, params \\ %{}, opts \\ [])

@spec list(Twilio.Client.t(), map(), keyword()) ::
  {:ok, Twilio.Page.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Retrieve a list of all Keys for a account.

Operation: ListGetKeys | Tags: IamV1GetApiKeys

Query Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| AccountSid | string | The SID of the Account that created the Payments resource. |

stream(client, params \\ %{}, opts \\ [])

@spec stream(Twilio.Client.t(), map(), keyword()) :: Enumerable.t()

Stream: Retrieve a list of all Keys for a account. (lazy auto-pagination).

update(client, sid, params \\ %{}, opts \\ [])

@spec update(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Iam.V1.GetApiKeys.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Update a specific Key.

Operation: UpdateKey | Tags: IamV1ApiKey

Optional Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| FriendlyName | string | A descriptive string that you create to describe the resource. It can be up to 64 characters long. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| Policy | string | The Policy object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the Twilio documentation. |