describeInstances
The describeInstances method provides information about service(s) or server(s) from BMC Cloud Lifecycle Management. This operation can be performed by specifying either of following:
- Service ID(s) from BMC Cloud Lifecycle Management.
- Service name(s) from BMC Cloud Lifecycle Management.
- Server instance ID(s) from BMC Cloud Lifecycle Management.
Note
If neither of above are specified in request, this operation describes all server(s) that are accessible to you in BMC Cloud Lifecycle Management.
The following table depicts how describeInstances method is used:
Usage | Description |
---|---|
To execute using server instance ID(s) |
|
To execute using service ID(s) |
|
To execute using service name(s) |
|
Before you begin
Prior to using this CLM AWS SDK method, ensure that the following prerequisites are met:
- You have supplied the configuration parameters to the CLMEC2Client constructor or have specified in the configuration file. See CLM AWS SDK syntax and usage for details.
- Supply either of the three:
- List of valid server ids from BMC Cloud Lifecycle Management. You can obtain the server ids using the getInstanceId() method of com.bmc.cloud.sdk.aws.model.ServerInstance
- List of valid service ids from BMC Cloud Lifecycle Management. You can obtain the service ids using the getServiceId() method of com.bmc.cloud.sdk.aws.model.ServerInstance
- List of valid service names from BMC Cloud Lifecycle Management. You can obtain the service names using the getServiceName() method of com.bmc.cloud.sdk.aws.model.ServerInstance
Request
Using com.amazonaws.services.ec2.model.DescribeInstancesRequest
Method | Usage as per AWS SDK | Usage as per CLM AWS SDK | Remarks |
---|---|---|---|
setInstanceIds(Collection<String> instanceIds) | One or more instance IDs | One or more server IDs from BMC Cloud Lifecycle Management. | This is obtained from the getInstanceId() method from com.bmc.cloud.sdk.aws.model.ServerInstance |
withInstanceIds(Collection<String> instanceIds) | One or more instance IDs | One or more server IDs from BMC Cloud Lifecycle Management. | This is obtained from the getInstanceId() method from com.bmc.cloud.sdk.aws.model.ServerInstance |
Using com.bmc.cloud.sdk.aws.model.DescribeServicesRequest
Extends com.amazonaws.services.ec2.model.DescribeInstancesRequest
Method | Usage as per AWS SDK | Usage as per CLM AWS SDK | Remarks |
---|---|---|---|
setServiceIds(final List<String> serviceIds) | Not used | One or more service IDs from BMC Cloud Lifecycle Management. | This is obtained from the getServiceId() method from com.bmc.cloud.sdk.aws.model.ServerInstance |
setServiceNames(List<String> serviceNames) | Not used | One or more service names from BMC Cloud Lifecycle Management. | This is obtained from the getServiceName() method from com.bmc.cloud.sdk.aws.model.ServerInstance |
Response
com.amazonaws.services.ec2.model.DescribeInstancesResult
Method | Return Type | Belongs To | Usage as per AWS SDK | Usage as per CLM AWS SDK | Remarks |
---|---|---|---|---|---|
getReservations() | List<Reservation> | AWS SDK | One or more reservations contained in DescribeInstancesResult | One or more reservations which are mapped to BMC Cloud Lifecycle Management resource sets contained in DescribeInstancesResult | Reservations are mapped to resource sets |
com.amazonaws.services.ec2.model.Reservation
This is an AWS entity. Same class is used in CLM AWS SDK. Logically it is mapped to BMC Cloud Lifecycle Management resource set.
Method | Belongs To | Usage as per AWS SDK | Usage as per CLM AWS SDK | Remarks |
---|---|---|---|---|
getReservationId() | AWS | The ID of the reservation. | Resource set guid. | . |
getOwnerId() | AWS | The ID of the AWS account that owns the reservation. | Service owner ID. | User who invokes SDK method will be owner. |
getRequesterId() | AWS | The ID of the requester that launched the instances on your behalf (for example, AWS Management Console or Auto Scaling). | BMC Cloud Lifecycle Management user who invokes SDK attributes. | |
getInstances() | AWS | One or more instances. | List of compute resource. | Server in resource set. |
com.bmc.cloud.sdk.aws.model.ServerInstance
Extends: com.amazonaws.services.ec2.model.Instance
Method | Belongs To | Usage as per AWS SDK | Usage as per CLM AWS SDK | Remarks |
---|---|---|---|---|
getCpuCount() | CLM AWS SDK | Not applicable. | Gets the number of CPU assigned to this server instance | |
getMemory() | CLM AWS SDK | Not applicable. | Gets the memory (in MB) assigned as RAM to this server instance | |
getName() | CLM AWS SDK | Not applicable. | Gets the name of server instance in BMC Cloud Lifecycle Management. | |
getServerId() | CLM AWS SDK | Not applicable. | Gets the server instance ID. | |
getTierName() | CLM AWS SDK | Not applicable. | Gets the name of resource set created in BMC Cloud Lifecycle Management. | |
getTierId() | CLM AWS SDK | Not applicable. | Gets the id of resource set created in BMC Cloud Lifecycle Management. | |
getServiceName() | CLM AWS SDK | Not applicable. | Gets the service instance name containing this server instance | |
getServiceId() | CLM AWS SDK | Not applicable. | Gets the service instance id containing this server instance | |
getAmiLaunchIndex() | AWS | The AMI launch index, which can be used to find this instance in the launch group. | This will not be returned by CLM AWS SDK. | |
getClientToken() | AWS | The idempotency token provided when you launched the instance. | This will not be returned by CLM AWS SDK. | |
getEbsOptimized() | AWS | Indicates whether the instance is optimized for EBS I/O. | In CLM AWS SDK, an instance will be EBS optimized depending on its instance type. | Following instance type are considered for EBS optimized:
|
getHypervisor() | AWS | The hypervisor type of the instance. | This will not be returned by CLM AWS SDK. | |
getIamInstanceProfile() | AWS | The IAM instance profile associated with the instance. | This will not be returned by CLM AWS SDK. | |
getInstanceLifecycle() | AWS | Indicates whether this is a Spot Instance. | This will not be returned by CLM AWS SDK. | |
getKeyName() | AWS | The name of the key pair, if this instance was launched with an associated key pair. | The name of the key pair, if this instance was launched with an associated key pair. | For provisioning case, ensure that a deployment parameter (with name BmcSshInstanceKey) is created in a service blueprint. |
getLaunchTime() | AWS | The time the instance was launched. | Server create time. | |
getMonitoring() | AWS | The monitoring information for the instance. | The monitoring information for the instance. | Ensure that the property Enable Monitoring is selected in a service blueprint. |
getPublicIpAddress() | AWS | Public IP Address of instance. | Public IP address of the instance. | Based on the configuration of service blueprint. |
getPrivateIpAddress() | AWS | Private IP Address of instance | List of private IP addresses based on blueprint configuration. | |
getNetworkInterfaces() | AWS | List of com.amazonaws.services.ec2.model.InstanceNetworkInterface | List of com.amazonaws.services.ec2.model.InstanceNetworkInterface | NICs are configured on an instance based on the configuration of service blueprint. |
getVpcId() | AWS | The ID of the VPC in which the instance is running. | The ID of the network container selected for provisioning in BMC Cloud Lifecycle Management. | |
getInstanceId() | AWS | The ID of the instance. | ID of server in BMC Cloud Lifecycle Management. | |
getArchitecture() | AWS | The architecture of the image. | Architecure of image obtained from server. | |
getBlockDeviceMappings() | AWS | List of com.amazonaws.services.ec2.model.InstanceBlockDeviceMapping | List of com.amazonaws.services.ec2.model.InstanceBlockDeviceMapping obtained by transforming server's LocalDisk objects in BMC Cloud Lifecycle Management. | |
getState() | AWS | The current state of the instance. com.amazonaws.services.ec2.model.InstanceState | Server's ProvisionedResourceState | |
getPlacement() | AWS | The location where the instance launched. com.amazonaws.services.ec2.model.Placement | The location where the instance launched. | For on-premise cloud provider, this returns the network container information used for provisioning in the BMC Cloud Lifecycle Management. |
getImageId() | AWS | The ID of the AMI used to launch the instance. | The ID of the AMI used to launch the instance. | |
getKernelId() | AWS | The kernel associated with this instance. | The kernel associated with this instance.Same as AWS. | |
getPlatform() | AWS | The value is Windows for Windows instances; otherwise blank. | The value is Windows for Windows instances; otherwise blank. | |
getInstanceType() | AWS | The instance type. | Instance Type. Same as AWS. | |
getPrivateDnsName() | AWS | The private DNS name assigned to the instance. | This will not be returned by CLM AWS SDK. | |
getProductCodes() | AWS | The product codes attached to this instance. | This will not be returned by CLM AWS SDK. | |
getPublicDnsName() | AWS | The public DNS name assigned to the instance. | This will not be returned by CLM AWS SDK. | |
getRamdiskId() | AWS | The RAM disk associated with this instance. | This will not be returned by CLM AWS SDK. | |
getRootDeviceName() | AWS | The root device name. For example: /dev/sda1. | The root device name. For example: /dev/sda1. | |
getRootDeviceType() | AWS | The root device type used by the AMI. | The root device type used by the AMI. | |
getSecurityGroups() | AWS | One or more security groups for the instance. | One or more security groups for the instance. | |
getSourceDestCheck() | AWS | Specifies whether to enable an instance launched in a VPC to perform NAT. | This will not be returned by CLM AWS SDK. | |
getSpotInstanceRequestId() | AWS | The ID of the spot instance request. | This will not be returned by CLM AWS SDK. |
Comments
Log in or register to comment.