Exemplo n.º 1
0
 /// <summary>
 /// Default constructor. This constructor is used by Lambda to construct the instance. When invoked in a Lambda environment
 /// the AWS credentials will come from the IAM role associated with the function and the AWS region will be set to the
 /// region the Lambda function is executed in.
 /// </summary>
 public Function()
 {
     Config = new ConfigurationBuilder()
              .SetBasePath(Directory.GetCurrentDirectory())
              .AddJsonFile("appsettings.json").Build();
     S3Client    = new AmazonS3Client();
     SNSClient   = new AmazonSimpleNotificationServiceClient();
     BatchClient = new AmazonBatchClient();
 }
Exemplo n.º 2
0
        public MosaicManager(IOptions <AppOptions> appOptions, IAmazonBatch batchClient, IAmazonDynamoDB ddbClient, IAmazonECS ecsClient, IAmazonS3 s3Client, IAmazonStepFunctions stepClient)
        {
            this._appOptions = appOptions.Value;

            this._batchClient       = batchClient;
            this._ddbClient         = ddbClient;
            this._ecsClient         = ecsClient;
            this._s3Client          = s3Client;
            this._s3TransferUtility = new TransferUtility(s3Client);
            this._stepClient        = stepClient;

            this._ddbContext = new DynamoDBContext(this._ddbClient);
        }
Exemplo n.º 3
0
 private Amazon.Batch.Model.SubmitJobResponse CallAWSServiceOperation(IAmazonBatch client, Amazon.Batch.Model.SubmitJobRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Batch", "SubmitJob");
     try
     {
         #if DESKTOP
         return(client.SubmitJob(request));
         #elif CORECLR
         return(client.SubmitJobAsync(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;
     }
 }
Exemplo n.º 4
0
 internal DescribeJobDefinitionsPaginator(IAmazonBatch client, DescribeJobDefinitionsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
 internal DescribeJobQueuesPaginator(IAmazonBatch client, DescribeJobQueuesRequest request)
 {
     this._client  = client;
     this._request = request;
 }
 internal BatchPaginatorFactory(IAmazonBatch client)
 {
     this.client = client;
 }
 internal DescribeComputeEnvironmentsPaginator(IAmazonBatch client, DescribeComputeEnvironmentsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Exemplo n.º 8
0
 internal ListJobsPaginator(IAmazonBatch client, ListJobsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Exemplo n.º 9
0
 internal ListSchedulingPoliciesPaginator(IAmazonBatch client, ListSchedulingPoliciesRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Exemplo n.º 10
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();

            Client = CreateClient(_CurrentCredentials, _RegionEndpoint);
        }