Table of Contents
ManagedGrafana.
Client
¶A low-level client representing Amazon Managed Grafana
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.
import boto3
client = boto3.client('grafana')
These are the available methods:
associate_license()
can_paginate()
close()
create_workspace()
create_workspace_api_key()
delete_workspace()
delete_workspace_api_key()
describe_workspace()
describe_workspace_authentication()
describe_workspace_configuration()
disassociate_license()
get_paginator()
get_waiter()
list_permissions()
list_tags_for_resource()
list_workspaces()
tag_resource()
untag_resource()
update_permissions()
update_workspace()
update_workspace_authentication()
update_workspace_configuration()
associate_license
(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.associate_license(
licenseType='ENTERPRISE'|'ENTERPRISE_FREE_TRIAL',
workspaceId='string'
)
[REQUIRED]
The type of license to associate with the workspace.
[REQUIRED]
The ID of the workspace to associate the license with.
dict
Response Syntax
{
'workspace': {
'accountAccessType': 'CURRENT_ACCOUNT'|'ORGANIZATION',
'authentication': {
'providers': [
'AWS_SSO'|'SAML',
],
'samlConfigurationStatus': 'CONFIGURED'|'NOT_CONFIGURED'
},
'created': datetime(2015, 1, 1),
'dataSources': [
'AMAZON_OPENSEARCH_SERVICE'|'CLOUDWATCH'|'PROMETHEUS'|'XRAY'|'TIMESTREAM'|'SITEWISE'|'ATHENA'|'REDSHIFT'|'TWINMAKER',
],
'description': 'string',
'endpoint': 'string',
'freeTrialConsumed': True|False,
'freeTrialExpiration': datetime(2015, 1, 1),
'grafanaVersion': 'string',
'id': 'string',
'licenseExpiration': datetime(2015, 1, 1),
'licenseType': 'ENTERPRISE'|'ENTERPRISE_FREE_TRIAL',
'modified': datetime(2015, 1, 1),
'name': 'string',
'notificationDestinations': [
'SNS',
],
'organizationRoleName': 'string',
'organizationalUnits': [
'string',
],
'permissionType': 'CUSTOMER_MANAGED'|'SERVICE_MANAGED',
'stackSetName': 'string',
'status': 'ACTIVE'|'CREATING'|'DELETING'|'FAILED'|'UPDATING'|'UPGRADING'|'DELETION_FAILED'|'CREATION_FAILED'|'UPDATE_FAILED'|'UPGRADE_FAILED'|'LICENSE_REMOVAL_FAILED',
'tags': {
'string': 'string'
},
'vpcConfiguration': {
'securityGroupIds': [
'string',
],
'subnetIds': [
'string',
]
},
'workspaceRoleArn': 'string'
}
}
Response Structure
(dict) --
workspace (dict) --
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.
authentication (dict) --
A structure that describes whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication.
providers (list) --
Specifies whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication.
samlConfigurationStatus (string) --
Specifies whether the workplace's user authentication method is fully configured.
created (datetime) --
The date that the workspace was created.
dataSources (list) --
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.
endpoint (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 (datetime) --
If this workspace is currently in the free trial period for Grafana Enterprise, this value specifies when that free trial ends.
grafanaVersion (string) --
The version of Grafana supported in this workspace.
id (string) --
The unique ID of this workspace.
licenseExpiration (datetime) --
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.
modified (datetime) --
The most recent date that the workspace was modified.
name (string) --
The name of the workspace.
notificationDestinations (list) --
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 (list) --
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
stackSetName (string) --
The name of the CloudFormation stack set that is used to generate IAM roles to be used for this workspace.
status (string) --
The current status of the workspace.
tags (dict) --
The list of tags associated with the workspace.
vpcConfiguration (dict) --
The configuration for connecting to data sources in a private VPC (Amazon Virtual Private Cloud).
securityGroupIds (list) --
The list of Amazon EC2 security group IDs attached to the Amazon VPC for your Grafana workspace to connect.
subnetIds (list) --
The list of Amazon EC2 subnet IDs created in the Amazon VPC for your Grafana workspace to connect.
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.
Exceptions
ManagedGrafana.Client.exceptions.ResourceNotFoundException
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.ValidationException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
can_paginate
(operation_name)¶Check if an operation can be paginated.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.True
if the operation can be paginated,
False
otherwise.close
()¶Closes underlying endpoint connections.
create_workspace
(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.create_workspace(
accountAccessType='CURRENT_ACCOUNT'|'ORGANIZATION',
authenticationProviders=[
'AWS_SSO'|'SAML',
],
clientToken='string',
configuration='string',
organizationRoleName='string',
permissionType='CUSTOMER_MANAGED'|'SERVICE_MANAGED',
stackSetName='string',
tags={
'string': 'string'
},
vpcConfiguration={
'securityGroupIds': [
'string',
],
'subnetIds': [
'string',
]
},
workspaceDataSources=[
'AMAZON_OPENSEARCH_SERVICE'|'CLOUDWATCH'|'PROMETHEUS'|'XRAY'|'TIMESTREAM'|'SITEWISE'|'ATHENA'|'REDSHIFT'|'TWINMAKER',
],
workspaceDescription='string',
workspaceName='string',
workspaceNotificationDestinations=[
'SNS',
],
workspaceOrganizationalUnits=[
'string',
],
workspaceRoleArn='string'
)
[REQUIRED]
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.
[REQUIRED]
Specifies whether this workspace uses SAML 2.0, IAM Identity Center (successor to 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.
A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
This field is autopopulated if not provided.
[REQUIRED]
If you specify SERVICE_MANAGED
on AWS Grafana console, 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. In the CLI mode, the permissionType SERVICE_MANAGED
will not create the IAM role for you. The ability for the Amazon Managed Grafana to create the IAM role on behalf of the user is supported only in the Amazon Managed Grafana AWS console. Use only the CUSTOMER_MANAGED
permission type when creating a workspace in the CLI.
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.
The list of tags associated with the workspace.
The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.
The list of Amazon EC2 security group IDs attached to the Amazon VPC for your Grafana workspace to connect.
The list of Amazon EC2 subnet IDs created in the Amazon VPC for your Grafana workspace to connect.
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.
A description for the workspace. This is used only to help you identify this workspace.
Pattern: ^[\\p{L}\\p{Z}\\p{N}\\p{P}]{0,2048}$
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.
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.
CUSTOMER_MANAGED
.dict
Response Syntax
{
'workspace': {
'accountAccessType': 'CURRENT_ACCOUNT'|'ORGANIZATION',
'authentication': {
'providers': [
'AWS_SSO'|'SAML',
],
'samlConfigurationStatus': 'CONFIGURED'|'NOT_CONFIGURED'
},
'created': datetime(2015, 1, 1),
'dataSources': [
'AMAZON_OPENSEARCH_SERVICE'|'CLOUDWATCH'|'PROMETHEUS'|'XRAY'|'TIMESTREAM'|'SITEWISE'|'ATHENA'|'REDSHIFT'|'TWINMAKER',
],
'description': 'string',
'endpoint': 'string',
'freeTrialConsumed': True|False,
'freeTrialExpiration': datetime(2015, 1, 1),
'grafanaVersion': 'string',
'id': 'string',
'licenseExpiration': datetime(2015, 1, 1),
'licenseType': 'ENTERPRISE'|'ENTERPRISE_FREE_TRIAL',
'modified': datetime(2015, 1, 1),
'name': 'string',
'notificationDestinations': [
'SNS',
],
'organizationRoleName': 'string',
'organizationalUnits': [
'string',
],
'permissionType': 'CUSTOMER_MANAGED'|'SERVICE_MANAGED',
'stackSetName': 'string',
'status': 'ACTIVE'|'CREATING'|'DELETING'|'FAILED'|'UPDATING'|'UPGRADING'|'DELETION_FAILED'|'CREATION_FAILED'|'UPDATE_FAILED'|'UPGRADE_FAILED'|'LICENSE_REMOVAL_FAILED',
'tags': {
'string': 'string'
},
'vpcConfiguration': {
'securityGroupIds': [
'string',
],
'subnetIds': [
'string',
]
},
'workspaceRoleArn': 'string'
}
}
Response Structure
(dict) --
workspace (dict) --
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.
authentication (dict) --
A structure that describes whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication.
providers (list) --
Specifies whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication.
samlConfigurationStatus (string) --
Specifies whether the workplace's user authentication method is fully configured.
created (datetime) --
The date that the workspace was created.
dataSources (list) --
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.
endpoint (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 (datetime) --
If this workspace is currently in the free trial period for Grafana Enterprise, this value specifies when that free trial ends.
grafanaVersion (string) --
The version of Grafana supported in this workspace.
id (string) --
The unique ID of this workspace.
licenseExpiration (datetime) --
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.
modified (datetime) --
The most recent date that the workspace was modified.
name (string) --
The name of the workspace.
notificationDestinations (list) --
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 (list) --
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
stackSetName (string) --
The name of the CloudFormation stack set that is used to generate IAM roles to be used for this workspace.
status (string) --
The current status of the workspace.
tags (dict) --
The list of tags associated with the workspace.
vpcConfiguration (dict) --
The configuration for connecting to data sources in a private VPC (Amazon Virtual Private Cloud).
securityGroupIds (list) --
The list of Amazon EC2 security group IDs attached to the Amazon VPC for your Grafana workspace to connect.
subnetIds (list) --
The list of Amazon EC2 subnet IDs created in the Amazon VPC for your Grafana workspace to connect.
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.
Exceptions
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.ConflictException
ManagedGrafana.Client.exceptions.ValidationException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
ManagedGrafana.Client.exceptions.ServiceQuotaExceededException
create_workspace_api_key
(**kwargs)¶Creates a Grafana API key for the workspace. This key can be used to authenticate requests sent to the workspace's HTTP API. See https://docs.aws.amazon.com/grafana/latest/userguide/Using-Grafana-APIs.html for available APIs and example requests.
See also: AWS API Documentation
Request Syntax
response = client.create_workspace_api_key(
keyName='string',
keyRole='string',
secondsToLive=123,
workspaceId='string'
)
[REQUIRED]
Specifies the name of the key. Keynames must be unique to the workspace.
[REQUIRED]
Specifies the permission level of the key.
Valid values: VIEWER
| EDITOR
| ADMIN
[REQUIRED]
Specifies the time in seconds until the key expires. Keys can be valid for up to 30 days.
[REQUIRED]
The ID of the workspace to create an API key.
dict
Response Syntax
{
'key': 'string',
'keyName': 'string',
'workspaceId': 'string'
}
Response Structure
(dict) --
key (string) --
The key token. Use this value as a bearer token to authenticate HTTP requests to the workspace.
keyName (string) --
The name of the key that was created.
workspaceId (string) --
The ID of the workspace that the key is valid for.
Exceptions
ManagedGrafana.Client.exceptions.ResourceNotFoundException
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.ConflictException
ManagedGrafana.Client.exceptions.ValidationException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
ManagedGrafana.Client.exceptions.ServiceQuotaExceededException
delete_workspace
(**kwargs)¶Deletes an Amazon Managed Grafana workspace.
See also: AWS API Documentation
Request Syntax
response = client.delete_workspace(
workspaceId='string'
)
[REQUIRED]
The ID of the workspace to delete.
{
'workspace': {
'accountAccessType': 'CURRENT_ACCOUNT'|'ORGANIZATION',
'authentication': {
'providers': [
'AWS_SSO'|'SAML',
],
'samlConfigurationStatus': 'CONFIGURED'|'NOT_CONFIGURED'
},
'created': datetime(2015, 1, 1),
'dataSources': [
'AMAZON_OPENSEARCH_SERVICE'|'CLOUDWATCH'|'PROMETHEUS'|'XRAY'|'TIMESTREAM'|'SITEWISE'|'ATHENA'|'REDSHIFT'|'TWINMAKER',
],
'description': 'string',
'endpoint': 'string',
'freeTrialConsumed': True|False,
'freeTrialExpiration': datetime(2015, 1, 1),
'grafanaVersion': 'string',
'id': 'string',
'licenseExpiration': datetime(2015, 1, 1),
'licenseType': 'ENTERPRISE'|'ENTERPRISE_FREE_TRIAL',
'modified': datetime(2015, 1, 1),
'name': 'string',
'notificationDestinations': [
'SNS',
],
'organizationRoleName': 'string',
'organizationalUnits': [
'string',
],
'permissionType': 'CUSTOMER_MANAGED'|'SERVICE_MANAGED',
'stackSetName': 'string',
'status': 'ACTIVE'|'CREATING'|'DELETING'|'FAILED'|'UPDATING'|'UPGRADING'|'DELETION_FAILED'|'CREATION_FAILED'|'UPDATE_FAILED'|'UPGRADE_FAILED'|'LICENSE_REMOVAL_FAILED',
'tags': {
'string': 'string'
},
'vpcConfiguration': {
'securityGroupIds': [
'string',
],
'subnetIds': [
'string',
]
},
'workspaceRoleArn': 'string'
}
}
Response Structure
A structure containing information about the workspace that was deleted.
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.
A structure that describes whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication.
Specifies whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication.
Specifies whether the workplace's user authentication method is fully configured.
The date that the workspace was created.
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.
The user-defined description of the workspace.
The URL that users can use to access the Grafana console in the workspace.
Specifies whether this workspace has already fully used its free trial for Grafana Enterprise.
If this workspace is currently in the free trial period for Grafana Enterprise, this value specifies when that free trial ends.
The version of Grafana supported in this workspace.
The unique ID of this workspace.
If this workspace has a full Grafana Enterprise license, this specifies when the license ends and will need to be renewed.
Specifies whether this workspace has a full Grafana Enterprise license or a free trial license.
The most recent date that the workspace was modified.
The name of the workspace.
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.
The name of the IAM role that is used to access resources through Organizations.
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.
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
The name of the CloudFormation stack set that is used to generate IAM roles to be used for this workspace.
The current status of the workspace.
The list of tags associated with the workspace.
The configuration for connecting to data sources in a private VPC (Amazon Virtual Private Cloud).
The list of Amazon EC2 security group IDs attached to the Amazon VPC for your Grafana workspace to connect.
The list of Amazon EC2 subnet IDs created in the Amazon VPC for your Grafana workspace to connect.
The IAM role that grants permissions to the Amazon Web Services resources that the workspace will view data from. This role must already exist.
Exceptions
ManagedGrafana.Client.exceptions.ResourceNotFoundException
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.ConflictException
ManagedGrafana.Client.exceptions.ValidationException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
delete_workspace_api_key
(**kwargs)¶Deletes a Grafana API key for the workspace.
See also: AWS API Documentation
Request Syntax
response = client.delete_workspace_api_key(
keyName='string',
workspaceId='string'
)
[REQUIRED]
The name of the API key to delete.
[REQUIRED]
The ID of the workspace to delete.
dict
Response Syntax
{
'keyName': 'string',
'workspaceId': 'string'
}
Response Structure
(dict) --
keyName (string) --
The name of the key that was deleted.
workspaceId (string) --
The ID of the workspace where the key was deleted.
Exceptions
ManagedGrafana.Client.exceptions.ResourceNotFoundException
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.ConflictException
ManagedGrafana.Client.exceptions.ValidationException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
describe_workspace
(**kwargs)¶Displays information about one Amazon Managed Grafana workspace.
See also: AWS API Documentation
Request Syntax
response = client.describe_workspace(
workspaceId='string'
)
[REQUIRED]
The ID of the workspace to display information about.
{
'workspace': {
'accountAccessType': 'CURRENT_ACCOUNT'|'ORGANIZATION',
'authentication': {
'providers': [
'AWS_SSO'|'SAML',
],
'samlConfigurationStatus': 'CONFIGURED'|'NOT_CONFIGURED'
},
'created': datetime(2015, 1, 1),
'dataSources': [
'AMAZON_OPENSEARCH_SERVICE'|'CLOUDWATCH'|'PROMETHEUS'|'XRAY'|'TIMESTREAM'|'SITEWISE'|'ATHENA'|'REDSHIFT'|'TWINMAKER',
],
'description': 'string',
'endpoint': 'string',
'freeTrialConsumed': True|False,
'freeTrialExpiration': datetime(2015, 1, 1),
'grafanaVersion': 'string',
'id': 'string',
'licenseExpiration': datetime(2015, 1, 1),
'licenseType': 'ENTERPRISE'|'ENTERPRISE_FREE_TRIAL',
'modified': datetime(2015, 1, 1),
'name': 'string',
'notificationDestinations': [
'SNS',
],
'organizationRoleName': 'string',
'organizationalUnits': [
'string',
],
'permissionType': 'CUSTOMER_MANAGED'|'SERVICE_MANAGED',
'stackSetName': 'string',
'status': 'ACTIVE'|'CREATING'|'DELETING'|'FAILED'|'UPDATING'|'UPGRADING'|'DELETION_FAILED'|'CREATION_FAILED'|'UPDATE_FAILED'|'UPGRADE_FAILED'|'LICENSE_REMOVAL_FAILED',
'tags': {
'string': 'string'
},
'vpcConfiguration': {
'securityGroupIds': [
'string',
],
'subnetIds': [
'string',
]
},
'workspaceRoleArn': 'string'
}
}
Response Structure
A structure containing information about the workspace.
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.
A structure that describes whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication.
Specifies whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication.
Specifies whether the workplace's user authentication method is fully configured.
The date that the workspace was created.
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.
The user-defined description of the workspace.
The URL that users can use to access the Grafana console in the workspace.
Specifies whether this workspace has already fully used its free trial for Grafana Enterprise.
If this workspace is currently in the free trial period for Grafana Enterprise, this value specifies when that free trial ends.
The version of Grafana supported in this workspace.
The unique ID of this workspace.
If this workspace has a full Grafana Enterprise license, this specifies when the license ends and will need to be renewed.
Specifies whether this workspace has a full Grafana Enterprise license or a free trial license.
The most recent date that the workspace was modified.
The name of the workspace.
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.
The name of the IAM role that is used to access resources through Organizations.
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.
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
The name of the CloudFormation stack set that is used to generate IAM roles to be used for this workspace.
The current status of the workspace.
The list of tags associated with the workspace.
The configuration for connecting to data sources in a private VPC (Amazon Virtual Private Cloud).
The list of Amazon EC2 security group IDs attached to the Amazon VPC for your Grafana workspace to connect.
The list of Amazon EC2 subnet IDs created in the Amazon VPC for your Grafana workspace to connect.
The IAM role that grants permissions to the Amazon Web Services resources that the workspace will view data from. This role must already exist.
Exceptions
ManagedGrafana.Client.exceptions.ResourceNotFoundException
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.ValidationException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
describe_workspace_authentication
(**kwargs)¶Displays information about the authentication methods used in one Amazon Managed Grafana workspace.
See also: AWS API Documentation
Request Syntax
response = client.describe_workspace_authentication(
workspaceId='string'
)
[REQUIRED]
The ID of the workspace to return authentication information about.
{
'authentication': {
'awsSso': {
'ssoClientId': 'string'
},
'providers': [
'AWS_SSO'|'SAML',
],
'saml': {
'configuration': {
'allowedOrganizations': [
'string',
],
'assertionAttributes': {
'email': 'string',
'groups': 'string',
'login': 'string',
'name': 'string',
'org': 'string',
'role': 'string'
},
'idpMetadata': {
'url': 'string',
'xml': 'string'
},
'loginValidityDuration': 123,
'roleValues': {
'admin': [
'string',
],
'editor': [
'string',
]
}
},
'status': 'CONFIGURED'|'NOT_CONFIGURED'
}
}
}
Response Structure
A structure containing information about the authentication methods used in the workspace.
A structure containing information about how this workspace works with IAM Identity Center.
The ID of the IAM Identity Center-managed application that is created by Amazon Managed Grafana.
Specifies whether this workspace uses IAM Identity Center, SAML, or both methods to authenticate users to use the Grafana console in the Amazon Managed Grafana workspace.
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.
A structure containing details about how this workspace works with SAML.
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.
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.
The name of the attribute within the SAML assertion to use as the email names for SAML users.
The name of the attribute within the SAML assertion to use as the user full "friendly" names for user groups.
The name of the attribute within the SAML assertion to use as the login names for SAML users.
The name of the attribute within the SAML assertion to use as the user full "friendly" names for SAML users.
The name of the attribute within the SAML assertion to use as the user full "friendly" names for the users' organizations.
The name of the attribute within the SAML assertion to use as the user roles.
A structure containing the identity provider (IdP) metadata used to integrate the identity provider with this workspace.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set: url
, xml
. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER
is as follows:
'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
The URL of the location containing the IdP metadata.
The full IdP metadata, in XML format.
How long a sign-on session by a SAML user is valid, before the user has to sign on again.
A structure containing arrays that map group names in the SAML assertion to the Grafana Admin
and Editor
roles in the workspace.
A list of groups from the SAML assertion attribute to grant the Grafana Admin
role to.
A list of groups from the SAML assertion attribute to grant the Grafana Editor
role to.
Specifies whether the workspace's SAML configuration is complete.
Exceptions
ManagedGrafana.Client.exceptions.ResourceNotFoundException
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.ValidationException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
describe_workspace_configuration
(**kwargs)¶Gets the current configuration string for the given workspace.
See also: AWS API Documentation
Request Syntax
response = client.describe_workspace_configuration(
workspaceId='string'
)
[REQUIRED]
The ID of the workspace to get configuration information for.
{
'configuration': 'string'
}
Response Structure
The configuration string for the workspace that you requested. For more information about the format and configuration options available, see Working in your Grafana workspace.
Exceptions
ManagedGrafana.Client.exceptions.ResourceNotFoundException
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
disassociate_license
(**kwargs)¶Removes the Grafana Enterprise license from a workspace.
See also: AWS API Documentation
Request Syntax
response = client.disassociate_license(
licenseType='ENTERPRISE'|'ENTERPRISE_FREE_TRIAL',
workspaceId='string'
)
[REQUIRED]
The type of license to remove from the workspace.
[REQUIRED]
The ID of the workspace to remove the Grafana Enterprise license from.
dict
Response Syntax
{
'workspace': {
'accountAccessType': 'CURRENT_ACCOUNT'|'ORGANIZATION',
'authentication': {
'providers': [
'AWS_SSO'|'SAML',
],
'samlConfigurationStatus': 'CONFIGURED'|'NOT_CONFIGURED'
},
'created': datetime(2015, 1, 1),
'dataSources': [
'AMAZON_OPENSEARCH_SERVICE'|'CLOUDWATCH'|'PROMETHEUS'|'XRAY'|'TIMESTREAM'|'SITEWISE'|'ATHENA'|'REDSHIFT'|'TWINMAKER',
],
'description': 'string',
'endpoint': 'string',
'freeTrialConsumed': True|False,
'freeTrialExpiration': datetime(2015, 1, 1),
'grafanaVersion': 'string',
'id': 'string',
'licenseExpiration': datetime(2015, 1, 1),
'licenseType': 'ENTERPRISE'|'ENTERPRISE_FREE_TRIAL',
'modified': datetime(2015, 1, 1),
'name': 'string',
'notificationDestinations': [
'SNS',
],
'organizationRoleName': 'string',
'organizationalUnits': [
'string',
],
'permissionType': 'CUSTOMER_MANAGED'|'SERVICE_MANAGED',
'stackSetName': 'string',
'status': 'ACTIVE'|'CREATING'|'DELETING'|'FAILED'|'UPDATING'|'UPGRADING'|'DELETION_FAILED'|'CREATION_FAILED'|'UPDATE_FAILED'|'UPGRADE_FAILED'|'LICENSE_REMOVAL_FAILED',
'tags': {
'string': 'string'
},
'vpcConfiguration': {
'securityGroupIds': [
'string',
],
'subnetIds': [
'string',
]
},
'workspaceRoleArn': 'string'
}
}
Response Structure
(dict) --
workspace (dict) --
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.
authentication (dict) --
A structure that describes whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication.
providers (list) --
Specifies whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication.
samlConfigurationStatus (string) --
Specifies whether the workplace's user authentication method is fully configured.
created (datetime) --
The date that the workspace was created.
dataSources (list) --
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.
endpoint (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 (datetime) --
If this workspace is currently in the free trial period for Grafana Enterprise, this value specifies when that free trial ends.
grafanaVersion (string) --
The version of Grafana supported in this workspace.
id (string) --
The unique ID of this workspace.
licenseExpiration (datetime) --
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.
modified (datetime) --
The most recent date that the workspace was modified.
name (string) --
The name of the workspace.
notificationDestinations (list) --
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 (list) --
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
stackSetName (string) --
The name of the CloudFormation stack set that is used to generate IAM roles to be used for this workspace.
status (string) --
The current status of the workspace.
tags (dict) --
The list of tags associated with the workspace.
vpcConfiguration (dict) --
The configuration for connecting to data sources in a private VPC (Amazon Virtual Private Cloud).
securityGroupIds (list) --
The list of Amazon EC2 security group IDs attached to the Amazon VPC for your Grafana workspace to connect.
subnetIds (list) --
The list of Amazon EC2 subnet IDs created in the Amazon VPC for your Grafana workspace to connect.
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.
Exceptions
ManagedGrafana.Client.exceptions.ResourceNotFoundException
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.ValidationException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
get_paginator
(operation_name)¶Create a paginator for an operation.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.client.can_paginate
method to
check if an operation is pageable.get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
list_permissions
(**kwargs)¶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
.
See also: AWS API Documentation
Request Syntax
response = client.list_permissions(
groupId='string',
maxResults=123,
nextToken='string',
userId='string',
userType='SSO_USER'|'SSO_GROUP',
workspaceId='string'
)
ListPermissions
operation.SSO_USER
, then only the permissions of IAM Identity Center users are returned. If you specify SSO_GROUP
, only the permissions of IAM Identity Center groups are returned.[REQUIRED]
The ID of the workspace to list permissions for. This parameter is required.
dict
Response Syntax
{
'nextToken': 'string',
'permissions': [
{
'role': 'ADMIN'|'EDITOR'|'VIEWER',
'user': {
'id': 'string',
'type': 'SSO_USER'|'SSO_GROUP'
}
},
]
}
Response Structure
(dict) --
nextToken (string) --
The token to use in a subsequent ListPermissions
operation to return the next set of results.
permissions (list) --
The permissions returned by the operation.
(dict) --
A structure containing the identity of one user or group and the Admin
, Editor
, or Viewer
role that they have.
role (string) --
Specifies whether the user or group has the Admin
, Editor
, or Viewer
role.
user (dict) --
A structure with the ID of the user or group with this role.
id (string) --
The ID of the user or group.
Pattern: ^([0-9a-fA-F]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$
type (string) --
Specifies whether this is a single user or a group.
Exceptions
ManagedGrafana.Client.exceptions.ResourceNotFoundException
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.ValidationException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
The ListTagsForResource
operation returns the tags that are associated with the Amazon Managed Service for Grafana resource specified by the resourceArn
. Currently, the only resource that can be tagged is a workspace.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
resourceArn='string'
)
[REQUIRED]
The ARN of the resource the list of tags are associated with.
{
'tags': {
'string': 'string'
}
}
Response Structure
The list of tags that are associated with the resource.
Exceptions
ManagedGrafana.Client.exceptions.ResourceNotFoundException
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.ValidationException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
list_workspaces
(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.list_workspaces(
maxResults=123,
nextToken='string'
)
ListWorkspaces
operation.)dict
Response Syntax
{
'nextToken': 'string',
'workspaces': [
{
'authentication': {
'providers': [
'AWS_SSO'|'SAML',
],
'samlConfigurationStatus': 'CONFIGURED'|'NOT_CONFIGURED'
},
'created': datetime(2015, 1, 1),
'description': 'string',
'endpoint': 'string',
'grafanaVersion': 'string',
'id': 'string',
'modified': datetime(2015, 1, 1),
'name': 'string',
'notificationDestinations': [
'SNS',
],
'status': 'ACTIVE'|'CREATING'|'DELETING'|'FAILED'|'UPDATING'|'UPGRADING'|'DELETION_FAILED'|'CREATION_FAILED'|'UPDATE_FAILED'|'UPGRADE_FAILED'|'LICENSE_REMOVAL_FAILED',
'tags': {
'string': 'string'
}
},
]
}
Response Structure
(dict) --
nextToken (string) --
The token to use when requesting the next set of workspaces.
workspaces (list) --
An array of structures that contain some information about the workspaces in the account.
(dict) --
A structure that contains some information about one workspace in the account.
authentication (dict) --
A structure containing information about the authentication methods used in the workspace.
providers (list) --
Specifies whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication.
samlConfigurationStatus (string) --
Specifies whether the workplace's user authentication method is fully configured.
created (datetime) --
The date that the workspace was created.
description (string) --
The customer-entered description of the workspace.
endpoint (string) --
The URL endpoint to use to access the Grafana console in the workspace.
grafanaVersion (string) --
The Grafana version that the workspace is running.
id (string) --
The unique ID of the workspace.
modified (datetime) --
The most recent date that the workspace was modified.
name (string) --
The name of the workspace.
notificationDestinations (list) --
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.
status (string) --
The current status of the workspace.
tags (dict) --
The list of tags associated with the workspace.
Exceptions
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
tag_resource
(**kwargs)¶The TagResource
operation associates tags with an Amazon Managed Grafana resource. Currently, the only resource that can be tagged is workspaces.
If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces the previous value for that tag.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
resourceArn='string',
tags={
'string': 'string'
}
)
[REQUIRED]
The ARN of the resource the tag is associated with.
[REQUIRED]
The list of tag keys and values to associate with the resource. You can associate tag keys only, tags (key and values) only or a combination of tag keys and tags.
dict
Response Syntax
{}
Response Structure
Exceptions
ManagedGrafana.Client.exceptions.ResourceNotFoundException
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.ValidationException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
untag_resource
(**kwargs)¶The UntagResource
operation removes the association of the tag with the Amazon Managed Grafana resource.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
resourceArn='string',
tagKeys=[
'string',
]
)
[REQUIRED]
The ARN of the resource the tag association is removed from.
[REQUIRED]
The key values of the tag to be removed from the resource.
dict
Response Syntax
{}
Response Structure
Exceptions
ManagedGrafana.Client.exceptions.ResourceNotFoundException
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.ValidationException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
update_permissions
(**kwargs)¶Updates which users in a workspace have the Grafana Admin
or Editor
roles.
See also: AWS API Documentation
Request Syntax
response = client.update_permissions(
updateInstructionBatch=[
{
'action': 'ADD'|'REVOKE',
'role': 'ADMIN'|'EDITOR'|'VIEWER',
'users': [
{
'id': 'string',
'type': 'SSO_USER'|'SSO_GROUP'
},
]
},
],
workspaceId='string'
)
[REQUIRED]
An array of structures that contain the permission updates to make.
Contains the instructions for one Grafana role permission update in a UpdatePermissions operation.
Specifies whether this update is to add or revoke role permissions.
The role to add or revoke for the user or the group specified in users
.
A structure that specifies the user or group to add or revoke the role for.
A structure that specifies one user or group in the workspace.
The ID of the user or group.
Pattern: ^([0-9a-fA-F]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$
Specifies whether this is a single user or a group.
[REQUIRED]
The ID of the workspace to update.
dict
Response Syntax
{
'errors': [
{
'causedBy': {
'action': 'ADD'|'REVOKE',
'role': 'ADMIN'|'EDITOR'|'VIEWER',
'users': [
{
'id': 'string',
'type': 'SSO_USER'|'SSO_GROUP'
},
]
},
'code': 123,
'message': 'string'
},
]
}
Response Structure
(dict) --
errors (list) --
An array of structures that contain the errors from the operation, if any.
(dict) --
A structure containing information about one error encountered while performing an UpdatePermissions operation.
causedBy (dict) --
Specifies which permission update caused the error.
action (string) --
Specifies whether this update is to add or revoke role permissions.
role (string) --
The role to add or revoke for the user or the group specified in users
.
users (list) --
A structure that specifies the user or group to add or revoke the role for.
(dict) --
A structure that specifies one user or group in the workspace.
id (string) --
The ID of the user or group.
Pattern: ^([0-9a-fA-F]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$
type (string) --
Specifies whether this is a single user or a group.
code (integer) --
The error code.
message (string) --
The message for this error.
Exceptions
ManagedGrafana.Client.exceptions.ResourceNotFoundException
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.ValidationException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
update_workspace
(**kwargs)¶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 IAM Identity Center, use UpdateWorkspaceAuthentication.
To modify which users in the workspace have the Admin
and Editor
Grafana roles, use UpdatePermissions.
See also: AWS API Documentation
Request Syntax
response = client.update_workspace(
accountAccessType='CURRENT_ACCOUNT'|'ORGANIZATION',
organizationRoleName='string',
permissionType='CUSTOMER_MANAGED'|'SERVICE_MANAGED',
removeVpcConfiguration=True|False,
stackSetName='string',
vpcConfiguration={
'securityGroupIds': [
'string',
],
'subnetIds': [
'string',
]
},
workspaceDataSources=[
'AMAZON_OPENSEARCH_SERVICE'|'CLOUDWATCH'|'PROMETHEUS'|'XRAY'|'TIMESTREAM'|'SITEWISE'|'ATHENA'|'REDSHIFT'|'TWINMAKER',
],
workspaceDescription='string',
workspaceId='string',
workspaceName='string',
workspaceNotificationDestinations=[
'SNS',
],
workspaceOrganizationalUnits=[
'string',
],
workspaceRoleArn='string'
)
ORGANIZATION
, you must specify which organizational units the workspace can access in the workspaceOrganizationalUnits
parameter.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
Whether to remove the VPC configuration from the workspace.
Setting this to true
and providing a vpcConfiguration
to set will return an error.
The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.
The list of Amazon EC2 security group IDs attached to the Amazon VPC for your Grafana workspace to connect.
The list of Amazon EC2 subnet IDs created in the Amazon VPC for your Grafana workspace to connect.
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.
[REQUIRED]
The ID of the workspace to update.
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.
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.
workspaceDataSources
or workspaceNotificationDestinations
, a new IAM role with the necessary permissions is automatically created.dict
Response Syntax
{
'workspace': {
'accountAccessType': 'CURRENT_ACCOUNT'|'ORGANIZATION',
'authentication': {
'providers': [
'AWS_SSO'|'SAML',
],
'samlConfigurationStatus': 'CONFIGURED'|'NOT_CONFIGURED'
},
'created': datetime(2015, 1, 1),
'dataSources': [
'AMAZON_OPENSEARCH_SERVICE'|'CLOUDWATCH'|'PROMETHEUS'|'XRAY'|'TIMESTREAM'|'SITEWISE'|'ATHENA'|'REDSHIFT'|'TWINMAKER',
],
'description': 'string',
'endpoint': 'string',
'freeTrialConsumed': True|False,
'freeTrialExpiration': datetime(2015, 1, 1),
'grafanaVersion': 'string',
'id': 'string',
'licenseExpiration': datetime(2015, 1, 1),
'licenseType': 'ENTERPRISE'|'ENTERPRISE_FREE_TRIAL',
'modified': datetime(2015, 1, 1),
'name': 'string',
'notificationDestinations': [
'SNS',
],
'organizationRoleName': 'string',
'organizationalUnits': [
'string',
],
'permissionType': 'CUSTOMER_MANAGED'|'SERVICE_MANAGED',
'stackSetName': 'string',
'status': 'ACTIVE'|'CREATING'|'DELETING'|'FAILED'|'UPDATING'|'UPGRADING'|'DELETION_FAILED'|'CREATION_FAILED'|'UPDATE_FAILED'|'UPGRADE_FAILED'|'LICENSE_REMOVAL_FAILED',
'tags': {
'string': 'string'
},
'vpcConfiguration': {
'securityGroupIds': [
'string',
],
'subnetIds': [
'string',
]
},
'workspaceRoleArn': 'string'
}
}
Response Structure
(dict) --
workspace (dict) --
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.
authentication (dict) --
A structure that describes whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication.
providers (list) --
Specifies whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication.
samlConfigurationStatus (string) --
Specifies whether the workplace's user authentication method is fully configured.
created (datetime) --
The date that the workspace was created.
dataSources (list) --
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.
endpoint (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 (datetime) --
If this workspace is currently in the free trial period for Grafana Enterprise, this value specifies when that free trial ends.
grafanaVersion (string) --
The version of Grafana supported in this workspace.
id (string) --
The unique ID of this workspace.
licenseExpiration (datetime) --
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.
modified (datetime) --
The most recent date that the workspace was modified.
name (string) --
The name of the workspace.
notificationDestinations (list) --
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 (list) --
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
stackSetName (string) --
The name of the CloudFormation stack set that is used to generate IAM roles to be used for this workspace.
status (string) --
The current status of the workspace.
tags (dict) --
The list of tags associated with the workspace.
vpcConfiguration (dict) --
The configuration for connecting to data sources in a private VPC (Amazon Virtual Private Cloud).
securityGroupIds (list) --
The list of Amazon EC2 security group IDs attached to the Amazon VPC for your Grafana workspace to connect.
subnetIds (list) --
The list of Amazon EC2 subnet IDs created in the Amazon VPC for your Grafana workspace to connect.
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.
Exceptions
ManagedGrafana.Client.exceptions.ResourceNotFoundException
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.ConflictException
ManagedGrafana.Client.exceptions.ValidationException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
update_workspace_authentication
(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.update_workspace_authentication(
authenticationProviders=[
'AWS_SSO'|'SAML',
],
samlConfiguration={
'allowedOrganizations': [
'string',
],
'assertionAttributes': {
'email': 'string',
'groups': 'string',
'login': 'string',
'name': 'string',
'org': 'string',
'role': 'string'
},
'idpMetadata': {
'url': 'string',
'xml': 'string'
},
'loginValidityDuration': 123,
'roleValues': {
'admin': [
'string',
],
'editor': [
'string',
]
}
},
workspaceId='string'
)
[REQUIRED]
Specifies whether this workspace uses SAML 2.0, IAM Identity Center (successor to 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.
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.
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.
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.
The name of the attribute within the SAML assertion to use as the email names for SAML users.
The name of the attribute within the SAML assertion to use as the user full "friendly" names for user groups.
The name of the attribute within the SAML assertion to use as the login names for SAML users.
The name of the attribute within the SAML assertion to use as the user full "friendly" names for SAML users.
The name of the attribute within the SAML assertion to use as the user full "friendly" names for the users' organizations.
The name of the attribute within the SAML assertion to use as the user roles.
A structure containing the identity provider (IdP) metadata used to integrate the identity provider with this workspace.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set: url
, xml
.
The URL of the location containing the IdP metadata.
The full IdP metadata, in XML format.
How long a sign-on session by a SAML user is valid, before the user has to sign on again.
A structure containing arrays that map group names in the SAML assertion to the Grafana Admin
and Editor
roles in the workspace.
A list of groups from the SAML assertion attribute to grant the Grafana Admin
role to.
A list of groups from the SAML assertion attribute to grant the Grafana Editor
role to.
[REQUIRED]
The ID of the workspace to update the authentication for.
dict
Response Syntax
{
'authentication': {
'awsSso': {
'ssoClientId': 'string'
},
'providers': [
'AWS_SSO'|'SAML',
],
'saml': {
'configuration': {
'allowedOrganizations': [
'string',
],
'assertionAttributes': {
'email': 'string',
'groups': 'string',
'login': 'string',
'name': 'string',
'org': 'string',
'role': 'string'
},
'idpMetadata': {
'url': 'string',
'xml': 'string'
},
'loginValidityDuration': 123,
'roleValues': {
'admin': [
'string',
],
'editor': [
'string',
]
}
},
'status': 'CONFIGURED'|'NOT_CONFIGURED'
}
}
}
Response Structure
(dict) --
authentication (dict) --
A structure that describes the user authentication for this workspace after the update is made.
awsSso (dict) --
A structure containing information about how this workspace works with IAM Identity Center.
ssoClientId (string) --
The ID of the IAM Identity Center-managed application that is created by Amazon Managed Grafana.
providers (list) --
Specifies whether this workspace uses IAM Identity Center, SAML, or both methods to authenticate users to use the Grafana console in the Amazon Managed Grafana workspace.
saml (dict) --
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 (dict) --
A structure containing details about how this workspace works with SAML.
allowedOrganizations (list) --
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 (dict) --
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.
idpMetadata (dict) --
A structure containing the identity provider (IdP) metadata used to integrate the identity provider with this workspace.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set: url
, xml
. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER
is as follows:
'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
url (string) --
The URL of the location containing the IdP metadata.
xml (string) --
The full IdP metadata, 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 (dict) --
A structure containing arrays that map group names in the SAML assertion to the Grafana Admin
and Editor
roles in the workspace.
admin (list) --
A list of groups from the SAML assertion attribute to grant the Grafana Admin
role to.
editor (list) --
A list of groups from the SAML assertion attribute to grant the Grafana Editor
role to.
status (string) --
Specifies whether the workspace's SAML configuration is complete.
Exceptions
ManagedGrafana.Client.exceptions.ResourceNotFoundException
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.ConflictException
ManagedGrafana.Client.exceptions.ValidationException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
update_workspace_configuration
(**kwargs)¶Updates the configuration string for the given workspace
See also: AWS API Documentation
Request Syntax
response = client.update_workspace_configuration(
configuration='string',
workspaceId='string'
)
[REQUIRED]
The new configuration string for the workspace. For more information about the format and configuration options available, see Working in your Grafana workspace.
[REQUIRED]
The ID of the workspace to update.
dict
Response Syntax
{}
Response Structure
Exceptions
ManagedGrafana.Client.exceptions.ResourceNotFoundException
ManagedGrafana.Client.exceptions.ThrottlingException
ManagedGrafana.Client.exceptions.ConflictException
ManagedGrafana.Client.exceptions.ValidationException
ManagedGrafana.Client.exceptions.AccessDeniedException
ManagedGrafana.Client.exceptions.InternalServerException
The available paginators are:
ManagedGrafana.Paginator.
ListPermissions
¶paginator = client.get_paginator('list_permissions')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from ManagedGrafana.Client.list_permissions()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
groupId='string',
userId='string',
userType='SSO_USER'|'SSO_GROUP',
workspaceId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
SSO_USER
, then only the permissions of IAM Identity Center users are returned. If you specify SSO_GROUP
, only the permissions of IAM Identity Center groups are returned.[REQUIRED]
The ID of the workspace to list permissions for. This parameter is required.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
Response Syntax
{
'permissions': [
{
'role': 'ADMIN'|'EDITOR'|'VIEWER',
'user': {
'id': 'string',
'type': 'SSO_USER'|'SSO_GROUP'
}
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
permissions (list) --
The permissions returned by the operation.
(dict) --
A structure containing the identity of one user or group and the Admin
, Editor
, or Viewer
role that they have.
role (string) --
Specifies whether the user or group has the Admin
, Editor
, or Viewer
role.
user (dict) --
A structure with the ID of the user or group with this role.
id (string) --
The ID of the user or group.
Pattern: ^([0-9a-fA-F]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$
type (string) --
Specifies whether this is a single user or a group.
NextToken (string) --
A token to resume pagination.
ManagedGrafana.Paginator.
ListWorkspaces
¶paginator = client.get_paginator('list_workspaces')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from ManagedGrafana.Client.list_workspaces()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
{
'workspaces': [
{
'authentication': {
'providers': [
'AWS_SSO'|'SAML',
],
'samlConfigurationStatus': 'CONFIGURED'|'NOT_CONFIGURED'
},
'created': datetime(2015, 1, 1),
'description': 'string',
'endpoint': 'string',
'grafanaVersion': 'string',
'id': 'string',
'modified': datetime(2015, 1, 1),
'name': 'string',
'notificationDestinations': [
'SNS',
],
'status': 'ACTIVE'|'CREATING'|'DELETING'|'FAILED'|'UPDATING'|'UPGRADING'|'DELETION_FAILED'|'CREATION_FAILED'|'UPDATE_FAILED'|'UPGRADE_FAILED'|'LICENSE_REMOVAL_FAILED',
'tags': {
'string': 'string'
}
},
],
'NextToken': 'string'
}
Response Structure
An array of structures that contain some information about the workspaces in the account.
A structure that contains some information about one workspace in the account.
A structure containing information about the authentication methods used in the workspace.
Specifies whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication.
Specifies whether the workplace's user authentication method is fully configured.
The date that the workspace was created.
The customer-entered description of the workspace.
The URL endpoint to use to access the Grafana console in the workspace.
The Grafana version that the workspace is running.
The unique ID of the workspace.
The most recent date that the workspace was modified.
The name of the workspace.
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.
The current status of the workspace.
The list of tags associated with the workspace.
A token to resume pagination.