Пример #1
0
        public Function()
        {
            var resolver = new DependencyResolver(ConfigureServices);

            LogContextOperations = resolver.ServiceProvider.GetService <ILogContextOperations>();
            GlueClient           = new AmazonGlueClient();
        }
Пример #2
0
 public ScopedSetupService(ILogger <ScopedSetupService> logger, LogContext context, IAmazonS3 S3Client, IAmazonGlue GlueClient)
 {
     _logger     = logger;
     _context    = context;
     _S3Client   = S3Client;
     _GlueClient = GlueClient;
 }
Пример #3
0
        /// <summary>
        /// Static constructor
        /// </summary>
        static Entrypoint()
        {
            _S3Client              = new AmazonS3Client();
            _GlueClient            = new AmazonGlueClient();
            _SNSClient             = new AmazonSimpleNotificationServiceClient();
            _DestinationBucket     = Environment.GetEnvironmentVariable("DESTINATION_S3_BUCKET");
            _GlueJobName           = Environment.GetEnvironmentVariable("GLUE_JOB_NAME");
            _SNSTopic              = Environment.GetEnvironmentVariable("SNS_TOPIC");
            _GlueDatabaseName      = Environment.GetEnvironmentVariable("DATABASE_NAME");
            _GlueDestinationBucket = Environment.GetEnvironmentVariable("GLUE_DESTINATION_BUCKET");
            _OutputPathFormat      = Environment.GetEnvironmentVariable("OUTPUT_PATH_FORMAT");

            // Use ? in case output path format is null
            _OutputPathFormat = _OutputPathFormat?.ToLower();

            if (_OutputPathFormat != "billingperiod" && _OutputPathFormat != "yearmonth")
            {
                _OutputPathFormat = "billingperiod";
            }
        }
 private Amazon.Glue.Model.TagResourceResponse CallAWSServiceOperation(IAmazonGlue client, Amazon.Glue.Model.TagResourceRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Glue", "TagResource");
     try
     {
         #if DESKTOP
         return(client.TagResource(request));
         #elif CORECLR
         return(client.TagResourceAsync(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;
     }
 }
Пример #5
0
 internal GetClassifiersPaginator(IAmazonGlue client, GetClassifiersRequest request)
 {
     this._client  = client;
     this._request = request;
 }
 internal GetUserDefinedFunctionsPaginator(IAmazonGlue client, GetUserDefinedFunctionsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
 internal GetCrawlerMetricsPaginator(IAmazonGlue client, GetCrawlerMetricsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Пример #8
0
 internal GluePaginatorFactory(IAmazonGlue client)
 {
     this.client = client;
 }
Пример #9
0
 internal GetUnfilteredPartitionsMetadataPaginator(IAmazonGlue client, GetUnfilteredPartitionsMetadataRequest request)
 {
     this._client  = client;
     this._request = request;
 }
 internal ListMLTransformsPaginator(IAmazonGlue client, ListMLTransformsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Пример #11
0
 internal GetJobsPaginator(IAmazonGlue client, GetJobsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Пример #12
0
 internal SearchTablesPaginator(IAmazonGlue client, SearchTablesRequest request)
 {
     this._client  = client;
     this._request = request;
 }
 internal GetSecurityConfigurationsPaginator(IAmazonGlue client, GetSecurityConfigurationsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Пример #14
0
 internal GetBlueprintRunsPaginator(IAmazonGlue client, GetBlueprintRunsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Пример #15
0
 internal ListSchemasPaginator(IAmazonGlue client, ListSchemasRequest request)
 {
     this._client  = client;
     this._request = request;
 }
 internal GetPartitionIndexesPaginator(IAmazonGlue client, GetPartitionIndexesRequest request)
 {
     this._client  = client;
     this._request = request;
 }
 internal GetTableVersionsPaginator(IAmazonGlue client, GetTableVersionsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Пример #18
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();

            Client = CreateClient(_CurrentCredentials, _RegionEndpoint);
        }
 internal ListTriggersPaginator(IAmazonGlue client, ListTriggersRequest request)
 {
     this._client  = client;
     this._request = request;
 }
 internal GetResourcePoliciesPaginator(IAmazonGlue client, GetResourcePoliciesRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Пример #21
0
 internal GetConnectionsPaginator(IAmazonGlue client, GetConnectionsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Пример #22
0
 /// <summary>
 /// Constructs an instance with a preconfigured S3 client. This can be used for testing the outside of the Lambda environment.
 /// </summary>
 public Function(IAmazonGlue glueClient)
 {
 }
 internal GetDevEndpointsPaginator(IAmazonGlue client, GetDevEndpointsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Пример #24
0
 internal ListRegistriesPaginator(IAmazonGlue client, ListRegistriesRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Пример #25
0
 internal GetWorkflowRunsPaginator(IAmazonGlue client, GetWorkflowRunsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Пример #26
0
 internal ListWorkflowsPaginator(IAmazonGlue client, ListWorkflowsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
Пример #27
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()
 {
     GlueClient = new AmazonGlueClient();
 }
Пример #28
0
 internal ListBlueprintsPaginator(IAmazonGlue client, ListBlueprintsRequest request)
 {
     this._client  = client;
     this._request = request;
 }