Struct aws_config::profile::profile_file::Builder
source · pub struct Builder { /* private fields */ }
Expand description
Builder for ProfileFiles
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn include_default_config_file(
self,
include_default_config_file: bool
) -> Self
pub fn include_default_config_file( self, include_default_config_file: bool ) -> Self
Include the default SDK config file in the list of profile files to be loaded.
The default SDK config typically resides in ~/.aws/config
. When this flag is enabled,
this config file will be included in the profile files that get loaded in the built
ProfileFiles
file set.
This flag defaults to false
when using the builder to construct ProfileFiles
.
sourcepub fn include_default_credentials_file(
self,
include_default_credentials_file: bool
) -> Self
pub fn include_default_credentials_file( self, include_default_credentials_file: bool ) -> Self
Include the default SDK credentials file in the list of profile files to be loaded.
The default SDK config typically resides in ~/.aws/credentials
. When this flag is enabled,
this credentials file will be included in the profile files that get loaded in the built
ProfileFiles
file set.
This flag defaults to false
when using the builder to construct ProfileFiles
.
sourcepub fn with_file(self, kind: ProfileFileKind, file: impl Into<PathBuf>) -> Self
pub fn with_file(self, kind: ProfileFileKind, file: impl Into<PathBuf>) -> Self
Include a custom file
in the list of profile files to be loaded.
The kind
informs the parser how to treat the file. If it’s intended to be like
the SDK credentials file typically in ~/.aws/config
, then use ProfileFileKind::Config
.
Otherwise, use ProfileFileKind::Credentials
.
sourcepub fn with_contents(
self,
kind: ProfileFileKind,
contents: impl Into<String>
) -> Self
pub fn with_contents( self, kind: ProfileFileKind, contents: impl Into<String> ) -> Self
Include custom file contents
in the list of profile files to be loaded.
The kind
informs the parser how to treat the file. If it’s intended to be like
the SDK credentials file typically in ~/.aws/config
, then use ProfileFileKind::Config
.
Otherwise, use ProfileFileKind::Credentials
.
sourcepub fn build(self) -> ProfileFiles
pub fn build(self) -> ProfileFiles
Build the ProfileFiles
file set.