aws_sdk_grafana/client/create_workspace_service_account_token.rs
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`CreateWorkspaceServiceAccountToken`](crate::operation::create_workspace_service_account_token::builders::CreateWorkspaceServiceAccountTokenFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`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>
/// - [`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>
/// - [`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>
/// - [`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>
/// - On success, responds with [`CreateWorkspaceServiceAccountTokenOutput`](crate::operation::create_workspace_service_account_token::CreateWorkspaceServiceAccountTokenOutput) with field(s):
/// - [`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>
/// - [`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>
/// - [`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>
/// - On failure, responds with [`SdkError<CreateWorkspaceServiceAccountTokenError>`](crate::operation::create_workspace_service_account_token::CreateWorkspaceServiceAccountTokenError)
pub fn create_workspace_service_account_token(
&self,
) -> crate::operation::create_workspace_service_account_token::builders::CreateWorkspaceServiceAccountTokenFluentBuilder {
crate::operation::create_workspace_service_account_token::builders::CreateWorkspaceServiceAccountTokenFluentBuilder::new(self.handle.clone())
}
}