def UpdateInstance(holder, client, instance_ref, instance, args, container_mount_disk_enabled=False, container_mount_disk=None):
    'Update an instance and its container metadata.'
    for metadata in instance.metadata.items:
        if (metadata.key == GCE_CONTAINER_DECLARATION):
            UpdateMetadata(holder, metadata, args, instance, container_mount_disk_enabled=container_mount_disk_enabled, container_mount_disk=container_mount_disk)
            operation = client.apitools_client.instances.SetMetadata(client.messages.ComputeInstancesSetMetadataRequest(metadata=instance.metadata, **instance_ref.AsDict()))
            operation_ref = holder.resources.Parse(operation.selfLink, collection='compute.zoneOperations')
            operation_poller = poller.Poller(client.apitools_client.instances)
            set_metadata_waiter = waiter.WaitFor(operation_poller, operation_ref, 'Updating specification of container [{0}]'.format(instance_ref.Name()))
            if (instance.status == client.messages.Instance.StatusValueValuesEnum.TERMINATED):
                return set_metadata_waiter
            elif (instance.status == client.messages.Instance.StatusValueValuesEnum.SUSPENDED):
                return _StopVm(holder, client, instance_ref)
            else:
                _StopVm(holder, client, instance_ref)
                return _StartVm(holder, client, instance_ref)
    raise NoGceContainerDeclarationMetadataKey()
Update an instance and its container metadata.
def UpdateInstance(holder, client, instance_ref, instance, args, container_mount_disk_enabled=False, container_mount_disk=None):
    
    for metadata in instance.metadata.items:
        if (metadata.key == GCE_CONTAINER_DECLARATION):
            UpdateMetadata(holder, metadata, args, instance, container_mount_disk_enabled=container_mount_disk_enabled, container_mount_disk=container_mount_disk)
            operation = client.apitools_client.instances.SetMetadata(client.messages.ComputeInstancesSetMetadataRequest(metadata=instance.metadata, **instance_ref.AsDict()))
            operation_ref = holder.resources.Parse(operation.selfLink, collection='compute.zoneOperations')
            operation_poller = poller.Poller(client.apitools_client.instances)
            set_metadata_waiter = waiter.WaitFor(operation_poller, operation_ref, 'Updating specification of container [{0}]'.format(instance_ref.Name()))
            if (instance.status == client.messages.Instance.StatusValueValuesEnum.TERMINATED):
                return set_metadata_waiter
            elif (instance.status == client.messages.Instance.StatusValueValuesEnum.SUSPENDED):
                return _StopVm(holder, client, instance_ref)
            else:
                _StopVm(holder, client, instance_ref)
                return _StartVm(holder, client, instance_ref)
    raise NoGceContainerDeclarationMetadataKey()