pub struct Client { /* private fields */ }
Expand description
Client for AWS License Manager User Subscriptions
Client for invoking operations on AWS License Manager User Subscriptions. Each operation on AWS License Manager User Subscriptions is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_licensemanagerusersubscriptions::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Config
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_licensemanagerusersubscriptions::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the AssociateUser
operation has
a Client::associate_user
, 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.associate_user()
.username("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 associate_user(&self) -> AssociateUserFluentBuilder
pub fn associate_user(&self) -> AssociateUserFluentBuilder
Constructs a fluent builder for the AssociateUser
operation.
- The fluent builder is configurable:
username(impl Into<String>)
/set_username(Option<String>)
:
required: trueThe user name from the identity provider for the user.
instance_id(impl Into<String>)
/set_instance_id(Option<String>)
:
required: trueThe ID of the EC2 instance, which provides user-based subscriptions.
identity_provider(IdentityProvider)
/set_identity_provider(Option<IdentityProvider>)
:
required: trueThe identity provider of the user.
domain(impl Into<String>)
/set_domain(Option<String>)
:
required: falseThe domain name of the user.
- On success, responds with
AssociateUserOutput
with field(s):instance_user_summary(Option<InstanceUserSummary>)
:Metadata that describes the associate user operation.
- On failure, responds with
SdkError<AssociateUserError>
source§impl Client
impl Client
sourcepub fn deregister_identity_provider(
&self
) -> DeregisterIdentityProviderFluentBuilder
pub fn deregister_identity_provider( &self ) -> DeregisterIdentityProviderFluentBuilder
Constructs a fluent builder for the DeregisterIdentityProvider
operation.
- The fluent builder is configurable:
identity_provider(IdentityProvider)
/set_identity_provider(Option<IdentityProvider>)
:
required: trueAn object that specifies details for the identity provider.
product(impl Into<String>)
/set_product(Option<String>)
:
required: trueThe name of the user-based subscription product.
- On success, responds with
DeregisterIdentityProviderOutput
with field(s):identity_provider_summary(Option<IdentityProviderSummary>)
:Metadata that describes the results of an identity provider operation.
- On failure, responds with
SdkError<DeregisterIdentityProviderError>
source§impl Client
impl Client
sourcepub fn disassociate_user(&self) -> DisassociateUserFluentBuilder
pub fn disassociate_user(&self) -> DisassociateUserFluentBuilder
Constructs a fluent builder for the DisassociateUser
operation.
- The fluent builder is configurable:
username(impl Into<String>)
/set_username(Option<String>)
:
required: trueThe user name from the identity provider for the user.
instance_id(impl Into<String>)
/set_instance_id(Option<String>)
:
required: trueThe ID of the EC2 instance, which provides user-based subscriptions.
identity_provider(IdentityProvider)
/set_identity_provider(Option<IdentityProvider>)
:
required: trueAn object that specifies details for the identity provider.
domain(impl Into<String>)
/set_domain(Option<String>)
:
required: falseThe domain name of the user.
- On success, responds with
DisassociateUserOutput
with field(s):instance_user_summary(Option<InstanceUserSummary>)
:Metadata that describes the associate user operation.
- On failure, responds with
SdkError<DisassociateUserError>
source§impl Client
impl Client
sourcepub fn list_identity_providers(&self) -> ListIdentityProvidersFluentBuilder
pub fn list_identity_providers(&self) -> ListIdentityProvidersFluentBuilder
Constructs a fluent builder for the ListIdentityProviders
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseMaximum number of results to return in a single call.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseToken for the next set of results.
- On success, responds with
ListIdentityProvidersOutput
with field(s):identity_provider_summaries(Vec::<IdentityProviderSummary>)
:Metadata that describes the list identity providers operation.
next_token(Option<String>)
:Token for the next set of results.
- On failure, responds with
SdkError<ListIdentityProvidersError>
source§impl Client
impl Client
sourcepub fn list_instances(&self) -> ListInstancesFluentBuilder
pub fn list_instances(&self) -> ListInstancesFluentBuilder
Constructs a fluent builder for the ListInstances
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseMaximum number of results to return in a single call.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseToken for the next set of results.
filters(Filter)
/set_filters(Option<Vec::<Filter>>)
:
required: falseAn array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify.
- On success, responds with
ListInstancesOutput
with field(s):instance_summaries(Option<Vec::<InstanceSummary>>)
:Metadata that describes the list instances operation.
next_token(Option<String>)
:Token for the next set of results.
- On failure, responds with
SdkError<ListInstancesError>
source§impl Client
impl Client
sourcepub fn list_product_subscriptions(
&self
) -> ListProductSubscriptionsFluentBuilder
pub fn list_product_subscriptions( &self ) -> ListProductSubscriptionsFluentBuilder
Constructs a fluent builder for the ListProductSubscriptions
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
product(impl Into<String>)
/set_product(Option<String>)
:
required: trueThe name of the user-based subscription product.
identity_provider(IdentityProvider)
/set_identity_provider(Option<IdentityProvider>)
:
required: trueAn object that specifies details for the identity provider.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseMaximum number of results to return in a single call.
filters(Filter)
/set_filters(Option<Vec::<Filter>>)
:
required: falseAn array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseToken for the next set of results.
- On success, responds with
ListProductSubscriptionsOutput
with field(s):product_user_summaries(Option<Vec::<ProductUserSummary>>)
:Metadata that describes the list product subscriptions operation.
next_token(Option<String>)
:Token for the next set of results.
- On failure, responds with
SdkError<ListProductSubscriptionsError>
source§impl Client
impl Client
sourcepub fn list_user_associations(&self) -> ListUserAssociationsFluentBuilder
pub fn list_user_associations(&self) -> ListUserAssociationsFluentBuilder
Constructs a fluent builder for the ListUserAssociations
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
instance_id(impl Into<String>)
/set_instance_id(Option<String>)
:
required: trueThe ID of the EC2 instance, which provides user-based subscriptions.
identity_provider(IdentityProvider)
/set_identity_provider(Option<IdentityProvider>)
:
required: trueAn object that specifies details for the identity provider.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseMaximum number of results to return in a single call.
filters(Filter)
/set_filters(Option<Vec::<Filter>>)
:
required: falseAn array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseToken for the next set of results.
- On success, responds with
ListUserAssociationsOutput
with field(s):instance_user_summaries(Option<Vec::<InstanceUserSummary>>)
:Metadata that describes the list user association operation.
next_token(Option<String>)
:Token for the next set of results.
- On failure, responds with
SdkError<ListUserAssociationsError>
source§impl Client
impl Client
sourcepub fn register_identity_provider(
&self
) -> RegisterIdentityProviderFluentBuilder
pub fn register_identity_provider( &self ) -> RegisterIdentityProviderFluentBuilder
Constructs a fluent builder for the RegisterIdentityProvider
operation.
- The fluent builder is configurable:
identity_provider(IdentityProvider)
/set_identity_provider(Option<IdentityProvider>)
:
required: trueAn object that specifies details for the identity provider.
product(impl Into<String>)
/set_product(Option<String>)
:
required: trueThe name of the user-based subscription product.
settings(Settings)
/set_settings(Option<Settings>)
:
required: falseThe registered identity provider’s product related configuration settings such as the subnets to provision VPC endpoints.
- On success, responds with
RegisterIdentityProviderOutput
with field(s):identity_provider_summary(Option<IdentityProviderSummary>)
:Metadata that describes the results of an identity provider operation.
- On failure, responds with
SdkError<RegisterIdentityProviderError>
source§impl Client
impl Client
sourcepub fn start_product_subscription(
&self
) -> StartProductSubscriptionFluentBuilder
pub fn start_product_subscription( &self ) -> StartProductSubscriptionFluentBuilder
Constructs a fluent builder for the StartProductSubscription
operation.
- The fluent builder is configurable:
username(impl Into<String>)
/set_username(Option<String>)
:
required: trueThe user name from the identity provider of the user.
identity_provider(IdentityProvider)
/set_identity_provider(Option<IdentityProvider>)
:
required: trueAn object that specifies details for the identity provider.
product(impl Into<String>)
/set_product(Option<String>)
:
required: trueThe name of the user-based subscription product.
domain(impl Into<String>)
/set_domain(Option<String>)
:
required: falseThe domain name of the user.
- On success, responds with
StartProductSubscriptionOutput
with field(s):product_user_summary(Option<ProductUserSummary>)
:Metadata that describes the start product subscription operation.
- On failure, responds with
SdkError<StartProductSubscriptionError>
source§impl Client
impl Client
sourcepub fn stop_product_subscription(&self) -> StopProductSubscriptionFluentBuilder
pub fn stop_product_subscription(&self) -> StopProductSubscriptionFluentBuilder
Constructs a fluent builder for the StopProductSubscription
operation.
- The fluent builder is configurable:
username(impl Into<String>)
/set_username(Option<String>)
:
required: trueThe user name from the identity provider for the user.
identity_provider(IdentityProvider)
/set_identity_provider(Option<IdentityProvider>)
:
required: trueAn object that specifies details for the identity provider.
product(impl Into<String>)
/set_product(Option<String>)
:
required: trueThe name of the user-based subscription product.
domain(impl Into<String>)
/set_domain(Option<String>)
:
required: falseThe domain name of the user.
- On success, responds with
StopProductSubscriptionOutput
with field(s):product_user_summary(Option<ProductUserSummary>)
:Metadata that describes the start product subscription operation.
- On failure, responds with
SdkError<StopProductSubscriptionError>
source§impl Client
impl Client
sourcepub fn update_identity_provider_settings(
&self
) -> UpdateIdentityProviderSettingsFluentBuilder
pub fn update_identity_provider_settings( &self ) -> UpdateIdentityProviderSettingsFluentBuilder
Constructs a fluent builder for the UpdateIdentityProviderSettings
operation.
- The fluent builder is configurable:
identity_provider(IdentityProvider)
/set_identity_provider(Option<IdentityProvider>)
:
required: trueDetails about an identity provider.
product(impl Into<String>)
/set_product(Option<String>)
:
required: trueThe name of the user-based subscription product.
update_settings(UpdateSettings)
/set_update_settings(Option<UpdateSettings>)
:
required: trueUpdates the registered identity provider’s product related configuration settings. You can update any combination of settings in a single operation such as the:
-
Subnets which you want to add to provision VPC endpoints.
-
Subnets which you want to remove the VPC endpoints from.
-
Security group ID which permits traffic to the VPC endpoints.
-
- On success, responds with
UpdateIdentityProviderSettingsOutput
with field(s):identity_provider_summary(Option<IdentityProviderSummary>)
:Describes an identity provider.
- On failure, responds with
SdkError<UpdateIdentityProviderSettingsError>
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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