1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateToken`](crate::operation::create_token::builders::CreateTokenFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`client_id(impl ::std::convert::Into<String>)`](crate::operation::create_token::builders::CreateTokenFluentBuilder::client_id) / [`set_client_id(Option<String>)`](crate::operation::create_token::builders::CreateTokenFluentBuilder::set_client_id): <p>The unique identifier string for each client. This value should come from the persisted result of the <code>RegisterClient</code> API.</p>
    ///   - [`client_secret(impl ::std::convert::Into<String>)`](crate::operation::create_token::builders::CreateTokenFluentBuilder::client_secret) / [`set_client_secret(Option<String>)`](crate::operation::create_token::builders::CreateTokenFluentBuilder::set_client_secret): <p>A secret string generated for the client. This value should come from the persisted result of the <code>RegisterClient</code> API.</p>
    ///   - [`grant_type(impl ::std::convert::Into<String>)`](crate::operation::create_token::builders::CreateTokenFluentBuilder::grant_type) / [`set_grant_type(Option<String>)`](crate::operation::create_token::builders::CreateTokenFluentBuilder::set_grant_type): <p>Supports grant types for the authorization code, refresh token, and device code request. For device code requests, specify the following value:</p>  <p> <code>urn:ietf:params:oauth:grant-type:<i>device_code</i> </code> </p>  <p>For information about how to obtain the device code, see the <code>StartDeviceAuthorization</code> topic.</p>
    ///   - [`device_code(impl ::std::convert::Into<String>)`](crate::operation::create_token::builders::CreateTokenFluentBuilder::device_code) / [`set_device_code(Option<String>)`](crate::operation::create_token::builders::CreateTokenFluentBuilder::set_device_code): <p>Used only when calling this API for the device code grant type. This short-term code is used to identify this authentication attempt. This should come from an in-memory reference to the result of the <code>StartDeviceAuthorization</code> API.</p>
    ///   - [`code(impl ::std::convert::Into<String>)`](crate::operation::create_token::builders::CreateTokenFluentBuilder::code) / [`set_code(Option<String>)`](crate::operation::create_token::builders::CreateTokenFluentBuilder::set_code): <p>The authorization code received from the authorization service. This parameter is required to perform an authorization grant request to get access to a token.</p>
    ///   - [`refresh_token(impl ::std::convert::Into<String>)`](crate::operation::create_token::builders::CreateTokenFluentBuilder::refresh_token) / [`set_refresh_token(Option<String>)`](crate::operation::create_token::builders::CreateTokenFluentBuilder::set_refresh_token): <p>Currently, <code>refreshToken</code> is not yet implemented and is not supported. For more information about the features and limitations of the current IAM Identity Center OIDC implementation, see <i>Considerations for Using this Guide</i> in the <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html">IAM Identity Center OIDC API Reference</a>.</p>  <p>The token used to obtain an access token in the event that the access token is invalid or expired.</p>
    ///   - [`scope(Vec<String>)`](crate::operation::create_token::builders::CreateTokenFluentBuilder::scope) / [`set_scope(Option<Vec<String>>)`](crate::operation::create_token::builders::CreateTokenFluentBuilder::set_scope): <p>The list of scopes that is defined by the client. Upon authorization, this list is used to restrict permissions when granting an access token.</p>
    ///   - [`redirect_uri(impl ::std::convert::Into<String>)`](crate::operation::create_token::builders::CreateTokenFluentBuilder::redirect_uri) / [`set_redirect_uri(Option<String>)`](crate::operation::create_token::builders::CreateTokenFluentBuilder::set_redirect_uri): <p>The location of the application that will receive the authorization code. Users authorize the service to send the request to this location.</p>
    /// - On success, responds with [`CreateTokenOutput`](crate::operation::create_token::CreateTokenOutput) with field(s):
    ///   - [`access_token(Option<String>)`](crate::operation::create_token::CreateTokenOutput::access_token): <p>An opaque token to access IAM Identity Center resources assigned to a user.</p>
    ///   - [`token_type(Option<String>)`](crate::operation::create_token::CreateTokenOutput::token_type): <p>Used to notify the client that the returned token is an access token. The supported type is <code>BearerToken</code>.</p>
    ///   - [`expires_in(i32)`](crate::operation::create_token::CreateTokenOutput::expires_in): <p>Indicates the time in seconds when an access token will expire.</p>
    ///   - [`refresh_token(Option<String>)`](crate::operation::create_token::CreateTokenOutput::refresh_token): <p>Currently, <code>refreshToken</code> is not yet implemented and is not supported. For more information about the features and limitations of the current IAM Identity Center OIDC implementation, see <i>Considerations for Using this Guide</i> in the <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html">IAM Identity Center OIDC API Reference</a>.</p>  <p>A token that, if present, can be used to refresh a previously issued access token that might have expired.</p>
    ///   - [`id_token(Option<String>)`](crate::operation::create_token::CreateTokenOutput::id_token): <p>Currently, <code>idToken</code> is not yet implemented and is not supported. For more information about the features and limitations of the current IAM Identity Center OIDC implementation, see <i>Considerations for Using this Guide</i> in the <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html">IAM Identity Center OIDC API Reference</a>.</p>  <p>The identifier of the user that associated with the access token, if present.</p>
    /// - On failure, responds with [`SdkError<CreateTokenError>`](crate::operation::create_token::CreateTokenError)
    pub fn create_token(
        &self,
    ) -> crate::operation::create_token::builders::CreateTokenFluentBuilder {
        crate::operation::create_token::builders::CreateTokenFluentBuilder::new(self.handle.clone())
    }
}