IOSS 2.0
Loading...
Searching...
No Matches
Ios3_AwsHelpers.C File Reference
#include <fmt/core.h>
#include <fmt/ostream.h>
#include <getopt.h>
#include <algorithm>
#include <array>
#include <cassert>
#include <cctype>
#include <chrono>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <memory>
#include <numeric>
#include <sstream>
#include <string>
#include <thread>
#include <vector>
#include <aws/core/Aws.h>
#include <aws/core/auth/AWSCredentialsProvider.h>
#include <aws/core/auth/AWSCredentialsProviderChain.h>
#include <aws/core/utils/logging/LogLevel.h>
#include <aws/core/utils/stream/PreallocatedStreamBuf.h>
#include <aws/s3/S3Client.h>
#include <aws/s3/model/CreateBucketRequest.h>
#include <aws/s3/model/DeleteBucketPolicyRequest.h>
#include <aws/s3/model/DeleteBucketRequest.h>
#include <aws/s3/model/DeleteObjectRequest.h>
#include <aws/s3/model/GetBucketPolicyRequest.h>
#include <aws/s3/model/GetObjectRequest.h>
#include <aws/s3/model/HeadBucketRequest.h>
#include <aws/s3/model/ListObjectsRequest.h>
#include <aws/s3/model/PutBucketPolicyRequest.h>
#include <aws/s3/model/PutObjectRequest.h>
#include <aws/core/utils/threading/Executor.h>
#include <aws/transfer/TransferHandle.h>
#include <aws/transfer/TransferManager.h>
#include <Ioss_ParallelUtils.h>
#include <Ioss_Property.h>
#include <Ioss_PropertyManager.h>
#include <Ioss_Utils.h>
#include "Ios3_AwsHelpers.h"
Include dependency graph for Ios3_AwsHelpers.C:

Classes

class  Ios3::helpers::AwsHelperCredentialsProviderChain

Namespaces

namespace  Ios3
namespace  Ios3::helpers
namespace  Ios3::helpers::anonymous_namespace{Ios3_AwsHelpers.C}

Functions

void Ios3::helpers::print_params (const HelperParameters &params)
void Ios3::helpers::getPropertiesFromEnvVars (Ioss::PropertyManager &properties, const Ioss::ParallelUtils &utils)
void Ios3::helpers::getParamsFromProperties (Ioss::PropertyManager &properties, HelperParameters &params)
std::shared_ptr< HelperContextIos3::helpers::createContext (const HelperParameters &params)
void Ios3::helpers::destroyContext (std::shared_ptr< HelperContext > context)
std::string Ios3::helpers::anonymous_namespace{Ios3_AwsHelpers.C}::tolower (std::string s)
std::string Ios3::helpers::anonymous_namespace{Ios3_AwsHelpers.C}::replace_aws_illegal_chars (std::string s)
std::string Ios3::helpers::cleanBucketName (const std::string &name)
bool Ios3::helpers::createBucket (std::shared_ptr< HelperContext > context, const std::string &bucket)
bool Ios3::helpers::waitBucket (std::shared_ptr< HelperContext > context, const std::string &bucket, uint64_t wait_usec)
bool Ios3::helpers::deleteBucket (std::shared_ptr< HelperContext > context, const std::string &bucket)
bool Ios3::helpers::listBuckets (std::shared_ptr< HelperContext > context, std::vector< std::string > &bucket_names)
template<typename T, typename A>
bool Ios3::helpers::putValue (std::shared_ptr< HelperContext > context, const std::string &bucket, const std::string &key, const std::vector< T, A > &value)
template<typename T, typename A>
bool Ios3::helpers::getValue (std::shared_ptr< HelperContext > context, const std::string &bucket, const std::string &key, std::vector< T, A > &value)
bool Ios3::helpers::putValue (std::shared_ptr< HelperContext > context, const std::string &bucket, const std::string &key, const std::string &filename)
bool Ios3::helpers::getValue (std::shared_ptr< HelperContext > context, const std::string &bucket, const std::string &key, std::string &filename)
bool Ios3::helpers::deleteValue (std::shared_ptr< HelperContext > context, const std::string &bucket, const std::string &key)
bool Ios3::helpers::listKeys (std::shared_ptr< HelperContext > context, const std::string &bucket, std::vector< std::string > &keys)
bool Ios3::helpers::listKeys (std::shared_ptr< HelperContext > context, const std::string &bucket, const std::string &key_prefix, std::vector< std::string > &keys)
bool Ios3::helpers::putBucketPolicy (std::shared_ptr< HelperContext > context, const std::string &bucket, const std::string &policy)
bool Ios3::helpers::getBucketPolicy (std::shared_ptr< HelperContext > context, const std::string &bucket, std::string &policy)
bool Ios3::helpers::deleteBucketPolicy (std::shared_ptr< HelperContext > context, const std::string &bucket)
template bool Ios3::helpers::putValue (std::shared_ptr< HelperContext > context, const std::string &bucket, const std::string &key, const std::vector< unsigned char, std::allocator< unsigned char > > &value)
template bool Ios3::helpers::putValue (std::shared_ptr< HelperContext > context, const std::string &bucket, const std::string &key, const UninitializedVector< unsigned char > &value)
template bool Ios3::helpers::getValue (std::shared_ptr< HelperContext > context, const std::string &bucket, const std::string &key, std::vector< unsigned char, std::allocator< unsigned char > > &value)
template bool Ios3::helpers::getValue (std::shared_ptr< HelperContext > context, const std::string &bucket, const std::string &key, UninitializedVector< unsigned char > &value)

Variables

const std::string Ios3::helpers::env_base_name {"IOSS_S3_"}
const std::string Ios3::helpers::env_name_endpoint {env_base_name + "ENDPOINT"}
const std::string Ios3::helpers::env_name_profile {env_base_name + "PROFILE"}
const std::string Ios3::helpers::env_name_ca_file {env_base_name + "CA_FILE"}
const std::string Ios3::helpers::env_name_use_ca_file {env_base_name + "USE_CA_FILE"}
const std::string Ios3::helpers::env_name_use_transfer_manager {env_base_name + "USE_TRANSFER_MANAGER"}
const std::string Ios3::helpers::env_name_enable_aws_tracing {env_base_name + "ENABLE_AWS_TRACING"}
const std::string Ios3::helpers::env_name_disable_ec2_lookup {env_base_name + "DISABLE_EC2_LOOKUP"}
const std::string Ios3::helpers::prop_base_name {"S3_"}
const std::string Ios3::helpers::prop_name_endpoint {prop_base_name + "ENDPOINT"}
const std::string Ios3::helpers::prop_name_profile {prop_base_name + "PROFILE"}
const std::string Ios3::helpers::prop_name_ca_file {prop_base_name + "CA_FILE"}
const std::string Ios3::helpers::prop_name_use_ca_file {prop_base_name + "USE_CA_FILE"}
const std::string Ios3::helpers::prop_name_use_transfer_manager {prop_base_name + "USE_TRANSFER_MANAGER"}
const std::string Ios3::helpers::prop_name_enable_aws_tracing {prop_base_name + "ENABLE_AWS_TRACING"}
const std::string Ios3::helpers::prop_name_disable_ec2_lookup {prop_base_name + "DISABLE_EC2_LOOKUP"}
static const char Ios3::helpers::AwsHelperCredentialsProviderChainTag [] = "AwsHelperCredentialsProviderChain"
static int Ios3::helpers::context_count = 0
static Aws::SDKOptions Ios3::helpers::options