Unsupported content

 

This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

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:

UsageDescription
To execute using server instance ID(s)
DescribeInstancesRequest describeInstancesRequest = new DescribeInstancesRequest();
List<String> instanceIdList = new ArrayList<String>(); 
// Pass Server Ids here 
instanceIdList.add("dfbb7d4f-196e-462a-b0c6-4f96e51eccbd"); 
describeInstancesRequest.setInstanceIds(instanceIdList); 
clmEC2Client.describeInstances(describeInstancesRequest);
To execute using service ID(s)
DescribeServicesRequest describeServicesRequest = new DescribeServicesRequest(); 
List<String> serviceIdList = new ArrayList<String>(); 
// Pass Service Ids here 
serviceIdList.add("ec37bff8-8886-4ed2-bb92-249deae0fcff"); 
describeServicesRequest.setServiceIds(serviceIdList); 
clmEC2Client.describeInstances(describeServicesRequest);
To execute using service name(s)
DescribeServicesRequest describeServicesRequest = new DescribeServicesRequest(); 
List<String> serviceNameList = new ArrayList<String>(); 
serviceNameList.add("WinTestService"); 
describeServicesRequest.setServiceNames(serviceNameList); 
clmEC2Client.describeInstances(describeServicesRequest);

Before you begin

Prior to using this CLM AWS SDK method, ensure that the following prerequisites are met:

Request

Using com.amazonaws.services.ec2.model.DescribeInstancesRequest

MethodUsage as per AWS SDKUsage as per CLM AWS SDKRemarks
setInstanceIds(Collection<String> instanceIds)
One or more instance IDsOne 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 IDsOne 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

MethodUsage as per AWS SDKUsage as per CLM AWS SDKRemarks
setServiceIds(final List<String> serviceIds)
Not usedOne 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 usedOne 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 DescribeInstancesResultOne or more reservations which are mapped to BMC Cloud Lifecycle Management resource sets contained in DescribeInstancesResultReservations 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.

MethodBelongs 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

MethodBelongs  To   Usage as per AWS SDK    Usage as per CLM AWS SDK                      Remarks
getCpuCount() 
CLM AWS SDKNot applicable.Gets the number of CPU assigned to this server instance 
getMemory() 
CLM AWS SDKNot applicable.Gets the memory (in MB) assigned as RAM to this server instance 
getName() 
CLM AWS SDKNot applicable.Gets the name of server instance in BMC Cloud Lifecycle Management.  
getServerId() 
CLM AWS SDKNot applicable. Gets the server instance ID.  
getTierName() 
CLM AWS SDKNot applicable.Gets the name of resource set created in BMC Cloud Lifecycle Management.  
getTierId() 
CLM AWS SDKNot applicable. Gets the id of resource set created in BMC Cloud Lifecycle Management. 
getServiceName() 
CLM AWS SDKNot applicable. Gets the service instance name containing this server instance   
getServiceId() CLM AWS SDKNot applicable.Gets the service instance id containing this server instance 
getAmiLaunchIndex()
AWSThe 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() 
AWSThe idempotency token provided when you launched the instance.This will not be returned by CLM AWS SDK.  
getEbsOptimized() 
AWSIndicates 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: 
  • m3.xlarge
  • m3.2xlarge
  • m3.2xlarge
  • c3.xlarge
  • c3.2xlarge
  • c3.4xlarge
  • g2.2xlarge
  • r3.xlarge
  • r3.2xlarge
  • r3.4xlarge
  • i2.xlarge
  • i2.2xlarge
  • i2.4xlarge
getHypervisor() 
AWSThe hypervisor type of the instance.This will not be returned by CLM AWS SDK.  
getIamInstanceProfile() 
AWSThe IAM instance profile associated with the instance. This will not be returned by CLM AWS SDK.  
getInstanceLifecycle() 
AWSIndicates whether this is a Spot Instance. This will not be returned by CLM AWS SDK.  
getKeyName() 
AWSThe 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() 
AWSThe time the instance was launched. Server create time. 
getMonitoring() 
AWSThe 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.InstanceNetworkInterfaceList of com.amazonaws.services.ec2.model.InstanceNetworkInterfaceNICs 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.InstanceBlockDeviceMappingList 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()
AWSThe private DNS name assigned to the instance.This will not be returned by CLM AWS SDK.  
getProductCodes()
AWSThe product codes attached to this instance.This will not be returned by CLM AWS SDK. 
getPublicDnsName() 
AWSThe public DNS name assigned to the instance. This will not be returned by CLM AWS SDK.  
getRamdiskId() 
AWSThe RAM disk associated with this instance. This will not be returned by CLM AWS SDK.  
getRootDeviceName() 
AWSThe root device name. For example: /dev/sda1The root device name. For example: /dev/sda1 
getRootDeviceType() 
AWSThe root device type used by the AMI. The root device type used by the AMI.  
getSecurityGroups() 
AWSOne or more security groups for the instance. One or more security groups for the instance.  
getSourceDestCheck() 
AWSSpecifies whether to enable an instance launched in a VPC to perform NAT. This will not be returned by CLM AWS SDK.  
getSpotInstanceRequestId()
AWSThe ID of the spot instance request. This will not be returned by CLM AWS SDK.  

Related topic

CLM AWS SDK use cases

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Comments