Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions awscli/examples/grafana/create-workspace.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
**To create a Grafana workspace**

The following ``create-workspace`` example creates a new Amazon Managed Grafana workspace with basic configuration. ::

aws grafana create-workspace \
--workspace-name "MyGrafanaWorkspace" \
--workspace-description "Development team monitoring workspace" \
--account-access-type CURRENT_ACCOUNT \
--authentication-providers AWS_SSO \
--permission-type SERVICE_MANAGED

Output::

{
"workspace": {
"id": "g-1234567890",
"name": "MyGrafanaWorkspace",
"description": "Development team monitoring workspace",
"endpoint": "https://g-1234567890.grafana-workspace.us-east-1.amazonaws.com",
"status": "CREATING",
"created": "2023-05-07T20:21:01.656000+00:00",
"modified": "2023-05-07T20:21:01.656000+00:00",
"accountAccessType": "CURRENT_ACCOUNT",
"authenticationProviders": ["AWS_SSO"],
"permissionType": "SERVICE_MANAGED",
"grafanaVersion": "9.4"
}
}

**To create a workspace with custom data sources**

The following ``create-workspace`` example creates a Grafana workspace with specific data sources enabled. ::

aws grafana create-workspace \
--workspace-name "ProductionMonitoring" \
--workspace-description "Production monitoring and alerting" \
--account-access-type CURRENT_ACCOUNT \
--authentication-providers AWS_SSO \
--permission-type SERVICE_MANAGED \
--workspace-data-sources CLOUDWATCH PROMETHEUS XRAY \
--workspace-notification-destinations SNS

Output::

{
"workspace": {
"id": "g-0987654321",
"name": "ProductionMonitoring",
"description": "Production monitoring and alerting",
"endpoint": "https://g-0987654321.grafana-workspace.us-east-1.amazonaws.com",
"status": "CREATING",
"dataSources": ["CLOUDWATCH", "PROMETHEUS", "XRAY"],
"notificationDestinations": ["SNS"]
}
}
28 changes: 28 additions & 0 deletions awscli/examples/grafana/describe-workspace.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
**To describe a Grafana workspace**

The following ``describe-workspace`` example retrieves detailed information about a specific Grafana workspace. ::

aws grafana describe-workspace \
--workspace-id g-1234567890

Output::

{
"workspace": {
"id": "g-1234567890",
"name": "MyGrafanaWorkspace",
"description": "Development team monitoring workspace",
"endpoint": "https://g-1234567890.grafana-workspace.us-east-1.amazonaws.com",
"status": "ACTIVE",
"created": "2023-05-07T20:21:01.656000+00:00",
"modified": "2023-05-07T20:25:15.123000+00:00",
"accountAccessType": "CURRENT_ACCOUNT",
"authenticationProviders": ["AWS_SSO"],
"permissionType": "SERVICE_MANAGED",
"grafanaVersion": "9.4",
"dataSources": ["CLOUDWATCH"],
"organizationRoleName": "ADMIN",
"stackSetName": "grafana-workspace-stack",
"workspaceRoleArn": "arn:aws:iam::123456789012:role/service-role/AmazonGrafanaServiceRole-g1234567890"
}
}
43 changes: 43 additions & 0 deletions awscli/examples/grafana/update-workspace.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
**To update a Grafana workspace**

The following ``update-workspace`` example updates the name and description of an existing Grafana workspace. ::

aws grafana update-workspace \
--workspace-id g-1234567890 \
--workspace-name "UpdatedGrafanaWorkspace" \
--workspace-description "Updated development team monitoring workspace"

Output::

{
"workspace": {
"id": "g-1234567890",
"name": "UpdatedGrafanaWorkspace",
"description": "Updated development team monitoring workspace",
"endpoint": "https://g-1234567890.grafana-workspace.us-east-1.amazonaws.com",
"status": "UPDATING",
"modified": "2023-05-07T21:30:45.789000+00:00"
}
}

**To update workspace data sources**

The following ``update-workspace`` example adds additional data sources to an existing workspace. ::

aws grafana update-workspace \
--workspace-id g-1234567890 \
--workspace-data-sources CLOUDWATCH PROMETHEUS TIMESTREAM \
--workspace-notification-destinations SNS SES

Output::

{
"workspace": {
"id": "g-1234567890",
"name": "UpdatedGrafanaWorkspace",
"status": "UPDATING",
"dataSources": ["CLOUDWATCH", "PROMETHEUS", "TIMESTREAM"],
"notificationDestinations": ["SNS", "SES"],
"modified": "2023-05-07T21:35:12.456000+00:00"
}
}