PHP Класс Scalr\Service\Aws\Ec2\DataType\InstanceData

Describes a running instance.
С версии: 09.01.2013
Автор: Vitaliy Demidov ([email protected])
Наследование: extends Scalr\Service\Aws\Ec2\AbstractEc2DataType
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$amiLaunchIndex string The AMI launch index, which can be used to find this instance within the launch group.
$architecture string i386 | x86_64
$clientToken string The idempotency token you provided when you launched the instance.
$dnsName string The public DNS name assigned to the instance. This DNS name is contactable from outside the Amazon EC2 network. This element remains empty until the instance enters a running state.
$ebsOptimized boolean This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn’t available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
$hypervisor string ovm | xen
$imageId string The ID of the AMI used to launch the instance.
$instanceId string The ID of the instance launched.
$instanceLifecycle string spot | blank (no value)
$instanceType string The instance type (for example, m1.small).
$ipAddress string The IP address of the instance
$kernelId string The kernel associated with this instance.
$keyName string The key pair name, if this instance was launched with an associated key pair.
$launchTime DateTime The time the instance was launched.
$platform string The platform of the instance (e.g., Windows).
$privateDnsName string The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This element remains empty until the instance enters a running state.
$privateIpAddress string The private IP address assigned to the instance.
$ramdiskId string The RAM disk associated with this instance.
$reason string This might be an empty string.
$rootDeviceName string The root device name (e.g., /dev/sda1).
$rootDeviceType string ebs | instance-store
$sourceDestCheck boolean Specifes whether to enable a Network Address Translation (NAT) instance in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT
$spotInstanceRequestId string The ID of the Spot Instance request
$sriovNetSupport string Specifies whether enhanced networking is enabled.
$subnetId string The subnet ID in which the instance is running.
$virtualizationType string The instance's virtualization type
$vpcId string The VPC in which the instance is running.

Защищенные свойства (Protected)

Свойство Тип Описание
$_externalKeys array List of external identifier names.
$_properties array List of the public properties which is managed by magic getter and setters internally.

Открытые методы

Метод Описание
attachNetworkInterface ( string $networkInterfaceId, integer $deviceIndex ) : string AttachNetworkInterface action
attachVolume ( string $volumeId, string $device ) : AttachmentSetResponseData AttachVolume action
createTags ( Scalr\Service\Aws\Ec2\DataType\ResourceTagSetList | Scalr\Service\Aws\Ec2\DataType\ResourceTagSetData | array $tagList ) : boolean CreateTags action
deleteTags ( Scalr\Service\Aws\Ec2\DataType\ResourceTagSetList | Scalr\Service\Aws\Ec2\DataType\ResourceTagSetData | array $tagList ) : boolean DeleteTags action
describeAttribute ( Scalr\Service\Aws\Ec2\DataType\InstanceAttributeType | string $attribute ) : mixed DescribeInstanceAttribute action
describeStatus ( ) : Scalr\Service\Aws\Ec2\DataType\InstanceStatusData | null DescribeInstanceStatus action
detachVolume ( string $volumeId, string $device = null, boolean $force = null ) : AttachmentSetResponseData DetachVolume action
getConsoleOutput ( ) : GetConsoleOutputResponseData GetConsoleOutput action
getPasswordData ( ) : GetPasswordDataResponseData GetPasswordData action
modifyAttribute ( Scalr\Service\Aws\Ec2\DataType\InstanceAttributeType | string $attribute, mixed $value ) : boolean ModifyInstanceAttribute action
monitor ( ) : Scalr\Service\Aws\Ec2\DataType\MonitorInstancesResponseSetList MonitorInstances action
reboot ( ) : boolean RebootInstances action
refresh ( ) : InstanceData DescribeInstances action
start ( ) : Scalr\Service\Aws\Ec2\DataType\InstanceStateChangeList StartInstances action
stop ( boolean $force = null ) : Scalr\Service\Aws\Ec2\DataType\InstanceStateChangeList StopInstances action
terminate ( ) : Scalr\Service\Aws\Ec2\DataType\InstanceStateChangeList TerminateInstances
unmonitor ( ) : Scalr\Service\Aws\Ec2\DataType\MonitorInstancesResponseSetList UnmonitorInstances action

Защищенные методы

Метод Описание
throwExceptionIfNotInitialized ( )

Описание методов

attachNetworkInterface() публичный Метод

Attaches a network interface to an instance.
public attachNetworkInterface ( string $networkInterfaceId, integer $deviceIndex ) : string
$networkInterfaceId string The ID of the network interface
$deviceIndex integer The index of the device for the network interface attachment.
Результат string Returns Attachment ID on success or throws an exception

attachVolume() публичный Метод

Attaches an Amazon EBS volume to a running instance and exposes it to the instance with the specified device name. For a list of supported device names, see Attaching the Volume to an Instance. Any device names that aren't reserved for instance store volumes can be used for Amazon EBS volumes. Note! If a volume has an AWS Marketplace product code: -The volume can only be attached to the root device of a stopped instance. -You must be subscribed to the AWS Marketplace code that is on the volume. -The configuration (instance type, operating system) of the instance must support that specific AWS Marketplace code. For example, you cannot take a volume from a Windows instance and attach it to a Linux instance. -AWS Marketplace product codes are copied from the volume to the instance.
public attachVolume ( string $volumeId, string $device ) : AttachmentSetResponseData
$volumeId string The ID of the Amazon EBS volume. The volume and instance must be within the same Availability Zone
$device string The device name as exposed to the instance
Результат AttachmentSetResponseData Returns AttachmentSetResponseData on success

createTags() публичный Метод

Adds or overwrites one or more tags for the specified EC2 resource or resources. Each resource can have a maximum of 10 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.
public createTags ( Scalr\Service\Aws\Ec2\DataType\ResourceTagSetList | Scalr\Service\Aws\Ec2\DataType\ResourceTagSetData | array $tagList ) : boolean
$tagList Scalr\Service\Aws\Ec2\DataType\ResourceTagSetList | Scalr\Service\Aws\Ec2\DataType\ResourceTagSetData | array The key/value pair list of the Tags.
Результат boolean Returns true on success or throws an exception otherwise

deleteTags() публичный Метод

Deletes a specific set of tags from a specific set of resources. This call is designed to follow a DescribeTags call. You first determine what tags a resource has, and then you call DeleteTags with the resource ID and the specific tags you want to delete.
public deleteTags ( Scalr\Service\Aws\Ec2\DataType\ResourceTagSetList | Scalr\Service\Aws\Ec2\DataType\ResourceTagSetData | array $tagList ) : boolean
$tagList Scalr\Service\Aws\Ec2\DataType\ResourceTagSetList | Scalr\Service\Aws\Ec2\DataType\ResourceTagSetData | array The key/value pair list of the Tags.
Результат boolean Returns true on success or throws an exception otherwise

describeAttribute() публичный Метод

Describes an attribute of the specified instance
public describeAttribute ( Scalr\Service\Aws\Ec2\DataType\InstanceAttributeType | string $attribute ) : mixed
$attribute Scalr\Service\Aws\Ec2\DataType\InstanceAttributeType | string The attribute.
Результат mixed Returns attribute value. It may be scalar value or object depends on attribute.

describeStatus() публичный Метод

DescribeInstanceStatus action
public describeStatus ( ) : Scalr\Service\Aws\Ec2\DataType\InstanceStatusData | null
Результат Scalr\Service\Aws\Ec2\DataType\InstanceStatusData | null Returns InstanceStatusData object or NULL

detachVolume() публичный Метод

Detaches an Amazon EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so will result in volume being stuck in "busy" state while detaching. Note! If an Amazon EBS volume is the root device of an instance, it cannot be detached while the instance is in the "running" state. To detach the root volume, stop the instance first. If the root volume is detached from an instance with an AWS Marketplace product code, then the AWS Marketplace product codes from that volume are no longer associated with the instance.
public detachVolume ( string $volumeId, string $device = null, boolean $force = null ) : AttachmentSetResponseData
$volumeId string The ID of the EBS volume.
$device string optional The device name.
$force boolean optional Forces detachment if the previous detachment attempt did not occur cleanly (logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.
Результат AttachmentSetResponseData Returns AttachmentSetResponseData on success

getConsoleOutput() публичный Метод

Retrieves console output for the specified instance. Instance console output is buffered and posted shortly after instance boot, reboot, and termination. Amazon EC2 preserves the most recent 64 KB output which will be available for at least one hour after the most recent post.
public getConsoleOutput ( ) : GetConsoleOutputResponseData
Результат GetConsoleOutputResponseData Returns object which represents console output.

getPasswordData() публичный Метод

Retrieves the encrypted administrator password for an instance running Windows. Note! The Windows password is only generated the first time an AMI is launched. It is not generated for rebundled AMIs or after the password is changed on an instance. The password is encrypted using the key pair that you provided.
public getPasswordData ( ) : GetPasswordDataResponseData
Результат GetPasswordDataResponseData Returns object which represents console output.

modifyAttribute() публичный Метод

Modifies the specified attribute of the specified instance. You can specify only one attribute at a time. To modify some attributes, the instance must be stopped.
public modifyAttribute ( Scalr\Service\Aws\Ec2\DataType\InstanceAttributeType | string $attribute, mixed $value ) : boolean
$attribute Scalr\Service\Aws\Ec2\DataType\InstanceAttributeType | string The attribute name.
$value mixed The attribute value can be string, boolean, array or object depends on attribute name.
Результат boolean Returns TRUE on success

monitor() публичный Метод

Enables monitoring for a running instance.
public monitor ( ) : Scalr\Service\Aws\Ec2\DataType\MonitorInstancesResponseSetList
Результат Scalr\Service\Aws\Ec2\DataType\MonitorInstancesResponseSetList Returns the MonitorInstancesResponseSetList

reboot() публичный Метод

Requests a reboot of one or more instances. This operation is asynchronous; it only queues a request to reboot the specified instance(s). The operation will succeed if the instances are valid and belong to you. Requests to reboot terminated instances are ignored. Note! If a Linux/UNIX instance does not cleanly shut down within four minutes, Amazon EC2 will perform a hard reboot.
public reboot ( ) : boolean
Результат boolean Returns true on success or throws an exception otherwise

refresh() публичный Метод

This action will refresh current InstanceData object with retrieved information from AWS. Describes one or more of your instances. If you specify one or more instance IDs, Amazon EC2 returns information for those instances. If you do not specify instance IDs, Amazon EC2 returns information for all relevant instances. If you specify an invalid instance ID, an error is returned. If you specify an instance that you do not own, it is not included in the returned results. Recently terminated instances might appear in the returned results. This interval is usually less than one hour. NOTE! It refreshes object itself only when EntityManager is enabled. Decision is to use $object = object->refresh() instead;
public refresh ( ) : InstanceData
Результат InstanceData

start() публичный Метод

Starts an Amazon EBS-backed AMI that you've previously stopped. Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Each time you transition an instance from stopped to started, we charge a full instance hour, even if transitions happen multiple times within a single hour. Note! Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM. Performing this operation on an instance that uses an instance store as its root device returns an error.
public start ( ) : Scalr\Service\Aws\Ec2\DataType\InstanceStateChangeList
Результат Scalr\Service\Aws\Ec2\DataType\InstanceStateChangeList Return the InstanceStateChangeList

stop() публичный Метод

Stops an Amazon EBS-backed instance. Each time you transition an instance from stopped to started, we charge a full instance hour, even if transitions happen multiple times within a single hour. Important! Although Spot Instances can use Amazon EBS-backed AMIs, they don't support Stop/Start. In other words, you can't stop and start Spot Instances launched from an AMI with an Amazon EBS root device. Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started.When an instance is stopped, the compute resources are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage.You can restart your instance at any time. Note! Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM. Performing this operation on an instance that uses an instance store as its root device returns an error. You can stop, start, and terminate EBS-backed instances.You can only terminate S3-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted
public stop ( boolean $force = null ) : Scalr\Service\Aws\Ec2\DataType\InstanceStateChangeList
$force boolean optional Forces the instance to stop. The instance will not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.
Результат Scalr\Service\Aws\Ec2\DataType\InstanceStateChangeList Return the InstanceStateChangeList

terminate() публичный Метод

Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call will succeed. Terminated instances will remain visible after termination (approximately one hour). Note! By default, Amazon EC2 deletes all Amazon EBS volumes that were attached when the instance launched. Amazon EBS volumes attached after instance launch continue running. You can stop, start, and terminate EBS-backed instances.You can only terminate S3-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted.
public terminate ( ) : Scalr\Service\Aws\Ec2\DataType\InstanceStateChangeList
Результат Scalr\Service\Aws\Ec2\DataType\InstanceStateChangeList Returns the InstanceStateChangeList

throwExceptionIfNotInitialized() защищенный Метод

unmonitor() публичный Метод

Disables monitoring for a running instance.
public unmonitor ( ) : Scalr\Service\Aws\Ec2\DataType\MonitorInstancesResponseSetList
Результат Scalr\Service\Aws\Ec2\DataType\MonitorInstancesResponseSetList Returns the MonitorInstancesResponseSetList

Описание свойств

$_externalKeys защищенное свойство

List of external identifier names.
protected array $_externalKeys
Результат array

$_properties защищенное свойство

List of the public properties which is managed by magic getter and setters internally.
protected array $_properties
Результат array

$amiLaunchIndex публичное свойство

The AMI launch index, which can be used to find this instance within the launch group.
public string $amiLaunchIndex
Результат string

$architecture публичное свойство

i386 | x86_64
public string $architecture
Результат string

$clientToken публичное свойство

The idempotency token you provided when you launched the instance.
public string $clientToken
Результат string

$dnsName публичное свойство

The public DNS name assigned to the instance. This DNS name is contactable from outside the Amazon EC2 network. This element remains empty until the instance enters a running state.
public string $dnsName
Результат string

$ebsOptimized публичное свойство

This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn’t available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
public bool $ebsOptimized
Результат boolean

$hypervisor публичное свойство

ovm | xen
public string $hypervisor
Результат string

$imageId публичное свойство

The ID of the AMI used to launch the instance.
public string $imageId
Результат string

$instanceId публичное свойство

The ID of the instance launched.
public string $instanceId
Результат string

$instanceLifecycle публичное свойство

spot | blank (no value)
public string $instanceLifecycle
Результат string

$instanceType публичное свойство

The instance type (for example, m1.small).
public string $instanceType
Результат string

$ipAddress публичное свойство

The IP address of the instance
public string $ipAddress
Результат string

$kernelId публичное свойство

The kernel associated with this instance.
public string $kernelId
Результат string

$keyName публичное свойство

The key pair name, if this instance was launched with an associated key pair.
public string $keyName
Результат string

$launchTime публичное свойство

The time the instance was launched.
public DateTime $launchTime
Результат DateTime

$platform публичное свойство

The platform of the instance (e.g., Windows).
public string $platform
Результат string

$privateDnsName публичное свойство

The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This element remains empty until the instance enters a running state.
public string $privateDnsName
Результат string

$privateIpAddress публичное свойство

The private IP address assigned to the instance.
public string $privateIpAddress
Результат string

$ramdiskId публичное свойство

The RAM disk associated with this instance.
public string $ramdiskId
Результат string

$reason публичное свойство

This might be an empty string.
public string $reason
Результат string

$rootDeviceName публичное свойство

The root device name (e.g., /dev/sda1).
public string $rootDeviceName
Результат string

$rootDeviceType публичное свойство

ebs | instance-store
public string $rootDeviceType
Результат string

$sourceDestCheck публичное свойство

Specifes whether to enable a Network Address Translation (NAT) instance in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT
public bool $sourceDestCheck
Результат boolean

$spotInstanceRequestId публичное свойство

The ID of the Spot Instance request
public string $spotInstanceRequestId
Результат string

$sriovNetSupport публичное свойство

Specifies whether enhanced networking is enabled.
public string $sriovNetSupport
Результат string

$subnetId публичное свойство

The subnet ID in which the instance is running.
public string $subnetId
Результат string

$virtualizationType публичное свойство

The instance's virtualization type
public string $virtualizationType
Результат string

$vpcId публичное свойство

The VPC in which the instance is running.
public string $vpcId
Результат string