matchingEventTypes does not accept some valid types #2071
-
Describe the bugWhen calling CreateConfigurationSetEventDestinationAsync and passing in CreateConfigurationSetEventDestinationRequest with List _matchingEventTypes, if _matchingEventTypes includes "DeliveryDelay" or "Subscription" the request is rejected. Error: Expected BehaviorI expect to be able to pass all the valid event types into CreateConfigurationSetEventDestinationRequest when creating an EventDestination Current BehaviorError is thrown: Reproduction Steps List<string> matchingEventTypes = new List<string>() { "bounce", "complaint", "delivery", "reject", "renderingFailure", "send", "subscription" };
SNSDestination sNSDestination = new SNSDestination() { TopicARN = topicArn };
EventDestination eventDestination = new EventDestination()
{
Name = eventDestinationName,
SNSDestination = sNSDestination,
MatchingEventTypes = matchingEventTypes,
Enabled = true
};
var request = new CreateConfigurationSetEventDestinationRequest { ConfigurationSetName = configurationSetName, EventDestination = eventDestination };
var response = await amazonSimpleEmailServiceClient.CreateConfigurationSetEventDestinationAsync(request); Possible SolutionAdd additional EventTypes to file: ServiceEnumerations.cs class: public class EventType : ConstantClass
{
/// <summary>
/// Constant Bounce for EventType
/// </summary>
public static readonly EventType Bounce = new EventType("bounce");
/// <summary>
/// Constant Click for EventType
/// </summary>
public static readonly EventType Click = new EventType("click");
/// <summary>
/// Constant Complaint for EventType
/// </summary>
public static readonly EventType Complaint = new EventType("complaint");
/// <summary>
/// Constant Delivery for EventType
/// </summary>
public static readonly EventType Delivery = new EventType("delivery");
/// <summary>
/// Constant Open for EventType
/// </summary>
public static readonly EventType Open = new EventType("open");
/// <summary>
/// Constant Reject for EventType
/// </summary>
public static readonly EventType Reject = new EventType("reject");
/// <summary>
/// Constant RenderingFailure for EventType
/// </summary>
public static readonly EventType RenderingFailure = new EventType("renderingFailure");
/// <summary>
/// Constant Send for EventType
/// </summary>
public static readonly EventType Send = new EventType("send");
/// <summary>
/// This constant constructor does not need to be called if the constant
/// you are attempting to use is already defined as a static instance of
/// this class.
/// This constructor should be used to construct constants that are not
/// defined as statics, for instance if attempting to use a feature that is
/// newer than the current version of the SDK.
/// </summary>
public EventType(string value)
: base(value)
{
}
/// <summary>
/// Finds the constant for the unique value.
/// </summary>
/// <param name="value">The unique value for the constant</param>
/// <returns>The constant for the unique value</returns>
public static EventType FindValue(string value)
{
return FindValue<EventType>(value);
}
/// <summary>
/// Utility method to convert strings to the constant class.
/// </summary>
/// <param name="value">The string value to convert to the constant class.</param>
/// <returns></returns>
public static implicit operator EventType(string value)
{
return FindValue(value);
}
} Additional Information/ContextNo response AWS .NET SDK and/or Package version usedAWSSDK.SimpleEmail 3.7.0.150 Targeted .NET Platform.net 6.0 Operating System and versionWindows 11 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @ddelucie, Good afternoon. Thanks for reporting the issue. Upon analysis, the package You might want to use the new package Hope this helps. Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Hi @ddelucie,
Good afternoon.
Thanks for reporting the issue.
Upon analysis, the package
AWSSDK.SimpleEmail
targetsV1
version of Simple Email service. If you refer the API documentation for EventDestination V1, the valid values forMatchingEventTypes
aresend | reject | bounce | complaint | delivery | open | click | renderingFailure
.You might want to use the new package
AWSSDK.SimpleEmailV2
which has the EventTypes you are expecting. Also refer the service API documentation for EventDestinationDefinition V2, which also lists the valid values forMatchingEventTypes
asSEND | REJECT | BOUNCE | COMPLAINT | DELIVERY | OPEN | CLICK | RENDERING_FAILURE | DELIVERY_DELAY | SUBSCRIPTION
.Hope th…