macro_rules! get_client_sts_with_profile { ($T:ty, $profile:expr) => { ... }; }
Expand description
Macro to return a profile authenticated client
This macro takes two arguments:
- A Rusoto client type (e.g.
Ec2Client
) which has thenew_with_client
method 2. A Profile Name
It will return an instance of the provided client (e.g. Ec2Client
) which
will use the specified profile when authenticating.
Example usage:
use rusoto_core::Region;
use rusoto_ec2::Ec2Client;
use sts_profile_auth::get_client_sts_with_profile;
use sts_profile_auth::StsClientError;
let ec2 = get_client_sts_with_profile!(Ec2Client, "default")?;