aws_sdk_accountaccessruntime/client/get_role_credentials.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 [`GetRoleCredentials`](crate::operation::get_role_credentials::builders::GetRoleCredentialsFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`tenant_id(impl Into<String>)`](crate::operation::get_role_credentials::builders::GetRoleCredentialsFluentBuilder::tenant_id) / [`set_tenant_id(Option<String>)`](crate::operation::get_role_credentials::builders::GetRoleCredentialsFluentBuilder::set_tenant_id):<br>required: **true**<br><p>The identifier of the tenant that the request applies to. A tenant ID begins with <code>aa-</code> and is 3 to 24 characters long. It can contain lowercase letters, numbers, and hyphens.</p><br>
7 /// - [`role_arn(impl Into<String>)`](crate::operation::get_role_credentials::builders::GetRoleCredentialsFluentBuilder::role_arn) / [`set_role_arn(Option<String>)`](crate::operation::get_role_credentials::builders::GetRoleCredentialsFluentBuilder::set_role_arn):<br>required: **true**<br><p>The Amazon Resource Name (ARN) of the role to retrieve credentials for. You must be entitled to assume this role.</p><br>
8 /// - [`access_type(AccessType)`](crate::operation::get_role_credentials::builders::GetRoleCredentialsFluentBuilder::access_type) / [`set_access_type(Option<AccessType>)`](crate::operation::get_role_credentials::builders::GetRoleCredentialsFluentBuilder::set_access_type):<br>required: **true**<br><p>The type of access to request for the role. Specify <code>PROGRAMMATIC_ACCESS</code> to receive access key credentials for use with the CLI or an Amazon Web Services SDK.</p><br>
9 /// - [`session_name(impl Into<String>)`](crate::operation::get_role_credentials::builders::GetRoleCredentialsFluentBuilder::session_name) / [`set_session_name(Option<String>)`](crate::operation::get_role_credentials::builders::GetRoleCredentialsFluentBuilder::set_session_name):<br>required: **false**<br><p>An optional name for the role session. The name can be 2 to 64 characters and can contain alphanumeric characters and the following symbols: plus (+), equal (=), comma (,), period (.), at (@), and hyphen (-). The session name appears in CloudTrail logs for the assumed role session.</p><br>
10 /// - [`session_duration(i32)`](crate::operation::get_role_credentials::builders::GetRoleCredentialsFluentBuilder::session_duration) / [`set_session_duration(Option<i32>)`](crate::operation::get_role_credentials::builders::GetRoleCredentialsFluentBuilder::set_session_duration):<br>required: **false**<br><p>The duration, in seconds, that the returned credentials remain valid. If you don't specify a value, the service uses the default session duration. The maximum value can't exceed the maximum session duration configured for the role.</p><br>
11 /// - On success, responds with [`GetRoleCredentialsOutput`](crate::operation::get_role_credentials::GetRoleCredentialsOutput) with field(s):
12 /// - [`credentials_details(Option<CredentialsDetails>)`](crate::operation::get_role_credentials::GetRoleCredentialsOutput::credentials_details): <p>The temporary credentials that the service returns for the requested role.</p>
13 /// - On failure, responds with [`SdkError<GetRoleCredentialsError>`](crate::operation::get_role_credentials::GetRoleCredentialsError)
14 pub fn get_role_credentials(&self) -> crate::operation::get_role_credentials::builders::GetRoleCredentialsFluentBuilder {
15 crate::operation::get_role_credentials::builders::GetRoleCredentialsFluentBuilder::new(self.handle.clone())
16 }
17}