Esempio n. 1
0
 /// <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");
 }
Esempio n. 2
0
 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");
 }
Esempio n. 3
0
 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");
 }
Esempio n. 4
0
 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
 }
Esempio n. 5
0
 /// <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;
 }
Esempio n. 6
0
 /// <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;
 }
Esempio n. 7
0
 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");
 }