Tag Management
Overview
ZStack Cloud provides two types of tags to help users and plugins organize resources, introduce extra resource properties, and instruct ZStack Cloud to perform specific business logic.
User Tags
- You can create user tags on all the resources that you have, which is especially
useful when you aggregate a set of similar resources.For example, you can create a web tag on VM instances that act as web servers.
-
CreateUserTag resourceType=VmInstanceVO \ resourceUuid=613af3fe005914c1643a15c36fd578c6 tag=webCreateUserTag resourceType=VmInstanceVO \ resourceUuid=5eb55c39db015c1782c7d814900a9609 tag=webCreateUserTag resourceType=VmInstanceVO \ resourceUuid=0cd1ef8c9b9e0ba82e0cc9cc17226a26 tag=web - Then, you can retrieve these VM instances by using Query API with
tags <query with
tags>.
QueryVmInstance __userTag__=web
When you create a VM instance, you can also set multiple user tags and separate these tags by using a comma (,).-
CreateVmInstance instanceOfferingUuid=1cf417bfd0e94175aea92131f1000011 \ imageUuid=ee14c7c8cc46309d821c51bbae3adb70 l3NetworkUuids=ac5c7e736f1b499bbd0c12763b30051d \ name=tesd2 userTags=capability::liveSnapshot,os::centos::7.4 - For example, you can set the capacity (40G), OS version (CentOS7.4),
password (123456), and usage scenario (Apache) on these tags. These
settings have no special relation to
::.CreateVmInstance instanceOfferingUuid=1cf417bfd0e94175aea92131f1000011 \ imageUuid=ee14c7c8cc46309d821c51bbae3adb70 l3NetworkUuids=ac5c7e736f1b499bbd0c12763b30051d name=tesd2 \ userTags=capability:40G,OS:CentOS7.4,password:123456,usage:Apache
-
- You can also integrate user tags with system tags to change the business logic
of the cloud.
For example, you might want all VM instances that work as web servers to create their root volumes on a special primary storage that provides better IO performance by SSD.
To do so, you can follow the steps below:- Create a user tag forWebTierVM on a primary
storage.
CreateUserTag tag=forWebTierVM resourceType=PrimaryStorageVO \ resourceUuid=6572ce44c3f6422d8063b0fb262cbc62 - Create a system tag on an instance
offering.
CreateSystemTag tag=primaryStorage::allocator::userTag::forWebTierVM \ resourceType=InstanceOfferingVO resourceUuid=8f69ef6c2c444cdf8c019fa0969d56a5 - Then, when you create a VM instance with the instance offering UUID: 8f69ef6c2c444cdf8c019fa0969d56a5, ZStack Cloud will make sure that the root volume of the VM instance will be created on only the primary storage with the user tag forWebTierVM and UUID 6572ce44c3f6422d8063b0fb262cbc62.
- Create a user tag forWebTierVM on a primary
storage.
System Tags
System tags have wider usage than user tags. You can use system tags to instruct ZStack Cloud to do some specific business logic, like the examples in the section above.
- Inherent System Tags
Plugins, which extend the functionality of ZStack Cloud, can use system tags to introduce additional resource properties, or to record metadata that tightly bind to resources.
For example, you might want to perform online migrations or online snapshots on KVM instances.
ZStack Cloud needs to know the libvirt version and QEMU version of the KVM instances, which are all meta data. ZStack Cloud records these data as system tags of VM instances.
- For example, you can view the system tags of a KVM VM instance by
running the following command:
QuerySystemTag fields=tag resourceUuid=d07066c4de02404a948772e131139eb4 - d07066c4de02404a948772e131139eb4 is the UUID for the KVM
instance. The query result is as
follows:
{ "inventories": [ { "tag": "capability:liveSnapshot" }, { "tag": "qemu-img::version::2.0.0" }, { "tag": "os::version::14.04" }, { "tag": "libvirt::version::1.2.2" }, { "tag": "os::release::trusty" }, { "tag": "os::distribution::Ubuntu" } ], "success": true }
This kind of system tags are called inherent system tags, which can be only created by ZStack Cloud services and plugins, and cannot be deleted by using the DeleteTag API.
- For example, you can view the system tags of a KVM VM instance by
running the following command:
- Non-inherent System Tags
To add new features, plugins usually need to add a new properties to a resource. Although a plugin cannot add a new column by changing the database schema of a resource, the plugin can create new properties as system tags of a resource.
For example, when you create a VM instance, you can bind a hostname that can be accessed by the Internet to an L3 network of the VM instance.-
CreateVmInstance name=testTag systemTags=hostname::web-server-1 \ l3NetworkUuids=6572ce44c3f6422d8063b0fb262cbc62 \ instanceOfferingUuid=04b5419ca3134885be90a48e372d3895 \ imageUuid=f1205825ec405cd3f2d259730d47d1d8 - This hostname is implemented by a system tag.
- If you view the VM Instance Inventory in the VM Instance topic, you will find no property called hostname.
- However, you can find the hostname from the system tags of the VM
instance.
QuerySystemTag fields=tag uuid resourceUuid=76e119bf9e16461aaf3d1b47c645c7b7{ "inventories": [ { "tag": "hostname::web-server-1", "uuid": "596070a6276746edbf0f54ef721f654e" } ], "success": true }
This kind of system tags are non-inherent. You can them by using the DeleteTag API.
For example, if you want to change the hostname of a VM instance mentioned above to web-server-nginx, you can:-
DeleteTag uuid=596070a6276746edbf0f54ef721f654e -
CreateSystemTag resourceType=VmInstanceVO tag=hostname::web-server-nginx \ resourceUuid=76e119bf9e16461aaf3d1b47c645c7b7 - After the VM instance is stopped and restarted, the guest operating system will receive the new hostname as web-server-nginx.
-
Name Convention
- A user tag does not have any enforced name convention. We recommend that you use readable, meaningful strings.
- A system tag, as defined by ZStack Cloud service and
plugins, follows the format that uses
::as a delimiters.
Resource Type
When you create a tag, you must specify the resource type that the tag is associated with.
| Resource Type |
|---|
| AccessControlRuleVO |
| AccessKeyVO |
| AccountResourceRefVO |
| AccountVO |
| AddingNewInstanceRuleVO |
| AffinityGroupUsageVO |
| AffinityGroupVO |
| AlarmActionVO |
| AlarmLabelVO |
| AlarmVO |
| AlertVO |
| AliyunDiskVO |
| AliyunEbsBackupStorageVO |
| AliyunEbsPrimaryStorageVO |
| AliyunNasAccessGroupVO |
| AliyunNasAccessRuleVO |
| AliyunNasFileSystemVO |
| AliyunNasMountTargetVO |
| AliyunNasMountVolumeRefVO |
| AliyunNasPrimaryStorageFileSystemRefVO |
| AliyunNasPrimaryStorageMountPointVO |
| AliyunPanguPartitionVO |
| AliyunProxyVSwitchVO |
| AliyunProxyVpcVO |
| AliyunRouterInterfaceVO |
| AliyunSmsSNSTextTemplateVO |
| AliyunSnapshotVO |
| ApplianceVmFirewallRuleVO |
| ApplianceVmVO |
| ArchiveTicketStatusHistoryVO |
| ArchiveTicketVO |
| AsyncRestVO |
| AutoScalingGroupActivityVO |
| AutoScalingGroupInstanceVO |
| AutoScalingGroupVO |
| AutoScalingRuleAlarmTriggerVO |
| AutoScalingRuleTriggerVO |
| AutoScalingRuleVO |
| AutoScalingTemplateGroupRefVO |
| AutoScalingTemplateVO |
| AutoScalingVmTemplateVO |
| AvailableInstanceTypesVO |
| BackupStorageEO |
| BackupStorageVO |
| BackupStorageZoneRefVO |
| BaremetalBondingVO |
| BaremetalChassisVO |
| BaremetalHardwareInfoVO |
| BaremetalImageCacheVO |
| BaremetalInstanceSequenceNumberVO |
| BaremetalInstanceVO |
| BaremetalNicVO |
| BaremetalPxeServerClusterRefVO |
| BaremetalPxeServerVO |
| BaremetalVlanNicVO |
| BareMetal2ChassisVO |
| BareMetal2ChassisNicVO |
| BareMetal2ChassisDiskVO |
| BareMetal2ChassisOfferingVO |
| BareMetal2InstanceVO |
| BareMetal2GatewayVO |
| BareMetal2ProvisionNetworkVO |
| BillingResourceLabelVO |
| BillingVO |
| BuildApplicationVO |
| CaptchaVO |
| CbtTaskVO |
| CbtTaskResourceRefVO |
| CephBackupStorageMonVO |
| CephBackupStorageVO |
| CephCapacityVO |
| CephPrimaryStorageMonVO |
| CephPrimaryStoragePoolVO |
| CephPrimaryStorageVO |
| CertificateVO |
| CloudFormationStackEventVO |
| CloudFormationStackResourceRefVO |
| ClusterEO |
| ClusterVO |
| ConnectionAccessPointVO |
| ConnectionRelationShipVO |
| ConsoleProxyAgentVO |
| ConsoleProxyVO |
| CustomPreconfigurationVO |
| DataCenterVO |
| DataVolumeBillingVO |
| DataVolumeUsageExtensionVO |
| DataVolumeUsageHistoryVO |
| DataVolumeUsageVO |
| DatabaseBackupStorageRefVO |
| DatabaseBackupVO |
| DeleteVO |
| DiskOfferingEO |
| DiskOfferingVO |
| ESXHostVO |
| EcsImageUsageVO |
| EcsImageVO |
| EcsInstanceVO |
| EcsSecurityGroupRuleVO |
| EcsSecurityGroupVO |
| EcsVSwitchVO |
| EcsVpcVO |
| EipVO |
| ElaborationVO |
| EmailMediaVO |
| EmailTriggerActionVO |
| EventSubscriptionActionVO |
| EventSubscriptionLabelVO |
| EventSubscriptionVO |
| FiberChannelLunVO |
| FiberChannelStorageVO |
| FlowCollectorVO |
| FlowMeterVO |
| FlowRouterVO |
| GarbageCollectorVO |
| GlobalConfigTemplateVO |
| GlobalConfigVO |
| GuestToolsVO |
| HardwareL2VxlanNetworkPoolVO |
| HardwareL2VxlanNetworkVO |
| HistoricalPasswordVO |
| HostCapacityVO |
| HostEO |
| HostTagVO |
| HostVO |
| HuaweiIMasterFabricVO |
| HuaweiIMasterSdnControllerVO |
| HuaweiIMasterTenantFabricRefVO |
| HuaweiIMasterTenantVO |
| HuaweiIMasterVpcVO |
| HuaweiIMasterVRouterVO |
| HybridAccountVO |
| HybridConnectionRefVO |
| HybridEipAddressVO |
| IAM2GroupVirtualIDRefVO |
| IAM2OrganizationAttributeVO |
| IAM2OrganizationProjectRefVO |
| IAM2OrganizationVO |
| IAM2ProjectAccountRefVO |
| IAM2ProjectAttributeVO |
| IAM2ProjectTemplateVO |
| IAM2ProjectVO |
| IAM2ProjectVirtualIDRefVO |
| IAM2TicketFlowCollectionVO |
| IAM2TicketFlowVO |
| IAM2VirtualIDAttributeVO |
| IAM2VirtualIDGroupAttributeVO |
| IAM2VirtualIDGroupRefVO |
| IAM2VirtualIDGroupRoleRefVO |
| IAM2VirtualIDGroupVO |
| IAM2VirtualIDOrganizationRefVO |
| IAM2VirtualIDRoleRefVO |
| IAM2VirtualIDVO |
| IPsecConnectionVO |
| IPsecL3NetworkRefVO |
| IPsecPeerCidrVO |
| IdentityZoneVO |
| ImageBackupStorageRefVO |
| ImageCacheShadowVO |
| ImageCacheVO |
| ImageCacheVolumeRefVO |
| ImageEO |
| ImageGroupRefVO |
| ImageGroupVO |
| ImageOpsJournalVO |
| ImageReplicationGroupBackupStorageRefVO |
| ImageReplicationGroupVO |
| ImageReplicationHistoryVO |
| ImageStoreBackupStorageVO |
| ImageVO |
| ImagePackageVO |
| InsertVO |
| InstallPathRecycleVO |
| InstanceOfferingEO |
| InstanceOfferingVO |
| IpRangeEO |
| IpRangeVO |
| IscsiFileSystemBackendPrimaryStorageVO |
| IscsiIsoVO |
| IscsiLunVO |
| IscsiServerClusterRefVO |
| IscsiServerVO |
| IscsiTargetVO |
| JobQueueEntryVO |
| JobQueueVO |
| JsonLabelVO |
| KVMHostVO |
| KeyValueBinaryVO |
| KeyValueVO |
| L2NetworkClusterRefVO |
| L2NetworkEO |
| L2NetworkVO |
| L2VlanNetworkVO |
| L3NetworkDnsVO |
| L3NetworkEO |
| L3NetworkHostRouteVO |
| L3NetworkVO |
| LdapAccountRefVO |
| LdapResourceRefVO |
| LdapServerVO |
| LoadBalancerListenerCertificateRefVO |
| LoadBalancerListenerVO |
| LoadBalancerListenerVmNicRefVO |
| LoadBalancerVO |
| LocalStorageHostRefVO |
| LocalStorageResourceRefVO |
| LogVO |
| LoginAttemptsVO |
| LogServerVO |
| LongJobVO |
| ManagementNodeContextVO |
| ManagementNodeVO |
| MdevDeviceSpecVO |
| MdevDeviceVO |
| MediaVO |
| MiniStorageHostRefVO |
| MiniStorageResourceReplicationVO |
| MiniStorageVO |
| MirrorNetworkUsedIpVO |
| MonitorTriggerActionRefVO |
| MonitorTriggerActionVO |
| MonitorTriggerVO |
| MulticastRouterRendezvousPointVO |
| MulticastRouterVO |
| MulticastRouterVpcVRouterRefVO |
| NasFileSystemVO |
| NasMountTargetVO |
| NetworkRouterAreaRefVO |
| NetworkRouterFlowMeterRefVO |
| NetworkServiceL3NetworkRefVO |
| NetworkServiceProviderL2NetworkRefVO |
| NetworkServiceProviderVO |
| NetworkServiceTypeVO |
| NotificationSubscriptionVO |
| OssBucketDomainVO |
| OssBucketVO |
| OssUploadPartsVO |
| ObservabilityServerServiceRefVO |
| ObservabilityServerOfferingVO |
| ObservabilityServerVmVO |
| PciDeviceBillingVO |
| PciDeviceMdevSpecRefVO |
| PciDeviceOfferingInstanceOfferingRefVO |
| PciDeviceOfferingVO |
| PciDevicePciDeviceOfferingRefVO |
| PciDeviceSpecVO |
| PciDeviceUsageHistoryVO |
| PciDeviceUsageVO |
| PciDeviceVO |
| PhysicalDriveSmartSelfTestHistoryVO |
| PhysicalSwitchPortVO |
| PhysicalSwitchVO |
| PolicyRouteRuleSetL3RefVO |
| PolicyRouteRuleSetVO |
| PolicyRouteRuleSetVRouterRefVO |
| PolicyRouteRuleVO |
| PolicyRouteTableRouteEntryVO |
| PolicyRouteTableVO |
| PolicyRouteTableVRouterRefVO |
| PolicyVO |
| PortForwardingRuleVO |
| PortMirrorSessionMirrorNetworkRefVO |
| PortMirrorSessionSequenceNumberVO |
| PortMirrorSessionVO |
| PortMirrorVO |
| PreconfigurationTemplateVO |
| PricePciDeviceOfferingRefVO |
| PriceVO |
| PrimaryStorageCapacityVO |
| PrimaryStorageClusterRefVO |
| PrimaryStorageEO |
| PrimaryStorageHostRefVO |
| PrimaryStorageVO |
| PubIpVipBandwidthInBillingVO |
| PubIpVipBandwidthOutBillingVO |
| PubIpVipBandwidthUsageHistoryVO |
| PubIpVipBandwidthUsageVO |
| PubIpVmNicBandwidthInBillingVO |
| PubIpVmNicBandwidthOutBillingVO |
| PubIpVmNicBandwidthUsageVO |
| QuartzJdbcJobVO |
| QuotaVO |
| RaidControllerVO |
| RaidPhysicalDriveVO |
| RemovalInstanceRuleVO |
| ResourceConfigVO |
| ResourceStackVO |
| ResourceUsageVO |
| ResourceVO |
| RoleAccountRefVO |
| RolePolicyRefVO |
| RolePolicyStatementVO |
| RoleUserGroupRefVO |
| RoleUserRefVO |
| RoleVO |
| RootVolumeBillingVO |
| RootVolumeUsageExtensionVO |
| RootVolumeUsageVO |
| RouterAreaVO |
| SNSApplicationEndpointVO |
| SNSApplicationPlatformVO |
| SNSDingTalkAtPersonVO |
| SNSDingTalkEndpointVO |
| SNSEmailAddressVO |
| SNSEmailEndpointVO |
| SNSEmailPlatformVO |
| SNSHttpEndpointVO |
| SNSSmsEndpointVO |
| SNSSmsReceiverVO |
| SNSSubscriberVO |
| SNSTextTemplateVO |
| SNSTopicVO |
| SchedulerJobGroupJobRefVO |
| SchedulerJobGroupSchedulerTriggerRefVO |
| SchedulerJobGroupVO |
| SchedulerJobHistoryVO |
| SchedulerJobSchedulerTriggerRefVO |
| SchedulerJobVO |
| SchedulerTriggerVO |
| SchedulerVO |
| ScsiLunHostRefVO |
| ScsiLunVO |
| ScsiLunVmInstanceRefVO |
| SdnControllerVO |
| SecurityGroupFailureHostVO |
| SecurityGroupL3NetworkRefVO |
| SecurityGroupRuleVO |
| SecurityGroupSequenceNumberVO |
| SecurityGroupVO |
| SessionVO |
| SftpBackupStorageVO |
| ShareableVolumeVmInstanceRefVO |
| SharedBlockGroupPrimaryStorageHostRefVO |
| SharedBlockGroupVO |
| SharedBlockVO |
| SharedBlockCapacityVO |
| SharedResourceVO |
| SimulatorHostVO |
| SnapShotUsageVO |
| StackTemplateVO |
| SystemRoleVO |
| SystemTagVO |
| TagPatternVO |
| TaskProgressVO |
| TemplateConfigVO |
| TemplateCustomParamVO |
| TicketFlowCollectionVO |
| TicketFlowVO |
| TicketStatusHistoryVO |
| TicketTypeTicketFlowCollectionRefVO |
| TicketTypeVO |
| TicketVO |
| TwoFactorAuthenticationSecretVO |
| UpdateVO |
| UsbDeviceVO |
| UsedIpVO |
| UserGroupPolicyRefVO |
| UserGroupUserRefVO |
| UserGroupVO |
| UserPolicyRefVO |
| UserTagVO |
| UserVO |
| V2VConversionCacheVO |
| V2VConversionHostVO |
| VCenterBackupStorageVO |
| VCenterClusterVO |
| VCenterDatacenterVO |
| VCenterPrimaryStorageVO |
| VCenterResourcePoolUsageVO |
| VCenterResourcePoolVO |
| VCenterVO |
| VRouterRouteEntryVO |
| VRouterRouteTableVO |
| VipNetworkServicesRefVO |
| VipPeerL3NetworkRefVO |
| VipQosVO |
| VipVO |
| VirtualBorderRouterVO |
| VirtualRouterBootstrapIsoVO |
| VirtualRouterEipRefVO |
| VirtualRouterLoadBalancerRefVO |
| VirtualRouterOfferingVO |
| VirtualRouterPortForwardingRuleRefVO |
| VirtualRouterVRouterRouteTableRefVO |
| VirtualRouterVipVO |
| VirtualRouterVmVO |
| VmCPUBillingVO |
| VmCdRomVO |
| VmInstanceEO |
| VmInstanceMdevDeviceSpecRefVO |
| VmInstanceMdevSpecDeviceRefVO |
| VmInstancePciDeviceSpecRefVO |
| VmInstancePciSpecDeviceRefVO |
| VmInstanceSequenceNumberVO |
| VmInstanceVO |
| VmMemoryBillingVO |
| VmNicSecurityGroupRefVO |
| VmNicVO |
| VmPriorityConfigVO |
| VmVdpaNicVO |
| VmVfNicVO |
| VmUsageVO |
| VniRangeVO |
| VolumeBackupHistoryVO |
| VolumeBackupStorageRefVO |
| VolumeBackupVO |
| VolumeEO |
| VolumeSnapshotBackupStorageRefVO |
| VolumeSnapshotEO |
| VolumeSnapshotGroupRefVO |
| VolumeSnapshotGroupVO |
| VolumeSnapshotTreeEO |
| VolumeSnapshotTreeVO |
| VolumeSnapshotVO |
| VolumeVO |
| VpcFirewallRuleSetL3RefVO |
| VpcFirewallRuleSetVO |
| VpcFirewallRuleVO |
| VpcFirewallVO |
| VpcFirewallVRouterRefVO |
| VpcHaGroupApplianceVmRefVO |
| VpcHaGroupMonitorIpVO |
| VpcHaGroupNetworkServiceRefVO |
| VpcHaGroupVO |
| VpcHaGroupVipRefVO |
| VpcRouterDnsVO |
| VpcRouterVmVO |
| VpcUserVpnGatewayVO |
| VpcVirtualRouteEntryVO |
| VpcVirtualRouterVO |
| VpcVpnConnectionVO |
| VpcVpnGatewayVO |
| VpcVpnIkeConfigVO |
| VpcVpnIpSecConfigVO |
| VtepVO |
| VxlanClusterMappingVO |
| VxlanHostMappingVO |
| VxlanNetworkPoolVO |
| VxlanNetworkVO |
| WebhookVO |
| WorkFlowChainVO |
| WorkFlowVO |
| XDragonHostVO |
| ZoneEO |
| ZoneVO |
In the corresponding Tags topic of each resource, we will explain what resource types to use when you create tags.
Inventory
System Tag Inventory
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID. For more information, see Resource Property. | 0.6 | ||
| createDate | The creation date. For more information, see Resource Property. | 0.6 | ||
| lastOpDate | The last operation date. For more information, see Resource Property. | 0.6 | ||
| resourceUuid | The resource UUID. | 0.6 | ||
| resourceType | The resource type. | 0.6 | ||
| tag | Th tag string. | 0.6 | ||
| type | The reserved field. | 0.6 | ||
| groupBy | Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. | Yes | 1.9 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 0.6 |
Tag Inventory
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID. For more information, see Resource Property. | 3.2.0 | ||
| createDate | The creation date. For more information, see Resource Property. | 3.2.0 | ||
| lastOpDate | The last operation date. For more information, see Resource Property. | 3.2.0 | ||
| value | 3.2.0 | |||
| description | The detailed description of the resource. | 3.2.0 | ||
| color | 3.2.0 | |||
| type | The reserved field. | 3.2.0 | ||
| groupBy | Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. | Yes | 3.2.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.2.0 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.2.0 |
{
"inventories": [
{
"uuid": "f7ac675964d0386b89d8df713f68aee0",
"name": "SSD",
"value": "SSD",
"description": "SSD volume",
"color": "#FFFFFF",
"type": "simple",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
]
}User Tag Inventory
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID. For more information, see Resource Structure. | 0.6 | ||
| createDate | The creation date. For more information, see Resource Structure. | 0.6 | ||
| lastOpDate | The last operation date. For more information, see Resource Structure. | 0.6 | ||
| resourceUuid | The resource UUID. If specified, the system will not allocate randomly a UUID to the resource. | 0.6 | ||
| resourceType | The resource type, which must be specified when you create a tag. | 0.6 | ||
| tag | The tag string. | 0.6 | ||
| type | The reserved field for internal use. | 0.6 | ||
| groupBy | Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 0.6 |
{
"inventories": [
{
"uuid": "ae4f2dd05a513e1e8d350d448c2071a9",
"resourceType": "DiskOfferingVO",
"tag": "for-large-DB",
"type": "User",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
]
}Operations
CreateSystemTag
CreateSystemTag resourceType=HostVO resourceUuid=e604949bf86e4aef819456b52ddc336f \
tag=reservedMemory::1GParameters
| Name | Description | Optional | Options Value | Starting Version |
|---|---|---|---|---|
| resourceType | The resource type, which must be specified when you create a tag. | 0.6 | ||
| resourceUuid | The resource UUID. If specified, the system will not allocate randomly a UUID to the resource. | 0.6 | ||
| tag | The tag string. | 0.6 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 0.6 | |
| timeout | Yes |
Note:
- When you create a system tag in ZStack Cloud, you can specify whether to automatically
uninstall the physical PCI device allocated from the device
specifications when the VM instance is shut down. You can also delete or
change the configurations of existing VM instances. Note that you can
add the autoReleaseSpecReleatedPhysicalPciDevice option to
SystemTags.
- Format of the autoReleaseSpecReleatedPhysicalPciDevice
option:
autoReleaseSpecReleatedPhysicalPciDevice - Example:
autoReleaseSpecReleatedPhysicalPciDevice
- Format of the autoReleaseSpecReleatedPhysicalPciDevice
option:
- When you create a system tag in ZStack Cloud, you
can specify whether to automatically uninstall the virtual PCI device
allocated from the device specifications when the VM instance is shut
down. You can also delete or change the configurations of existing VM
instances. Note that you can add the
autoReleaseSpecReleatedVirtualPciDevice option to
SystemTags.
- Format of the autoReleaseSpecReleatedVirtualPciDevice
option:
autoReleaseSpecReleatedVirtualPciDevice - Example:
autoReleaseSpecReleatedVirtualPciDevice
- Format of the autoReleaseSpecReleatedVirtualPciDevice
option:
- You create system tags in ZStack Cloud to
identify VM instances or VPC vRouters for which high availability policy
is enabled or disabled. You can specify the resourceBindings
option when you create SystemTags.
- Format:
resourceBindings::Cluster:clusterUuid - Example:
resourceBindings::Cluster:2sdasf231jvznsdak
- Format:
- You create system tags in ZStack Cloud to
identify and filter the images of HA load balancers or VPC vRouters. You
can specify the applianceType option when you create
SystemTags.
- Format:
applianceType::type - Example:
applianceType::slb
- Format:
- You create system tags in ZStack Cloud to
identify HA load balancers. You can specify the SlbGroupUuid
option when you create SystemTags.
- Format:
SlbGroupUuid::uuid - Example:
SlbGroupUuid::12345678
- Format:
- When you add a system tag on ZStack Cloud, you
can specify a custom parameter to the boot.ipxe file by adding
extraBootParams to the SystemTags option.
- Format:
extraBootParams::{custom parameter} - Example:
extraBootParams::{acpi=noirq noapic}
- Format:
QuerySystemTag
QuerySystemTag resourceUuid=e604949bf86e4aef819456b52ddc336fPrimitive Fields of Query
See System Tag Inventory.
UpdateSystemTag
Updates a system tag.
UpdateSystemTag uuid=66c647cc74ab46d3a01d938ecdfd27ca tag=reservedMemory::1GParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The resource UUID. | 0.6 | ||
| tag | The tag string. | 0.6 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 0.6 | |
| timeout | Yes |
CreateUserTag
CreateUserTag resourceType=DiskOfferingVO resourceUuid=e76952fb94cb4cc2a33fc97bd26e51cc \
tag=for-large-DBParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| resourceType | The resource type, which must be specified when you create a tag. | 0.6 | ||
| resourceUuid | The resource UUID. If specified, the system will not allocate randomly a UUID to the resource. | 0.6 | ||
| tag | The tag string. | 0.6 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 0.6 | |
| timeout | Yes |
QueryUserTag
QueryUserTag resourceUuid=e76952fb94cb4cc2a33fc97bd26e51ccPrimitive Fields of Query
See User Tag Inventory.
DeleteTag
DeleteTag uuid=f7a13f786e6442d1839c5b565b233ed7Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The resource UUID. | 0.6 | ||
| deleteMode | The delete mode. For more information, see Delete Resources. | Yes |
|
0.6 |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 0.6 | |
| timeout | Yes |
Note:
- When you delete a tag in ZStack Cloud, you can specify whether to automatically
uninstall the physical PCI device allocated from the device
specifications when the VM instance is shut down. You can also delete or
change the configurations of existing VM instances. Note that you can
add the autoReleaseSpecReleatedPhysicalPciDevice option to
SystemTags.
- Format of the autoReleaseSpecReleatedPhysicalPciDevice
option:
autoReleaseSpecReleatedPhysicalPciDevice - Example:
autoReleaseSpecReleatedPhysicalPciDevice
- Format of the autoReleaseSpecReleatedPhysicalPciDevice
option:
- When you delete a tag in ZStack Cloud, you can
specify whether to automatically uninstall the virtual PCI device
allocated from the device specifications when the VM instance is shut
down. You can also delete or change the configurations of existing VM
instances. Note that you can add the
autoReleaseSpecReleatedVirtualPciDevice option to
SystemTags.
- Format of the autoReleaseSpecReleatedVirtualPciDevice
option:
autoReleaseSpecReleatedVirtualPciDevice - Example:
autoReleaseSpecReleatedVirtualPciDevice
- Format of the autoReleaseSpecReleatedVirtualPciDevice
option:
CreateTag
CreateTag name=vmtag value=vmtagParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| name | The resource name. | 3.2.0 | ||
| value | The tag value. | 3.2.0 | ||
| description | The detailed description of the resource. | Yes | 3.2.0 | |
| color | The tag color. | Yes | 3.2.0 | |
| type | The tag type. | Yes |
|
3.2.0 |
| resourceUuid | Yes | 3.2.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.2.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.2.0 | |
| timeout | Yes |
QueryTag
QueryTag Primitive Fields of Query
See Tag Inventory.
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| tag | User Tag Inventory | 3.2.0 |
UpdateTag
UpdateTag uuid=8715c9f38a7545398b447ed09e15a053Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The resource UUID. | 3.2.0 | ||
| name | The resource name. | Yes | 3.2.0 | |
| value | The tag value. | Yes | 3.2.0 | |
| description | The detailed description of the resource. | Yes | 3.2.0 | |
| color | The tag color. | Yes | 3.2.0 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.2.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.2.0 | |
| timeout | Yes |
AttachTagToResources
AttachTagToResources tagUuid=8715c9f38a7545398b447ed09e15a053 resourceUuids=8a1286923c774be3ae2c565a93456b5fParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| tagUuid | The tag UUID. | 3.2.0 | ||
| resourceUuids | The resource UUID list. | 3.2.0 | ||
| tokens | The key and the value stored by tag. | Yes | 3.2.0 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.2.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.2.0 | |
| timeout | Yes |
DetachTagFromResources
DetachTagFromResources tagUuid=8715c9f38a7545398b447ed09e15a053 resourceUuids=8a1286923c774be3ae2c565a93456b5fParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| tagUuid | The tag UUID. | 3.2.0 | ||
| resourceUuids | The resource UUID list. | 3.2.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.2.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.2.0 | |
| timeout | Yes |
