Skip to content

Instantly share code, notes, and snippets.

@markekraus
Last active February 13, 2018 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markekraus/8eaee8e5dea2ca3126dc0ac80f9b8778 to your computer and use it in GitHub Desktop.
Save markekraus/8eaee8e5dea2ca3126dc0ac80f9b8778 to your computer and use it in GitHub Desktop.
CodeCommitEvent Model for Receiving CodeCommit Events in C# AWS Lambdas
using System;
namespace Lambda
{
public class CodeCommitEventCodecommitReference
{
public string commit;
public bool created = false;
public string @ref;
}
public class CodeCommitEventCodecommit
{
public CodeCommitEventCodecommitReference[] references;
}
public class CodeCommitEventRecord
{
public string awsRegion;
public CodeCommitEventCodecommit codecommit;
public Guid eventId;
public string eventName;
public Int64 eventPartNumber;
public string eventSource;
public string eventSourceARN;
public string eventTime;
public Int64 eventTotalParts;
public Guid eventTriggerConfigId;
public string eventTriggerName;
public string eventVersion;
public string userIdentityARN;
public string RepositoryName
{
get
{
return eventSourceARN.Split(':')[5];
}
}
}
public class CodeCommitEvent
{
public CodeCommitEventRecord[] Records;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment