// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`GetResourceOauth2Token`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`workload_identity_token(impl Into<String>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::workload_identity_token) / [`set_workload_identity_token(Option<String>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::set_workload_identity_token):<br>required: **true**<br><p>The identity token of the workload from which you want to retrieve the OAuth2 token.</p><br>
/// - [`resource_credential_provider_name(impl Into<String>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::resource_credential_provider_name) / [`set_resource_credential_provider_name(Option<String>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::set_resource_credential_provider_name):<br>required: **true**<br><p>The name of the resource's credential provider.</p><br>
/// - [`scopes(impl Into<String>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::scopes) / [`set_scopes(Option<Vec::<String>>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::set_scopes):<br>required: **true**<br><p>The OAuth scopes being requested.</p><br>
/// - [`oauth2_flow(Oauth2FlowType)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::oauth2_flow) / [`set_oauth2_flow(Option<Oauth2FlowType>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::set_oauth2_flow):<br>required: **true**<br><p>The type of flow to be performed.</p><br>
/// - [`session_uri(impl Into<String>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::session_uri) / [`set_session_uri(Option<String>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::set_session_uri):<br>required: **false**<br><p>Unique identifier for the user's authentication session for retrieving OAuth2 tokens. This ID tracks the authorization flow state across multiple requests and responses during the OAuth2 authentication process.</p><br>
/// - [`resource_oauth2_return_url(impl Into<String>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::resource_oauth2_return_url) / [`set_resource_oauth2_return_url(Option<String>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::set_resource_oauth2_return_url):<br>required: **false**<br><p>The callback URL to redirect to after the OAuth 2.0 token retrieval is complete. This URL must be one of the provided URLs configured for the workload identity.</p><br>
/// - [`force_authentication(bool)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::force_authentication) / [`set_force_authentication(Option<bool>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::set_force_authentication):<br>required: **false**<br><p>Indicates whether to always initiate a new three-legged OAuth (3LO) flow, regardless of any existing session.</p><br>
/// - [`custom_parameters(impl Into<String>, impl Into<String>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::custom_parameters) / [`set_custom_parameters(Option<HashMap::<String, String>>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::set_custom_parameters):<br>required: **false**<br><p>A map of custom parameters to include in the authorization request to the resource credential provider. These parameters are in addition to the standard OAuth 2.0 flow parameters, and will not override them.</p><br>
/// - [`custom_state(impl Into<String>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::custom_state) / [`set_custom_state(Option<String>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::set_custom_state):<br>required: **false**<br><p>An opaque string that will be sent back to the callback URL provided in resourceOauth2ReturnUrl. This state should be used to protect the callback URL of your application against CSRF attacks by ensuring the response corresponds to the original request.</p><br>
/// - [`resources(impl Into<String>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::resources) / [`set_resources(Option<Vec::<String>>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::set_resources):<br>required: **false**<br><p>The resources to include in the token request. These are used to specify the target resources for which the OAuth2 token is being requested.</p><br>
/// - [`audiences(impl Into<String>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::audiences) / [`set_audiences(Option<Vec::<String>>)`](crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::set_audiences):<br>required: **false**<br><p>The audiences to include in the token request. These are used to specify the intended recipients of the OAuth2 token.</p><br>
/// - On success, responds with [`GetResourceOauth2TokenOutput`](crate::operation::get_resource_oauth2_token::GetResourceOauth2TokenOutput) with field(s):
/// - [`authorization_url(Option<String>)`](crate::operation::get_resource_oauth2_token::GetResourceOauth2TokenOutput::authorization_url): <p>The URL to initiate the authorization process, provided when the access token requires user authorization.</p>
/// - [`access_token(Option<String>)`](crate::operation::get_resource_oauth2_token::GetResourceOauth2TokenOutput::access_token): <p>The OAuth 2.0 access token to use.</p>
/// - [`session_uri(Option<String>)`](crate::operation::get_resource_oauth2_token::GetResourceOauth2TokenOutput::session_uri): <p>Unique identifier for the user's authorization session for retrieving OAuth2 tokens. This matches the sessionId from the request and can be used to track the session state.</p>
/// - [`session_status(Option<SessionStatus>)`](crate::operation::get_resource_oauth2_token::GetResourceOauth2TokenOutput::session_status): <p>Status indicating whether the user's authorization session is in progress or has failed. This helps determine the next steps in the OAuth2 authentication flow.</p>
/// - On failure, responds with [`SdkError<GetResourceOauth2TokenError>`](crate::operation::get_resource_oauth2_token::GetResourceOauth2TokenError)
pub fn get_resource_oauth2_token(&self) -> crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder {
crate::operation::get_resource_oauth2_token::builders::GetResourceOauth2TokenFluentBuilder::new(self.handle.clone())
}
}