aws_sdk_grafana/client/
create_workspace.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CreateWorkspace`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`account_access_type(AccountAccessType)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::account_access_type) / [`set_account_access_type(Option<AccountAccessType>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_account_access_type):<br>required: **true**<br><p>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 <code>ORGANIZATION</code>, you must specify which organizational units the workspace can access in the <code>workspaceOrganizationalUnits</code> parameter.</p><br>
7    ///   - [`client_token(impl Into<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_client_token):<br>required: **false**<br><p>A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.</p><br>
8    ///   - [`organization_role_name(impl Into<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::organization_role_name) / [`set_organization_role_name(Option<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_organization_role_name):<br>required: **false**<br><p>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.</p><br>
9    ///   - [`permission_type(PermissionType)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::permission_type) / [`set_permission_type(Option<PermissionType>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_permission_type):<br>required: **true**<br><p>When creating a workspace through the Amazon Web Services API, CLI or Amazon Web Services CloudFormation, you must manage IAM roles and provision the permissions that the workspace needs to use Amazon Web Services data sources and notification channels.</p> <p>You must also specify a <code>workspaceRoleArn</code> for a role that you will manage for the workspace to use when accessing those datasources and notification channels.</p> <p>The ability for Amazon Managed Grafana to create and update IAM roles on behalf of the user is supported only in the Amazon Managed Grafana console, where this value may be set to <code>SERVICE_MANAGED</code>.</p><note>  <p>Use only the <code>CUSTOMER_MANAGED</code> permission type when creating a workspace with the API, CLI or Amazon Web Services CloudFormation.</p> </note> <p>For more information, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/AMG-manage-permissions.html">Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels</a>.</p><br>
10    ///   - [`stack_set_name(impl Into<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::stack_set_name) / [`set_stack_set_name(Option<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_stack_set_name):<br>required: **false**<br><p>The name of the CloudFormation stack set to use to generate IAM roles to be used for this workspace.</p><br>
11    ///   - [`workspace_data_sources(DataSourceType)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::workspace_data_sources) / [`set_workspace_data_sources(Option<Vec::<DataSourceType>>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_workspace_data_sources):<br>required: **false**<br><p>This parameter is for internal use only, and should not be used.</p><br>
12    ///   - [`workspace_description(impl Into<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::workspace_description) / [`set_workspace_description(Option<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_workspace_description):<br>required: **false**<br><p>A description for the workspace. This is used only to help you identify this workspace.</p> <p>Pattern: <code>^\[\\p{L}\\p{Z}\\p{N}\\p{P}\]{0,2048}$</code></p><br>
13    ///   - [`workspace_name(impl Into<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::workspace_name) / [`set_workspace_name(Option<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_workspace_name):<br>required: **false**<br><p>The name for the workspace. It does not have to be unique.</p><br>
14    ///   - [`workspace_notification_destinations(NotificationDestinationType)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::workspace_notification_destinations) / [`set_workspace_notification_destinations(Option<Vec::<NotificationDestinationType>>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_workspace_notification_destinations):<br>required: **false**<br><p>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.</p><br>
15    ///   - [`workspace_organizational_units(impl Into<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::workspace_organizational_units) / [`set_workspace_organizational_units(Option<Vec::<String>>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_workspace_organizational_units):<br>required: **false**<br><p>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.</p><br>
16    ///   - [`workspace_role_arn(impl Into<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::workspace_role_arn) / [`set_workspace_role_arn(Option<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_workspace_role_arn):<br>required: **false**<br><p>Specified the IAM role that grants permissions to the Amazon Web Services resources that the workspace will view data from, including both data sources and notification channels. You are responsible for managing the permissions for this role as new data sources or notification channels are added.</p><br>
17    ///   - [`authentication_providers(AuthenticationProviderTypes)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::authentication_providers) / [`set_authentication_providers(Option<Vec::<AuthenticationProviderTypes>>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_authentication_providers):<br>required: **true**<br><p>Specifies whether this workspace uses SAML 2.0, IAM Identity Center, or both to authenticate users for using the Grafana console within a workspace. For more information, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/authentication-in-AMG.html">User authentication in Amazon Managed Grafana</a>.</p><br>
18    ///   - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_tags):<br>required: **false**<br><p>The list of tags associated with the workspace.</p><br>
19    ///   - [`vpc_configuration(VpcConfiguration)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::vpc_configuration) / [`set_vpc_configuration(Option<VpcConfiguration>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_vpc_configuration):<br>required: **false**<br><p>The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to.</p><note>  <p>Connecting to a private VPC is not yet available in the Asia Pacific (Seoul) Region (ap-northeast-2).</p> </note><br>
20    ///   - [`configuration(impl Into<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::configuration) / [`set_configuration(Option<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_configuration):<br>required: **false**<br><p>The configuration string for the workspace that you create. For more information about the format and configuration options available, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/AMG-configure-workspace.html">Working in your Grafana workspace</a>.</p><br>
21    ///   - [`network_access_control(NetworkAccessConfiguration)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::network_access_control) / [`set_network_access_control(Option<NetworkAccessConfiguration>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_network_access_control):<br>required: **false**<br><p>Configuration for network access to your workspace.</p> <p>When this is configured, only listed IP addresses and VPC endpoints will be able to access your workspace. Standard Grafana authentication and authorization will still be required.</p> <p>If this is not configured, or is removed, then all IP addresses and VPC endpoints will be allowed. Standard Grafana authentication and authorization will still be required.</p><br>
22    ///   - [`grafana_version(impl Into<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::grafana_version) / [`set_grafana_version(Option<String>)`](crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::set_grafana_version):<br>required: **false**<br><p>Specifies the version of Grafana to support in the new workspace. If not specified, defaults to the latest version (for example, 10.4).</p> <p>To get a list of supported versions, use the <code>ListVersions</code> operation.</p><br>
23    /// - On success, responds with [`CreateWorkspaceOutput`](crate::operation::create_workspace::CreateWorkspaceOutput) with field(s):
24    ///   - [`workspace(Option<WorkspaceDescription>)`](crate::operation::create_workspace::CreateWorkspaceOutput::workspace): <p>A structure containing data about the workspace that was created.</p>
25    /// - On failure, responds with [`SdkError<CreateWorkspaceError>`](crate::operation::create_workspace::CreateWorkspaceError)
26    pub fn create_workspace(&self) -> crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder {
27        crate::operation::create_workspace::builders::CreateWorkspaceFluentBuilder::new(self.handle.clone())
28    }
29}