Download include/aws/core/config/EC2InstanceProfileConfigLoader.h from Shenghong/dai_env: direct link, hf CLI and curl.
- Browser
- Download file 1.35 kB
-
https://huggingface.co/Shenghong/dai_env/resolve/main/include/aws/core/config/EC2InstanceProfileConfigLoader.h
- Command line
-
hf download hf://Shenghong/dai_env/include/aws/core/config/EC2InstanceProfileConfigLoader.h
-
curl -L -o EC2InstanceProfileConfigLoader.h https://huggingface.co/Shenghong/dai_env/resolve/main/include/aws/core/config/EC2InstanceProfileConfigLoader.h
1.35 kB
| /** | |
| * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
| * SPDX-License-Identifier: Apache-2.0. | |
| */ | |
| namespace Aws | |
| { | |
| namespace Internal | |
| { | |
| class EC2MetadataClient; | |
| } | |
| namespace Config | |
| { | |
| static const char* const INSTANCE_PROFILE_KEY = "InstanceProfile"; | |
| /** | |
| * Loads configuration from the EC2 Metadata Service | |
| */ | |
| class AWS_CORE_API EC2InstanceProfileConfigLoader : public AWSProfileConfigLoader | |
| { | |
| public: | |
| /** | |
| * If client is nullptr, the default EC2MetadataClient will be created. | |
| */ | |
| EC2InstanceProfileConfigLoader(const std::shared_ptr<Aws::Internal::EC2MetadataClient>& = nullptr); | |
| virtual ~EC2InstanceProfileConfigLoader() = default; | |
| protected: | |
| virtual bool LoadInternal() override; | |
| private: | |
| std::shared_ptr<Aws::Internal::EC2MetadataClient> m_ec2metadataClient; | |
| int64_t credentialsValidUntilMillis = 0; | |
| int64_t calculateRetryTime() const; | |
| }; | |
| } | |
| } | |