aws_sdk_grafana/client/
create_workspace_service_account_token.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 [`CreateWorkspaceServiceAccountToken`](crate::operation::create_workspace_service_account_token::builders::CreateWorkspaceServiceAccountTokenFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`name(impl Into<String>)`](crate::operation::create_workspace_service_account_token::builders::CreateWorkspaceServiceAccountTokenFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_workspace_service_account_token::builders::CreateWorkspaceServiceAccountTokenFluentBuilder::set_name):<br>required: **true**<br><p>A name for the token to create.</p><br>
7    ///   - [`seconds_to_live(i32)`](crate::operation::create_workspace_service_account_token::builders::CreateWorkspaceServiceAccountTokenFluentBuilder::seconds_to_live) / [`set_seconds_to_live(Option<i32>)`](crate::operation::create_workspace_service_account_token::builders::CreateWorkspaceServiceAccountTokenFluentBuilder::set_seconds_to_live):<br>required: **true**<br><p>Sets how long the token will be valid, in seconds. You can set the time up to 30 days in the future.</p><br>
8    ///   - [`service_account_id(impl Into<String>)`](crate::operation::create_workspace_service_account_token::builders::CreateWorkspaceServiceAccountTokenFluentBuilder::service_account_id) / [`set_service_account_id(Option<String>)`](crate::operation::create_workspace_service_account_token::builders::CreateWorkspaceServiceAccountTokenFluentBuilder::set_service_account_id):<br>required: **true**<br><p>The ID of the service account for which to create a token.</p><br>
9    ///   - [`workspace_id(impl Into<String>)`](crate::operation::create_workspace_service_account_token::builders::CreateWorkspaceServiceAccountTokenFluentBuilder::workspace_id) / [`set_workspace_id(Option<String>)`](crate::operation::create_workspace_service_account_token::builders::CreateWorkspaceServiceAccountTokenFluentBuilder::set_workspace_id):<br>required: **true**<br><p>The ID of the workspace the service account resides within.</p><br>
10    /// - On success, responds with [`CreateWorkspaceServiceAccountTokenOutput`](crate::operation::create_workspace_service_account_token::CreateWorkspaceServiceAccountTokenOutput) with field(s):
11    ///   - [`service_account_token(Option<ServiceAccountTokenSummaryWithKey>)`](crate::operation::create_workspace_service_account_token::CreateWorkspaceServiceAccountTokenOutput::service_account_token): <p>Information about the created token, including the key. Be sure to store the key securely.</p>
12    ///   - [`service_account_id(String)`](crate::operation::create_workspace_service_account_token::CreateWorkspaceServiceAccountTokenOutput::service_account_id): <p>The ID of the service account where the token was created.</p>
13    ///   - [`workspace_id(String)`](crate::operation::create_workspace_service_account_token::CreateWorkspaceServiceAccountTokenOutput::workspace_id): <p>The ID of the workspace where the token was created.</p>
14    /// - On failure, responds with [`SdkError<CreateWorkspaceServiceAccountTokenError>`](crate::operation::create_workspace_service_account_token::CreateWorkspaceServiceAccountTokenError)
15    pub fn create_workspace_service_account_token(
16        &self,
17    ) -> crate::operation::create_workspace_service_account_token::builders::CreateWorkspaceServiceAccountTokenFluentBuilder {
18        crate::operation::create_workspace_service_account_token::builders::CreateWorkspaceServiceAccountTokenFluentBuilder::new(self.handle.clone())
19    }
20}