Struct reqsign::AzureStorageConfig

source ·
pub struct AzureStorageConfig {
    pub account_name: Option<String>,
    pub account_key: Option<String>,
    pub sas_token: Option<String>,
    pub object_id: Option<String>,
    pub client_id: Option<String>,
    pub msi_res_id: Option<String>,
    pub msi_secret: Option<String>,
    pub endpoint: Option<String>,
    pub federated_token_file: Option<String>,
    pub tenant_id: Option<String>,
    pub authority_host: Option<String>,
}
Expand description

Config carries all the configuration for Azure Storage services.

Fields§

§account_name: Option<String>

account_name will be loaded from

  • this field if it’s is_some
§account_key: Option<String>

account_key will be loaded from

  • this field if it’s is_some
§sas_token: Option<String>

sas_token will be loaded from

  • this field if it’s is_some
§object_id: Option<String>

Specifies the object id associated with a user assigned managed service identity resource

The values of client_id and msi_res_id are discarded

This is part of use AAD(Azure Active Directory) authenticate on Azure VM

§client_id: Option<String>

Specifies the application id (client id) associated with a user assigned managed service identity resource

The values of object_id and msi_res_id are discarded

  • cnv value: [AZURE_CLIENT_ID]

This is part of use AAD(Azure Active Directory) authenticate on Azure VM

§msi_res_id: Option<String>

Specifies the ARM resource id of the user assigned managed service identity resource

The values of object_id and client_id are discarded

This is part of use AAD(Azure Active Directory) authenticate on Azure VM

§msi_secret: Option<String>

Specifies the header that should be used to retrieve the access token.

This header mitigates server-side request forgery (SSRF) attacks.

This is part of use AAD(Azure Active Directory) authenticate on Azure VM

§endpoint: Option<String>

Specifies the endpoint from which the identity should be retrieved.

If not specified, the default endpoint of http://169.254.169.254/metadata/identity/oauth2/token will be used.

This is part of use AAD(Azure Active Directory) authenticate on Azure VM

§federated_token_file: Option<String>

federated_token_file value will be loaded from:

  • this field if it’s is_some
  • env value: [AZURE_FEDERATED_TOKEN_FILE]
  • profile config: federated_token_file
§tenant_id: Option<String>

tenant_id value will be loaded from:

  • this field if it’s is_some
  • env value: [AZURE_TENANT_ID]
  • profile config: tenant_id
§authority_host: Option<String>

authority_host value will be loaded from:

  • this field if it’s is_some
  • env value: [AZURE_AUTHORITY_HOST]
  • profile config: authority_host

Implementations§

source§

impl Config

source

pub fn from_env(self) -> Self

Load config from env.

Trait Implementations§

source§

impl Clone for Config

source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for Config

source§

fn default() -> Config

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more