### Method

# Foundry KeyRotator rotate

since: 1.1

#### Declaration [src]

    DexFuture*
    foundry_key_rotator_rotate (
      FoundryKeyRotator* self,
      const char* host,
      const char* service_name,
      const char* secret,
      GDateTime* expire_at
    )

#### Description [src]

Rotates the API key for the given host and service name.

Available since: 1.1

#### Parameters

`host`

  Type: `const char*`

  The host name for the API key.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`service_name`

  Type: `const char*`

  The service name for the API key.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`secret`

  Type: `const char*`

  The current secret value.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`expire_at`

  Type: `GDateTime`

  When the new key should expire, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

#### Return value

Type: `DexFuture`

A `DexFuture` that resolves to a string containing the replacement secret, or rejects with an error.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.