AssociateLicenseCommand

Assigns a Grafana Enterprise license to a workspace. To upgrade, you must use ENTERPRISE for the licenseType, and pass in a valid Grafana Labs token for the grafanaToken. Upgrading to Grafana Enterprise incurs additional fees. For more information, see Upgrade a workspace to Grafana Enterprise .

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { GrafanaClient, AssociateLicenseCommand } from "@aws-sdk/client-grafana"; // ES Modules import
// const { GrafanaClient, AssociateLicenseCommand } = require("@aws-sdk/client-grafana"); // CommonJS import
const client = new GrafanaClient(config);
const input = { // AssociateLicenseRequest
  workspaceId: "STRING_VALUE", // required
  licenseType: "STRING_VALUE", // required
  grafanaToken: "STRING_VALUE",
};
const command = new AssociateLicenseCommand(input);
const response = await client.send(command);
// { // AssociateLicenseResponse
//   workspace: { // WorkspaceDescription
//     accountAccessType: "STRING_VALUE",
//     created: new Date("TIMESTAMP"), // required
//     dataSources: [ // DataSourceTypesList // required
//       "STRING_VALUE",
//     ],
//     description: "STRING_VALUE",
//     endpoint: "STRING_VALUE", // required
//     grafanaVersion: "STRING_VALUE", // required
//     id: "STRING_VALUE", // required
//     modified: new Date("TIMESTAMP"), // required
//     name: "STRING_VALUE",
//     organizationRoleName: "STRING_VALUE",
//     notificationDestinations: [ // NotificationDestinationsList
//       "STRING_VALUE",
//     ],
//     organizationalUnits: [ // OrganizationalUnitList
//       "STRING_VALUE",
//     ],
//     permissionType: "STRING_VALUE",
//     stackSetName: "STRING_VALUE",
//     status: "STRING_VALUE", // required
//     workspaceRoleArn: "STRING_VALUE",
//     licenseType: "STRING_VALUE",
//     freeTrialConsumed: true || false,
//     licenseExpiration: new Date("TIMESTAMP"),
//     freeTrialExpiration: new Date("TIMESTAMP"),
//     authentication: { // AuthenticationSummary
//       providers: [ // AuthenticationProviders // required
//         "STRING_VALUE",
//       ],
//       samlConfigurationStatus: "STRING_VALUE",
//     },
//     tags: { // TagMap
//       "<keys>": "STRING_VALUE",
//     },
//     vpcConfiguration: { // VpcConfiguration
//       securityGroupIds: [ // SecurityGroupIds // required
//         "STRING_VALUE",
//       ],
//       subnetIds: [ // SubnetIds // required
//         "STRING_VALUE",
//       ],
//     },
//     networkAccessControl: { // NetworkAccessConfiguration
//       prefixListIds: [ // PrefixListIds // required
//         "STRING_VALUE",
//       ],
//       vpceIds: [ // VpceIds // required
//         "STRING_VALUE",
//       ],
//     },
//     grafanaToken: "STRING_VALUE",
//   },
// };

AssociateLicenseCommand Input

See AssociateLicenseCommandInput for more details

Parameter
Type
Description
licenseType
Required
LicenseType | undefined

The type of license to associate with the workspace.

Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.

workspaceId
Required
string | undefined

The ID of the workspace to associate the license with.

grafanaToken
string | undefined

A token from Grafana Labs that ties your Amazon Web Services account with a Grafana Labs account. For more information, see Link your account with Grafana Labs .

AssociateLicenseCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
workspace
Required
WorkspaceDescription | undefined

A structure containing data about the workspace.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient permissions to perform this action.

InternalServerException
server

Unexpected error while processing the request. Retry the request.

ResourceNotFoundException
client

The request references a resource that does not exist.

ThrottlingException
client

The request was denied because of request throttling. Retry the request.

ValidationException
client

The value of a parameter in the request caused an error.

GrafanaServiceException
Base exception class for all service exceptions from Grafana service.