Class: Aws::ManagedGrafana::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::ManagedGrafana::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-managedgrafana/client.rb
Overview
An API client for ManagedGrafana. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::ManagedGrafana::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#associate_license(params = {}) ⇒ Types::AssociateLicenseResponse
Assigns a Grafana Enterprise license to a workspace.
-
#create_workspace(params = {}) ⇒ Types::CreateWorkspaceResponse
Creates a workspace.
-
#create_workspace_api_key(params = {}) ⇒ Types::CreateWorkspaceApiKeyResponse
Creates a Grafana API key for the workspace.
-
#create_workspace_service_account(params = {}) ⇒ Types::CreateWorkspaceServiceAccountResponse
Creates a service account for the workspace.
-
#create_workspace_service_account_token(params = {}) ⇒ Types::CreateWorkspaceServiceAccountTokenResponse
Creates a token that can be used to authenticate and authorize Grafana HTTP API operations for the given [workspace service account].
-
#delete_workspace(params = {}) ⇒ Types::DeleteWorkspaceResponse
Deletes an Amazon Managed Grafana workspace.
-
#delete_workspace_api_key(params = {}) ⇒ Types::DeleteWorkspaceApiKeyResponse
Deletes a Grafana API key for the workspace.
-
#delete_workspace_service_account(params = {}) ⇒ Types::DeleteWorkspaceServiceAccountResponse
Deletes a workspace service account from the workspace.
-
#delete_workspace_service_account_token(params = {}) ⇒ Types::DeleteWorkspaceServiceAccountTokenResponse
Deletes a token for the workspace service account.
-
#describe_workspace(params = {}) ⇒ Types::DescribeWorkspaceResponse
Displays information about one Amazon Managed Grafana workspace.
-
#describe_workspace_authentication(params = {}) ⇒ Types::DescribeWorkspaceAuthenticationResponse
Displays information about the authentication methods used in one Amazon Managed Grafana workspace.
-
#describe_workspace_configuration(params = {}) ⇒ Types::DescribeWorkspaceConfigurationResponse
Gets the current configuration string for the given workspace.
-
#disassociate_license(params = {}) ⇒ Types::DisassociateLicenseResponse
Removes the Grafana Enterprise license from a workspace.
-
#list_permissions(params = {}) ⇒ Types::ListPermissionsResponse
Lists the users and groups who have the Grafana ‘Admin` and `Editor` roles in this workspace.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
The ‘ListTagsForResource` operation returns the tags that are associated with the Amazon Managed Service for Grafana resource specified by the `resourceArn`.
-
#list_versions(params = {}) ⇒ Types::ListVersionsResponse
Lists available versions of Grafana.
-
#list_workspace_service_account_tokens(params = {}) ⇒ Types::ListWorkspaceServiceAccountTokensResponse
Returns a list of tokens for a workspace service account.
-
#list_workspace_service_accounts(params = {}) ⇒ Types::ListWorkspaceServiceAccountsResponse
Returns a list of service accounts for a workspace.
-
#list_workspaces(params = {}) ⇒ Types::ListWorkspacesResponse
Returns a list of Amazon Managed Grafana workspaces in the account, with some information about each workspace.
-
#tag_resource(params = {}) ⇒ Struct
The ‘TagResource` operation associates tags with an Amazon Managed Grafana resource.
-
#untag_resource(params = {}) ⇒ Struct
The ‘UntagResource` operation removes the association of the tag with the Amazon Managed Grafana resource.
-
#update_permissions(params = {}) ⇒ Types::UpdatePermissionsResponse
Updates which users in a workspace have the Grafana ‘Admin` or `Editor` roles.
-
#update_workspace(params = {}) ⇒ Types::UpdateWorkspaceResponse
Modifies an existing Amazon Managed Grafana workspace.
-
#update_workspace_authentication(params = {}) ⇒ Types::UpdateWorkspaceAuthenticationResponse
Use this operation to define the identity provider (IdP) that this workspace authenticates users from, using SAML.
-
#update_workspace_configuration(params = {}) ⇒ Struct
Updates the configuration string for the given workspace.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
473 474 475 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 473 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2208 2209 2210 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 2208 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2211 2212 2213 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 2211 def errors_module Errors end |
Instance Method Details
#associate_license(params = {}) ⇒ Types::AssociateLicenseResponse
Assigns a Grafana Enterprise license to a workspace. To upgrade, you must use ‘ENTERPRISE` for the `licenseType`, and pass in a valid Grafana Labs token for the `grafanaToken`. Upgrading to Grafana Enterprise incurs additional fees. For more information, see [Upgrade a workspace to Grafana Enterprise].
[1]: docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html
565 566 567 568 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 565 def associate_license(params = {}, = {}) req = build_request(:associate_license, params) req.send_request() end |
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 2181 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::ManagedGrafana') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-managedgrafana' context[:gem_version] = '1.55.0' Seahorse::Client::Request.new(handlers, context) end |
#create_workspace(params = {}) ⇒ Types::CreateWorkspaceResponse
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].
[1]: docs.aws.amazon.com/grafana/latest/APIReference/API_UpdateWorkspace.html
793 794 795 796 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 793 def create_workspace(params = {}, = {}) req = build_request(:create_workspace, params) req.send_request() end |
#create_workspace_api_key(params = {}) ⇒ Types::CreateWorkspaceApiKeyResponse
Creates a Grafana API key for the workspace. This key can be used to authenticate requests sent to the workspace’s HTTP API. See
- docs.aws.amazon.com/grafana/latest/userguide/Using-Grafana-APIs.html][1
-
for available APIs and example requests.
<note markdown=“1”> In workspaces compatible with Grafana version 9 or above, use workspace service accounts instead of API keys. API keys will be removed in a future release.
</note>[1]: docs.aws.amazon.com/grafana/latest/userguide/Using-Grafana-APIs.html
854 855 856 857 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 854 def create_workspace_api_key(params = {}, = {}) req = build_request(:create_workspace_api_key, params) req.send_request() end |
#create_workspace_service_account(params = {}) ⇒ Types::CreateWorkspaceServiceAccountResponse
Creates a service account for the workspace. A service account can be used to call Grafana HTTP APIs, and run automated workloads. After creating the service account with the correct ‘GrafanaRole` for your use case, use `CreateWorkspaceServiceAccountToken` to create a token that can be used to authenticate and authorize Grafana HTTP API calls.
You can only create service accounts for workspaces that are compatible with Grafana version 9 and above.
<note markdown=“1”> For more information about service accounts, see [Service accounts] in the *Amazon Managed Grafana User Guide*.
For more information about the Grafana HTTP APIs, see [Using Grafana
HTTP APIs] in the *Amazon Managed Grafana User Guide*.
</note>
[1]: docs.aws.amazon.com/grafana/latest/userguide/service-accounts.html [2]: docs.aws.amazon.com/grafana/latest/userguide/Using-Grafana-APIs.html
927 928 929 930 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 927 def create_workspace_service_account(params = {}, = {}) req = build_request(:create_workspace_service_account, params) req.send_request() end |
#create_workspace_service_account_token(params = {}) ⇒ Types::CreateWorkspaceServiceAccountTokenResponse
Creates a token that can be used to authenticate and authorize Grafana HTTP API operations for the given [workspace service account]. The service account acts as a user for the API operations, and defines the permissions that are used by the API.
When you create the service account token, you will receive a key that is used when calling Grafana APIs. Do not lose this key, as it will not be retrievable again.
If you do lose the key, you can delete the token and recreate it to
receive a new key. This will disable the initial key.
Service accounts are only available for workspaces that are compatible with Grafana version 9 and above.
[1]: docs.aws.amazon.com/grafana/latest/userguide/service-accounts.html
991 992 993 994 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 991 def create_workspace_service_account_token(params = {}, = {}) req = build_request(:create_workspace_service_account_token, params) req.send_request() end |
#delete_workspace(params = {}) ⇒ Types::DeleteWorkspaceResponse
Deletes an Amazon Managed Grafana workspace.
1055 1056 1057 1058 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1055 def delete_workspace(params = {}, = {}) req = build_request(:delete_workspace, params) req.send_request() end |
#delete_workspace_api_key(params = {}) ⇒ Types::DeleteWorkspaceApiKeyResponse
Deletes a Grafana API key for the workspace.
<note markdown=“1”> In workspaces compatible with Grafana version 9 or above, use workspace service accounts instead of API keys. API keys will be removed in a future release.
</note>
1095 1096 1097 1098 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1095 def delete_workspace_api_key(params = {}, = {}) req = build_request(:delete_workspace_api_key, params) req.send_request() end |
#delete_workspace_service_account(params = {}) ⇒ Types::DeleteWorkspaceServiceAccountResponse
Deletes a workspace service account from the workspace.
This will delete any tokens created for the service account, as well. If the tokens are currently in use, the will fail to authenticate / authorize after they are deleted.
Service accounts are only available for workspaces that are compatible with Grafana version 9 and above.
1136 1137 1138 1139 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1136 def delete_workspace_service_account(params = {}, = {}) req = build_request(:delete_workspace_service_account, params) req.send_request() end |
#delete_workspace_service_account_token(params = {}) ⇒ Types::DeleteWorkspaceServiceAccountTokenResponse
Deletes a token for the workspace service account.
This will disable the key associated with the token. If any automation is currently using the key, it will no longer be authenticated or authorized to perform actions with the Grafana HTTP APIs.
Service accounts are only available for workspaces that are compatible with Grafana version 9 and above.
1183 1184 1185 1186 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1183 def delete_workspace_service_account_token(params = {}, = {}) req = build_request(:delete_workspace_service_account_token, params) req.send_request() end |
#describe_workspace(params = {}) ⇒ Types::DescribeWorkspaceResponse
Displays information about one Amazon Managed Grafana workspace.
1247 1248 1249 1250 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1247 def describe_workspace(params = {}, = {}) req = build_request(:describe_workspace, params) req.send_request() end |
#describe_workspace_authentication(params = {}) ⇒ Types::DescribeWorkspaceAuthenticationResponse
Displays information about the authentication methods used in one Amazon Managed Grafana workspace.
1294 1295 1296 1297 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1294 def describe_workspace_authentication(params = {}, = {}) req = build_request(:describe_workspace_authentication, params) req.send_request() end |
#describe_workspace_configuration(params = {}) ⇒ Types::DescribeWorkspaceConfigurationResponse
Gets the current configuration string for the given workspace.
1324 1325 1326 1327 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1324 def describe_workspace_configuration(params = {}, = {}) req = build_request(:describe_workspace_configuration, params) req.send_request() end |
#disassociate_license(params = {}) ⇒ Types::DisassociateLicenseResponse
Removes the Grafana Enterprise license from a workspace.
1392 1393 1394 1395 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1392 def disassociate_license(params = {}, = {}) req = build_request(:disassociate_license, params) req.send_request() end |
#list_permissions(params = {}) ⇒ Types::ListPermissionsResponse
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`.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1456 1457 1458 1459 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1456 def (params = {}, = {}) req = build_request(:list_permissions, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
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.
1488 1489 1490 1491 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1488 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#list_versions(params = {}) ⇒ Types::ListVersionsResponse
Lists available versions of Grafana. These are available when calling ‘CreateWorkspace`. Optionally, include a workspace to list the versions to which it can be upgraded.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1534 1535 1536 1537 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1534 def list_versions(params = {}, = {}) req = build_request(:list_versions, params) req.send_request() end |
#list_workspace_service_account_tokens(params = {}) ⇒ Types::ListWorkspaceServiceAccountTokensResponse
Returns a list of tokens for a workspace service account.
<note markdown=“1”> This does not return the key for each token. You cannot access keys after they are created. To create a new key, delete the token and recreate it.
</note>
Service accounts are only available for workspaces that are compatible with Grafana version 9 and above.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1598 1599 1600 1601 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1598 def list_workspace_service_account_tokens(params = {}, = {}) req = build_request(:list_workspace_service_account_tokens, params) req.send_request() end |
#list_workspace_service_accounts(params = {}) ⇒ Types::ListWorkspaceServiceAccountsResponse
Returns a list of service accounts for a workspace.
Service accounts are only available for workspaces that are compatible with Grafana version 9 and above.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1648 1649 1650 1651 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1648 def list_workspace_service_accounts(params = {}, = {}) req = build_request(:list_workspace_service_accounts, params) req.send_request() end |
#list_workspaces(params = {}) ⇒ Types::ListWorkspacesResponse
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].
[1]: docs.aws.amazon.com/AAMG/latest/APIReference/API_DescribeWorkspace.html
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1708 1709 1710 1711 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1708 def list_workspaces(params = {}, = {}) req = build_request(:list_workspaces, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
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.
1745 1746 1747 1748 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1745 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
The ‘UntagResource` operation removes the association of the tag with the Amazon Managed Grafana resource.
1772 1773 1774 1775 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1772 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_permissions(params = {}) ⇒ Types::UpdatePermissionsResponse
Updates which users in a workspace have the Grafana ‘Admin` or `Editor` roles.
1823 1824 1825 1826 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 1823 def (params = {}, = {}) req = build_request(:update_permissions, params) req.send_request() end |
#update_workspace(params = {}) ⇒ Types::UpdateWorkspaceResponse
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].
[1]: docs.aws.amazon.com/grafana/latest/APIReference/API_UpdateWorkspaceAuthentication.html [2]: docs.aws.amazon.com/grafana/latest/APIReference/API_UpdatePermissions.html
2029 2030 2031 2032 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 2029 def update_workspace(params = {}, = {}) req = build_request(:update_workspace, params) req.send_request() end |
#update_workspace_authentication(params = {}) ⇒ Types::UpdateWorkspaceAuthenticationResponse
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.
<note markdown=“1”> Changes to the authentication method for a workspace may take a few minutes to take effect.
</note>
2121 2122 2123 2124 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 2121 def update_workspace_authentication(params = {}, = {}) req = build_request(:update_workspace_authentication, params) req.send_request() end |
#update_workspace_configuration(params = {}) ⇒ Struct
Updates the configuration string for the given workspace
2172 2173 2174 2175 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 2172 def update_workspace_configuration(params = {}, = {}) req = build_request(:update_workspace_configuration, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2201 2202 2203 |
# File 'lib/aws-sdk-managedgrafana/client.rb', line 2201 def waiter_names [] end |