Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CachingAppConfigRetriever"/> class.
 /// </summary>
 /// <param name="cache">The memory cache.</param>
 /// <param name="appConfig">The AWS AppConfig client.</param>
 /// <param name="cloudConfig">The CloudConfig.</param>
 public CachingAppConfigRetriever(
     IMemoryCache cache,
     IAmazonAppConfig appConfig,
     CloudConfig cloudConfig)
 {
     this.cache     = cache;
     this.appConfig = appConfig;
     this.stage     = cloudConfig.Stage;
 }
 private Amazon.AppConfig.Model.GetDeploymentResponse CallAWSServiceOperation(IAmazonAppConfig client, Amazon.AppConfig.Model.GetDeploymentRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS AppConfig", "GetDeployment");
     try
     {
         #if DESKTOP
         return(client.GetDeployment(request));
         #elif CORECLR
         return(client.GetDeploymentAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }
 internal ListDeploymentsPaginator(IAmazonAppConfig client, ListDeploymentsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
 internal ListHostedConfigurationVersionsPaginator(IAmazonAppConfig client, ListHostedConfigurationVersionsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Ejemplo n.º 5
0
 internal ListConfigurationProfilesPaginator(IAmazonAppConfig client, ListConfigurationProfilesRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Ejemplo n.º 6
0
 internal ListApplicationsPaginator(IAmazonAppConfig client, ListApplicationsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
        protected override void ProcessRecord()
        {
            base.ProcessRecord();

            Client = CreateClient(_CurrentCredentials, _RegionEndpoint);
        }
Ejemplo n.º 8
0
 internal AppConfigPaginatorFactory(IAmazonAppConfig client)
 {
     this.client = client;
 }
Ejemplo n.º 9
0
 public AwsAppConfigProvider(AwsAppConfigConfiguration configuration, string clientId, IAmazonAppConfig appConfigClient = null)
 {
     _configuration   = configuration;
     _clientId        = clientId;
     _appConfigClient = appConfigClient ?? new AmazonAppConfigClient();
 }