本文整理汇总了C#中Amazon.Glacier.AmazonGlacierConfig类的典型用法代码示例。如果您正苦于以下问题:C# AmazonGlacierConfig类的具体用法?C# AmazonGlacierConfig怎么用?C# AmazonGlacierConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AmazonGlacierConfig类属于Amazon.Glacier命名空间,在下文中一共展示了AmazonGlacierConfig类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: FDGlacier
public FDGlacier(FDUserSettings settings, FDOperationLog oplog, string optype)
{
this.vaultName = settings.AWSGlacierVaultName;
log = oplog;
switch (settings.AWSRegion) {
case FDUserSettings.AWSRegionIndex.USWest1:
region = RegionEndpoint.USWest1;
break;
case FDUserSettings.AWSRegionIndex.USWest2:
region = RegionEndpoint.USWest2;
break;
case FDUserSettings.AWSRegionIndex.USEast1:
region = RegionEndpoint.USEast1;
break;
case FDUserSettings.AWSRegionIndex.EUWest1:
region = RegionEndpoint.EUWest1;
break;
case FDUserSettings.AWSRegionIndex.APNortheast1:
region = RegionEndpoint.APNortheast1;
break;
default:
region = RegionEndpoint.USEast1;
break;
}
//Instantiate the glacier config with our settins (for future move to AmazonGlacierClient)
glacierConfig = new AmazonGlacierConfig();
glacierConfig.RegionEndpoint = region;
//Instantiate AWS Credentials
awsCredentials = new BasicAWSCredentials(settings.AWSAccessKey, settings.AWSSecretKey);
//Instantiate the transfer manager with our settings
//TODO: Switch to glacier client so we can abort this damn thing
//glacierClient = new AmazonGlacierClient(appConfig["AWSAccessKey"], appConfig["AWSSecretKey"], region);
transferManager = new ArchiveTransferManager(awsCredentials, region);
upOptions = new UploadOptions();
downOptions = new DownloadOptions();
progress = 0;
upOptions.StreamTransferProgress = downOptions.StreamTransferProgress = this.onProgress;
OperationType = optype;
}
开发者ID:fardog,项目名称:snowpack,代码行数:45,代码来源:FDGlacier.cs
示例2: AmazonGlacierClient
/// <summary>
/// Constructs AmazonGlacierClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonGlacierClient Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="clientConfig">The AmazonGlacierClient Configuration Object</param>
public AmazonGlacierClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonGlacierConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
开发者ID:aws,项目名称:aws-sdk-net,代码行数:12,代码来源:AmazonGlacierClient.cs
示例3: AmazonGlacierClient
/// <summary>
/// Constructs AmazonGlacierClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonGlacierClient Configuration object. If the config object's
/// UseSecureStringForAwsSecretKey is false, the AWS Secret Key
/// is stored as a clear-text string. Please use this option only
/// if the application environment doesn't allow the use of SecureStrings.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="clientConfig">The AmazonGlacierClient Configuration Object</param>
public AmazonGlacierClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonGlacierConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig, AuthenticationTypes.User | AuthenticationTypes.Session)
{
}
开发者ID:virajs,项目名称:aws-sdk-net,代码行数:15,代码来源:AmazonGlacierClient.cs
示例4: EstablishClient
private OperationResult EstablishClient(AddonManifest manifest, DeveloperOptions devOptions, out AmazonGlacierClient client)
{
OperationResult result;
bool requireCreds;
//var accessKey = manifest.ProvisioningUsername;
//var secretAccessKey = manifest.ProvisioningPassword;
var accessKey = devOptions.AccessKey;
var secretAccessKey = devOptions.SecretAccessKey;
var prop =
manifest.Properties.First(
p => p.Key.Equals("requireDevCredentials", StringComparison.InvariantCultureIgnoreCase));
if (bool.TryParse(prop.Value, out requireCreds) && requireCreds)
{
if (!ValidateDevCreds(devOptions))
{
client = null;
result = new OperationResult()
{
IsSuccess = false,
EndUserMessage =
"The add on requires that developer credentials are specified but none were provided."
};
return result;
}
accessKey = devOptions.AccessKey;
secretAccessKey = devOptions.SecretAccessKey;
}
AmazonGlacierConfig config = new AmazonGlacierConfig() { RegionEndpoint = RegionEndpoint.USEast1 };
client = new AmazonGlacierClient(devOptions.AccessKey, devOptions.SecretAccessKey, config);
result = new OperationResult { IsSuccess = true };
return result;
}
开发者ID:ernestohs,项目名称:Apprenda-AWS-Integration,代码行数:37,代码来源:GlacierAddon.cs
示例5: CreateAmazonGlacierClient
/// <summary>
/// Create a client for the Amazon Glacier Service with AWSCredentials and an AmazonGlacier Configuration object.
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="config">Configuration options for the service like HTTP Proxy, # of connections, etc</param>
/// <returns>An Amazon Glacier client</returns>
/// <remarks>
/// </remarks>
public static IAmazonGlacier CreateAmazonGlacierClient(AWSCredentials credentials, AmazonGlacierConfig config)
{
return new AmazonGlacierClient(credentials, config);
}
开发者ID:rinselmann,项目名称:aws-sdk-net,代码行数:12,代码来源:AWSClientFactory.cs
注:本文中的Amazon.Glacier.AmazonGlacierConfig类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论