npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

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

v1.3.0

Published

[![npm](https://img.shields.io/badge/npm-v1.3.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-app-engine-edge-connect/v/1.3.0) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

Downloads

33

Readme

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

npm License

Installation

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

Getting help

License

This SDK is distributed under the Apache License, Version 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.

edgeConnectClient

import { edgeConnectClient } from '@dynatrace-sdk/client-app-engine-edge-connect';

createEdgeConnect

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 name must not be longer than 50 characters and must be 'RFC 1123' compliant. 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.

Parameters

| Name | Type | | --- | --- | |config.body*required|EdgeConnect|

Returns

The EdgeConnect has been created successfully

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",
    },
  },
});

deleteEdgeConnect

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.

Parameters

| Name | Type | Description | | --- | --- | --- | |config.edgeConnectId*required|string|Specify the ID of the EdgeConnect |

import { edgeConnectClient } from "@dynatrace-sdk/client-app-engine-edge-connect";

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

getEdgeConnect

Get an EdgeConnect

Required scope: app-engine:edge-connects:read

Parameters

| Name | Type | Description | | --- | --- | --- | |config.edgeConnectId*required|string|Specify the ID of the EdgeConnect |

Returns

The EdgeConnect configuration

import { edgeConnectClient } from "@dynatrace-sdk/client-app-engine-edge-connect";

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

getMatchedEdgeConnects

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

Parameters

| Name | Type | Description | | --- | --- | --- | |config.url*required|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 "http" or "https" as its scheme |

Returns

The matched EdgeConnect and considered alternatives which are more general

import { edgeConnectClient } from "@dynatrace-sdk/client-app-engine-edge-connect";

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

listEdgeConnects

List all EdgeConnects

Required scope: app-engine:edge-connects:read

Parameters

| Name | Type | Description | | --- | --- | --- | |config.addFields|string|Provide a comma separated list of additional properties to be included in the response. | |config.filter|string|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. Filtering by string type parameters name, modificationInfo.lastModifiedBy when using one of the operators contains, starts-with and ends-with is case insensitive. When using the operators =and !=, filtering is case sensitive. The following fields are legal filtering parameters - any other field names will result in a HTTP 400 response: name, supported operators: =, !=, contains, starts-with, ends-with hostPatterns, supported operators: =, !=, contains, starts-with, ends-with oauthClientId, supported operators: =, !=, contains, starts-with, ends-with modificationInfo.lastModifiedTime, supported operators: =, !=, <, <=, >, >= modificationInfo.lastModifiedBy, supported operators: =, !=, contains, starts-with, ends-with The following constraints apply: Field names are case-sensitive. Conditions can be connected via operators and and or. A single condition can be negated by not. Strings must be enclosed in single quotes. e.g. name contains 'my-string' Single quotes within a string must be escaped with a backslash: e.g. name starts-with 'it\'s a string' Maximum nesting depth (via brackets) is 2. Maximum length is 256 characters. Examples: name starts-with 'game-' modificationInfo.lastModifiedTime >= '2022-07-01T00:10:05.000Z' and not (name contains 'new') | |config.page|number|The index of the page to return. The first page will be returned if this parameters isn't specified. | |config.pageSize|number|The number of resources to return in a single request. 1000 by default. |

Returns

A list of all EdgeConnects

import { edgeConnectClient } from "@dynatrace-sdk/client-app-engine-edge-connect";

const data = await edgeConnectClient.listEdgeConnects();

rotateOAuthClientSecret

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').

Parameters

| Name | Type | Description | | --- | --- | --- | |config.edgeConnectId*required|string|Specify the ID of the EdgeConnect |

Returns

The OAuth client secret was rotated successfully

import { edgeConnectClient } from "@dynatrace-sdk/client-app-engine-edge-connect";

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

updateEdgeConnect

Update an EdgeConnect

Required scope: app-engine:edge-connects:write

Parameters

| Name | Type | Description | | --- | --- | --- | |config.body*required|EdgeConnect| | |config.edgeConnectId*required|string|Specify the ID of the EdgeConnect |

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",
    },
  },
});

Types

ConstraintViolation

| Name | Type | | --- | --- | |message*required|string| |parameterLocation|string| |path|string|

EdgeConnect

Maps the specified host patterns to this EdgeConnect

| Name | Type | Description | | --- | --- | --- | |hostMappings|Array<HostMapping>| | |hostPatterns*required|Array<string>| | |id|string| | |managedByDynatraceOperator|boolean|Flag to identify if an EdgeConnect is managed by the Dynatrace operator. False by default! | |metadata|Metadata| | |modificationInfo|ModificationInfo| | |name*required|string| | |oauthClientId|string|Id of OAuth client used to connect by the EdgeConnect | |oauthClientResource|string|Resource of OAuth client used to connect by the EdgeConnect. Only provided when creating a new EdgeConnect. | |oauthClientSecret|string|Secret of OAuth client used to connect by the EdgeConnect. Only provided when creating a new EdgeConnect. |

EdgeConnectInstance

| Name | Type | | --- | --- | |instanceId|string| |version|string|

EdgeConnects

| Name | Type | Description | | --- | --- | --- | |edgeConnects|Array<EdgeConnect>| | |totalCount|number|Total number of currently configured EdgeConnects |

Error

| Name | Type | | --- | --- | |code*required|number| |details|ErrorDetails| |message*required|string|

ErrorDetails

| Name | Type | | --- | --- | |constraintViolations|Array<ConstraintViolation>| |missingScopes|Array<string>|

ErrorResponse

| Name | Type | | --- | --- | |error*required|Error|

HostMapping

Todo

| Name | Type | | --- | --- | |from*required|string| |to*required|string|

MatchedEdgeConnect

Contains information about the EdgeConnect and the matched pattern

| Name | Type | | --- | --- | |id*required|string| |matchedPattern*required|string| |metadata|Metadata| |name*required|string|

MatchedResponse

| Name | Type | | --- | --- | |matched|MatchedEdgeConnect| |secondaryMatching|Array<MatchedEdgeConnect>|

Metadata

| Name | Type | | --- | --- | |instances|Array<EdgeConnectInstance>| |oauthClientStatus|MetadataOauthClientStatus|

ModificationInfo

| Name | Type | | --- | --- | |lastModifiedBy*required|string| |lastModifiedTime*required|Date|

OAuthClientRotationResponse

| Name | Type | | --- | --- | |clientId*required|string| |clientSecret*required|string|

Enums

MetadataOauthClientStatus

The status of the OAuth client

Enum keys

Active | Deleted | Inactive | PendingDeletion