pub struct Client { /* private fields */ }Expand description
Client for AWS Sign-In Service
Client for invoking operations on AWS Sign-In Service. Each operation on AWS Sign-In Service 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 DeleteConsoleAuthorizationConfiguration operation has
a Client::delete_console_authorization_configuration, 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.delete_console_authorization_configuration()
.target_id("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 create_o_auth2_token(&self) -> CreateOAuth2TokenFluentBuilder
pub fn create_o_auth2_token(&self) -> CreateOAuth2TokenFluentBuilder
Constructs a fluent builder for the CreateOAuth2Token operation.
- The fluent builder is configurable:
token_input(CreateOAuth2TokenRequestBody)/set_token_input(Option<CreateOAuth2TokenRequestBody>):
required: true
Flattened token operation inputs The specific operation is determined by grant_type in the request body
- On success, responds with
CreateOAuth2TokenOutputwith field(s):token_output(Option<CreateOAuth2TokenResponseBody>): Flattened token operation outputs The specific response fields depend on the grant_type used in the request
- On failure, responds with
SdkError<CreateOAuth2TokenError>
Source§impl Client
impl Client
Constructs a fluent builder for the DeleteConsoleAuthorizationConfiguration operation.
- The fluent builder is configurable:
target_id(impl Into<String>)/set_target_id(Option<String>):
required: false
Target account identifier
- On success, responds with
DeleteConsoleAuthorizationConfigurationOutputwith field(s):target_id(String): Target account identifierscope(String): Authorization scopeconsole_authorization_enabled(bool): Whether console authorization is enabled
- On failure, responds with
SdkError<DeleteConsoleAuthorizationConfigurationError>
Source§impl Client
impl Client
Sourcepub fn delete_resource_permission_statement(
&self,
) -> DeleteResourcePermissionStatementFluentBuilder
pub fn delete_resource_permission_statement( &self, ) -> DeleteResourcePermissionStatementFluentBuilder
Constructs a fluent builder for the DeleteResourcePermissionStatement operation.
- The fluent builder is configurable:
statement_id(impl Into<String>)/set_statement_id(Option<String>):
required: true
Unique identifier of the permission statement to deleteclient_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Idempotency token for the request
- On success, responds with
DeleteResourcePermissionStatementOutput - On failure, responds with
SdkError<DeleteResourcePermissionStatementError>
Source§impl Client
impl Client
Constructs a fluent builder for the GetConsoleAuthorizationConfiguration operation.
- The fluent builder is configurable:
target_id(impl Into<String>)/set_target_id(Option<String>):
required: false
Target account identifier
- On success, responds with
GetConsoleAuthorizationConfigurationOutputwith field(s):target_id(String): Target account identifierscope(String): Authorization scopeconsole_authorization_enabled(bool): Whether console authorization is enabled
- On failure, responds with
SdkError<GetConsoleAuthorizationConfigurationError>
Source§impl Client
impl Client
Sourcepub fn get_resource_policy(&self) -> GetResourcePolicyFluentBuilder
pub fn get_resource_policy(&self) -> GetResourcePolicyFluentBuilder
Constructs a fluent builder for the GetResourcePolicy operation.
- The fluent builder takes no input, just
sendit. - On success, responds with
GetResourcePolicyOutputwith field(s):signin_resource_based_policy(Option<SigninResourceBasedPolicy>): The account’s SignIn resource-based policy
- On failure, responds with
SdkError<GetResourcePolicyError>
Source§impl Client
impl Client
Sourcepub fn list_resource_permission_statements(
&self,
) -> ListResourcePermissionStatementsFluentBuilder
pub fn list_resource_permission_statements( &self, ) -> ListResourcePermissionStatementsFluentBuilder
Constructs a fluent builder for the ListResourcePermissionStatements operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: false
Maximum number of results to returnnext_token(impl Into<String>)/set_next_token(Option<String>):
required: false
Token for pagination
- On success, responds with
ListResourcePermissionStatementsOutputwith field(s):permission_statements(Vec::<PermissionStatementSummary>): List of permission statement summariesnext_token(Option<String>): Token for next page of results
- On failure, responds with
SdkError<ListResourcePermissionStatementsError>
Source§impl Client
impl Client
Constructs a fluent builder for the PutConsoleAuthorizationConfiguration operation.
- The fluent builder is configurable:
target_id(impl Into<String>)/set_target_id(Option<String>):
required: false
Target account identifier
- On success, responds with
PutConsoleAuthorizationConfigurationOutputwith field(s):target_id(String): Target account identifierscope(String): Authorization scopeconsole_authorization_enabled(bool): Whether console authorization is enabled
- On failure, responds with
SdkError<PutConsoleAuthorizationConfigurationError>
Source§impl Client
impl Client
Sourcepub fn put_resource_permission_statement(
&self,
) -> PutResourcePermissionStatementFluentBuilder
pub fn put_resource_permission_statement( &self, ) -> PutResourcePermissionStatementFluentBuilder
Constructs a fluent builder for the PutResourcePermissionStatement operation.
- The fluent builder is configurable:
source_vpc(impl Into<String>)/set_source_vpc(Option<String>):
required: false
VPC identifier to restrict console accesssignin_source_vpce(impl Into<String>)/set_signin_source_vpce(Option<String>):
required: false
SignIn VPC endpoint identifierconsole_source_vpce(impl Into<String>)/set_console_source_vpce(Option<String>):
required: false
Console VPC endpoint identifiervpc_source_ip(impl Into<String>)/set_vpc_source_ip(Option<String>):
required: false
Source IP address within VPCsource_ip(impl Into<String>)/set_source_ip(Option<String>):
required: false
Source IP addressrequested_region(impl Into<String>)/set_requested_region(Option<String>):
required: false
AWS region where the VPC and VPC endpoint reside Required when sourceVpc or signinSourceVpce/consoleSourceVpce is providedexcluded_principal(impl Into<String>)/set_excluded_principal(Option<String>):
required: false
Principal to exclude from the permission statementclient_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Idempotency token for the request
- On success, responds with
PutResourcePermissionStatementOutputwith field(s):statement_id(String): Unique identifier for the created permission statement
- On failure, responds with
SdkError<PutResourcePermissionStatementError>
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_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis 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_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo 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 UnsafeUnpin 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,
§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>
renamed to 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);