/** * Convenient constructor * * @param string $instanceId The ID of the instance. * @param string $name The image name. * @param BlockDeviceMappingList|BlockDeviceMappingData|array $blockDeviceMapping optional Block device mapping list */ public function __construct($instanceId, $name, $blockDeviceMapping = null) { parent::__construct(); $this->instanceId = $instanceId; $this->name = $name; $this->setBlockDeviceMapping($blockDeviceMapping); }
/** * {@inheritdoc} * @see Scalr\Service\Aws\Ec2.AbstractEc2DataType::throwExceptionIfNotInitialized() */ protected function throwExceptionIfNotInitialized() { parent::throwExceptionIfNotInitialized(); if ($this->internetGatewayId === null) { throw new Ec2Exception(sprintf('internetGatewayId has not been initialized for the "%s" yet.', get_class($this))); } }
/** * {@inheritdoc} * @see Scalr\Service\Aws\Ec2.AbstractEc2DataType::throwExceptionIfNotInitialized() */ protected function throwExceptionIfNotInitialized() { parent::throwExceptionIfNotInitialized(); if ($this->groupName === null) { throw new Ec2Exception(sprintf('groupName has not been initialized for the "%s" yet!', get_class($this))); } }
protected function throwExceptionIfNotInitialized() { parent::throwExceptionIfNotInitialized(); if ($this->volumeId === null) { throw new Ec2Exception(sprintf('volumeId has not been provided for the "%s" yet.', get_class($this))); } }
/** * Constructor * * @param string $userId optional The ID of an AWS account. Cannot be used when specifying a CIDR IP address range * @param string $groupId optional The ID of the security group in the specified AWS account. Cannot be used when specifying a CIDR IP address range * @param string $groupName optional The name of the security group in the specified AWS account. Cannot be used when specifying a CIDR IP address range. */ public function __construct($userId = null, $groupId = null, $groupName = null) { parent::__construct(); $this->userId = $userId; $this->groupId = $groupId; $this->groupName = $groupName; }
/** * Convenient constructor * * @param string $name The image name. * @param BlockDeviceMappingList|BlockDeviceMappingData|array $blockDeviceMapping optional Block device mapping list */ public function __construct($name, $blockDeviceMapping = null) { parent::__construct(); $this->name = $name; $this->architecture = 'i386'; $this->setBlockDeviceMapping($blockDeviceMapping); }
/** * {@inheritdoc} * @see Scalr\Service\Aws\Ec2.AbstractEc2DataType::throwExceptionIfNotInitialized() */ protected function throwExceptionIfNotInitialized() { parent::throwExceptionIfNotInitialized(); if ($this->keyName === null) { throw new Ec2Exception(sprintf('keyName property has not been initialized for the class "%s" yet', get_class($this))); } }
/** * {@inheritdoc} * @see Scalr\Service\Aws\Ec2.AbstractEc2DataType::throwExceptionIfNotInitialized() */ protected function throwExceptionIfNotInitialized() { parent::throwExceptionIfNotInitialized(); if ($this->groupName === null || $this->groupId === null) { throw new Ec2Exception(sprintf("groupName and groupId have not been initialized for the %s yet.", get_class($this))); } }
/** * {@inheritdoc} * @see Scalr\Service\Aws\Ec2.AbstractEc2DataType::throwExceptionIfNotInitialized() */ protected function throwExceptionIfNotInitialized() { parent::throwExceptionIfNotInitialized(); if ($this->routeTableAssociationId === null) { throw new Ec2Exception(sprintf('routeTableAssociationId has not been initialized for the "%s" yet.', get_class($this))); } }
/** * Constructor * * @param string $availabilityZone optional The Availability Zone of the instance. * @param string $groupName optional The name of the placement group the instance is in (for cluster compute instances). * @param string $tenancy optional The tenancy of the instance (if the instance is running within a VPC). */ public function __construct($availabilityZone = null, $groupName = null, $tenancy = null) { parent::__construct(); $this->availabilityZone = $availabilityZone; $this->groupName = $groupName; $this->tenancy = $tenancy; }
/** * Constructor * * @param string $deviceName optional * The device name exposed to the instance (e.g., /dev/sdh). * * @param string $virtualName optional * The virtual device name. * * @param string $noDevice optional * Include this empty element to suppress the specified device included * in the block device mapping of the AMI. * * @param EbsBlockDeviceData $ebs optional * Parameters used to automatically set up Amazon EBS * volumes when the instance is launched. */ public function __construct($deviceName = null, $virtualName = null, $noDevice = null, EbsBlockDeviceData $ebs = null) { parent::__construct(); $this->deviceName = $deviceName; $this->virtualName = $virtualName; $this->noDevice = $noDevice; $this->ebs = $ebs; }
/** * Convenient constructor * * @param string|number $ipProtocol optional The protocol * @param int $fromPort optional From port * @param int $toPort optional To port * @param IpRangeList|IpRangeData|array $ipRanges optional The list of IP Ranges * @param UserIdGroupPairList|UserIdGroupPairData|array $groups optional The list of the User ID groups */ public function __construct($ipProtocol = null, $fromPort = null, $toPort = null, $ipRanges = null, $groups = null) { parent::__construct(); $this->ipProtocol = $ipProtocol; $this->fromPort = $fromPort; $this->toPort = $toPort; $this->setIpRanges($ipRanges); $this->setGroups($groups); }
/** * Constructor * * @param int $volumeSize optional * The size of the volume, in GiB * Valid values: If the volume type is io1, the minimum size of the volume is 10 GiB. * Default: If you're creating the volume from a snapshot and don't * specify a volume size, the default is the snapshot size. * Condition: If you're specifying a block device mapping, the volume * size is required unless you're creating the volume from a snapshot. * * @param string $snapshotId optional * The ID of the snapshot. * * @param string $volumeType optional * The volume type. Valid values: standard | io1 * * @param int $iops optional * The number of I/O operations per second (IOPS) that the volume supports. * Valid values: Range is 100 to 2000. * Condition: Required when the volume type is io1; not used with standard volumes. * * @param bool $deleteOnTermination optional * Whether the Amazon EBS volume is deleted on instance termination */ public function __construct($volumeSize = null, $snapshotId = null, $volumeType = null, $iops = null, $deleteOnTermination = null) { parent::__construct(); $this->volumeSize = $volumeSize; $this->snapshotId = $snapshotId; $this->volumeType = $volumeType; $this->deleteOnTermination = $deleteOnTermination !== null ? (bool) $deleteOnTermination : null; if ($this->volumeType !== 'standard') { $this->iops = $iops; } }
/** * Convenient constructor * * @param string|AvailabilityZoneData $availabilityZone The Availability Zone in which the volume was created. * @param string $size optional Size of the volume, in GiBs. */ public function __construct($availabilityZone, $size = null) { parent::__construct(); if ($availabilityZone instanceof AvailabilityZoneData) { $zoneName = $availabilityZone->zoneName; } else { $zoneName = (string) $availabilityZone; } $this->availabilityZone = $zoneName; $this->size = $size; $this->volumeType = self::VOLUME_TYPE_STANDARD; }
/** * Constructor * * @param boolean $enabled Whether monitoring is enabled for the instance. */ public function __construct($enabled = null) { parent::__construct(); $this->enabled = $enabled; }
/** * Convenient constuctor for the filter * * @param \Scalr\Service\Aws\Ec2\DataType\StringType $name Filter name * @param array|string $value Filter value */ public function __construct($name = null, $value = null) { parent::__construct(); $this->setValue($value); $this->setName($name); }
public function __construct($subnetId) { parent::__construct(); $this->subnetId = $subnetId; }
public function throwExceptionIfNotInitialized() { parent::throwExceptionIfNotInitialized(); if ($this->reservedInstancesId === null) { throw new Ec2Exception(sprintf('reservedInstancesId property has not been initialized for the class "%s" yet.', get_class($this))); } }
/** * Constructor * * @param string $groupId optional The ID of the security group associated with the network interface. */ public function __construct($groupId = null) { parent::__construct(); $this->groupId = $groupId; }
/** * Constructor * * @param string $instanceId optional The instance to associate with the IP address. * @param string $publicIp optional The Elastic IP address to assign to the instance. * Condition: Required for EC2 Elastic IP addresses. */ public function __construct($instanceId = null, $publicIp = null) { parent::__construct(); $this->publicIp = $publicIp; $this->instanceId = $instanceId; }
/** * Construct * * @param string $gatewayId The ID of the virtual private gateway (VGW) */ public function __construct($gatewayId = null) { parent::__construct(); $this->gatewayId = $gatewayId; }
/** * DeleteSubnet action * * Deletes a subnet from a VPC. You must terminate all running instances in the subnet before deleting it, * otherwise Amazon VPC returns an error * * @return bool Returns the TRUE on success. * @throws ClientException * @throws Ec2Exception */ public function delete() { parent::throwExceptionIfNotInitialized(); return $this->getEc2()->subnet->delete($this->subnetId); }
/** * Constructor * @param string $arn optional The Amazon resource name (ARN) of the IAM Instance Profile (IIP) to associate with the instance. * @param string $name optional The name of the IAM Instance Profile (IIP) to associate with the instance. */ public function __construct($arn = null, $name = null) { parent::__construct(); $this->arn = $arn; $this->name = $name; }
/** * Constructor * * @param string $regionName optional The name of the region. * @param string $regionEndpoint optional The endpoint for the region. */ public function __construct($regionName = null, $regionEndpoint = null) { parent::__construct(); $this->regionName = $regionName; $this->regionEndpoint = $regionEndpoint; }
/** * Convenient constructor * * @param int $code optional The low byte representes the code of the state. * @param string $name optional The current state of the instance. */ public function __construct($code = null, $name = null) { parent::__construct(); $this->code = $code; $this->name = $name; }
/** * Constructor * * @param string $imageId The Id of the AMI. * @param int $minCount The minimum number of instances to launch. * @param int $maxCount The maximum number of instances to launch. */ public function __construct($imageId, $minCount, $maxCount) { parent::__construct(); $this->imageId = (string) $imageId; $this->minCount = (int) $minCount; $this->maxCount = (int) $maxCount; }
/** * Convenient constructor * * @param string $cidrIp optional CIDR IP */ public function __construct($cidrIp = null) { parent::__construct(); $this->cidrIp = $cidrIp; }