Struct aws_sdk_grafana::client::Client
source · [−]pub struct Client<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* private fields */ }
Expand description
Client for Amazon Managed Grafana
Client for invoking operations on Amazon Managed Grafana. Each operation on Amazon Managed Grafana is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
Examples
Constructing a client and invoking an operation
// create a shared configuration. This can be used & shared between multiple service clients.
let shared_config = aws_config::load_from_env().await;
let client = aws_sdk_grafana::Client::new(&shared_config);
// invoke an operation
/* let rsp = client
.<operation_name>().
.<param>("some value")
.send().await; */
Constructing a client with custom configuration
use aws_config::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_grafana::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_grafana::Client::from_conf(config);
Implementations
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
Constructs a fluent builder for the AssociateLicense
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
:The ID of the workspace to associate the license with.
license_type(LicenseType)
/set_license_type(Option<LicenseType>)
:The type of license to associate with the workspace.
- On success, responds with
AssociateLicenseOutput
with field(s):workspace(Option<WorkspaceDescription>)
:A structure containing data about the workspace.
- On failure, responds with
SdkError<AssociateLicenseError>
Constructs a fluent builder for the CreateWorkspace
operation.
- The fluent builder is configurable:
account_access_type(AccountAccessType)
/set_account_access_type(Option<AccountAccessType>)
: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 theworkspaceOrganizationalUnits
parameter.client_token(impl Into<String>)
/set_client_token(Option<String>)
:A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
organization_role_name(impl Into<String>)
/set_organization_role_name(Option<String>)
:The name of an IAM role that already exists to use with Organizations to access Amazon Web Services data sources and notification channels in other accounts in an organization.
permission_type(PermissionType)
/set_permission_type(Option<PermissionType>)
:If you specify
Service Managed
, Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use Amazon Web Services data sources and notification channels.If you specify
CUSTOMER_MANAGED
, you will manage those roles and permissions yourself. If you are creating this workspace in a member account of an organization that is not a delegated administrator account, and you want the workspace to access data sources in other Amazon Web Services accounts in the organization, you must chooseCUSTOMER_MANAGED
.For more information, see Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels
stack_set_name(impl Into<String>)
/set_stack_set_name(Option<String>)
:The name of the CloudFormation stack set to use to generate IAM roles to be used for this workspace.
workspace_data_sources(Vec<DataSourceType>)
/set_workspace_data_sources(Option<Vec<DataSourceType>>)
: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.
workspace_description(impl Into<String>)
/set_workspace_description(Option<String>)
:A description for the workspace. This is used only to help you identify this workspace.
workspace_name(impl Into<String>)
/set_workspace_name(Option<String>)
:The name for the workspace. It does not have to be unique.
workspace_notification_destinations(Vec<NotificationDestinationType>)
/set_workspace_notification_destinations(Option<Vec<NotificationDestinationType>>)
: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.
workspace_organizational_units(Vec<String>)
/set_workspace_organizational_units(Option<Vec<String>>)
:Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.
workspace_role_arn(impl Into<String>)
/set_workspace_role_arn(Option<String>)
:The workspace needs an IAM role that grants permissions to the Amazon Web Services resources that the workspace will view data from. If you already have a role that you want to use, specify it here. If you omit this field and you specify some Amazon Web Services resources in
workspaceDataSources
orworkspaceNotificationDestinations
, a new IAM role with the necessary permissions is automatically created.authentication_providers(Vec<AuthenticationProviderTypes>)
/set_authentication_providers(Option<Vec<AuthenticationProviderTypes>>)
:Specifies whether this workspace uses SAML 2.0, Amazon Web Services Single Sign On, or both to authenticate users for using the Grafana console within a workspace. For more information, see User authentication in Amazon Managed Grafana.
- On success, responds with
CreateWorkspaceOutput
with field(s):workspace(Option<WorkspaceDescription>)
:A structure containing data about the workspace that was created.
- On failure, responds with
SdkError<CreateWorkspaceError>
Constructs a fluent builder for the DeleteWorkspace
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
:The ID of the workspace to delete.
- On success, responds with
DeleteWorkspaceOutput
with field(s):workspace(Option<WorkspaceDescription>)
:A structure containing information about the workspace that was deleted.
- On failure, responds with
SdkError<DeleteWorkspaceError>
Constructs a fluent builder for the DescribeWorkspace
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
:The ID of the workspace to display information about.
- On success, responds with
DescribeWorkspaceOutput
with field(s):workspace(Option<WorkspaceDescription>)
:A structure containing information about the workspace.
- On failure, responds with
SdkError<DescribeWorkspaceError>
Constructs a fluent builder for the DescribeWorkspaceAuthentication
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
:The ID of the workspace to return authentication information about.
- On success, responds with
DescribeWorkspaceAuthenticationOutput
with field(s):authentication(Option<AuthenticationDescription>)
:A structure containing information about the authentication methods used in the workspace.
- On failure, responds with
SdkError<DescribeWorkspaceAuthenticationError>
Constructs a fluent builder for the DisassociateLicense
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
:The ID of the workspace to remove the Grafana Enterprise license from.
license_type(LicenseType)
/set_license_type(Option<LicenseType>)
:The type of license to remove from the workspace.
- On success, responds with
DisassociateLicenseOutput
with field(s):workspace(Option<WorkspaceDescription>)
:A structure containing information about the workspace.
- On failure, responds with
SdkError<DisassociateLicenseError>
Constructs a fluent builder for the ListPermissions
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to include in the response.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token to use when requesting the next set of results. You received this token from a previous
ListPermissions
operation.user_type(UserType)
/set_user_type(Option<UserType>)
:(Optional) If you specify
SSO_USER
, then only the permissions of Amazon Web Services SSO users are returned. If you specifySSO_GROUP
, only the permissions of Amazon Web Services SSO groups are returned.user_id(impl Into<String>)
/set_user_id(Option<String>)
:(Optional) Limits the results to only the user that matches this ID.
group_id(impl Into<String>)
/set_group_id(Option<String>)
:(Optional) Limits the results to only the group that matches this ID.
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
:The ID of the workspace to list permissions for. This parameter is required.
- On success, responds with
ListPermissionsOutput
with field(s):next_token(Option<String>)
:The token to use in a subsequent
ListPermissions
operation to return the next set of results.permissions(Option<Vec<PermissionEntry>>)
:The permissions returned by the operation.
- On failure, responds with
SdkError<ListPermissionsError>
Constructs a fluent builder for the ListWorkspaces
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of workspaces to include in the results.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token for the next set of workspaces to return. (You receive this token from a previous
ListWorkspaces
operation.)
- On success, responds with
ListWorkspacesOutput
with field(s):workspaces(Option<Vec<WorkspaceSummary>>)
:An array of structures that contain some information about the workspaces in the account.
next_token(Option<String>)
:The token to use when requesting the next set of workspaces.
- On failure, responds with
SdkError<ListWorkspacesError>
Constructs a fluent builder for the UpdatePermissions
operation.
- The fluent builder is configurable:
update_instruction_batch(Vec<UpdateInstruction>)
/set_update_instruction_batch(Option<Vec<UpdateInstruction>>)
:An array of structures that contain the permission updates to make.
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
:The ID of the workspace to update.
- On success, responds with
UpdatePermissionsOutput
with field(s):errors(Option<Vec<UpdateError>>)
:An array of structures that contain the errors from the operation, if any.
- On failure, responds with
SdkError<UpdatePermissionsError>
Constructs a fluent builder for the UpdateWorkspace
operation.
- The fluent builder is configurable:
account_access_type(AccountAccessType)
/set_account_access_type(Option<AccountAccessType>)
: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 theworkspaceOrganizationalUnits
parameter.organization_role_name(impl Into<String>)
/set_organization_role_name(Option<String>)
:The name of an IAM role that already exists to use to access resources through Organizations.
permission_type(PermissionType)
/set_permission_type(Option<PermissionType>)
: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 chooseCUSTOMER_MANAGED
.For more information, see Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels
stack_set_name(impl Into<String>)
/set_stack_set_name(Option<String>)
:The name of the CloudFormation stack set to use to generate IAM roles to be used for this workspace.
workspace_data_sources(Vec<DataSourceType>)
/set_workspace_data_sources(Option<Vec<DataSourceType>>)
: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.
workspace_description(impl Into<String>)
/set_workspace_description(Option<String>)
:A description for the workspace. This is used only to help you identify this workspace.
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
:The ID of the workspace to update.
workspace_name(impl Into<String>)
/set_workspace_name(Option<String>)
:A new name for the workspace to update.
workspace_notification_destinations(Vec<NotificationDestinationType>)
/set_workspace_notification_destinations(Option<Vec<NotificationDestinationType>>)
: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.
workspace_organizational_units(Vec<String>)
/set_workspace_organizational_units(Option<Vec<String>>)
:Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.
workspace_role_arn(impl Into<String>)
/set_workspace_role_arn(Option<String>)
:The workspace needs an IAM role that grants permissions to the Amazon Web Services resources that the workspace will view data from. If you already have a role that you want to use, specify it here. If you omit this field and you specify some Amazon Web Services resources in
workspaceDataSources
orworkspaceNotificationDestinations
, a new IAM role with the necessary permissions is automatically created.
- On success, responds with
UpdateWorkspaceOutput
with field(s):workspace(Option<WorkspaceDescription>)
:A structure containing data about the workspace that was created.
- On failure, responds with
SdkError<UpdateWorkspaceError>
Constructs a fluent builder for the UpdateWorkspaceAuthentication
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
:The ID of the workspace to update the authentication for.
authentication_providers(Vec<AuthenticationProviderTypes>)
/set_authentication_providers(Option<Vec<AuthenticationProviderTypes>>)
:Specifies whether this workspace uses SAML 2.0, Amazon Web Services Single Sign On, or both to authenticate users for using the Grafana console within a workspace. For more information, see User authentication in Amazon Managed Grafana.
saml_configuration(SamlConfiguration)
/set_saml_configuration(Option<SamlConfiguration>)
: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
andEditor
roles in the workspace.
- On success, responds with
UpdateWorkspaceAuthenticationOutput
with field(s):authentication(Option<AuthenticationDescription>)
:A structure that describes the user authentication for this workspace after the update is made.
- On failure, responds with
SdkError<UpdateWorkspaceAuthenticationError>
Creates a client with the given service config and connector override.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !RefUnwindSafe for Client<C, M, R>
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !UnwindSafe for Client<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more