Skip to content

Latest commit

 

History

History
204 lines (144 loc) · 5.85 KB

MutualAuthenticationApi.md

File metadata and controls

204 lines (144 loc) · 5.85 KB

Fastly.MutualAuthenticationApi

const apiInstance = new Fastly.MutualAuthenticationApi();

Methods

Note

All URIs are relative to https://api.fastly.com

Method HTTP request Description
createMutualTlsAuthentication POST /tls/mutual_authentications Create a Mutual Authentication
deleteMutualTls DELETE /tls/mutual_authentications/{mutual_authentication_id} Delete a Mutual TLS
getMutualAuthentication GET /tls/mutual_authentications/{mutual_authentication_id} Get a Mutual Authentication
listMutualAuthentications GET /tls/mutual_authentications List Mutual Authentications
patchMutualAuthentication PATCH /tls/mutual_authentications/{mutual_authentication_id} Update a Mutual Authentication

createMutualTlsAuthentication

createMutualTlsAuthentication({ , [mutual_authentication] })

Create a mutual authentication using a bundle of certificates to enable client-to-server mutual TLS.

Example

const options = {
  mutual_authentication: {"data":{"type":"mutual_authentication","attributes":{"cert_bundle":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n","name":"Mutual Authentication A"}}},
};

apiInstance.createMutualTlsAuthentication(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
mutual_authentication MutualAuthentication [optional]

Return type

MutualAuthenticationResponse

deleteMutualTls

deleteMutualTls({ mutual_authentication_id })

Remove a Mutual TLS authentication

Example

const options = {
  mutual_authentication_id: "mutual_authentication_id_example", // required
};

apiInstance.deleteMutualTls(options)
  .then(() => {
    console.log('API called successfully.');
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
mutual_authentication_id String Alphanumeric string identifying a mutual authentication.

Return type

null (empty response body)

getMutualAuthentication

getMutualAuthentication({ mutual_authentication_id, [include] })

Show a Mutual Authentication.

Example

const options = {
  mutual_authentication_id: "mutual_authentication_id_example", // required
  include: "include_example",
};

apiInstance.getMutualAuthentication(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
mutual_authentication_id String Alphanumeric string identifying a mutual authentication.
include String Comma-separated list of related objects to include (optional). Permitted values: tls_activations. Including TLS activations will provide you with the TLS domain names that are related to your Mutual TLS authentication. [optional]

Return type

MutualAuthenticationResponse

listMutualAuthentications

listMutualAuthentications({ , [include, ][page_number, ][page_size] })

List all mutual authentications.

Example

const options = {
  include: "include_example",
  page_number: 1,
  page_size: 20,
};

apiInstance.listMutualAuthentications(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
include String Comma-separated list of related objects to include (optional). Permitted values: tls_activations. Including TLS activations will provide you with the TLS domain names that are related to your Mutual TLS authentication. [optional]
page_number Number Current page. [optional]
page_size Number Number of records per page. [optional] [defaults to 20]

Return type

MutualAuthenticationsResponse

patchMutualAuthentication

patchMutualAuthentication({ mutual_authentication_id, [mutual_authentication] })

Update a Mutual Authentication.

Example

const options = {
  mutual_authentication_id: "mutual_authentication_id_example", // required
  mutual_authentication: {"data":{"type":"mutual_authentication","attributes":{"cert_bundle":"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n","enforced":false,"name":"Mutual Authentication B"}}},
};

apiInstance.patchMutualAuthentication(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
mutual_authentication_id String Alphanumeric string identifying a mutual authentication.
mutual_authentication MutualAuthentication [optional]

Return type

MutualAuthenticationResponse

[Back to top] [Back to API list] [Back to README]