using System; using System.Collections.Generic; using System.Text; namespace Amazon.Lambda.S3Events { /// /// Class representing the S3 Object Lambda event. /// /// S3 Developer Guide explaining the event data. /// https://docs.aws.amazon.com/AmazonS3/latest/userguide/olap-writing-lambda.html /// public class S3ObjectLambdaEvent { /// /// The Amazon S3 request ID for this request. We recommend that you log this value to help with debugging. /// #if NETCOREAPP3_1 [System.Text.Json.Serialization.JsonPropertyName("xAmzRequestId")] #endif public string XAmzRequestId { get; set; } /// /// The input and output details for connections to Amazon S3 and S3 Object Lambda. /// public GetObjectContextType GetObjectContext { get; set; } /// /// Configuration information about the S3 Object Lambda access point. /// public ConfigurationType Configuration { get; set; } /// /// Information about the original call to S3 Object Lambda. /// public UserRequestType UserRequest { get; set; } /// /// Details about the identity that made the call to S3 Object Lambda. /// public UserIdentityType UserIdentity { get; set; } /// /// The version ID of the context provided. The format of this field is {Major Version}.{Minor Version}. /// public string ProtocolVersion { get; set; } /// /// The input and output details for connections to Amazon S3 and S3 Object Lambda. /// public class GetObjectContextType { /// /// A presigned URL that can be used to fetch the original object from Amazon S3. The URL is signed /// using the original caller’s identity, and their permissions will apply when the URL is used. /// If there are signed headers in the URL, the Lambda function must include these in the call to /// Amazon S3, except for the Host. /// public string InputS3Url { get; set; } /// /// A presigned URL that can be used to fetch the original object from Amazon S3. The URL is signed /// using the original caller’s identity, and their permissions will apply when the URL is used. If /// there are signed headers in the URL, the Lambda function must include these in the call to /// Amazon S3, except for the Host. /// public string OutputRoute { get; set; } /// /// An opaque token used by S3 Object Lambda to match the WriteGetObjectResponse call with the /// original caller. /// public string OutputToken { get; set; } } /// /// Configuration information about the S3 Object Lambda access point. /// public class ConfigurationType { /// /// The Amazon Resource Name (ARN) of the S3 Object Lambda access point that received this request. /// public string AccessPointArn { get; set; } /// /// The ARN of the supporting access point that is specified in the S3 Object Lambda access point configuration. /// public string SupportingAccessPointArn { get; set; } /// /// Custom data that is applied to the S3 Object Lambda access point configuration. S3 Object Lambda treats /// this as an opaque string, so it might need to be decoded before use. /// public string Payload { get; set; } } /// /// Information about the original call to S3 Object Lambda. /// public class UserRequestType { /// /// The decoded URL of the request as received by S3 Object Lambda, /// excluding any authorization-related query parameters. /// public string Url { get; set; } /// /// A map of string to strings containing the HTTP headers and their values from the original call, excluding /// any authorization-related headers. If the same header appears multiple times, their values are /// combined into a comma-delimited list. /// public IDictionary Headers { get; set; } } /// /// Details about the identity that made the call to S3 Object Lambda. /// public class UserIdentityType { /// /// The type of identity. /// public string Type { get; set; } /// /// The unique identifier for the identity that made the call. /// public string PrincipalId { get; set; } /// /// The ARN of the principal that made the call. The last section of the ARN contains the user or role that made the call. /// public string Arn { get; set; } /// /// The AWS account to which the identity belongs. /// public string AccountId { get; set; } /// /// The AWS Access Key Id for the identity. /// public string AccessKeyId { get; set; } /// /// If the request was made with temporary security credentials, this element provides information about the /// session that was created for those credentials. /// public SessionContextType SessionContext { get; set; } } /// /// The information about temporary session credentials used by the identity. /// public class SessionContextType { /// /// Attributes for the temporary session credentials /// public SessionContextAttributesType Attributes { get; set; } /// /// If the request was made with temporary security credentials, this element provides information about how the credentials were obtained. /// public SessionIssuerType SessionIssuer { get; set; } } /// /// Attributes of the temporary session credentials /// public class SessionContextAttributesType { /// /// Identifies whether MFA authentication was used when obtaining temporary credentials. /// public string MfaAuthenticated { get; set; } /// /// The create date of the temporary session credentials. /// public string CreationDate { get; set; } } /// /// Information about the issuer of the temporary session credentials. /// public class SessionIssuerType { /// /// The type of issuer of the temporary session credentials. /// public string Type { get; set; } /// /// The principal id of the issuer of the temporary session credentials. /// public string PrincipalId { get; set; } /// /// The arn of the issuer of the temporary session credentials. /// public string Arn { get; set; } /// /// The account id of the issuer of the temporary session credentials. /// public string AccountId { get; set; } /// /// The user name of the issuer of the temporary session credentials. /// public string UserName { get; set; } } } }