Skip to content

Latest commit

 

History

History
322 lines (217 loc) · 9.39 KB

RelayProxyConfigurationsApi.md

File metadata and controls

322 lines (217 loc) · 9.39 KB

LaunchDarklyApi.RelayProxyConfigurationsApi

All URIs are relative to https://app.launchdarkly.com

Method HTTP request Description
deleteRelayAutoConfig DELETE /api/v2/account/relay-auto-configs/{id} Delete Relay Proxy config by ID
getRelayProxyConfig GET /api/v2/account/relay-auto-configs/{id} Get Relay Proxy config
getRelayProxyConfigs GET /api/v2/account/relay-auto-configs List Relay Proxy configs
patchRelayAutoConfig PATCH /api/v2/account/relay-auto-configs/{id} Update a Relay Proxy config
postRelayAutoConfig POST /api/v2/account/relay-auto-configs Create a new Relay Proxy config
resetRelayAutoConfig POST /api/v2/account/relay-auto-configs/{id}/reset Reset Relay Proxy configuration key

deleteRelayAutoConfig

deleteRelayAutoConfig(id)

Delete Relay Proxy config by ID

Delete a Relay Proxy config.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.RelayProxyConfigurationsApi();
let id = "id_example"; // String | The relay auto config id
apiInstance.deleteRelayAutoConfig(id, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
id String The relay auto config id

Return type

null (empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getRelayProxyConfig

RelayAutoConfigRep getRelayProxyConfig(id)

Get Relay Proxy config

Get a single Relay Proxy auto config by ID.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.RelayProxyConfigurationsApi();
let id = "id_example"; // String | The relay auto config id
apiInstance.getRelayProxyConfig(id, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
id String The relay auto config id

Return type

RelayAutoConfigRep

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getRelayProxyConfigs

RelayAutoConfigCollectionRep getRelayProxyConfigs()

List Relay Proxy configs

Get a list of Relay Proxy configurations in the account.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.RelayProxyConfigurationsApi();
apiInstance.getRelayProxyConfigs((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

RelayAutoConfigCollectionRep

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

patchRelayAutoConfig

RelayAutoConfigRep patchRelayAutoConfig(id, patchWithComment)

Update a Relay Proxy config

Update a Relay Proxy configuration. Updating a configuration uses a JSON patch or JSON merge patch representation of the desired changes. To learn more, read Updates.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.RelayProxyConfigurationsApi();
let id = "id_example"; // String | The relay auto config id
let patchWithComment = {"patch":[{"op":"replace","path":"/policy/0","value":{"actions":["*"],"effect":"allow","resources":["proj/*:env/qa"]}}]}; // PatchWithComment | 
apiInstance.patchRelayAutoConfig(id, patchWithComment, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
id String The relay auto config id
patchWithComment PatchWithComment

Return type

RelayAutoConfigRep

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

postRelayAutoConfig

RelayAutoConfigRep postRelayAutoConfig(relayAutoConfigPost)

Create a new Relay Proxy config

Create a Relay Proxy config.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.RelayProxyConfigurationsApi();
let relayAutoConfigPost = {"name":"Sample Relay Proxy config for all proj and env","policy":[{"actions":["*"],"effect":"allow","resources":["proj/*:env/*"]}]}; // RelayAutoConfigPost | 
apiInstance.postRelayAutoConfig(relayAutoConfigPost, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
relayAutoConfigPost RelayAutoConfigPost

Return type

RelayAutoConfigRep

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

resetRelayAutoConfig

RelayAutoConfigRep resetRelayAutoConfig(id, opts)

Reset Relay Proxy configuration key

Reset a Relay Proxy configuration's secret key with an optional expiry time for the old key.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.RelayProxyConfigurationsApi();
let id = "id_example"; // String | The Relay Proxy configuration ID
let opts = {
  'expiry': 789 // Number | An expiration time for the old Relay Proxy configuration key, expressed as a Unix epoch time in milliseconds. By default, the Relay Proxy configuration will expire immediately.
};
apiInstance.resetRelayAutoConfig(id, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
id String The Relay Proxy configuration ID
expiry Number An expiration time for the old Relay Proxy configuration key, expressed as a Unix epoch time in milliseconds. By default, the Relay Proxy configuration will expire immediately. [optional]

Return type

RelayAutoConfigRep

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json