Cloudflare.Hyperdrive (Cloudflare v0.5.0)

Copy Markdown View Source

Hyperdrive

Create Hyperdrive

POST /accounts/{account_id}/hyperdrive/configs

Creates and returns a new Hyperdrive configuration.

Responses

200 Create Hyperdrive Response.

Data is at body["result"]

{
  "caching": {},
  "created_on": "*string*",
  "id": "*string*",
  "modified_on": "*string*",
  "mtls": {
    "ca_certificate_id": "*string*",
    "mtls_certificate_id": "*string*",
    "sslmode": "*string*"
  },
  "name": "*string*",
  "origin": {},
  "origin_connection_limit": "*integer*"
}
4XX Create Hyperdrive Failure Response.
{
  "errors": [
    {
      "code": "*integer*",
      "message": "*string*"
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "message": "*string*"
    }
  ],
  "result": {},
  "success": "*boolean*"
}

List Hyperdrives

GET /accounts/{account_id}/hyperdrive/configs

Returns a list of Hyperdrives.

Responses

200 List Hyperdrives Response.

Data is at body["result"]

[
  {
    "caching": {},
    "created_on": "*string*",
    "id": "*string*",
    "modified_on": "*string*",
    "mtls": {
      "ca_certificate_id": "*string*",
      "mtls_certificate_id": "*string*",
      "sslmode": "*string*"
    },
    "name": "*string*",
    "origin": {},
    "origin_connection_limit": "*integer*"
  }
]
4XX List Hyperdrives Failure Response.
{
  "errors": [
    {
      "code": "*integer*",
      "message": "*string*"
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "message": "*string*"
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Update Hyperdrive

PUT /accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}

Updates and returns the specified Hyperdrive configuration.

Responses

200 Update Hyperdrive Response.

Data is at body["result"]

{
  "caching": {},
  "created_on": "*string*",
  "id": "*string*",
  "modified_on": "*string*",
  "mtls": {
    "ca_certificate_id": "*string*",
    "mtls_certificate_id": "*string*",
    "sslmode": "*string*"
  },
  "name": "*string*",
  "origin": {},
  "origin_connection_limit": "*integer*"
}
4XX Update Hyperdrive Failure Response.
{
  "errors": [
    {
      "code": "*integer*",
      "message": "*string*"
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "message": "*string*"
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Patch Hyperdrive

PATCH /accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}

Patches and returns the specified Hyperdrive configuration. Custom caching settings are not kept if caching is disabled.

Responses

200 Patch Hyperdrive Response.

Data is at body["result"]

{
  "caching": {},
  "created_on": "*string*",
  "id": "*string*",
  "modified_on": "*string*",
  "mtls": {
    "ca_certificate_id": "*string*",
    "mtls_certificate_id": "*string*",
    "sslmode": "*string*"
  },
  "name": "*string*",
  "origin": {},
  "origin_connection_limit": "*integer*"
}
4XX Patch Hyperdrive Failure Response.
{
  "errors": [
    {
      "code": "*integer*",
      "message": "*string*"
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "message": "*string*"
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Get Hyperdrive

GET /accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}

Returns the specified Hyperdrive configuration.

Responses

200 Get Hyperdrive Response.

Data is at body["result"]

{
  "caching": {},
  "created_on": "*string*",
  "id": "*string*",
  "modified_on": "*string*",
  "mtls": {
    "ca_certificate_id": "*string*",
    "mtls_certificate_id": "*string*",
    "sslmode": "*string*"
  },
  "name": "*string*",
  "origin": {},
  "origin_connection_limit": "*integer*"
}
4XX Get Hyperdrive Failure.
{
  "errors": [
    {
      "code": "*integer*",
      "message": "*string*"
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "message": "*string*"
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Delete Hyperdrive

DELETE /accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}

Deletes the specified Hyperdrive.

Responses

200 Delete Hyperdrive Response.

Data is at body["result"]

{}
4XX Delete Hyperdrive Failure.
{
  "errors": [
    {
      "code": "*integer*",
      "message": "*string*"
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "message": "*string*"
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Summary

Functions

client(opts \\ [])

create(body, opts \\ [])

@spec create(
  body :: Restlax.Resource.action_body(),
  opts :: Restlax.Resource.action_options()
) ::
  {:ok, map()} | {:error, term()}

create!(body, opts \\ [])

@spec create!(
  body :: Restlax.Resource.action_body(),
  opts :: Restlax.Resource.action_options()
) ::
  map() | no_return()

delete(id, opts \\ [])

@spec delete(id :: term(), opts :: Restlax.Resource.action_options()) ::
  {:ok, map()} | {:error, term()}

delete!(id, opts \\ [])

@spec delete!(id :: term(), opts :: Restlax.Resource.action_options()) ::
  map() | no_return()

index(opts \\ [])

@spec index(opts :: Restlax.Resource.action_options()) ::
  {:ok, map()} | {:error, term()}

index!(opts \\ [])

@spec index!(opts :: Restlax.Resource.action_options()) :: map() | no_return()

path_for(id, opts \\ [])

@spec path_for(term(), [{:action, String.t()}]) :: String.t()

show(id, opts \\ [])

@spec show(id :: term(), opts :: Restlax.Resource.action_options()) ::
  {:ok, map()} | {:error, term()}

show!(id, opts \\ [])

@spec show!(id :: term(), opts :: Restlax.Resource.action_options()) ::
  map() | no_return()

update(id, body, opts \\ [])

@spec update(
  id :: term(),
  body :: Restlax.Resource.action_body(),
  opts :: Restlax.Resource.action_options()
) :: {:ok, map()} | {:error, term()}

update!(id, body, opts \\ [])

@spec update!(
  id :: term(),
  body :: Restlax.Resource.action_body(),
  opts :: Restlax.Resource.action_options()
) :: map() | no_return()