Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dynatrace-sdk/client-app-engine-edge-connect

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dynatrace-sdk/client-app-engine-edge-connect - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

8

CHANGELOG.md

@@ -5,2 +5,10 @@ # AppEngine - EdgeConnect

## 1.2.2
### Patch Changes
- Update http-client
- Sanitize links in the documentation
- Add API reference to the readme file
## 1.2.1

@@ -7,0 +15,0 @@

16

cjs/index.js

@@ -552,11 +552,21 @@ /**

};
var addArrayQueryParam = (query, key) => {
var addExplodedArrayQueryParam = (query, key) => {
const arrayValue = query[key];
return arrayValue.map((value) => encodeQueryParam(key, value)).join("&");
};
var addNonExplodedArrayQueryParams = (query, key) => {
const encodedKey = encodeURIComponent(key);
const encodedParamsList = query[key].map((value) => encodeURIComponent(typeof value === "number" ? value : String(value))).join(",");
return `${encodedKey}=${encodedParamsList}`;
};
var addQueryParam = (query, key) => encodeQueryParam(key, query[key]);
var toQueryString = (rawQuery) => {
var arrayQueryParams = (query, key, explode) => {
return explode ? addExplodedArrayQueryParam(query, key) : addNonExplodedArrayQueryParams(query, key);
};
var toQueryString = (rawQuery, flags = {}) => {
const query = rawQuery || {};
const keys = Object.keys(query).filter((key) => typeof query[key] !== "undefined");
const queryString = keys.map((key) => Array.isArray(query[key]) ? addArrayQueryParam(query, key) : addQueryParam(query, key)).join("&");
const queryString = keys.map(
(key) => Array.isArray(query[key]) ? arrayQueryParams(query, key, flags.explode?.hasOwnProperty(key) ? flags.explode[key] : true) : addQueryParam(query, key)
).join("&");
return queryString ? `?${queryString}` : "";

@@ -563,0 +573,0 @@ };

326

docs/DOCS.md

@@ -8,22 +8,12 @@ ---

<h1>Overview</h1> EdgeConnect API manages EdgeConnect configurations that specify
which HTTP requests matching what URL host patterns will be forwarded to and executed
by that EdgeConnect. This enables forwarding of HTTP requests done in the Dynatrace
runtime to resources in private networks secured by [a deployed EdgeConnect](https://dt-url.net/edge-connect).
<h1>Overview</h1> EdgeConnect API manages EdgeConnect configurations that specify which HTTP requests matching what URL host patterns will be forwarded to and executed by that EdgeConnect. This enables forwarding of HTTP requests done in the Dynatrace runtime to resources in private networks secured by [a deployed EdgeConnect](https://dt-url.net/edge-connect).
import NpmLogo from "@site/static/img/npm-logo.png";
import NpmLogo from '@site/static/img/npm-logo.png';
<div class="row margin-bottom--md">
<div class="col">
<a href="https://www.npmjs.com/package/@dynatrace-sdk/client-app-engine-edge-connect">
<span class="margin-right--xs">
@dynatrace-sdk/client-app-engine-edge-connect
</span>
<img className="no-zoom" width="20px" src={NpmLogo} />
</a>
<a href="https://www.npmjs.com/package/@dynatrace-sdk/client-app-engine-edge-connect" target="_blank" rel="noopener noreferrer"> <span class="margin-right--xs">@dynatrace-sdk/client-app-engine-edge-connect</span> <img className="no-zoom" width="20px" src={NpmLogo} /> </a>
</div>
<div class="col" style={{ textAlign: "right" }}>
<a href="https://www.npmjs.com/package/@dynatrace-sdk/client-app-engine-edge-connect/v/1.2.1">
v1.2.1
</a>
<div class="col" style={{textAlign: 'right'}}>
<a href="https://www.npmjs.com/package/@dynatrace-sdk/client-app-engine-edge-connect/v/1.2.2" target="_blank" rel="noopener noreferrer">v1.2.2</a>
</div>

@@ -39,9 +29,10 @@ </div>

```js
import { edgeConnectClient } from "@dynatrace-sdk/client-app-engine-edge-connect";
import { edgeConnectClient } from '@dynatrace-sdk/client-app-engine-edge-connect';
```
### createEdgeConnect
<div class="padding-bottom--md">
<strong>edgeConnectClient.createEdgeConnect(config): Promise&lt;<a href="#edgeconnect">EdgeConnect</a>&gt;</strong>
<strong>edgeConnectClient.createEdgeConnect(config): Promise&lt;[EdgeConnect](#edgeconnect)&gt;</strong>

@@ -63,10 +54,16 @@ <div class="padding-left--md">

</div>
#### Parameters
| Name | Type |
| -------------------------------- | -------------------------------------- |
| config.body<sup>\*required</sup> | <a href="#edgeconnect">EdgeConnect</a> |
| Name | Type|
|---|---|
|config.body<sup>*required</sup>|[EdgeConnect](#edgeconnect)|
#### Returns

@@ -76,2 +73,3 @@

<details>

@@ -99,4 +97,7 @@ <summary>

</div>
### deleteEdgeConnect

@@ -115,12 +116,17 @@

</div>
#### Parameters
| Name | Type | Description |
| ----------------------------------------- | ----------------------------------------------------------------------------- | --------------------------------- |
| config.edgeConnectId<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | Specify the ID of the EdgeConnect |
| Name | Type| Description|
|---|---|---|
|config.edgeConnectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Specify the ID of the EdgeConnect |
{/* no returns */}
<details>

@@ -142,8 +148,11 @@ <summary>

</div>
### getEdgeConnect
<div class="padding-bottom--md">
<strong>edgeConnectClient.getEdgeConnect(config): Promise&lt;<a href="#edgeconnect">EdgeConnect</a>&gt;</strong>
<strong>edgeConnectClient.getEdgeConnect(config): Promise&lt;[EdgeConnect](#edgeconnect)&gt;</strong>

@@ -156,10 +165,16 @@ <div class="padding-left--md">

</div>
#### Parameters
| Name | Type | Description |
| ----------------------------------------- | ----------------------------------------------------------------------------- | --------------------------------- |
| config.edgeConnectId<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | Specify the ID of the EdgeConnect |
| Name | Type| Description|
|---|---|---|
|config.edgeConnectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Specify the ID of the EdgeConnect |
#### Returns

@@ -169,2 +184,3 @@

<details>

@@ -186,8 +202,11 @@ <summary>

</div>
### getMatchedEdgeConnects
<div class="padding-bottom--md">
<strong>edgeConnectClient.getMatchedEdgeConnects(config): Promise&lt;<a href="#matchedresponse">MatchedResponse</a>&gt;</strong>
<strong>edgeConnectClient.getMatchedEdgeConnects(config): Promise&lt;[MatchedResponse](#matchedresponse)&gt;</strong>

@@ -202,10 +221,16 @@ <div class="padding-left--md">

</div>
#### Parameters
| Name | Type | Description |
| ------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| config.url<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The URL which is used to check if there are any EdgeConnects with matching host patterns configured. Must be RFC 2396 compliant and use &quot;http&quot; or &quot;https&quot; as its scheme |
| Name | Type| Description|
|---|---|---|
|config.url<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The URL which is used to check if there are any EdgeConnects with matching host patterns configured. Must be RFC 2396 compliant and use &quot;http&quot; or &quot;https&quot; as its scheme |
#### Returns

@@ -215,2 +240,3 @@

<details>

@@ -225,5 +251,5 @@ <summary>

const data = await edgeConnectClient.getMatchedEdgeConnects({
url: "http://my.dynatrace.com",
});
const data = await edgeConnectClient.getMatchedEdgeConnects(
{ url: "http://my.dynatrace.com" },
);
```

@@ -233,8 +259,11 @@

</div>
### listEdgeConnects
<div class="padding-bottom--md">
<strong>edgeConnectClient.listEdgeConnects(config): Promise&lt;<a href="#edgeconnects">EdgeConnects</a>&gt;</strong>
<strong>edgeConnectClient.listEdgeConnects(config): Promise&lt;[EdgeConnects](#edgeconnects)&gt;</strong>

@@ -247,13 +276,19 @@ <div class="padding-left--md">

</div>
#### Parameters
| Name | Type | Description |
| ---------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| config.addFields | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | Provide a comma separated list of additional properties to be included in the response. |
| config.filter | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>The filter parameter for filtering the set of returned resources If this parameter is omitted, no filtering is applied and all states will be returned.</p> <p>Filtering by string type parameters <code>name</code>, <code>modificationInfo.lastModifiedBy</code> when using one of the operators <code>contains</code>, <code>starts-with</code> and <code>ends-with</code> is <strong>case insensitive</strong>.</p> <p>When using the operators <code>=</code>and <code>!=</code>, filtering is <strong>case sensitive</strong>.</p> <p>The following fields are legal filtering parameters - any other field names will result in a HTTP 400 response:</p> <ul> <li> <p><code>name</code>, supported operators: <code>=</code>, <code>!=</code>, <code>contains</code>, <code>starts-with</code>, <code>ends-with</code></p> </li> <li> <p><code>hostPatterns</code>, supported operators: <code>=</code>, <code>!=</code>, <code>contains</code>, <code>starts-with</code>, <code>ends-with</code></p> </li> <li> <p><code>oauthClientId</code>, supported operators: <code>=</code>, <code>!=</code>, <code>contains</code>, <code>starts-with</code>, <code>ends-with</code></p> </li> <li> <p><code>modificationInfo.lastModifiedTime</code>, supported operators: <code>=</code>, <code>!=</code>, <code>&lt;</code>, <code>&lt;=</code>, <code>&gt;</code>, <code>&gt;=</code></p> </li> <li> <p><code>modificationInfo.lastModifiedBy</code>, supported operators: <code>=</code>, <code>!=</code>, <code>contains</code>, <code>starts-with</code>, <code>ends-with</code></p> </li> </ul> <p>The following constraints apply:</p> <ul> <li> <p>Field names are <strong>case-sensitive</strong>.</p> </li> <li> <p>Conditions can be connected via operators <code>and</code> and <code>or</code>. A single condition can be negated by <code>not</code>.</p> </li> <li> <p>Strings <strong>must</strong> be enclosed in <strong>single quotes</strong>. e.g. <code>name contains 'my-string'</code></p> </li> <li> <p>Single quotes within a string must be escaped with a backslash: e.g. <code>name starts-with 'it\\'s a string'</code></p> </li> <li> <p>Maximum nesting depth (via brackets) is 2.</p> </li> <li> <p>Maximum length is 256 characters.</p> </li> </ul> <p>Examples:</p> <ul> <li> <p><code>name starts-with 'game-'</code></p> </li> <li> <p><code>modificationInfo.lastModifiedTime &gt;= '2022-07-01T00:10:05.000Z' and not (name contains 'new')</code></p> </li> </ul> |
| config.page | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | The index of the page to return. The first page will be returned if this parameters isn't specified. |
| config.pageSize | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | The number of resources to return in a single request. 1000 by default. |
| Name | Type| Description|
|---|---|---|
|config.addFields|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Provide a comma separated list of additional properties to be included in the response. |
|config.filter|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The filter parameter for filtering the set of returned resources If this parameter is omitted, no filtering is applied and all states will be returned.</p> <p>Filtering by string type parameters <code>name</code>, <code>modificationInfo.lastModifiedBy</code> when using one of the operators <code>contains</code>, <code>starts-with</code> and <code>ends-with</code> is <strong>case insensitive</strong>.</p> <p>When using the operators <code>=</code>and <code>!=</code>, filtering is <strong>case sensitive</strong>.</p> <p>The following fields are legal filtering parameters - any other field names will result in a HTTP 400 response:</p> <ul> <li> <p><code>name</code>, supported operators: <code>=</code>, <code>!=</code>, <code>contains</code>, <code>starts-with</code>, <code>ends-with</code></p> </li> <li> <p><code>hostPatterns</code>, supported operators: <code>=</code>, <code>!=</code>, <code>contains</code>, <code>starts-with</code>, <code>ends-with</code></p> </li> <li> <p><code>oauthClientId</code>, supported operators: <code>=</code>, <code>!=</code>, <code>contains</code>, <code>starts-with</code>, <code>ends-with</code></p> </li> <li> <p><code>modificationInfo.lastModifiedTime</code>, supported operators: <code>=</code>, <code>!=</code>, <code>&lt;</code>, <code>&lt;=</code>, <code>&gt;</code>, <code>&gt;=</code></p> </li> <li> <p><code>modificationInfo.lastModifiedBy</code>, supported operators: <code>=</code>, <code>!=</code>, <code>contains</code>, <code>starts-with</code>, <code>ends-with</code></p> </li> </ul> <p>The following constraints apply:</p> <ul> <li> <p>Field names are <strong>case-sensitive</strong>.</p> </li> <li> <p>Conditions can be connected via operators <code>and</code> and <code>or</code>. A single condition can be negated by <code>not</code>.</p> </li> <li> <p>Strings <strong>must</strong> be enclosed in <strong>single quotes</strong>. e.g. <code>name contains 'my-string'</code></p> </li> <li> <p>Single quotes within a string must be escaped with a backslash: e.g. <code>name starts-with 'it\\'s a string'</code></p> </li> <li> <p>Maximum nesting depth (via brackets) is 2.</p> </li> <li> <p>Maximum length is 256 characters.</p> </li> </ul> <p>Examples:</p> <ul> <li> <p><code>name starts-with 'game-'</code></p> </li> <li> <p><code>modificationInfo.lastModifiedTime &gt;= '2022-07-01T00:10:05.000Z' and not (name contains 'new')</code></p> </li> </ul> |
|config.page|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The index of the page to return. The first page will be returned if this parameters isn't specified. |
|config.pageSize|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The number of resources to return in a single request. 1000 by default. |
#### Returns

@@ -263,2 +298,3 @@

<details>

@@ -278,8 +314,11 @@ <summary>

</div>
### rotateOAuthClientSecret
<div class="padding-bottom--md">
<strong>edgeConnectClient.rotateOAuthClientSecret(config): Promise&lt;<a href="#oauthclientrotationresponse">OAuthClientRotationResponse</a>&gt;</strong>
<strong>edgeConnectClient.rotateOAuthClientSecret(config): Promise&lt;[OAuthClientRotationResponse](#oauthclientrotationresponse)&gt;</strong>

@@ -294,10 +333,16 @@ <div class="padding-left--md">

</div>
#### Parameters
| Name | Type | Description |
| ----------------------------------------- | ----------------------------------------------------------------------------- | --------------------------------- |
| config.edgeConnectId<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | Specify the ID of the EdgeConnect |
| Name | Type| Description|
|---|---|---|
|config.edgeConnectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Specify the ID of the EdgeConnect |
#### Returns

@@ -307,2 +352,3 @@

<details>

@@ -317,5 +363,6 @@ <summary>

const data = await edgeConnectClient.rotateOAuthClientSecret({
edgeConnectId: "11111111-2222-4444-3333-555555555555",
});
const data =
await edgeConnectClient.rotateOAuthClientSecret({
edgeConnectId: "11111111-2222-4444-3333-555555555555",
});
```

@@ -325,4 +372,7 @@

</div>
### updateEdgeConnect

@@ -339,13 +389,18 @@

</div>
#### Parameters
| Name | Type | Description |
| ----------------------------------------- | ----------------------------------------------------------------------------- | --------------------------------- |
| config.body<sup>\*required</sup> | <a href="#edgeconnect">EdgeConnect</a> | |
| config.edgeConnectId<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | Specify the ID of the EdgeConnect |
| Name | Type| Description|
|---|---|---|
|config.body<sup>*required</sup>|[EdgeConnect](#edgeconnect)| |
|config.edgeConnectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Specify the ID of the EdgeConnect |
{/* no returns */}
<details>

@@ -374,2 +429,4 @@ <summary>

</div>

@@ -381,98 +438,142 @@

| Name | Type |
| ---------------------------- | ----------------------------------------------------------------------------- |
| message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
| parameterLocation | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
| path | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
| Name | Type|
|---|---|
|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|parameterLocation|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|path|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
### EdgeConnect
Maps the specified host patterns to this EdgeConnect
| Name | Type | Description |
| --------------------------------- | ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| hostPatterns<sup>\*required</sup> | Array&lt;<a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>&gt; | |
| id | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
| managedByDynatraceOperator | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Boolean">boolean</a> | Flag to identify if an EdgeConnect is managed by the Dynatrace operator. False by default! |
| metadata | <a href="#metadata">Metadata</a> | |
| modificationInfo | <a href="#modificationinfo">ModificationInfo</a> | |
| name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
| oauthClientId | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | Id of OAuth client used to connect by the EdgeConnect |
| oauthClientResource | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | Resource of OAuth client used to connect by the EdgeConnect. Only provided when creating a new EdgeConnect. |
| oauthClientSecret | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | Secret of OAuth client used to connect by the EdgeConnect. Only provided when creating a new EdgeConnect. |
| Name | Type| Description|
|---|---|---|
|hostPatterns<sup>*required</sup>|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;| |
|id|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
|managedByDynatraceOperator|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|Flag to identify if an EdgeConnect is managed by the Dynatrace operator. False by default! |
|metadata|[Metadata](#metadata)| |
|modificationInfo|[ModificationInfo](#modificationinfo)| |
|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
|oauthClientId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Id of OAuth client used to connect by the EdgeConnect |
|oauthClientResource|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Resource of OAuth client used to connect by the EdgeConnect. Only provided when creating a new EdgeConnect. |
|oauthClientSecret|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Secret of OAuth client used to connect by the EdgeConnect. Only provided when creating a new EdgeConnect. |
### EdgeConnectInstance
| Name | Type |
| ---------- | ----------------------------------------------------------------------------- |
| instanceId | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
| version | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
| Name | Type|
|---|---|
|instanceId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|version|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
### EdgeConnects
| Name | Type | Description |
| ------------ | ----------------------------------------------------------------------------- | ------------------------------------------------- |
| edgeConnects | Array&lt;<a href="#edgeconnect">EdgeConnect</a>&gt; | |
| totalCount | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | Total number of currently configured EdgeConnects |
| Name | Type| Description|
|---|---|---|
|edgeConnects|Array&lt;[EdgeConnect](#edgeconnect)&gt;| |
|totalCount|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Total number of currently configured EdgeConnects |
### Error
| Name | Type |
| ---------------------------- | ----------------------------------------------------------------------------- |
| code<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> |
| details | <a href="#errordetails">ErrorDetails</a> |
| message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
| Name | Type|
|---|---|
|code<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|
|details|[ErrorDetails](#errordetails)|
|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
### ErrorDetails
| Name | Type |
| -------------------- | ------------------------------------------------------------------------------------------ |
| constraintViolations | Array&lt;<a href="#constraintviolation">ConstraintViolation</a>&gt; |
| missingScopes | Array&lt;<a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>&gt; |
| Name | Type|
|---|---|
|constraintViolations|Array&lt;[ConstraintViolation](#constraintviolation)&gt;|
|missingScopes|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|
### ErrorResponse
| Name | Type |
| -------------------------- | -------------------------- |
| error<sup>\*required</sup> | <a href="#error">Error</a> |
| Name | Type|
|---|---|
|error<sup>*required</sup>|[Error](#error)|
### MatchedEdgeConnect
Contains information about the EdgeConnect and the matched pattern
| Name | Type |
| ----------------------------------- | ----------------------------------------------------------------------------- |
| id<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
| matchedPattern<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
| metadata | <a href="#metadata">Metadata</a> |
| name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
| Name | Type|
|---|---|
|id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|matchedPattern<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|metadata|[Metadata](#metadata)|
|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
### MatchedResponse
| Name | Type |
| ----------------- | ----------------------------------------------------------------- |
| matched | <a href="#matchededgeconnect">MatchedEdgeConnect</a> |
| secondaryMatching | Array&lt;<a href="#matchededgeconnect">MatchedEdgeConnect</a>&gt; |
| Name | Type|
|---|---|
|matched|[MatchedEdgeConnect](#matchededgeconnect)|
|secondaryMatching|Array&lt;[MatchedEdgeConnect](#matchededgeconnect)&gt;|
### Metadata
| Name | Type |
| ----------------- | ------------------------------------------------------------------- |
| instances | Array&lt;<a href="#edgeconnectinstance">EdgeConnectInstance</a>&gt; |
| oauthClientStatus | MetadataOauthClientStatus |
| Name | Type|
|---|---|
|instances|Array&lt;[EdgeConnectInstance](#edgeconnectinstance)&gt;|
|oauthClientStatus|MetadataOauthClientStatus|
### ModificationInfo
| Name | Type |
| ------------------------------------- | ----------------------------------------------------------------------------- |
| lastModifiedBy<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
| lastModifiedTime<sup>\*required</sup> | Date |
| Name | Type|
|---|---|
|lastModifiedBy<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|lastModifiedTime<sup>*required</sup>|Date|
### OAuthClientRotationResponse
| Name | Type |
| --------------------------------- | ----------------------------------------------------------------------------- |
| clientId<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
| clientSecret<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
| Name | Type|
|---|---|
|clientId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|clientSecret<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
## Enums

@@ -494,2 +595,3 @@

</div>
{
"dynagen": {
"version": "0.13.1",
"version": "0.13.3",
"generatedAt": "",
"template": {
"name": "@dynatrace-sdk/template-typescript-client",
"version": "0.18.10"
"version": "0.18.12"
}

@@ -9,0 +9,0 @@ },

@@ -519,11 +519,21 @@ /**

};
var addArrayQueryParam = (query, key) => {
var addExplodedArrayQueryParam = (query, key) => {
const arrayValue = query[key];
return arrayValue.map((value) => encodeQueryParam(key, value)).join("&");
};
var addNonExplodedArrayQueryParams = (query, key) => {
const encodedKey = encodeURIComponent(key);
const encodedParamsList = query[key].map((value) => encodeURIComponent(typeof value === "number" ? value : String(value))).join(",");
return `${encodedKey}=${encodedParamsList}`;
};
var addQueryParam = (query, key) => encodeQueryParam(key, query[key]);
var toQueryString = (rawQuery) => {
var arrayQueryParams = (query, key, explode) => {
return explode ? addExplodedArrayQueryParam(query, key) : addNonExplodedArrayQueryParams(query, key);
};
var toQueryString = (rawQuery, flags = {}) => {
const query = rawQuery || {};
const keys = Object.keys(query).filter((key) => typeof query[key] !== "undefined");
const queryString = keys.map((key) => Array.isArray(query[key]) ? addArrayQueryParam(query, key) : addQueryParam(query, key)).join("&");
const queryString = keys.map(
(key) => Array.isArray(query[key]) ? arrayQueryParams(query, key, flags.explode?.hasOwnProperty(key) ? flags.explode[key] : true) : addQueryParam(query, key)
).join("&");
return queryString ? `?${queryString}` : "";

@@ -530,0 +540,0 @@ };

{
"name": "@dynatrace-sdk/client-app-engine-edge-connect",
"version": "1.2.1",
"version": "1.2.2",
"dependencies": {
"@dynatrace-sdk/error-handlers": "^1.2.0",
"@dynatrace-sdk/http-client": "^1.0.9"
"@dynatrace-sdk/http-client": "^1.0.10"
},

@@ -8,0 +8,0 @@ "license": "Apache-2.0",

# @dynatrace-sdk/client-app-engine-edge-connect
[![npm](https://img.shields.io/badge/npm-v1.2.1-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-app-engine-edge-connect/v/1.2.1)
[![npm](https://img.shields.io/badge/npm-v1.2.2-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-app-engine-edge-connect/v/1.2.2)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
<h1>Overview</h1> EdgeConnect API manages EdgeConnect configurations that specify
which HTTP requests matching what URL host patterns will be forwarded to and executed
by that EdgeConnect. This enables forwarding of HTTP requests done in the Dynatrace
runtime to resources in private networks secured by [a deployed EdgeConnect](https://dt-url.net/edge-connect).
<h1>Overview</h1> EdgeConnect API manages EdgeConnect configurations that specify which HTTP requests matching what URL host patterns will be forwarded to and executed by that EdgeConnect. This enables forwarding of HTTP requests done in the Dynatrace runtime to resources in private networks secured by [a deployed EdgeConnect](https://dt-url.net/edge-connect).
## Installation

@@ -17,6 +15,3 @@

## API reference
Full API reference for this SDK is available at [Dynatrace Developer](https://developer.dynatrace.com/reference/sdks/client-app-engine-edge-connect/).
## Getting help

@@ -27,4 +22,559 @@

## License
This SDK is distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), see LICENSE for more information.
# API reference
Full API reference for the latest version of the SDK is also available at the [Dynatrace Developer](https://developer.dynatrace.com/reference/sdks/client-app-engine-edge-connect/).
## edgeConnectClient
```js
import { edgeConnectClient } from '@dynatrace-sdk/client-app-engine-edge-connect';
```
### createEdgeConnect
<div class="padding-bottom--md">
<strong>edgeConnectClient.createEdgeConnect(config): Promise&lt;[EdgeConnect](#edgeconnect)&gt;</strong>
<div class="padding-left--md">
Create a new EdgeConnect.
**Required scope:** app-engine:edge-connects:write
You can either specify a UUID in the request body or a random UUID
will be assigned to the created EdgeConnect configuration.
The OAuth client ID is optional.
If no OAuth client ID is provided an OAuth client must be generated for that EdgeConnect. This additionally requires the `oauth2:clients:manage` scope allowing generation of OAuth clients with the `app-engine:edge-connects:connect` scope, e.g. via the following policy statement: `ALLOW oauth2:clients:manage where oauth2:scopes='app-engine:edge-connects:connect'`
The `oauth2:clients:manage` scope is not required if you provide an OAuth client ID.
The OAuth client ID, secret and resource will be returned in the response. The OAuth client secret is not retrievable later on.
</div>
#### Parameters
| Name | Type|
|---|---|
|config.body<sup>*required</sup>|[EdgeConnect](#edgeconnect)|
#### Returns
The EdgeConnect has been created successfully
<details>
<summary>
Code example
</summary>
```ts
import { edgeConnectClient } from "@dynatrace-sdk/client-app-engine-edge-connect";
const data = await edgeConnectClient.createEdgeConnect({
body: {
hostPatterns: ["*.internal.org"],
modificationInfo: {
lastModifiedBy: "12345678-abcd-efgh-1234-123456789",
lastModifiedTime: "2022-01-01T01:02:03.165Z",
},
},
});
```
</details>
</div>
### deleteEdgeConnect
<div class="padding-bottom--md">
<strong>edgeConnectClient.deleteEdgeConnect(config): Promise&lt;void&gt;</strong>
<div class="padding-left--md">
Delete an EdgeConnect
**Required scope:** app-engine:edge-connects:delete
Deletes the specified EdgeConnect configuration. If the configuration used an autogenerated OAuth client, then the `oauth2:clients:manage` for the `app-engine:edge-connects:connect` scope is required (e.g. via a policy statement like `ALLOW oauth2:clients:manage where oauth2:scopes='app-engine:edge-connects:connect'`) in order to allow the deletion of the corresponding OAuth client.
</div>
#### Parameters
| Name | Type| Description|
|---|---|---|
|config.edgeConnectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Specify the ID of the EdgeConnect |
<details>
<summary>
Code example
</summary>
```ts
import { edgeConnectClient } from "@dynatrace-sdk/client-app-engine-edge-connect";
const data = await edgeConnectClient.deleteEdgeConnect({
edgeConnectId: "11111111-2222-4444-3333-555555555555",
});
```
</details>
</div>
### getEdgeConnect
<div class="padding-bottom--md">
<strong>edgeConnectClient.getEdgeConnect(config): Promise&lt;[EdgeConnect](#edgeconnect)&gt;</strong>
<div class="padding-left--md">
Get an EdgeConnect
**Required scope:** app-engine:edge-connects:read
</div>
#### Parameters
| Name | Type| Description|
|---|---|---|
|config.edgeConnectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Specify the ID of the EdgeConnect |
#### Returns
The EdgeConnect configuration
<details>
<summary>
Code example
</summary>
```ts
import { edgeConnectClient } from "@dynatrace-sdk/client-app-engine-edge-connect";
const data = await edgeConnectClient.getEdgeConnect({
edgeConnectId: "11111111-2222-4444-3333-555555555555",
});
```
</details>
</div>
### getMatchedEdgeConnects
<div class="padding-bottom--md">
<strong>edgeConnectClient.getMatchedEdgeConnects(config): Promise&lt;[MatchedResponse](#matchedresponse)&gt;</strong>
<div class="padding-left--md">
Gets the matching EdgeConnect including alternatives for a URL.
**Required scope:** app-engine:edge-connects:read
Provides the EdgeConnect which matches the URL due to its configured host patterns. This EdgeConnect would receive a corresponding fetch request if done in the context of the Dynatrace runtime. In addition, this endpoint also provides other EdgeConnects which have matching host patterns that are not as specific (due to wildcard pattern usage) as the matched EdgeConnect
</div>
#### Parameters
| Name | Type| Description|
|---|---|---|
|config.url<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The URL which is used to check if there are any EdgeConnects with matching host patterns configured. Must be RFC 2396 compliant and use &quot;http&quot; or &quot;https&quot; as its scheme |
#### Returns
The matched EdgeConnect and considered alternatives which are more general
<details>
<summary>
Code example
</summary>
```ts
import { edgeConnectClient } from "@dynatrace-sdk/client-app-engine-edge-connect";
const data = await edgeConnectClient.getMatchedEdgeConnects(
{ url: "http://my.dynatrace.com" },
);
```
</details>
</div>
### listEdgeConnects
<div class="padding-bottom--md">
<strong>edgeConnectClient.listEdgeConnects(config): Promise&lt;[EdgeConnects](#edgeconnects)&gt;</strong>
<div class="padding-left--md">
List all EdgeConnects
**Required scope:** app-engine:edge-connects:read
</div>
#### Parameters
| Name | Type| Description|
|---|---|---|
|config.addFields|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Provide a comma separated list of additional properties to be included in the response. |
|config.filter|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The filter parameter for filtering the set of returned resources If this parameter is omitted, no filtering is applied and all states will be returned.</p> <p>Filtering by string type parameters <code>name</code>, <code>modificationInfo.lastModifiedBy</code> when using one of the operators <code>contains</code>, <code>starts-with</code> and <code>ends-with</code> is <strong>case insensitive</strong>.</p> <p>When using the operators <code>=</code>and <code>!=</code>, filtering is <strong>case sensitive</strong>.</p> <p>The following fields are legal filtering parameters - any other field names will result in a HTTP 400 response:</p> <ul> <li> <p><code>name</code>, supported operators: <code>=</code>, <code>!=</code>, <code>contains</code>, <code>starts-with</code>, <code>ends-with</code></p> </li> <li> <p><code>hostPatterns</code>, supported operators: <code>=</code>, <code>!=</code>, <code>contains</code>, <code>starts-with</code>, <code>ends-with</code></p> </li> <li> <p><code>oauthClientId</code>, supported operators: <code>=</code>, <code>!=</code>, <code>contains</code>, <code>starts-with</code>, <code>ends-with</code></p> </li> <li> <p><code>modificationInfo.lastModifiedTime</code>, supported operators: <code>=</code>, <code>!=</code>, <code>&lt;</code>, <code>&lt;=</code>, <code>&gt;</code>, <code>&gt;=</code></p> </li> <li> <p><code>modificationInfo.lastModifiedBy</code>, supported operators: <code>=</code>, <code>!=</code>, <code>contains</code>, <code>starts-with</code>, <code>ends-with</code></p> </li> </ul> <p>The following constraints apply:</p> <ul> <li> <p>Field names are <strong>case-sensitive</strong>.</p> </li> <li> <p>Conditions can be connected via operators <code>and</code> and <code>or</code>. A single condition can be negated by <code>not</code>.</p> </li> <li> <p>Strings <strong>must</strong> be enclosed in <strong>single quotes</strong>. e.g. <code>name contains 'my-string'</code></p> </li> <li> <p>Single quotes within a string must be escaped with a backslash: e.g. <code>name starts-with 'it\\'s a string'</code></p> </li> <li> <p>Maximum nesting depth (via brackets) is 2.</p> </li> <li> <p>Maximum length is 256 characters.</p> </li> </ul> <p>Examples:</p> <ul> <li> <p><code>name starts-with 'game-'</code></p> </li> <li> <p><code>modificationInfo.lastModifiedTime &gt;= '2022-07-01T00:10:05.000Z' and not (name contains 'new')</code></p> </li> </ul> |
|config.page|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The index of the page to return. The first page will be returned if this parameters isn't specified. |
|config.pageSize|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The number of resources to return in a single request. 1000 by default. |
#### Returns
A list of all EdgeConnects
<details>
<summary>
Code example
</summary>
```ts
import { edgeConnectClient } from "@dynatrace-sdk/client-app-engine-edge-connect";
const data = await edgeConnectClient.listEdgeConnects();
```
</details>
</div>
### rotateOAuthClientSecret
<div class="padding-bottom--md">
<strong>edgeConnectClient.rotateOAuthClientSecret(config): Promise&lt;[OAuthClientRotationResponse](#oauthclientrotationresponse)&gt;</strong>
<div class="padding-left--md">
Rotate the secret of the autogenerated OAuth client of the given EdgeConnect.
**Required scope:** oauth2:clients:manage
The secret rotation can only be used if the configured OAuth client is an autogenerated OAuth client. The scope `oauth2:clients:manage` for the `app-engine:edge-connects:connect` scope is required (e.g. via a policy like `ALLOW oauth2:clients:manage where oauth2:scopes='app-engine:edge-connects:connect'`).
</div>
#### Parameters
| Name | Type| Description|
|---|---|---|
|config.edgeConnectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Specify the ID of the EdgeConnect |
#### Returns
The OAuth client secret was rotated successfully
<details>
<summary>
Code example
</summary>
```ts
import { edgeConnectClient } from "@dynatrace-sdk/client-app-engine-edge-connect";
const data =
await edgeConnectClient.rotateOAuthClientSecret({
edgeConnectId: "11111111-2222-4444-3333-555555555555",
});
```
</details>
</div>
### updateEdgeConnect
<div class="padding-bottom--md">
<strong>edgeConnectClient.updateEdgeConnect(config): Promise&lt;void&gt;</strong>
<div class="padding-left--md">
Update an EdgeConnect
**Required scope:** app-engine:edge-connects:write
</div>
#### Parameters
| Name | Type| Description|
|---|---|---|
|config.body<sup>*required</sup>|[EdgeConnect](#edgeconnect)| |
|config.edgeConnectId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Specify the ID of the EdgeConnect |
<details>
<summary>
Code example
</summary>
```ts
import { edgeConnectClient } from "@dynatrace-sdk/client-app-engine-edge-connect";
const data = await edgeConnectClient.updateEdgeConnect({
edgeConnectId: "11111111-2222-4444-3333-555555555555",
body: {
hostPatterns: ["*.internal.org"],
modificationInfo: {
lastModifiedBy: "12345678-abcd-efgh-1234-123456789",
lastModifiedTime: "2022-01-01T01:02:03.165Z",
},
},
});
```
</details>
</div>
## Types
### ConstraintViolation
| Name | Type|
|---|---|
|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|parameterLocation|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|path|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
### EdgeConnect
Maps the specified host patterns to this EdgeConnect
| Name | Type| Description|
|---|---|---|
|hostPatterns<sup>*required</sup>|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;| |
|id|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
|managedByDynatraceOperator|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|Flag to identify if an EdgeConnect is managed by the Dynatrace operator. False by default! |
|metadata|[Metadata](#metadata)| |
|modificationInfo|[ModificationInfo](#modificationinfo)| |
|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
|oauthClientId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Id of OAuth client used to connect by the EdgeConnect |
|oauthClientResource|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Resource of OAuth client used to connect by the EdgeConnect. Only provided when creating a new EdgeConnect. |
|oauthClientSecret|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Secret of OAuth client used to connect by the EdgeConnect. Only provided when creating a new EdgeConnect. |
### EdgeConnectInstance
| Name | Type|
|---|---|
|instanceId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|version|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
### EdgeConnects
| Name | Type| Description|
|---|---|---|
|edgeConnects|Array&lt;[EdgeConnect](#edgeconnect)&gt;| |
|totalCount|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Total number of currently configured EdgeConnects |
### Error
| Name | Type|
|---|---|
|code<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|
|details|[ErrorDetails](#errordetails)|
|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
### ErrorDetails
| Name | Type|
|---|---|
|constraintViolations|Array&lt;[ConstraintViolation](#constraintviolation)&gt;|
|missingScopes|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|
### ErrorResponse
| Name | Type|
|---|---|
|error<sup>*required</sup>|[Error](#error)|
### MatchedEdgeConnect
Contains information about the EdgeConnect and the matched pattern
| Name | Type|
|---|---|
|id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|matchedPattern<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|metadata|[Metadata](#metadata)|
|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
### MatchedResponse
| Name | Type|
|---|---|
|matched|[MatchedEdgeConnect](#matchededgeconnect)|
|secondaryMatching|Array&lt;[MatchedEdgeConnect](#matchededgeconnect)&gt;|
### Metadata
| Name | Type|
|---|---|
|instances|Array&lt;[EdgeConnectInstance](#edgeconnectinstance)&gt;|
|oauthClientStatus|MetadataOauthClientStatus|
### ModificationInfo
| Name | Type|
|---|---|
|lastModifiedBy<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|lastModifiedTime<sup>*required</sup>|Date|
### OAuthClientRotationResponse
| Name | Type|
|---|---|
|clientId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
|clientSecret<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
## Enums
### MetadataOauthClientStatus
<div class="padding-left--md">
The status of the OAuth client
#### Enum keys
<div class="padding-left--md">
`Active` | `Deleted` | `Inactive` | `PendingDeletion`
</div>
</div>
declare type QueryParamsType = Record<string | number, any>;
export declare const toQueryString: (rawQuery?: QueryParamsType) => string;
interface ParametersFlags {
explode?: Record<string, boolean>;
}
export declare const toQueryString: (rawQuery?: QueryParamsType, flags?: ParametersFlags) => string;
export {};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc