Struct aws_sdk_sso::Client
source · pub struct Client { /* private fields */ }
Expand description
Client for AWS Single Sign-On
Client for invoking operations on AWS Single Sign-On. Each operation on AWS Single Sign-On is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the GetRoleCredentials
operation has
a Client::get_role_credentials
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.get_role_credentials()
.role_name("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
source§impl Client
impl Client
sourcepub fn get_role_credentials(&self) -> GetRoleCredentialsFluentBuilder
pub fn get_role_credentials(&self) -> GetRoleCredentialsFluentBuilder
Constructs a fluent builder for the GetRoleCredentials
operation.
- The fluent builder is configurable:
role_name(impl Into<String>)
/set_role_name(Option<String>)
:
required: trueThe friendly name of the role that is assigned to the user.
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe identifier for the AWS account that is assigned to the user.
access_token(impl Into<String>)
/set_access_token(Option<String>)
:
required: trueThe token issued by the
CreateToken
API call. For more information, see CreateToken in the IAM Identity Center OIDC API Reference Guide.
- On success, responds with
GetRoleCredentialsOutput
with field(s):role_credentials(Option<RoleCredentials>)
:The credentials for the role that is assigned to the user.
- On failure, responds with
SdkError<GetRoleCredentialsError>
source§impl Client
impl Client
sourcepub fn list_account_roles(&self) -> ListAccountRolesFluentBuilder
pub fn list_account_roles(&self) -> ListAccountRolesFluentBuilder
Constructs a fluent builder for the ListAccountRoles
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe page token from the previous response output when you request subsequent pages.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of items that clients can request per page.
access_token(impl Into<String>)
/set_access_token(Option<String>)
:
required: trueThe token issued by the
CreateToken
API call. For more information, see CreateToken in the IAM Identity Center OIDC API Reference Guide.account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe identifier for the AWS account that is assigned to the user.
- On success, responds with
ListAccountRolesOutput
with field(s):next_token(Option<String>)
:The page token client that is used to retrieve the list of accounts.
role_list(Option<Vec::<RoleInfo>>)
:A paginated response with the list of roles and the next token if more results are available.
- On failure, responds with
SdkError<ListAccountRolesError>
source§impl Client
impl Client
sourcepub fn list_accounts(&self) -> ListAccountsFluentBuilder
pub fn list_accounts(&self) -> ListAccountsFluentBuilder
Constructs a fluent builder for the ListAccounts
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: false(Optional) When requesting subsequent pages, this is the page token from the previous response output.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThis is the number of items clients can request per page.
access_token(impl Into<String>)
/set_access_token(Option<String>)
:
required: trueThe token issued by the
CreateToken
API call. For more information, see CreateToken in the IAM Identity Center OIDC API Reference Guide.
- On success, responds with
ListAccountsOutput
with field(s):next_token(Option<String>)
:The page token client that is used to retrieve the list of accounts.
account_list(Option<Vec::<AccountInfo>>)
:A paginated response with the list of account information and the next token if more results are available.
- On failure, responds with
SdkError<ListAccountsError>
source§impl Client
impl Client
sourcepub fn logout(&self) -> LogoutFluentBuilder
pub fn logout(&self) -> LogoutFluentBuilder
Constructs a fluent builder for the Logout
operation.
- The fluent builder is configurable:
access_token(impl Into<String>)
/set_access_token(Option<String>)
:
required: trueThe token issued by the
CreateToken
API call. For more information, see CreateToken in the IAM Identity Center OIDC API Reference Guide.
- On success, responds with
LogoutOutput
- On failure, responds with
SdkError<LogoutError>
source§impl Client
impl Client
sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
source§impl Client
impl Client
sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute
] value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
[Quirk
] value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition
] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);