-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Add CLI examples for Amazon Managed Grafana workspace operations #9787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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" | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please provide a "For more information" link for every example in this request. See format in the contribution guide: https://aws.github.io/aws-cli/docs_styleguide.html#for-more-information-link |
||||||
| **To create a workspace with custom data sources** | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| 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"] | ||||||
| } | ||||||
| } | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please provide a "For more information" link for every example in this request. See format in the contribution guide: https://aws.github.io/aws-cli/docs_styleguide.html#for-more-information-link |
||||||
| 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" | ||
| } | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please provide a "For more information" link for every example in this request. See format in the contribution guide: https://aws.github.io/aws-cli/docs_styleguide.html#for-more-information-link |
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,43 @@ | ||||||
| **To update a Grafana workspace** | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| 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" | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please provide a "For more information" link for every example in this request. See format in the contribution guide: https://aws.github.io/aws-cli/docs_styleguide.html#for-more-information-link |
||||||
| **To update workspace data sources** | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| 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" | ||||||
| } | ||||||
| } | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please provide a "For more information" link for every example in this request. See format in the contribution guide: https://aws.github.io/aws-cli/docs_styleguide.html#for-more-information-link |
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.