/// <summary> /// Constructor with all properties and appropriate value checks /// </summary> /// <param name="availabilityZone"></param> /// <param name="subnetID"></param> public AutoScalingInstanceStateEventDetails( string availabilityZone, string subnetID) { this.AvailabilityZone = ParameterTests.NotNullOrEmpty(availabilityZone, "availabilityZone"); this.SubnetID = ParameterTests.NotNullOrEmpty(subnetID, "subnetID"); }
public S3BucketInfo( string name, IDictionary <string, string> ownerIdentity, string arn ) { this.Name = ParameterTests.NotNullOrEmpty(name, "name"); this.OwnerIdentity = ownerIdentity ?? throw new ArgumentNullException("ownerIdentity"); this.Arn = ParameterTests.NotNullOrEmpty(arn, "arn"); }
public S3Info( string s3SchemaVersion, string configurationId, S3BucketInfo bucket, S3ObjectInfo @object ) { this.S3SchemaVersion = ParameterTests.NotNullOrEmpty(s3SchemaVersion, "s3SchemaVersion"); this.ConfigurationId = ParameterTests.NotNullOrEmpty(configurationId, "configurationId"); this.Bucket = bucket ?? throw new ArgumentNullException("bucket"); this.Object = @object ?? throw new ArgumentNullException("object"); }
public S3ObjectInfo( string key, long size, string eTag, string versionId = null, string sequencer = null ) { // Remove URL encoding from key this.Key = WebUtility.UrlDecode(ParameterTests.NotNullOrEmpty(key, "key")); this.Size = size > 0 ? size : throw new ArgumentOutOfRangeException("The object size cannot be less than or equal to 0."); this.ETag = eTag ?? String.Empty; // Can be null (might be missing in json record) this.VersionId = versionId ?? String.Empty; // Can be null this.Sequencer = sequencer ?? String.Empty; // Can be null }
/// <summary> /// Constructor with all properties and null/empty checking. /// </summary> /// <param name="lifecycleHookName"></param> /// <param name="accountId"></param> /// <param name="requestId"></param> /// <param name="lifecycleTransition"></param> /// <param name="autoScalingGroupName"></param> /// <param name="service"></param> /// <param name="time"></param> /// <param name="ec2InstanceId"></param> /// <param name="lifecycleActionToken"></param> public AutoScalingLifecycleEvent( string lifecycleHookName, string lifecycleTransition, string autoScalingGroupName, string ec2InstanceId, Guid lifecycleActionToken, string notificationMetadata ) { this.LifecycleHookName = ParameterTests.NotNullOrEmpty(lifecycleHookName, "lifecycleHookName"); this.LifecycleTransition = ParameterTests.NotNullOrEmpty(lifecycleTransition, "lifecycleTransition"); this.AutoScalingGroupName = ParameterTests.NotNullOrEmpty(autoScalingGroupName, "autoScalingGroupName"); this.EC2InstanceId = ParameterTests.NotNullOrEmpty(ec2InstanceId, "ec2InstanceId"); this.LifecycleActionToken = lifecycleActionToken; this.NotificationMetadata = notificationMetadata; }
/// <summary> /// Constructor with all properties and null/empty checking. /// </summary> /// <param name="lifecycleHookName"></param> /// <param name="accountId"></param> /// <param name="requestId"></param> /// <param name="lifecycleTransition"></param> /// <param name="autoScalingGroupName"></param> /// <param name="service"></param> /// <param name="time"></param> /// <param name="ec2InstanceId"></param> /// <param name="lifecycleActionToken"></param> public SNSAutoScalingLifecycleHookMessage( string lifecycleHookName, string accountId, Guid requestId, string lifecycleTransition, string autoScalingGroupName, string service, DateTime time, string ec2InstanceId, Guid lifecycleActionToken ) { this.LifecycleHookName = ParameterTests.NotNullOrEmpty(lifecycleHookName, "lifecycleHookName"); this.AccountId = ParameterTests.NotNullOrEmpty(accountId, "accountId"); this.RequestId = requestId; this.LifecycleTransition = ParameterTests.NotNullOrEmpty(lifecycleTransition, "lifecycleTransition"); this.AutoScalingGroupName = ParameterTests.NotNullOrEmpty(autoScalingGroupName, "autoScalingGroupName"); this.Service = ParameterTests.NotNullOrEmpty(service, "service"); this.Time = time; this.EC2InstanceId = ParameterTests.NotNullOrEmpty(ec2InstanceId, "ec2InstanceId"); this.LifecycleActionToken = lifecycleActionToken; }
public SNSS3Record( string eventVersion, string eventSource, string awsRegion, DateTime eventTime, string eventName, IDictionary <string, string> userIdentity, IDictionary <string, string> requestParameters, IDictionary <string, string> responseElements, S3Info s3 ) { this.EventVersion = ParameterTests.NotNullOrEmpty(eventVersion, "eventVersion"); this.EventSource = ParameterTests.NotNullOrEmpty(eventSource, "eventSource"); this.AwsRegion = ParameterTests.NotNullOrEmpty(awsRegion, "awsRegion"); this.EventTime = eventTime; this.EventName = ParameterTests.NotNullOrEmpty(eventName, "eventName"); this.UserIdentity = userIdentity ?? throw new ArgumentNullException("userIdentity"); this.RequestParameters = requestParameters ?? throw new ArgumentNullException("requestParameters"); this.ResponseElements = responseElements ?? throw new ArgumentNullException("responseElements"); this.S3 = s3 ?? throw new ArgumentNullException("s3"); }