/******************************************************************************* * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"). You may not use * this file except in compliance with the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * ***************************************************************************** * * AWS Tools for Windows (TM) PowerShell (TM) * */ using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; using System.Text; using Amazon.PowerShell.Common; using Amazon.Runtime; using Amazon.AWSHealth; using Amazon.AWSHealth.Model; namespace Amazon.PowerShell.Cmdlets.HLTH { /// /// Returns information about events that meet the specified filter criteria. Events /// are returned in a summary form and do not include the detailed description, any additional /// metadata that depends on the event type, or any affected resources. To retrieve that /// information, use the DescribeEventDetails /// and DescribeAffectedEntities /// operations. /// /// /// /// If no filter criteria are specified, all events are returned. Results are sorted by /// lastModifiedTime, starting with the most recent event. ///

This cmdlet automatically pages all available results to the pipeline - parameters related to iteration are only needed if you want to manually control the paginated output. To disable autopagination, use -NoAutoIteration. ///
[Cmdlet("Get", "HLTHEvent")] [OutputType("Amazon.AWSHealth.Model.Event")] [AWSCmdlet("Calls the AWS Health DescribeEvents API operation.", Operation = new[] {"DescribeEvents"}, SelectReturnType = typeof(Amazon.AWSHealth.Model.DescribeEventsResponse))] [AWSCmdletOutput("Amazon.AWSHealth.Model.Event or Amazon.AWSHealth.Model.DescribeEventsResponse", "This cmdlet returns a collection of Amazon.AWSHealth.Model.Event objects.", "The service call response (type Amazon.AWSHealth.Model.DescribeEventsResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack." )] public partial class GetHLTHEventCmdlet : AmazonAWSHealthClientCmdlet, IExecutor { #region Parameter Filter_AvailabilityZone /// /// /// A list of Amazon Web Services Availability Zones. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("Filter_AvailabilityZones")] public System.String[] Filter_AvailabilityZone { get; set; } #endregion #region Parameter Filter_EndTime /// /// /// A list of dates and times that the event ended. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("Filter_EndTimes")] public Amazon.AWSHealth.Model.DateTimeRange[] Filter_EndTime { get; set; } #endregion #region Parameter Filter_EntityArn /// /// /// A list of entity ARNs (unique identifiers). /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("Filter_EntityArns")] public System.String[] Filter_EntityArn { get; set; } #endregion #region Parameter Filter_EntityValue /// /// /// A list of entity identifiers, such as EC2 instance IDs (i-34ab692e) or /// EBS volumes (vol-426ab23e). /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("Filter_EntityValues")] public System.String[] Filter_EntityValue { get; set; } #endregion #region Parameter Filter_EventArn /// /// /// A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", /// "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101" /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("Filter_EventArns")] public System.String[] Filter_EventArn { get; set; } #endregion #region Parameter Filter_EventStatusCode /// /// /// A list of event status codes. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("Filter_EventStatusCodes")] public System.String[] Filter_EventStatusCode { get; set; } #endregion #region Parameter Filter_EventTypeCategory /// /// /// A list of event type category codes. Possible values are issue, accountNotification, /// or scheduledChange. Currently, the investigation value isn't /// supported at this time. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("Filter_EventTypeCategories")] public System.String[] Filter_EventTypeCategory { get; set; } #endregion #region Parameter Filter_EventTypeCode /// /// /// A list of unique identifiers for event types. For example, "AWS_EC2_SYSTEM_MAINTENANCE_EVENT","AWS_RDS_MAINTENANCE_SCHEDULED". /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("Filter_EventTypeCodes")] public System.String[] Filter_EventTypeCode { get; set; } #endregion #region Parameter Filter_LastUpdatedTime /// /// /// A list of dates and times that the event was last updated. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("Filter_LastUpdatedTimes")] public Amazon.AWSHealth.Model.DateTimeRange[] Filter_LastUpdatedTime { get; set; } #endregion #region Parameter Locale /// /// /// The locale (language) to return information in. English (en) is the default and the /// only supported value at this time. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] public System.String Locale { get; set; } #endregion #region Parameter Filter_Region /// /// /// A list of Amazon Web Services Regions. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("Filter_Regions")] public System.String[] Filter_Region { get; set; } #endregion #region Parameter Filter_Service /// /// /// The Amazon Web Services associated with the event. For example, EC2, /// RDS. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("Filter_Services")] public System.String[] Filter_Service { get; set; } #endregion #region Parameter Filter_StartTime /// /// /// A list of dates and times that the event began. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("Filter_StartTimes")] public Amazon.AWSHealth.Model.DateTimeRange[] Filter_StartTime { get; set; } #endregion #region Parameter Filter_Tag /// /// /// A map of entity tags attached to the affected entity.Currently, the tags property isn't supported. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("Filter_Tags")] public System.Collections.Hashtable[] Filter_Tag { get; set; } #endregion #region Parameter MaxResult /// /// /// The maximum number of items to return in one batch, between 10 and 100, inclusive. /// /// ///
Note: In AWSPowerShell and AWSPowerShell.NetCore this parameter is used to limit the total number of items returned by the cmdlet. ///
In AWS.Tools this parameter is simply passed to the service to specify how many items should be returned by each service call. ///
Pipe the output of this cmdlet into Select-Object -First to terminate retrieving data pages early and control the number of items returned. ///
///
[System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("MaxItems","MaxResults")] public int? MaxResult { get; set; } #endregion #region Parameter NextToken /// /// /// If the results of a search are large, only a portion of the results are returned, /// and a nextToken pagination token is returned in the response. To retrieve /// the next batch of results, reissue the search request and include the returned token. /// When all results have been returned, the response does not contain a pagination token /// value. /// /// ///
Note: This parameter is only used if you are manually controlling output pagination of the service API call. ///
In order to manually control output pagination, use '-NextToken $null' for the first call and '-NextToken $AWSHistory.LastServiceResponse.NextToken' for subsequent calls. ///
///
[System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] public System.String NextToken { get; set; } #endregion #region Parameter Select /// /// Use the -Select parameter to control the cmdlet output. The default value is 'Events'. /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.AWSHealth.Model.DescribeEventsResponse). /// Specifying the name of a property of type Amazon.AWSHealth.Model.DescribeEventsResponse will result in that property being returned. /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] public string Select { get; set; } = "Events"; #endregion #region Parameter NoAutoIteration /// /// By default the cmdlet will auto-iterate and retrieve all results to the pipeline by performing multiple /// service calls. If set, the cmdlet will retrieve only the next 'page' of results using the value of NextToken /// as the start point. /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] public SwitchParameter NoAutoIteration { get; set; } #endregion protected override void ProcessRecord() { this._AWSSignerType = "v4"; base.ProcessRecord(); var context = new CmdletContext(); // allow for manipulation of parameters prior to loading into context PreExecutionContextLoad(context); if (ParameterWasBound(nameof(this.Select))) { context.Select = CreateSelectDelegate(Select) ?? throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); } if (this.Filter_AvailabilityZone != null) { context.Filter_AvailabilityZone = new List(this.Filter_AvailabilityZone); } if (this.Filter_EndTime != null) { context.Filter_EndTime = new List(this.Filter_EndTime); } if (this.Filter_EntityArn != null) { context.Filter_EntityArn = new List(this.Filter_EntityArn); } if (this.Filter_EntityValue != null) { context.Filter_EntityValue = new List(this.Filter_EntityValue); } if (this.Filter_EventArn != null) { context.Filter_EventArn = new List(this.Filter_EventArn); } if (this.Filter_EventStatusCode != null) { context.Filter_EventStatusCode = new List(this.Filter_EventStatusCode); } if (this.Filter_EventTypeCategory != null) { context.Filter_EventTypeCategory = new List(this.Filter_EventTypeCategory); } if (this.Filter_EventTypeCode != null) { context.Filter_EventTypeCode = new List(this.Filter_EventTypeCode); } if (this.Filter_LastUpdatedTime != null) { context.Filter_LastUpdatedTime = new List(this.Filter_LastUpdatedTime); } if (this.Filter_Region != null) { context.Filter_Region = new List(this.Filter_Region); } if (this.Filter_Service != null) { context.Filter_Service = new List(this.Filter_Service); } if (this.Filter_StartTime != null) { context.Filter_StartTime = new List(this.Filter_StartTime); } if (this.Filter_Tag != null) { context.Filter_Tag = new List>(); foreach (var hashTable in this.Filter_Tag) { var d = new Dictionary(); foreach (var hashKey in hashTable.Keys) { d.Add((String)hashKey, (String)(hashTable[hashKey])); } context.Filter_Tag.Add(d); } } context.Locale = this.Locale; context.MaxResult = this.MaxResult; #if !MODULAR if (ParameterWasBound(nameof(this.MaxResult)) && this.MaxResult.HasValue) { WriteWarning("AWSPowerShell and AWSPowerShell.NetCore use the MaxResult parameter to limit the total number of items returned by the cmdlet." + " This behavior is obsolete and will be removed in a future version of these modules. Pipe the output of this cmdlet into Select-Object -First to terminate" + " retrieving data pages early and control the number of items returned. AWS.Tools already implements the new behavior of simply passing MaxResult" + " to the service to specify how many items should be returned by each service call."); } #endif context.NextToken = this.NextToken; // allow further manipulation of loaded context prior to processing PostExecutionContextLoad(context); var output = Execute(context) as CmdletOutput; ProcessOutput(output); } #region IExecutor Members #if MODULAR public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; var useParameterSelect = this.Select.StartsWith("^"); // create request and set iteration invariants var request = new Amazon.AWSHealth.Model.DescribeEventsRequest(); // populate Filter var requestFilterIsNull = true; request.Filter = new Amazon.AWSHealth.Model.EventFilter(); List requestFilter_filter_AvailabilityZone = null; if (cmdletContext.Filter_AvailabilityZone != null) { requestFilter_filter_AvailabilityZone = cmdletContext.Filter_AvailabilityZone; } if (requestFilter_filter_AvailabilityZone != null) { request.Filter.AvailabilityZones = requestFilter_filter_AvailabilityZone; requestFilterIsNull = false; } List requestFilter_filter_EndTime = null; if (cmdletContext.Filter_EndTime != null) { requestFilter_filter_EndTime = cmdletContext.Filter_EndTime; } if (requestFilter_filter_EndTime != null) { request.Filter.EndTimes = requestFilter_filter_EndTime; requestFilterIsNull = false; } List requestFilter_filter_EntityArn = null; if (cmdletContext.Filter_EntityArn != null) { requestFilter_filter_EntityArn = cmdletContext.Filter_EntityArn; } if (requestFilter_filter_EntityArn != null) { request.Filter.EntityArns = requestFilter_filter_EntityArn; requestFilterIsNull = false; } List requestFilter_filter_EntityValue = null; if (cmdletContext.Filter_EntityValue != null) { requestFilter_filter_EntityValue = cmdletContext.Filter_EntityValue; } if (requestFilter_filter_EntityValue != null) { request.Filter.EntityValues = requestFilter_filter_EntityValue; requestFilterIsNull = false; } List requestFilter_filter_EventArn = null; if (cmdletContext.Filter_EventArn != null) { requestFilter_filter_EventArn = cmdletContext.Filter_EventArn; } if (requestFilter_filter_EventArn != null) { request.Filter.EventArns = requestFilter_filter_EventArn; requestFilterIsNull = false; } List requestFilter_filter_EventStatusCode = null; if (cmdletContext.Filter_EventStatusCode != null) { requestFilter_filter_EventStatusCode = cmdletContext.Filter_EventStatusCode; } if (requestFilter_filter_EventStatusCode != null) { request.Filter.EventStatusCodes = requestFilter_filter_EventStatusCode; requestFilterIsNull = false; } List requestFilter_filter_EventTypeCategory = null; if (cmdletContext.Filter_EventTypeCategory != null) { requestFilter_filter_EventTypeCategory = cmdletContext.Filter_EventTypeCategory; } if (requestFilter_filter_EventTypeCategory != null) { request.Filter.EventTypeCategories = requestFilter_filter_EventTypeCategory; requestFilterIsNull = false; } List requestFilter_filter_EventTypeCode = null; if (cmdletContext.Filter_EventTypeCode != null) { requestFilter_filter_EventTypeCode = cmdletContext.Filter_EventTypeCode; } if (requestFilter_filter_EventTypeCode != null) { request.Filter.EventTypeCodes = requestFilter_filter_EventTypeCode; requestFilterIsNull = false; } List requestFilter_filter_LastUpdatedTime = null; if (cmdletContext.Filter_LastUpdatedTime != null) { requestFilter_filter_LastUpdatedTime = cmdletContext.Filter_LastUpdatedTime; } if (requestFilter_filter_LastUpdatedTime != null) { request.Filter.LastUpdatedTimes = requestFilter_filter_LastUpdatedTime; requestFilterIsNull = false; } List requestFilter_filter_Region = null; if (cmdletContext.Filter_Region != null) { requestFilter_filter_Region = cmdletContext.Filter_Region; } if (requestFilter_filter_Region != null) { request.Filter.Regions = requestFilter_filter_Region; requestFilterIsNull = false; } List requestFilter_filter_Service = null; if (cmdletContext.Filter_Service != null) { requestFilter_filter_Service = cmdletContext.Filter_Service; } if (requestFilter_filter_Service != null) { request.Filter.Services = requestFilter_filter_Service; requestFilterIsNull = false; } List requestFilter_filter_StartTime = null; if (cmdletContext.Filter_StartTime != null) { requestFilter_filter_StartTime = cmdletContext.Filter_StartTime; } if (requestFilter_filter_StartTime != null) { request.Filter.StartTimes = requestFilter_filter_StartTime; requestFilterIsNull = false; } List> requestFilter_filter_Tag = null; if (cmdletContext.Filter_Tag != null) { requestFilter_filter_Tag = cmdletContext.Filter_Tag; } if (requestFilter_filter_Tag != null) { request.Filter.Tags = requestFilter_filter_Tag; requestFilterIsNull = false; } // determine if request.Filter should be set to null if (requestFilterIsNull) { request.Filter = null; } if (cmdletContext.Locale != null) { request.Locale = cmdletContext.Locale; } if (cmdletContext.MaxResult != null) { request.MaxResults = AutoIterationHelpers.ConvertEmitLimitToServiceTypeInt32(cmdletContext.MaxResult.Value); } // Initialize loop variant and commence piping var _nextToken = cmdletContext.NextToken; var _userControllingPaging = this.NoAutoIteration.IsPresent || ParameterWasBound(nameof(this.NextToken)); var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); do { request.NextToken = _nextToken; CmdletOutput output; try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; if (!useParameterSelect) { pipelineOutput = cmdletContext.Select(response, this); } output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; _nextToken = response.NextToken; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } ProcessOutput(output); } while (!_userControllingPaging && AutoIterationHelpers.HasValue(_nextToken)); if (useParameterSelect) { WriteObject(cmdletContext.Select(null, this)); } return null; } #else public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; var useParameterSelect = this.Select.StartsWith("^"); // create request and set iteration invariants var request = new Amazon.AWSHealth.Model.DescribeEventsRequest(); // populate Filter var requestFilterIsNull = true; request.Filter = new Amazon.AWSHealth.Model.EventFilter(); List requestFilter_filter_AvailabilityZone = null; if (cmdletContext.Filter_AvailabilityZone != null) { requestFilter_filter_AvailabilityZone = cmdletContext.Filter_AvailabilityZone; } if (requestFilter_filter_AvailabilityZone != null) { request.Filter.AvailabilityZones = requestFilter_filter_AvailabilityZone; requestFilterIsNull = false; } List requestFilter_filter_EndTime = null; if (cmdletContext.Filter_EndTime != null) { requestFilter_filter_EndTime = cmdletContext.Filter_EndTime; } if (requestFilter_filter_EndTime != null) { request.Filter.EndTimes = requestFilter_filter_EndTime; requestFilterIsNull = false; } List requestFilter_filter_EntityArn = null; if (cmdletContext.Filter_EntityArn != null) { requestFilter_filter_EntityArn = cmdletContext.Filter_EntityArn; } if (requestFilter_filter_EntityArn != null) { request.Filter.EntityArns = requestFilter_filter_EntityArn; requestFilterIsNull = false; } List requestFilter_filter_EntityValue = null; if (cmdletContext.Filter_EntityValue != null) { requestFilter_filter_EntityValue = cmdletContext.Filter_EntityValue; } if (requestFilter_filter_EntityValue != null) { request.Filter.EntityValues = requestFilter_filter_EntityValue; requestFilterIsNull = false; } List requestFilter_filter_EventArn = null; if (cmdletContext.Filter_EventArn != null) { requestFilter_filter_EventArn = cmdletContext.Filter_EventArn; } if (requestFilter_filter_EventArn != null) { request.Filter.EventArns = requestFilter_filter_EventArn; requestFilterIsNull = false; } List requestFilter_filter_EventStatusCode = null; if (cmdletContext.Filter_EventStatusCode != null) { requestFilter_filter_EventStatusCode = cmdletContext.Filter_EventStatusCode; } if (requestFilter_filter_EventStatusCode != null) { request.Filter.EventStatusCodes = requestFilter_filter_EventStatusCode; requestFilterIsNull = false; } List requestFilter_filter_EventTypeCategory = null; if (cmdletContext.Filter_EventTypeCategory != null) { requestFilter_filter_EventTypeCategory = cmdletContext.Filter_EventTypeCategory; } if (requestFilter_filter_EventTypeCategory != null) { request.Filter.EventTypeCategories = requestFilter_filter_EventTypeCategory; requestFilterIsNull = false; } List requestFilter_filter_EventTypeCode = null; if (cmdletContext.Filter_EventTypeCode != null) { requestFilter_filter_EventTypeCode = cmdletContext.Filter_EventTypeCode; } if (requestFilter_filter_EventTypeCode != null) { request.Filter.EventTypeCodes = requestFilter_filter_EventTypeCode; requestFilterIsNull = false; } List requestFilter_filter_LastUpdatedTime = null; if (cmdletContext.Filter_LastUpdatedTime != null) { requestFilter_filter_LastUpdatedTime = cmdletContext.Filter_LastUpdatedTime; } if (requestFilter_filter_LastUpdatedTime != null) { request.Filter.LastUpdatedTimes = requestFilter_filter_LastUpdatedTime; requestFilterIsNull = false; } List requestFilter_filter_Region = null; if (cmdletContext.Filter_Region != null) { requestFilter_filter_Region = cmdletContext.Filter_Region; } if (requestFilter_filter_Region != null) { request.Filter.Regions = requestFilter_filter_Region; requestFilterIsNull = false; } List requestFilter_filter_Service = null; if (cmdletContext.Filter_Service != null) { requestFilter_filter_Service = cmdletContext.Filter_Service; } if (requestFilter_filter_Service != null) { request.Filter.Services = requestFilter_filter_Service; requestFilterIsNull = false; } List requestFilter_filter_StartTime = null; if (cmdletContext.Filter_StartTime != null) { requestFilter_filter_StartTime = cmdletContext.Filter_StartTime; } if (requestFilter_filter_StartTime != null) { request.Filter.StartTimes = requestFilter_filter_StartTime; requestFilterIsNull = false; } List> requestFilter_filter_Tag = null; if (cmdletContext.Filter_Tag != null) { requestFilter_filter_Tag = cmdletContext.Filter_Tag; } if (requestFilter_filter_Tag != null) { request.Filter.Tags = requestFilter_filter_Tag; requestFilterIsNull = false; } // determine if request.Filter should be set to null if (requestFilterIsNull) { request.Filter = null; } if (cmdletContext.Locale != null) { request.Locale = cmdletContext.Locale; } // Initialize loop variants and commence piping System.String _nextToken = null; int? _emitLimit = null; int _retrievedSoFar = 0; if (AutoIterationHelpers.HasValue(cmdletContext.NextToken)) { _nextToken = cmdletContext.NextToken; } if (cmdletContext.MaxResult.HasValue) { // The service has a maximum page size of 100. If the user has // asked for more items than page max, and there is no page size // configured, we rely on the service ignoring the set maximum // and giving us 100 items back. If a page size is set, that will // be used to configure the pagination. // We'll make further calls to satisfy the user's request. _emitLimit = cmdletContext.MaxResult; } var _userControllingPaging = this.NoAutoIteration.IsPresent || ParameterWasBound(nameof(this.NextToken)); var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); do { request.NextToken = _nextToken; if (_emitLimit.HasValue) { int correctPageSize = Math.Min(100, _emitLimit.Value); request.MaxResults = AutoIterationHelpers.ConvertEmitLimitToInt32(correctPageSize); } CmdletOutput output; try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; if (!useParameterSelect) { pipelineOutput = cmdletContext.Select(response, this); } output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; int _receivedThisCall = response.Events.Count; _nextToken = response.NextToken; _retrievedSoFar += _receivedThisCall; if (_emitLimit.HasValue) { _emitLimit -= _receivedThisCall; } } catch (Exception e) { if (_retrievedSoFar == 0 || !_emitLimit.HasValue) { output = new CmdletOutput { ErrorResponse = e }; } else { break; } } ProcessOutput(output); } while (!_userControllingPaging && AutoIterationHelpers.HasValue(_nextToken) && (!_emitLimit.HasValue || _emitLimit.Value >= 10)); if (useParameterSelect) { WriteObject(cmdletContext.Select(null, this)); } return null; } #endif public ExecutorContext CreateContext() { return new CmdletContext(); } #endregion #region AWS Service Operation Call private Amazon.AWSHealth.Model.DescribeEventsResponse CallAWSServiceOperation(IAmazonAWSHealth client, Amazon.AWSHealth.Model.DescribeEventsRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Health", "DescribeEvents"); try { #if DESKTOP return client.DescribeEvents(request); #elif CORECLR return client.DescribeEventsAsync(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; } } #endregion internal partial class CmdletContext : ExecutorContext { public List Filter_AvailabilityZone { get; set; } public List Filter_EndTime { get; set; } public List Filter_EntityArn { get; set; } public List Filter_EntityValue { get; set; } public List Filter_EventArn { get; set; } public List Filter_EventStatusCode { get; set; } public List Filter_EventTypeCategory { get; set; } public List Filter_EventTypeCode { get; set; } public List Filter_LastUpdatedTime { get; set; } public List Filter_Region { get; set; } public List Filter_Service { get; set; } public List Filter_StartTime { get; set; } public List> Filter_Tag { get; set; } public System.String Locale { get; set; } public int? MaxResult { get; set; } public System.String NextToken { get; set; } public System.Func Select { get; set; } = (response, cmdlet) => response.Events; } } }