You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use. For more information, see the Migration Guide and API Reference.

Class: AWS.Grafana

Inherits:
AWS.Service show all
Identifier:
grafana
API Version:
2020-08-18
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Amazon Managed Grafana is a fully managed and secure data visualization service that you can use to instantly query, correlate, and visualize operational metrics, logs, and traces from multiple sources. Amazon Managed Grafana makes it easy to deploy, operate, and scale Grafana, a widely deployed data visualization tool that is popular for its extensible data support.

With Amazon Managed Grafana, you create logically isolated Grafana servers called workspaces. In a workspace, you can create Grafana dashboards and visualizations to analyze your metrics, logs, and traces without having to build, package, or deploy any hardware to run Grafana servers.

Sending a Request Using Grafana

var grafana = new AWS.Grafana();
grafana.associateLicense(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the Grafana object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var grafana = new AWS.Grafana({apiVersion: '2020-08-18'});

You can also set the API version globally in AWS.config.apiVersions using the grafana service identifier:

AWS.config.apiVersions = {
  grafana: '2020-08-18',
  // other service API versions
};

var grafana = new AWS.Grafana();

Version:

  • 2020-08-18

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.Grafana(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a Grafana object

var grafana = new AWS.Grafana({apiVersion: '2020-08-18'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.Grafana.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.Grafana.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Grafana.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

associateLicense(params = {}, callback) ⇒ AWS.Request

Assigns a Grafana Enterprise license to a workspace. Upgrading to Grafana Enterprise incurs additional fees. For more information, see Upgrade a workspace to Grafana Enterprise.

Service Reference:

Examples:

Calling the associateLicense operation

var params = {
  licenseType: ENTERPRISE | ENTERPRISE_FREE_TRIAL, /* required */
  workspaceId: 'STRING_VALUE' /* required */
};
grafana.associateLicense(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • licenseType — (String)

      The type of license to associate with the workspace.

      Possible values include:
      • "ENTERPRISE"
      • "ENTERPRISE_FREE_TRIAL"
    • workspaceId — (String)

      The ID of the workspace to associate the license with.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • workspace — (map)

        A structure containing data about the workspace.

        • accountAccessType — (String)

          Specifies whether the workspace can access Amazon Web Services resources in this Amazon Web Services account only, or whether it can also access Amazon Web Services resources in other accounts in the same organization. If this is ORGANIZATION, the workspaceOrganizationalUnits parameter specifies which organizational units the workspace can access.

          Possible values include:
          • "CURRENT_ACCOUNT"
          • "ORGANIZATION"
        • authenticationrequired — (map)

          A structure that describes whether the workspace uses SAML, Amazon Web Services SSO, or both methods for user authentication.

          • providersrequired — (Array<String>)

            Specifies whether the workspace uses SAML, Amazon Web Services SSO, or both methods for user authentication.

          • samlConfigurationStatus — (String)

            Specifies whether the workplace's user authentication method is fully configured.

            Possible values include:
            • "CONFIGURED"
            • "NOT_CONFIGURED"
        • createdrequired — (Date)

          The date that the workspace was created.

        • dataSourcesrequired — (Array<String>)

          Specifies the Amazon Web Services data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources.

        • description — (String)

          The user-defined description of the workspace.

        • endpointrequired — (String)

          The URL that users can use to access the Grafana console in the workspace.

        • freeTrialConsumed — (Boolean)

          Specifies whether this workspace has already fully used its free trial for Grafana Enterprise.

        • freeTrialExpiration — (Date)

          If this workspace is currently in the free trial period for Grafana Enterprise, this value specifies when that free trial ends.

        • grafanaVersionrequired — (String)

          The version of Grafana supported in this workspace.

        • idrequired — (String)

          The unique ID of this workspace.

        • licenseExpiration — (Date)

          If this workspace has a full Grafana Enterprise license, this specifies when the license ends and will need to be renewed.

        • licenseType — (String)

          Specifies whether this workspace has a full Grafana Enterprise license or a free trial license.

          Possible values include:
          • "ENTERPRISE"
          • "ENTERPRISE_FREE_TRIAL"
        • modifiedrequired — (Date)

          The most recent date that the workspace was modified.

        • name — (String)

          The name of the workspace.

        • notificationDestinations — (Array<String>)

          The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.

        • organizationRoleName — (String)

          The name of the IAM role that is used to access resources through Organizations.

        • organizationalUnits — (Array<String>)

          Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.

        • permissionType — (String)

          If this is Service Managed, Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use Amazon Web Services data sources and notification channels.

          If this is CUSTOMER_MANAGED, you manage those roles and permissions yourself. If you are creating this workspace in a member account of an organization and that account is not a delegated administrator account, and you want the workspace to access data sources in other Amazon Web Services accounts in the organization, you must choose CUSTOMER_MANAGED.

          For more information, see Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels

          Possible values include:
          • "CUSTOMER_MANAGED"
          • "SERVICE_MANAGED"
        • stackSetName — (String)

          The name of the CloudFormation stack set that is used to generate IAM roles to be used for this workspace.

        • statusrequired — (String)

          The current status of the workspace.

          Possible values include:
          • "ACTIVE"
          • "CREATING"
          • "DELETING"
          • "FAILED"
          • "UPDATING"
          • "UPGRADING"
          • "DELETION_FAILED"
          • "CREATION_FAILED"
          • "UPDATE_FAILED"
          • "UPGRADE_FAILED"
          • "LICENSE_REMOVAL_FAILED"
        • workspaceRoleArn — (String)

          The IAM role that grants permissions to the Amazon Web Services resources that the workspace will view data from. This role must already exist.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createWorkspace(params = {}, callback) ⇒ AWS.Request

Creates a workspace. In a workspace, you can create Grafana dashboards and visualizations to analyze your metrics, logs, and traces. You don't have to build, package, or deploy any hardware to run the Grafana server.

Don't use CreateWorkspace to modify an existing workspace. Instead, use UpdateWorkspace.

Service Reference:

Examples:

Calling the createWorkspace operation

var params = {
  accountAccessType: CURRENT_ACCOUNT | ORGANIZATION, /* required */
  authenticationProviders: [ /* required */
    AWS_SSO | SAML,
    /* more items */
  ],
  permissionType: CUSTOMER_MANAGED | SERVICE_MANAGED, /* required */
  clientToken: 'STRING_VALUE',
  organizationRoleName: 'STRING_VALUE',
  stackSetName: 'STRING_VALUE',
  workspaceDataSources: [
    AMAZON_OPENSEARCH_SERVICE | CLOUDWATCH | PROMETHEUS | XRAY | TIMESTREAM | SITEWISE,
    /* more items */
  ],
  workspaceDescription: 'STRING_VALUE',
  workspaceName: 'STRING_VALUE',
  workspaceNotificationDestinations: [
    SNS,
    /* more items */
  ],
  workspaceOrganizationalUnits: [
    'STRING_VALUE',
    /* more items */
  ],
  workspaceRoleArn: 'STRING_VALUE'
};
grafana.createWorkspace(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • accountAccessType — (String)

      Specifies whether the workspace can access Amazon Web Services resources in this Amazon Web Services account only, or whether it can also access Amazon Web Services resources in other accounts in the same organization. If you specify ORGANIZATION, you must specify which organizational units the workspace can access in the workspaceOrganizationalUnits parameter.

      Possible values include:
      • "CURRENT_ACCOUNT"
      • "ORGANIZATION"
    • authenticationProviders — (Array<String>)

      Specifies whether this workspace uses SAML 2.0, Amazon Web Services Single Sign On, or both to authenticate users for using the Grafana console within a workspace. For more information, see User authentication in Amazon Managed Grafana.

    • clientToken — (String)

      A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.

      If a token is not provided, the SDK will use a version 4 UUID.
    • organizationRoleName — (String)

      The name of an IAM role that already exists to use with Organizations to access Amazon Web Services data sources and notification channels in other accounts in an organization.

    • permissionType — (String)

      If you specify Service Managed, Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use Amazon Web Services data sources and notification channels.

      If you specify CUSTOMER_MANAGED, you will manage those roles and permissions yourself. If you are creating this workspace in a member account of an organization that is not a delegated administrator account, and you want the workspace to access data sources in other Amazon Web Services accounts in the organization, you must choose CUSTOMER_MANAGED.

      For more information, see Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels

      Possible values include:
      • "CUSTOMER_MANAGED"
      • "SERVICE_MANAGED"
    • stackSetName — (String)

      The name of the CloudFormation stack set to use to generate IAM roles to be used for this workspace.

    • workspaceDataSources — (Array<String>)

      Specify the Amazon Web Services data sources that you want to be queried in this workspace. Specifying these data sources here enables Amazon Managed Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to read data from these sources. You must still add them as data sources in the Grafana console in the workspace.

      If you don't specify a data source here, you can still add it as a data source in the workspace console later. However, you will then have to manually configure permissions for it.

    • workspaceDescription — (String)

      A description for the workspace. This is used only to help you identify this workspace.

    • workspaceName — (String)

      The name for the workspace. It does not have to be unique.

    • workspaceNotificationDestinations — (Array<String>)

      Specify the Amazon Web Services notification channels that you plan to use in this workspace. Specifying these data sources here enables Amazon Managed Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to use these channels.

    • workspaceOrganizationalUnits — (Array<String>)

      Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.

    • workspaceRoleArn — (String)

      The workspace needs an IAM role that grants permissions to the Amazon Web Services resources that the workspace will view data from. If you already have a role that you want to use, specify it here. If you omit this field and you specify some Amazon Web Services resources in workspaceDataSources or workspaceNotificationDestinations, a new IAM role with the necessary permissions is automatically created.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • workspace — (map)

        A structure containing data about the workspace that was created.

        • accountAccessType — (String)

          Specifies whether the workspace can access Amazon Web Services resources in this Amazon Web Services account only, or whether it can also access Amazon Web Services resources in other accounts in the same organization. If this is ORGANIZATION, the workspaceOrganizationalUnits parameter specifies which organizational units the workspace can access.

          Possible values include:
          • "CURRENT_ACCOUNT"
          • "ORGANIZATION"
        • authenticationrequired — (map)

          A structure that describes whether the workspace uses SAML, Amazon Web Services SSO, or both methods for user authentication.

          • providersrequired — (Array<String>)

            Specifies whether the workspace uses SAML, Amazon Web Services SSO, or both methods for user authentication.

          • samlConfigurationStatus — (String)

            Specifies whether the workplace's user authentication method is fully configured.

            Possible values include:
            • "CONFIGURED"
            • "NOT_CONFIGURED"
        • createdrequired — (Date)

          The date that the workspace was created.

        • dataSourcesrequired — (Array<String>)

          Specifies the Amazon Web Services data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources.

        • description — (String)

          The user-defined description of the workspace.

        • endpointrequired — (String)

          The URL that users can use to access the Grafana console in the workspace.

        • freeTrialConsumed — (Boolean)

          Specifies whether this workspace has already fully used its free trial for Grafana Enterprise.

        • freeTrialExpiration — (Date)

          If this workspace is currently in the free trial period for Grafana Enterprise, this value specifies when that free trial ends.

        • grafanaVersionrequired — (String)

          The version of Grafana supported in this workspace.

        • idrequired — (String)

          The unique ID of this workspace.

        • licenseExpiration — (Date)

          If this workspace has a full Grafana Enterprise license, this specifies when the license ends and will need to be renewed.

        • licenseType — (String)

          Specifies whether this workspace has a full Grafana Enterprise license or a free trial license.

          Possible values include:
          • "ENTERPRISE"
          • "ENTERPRISE_FREE_TRIAL"
        • modifiedrequired — (Date)

          The most recent date that the workspace was modified.

        • name — (String)

          The name of the workspace.

        • notificationDestinations — (Array<String>)

          The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.

        • organizationRoleName — (String)

          The name of the IAM role that is used to access resources through Organizations.

        • organizationalUnits — (Array<String>)

          Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.

        • permissionType — (String)

          If this is Service Managed, Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use Amazon Web Services data sources and notification channels.

          If this is CUSTOMER_MANAGED, you manage those roles and permissions yourself. If you are creating this workspace in a member account of an organization and that account is not a delegated administrator account, and you want the workspace to access data sources in other Amazon Web Services accounts in the organization, you must choose CUSTOMER_MANAGED.

          For more information, see Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels

          Possible values include:
          • "CUSTOMER_MANAGED"
          • "SERVICE_MANAGED"
        • stackSetName — (String)

          The name of the CloudFormation stack set that is used to generate IAM roles to be used for this workspace.

        • statusrequired — (String)

          The current status of the workspace.

          Possible values include:
          • "ACTIVE"
          • "CREATING"
          • "DELETING"
          • "FAILED"
          • "UPDATING"
          • "UPGRADING"
          • "DELETION_FAILED"
          • "CREATION_FAILED"
          • "UPDATE_FAILED"
          • "UPGRADE_FAILED"
          • "LICENSE_REMOVAL_FAILED"
        • workspaceRoleArn — (String)

          The IAM role that grants permissions to the Amazon Web Services resources that the workspace will view data from. This role must already exist.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteWorkspace(params = {}, callback) ⇒ AWS.Request

Deletes an Amazon Managed Grafana workspace.

Service Reference:

Examples:

Calling the deleteWorkspace operation

var params = {
  workspaceId: 'STRING_VALUE' /* required */
};
grafana.deleteWorkspace(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • workspaceId — (String)

      The ID of the workspace to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • workspace — (map)

        A structure containing information about the workspace that was deleted.

        • accountAccessType — (String)

          Specifies whether the workspace can access Amazon Web Services resources in this Amazon Web Services account only, or whether it can also access Amazon Web Services resources in other accounts in the same organization. If this is ORGANIZATION, the workspaceOrganizationalUnits parameter specifies which organizational units the workspace can access.

          Possible values include:
          • "CURRENT_ACCOUNT"
          • "ORGANIZATION"
        • authenticationrequired — (map)

          A structure that describes whether the workspace uses SAML, Amazon Web Services SSO, or both methods for user authentication.

          • providersrequired — (Array<String>)

            Specifies whether the workspace uses SAML, Amazon Web Services SSO, or both methods for user authentication.

          • samlConfigurationStatus — (String)

            Specifies whether the workplace's user authentication method is fully configured.

            Possible values include:
            • "CONFIGURED"
            • "NOT_CONFIGURED"
        • createdrequired — (Date)

          The date that the workspace was created.

        • dataSourcesrequired — (Array<String>)

          Specifies the Amazon Web Services data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources.

        • description — (String)

          The user-defined description of the workspace.

        • endpointrequired — (String)

          The URL that users can use to access the Grafana console in the workspace.

        • freeTrialConsumed — (Boolean)

          Specifies whether this workspace has already fully used its free trial for Grafana Enterprise.

        • freeTrialExpiration — (Date)

          If this workspace is currently in the free trial period for Grafana Enterprise, this value specifies when that free trial ends.

        • grafanaVersionrequired — (String)

          The version of Grafana supported in this workspace.

        • idrequired — (String)

          The unique ID of this workspace.

        • licenseExpiration — (Date)

          If this workspace has a full Grafana Enterprise license, this specifies when the license ends and will need to be renewed.

        • licenseType — (String)

          Specifies whether this workspace has a full Grafana Enterprise license or a free trial license.

          Possible values include:
          • "ENTERPRISE"
          • "ENTERPRISE_FREE_TRIAL"
        • modifiedrequired — (Date)

          The most recent date that the workspace was modified.

        • name — (String)

          The name of the workspace.

        • notificationDestinations — (Array<String>)

          The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.

        • organizationRoleName — (String)

          The name of the IAM role that is used to access resources through Organizations.

        • organizationalUnits — (Array<String>)

          Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.

        • permissionType — (String)

          If this is Service Managed, Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use Amazon Web Services data sources and notification channels.

          If this is CUSTOMER_MANAGED, you manage those roles and permissions yourself. If you are creating this workspace in a member account of an organization and that account is not a delegated administrator account, and you want the workspace to access data sources in other Amazon Web Services accounts in the organization, you must choose CUSTOMER_MANAGED.

          For more information, see Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels

          Possible values include:
          • "CUSTOMER_MANAGED"
          • "SERVICE_MANAGED"
        • stackSetName — (String)

          The name of the CloudFormation stack set that is used to generate IAM roles to be used for this workspace.

        • statusrequired — (String)

          The current status of the workspace.

          Possible values include:
          • "ACTIVE"
          • "CREATING"
          • "DELETING"
          • "FAILED"
          • "UPDATING"
          • "UPGRADING"
          • "DELETION_FAILED"
          • "CREATION_FAILED"
          • "UPDATE_FAILED"
          • "UPGRADE_FAILED"
          • "LICENSE_REMOVAL_FAILED"
        • workspaceRoleArn — (String)

          The IAM role that grants permissions to the Amazon Web Services resources that the workspace will view data from. This role must already exist.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeWorkspace(params = {}, callback) ⇒ AWS.Request

Displays information about one Amazon Managed Grafana workspace.

Service Reference:

Examples:

Calling the describeWorkspace operation

var params = {
  workspaceId: 'STRING_VALUE' /* required */
};
grafana.describeWorkspace(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • workspaceId — (String)

      The ID of the workspace to display information about.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • workspace — (map)

        A structure containing information about the workspace.

        • accountAccessType — (String)

          Specifies whether the workspace can access Amazon Web Services resources in this Amazon Web Services account only, or whether it can also access Amazon Web Services resources in other accounts in the same organization. If this is ORGANIZATION, the workspaceOrganizationalUnits parameter specifies which organizational units the workspace can access.

          Possible values include:
          • "CURRENT_ACCOUNT"
          • "ORGANIZATION"
        • authenticationrequired — (map)

          A structure that describes whether the workspace uses SAML, Amazon Web Services SSO, or both methods for user authentication.

          • providersrequired — (Array<String>)

            Specifies whether the workspace uses SAML, Amazon Web Services SSO, or both methods for user authentication.

          • samlConfigurationStatus — (String)

            Specifies whether the workplace's user authentication method is fully configured.

            Possible values include:
            • "CONFIGURED"
            • "NOT_CONFIGURED"
        • createdrequired — (Date)

          The date that the workspace was created.

        • dataSourcesrequired — (Array<String>)

          Specifies the Amazon Web Services data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources.

        • description — (String)

          The user-defined description of the workspace.

        • endpointrequired — (String)

          The URL that users can use to access the Grafana console in the workspace.

        • freeTrialConsumed — (Boolean)

          Specifies whether this workspace has already fully used its free trial for Grafana Enterprise.

        • freeTrialExpiration — (Date)

          If this workspace is currently in the free trial period for Grafana Enterprise, this value specifies when that free trial ends.

        • grafanaVersionrequired — (String)

          The version of Grafana supported in this workspace.

        • idrequired — (String)

          The unique ID of this workspace.

        • licenseExpiration — (Date)

          If this workspace has a full Grafana Enterprise license, this specifies when the license ends and will need to be renewed.

        • licenseType — (String)

          Specifies whether this workspace has a full Grafana Enterprise license or a free trial license.

          Possible values include:
          • "ENTERPRISE"
          • "ENTERPRISE_FREE_TRIAL"
        • modifiedrequired — (Date)

          The most recent date that the workspace was modified.

        • name — (String)

          The name of the workspace.

        • notificationDestinations — (Array<String>)

          The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.

        • organizationRoleName — (String)

          The name of the IAM role that is used to access resources through Organizations.

        • organizationalUnits — (Array<String>)

          Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.

        • permissionType — (String)

          If this is Service Managed, Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use Amazon Web Services data sources and notification channels.

          If this is CUSTOMER_MANAGED, you manage those roles and permissions yourself. If you are creating this workspace in a member account of an organization and that account is not a delegated administrator account, and you want the workspace to access data sources in other Amazon Web Services accounts in the organization, you must choose CUSTOMER_MANAGED.

          For more information, see Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels

          Possible values include:
          • "CUSTOMER_MANAGED"
          • "SERVICE_MANAGED"
        • stackSetName — (String)

          The name of the CloudFormation stack set that is used to generate IAM roles to be used for this workspace.

        • statusrequired — (String)

          The current status of the workspace.

          Possible values include:
          • "ACTIVE"
          • "CREATING"
          • "DELETING"
          • "FAILED"
          • "UPDATING"
          • "UPGRADING"
          • "DELETION_FAILED"
          • "CREATION_FAILED"
          • "UPDATE_FAILED"
          • "UPGRADE_FAILED"
          • "LICENSE_REMOVAL_FAILED"
        • workspaceRoleArn — (String)

          The IAM role that grants permissions to the Amazon Web Services resources that the workspace will view data from. This role must already exist.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeWorkspaceAuthentication(params = {}, callback) ⇒ AWS.Request

Displays information about the authentication methods used in one Amazon Managed Grafana workspace.

Service Reference:

Examples:

Calling the describeWorkspaceAuthentication operation

var params = {
  workspaceId: 'STRING_VALUE' /* required */
};
grafana.describeWorkspaceAuthentication(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • workspaceId — (String)

      The ID of the workspace to return authentication information about.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • authentication — (map)

        A structure containing information about the authentication methods used in the workspace.

        • awsSso — (map)

          A structure containing information about how this workspace works with Amazon Web Services SSO.

          • ssoClientId — (String)

            The ID of the Amazon Web Services SSO-managed application that is created by Amazon Managed Grafana.

        • providersrequired — (Array<String>)

          Specifies whether this workspace uses Amazon Web Services SSO, SAML, or both methods to authenticate users to use the Grafana console in the Amazon Managed Grafana workspace.

        • saml — (map)

          A structure containing information about how this workspace works with SAML, including what attributes within the assertion are to be mapped to user information in the workspace.

          • configuration — (map)

            A structure containing details about how this workspace works with SAML.

            • allowedOrganizations — (Array<String>)

              Lists which organizations defined in the SAML assertion are allowed to use the Amazon Managed Grafana workspace. If this is empty, all organizations in the assertion attribute have access.

            • assertionAttributes — (map)

              A structure that defines which attributes in the SAML assertion are to be used to define information about the users authenticated by that IdP to use the workspace.

              • email — (String)

                The name of the attribute within the SAML assertion to use as the email names for SAML users.

              • groups — (String)

                The name of the attribute within the SAML assertion to use as the user full "friendly" names for user groups.

              • login — (String)

                The name of the attribute within the SAML assertion to use as the login names for SAML users.

              • name — (String)

                The name of the attribute within the SAML assertion to use as the user full "friendly" names for SAML users.

              • org — (String)

                The name of the attribute within the SAML assertion to use as the user full "friendly" names for the users' organizations.

              • role — (String)

                The name of the attribute within the SAML assertion to use as the user roles.

            • idpMetadatarequired — (map)

              A structure containing the identity provider (IdP) metadata used to integrate the identity provider with this workspace.

              • url — (String)

                The URL of the location containing the metadata.

              • xml — (String)

                The actual full metadata file, in XML format.

            • loginValidityDuration — (Integer)

              How long a sign-on session by a SAML user is valid, before the user has to sign on again.

            • roleValues — (map)

              A structure containing arrays that map group names in the SAML assertion to the Grafana Admin and Editor roles in the workspace.

              • admin — (Array<String>)

                A list of groups from the SAML assertion attribute to grant the Grafana Admin role to.

              • editor — (Array<String>)

                A list of groups from the SAML assertion attribute to grant the Grafana Editor role to.

          • statusrequired — (String)

            Specifies whether the workspace's SAML configuration is complete.

            Possible values include:
            • "CONFIGURED"
            • "NOT_CONFIGURED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateLicense(params = {}, callback) ⇒ AWS.Request

Removes the Grafana Enterprise license from a workspace.

Service Reference:

Examples:

Calling the disassociateLicense operation

var params = {
  licenseType: ENTERPRISE | ENTERPRISE_FREE_TRIAL, /* required */
  workspaceId: 'STRING_VALUE' /* required */
};
grafana.disassociateLicense(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • licenseType — (String)

      The type of license to remove from the workspace.

      Possible values include:
      • "ENTERPRISE"
      • "ENTERPRISE_FREE_TRIAL"
    • workspaceId — (String)

      The ID of the workspace to remove the Grafana Enterprise license from.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • workspace — (map)

        A structure containing information about the workspace.

        • accountAccessType — (String)

          Specifies whether the workspace can access Amazon Web Services resources in this Amazon Web Services account only, or whether it can also access Amazon Web Services resources in other accounts in the same organization. If this is ORGANIZATION, the workspaceOrganizationalUnits parameter specifies which organizational units the workspace can access.

          Possible values include:
          • "CURRENT_ACCOUNT"
          • "ORGANIZATION"
        • authenticationrequired — (map)

          A structure that describes whether the workspace uses SAML, Amazon Web Services SSO, or both methods for user authentication.

          • providersrequired — (Array<String>)

            Specifies whether the workspace uses SAML, Amazon Web Services SSO, or both methods for user authentication.

          • samlConfigurationStatus — (String)

            Specifies whether the workplace's user authentication method is fully configured.

            Possible values include:
            • "CONFIGURED"
            • "NOT_CONFIGURED"
        • createdrequired — (Date)

          The date that the workspace was created.

        • dataSourcesrequired — (Array<String>)

          Specifies the Amazon Web Services data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources.

        • description — (String)

          The user-defined description of the workspace.

        • endpointrequired — (String)

          The URL that users can use to access the Grafana console in the workspace.

        • freeTrialConsumed — (Boolean)

          Specifies whether this workspace has already fully used its free trial for Grafana Enterprise.

        • freeTrialExpiration — (Date)

          If this workspace is currently in the free trial period for Grafana Enterprise, this value specifies when that free trial ends.

        • grafanaVersionrequired — (String)

          The version of Grafana supported in this workspace.

        • idrequired — (String)

          The unique ID of this workspace.

        • licenseExpiration — (Date)

          If this workspace has a full Grafana Enterprise license, this specifies when the license ends and will need to be renewed.

        • licenseType — (String)

          Specifies whether this workspace has a full Grafana Enterprise license or a free trial license.

          Possible values include:
          • "ENTERPRISE"
          • "ENTERPRISE_FREE_TRIAL"
        • modifiedrequired — (Date)

          The most recent date that the workspace was modified.

        • name — (String)

          The name of the workspace.

        • notificationDestinations — (Array<String>)

          The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.

        • organizationRoleName — (String)

          The name of the IAM role that is used to access resources through Organizations.

        • organizationalUnits — (Array<String>)

          Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.

        • permissionType — (String)

          If this is Service Managed, Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use Amazon Web Services data sources and notification channels.

          If this is CUSTOMER_MANAGED, you manage those roles and permissions yourself. If you are creating this workspace in a member account of an organization and that account is not a delegated administrator account, and you want the workspace to access data sources in other Amazon Web Services accounts in the organization, you must choose CUSTOMER_MANAGED.

          For more information, see Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels

          Possible values include:
          • "CUSTOMER_MANAGED"
          • "SERVICE_MANAGED"
        • stackSetName — (String)

          The name of the CloudFormation stack set that is used to generate IAM roles to be used for this workspace.

        • statusrequired — (String)

          The current status of the workspace.

          Possible values include:
          • "ACTIVE"
          • "CREATING"
          • "DELETING"
          • "FAILED"
          • "UPDATING"
          • "UPGRADING"
          • "DELETION_FAILED"
          • "CREATION_FAILED"
          • "UPDATE_FAILED"
          • "UPGRADE_FAILED"
          • "LICENSE_REMOVAL_FAILED"
        • workspaceRoleArn — (String)

          The IAM role that grants permissions to the Amazon Web Services resources that the workspace will view data from. This role must already exist.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPermissions(params = {}, callback) ⇒ AWS.Request

Lists the users and groups who have the Grafana Admin and Editor roles in this workspace. If you use this operation without specifying userId or groupId, the operation returns the roles of all users and groups. If you specify a userId or a groupId, only the roles for that user or group are returned. If you do this, you can specify only one userId or one groupId.

Service Reference:

Examples:

Calling the listPermissions operation

var params = {
  workspaceId: 'STRING_VALUE', /* required */
  groupId: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  userId: 'STRING_VALUE',
  userType: SSO_USER | SSO_GROUP
};
grafana.listPermissions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • groupId — (String)

      (Optional) Limits the results to only the group that matches this ID.

    • maxResults — (Integer)

      The maximum number of results to include in the response.

    • nextToken — (String)

      The token to use when requesting the next set of results. You received this token from a previous ListPermissions operation.

    • userId — (String)

      (Optional) Limits the results to only the user that matches this ID.

    • userType — (String)

      (Optional) If you specify SSO_USER, then only the permissions of Amazon Web Services SSO users are returned. If you specify SSO_GROUP, only the permissions of Amazon Web Services SSO groups are returned.

      Possible values include:
      • "SSO_USER"
      • "SSO_GROUP"
    • workspaceId — (String)

      The ID of the workspace to list permissions for. This parameter is required.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • nextToken — (String)

        The token to use in a subsequent ListPermissions operation to return the next set of results.

      • permissions — (Array<map>)

        The permissions returned by the operation.

        • rolerequired — (String)

          Specifies whether the user or group has the Admin or Editor role.

          Possible values include:
          • "ADMIN"
          • "EDITOR"
        • userrequired — (map)

          A structure with the ID of the user or group with this role.

          • idrequired — (String)

            The ID of the user or group.

          • typerequired — (String)

            Specifies whether this is a single user or a group.

            Possible values include:
            • "SSO_USER"
            • "SSO_GROUP"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listWorkspaces(params = {}, callback) ⇒ AWS.Request

Returns a list of Amazon Managed Grafana workspaces in the account, with some information about each workspace. For more complete information about one workspace, use DescribeWorkspace.

Service Reference:

Examples:

Calling the listWorkspaces operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
grafana.listWorkspaces(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • maxResults — (Integer)

      The maximum number of workspaces to include in the results.

    • nextToken — (String)

      The token for the next set of workspaces to return. (You receive this token from a previous ListWorkspaces operation.)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • nextToken — (String)

        The token to use when requesting the next set of workspaces.

      • workspaces — (Array<map>)

        An array of structures that contain some information about the workspaces in the account.

        • authenticationrequired — (map)

          A structure containing information about the authentication methods used in the workspace.

          • providersrequired — (Array<String>)

            Specifies whether the workspace uses SAML, Amazon Web Services SSO, or both methods for user authentication.

          • samlConfigurationStatus — (String)

            Specifies whether the workplace's user authentication method is fully configured.

            Possible values include:
            • "CONFIGURED"
            • "NOT_CONFIGURED"
        • createdrequired — (Date)

          The date that the workspace was created.

        • description — (String)

          The customer-entered description of the workspace.

        • endpointrequired — (String)

          The URL endpoint to use to access the Grafana console in the workspace.

        • grafanaVersionrequired — (String)

          The Grafana version that the workspace is running.

        • idrequired — (String)

          The unique ID of the workspace.

        • modifiedrequired — (Date)

          The most recent date that the workspace was modified.

        • name — (String)

          The name of the workspace.

        • notificationDestinations — (Array<String>)

          The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, which allows Amazon Managed Grafana to use these channels.

        • statusrequired — (String)

          The current status of the workspace.

          Possible values include:
          • "ACTIVE"
          • "CREATING"
          • "DELETING"
          • "FAILED"
          • "UPDATING"
          • "UPGRADING"
          • "DELETION_FAILED"
          • "CREATION_FAILED"
          • "UPDATE_FAILED"
          • "UPGRADE_FAILED"
          • "LICENSE_REMOVAL_FAILED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updatePermissions(params = {}, callback) ⇒ AWS.Request

Updates which users in a workspace have the Grafana Admin or Editor roles.

Service Reference:

Examples:

Calling the updatePermissions operation

var params = {
  updateInstructionBatch: [ /* required */
    {
      action: ADD | REVOKE, /* required */
      role: ADMIN | EDITOR, /* required */
      users: [ /* required */
        {
          id: 'STRING_VALUE', /* required */
          type: SSO_USER | SSO_GROUP /* required */
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  workspaceId: 'STRING_VALUE' /* required */
};
grafana.updatePermissions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • updateInstructionBatch — (Array<map>)

      An array of structures that contain the permission updates to make.

      • actionrequired — (String)

        Specifies whether this update is to add or revoke role permissions.

        Possible values include:
        • "ADD"
        • "REVOKE"
      • rolerequired — (String)

        The role to add or revoke for the user or the group specified in users.

        Possible values include:
        • "ADMIN"
        • "EDITOR"
      • usersrequired — (Array<map>)

        A structure that specifies the user or group to add or revoke the role for.

        • idrequired — (String)

          The ID of the user or group.

        • typerequired — (String)

          Specifies whether this is a single user or a group.

          Possible values include:
          • "SSO_USER"
          • "SSO_GROUP"
    • workspaceId — (String)

      The ID of the workspace to update.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • errors — (Array<map>)

        An array of structures that contain the errors from the operation, if any.

        • causedByrequired — (map)

          Specifies which permission update caused the error.

          • actionrequired — (String)

            Specifies whether this update is to add or revoke role permissions.

            Possible values include:
            • "ADD"
            • "REVOKE"
          • rolerequired — (String)

            The role to add or revoke for the user or the group specified in users.

            Possible values include:
            • "ADMIN"
            • "EDITOR"
          • usersrequired — (Array<map>)

            A structure that specifies the user or group to add or revoke the role for.

            • idrequired — (String)

              The ID of the user or group.

            • typerequired — (String)

              Specifies whether this is a single user or a group.

              Possible values include:
              • "SSO_USER"
              • "SSO_GROUP"
        • coderequired — (Integer)

          The error code.

        • messagerequired — (String)

          The message for this error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateWorkspace(params = {}, callback) ⇒ AWS.Request

Modifies an existing Amazon Managed Grafana workspace. If you use this operation and omit any optional parameters, the existing values of those parameters are not changed.

To modify the user authentication methods that the workspace uses, such as SAML or Amazon Web Services SSO, use UpdateWorkspaceAuthentication.

To modify which users in the workspace have the Admin and Editor Grafana roles, use UpdatePermissions.

Service Reference:

Examples:

Calling the updateWorkspace operation

var params = {
  workspaceId: 'STRING_VALUE', /* required */
  accountAccessType: CURRENT_ACCOUNT | ORGANIZATION,
  organizationRoleName: 'STRING_VALUE',
  permissionType: CUSTOMER_MANAGED | SERVICE_MANAGED,
  stackSetName: 'STRING_VALUE',
  workspaceDataSources: [
    AMAZON_OPENSEARCH_SERVICE | CLOUDWATCH | PROMETHEUS | XRAY | TIMESTREAM | SITEWISE,
    /* more items */
  ],
  workspaceDescription: 'STRING_VALUE',
  workspaceName: 'STRING_VALUE',
  workspaceNotificationDestinations: [
    SNS,
    /* more items */
  ],
  workspaceOrganizationalUnits: [
    'STRING_VALUE',
    /* more items */
  ],
  workspaceRoleArn: 'STRING_VALUE'
};
grafana.updateWorkspace(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • accountAccessType — (String)

      Specifies whether the workspace can access Amazon Web Services resources in this Amazon Web Services account only, or whether it can also access Amazon Web Services resources in other accounts in the same organization. If you specify ORGANIZATION, you must specify which organizational units the workspace can access in the workspaceOrganizationalUnits parameter.

      Possible values include:
      • "CURRENT_ACCOUNT"
      • "ORGANIZATION"
    • organizationRoleName — (String)

      The name of an IAM role that already exists to use to access resources through Organizations.

    • permissionType — (String)

      If you specify Service Managed, Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use Amazon Web Services data sources and notification channels.

      If you specify CUSTOMER_MANAGED, you will manage those roles and permissions yourself. If you are creating this workspace in a member account of an organization and that account is not a delegated administrator account, and you want the workspace to access data sources in other Amazon Web Services accounts in the organization, you must choose CUSTOMER_MANAGED.

      For more information, see Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels

      Possible values include:
      • "CUSTOMER_MANAGED"
      • "SERVICE_MANAGED"
    • stackSetName — (String)

      The name of the CloudFormation stack set to use to generate IAM roles to be used for this workspace.

    • workspaceDataSources — (Array<String>)

      Specify the Amazon Web Services data sources that you want to be queried in this workspace. Specifying these data sources here enables Amazon Managed Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to read data from these sources. You must still add them as data sources in the Grafana console in the workspace.

      If you don't specify a data source here, you can still add it as a data source later in the workspace console. However, you will then have to manually configure permissions for it.

    • workspaceDescription — (String)

      A description for the workspace. This is used only to help you identify this workspace.

    • workspaceId — (String)

      The ID of the workspace to update.

    • workspaceName — (String)

      A new name for the workspace to update.

    • workspaceNotificationDestinations — (Array<String>)

      Specify the Amazon Web Services notification channels that you plan to use in this workspace. Specifying these data sources here enables Amazon Managed Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to use these channels.

    • workspaceOrganizationalUnits — (Array<String>)

      Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.

    • workspaceRoleArn — (String)

      The workspace needs an IAM role that grants permissions to the Amazon Web Services resources that the workspace will view data from. If you already have a role that you want to use, specify it here. If you omit this field and you specify some Amazon Web Services resources in workspaceDataSources or workspaceNotificationDestinations, a new IAM role with the necessary permissions is automatically created.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • workspace — (map)

        A structure containing data about the workspace that was created.

        • accountAccessType — (String)

          Specifies whether the workspace can access Amazon Web Services resources in this Amazon Web Services account only, or whether it can also access Amazon Web Services resources in other accounts in the same organization. If this is ORGANIZATION, the workspaceOrganizationalUnits parameter specifies which organizational units the workspace can access.

          Possible values include:
          • "CURRENT_ACCOUNT"
          • "ORGANIZATION"
        • authenticationrequired — (map)

          A structure that describes whether the workspace uses SAML, Amazon Web Services SSO, or both methods for user authentication.

          • providersrequired — (Array<String>)

            Specifies whether the workspace uses SAML, Amazon Web Services SSO, or both methods for user authentication.

          • samlConfigurationStatus — (String)

            Specifies whether the workplace's user authentication method is fully configured.

            Possible values include:
            • "CONFIGURED"
            • "NOT_CONFIGURED"
        • createdrequired — (Date)

          The date that the workspace was created.

        • dataSourcesrequired — (Array<String>)

          Specifies the Amazon Web Services data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources.

        • description — (String)

          The user-defined description of the workspace.

        • endpointrequired — (String)

          The URL that users can use to access the Grafana console in the workspace.

        • freeTrialConsumed — (Boolean)

          Specifies whether this workspace has already fully used its free trial for Grafana Enterprise.

        • freeTrialExpiration — (Date)

          If this workspace is currently in the free trial period for Grafana Enterprise, this value specifies when that free trial ends.

        • grafanaVersionrequired — (String)

          The version of Grafana supported in this workspace.

        • idrequired — (String)

          The unique ID of this workspace.

        • licenseExpiration — (Date)

          If this workspace has a full Grafana Enterprise license, this specifies when the license ends and will need to be renewed.

        • licenseType — (String)

          Specifies whether this workspace has a full Grafana Enterprise license or a free trial license.

          Possible values include:
          • "ENTERPRISE"
          • "ENTERPRISE_FREE_TRIAL"
        • modifiedrequired — (Date)

          The most recent date that the workspace was modified.

        • name — (String)

          The name of the workspace.

        • notificationDestinations — (Array<String>)

          The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.

        • organizationRoleName — (String)

          The name of the IAM role that is used to access resources through Organizations.

        • organizationalUnits — (Array<String>)

          Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.

        • permissionType — (String)

          If this is Service Managed, Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use Amazon Web Services data sources and notification channels.

          If this is CUSTOMER_MANAGED, you manage those roles and permissions yourself. If you are creating this workspace in a member account of an organization and that account is not a delegated administrator account, and you want the workspace to access data sources in other Amazon Web Services accounts in the organization, you must choose CUSTOMER_MANAGED.

          For more information, see Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels

          Possible values include:
          • "CUSTOMER_MANAGED"
          • "SERVICE_MANAGED"
        • stackSetName — (String)

          The name of the CloudFormation stack set that is used to generate IAM roles to be used for this workspace.

        • statusrequired — (String)

          The current status of the workspace.

          Possible values include:
          • "ACTIVE"
          • "CREATING"
          • "DELETING"
          • "FAILED"
          • "UPDATING"
          • "UPGRADING"
          • "DELETION_FAILED"
          • "CREATION_FAILED"
          • "UPDATE_FAILED"
          • "UPGRADE_FAILED"
          • "LICENSE_REMOVAL_FAILED"
        • workspaceRoleArn — (String)

          The IAM role that grants permissions to the Amazon Web Services resources that the workspace will view data from. This role must already exist.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateWorkspaceAuthentication(params = {}, callback) ⇒ AWS.Request

Use this operation to define the identity provider (IdP) that this workspace authenticates users from, using SAML. You can also map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the Admin and Editor roles in the workspace.

Service Reference:

Examples:

Calling the updateWorkspaceAuthentication operation

var params = {
  authenticationProviders: [ /* required */
    AWS_SSO | SAML,
    /* more items */
  ],
  workspaceId: 'STRING_VALUE', /* required */
  samlConfiguration: {
    idpMetadata: { /* required */
      url: 'STRING_VALUE',
      xml: 'STRING_VALUE'
    },
    allowedOrganizations: [
      'STRING_VALUE',
      /* more items */
    ],
    assertionAttributes: {
      email: 'STRING_VALUE',
      groups: 'STRING_VALUE',
      login: 'STRING_VALUE',
      name: 'STRING_VALUE',
      org: 'STRING_VALUE',
      role: 'STRING_VALUE'
    },
    loginValidityDuration: 'NUMBER_VALUE',
    roleValues: {
      admin: [
        'STRING_VALUE',
        /* more items */
      ],
      editor: [
        'STRING_VALUE',
        /* more items */
      ]
    }
  }
};
grafana.updateWorkspaceAuthentication(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • authenticationProviders — (Array<String>)

      Specifies whether this workspace uses SAML 2.0, Amazon Web Services Single Sign On, or both to authenticate users for using the Grafana console within a workspace. For more information, see User authentication in Amazon Managed Grafana.

    • samlConfiguration — (map)

      If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the Admin and Editor roles in the workspace.

      • allowedOrganizations — (Array<String>)

        Lists which organizations defined in the SAML assertion are allowed to use the Amazon Managed Grafana workspace. If this is empty, all organizations in the assertion attribute have access.

      • assertionAttributes — (map)

        A structure that defines which attributes in the SAML assertion are to be used to define information about the users authenticated by that IdP to use the workspace.

        • email — (String)

          The name of the attribute within the SAML assertion to use as the email names for SAML users.

        • groups — (String)

          The name of the attribute within the SAML assertion to use as the user full "friendly" names for user groups.

        • login — (String)

          The name of the attribute within the SAML assertion to use as the login names for SAML users.

        • name — (String)

          The name of the attribute within the SAML assertion to use as the user full "friendly" names for SAML users.

        • org — (String)

          The name of the attribute within the SAML assertion to use as the user full "friendly" names for the users' organizations.

        • role — (String)

          The name of the attribute within the SAML assertion to use as the user roles.

      • idpMetadatarequired — (map)

        A structure containing the identity provider (IdP) metadata used to integrate the identity provider with this workspace.

        • url — (String)

          The URL of the location containing the metadata.

        • xml — (String)

          The actual full metadata file, in XML format.

      • loginValidityDuration — (Integer)

        How long a sign-on session by a SAML user is valid, before the user has to sign on again.

      • roleValues — (map)

        A structure containing arrays that map group names in the SAML assertion to the Grafana Admin and Editor roles in the workspace.

        • admin — (Array<String>)

          A list of groups from the SAML assertion attribute to grant the Grafana Admin role to.

        • editor — (Array<String>)

          A list of groups from the SAML assertion attribute to grant the Grafana Editor role to.

    • workspaceId — (String)

      The ID of the workspace to update the authentication for.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • authentication — (map)

        A structure that describes the user authentication for this workspace after the update is made.

        • awsSso — (map)

          A structure containing information about how this workspace works with Amazon Web Services SSO.

          • ssoClientId — (String)

            The ID of the Amazon Web Services SSO-managed application that is created by Amazon Managed Grafana.

        • providersrequired — (Array<String>)

          Specifies whether this workspace uses Amazon Web Services SSO, SAML, or both methods to authenticate users to use the Grafana console in the Amazon Managed Grafana workspace.

        • saml — (map)

          A structure containing information about how this workspace works with SAML, including what attributes within the assertion are to be mapped to user information in the workspace.

          • configuration — (map)

            A structure containing details about how this workspace works with SAML.

            • allowedOrganizations — (Array<String>)

              Lists which organizations defined in the SAML assertion are allowed to use the Amazon Managed Grafana workspace. If this is empty, all organizations in the assertion attribute have access.

            • assertionAttributes — (map)

              A structure that defines which attributes in the SAML assertion are to be used to define information about the users authenticated by that IdP to use the workspace.

              • email — (String)

                The name of the attribute within the SAML assertion to use as the email names for SAML users.

              • groups — (String)

                The name of the attribute within the SAML assertion to use as the user full "friendly" names for user groups.

              • login — (String)

                The name of the attribute within the SAML assertion to use as the login names for SAML users.

              • name — (String)

                The name of the attribute within the SAML assertion to use as the user full "friendly" names for SAML users.

              • org — (String)

                The name of the attribute within the SAML assertion to use as the user full "friendly" names for the users' organizations.

              • role — (String)

                The name of the attribute within the SAML assertion to use as the user roles.

            • idpMetadatarequired — (map)

              A structure containing the identity provider (IdP) metadata used to integrate the identity provider with this workspace.

              • url — (String)

                The URL of the location containing the metadata.

              • xml — (String)

                The actual full metadata file, in XML format.

            • loginValidityDuration — (Integer)

              How long a sign-on session by a SAML user is valid, before the user has to sign on again.

            • roleValues — (map)

              A structure containing arrays that map group names in the SAML assertion to the Grafana Admin and Editor roles in the workspace.

              • admin — (Array<String>)

                A list of groups from the SAML assertion attribute to grant the Grafana Admin role to.

              • editor — (Array<String>)

                A list of groups from the SAML assertion attribute to grant the Grafana Editor role to.

          • statusrequired — (String)

            Specifies whether the workspace's SAML configuration is complete.

            Possible values include:
            • "CONFIGURED"
            • "NOT_CONFIGURED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.