Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@dynatrace-sdk/client-platform-management-service

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dynatrace-sdk/client-platform-management-service

[![npm](https://img.shields.io/badge/npm-v1.1.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-platform-management-service/v/1.1.0) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2

npmnpm
Version
1.1.0
Version published
Weekly downloads
2.4K
9.79%
Maintainers
3
Weekly downloads
 
Created
Source

@dynatrace-sdk/client-platform-management-service

npm License

Overview

Basic read-only information (e.g. basic license settings) about the currently logged-in environment

Installation

npm install @dynatrace-sdk/client-platform-management-service

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.

effectivePermissionsClient

import { effectivePermissionsClient } from '@dynatrace-sdk/client-platform-management-service';

resolveEffectivePermissions

effectivePermissionsClient.resolveEffectivePermissions(config): Promise<EffectivePermissions>

Get the effective permissions of the calling user in the environment

One of the following scopes is required:

  • app-engine:apps:run
  • app-engine:functions:run

This endpoint resolves the requested permissions based on the auth token used to call this endpoint. It resolves the permission via IAM and uses the provided context to evaluate conditional results. For 2nd gen environment API v2 scopes (i.e. scopes starting with environment-api:) 2nd gen roles on the environment and management zone level will also be considered.

Parameters

NameType
config.body*requiredResolutionRequest

Returns

Success

Code example
import { effectivePermissionsClient } from "@dynatrace-sdk/client-platform-management-service";

const data =
  await effectivePermissionsClient.resolveEffectivePermissions(
    { body: { permissions: [{ permission: "..." }] } },
  );

environmentInformationClient

import { environmentInformationClient } from '@dynatrace-sdk/client-platform-management-service';

getEnvironmentInformation

environmentInformationClient.getEnvironmentInformation(abortSignal?): Promise<EnvironmentInfo>

Get basic environment information

One of the following scopes is required:

  • app-engine:apps:run
  • app-engine:functions:run

Get basic information about the current environment.

Returns

Info about the requested environment.

Code example
import { environmentInformationClient } from "@dynatrace-sdk/client-platform-management-service";

const data =
  await environmentInformationClient.getEnvironmentInformation();

environmentSettingsClient

import { environmentSettingsClient } from '@dynatrace-sdk/client-platform-management-service';

getEnvironmentSettings

environmentSettingsClient.getEnvironmentSettings(abortSignal?): Promise<SettingsResponse>

Get settings for the environment

One of the following scopes is required:

  • app-engine:apps:run
  • app-engine:functions:run

Gets settings for environment.

Returns

The settings for the requested environment

Code example
import { environmentSettingsClient } from "@dynatrace-sdk/client-platform-management-service";

const data =
  await environmentSettingsClient.getEnvironmentSettings();

licenseInformationClient

import { licenseInformationClient } from '@dynatrace-sdk/client-platform-management-service';

getLicense

licenseInformationClient.getLicense(abortSignal?): Promise<License>

Get basic license information

One of the following scopes is required:

  • app-engine:apps:run
  • app-engine:functions:run

Get basic license information about the current environment.

Returns

The license info of the requested environment.

Code example
import { licenseInformationClient } from "@dynatrace-sdk/client-platform-management-service";

const data = await licenseInformationClient.getLicense();

getLicenseSettings

licenseInformationClient.getLicenseSettings(config): Promise<LicenseSettingsResponse>

Get basic license settings information

One of the following scopes is required:

  • app-engine:apps:run
  • app-engine:functions:run

Get basic license settings information about the current environment

Parameters

NameType
config.keysArray<string>

Returns

The license settings info of the requested environment.

Code example
import { licenseInformationClient } from "@dynatrace-sdk/client-platform-management-service";

const data =
  await licenseInformationClient.getLicenseSettings();

Types

EffectivePermission

NameType
granted*requiredEffectivePermissionGranted
permission*requiredstring

EffectivePermissions

extends Array<EffectivePermission>

NameTypeDescription
[unscopables]*requiredObject

Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.

length*requirednumberGets or sets the length of the array. This is a number one higher than the highest index in the array.

EnvironmentInfo

NameType
blockTimeDate
createTime*requiredDate
environmentId*requiredstring
state*requiredEnvironmentState
type*requiredEnvironmentInfoType

Error

Standard error response

NameType
code*requirednumber
message*requiredstring

License

NameType
platformSubscription*requiredboolean
trial*requiredboolean

LicenseSetting

NameType
key*requiredstring
value*requiredstring

LicenseSettingsResponse

NameType
settings*requiredArray<LicenseSetting>

PermissionContext

NameType
key*requiredstring
value*requiredstring

ResolutionRequest

NameType
permissions*requiredArray<SinglePermissionRequest>

SettingsResponse

NameTypeDescription
chatEnabled*requiredboolean
countryCodestringISO3166-1 alpha-2 two letter country code. See: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

SinglePermissionRequest

Optional generic set of context data

NameType
contextArray<PermissionContext>
permission*requiredstring

Enums

EffectivePermissionGranted

true: The caller has the permission false: The caller does not have the permission condition: The caller conditionally has the permission or in case of scopes starting with 'environment-api:' the caller only has the permission for specific management zones.

Enum keys

Condition | False | True

EnvironmentInfoType

Enum keys

Customer | Internal | SelfMonitoring

EnvironmentState

Enum keys

Active | BeingCreated | BeingDeleted | Blocked | Deactivated | DeletionFailed | PreAllocated

FAQs

Package last updated on 10 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts