Parameter description
Attribute |
Type |
Description |
cluster_id |
str |
Cluster ID |
group_name |
str |
Instance group name |
next_marker |
str |
Start resource ID on the next page. The value is null for the last page |
max_item_count |
int |
Maximum number of actually returned resources. The default value is 50, and the maximum value is 100 |
Response description
- The list_cluster_instances method returns a
ListResponse
object, which contains a set of ClusterInstance
objects. - For more information about attributes of the
ClusterInstance
object, see the description of the ClusterInstance
class.
Attribute |
Type |
Description |
NextMarker |
str |
Start resource ID on the next page. The value is null for the last page |
Items |
list |
List of ClusterInstance classes |
Example
try:
# Get a Client object.
client = Client(...
...
cluster_id = "cls-xxxx"
group_name = "group1"
marker = ""
max_item = 100
round = 0
while marker or round != 0:
response = client.list_cluster_instances(cluster_id, group_name, marker, max_item)
marker = response.NextMarker
for cluster_instance in response.Items:
print (cluster_instance.Id, cluster_instance.IpAddress)
round += 1
except ClientError, e:
print(e)